Model inference for spreadsheets

Jácome Cunha, Martin Erwig, Jorge Mendes, João Saraiva

Research output: Contribution to journalArticlepeer-review


Many errors in spreadsheet formulas can be avoided if spreadsheets are built automatically from higher-level models that can encode and enforce consistency constraints in the generated spreadsheets. Employing this strategy for legacy spreadsheets is difficult, because the model has to be reverse engineered from an existing spreadsheet and existing data must be transferred into the new model-generated spreadsheet. We have developed and implemented a technique that automatically infers relational schemas from spreadsheets. This technique uses particularities from the spreadsheet realm to create better schemas. We have evaluated this technique in two ways: first, we have demonstrated its applicability by using it on a set of real-world spreadsheets. Second, we have run an empirical study with users. The study has shown that the results produced by our technique are comparable to the ones developed by experts starting from the same (legacy) spreadsheet data. Although relational schemas are very useful to model data, they do not fit spreadsheets well, as they do not allow expressing layout. Thus, we have also introduced a mapping between relational schemas and ClassSheets. A ClassSheet controls further changes to the spreadsheet and safeguards it against a large class of formula errors. The developed tool is a contribution to spreadsheet (reverse) engineering, because it fills an important gap and allows a promising design method (ClassSheets) to be applied to a huge collection of legacy spreadsheets with minimal effort.

Original languageEnglish
Pages (from-to)361-392
Number of pages32
JournalAutomated Software Engineering
Issue number3
Publication statusPublished - 1 Sep 2016


  • Automatic model inference
  • ClassSheets
  • Empirical validation
  • Relational model
  • Spreadsheets


Dive into the research topics of 'Model inference for spreadsheets'. Together they form a unique fingerprint.

Cite this