Publications

Cunha J.  2012.  Model-based Spreadsheet Engineering: Using Relational Models to Improve Spreadsheets. AbstractWebsite

Spreadsheets can be viewed as programming languages for non-professional programmers. These so-called "end-user'' programmers vastly outnumber professional programmers creating millions of new spreadsheets every year. As a programming language, spreadsheets lack support for abstraction, testing, encapsulation, or structured programming. As a result, and as numerous studies have shown, the high rate of production is accompanied by an alarming high rate of errors. Some studies report that up to 90% of real-world spreadsheets contain errors. After their initial creation, many spreadsheets turn out to be used for storing and processing increasing amounts of data and supporting increasing numbers of users over long periods of time, making them complicated systems.
An emerging solution to handle the complex and evolving software systems is Model-driven Engineering (MDE). To consider models as first class entities and any software artifact as a model or a model element is one of the basic principles of MDE.
We adopted some techniques from MDE to solve spreadsheet problems. Most spreadsheets (if not all) lack a proper specification or a model. Using reverse engineering techniques we are able to derive various models from legacy spreadsheets. We use functional dependencies (a formalism that allow us to define how some column values depend on other column values) as building blocks for these models. Models can be used for several spreadsheet improvements, namely refactoring, safe evolution, migration or even generation of edit assistance. The techniques presented in this work are available under the framework HAEXCEL that we developed. It is composed of online and batch tools, reusable HASKELL libraries and OpenOffice.org extensions.
A study with several end-users was organized to survey the impact of the techniques we designed. The results of this study indicate that the models can bring great benefits to spreadsheet engineering helping users to commit fewer errors and to work faster.

Pereira R, Carção T, Couto M, Cunha J, Fernandes JP, Saraiva J.  2017.  Helping Programmers Improve the Energy Efficiency of Source Code. Proceedings of the 39th International Conference on Software Engineering Companion. :238–240. Abstract
n/a
Pereira R, Couto M, Saraiva J, Cunha J, Fernandes JP.  2016.  The Influence of the Java Collection Framework on Overall Energy Consumption. Proceedings of the 5th International Workshop on Green and Sustainable Software. :15–21. Abstract
n/a
Pereira R, Saraiva J, Cunha J, Fernandes JP.  2016.  User-friendly Spreadsheet Querying: An Empirical Study. Proceedings of the 31st Annual ACM Symposium on Applied Computing. :202–204. Abstract
n/a
Couto M, Cunha J, Fernandes JP, Pereira R, Saraiva J.  2015.  GreenDroid: A tool for analysing power consumption in the android ecosystem. Scientific Conference on Informatics, 2015 IEEE 13th International. :73–78. Abstract
n/a
Pontes R, Matos M, Oliveira JN, Pereira JO.  2015.  Implementing a Linear Algebra Approach to Data Processing. Grand Timely Topics in Software Engineering - International Summer School {GTTSE} 2015, Braga, Portugal, August 23-29, 2015, Tutorial Lectures. 10223:215–222. Abstract
n/a
Cunha J, Fernandes JP, Mendes J, Pereira R, Saraiva JA.  2014.  Design and Implementation of Queries for Model-Driven Spreadsheets. CEFP - Central European Functional Programming School. Abstractdsl13_query.pdf

This paper presents a domain-specific querying language for model-driven spreadsheets. We briefly show the design of the language and present in detail its implementation, from the denormalization of data and translation of our user-friendly query language to a more efficient query, to the execution of the query using Google. To validate our work, we executed an empirical study, comparing QuerySheet with an alternative spreadsheet querying tool, which produced positive results.

Cunha J, Fernandes JP, Saraiva JA.  2014.  Spreadsheet Engineering. CEFP - Central European Functional Programming School. Abstractdsl13_notes.pdf

These tutorial notes present a methodology for spreadsheet engineering. First, we present data mining and database techniques to reason about spreadsheet data. These techniques are used to compute relationships between spreadsheet elements (cells/columns/rows). These relations are then used to infer a model de ning the business logic of the spreadsheet. Such a model of a spreadsheet data is a visual domain speci c language that we embed in a well-known spreadsheet system. The embedded model is the building block to de ne techniques for modeldriven spreadsheet development, where advanced techniques are used to guarantee the model-instance synchronization. In this model-driven environment, any user data update as to follow the the model-instance conformance relation, thus, guiding spreadsheet users to introduce correct data. Data re nement techniques are used to synchronize models and instances after users update/evolve the model. These notes brie y describe our model-driven spreadsheet environment, the MDSheet environment, that implements the presented methodology. To evaluate both proposed techniques and the MDSheet tool, we have conducted, in laboratory sessions, an empirical study with the summer school participants. The results of this study are presented in these notes.

Cunha J, Fernandes JP, Mendes J, Pereira R, Saraiva JA.  2014.  ES-SQL: Visually Querying Spreadsheets. Proceedings of the Symposium on Visual Languages and Human-Centric Computing - VL/HCC. Abstractvlhcc14-td.pdf

This paper presents ES-SQL, an embedded tool for visually constructing queries over spreadsheets. This tool provides an expressive query environment which has knowledge on the business logic of spreadsheets, and by this knowledge it assists the user in defining the intended queries.

Cunha J, Fernandes JP, Mendes J, Pereira R, Saraiva JA.  2014.  Embedding Model-Driven Spreadsheet Queries in Spreadsheet Systems. Proceedings of the Symposium on Visual Languages and Human-Centric Computing - VL/HCC. Abstractvlhcc14.pdf

Spreadsheets are widely used not only to define mathematical expressions, but also to store large and complex data. To query such data is usually a difficult task to perform, usually for end user. In this work we embed the textual query language in the model-driven spreadsheet environment as a spreadsheet itself. The result is an expressive and powerful query environment that has knowledge of the business logic defined by the spreadsheet data (the spreadsheet model) to guide end users constructing correct queries.

Abreu R, Cunha J, Fernandes JP, Martins P, Perez A, Saraiva JA.  2014.  Smelling faults in spreadsheets. Proceedings of the 30th IEEE International Conference on Software Maintenance and Evolution. 14 Abstracticsme14.pdf

Despite being staggeringly error prone, spreadsheets are a highly flexible programming environment that is widely used in industry. In fact, spreadsheets are widely adopted for decision making, and decisions taken upon wrong (spreadsheet-based) assumptions may have serious economical impacts on businesses, among other consequences. This paper proposes a technique to automatically pinpoint potential faults in spreadsheets. It combines a catalog of spreadsheet smells that provide a first indication of a potential fault, with a generic spectrum-based fault localization strategy in order to improve (in terms of accuracy and false positive rate) on these initial results. Our technique has been implemented in a tool which helps users detecting faults.To validate the proposed technique, we consider a wellknown and well-documented catalog of faulty spreadsheets. Our experiments yield two main results: we were able to distinguish between smells that can point to faulty cells from smells and those that are not capable of doing so; and we provide a technique capable of detecting a significant number of errors: two thirds of the cells labeled as faulty are in fact (documented) errors.

Cunha J, Fernandes JP, Mendes J, Pereira R, Saraiva JA.  2014.  MDSheet - Model-Driven Spreadsheets. 1st Workshop on Software Engineering Methods in Spreadsheets (SEMS 2014). Abstractpaper_11.pdf

This paper showcases MDSheet, a framework aimed at improving the engineering of spreadsheets. This framework is model-driven, and has been fully integrated under a spreadsheet system. Also, its practical interest has been demonstrated by several empirical studies.

Cunha J, Martins P, Fernandes JP, Pereira R, Saraiva JA.  2014.  Refactoring meets Model-Driven Spreadsheet Evolution. Proceedings of the 9th International Conference on Quality in Model Driven Engineering - QUATIC. Abstractquatic14.pdf

Software refactoring is a well-known technique that provides transformations on software artifacts with the aim of improving their overall quality. In this paper we present a set of refactorings for ClassSheets, a modeling language that allows to specify the business logic of a spreadsheet in an object-oriented fashion. The set of refactorings that we propose allows us to improve the quality of these spreadsheet models. Moreover, it is implemented in a setting that guarantees that all model refactorings are automatically carried to all the corresponding (spreadsheet) instances, thus providing an automatic evolution of the data so it is always synchronized with the model.

Cunha J, Abreu R, Fernandes JP, Martins P, Saraiva JA, Perez A.  2014.  FaultySheet Detective: When Smells Meet Fault Localization. Proceedings of the 30th IEEE International Conference on Software Maintenance and Evolution. Abstracticsme14-td.pdf

This paper presents a tool, dubbed FaultySheet Detective, for aiding in spreadsheet fault localization, which combines the detection of bad smells with a generic spectrum-based fault localization algorithm.

Cunha J, Fernandes JP, Pereira R, Saraiva JA.  2014.  Graphical Querying of Model- Driven Spreadsheets. 6th International Conference on Human-Computer Interaction - HCI. 12 Abstracthci14.pdf

This paper presents a graphical interface to query modeldriven spreadsheets, based on experience with previous work and empirical studies in querying systems, to simplify query construction for typical end-users with little to no knowledge of SQL. We briefly show our previous text based model-driven querying system. Afterwards, we detail our graphical model-driven querying interface, explaining each part of the interface and showing an example. To validate our work, we executed an empirical study, comparing our graphical querying approach to an alternative querying tool, which produced positive results.