Spreadsheet Models for the Real World

Bilateral project (Portugal/Germany) founded by FCT/DAAD


  • Jácome Cunha (Portuguese PI)
  • Gregor Engels (German PI)
  • Stefan Sauer
  • Björn Senft
  • João Paulo Fernandes
  • Jorge Mendes
  • Rui Pereira
  • João Saraiva
  • Pedro Maia

Spreadsheets are widely used in industrial settings. Indeed we are currently collaborating with three different companies which use spreadsheets on a daily basis. One of these companies produces car multimedia and uses spreadsheets to manipulate data taken from other software to produce several reports. One of the other companies is a software house and uses spreadsheets to store software tests for programs they automatically generate. The third company is a non-profit organization that collects and distributes food by families that need their help. They use spreadsheets to store all the information about the families, their needs, and the food they receive.

While these three companies are very different, they all use spreadsheets, and in different ways. They will benefit a lot from the model-driven approach we have been proposing.

The car multimedia company manipulates the spreadsheet data through copy&paste (which is very error prone) to filter the data and rearrange it in the way the reports require. By using our models, for their spreadsheets, they can then use the querying techniques we have proposed to much more easily produce the data in the format they need.

The software house has a different problem: every time they generate a new version of the application, they must update the test cases so they can fit the new program. Currently, such a task is done by hand! In this setting, it is quite probable that some of the test cases are not well specified, with all the consequences of such a bad specification. This company can use the automatic model-driven evolution techniques we have proposed. Then, the test cases are automatically evolved whenever the applications change. This would make the tests correct and also much more efficient.

Finally, the non-profit organization could use our techniques to guarantee the correctness of the data in the spreadsheets. Moreover, since quite often they need to add/remove families from the spreadsheet, the model-driven approach we proposed would make such tasks much more faster and reliable.

Thus, the first objective of this project is to devise a modeling language that can be used to specify these kinds of spreadsheets. The second objective is to implement a model-driven extension of a spreadsheet system so we can provide real users with such a tool. The expertise of both teams developing model-driven software, and their expertise in interactive applications, will allow us to create practical software. The third objective is to deploy the theories, techniques, and tools previously achieved to an industrial setting. After ensuring the usability of the proposed tool through empirical validation (which we also have experience with), we will implement our approach in the companies we partner with in this project. Thus, and apart from the scientific contributions we will make, this project will have a real impact in the society as we will make the companies more efficient and effective when using spreadsheets.

Activities & Results

  • From the visit of Gregor Engels to Portugal, a new modelling approach for spreadsheets has been defined
  • A paper is being written with the new modelling approach for spreadsheets
  • A MSc student, Ricardo Teixeira, co-supervised by Jácome Cunha and Vasco Amaral, is defining a set of common patterns for spreadsheets and creating a metamodel for those pattern

Towards Variational Software, Types, and Spreadsheets

Bilateral project (Portugal/USA) founded by FLAD - Luso American Foundation


  • Jácome Cunha (Portuguese PI)
  • Martin Erwig (USA PI)
  • Eric Walkingshaw 
  • Sheng Chen
  • Karl Smeltzer
  • João Paulo Fernandes 
  • João Saraiva
  • Jorge Mendes
  • Rui Pereira

While their behavior remains (mostly) unchanged, software systems are often variability systems that can be installed and used in different devices and platforms. The most common way of supporting this variability is by annotating the source code to represent the different variations. This approach, however, suffers from severe understandability and maintainability problems, making it far from ideal.

In this project we will study the foundations of variational types, by defining variational sets and variational functions. These are important mathematical concepts that can be the basis for a new programming language better suited for building variational software.

We will also propose a solution for the common problem of merging variations when editing a single variation. Indeed several alternatives are usually available. We will survey professional programmers to know the best solution that can in fact help them.

Finally, we will use spreadsheet systems as a case study for the techniques that we will propose. Spreadsheets are the most popular programming environment, as it is used both by professional and non-professional programmers. The experience this team has working in such paradigm will help to contribute with a tool that can be used by both groups of users.

Activities & Results

  • A MSc student, Ricardo Campinhos, co-supervised by Jácome Cunha and João Costa Seco is applying variational theory for web API evolution
  • A paper is under preparation describing how developers handle software with multiple variations and how to automatically integrate them after one has evolved