Successfully reported this slideshow.
Your SlideShare is downloading. ×

Adding Spreadsheets to the MDE Toolbox

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
TEST PPT
TEST PPT
Loading in …3
×

Check these out next

1 of 39 Ad

Adding Spreadsheets to the MDE Toolbox

Download to read offline

MoDELS 13 talk on the importance of embracing spreadsheets in MDE and on the support that Epsilon provides for validating, and transforming spreadsheets alongside other types of models (e.g. EMF, UML models)

MoDELS 13 talk on the importance of embracing spreadsheets in MDE and on the support that Epsilon provides for validating, and transforming spreadsheets alongside other types of models (e.g. EMF, UML models)

Advertisement
Advertisement

More Related Content

Advertisement
Advertisement

Adding Spreadsheets to the MDE Toolbox

  1. 1. 1 Adding Spreadsheets to the MDE Toolbox Martin Francis, D. Kolovos, N. Matragkas, R. Paige Department of Computer Science University of York
  2. 2. 2MDE • Aims to improve the quality and efficiency of the software development process – Promotes models to first-class citizens – Reduces the need for human compilers • Not restricted to a particular modelling technology / model representation format Skip Ad>
  3. 3. 3Models in MDE • Structured artefacts that – Contain (meta-)information of interest related to the system under development – Are amenable to automated processing • Transformation • Validation • Simulation etc.
  4. 4. 4Artefacts of Interest EMF XML XSD Spreadsheets Visio RDBMS
  5. 5. 5The MDE Community EMF XML XSD Spreadsheets Visio RDBMS
  6. 6. 6Everyone else EMF XML XSD Spreadsheets Visio RDBMS
  7. 7. 7Spreadsheets • Versatile and intuitive • Fill in gaps in the software development process – When no specialised tools exist for the job – When specialised tools are too expensive/complicated – When information needs to be collected from non-programmers
  8. 8. 8Spreadsheets • Used for – Capturing requirements – Tracking bugs – Allocating roles – Monitoring tasks • ... but have been largely ignored by MDE languages and tools
  9. 9. 9Aim of this Work • Add support for (Google) spreadsheets to languages for – Model querying – Model-to-model transformation – Model validation – Model-to-text transformation – Model comparison – Model merging • ... so that spreadsheets can be used in any step of an MDE process
  10. 10. 10eclipse.org/Epsilon
  11. 11. 11Concept Mapping • Spreadsheet -> Model • Worksheet -> Type • Column -> Property • Row -> Model element modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff ED teaches C lastname B firstname A id1 Module Mark
  12. 12. 12Preview (Query) modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark Student.allInstances-> select(s | s.age >= 18).println();
  13. 13. 13Preview (Query) modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark Student.all. select(s | s.age >= 18).println();
  14. 14. 14Preview (Query) modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark for (s in Student.all) { if (s.age >= 18) { s.println(); } }
  15. 15. 15Preview (M2T) modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark <ul> [%for (s in Student.allInstances){%] <li> [%=s.firstname] [%=s.lastname] [%}%] </ul>
  16. 16. 16Preview (Validation) context Mark { constraint WithinRange { check: self.mark <= 100 and self.mark >= 0 message: “Mark ” + self.mark + “ must be between 0-100” } } Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark E jd5023 74ICAR jd5012 62TPOP DC mark B module A student1 Student Staff Module Mark
  17. 17. 17Concept Mapping • Spreadsheet -> Model • Worksheet -> Type • Column -> Property • Row -> Model element modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff ED teaches C lastname B firstname A id1 Module Mark
  18. 18. 18Limitations • No way to specify – Column data types – Cross-references between columns – Multiplicities modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Module Mark
  19. 19. 19Limitations • No way to work with – Title-less columns – Worksheets with bizarre names (“Tom’s Data”) modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark E jd5023 74ICAR jd5012 62TPOP DC mark B module A student1 Student Staff Module Mark
  20. 20. 20Configuration Metamodel Spreadsheet Worksheet name : String alias : String Column index : Integer name : String alias : String dataType : String many : boolean delimiter : String Reference name : String many : boolean cascadeUpdates : boolean source target columns worksheets
  21. 21. 21Data Types <spreadsheet> <worksheet name=“Student”> <column name=“age” type=“Integer”/> </worksheet> </spreadsheet> modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Module Mark
  22. 22. 22Data Types Student.allInstances-> select(s | s.age >= 18) modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Module Mark
  23. 23. 23References <spreadsheet> <reference source=“Mark->module” target=“Module->id” many=“false”/> </spreadsheet> modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark E jd5023 74ICAR jd5012 62TPOP DC mark B module A student1 Student Staff Module Mark
  24. 24. 24References Mark.allInstances ->select(m | m.mark < 40) ->collect(m | m.module.title) ->asSet(); modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark E jd5023 74ICAR jd5012 62TPOP DC mark B module A student1 Student Staff Module Mark
  25. 25. 25 Implementation
  26. 26. 26eclipse.org/Epsilon
  27. 27. 28Option #1
  28. 28. 29Problems • Injection of large spreadsheets can be slow • Propagating changes back to the spreadsheet can be challenging • Loss of native querying capabilities
  29. 29. 30Option #2 • Develop a native spreadsheets driver for Epsilon’s pluggable type system (EMC) • Pros – No intermediate artefacts – No stale data – Direct updates to the spreadsheet – Can leverage native querying capabilities
  30. 30. 31
  31. 31. 32Query Translation • Exploit the built-in querying capabilities of Google Spreadsheets • Example – Find all students who have a mark higher than 70 in some module modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark E jd5023 74ICAR jd5012 62TPOP DC mark B module A student1 Student Staff Module Mark
  32. 32. 33Using select() Mark.allInstances ->select(m | m.mark > 70); modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark E jd5023 74ICAR jd5012 62TPOP DC mark B module A student1 Student Staff Module Mark
  33. 33. 34Using find() S.find(m:Mark | m.mark > 70); modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark E jd5023 74ICAR jd5012 62TPOP DC mark B module A student1 Student Staff Module Mark
  34. 34. 35Query Translation • The implementation of find() can be overloaded by each driver • The Google Spreadsheets driver rewrites the query at runtime as – https://spreadsheets.google.com/feeds/list/tb- <mark-worksheet- guid>/od6/private/full?sq=mark>70 • Search is performed on the server and a Set(Mark)is returned – Composite queries are supported
  35. 35. 36
  36. 36. 37Moving to EMF Mark.allInstances ->select(m | m.mark < 40) ->collect(m | m.module.title) ->asSet(); modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark E jd5023 74ICAR jd5012 62TPOP DC mark B module A student1 Student Staff Module Mark
  37. 37. 38Moving to EMF Mark.allInstances ->select(m | m.mark < 40) ->collect(m | m.module.title) ->asSet();
  38. 38. 39code.google.com/p/Epsilonlabs
  39. 39. 40Take-home Message • We need to reach out to mainstream developers and embrace the types of models they are using – or risk becoming irrelevant

×