SlideShare a Scribd company logo
1 of 11
Download to read offline
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

More Related Content

Similar to Talk

Float Data Type in C.pdf
Float Data Type in C.pdfFloat Data Type in C.pdf
Float Data Type in C.pdfSudhanshiBakre1
 
Chapter15 structure
Chapter15 structureChapter15 structure
Chapter15 structureDeepak Singh
 
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 ...HostedbyConfluent
 
10.1.1.70.8789
10.1.1.70.878910.1.1.70.8789
10.1.1.70.8789Hoài Bùi
 
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.pdfSusanne Braun
 
A Data Warehouse Engineering Process
A Data Warehouse Engineering ProcessA Data Warehouse Engineering Process
A Data Warehouse Engineering ProcessDustin Pytko
 
Layout planning
Layout planningLayout planning
Layout planning8979473684
 
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 engineeringFahe Em
 
Software engineering
Software engineeringSoftware engineering
Software engineeringFahe Em
 
CSCI-383 Lecture 3-4: Abstraction
CSCI-383 Lecture 3-4: AbstractionCSCI-383 Lecture 3-4: Abstraction
CSCI-383 Lecture 3-4: AbstractionJI Ruan
 
Eventual Consistency - JUG DA
Eventual Consistency - JUG DAEventual Consistency - JUG DA
Eventual Consistency - JUG DASusanne Braun
 
Elaboration and domain model
Elaboration and domain modelElaboration and domain model
Elaboration and domain modelVignesh Saravanan
 
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: AbstractionJI Ruan
 
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, Samplingkrishna singh
 

Similar to 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
 

More from Jácome Cunha

Spreadsheet Engineering
Spreadsheet EngineeringSpreadsheet Engineering
Spreadsheet EngineeringJácome Cunha
 
Model-driven Spreadsheets
Model-driven SpreadsheetsModel-driven Spreadsheets
Model-driven SpreadsheetsJácome Cunha
 
Model-Driven Spreadsheet Development
Model-Driven Spreadsheet DevelopmentModel-Driven Spreadsheet Development
Model-Driven Spreadsheet DevelopmentJácome Cunha
 
Energy Efficiency Across 
Programming Languages
Energy Efficiency Across 
Programming LanguagesEnergy Efficiency Across 
Programming Languages
Energy Efficiency Across 
Programming LanguagesJácome Cunha
 
Explaining Spreadsheets with Spreadsheets
Explaining Spreadsheets with SpreadsheetsExplaining Spreadsheets with Spreadsheets
Explaining Spreadsheets with SpreadsheetsJácome Cunha
 
Automatically Inferring ClassSheet Models from Spreadsheets
Automatically Inferring ClassSheet Models from SpreadsheetsAutomatically Inferring ClassSheet Models from Spreadsheets
Automatically Inferring ClassSheet Models from SpreadsheetsJácome Cunha
 
On Understanding Data Scientists
On Understanding  Data ScientistsOn Understanding  Data Scientists
On Understanding Data ScientistsJácome Cunha
 
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 2017Jácome Cunha
 
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 CollectionsJácome Cunha
 
Type-Safe Evolution of 
Web Services
Type-Safe Evolution of 
Web ServicesType-Safe Evolution of 
Web Services
Type-Safe Evolution of 
Web ServicesJácome Cunha
 
Summer School DSL 2013 - SpreadSheet Engineering
Summer School DSL 2013 - SpreadSheet EngineeringSummer School DSL 2013 - SpreadSheet Engineering
Summer School DSL 2013 - SpreadSheet EngineeringJácome Cunha
 
Invited talk at SoTeSoLa '12
Invited talk at SoTeSoLa '12Invited talk at SoTeSoLa '12
Invited talk at SoTeSoLa '12Jácome Cunha
 

More from 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
 

Recently uploaded

Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 

Recently uploaded (20)

Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 

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