SlideShare a Scribd company logo
1 of 28
From Relational ClassSheets to UML+OCL


Já
 come Cunha, Joã Saraiva
                o           Joã Paulo Fernandes
                               o

   Universidade do Minho   Universidade do Minho &
         Portugal           Universidade do Porto
                                  Portugal



            HASLab Talk, March 21, 2012
From Relational ClassSheets to UML+OCL


Já
 come Cunha, Joã Saraiva
                o            Joã Paulo Fernandes
                                o

   Universidade do Minho    Universidade do Minho &
         Portugal            Universidade do Porto
                                   Portugal



                     SAC-SE 2012
     March 26-30, Riva del Garda (Trento), Italy
Agenda

●   Introduction
        ●   ClassSheets

●   Extending ClassSheets: Relational ClassSheets

●   Mapping Relational ClassSheets to UML Class
    Diagrams + OCL

●   Conclusions and Future Work                     3
Introduction




               4
Spreadsheets are widely used
                                                                      5
Image taken from http://www.flickr.com/photos/cosmosfan/2414002070/
Spreadsheets contain many errors
                                                                                                 6
Image taken from http://www.computerrepairmaintenance.com/secrets-to-fixing-computer-problems/
Model-based approach promises good results
                                                                                                                                                              7
Images taken from http://www.getopt.org/ecimf/contrib/onto/REA/REA-UML.gif and http://www.telecom-lille1.eu/people/Vanwormhoudt/siteEMFOCL/tutoriel/TutorialEMFOCL1.htm
and http://weblogs.asp.net/scottgu/archive/2006/07/12/Tip_2F00_Trick_3A00_-Online-Database-Schema-Samples-Library.aspx
ClassSheets – Spreadsheet Models




                                   8
ClassSheets to the Rescue!

●   Introduced by Engels and Erwig to model the
    business logic of spreadsheet data
●   They allow to model spreadsheets using object-
    oriented concepts




                                                     9
Vertically Expandable Tables




ClassSheet Model        Spreadsheet Data




                                           10
Horizontally Expandable Tables




                                 11
Relationship Tables

ClassSheet Model




Spreadsheet Data




                                         12
How does it Work?


Initial empty spreadsheet is generated




                                         13
14
Limitations

●   Does not allow to specify several constraints
●   Specially database-like features
●   In fact, the example shown could not be
    completely characterized by the original version
●   We will show how to extend ClassSheets
●   Also, tools to further analyzes are missing (for
    example, test properties)
●   The mapping to UML Class Diagrams will make
    available an entire new set of tools      15
Extending ClassSheets: Relational ClassSheets




                                          16
Unique Values




                17
Foreign Key




              18
Mapping Relational ClassSheets to
  UML Class Diagrams + OCL




                                    19
Small Example



ClassSheet                   UML




                                   20
Running Example (ClassSheet)




                               21
Running Example (UML)




                        22
Generated OCL Sample
context Pilots
  inv pkPilots : Pilots.allInstances->
    forAll(a1, a2 | a1 <> a2 implies
                a1.id <> a2.id)



context planeskey : PlanesKey inv
  fkPlanesKey : Planes.allInstances->
    exists(a |
     a.n-number = planeskey.planes_key)
                                      23
(Part of) The Implementation




                               24
Conclusions and Future Work




                              25
Conclusions

●   We have extended the original ClassSheets
    with relational features
●   With the extension we can now specify
    database-like spreadsheets
●   UML Class Diagrams + OCL can now be
    automatically derived from ClassSheets
●   A more broad specification language and tools
    are now available
                                                    26
Future Work


●   USE allows to add pre and post-conditions to
    on operation on UML model
●   This could be translated to formulas/macros in
    spreadsheets systems
●   Map existing UML Class Diagrams models to
    ClassSheets


                                                     27
Thank you!




             28

More Related Content

Similar to Talk SAC '12 - SE Track

49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
cNguyn506241
 
Cocoa encyclopedia
Cocoa encyclopediaCocoa encyclopedia
Cocoa encyclopedia
Alex Ali
 
SADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfSADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdf
B.T.L.I.T
 
Introduction To Uml
Introduction To UmlIntroduction To Uml
Introduction To Uml
guest514814
 

Similar to Talk SAC '12 - SE Track (20)

Talk at VL/HCC '11
Talk at VL/HCC '11Talk at VL/HCC '11
Talk at VL/HCC '11
 
CS8592-OOAD Question Bank
CS8592-OOAD  Question BankCS8592-OOAD  Question Bank
CS8592-OOAD Question Bank
 
Apostila UML
Apostila UMLApostila UML
Apostila UML
 
Single Responsibility Principle
Single Responsibility PrincipleSingle Responsibility Principle
Single Responsibility Principle
 
OOM Unit I - III.pdf
OOM Unit I - III.pdfOOM Unit I - III.pdf
OOM Unit I - III.pdf
 
UML Design.pptx
UML Design.pptxUML Design.pptx
UML Design.pptx
 
lecture8UML Diagrams.pptx
lecture8UML Diagrams.pptxlecture8UML Diagrams.pptx
lecture8UML Diagrams.pptx
 
CIS110 Computer Programming Design Chapter (13)
CIS110 Computer Programming Design Chapter  (13)CIS110 Computer Programming Design Chapter  (13)
CIS110 Computer Programming Design Chapter (13)
 
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
 
Pitfalls of machine learning in production
Pitfalls of machine learning in productionPitfalls of machine learning in production
Pitfalls of machine learning in production
 
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
 
Unified Modeling Language (UML)
Unified Modeling Language (UML)Unified Modeling Language (UML)
Unified Modeling Language (UML)
 
l1_introuml.pdf
l1_introuml.pdfl1_introuml.pdf
l1_introuml.pdf
 
SE UML.ppt
SE UML.pptSE UML.ppt
SE UML.ppt
 
Cocoa encyclopedia
Cocoa encyclopediaCocoa encyclopedia
Cocoa encyclopedia
 
PhD Core Paper Unit 5 _Part 1 Software Design and UML Use Case Modeling.pdf
PhD Core Paper Unit 5 _Part 1 Software Design and UML Use Case Modeling.pdfPhD Core Paper Unit 5 _Part 1 Software Design and UML Use Case Modeling.pdf
PhD Core Paper Unit 5 _Part 1 Software Design and UML Use Case Modeling.pdf
 
SADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfSADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdf
 
CS6502 OOAD - Question Bank and Answer
CS6502 OOAD - Question Bank and AnswerCS6502 OOAD - Question Bank and Answer
CS6502 OOAD - Question Bank and Answer
 
Darius Silingas - From Model-Driven Testing - EuroSTAR 2010
Darius Silingas - From Model-Driven Testing - EuroSTAR 2010Darius Silingas - From Model-Driven Testing - EuroSTAR 2010
Darius Silingas - From Model-Driven Testing - EuroSTAR 2010
 
Introduction To Uml
Introduction To UmlIntroduction To Uml
Introduction To Uml
 

More from Jácome Cunha

Type-Safe Evolution of 
Web Services
Type-Safe Evolution of 
Web ServicesType-Safe Evolution of 
Web Services
Type-Safe Evolution of 
Web Services
Jácome Cunha
 

More from Jácome Cunha (15)

Spreadsheet Engineering
Spreadsheet EngineeringSpreadsheet Engineering
Spreadsheet Engineering
 
Model-driven Spreadsheets
Model-driven SpreadsheetsModel-driven Spreadsheets
Model-driven Spreadsheets
 
Model-Driven Spreadsheet Development
Model-Driven Spreadsheet DevelopmentModel-Driven Spreadsheet Development
Model-Driven Spreadsheet Development
 
Energy Efficiency Across 
Programming Languages
Energy Efficiency Across 
Programming LanguagesEnergy Efficiency Across 
Programming Languages
Energy Efficiency Across 
Programming Languages
 
LMCC - 30 Anos
LMCC - 30 AnosLMCC - 30 Anos
LMCC - 30 Anos
 
Explaining Spreadsheets with Spreadsheets
Explaining Spreadsheets with SpreadsheetsExplaining Spreadsheets with Spreadsheets
Explaining Spreadsheets with Spreadsheets
 
Automatically Inferring ClassSheet Models from Spreadsheets
Automatically Inferring ClassSheet Models from SpreadsheetsAutomatically Inferring ClassSheet Models from Spreadsheets
Automatically Inferring ClassSheet Models from Spreadsheets
 
On Understanding Data Scientists
On Understanding  Data ScientistsOn Understanding  Data Scientists
On Understanding Data Scientists
 
Systematic Spreadsheet Construction Processes @ VL/HCC 2017
Systematic Spreadsheet Construction Processes @ VL/HCC 2017Systematic Spreadsheet Construction Processes @ VL/HCC 2017
Systematic Spreadsheet Construction Processes @ VL/HCC 2017
 
jStanley: Placing a Green Thumb on Java Collections
jStanley: Placing a Green Thumb on  Java CollectionsjStanley: Placing a Green Thumb on  Java Collections
jStanley: Placing a Green Thumb on Java Collections
 
Type-Safe Evolution of 
Web Services
Type-Safe Evolution of 
Web ServicesType-Safe Evolution of 
Web Services
Type-Safe Evolution of 
Web Services
 
Summer School DSL 2013 - SpreadSheet Engineering
Summer School DSL 2013 - SpreadSheet EngineeringSummer School DSL 2013 - SpreadSheet Engineering
Summer School DSL 2013 - SpreadSheet Engineering
 
Talk
TalkTalk
Talk
 
Talk at IS-EUD '11
Talk at IS-EUD '11Talk at IS-EUD '11
Talk at IS-EUD '11
 
Talk at EUSPRIG '11
Talk at EUSPRIG '11Talk at EUSPRIG '11
Talk at EUSPRIG '11
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Talk SAC '12 - SE Track

  • 1. From Relational ClassSheets to UML+OCL Já come Cunha, Joã Saraiva o Joã Paulo Fernandes o Universidade do Minho Universidade do Minho & Portugal Universidade do Porto Portugal HASLab Talk, March 21, 2012
  • 2. From Relational ClassSheets to UML+OCL Já come Cunha, Joã Saraiva o Joã Paulo Fernandes o Universidade do Minho Universidade do Minho & Portugal Universidade do Porto Portugal SAC-SE 2012 March 26-30, Riva del Garda (Trento), Italy
  • 3. Agenda ● Introduction ● ClassSheets ● Extending ClassSheets: Relational ClassSheets ● Mapping Relational ClassSheets to UML Class Diagrams + OCL ● Conclusions and Future Work 3
  • 5. Spreadsheets are widely used 5 Image taken from http://www.flickr.com/photos/cosmosfan/2414002070/
  • 6. Spreadsheets contain many errors 6 Image taken from http://www.computerrepairmaintenance.com/secrets-to-fixing-computer-problems/
  • 7. Model-based approach promises good results 7 Images taken from http://www.getopt.org/ecimf/contrib/onto/REA/REA-UML.gif and http://www.telecom-lille1.eu/people/Vanwormhoudt/siteEMFOCL/tutoriel/TutorialEMFOCL1.htm and http://weblogs.asp.net/scottgu/archive/2006/07/12/Tip_2F00_Trick_3A00_-Online-Database-Schema-Samples-Library.aspx
  • 9. ClassSheets to the Rescue! ● Introduced by Engels and Erwig to model the business logic of spreadsheet data ● They allow to model spreadsheets using object- oriented concepts 9
  • 10. Vertically Expandable Tables ClassSheet Model Spreadsheet Data 10
  • 13. How does it Work? Initial empty spreadsheet is generated 13
  • 14. 14
  • 15. Limitations ● Does not allow to specify several constraints ● Specially database-like features ● In fact, the example shown could not be completely characterized by the original version ● We will show how to extend ClassSheets ● Also, tools to further analyzes are missing (for example, test properties) ● The mapping to UML Class Diagrams will make available an entire new set of tools 15
  • 19. Mapping Relational ClassSheets to UML Class Diagrams + OCL 19
  • 23. Generated OCL Sample context Pilots inv pkPilots : Pilots.allInstances-> forAll(a1, a2 | a1 <> a2 implies a1.id <> a2.id) context planeskey : PlanesKey inv fkPlanesKey : Planes.allInstances-> exists(a | a.n-number = planeskey.planes_key) 23
  • 24. (Part of) The Implementation 24
  • 26. Conclusions ● We have extended the original ClassSheets with relational features ● With the extension we can now specify database-like spreadsheets ● UML Class Diagrams + OCL can now be automatically derived from ClassSheets ● A more broad specification language and tools are now available 26
  • 27. Future Work ● USE allows to add pre and post-conditions to on operation on UML model ● This could be translated to formulas/macros in spreadsheets systems ● Map existing UML Class Diagrams models to ClassSheets 27

Editor's Notes

  1. Only after a model is done instances are created Has been showing good results in other fields Not only in CS, but in more stable areas like civil engineering This approach is not followed when developing spreadsheets
  2. From a ClassSheet an initial spreadsheet is generated
  3. This generated spreadsheet guides users in introducing correct data The spreadsheet includes mechanisms that guarantee that the spreadsheet data always conforms to the model after an user update
  4. Baseado em haskell Integrado no OO Clicanca-se em botoes Espetacular Basic