SlideShare una empresa de Scribd logo
1 de 11
Descargar para leer sin conexión
Type-safe Evolution of Spreadsheets

       J´come Cunha
        a                      Joost Visser            Tiago Alves     Jo˜o Saraiva
                                                                         a

               Universidade do Minho, Portugal, {jacome,jas}@di.uminho.pt
          Software Improvement Group, The Netherlands, {j.visser,t.alves}@sig.eu


                            to be presented at FASE (ETAPS) 2011


                                     17 – 21 January




J´come Cunha (UMinho-SIG)
 a                               Type-safe Evolution of Spreadsheets                  1 / 11
Motivation




    Spreadsheets are notoriously error-prone;
    Many errors are introduced when changing data;
    But many others when changing the structure;
    Models capturing the interdependencies between data can help
    (inferable);
    Co-evolution of models and instances.




 J´come Cunha (UMinho-SIG)
  a                          Type-safe Evolution of Spreadsheets   2 / 11
An Example


    Budget for travel, hotel and local transportation expenses.




    At the beginning of each year, it needs to be modified to
    accommodate the next year;
    Several steps are necessary:
    add three new rows, labels, update formulas, etc.
    Very prone to errors.




 J´come Cunha (UMinho-SIG)
  a                          Type-safe Evolution of Spreadsheets   3 / 11
An Example - Changing the Model



    For expenses before and after tax, additional columns need to be
    inserted in the block of each year.




    The user needs to change all the year in the spreadsheet.




 J´come Cunha (UMinho-SIG)
  a                          Type-safe Evolution of Spreadsheets       4 / 11
ClassSheets: Specifying Spreadsheets



    Erwig et al. have introduced ClassSheets to specify spreadsheets;
    ClassSheets allow to express business object structures within a
    spreadsheet using concepts from the OO paradigm;




 J´come Cunha (UMinho-SIG)
  a                          Type-safe Evolution of Spreadsheets        5 / 11
Modeling our Example

    Class to represent a year;
    Class to represent budget line;
    Class to represent the relationship between them.




 J´come Cunha (UMinho-SIG)
  a                          Type-safe Evolution of Spreadsheets   6 / 11
Spreadsheet Models in Haskell

    We have created a representation for spreadsheet models based on
    ClassSheets;
    Reused the 2LT framework: when specifying a model transformation,
    we get for free functions to migrate data back and forward.


                                  A, A    data type and transformed data type
              to
                                  to      witness function of type A → A
                         &                (injective and entire relation)
  Af                         A    from witness function of type A → A
            from                          (surjective, possibly partial)
                                  from ◦ to = idA
                                  We can compose refinements


 J´come Cunha (UMinho-SIG)
  a                              Type-safe Evolution of Spreadsheets        7 / 11
Spreadsheet Models in Haskell - References


    References pose a particular challenge;
    We implemented them as a pair of selection functions: one selects the
    cell which is the reference and another select the referenced cell.

                 0sn
  source                     source             source         Projection over type A
                 to                                            identifying the reference
                             &+3                target         Projection over type A
      Af         T                 A
                                                               identifying the referenced cell
                from
                                                source = source ◦ from
  target         .tp         target
                                                target = target ◦ from




 J´come Cunha (UMinho-SIG)
  a                                    Type-safe Evolution of Spreadsheets                       8 / 11
Evolution Rules

    Combinators:
           Pull up all the references: all references must be at the top level;
           Apply after and friends: applies another rules after something;


    Semantic:
           Insert column: insert a new column;
           Make it expandable: allows some part to be added more columns/rows;
           Split: moves a column and substitutes it by references to the new
           position;


    Layout:
           Change orientation: from vertical to horizontal and vice versa;
           Normalize blocks: some results are not well formated;
           Shift: shift vertically, horizontally, up or down.


 J´come Cunha (UMinho-SIG)
  a                           Type-safe Evolution of Spreadsheets                 9 / 11
Make It Expandable

It is possible to make a block expandable:



                                          id×head
                                                           -
                     (label : clas)                            (label : (clas)↓ )
                                      l
                                           id×tolist


Its implementation is as follows:

expandBlock :: String → Rule
expandBlock str (label : clas) | compLabel label str = do
      let rep = Rep {to = id × tolist, from = id × head }
      return (View rep (label : (clas)↓ ))


  J´come Cunha (UMinho-SIG)
   a                             Type-safe Evolution of Spreadsheets                10 / 11
Conclusions




    We have created a safe representation of spreadsheet models (and
    instances);
    We shown rules for coupled evolution of models and instances;
    We want to make this available for spreadsheet users;
    We are working on an extension for OpenOffice;




 J´come Cunha (UMinho-SIG)
  a                          Type-safe Evolution of Spreadsheets       11 / 11

Más contenido relacionado

Similar a Talk

Chapter15 structure
Chapter15 structureChapter15 structure
Chapter15 structure
Deepak Singh
 
Layout planning
Layout planningLayout planning
Layout planning
8979473684
 
Aspect-oriented programming with AspectJ (as part of the the PTT lecture)
Aspect-oriented programming with AspectJ (as part of the the PTT lecture)Aspect-oriented programming with AspectJ (as part of the the PTT lecture)
Aspect-oriented programming with AspectJ (as part of the the PTT lecture)
Ralf Laemmel
 
Software engineering
Software engineeringSoftware engineering
Software engineering
Fahe Em
 
Software engineering
Software engineeringSoftware engineering
Software engineering
Fahe Em
 
CSCI-383 Lecture 3-4: Abstraction
CSCI-383 Lecture 3-4: AbstractionCSCI-383 Lecture 3-4: Abstraction
CSCI-383 Lecture 3-4: Abstraction
JI Ruan
 

Similar a Talk (20)

Float Data Type in C.pdf
Float Data Type in C.pdfFloat Data Type in C.pdf
Float Data Type in C.pdf
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
Chapter15 structure
Chapter15 structureChapter15 structure
Chapter15 structure
 
Memory Matters: Drift Detection with a Low Memory Footprint for ML Models on ...
Memory Matters: Drift Detection with a Low Memory Footprint for ML Models on ...Memory Matters: Drift Detection with a Low Memory Footprint for ML Models on ...
Memory Matters: Drift Detection with a Low Memory Footprint for ML Models on ...
 
CP Handout#3
CP Handout#3CP Handout#3
CP Handout#3
 
10.1.1.70.8789
10.1.1.70.878910.1.1.70.8789
10.1.1.70.8789
 
w-jax 2022: Eventual-Consistency-Du-musst-keine-Angst-haben-Final.pdf
w-jax 2022: Eventual-Consistency-Du-musst-keine-Angst-haben-Final.pdfw-jax 2022: Eventual-Consistency-Du-musst-keine-Angst-haben-Final.pdf
w-jax 2022: Eventual-Consistency-Du-musst-keine-Angst-haben-Final.pdf
 
A Data Warehouse Engineering Process
A Data Warehouse Engineering ProcessA Data Warehouse Engineering Process
A Data Warehouse Engineering Process
 
Layout planning
Layout planningLayout planning
Layout planning
 
Aspect-oriented programming with AspectJ (as part of the the PTT lecture)
Aspect-oriented programming with AspectJ (as part of the the PTT lecture)Aspect-oriented programming with AspectJ (as part of the the PTT lecture)
Aspect-oriented programming with AspectJ (as part of the the PTT lecture)
 
2007 02t
2007 02t2007 02t
2007 02t
 
2007 02t
2007 02t2007 02t
2007 02t
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Structures in c++
Structures in c++Structures in c++
Structures in c++
 
CSCI-383 Lecture 3-4: Abstraction
CSCI-383 Lecture 3-4: AbstractionCSCI-383 Lecture 3-4: Abstraction
CSCI-383 Lecture 3-4: Abstraction
 
Eventual Consistency - JUG DA
Eventual Consistency - JUG DAEventual Consistency - JUG DA
Eventual Consistency - JUG DA
 
Elaboration and domain model
Elaboration and domain modelElaboration and domain model
Elaboration and domain model
 
CSCI 383 Lecture 3 and 4: Abstraction
CSCI 383 Lecture 3 and 4: AbstractionCSCI 383 Lecture 3 and 4: Abstraction
CSCI 383 Lecture 3 and 4: Abstraction
 
5. working on data using R -Cleaning, filtering ,transformation, Sampling
5. working on data using R -Cleaning, filtering ,transformation, Sampling5. working on data using R -Cleaning, filtering ,transformation, Sampling
5. working on data using R -Cleaning, filtering ,transformation, Sampling
 

Más de 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
 
Invited talk at SoTeSoLa '12
Invited talk at SoTeSoLa '12Invited talk at SoTeSoLa '12
Invited talk at SoTeSoLa '12
Jácome Cunha
 

Más de Jácome Cunha (16)

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 at VL/HCC '12
Talk at VL/HCC '12Talk at VL/HCC '12
Talk at VL/HCC '12
 
Talk at QUATIC '12
Talk at QUATIC '12Talk at QUATIC '12
Talk at QUATIC '12
 
Invited talk at SoTeSoLa '12
Invited talk at SoTeSoLa '12Invited talk at SoTeSoLa '12
Invited talk at SoTeSoLa '12
 
Talk at VL/HCC '11
Talk at VL/HCC '11Talk at VL/HCC '11
Talk at VL/HCC '11
 

Último

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
 

Último (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
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, ...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
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
 

Talk

  • 1. Type-safe Evolution of Spreadsheets J´come Cunha a Joost Visser Tiago Alves Jo˜o Saraiva a Universidade do Minho, Portugal, {jacome,jas}@di.uminho.pt Software Improvement Group, The Netherlands, {j.visser,t.alves}@sig.eu to be presented at FASE (ETAPS) 2011 17 – 21 January J´come Cunha (UMinho-SIG) a Type-safe Evolution of Spreadsheets 1 / 11
  • 2. Motivation Spreadsheets are notoriously error-prone; Many errors are introduced when changing data; But many others when changing the structure; Models capturing the interdependencies between data can help (inferable); Co-evolution of models and instances. J´come Cunha (UMinho-SIG) a Type-safe Evolution of Spreadsheets 2 / 11
  • 3. An Example Budget for travel, hotel and local transportation expenses. At the beginning of each year, it needs to be modified to accommodate the next year; Several steps are necessary: add three new rows, labels, update formulas, etc. Very prone to errors. J´come Cunha (UMinho-SIG) a Type-safe Evolution of Spreadsheets 3 / 11
  • 4. An Example - Changing the Model For expenses before and after tax, additional columns need to be inserted in the block of each year. The user needs to change all the year in the spreadsheet. J´come Cunha (UMinho-SIG) a Type-safe Evolution of Spreadsheets 4 / 11
  • 5. ClassSheets: Specifying Spreadsheets Erwig et al. have introduced ClassSheets to specify spreadsheets; ClassSheets allow to express business object structures within a spreadsheet using concepts from the OO paradigm; J´come Cunha (UMinho-SIG) a Type-safe Evolution of Spreadsheets 5 / 11
  • 6. Modeling our Example Class to represent a year; Class to represent budget line; Class to represent the relationship between them. J´come Cunha (UMinho-SIG) a Type-safe Evolution of Spreadsheets 6 / 11
  • 7. Spreadsheet Models in Haskell We have created a representation for spreadsheet models based on ClassSheets; Reused the 2LT framework: when specifying a model transformation, we get for free functions to migrate data back and forward. A, A data type and transformed data type to to witness function of type A → A & (injective and entire relation) Af A from witness function of type A → A from (surjective, possibly partial) from ◦ to = idA We can compose refinements J´come Cunha (UMinho-SIG) a Type-safe Evolution of Spreadsheets 7 / 11
  • 8. Spreadsheet Models in Haskell - References References pose a particular challenge; We implemented them as a pair of selection functions: one selects the cell which is the reference and another select the referenced cell. 0sn source source source Projection over type A to identifying the reference &+3 target Projection over type A Af T A identifying the referenced cell from source = source ◦ from target .tp target target = target ◦ from J´come Cunha (UMinho-SIG) a Type-safe Evolution of Spreadsheets 8 / 11
  • 9. Evolution Rules Combinators: Pull up all the references: all references must be at the top level; Apply after and friends: applies another rules after something; Semantic: Insert column: insert a new column; Make it expandable: allows some part to be added more columns/rows; Split: moves a column and substitutes it by references to the new position; Layout: Change orientation: from vertical to horizontal and vice versa; Normalize blocks: some results are not well formated; Shift: shift vertically, horizontally, up or down. J´come Cunha (UMinho-SIG) a Type-safe Evolution of Spreadsheets 9 / 11
  • 10. Make It Expandable It is possible to make a block expandable: id×head - (label : clas) (label : (clas)↓ ) l id×tolist Its implementation is as follows: expandBlock :: String → Rule expandBlock str (label : clas) | compLabel label str = do let rep = Rep {to = id × tolist, from = id × head } return (View rep (label : (clas)↓ )) J´come Cunha (UMinho-SIG) a Type-safe Evolution of Spreadsheets 10 / 11
  • 11. Conclusions We have created a safe representation of spreadsheet models (and instances); We shown rules for coupled evolution of models and instances; We want to make this available for spreadsheet users; We are working on an extension for OpenOffice; J´come Cunha (UMinho-SIG) a Type-safe Evolution of Spreadsheets 11 / 11