Cunha J, Fernandes JP, Mendes J, Saraiva JA.  2012.  MDSheet: A Framework for Model-driven Spreadsheet Engineering. Proceedings of the 34rd International Conference on Software Engineering - ICSE. :1412–1415. Abstracticse12.pdf

In this paper, we present MDSHEET, a framework for the embedding, evolution and inference of spreadsheet models. This framework offers a model-driven software development mechanism for spreadsheet users.

Cunha J, Fernandes JP, Mendes J, Martins P, Saraiva JA.  2012.  SmellSheet Detective: A Tool for Detecting Bad Smells in Spreadsheets. Proceedings of the Symposium on Visual Languages and Human-Centric Computing - VL/HCC. :243–244. Abstractvlhcc-td12.pdf

This tool demo paper presents SmellSheet Detective: a tool for automatically detecting bad smells in spreadsheets. We have defined a catalog of bad smells in spreadsheet data which was fully implemented in a reusable library for the manipulation of spreadsheets. This library is the building block of the SmellSheet Detective tool, that has been used to detect smells in large, real-world spreadsheet within the EUSES corpus, in order to validate and evolve our bad smells catalog.

Cunha J, Fernandes JP, Saraiva JA.  2012.  From Relational ClassSheets to UML+OCL. Proceedings of the Software Engineering Track at the 27th Annual Symposium On Applied Computing - SAC. :1151–1158. Abstractsac-se12.pdf

Spreadsheets are among the most popular programming languages in the world. Unfortunately, spreadsheet systems were not tailored from scratch with modern programming language features that guarantee, as much as possible, program correctness. As a consequence, spreadsheets are populated with unacceptable amounts of errors. In other programming language settings, model-based approaches have been proposed to increase productivity and program e ectiveness. Within spreadsheets, this approach has also been followed, namely by ClassSheets. In this paper, we propose an extension to ClassSheets to allow the speci cation of spreadsheets that can be viewed as relational databases. Moreover, we present a transformation from ClassSheet models to UML class diagrams enriched with OCL constraints. This brings to the spreadsheet realm the entire paraphernalia of model validation techniques that are available for UML.

Martins P, Lopes P, Fernandes JP, Saraiva JA, Cardoso J.  2012.  Program and Aspect Metrics for MATLAB. 12th International Conference on Computational Science and Its Applications - ICCSA. :217-233. Abstracticcsa12_matlab.pdf

In this paper we present the main concepts of a domain-specific aspect language for specifying cross-cutting concerns of MATLAB programs, together with a suite of metrics that is capable of assessing the overall advantage of introducing aspects in the development cycle of MATLAB software. We present the results of using our own suite to quantify the advantages of using aspect oriented programming, both in terms of programming effort and code quality. The results are promising and show a good potential for aspect oriented programming in MATLAB while our suite proves to be capable of analyzing the overall characteristics of MATLAB solutions and providing interesting results about them.

Martins P, Fernandes JP, Saraiva JA.  2012.  A Purely Functional Combinator Language for Software Quality Assessment. Symposium Languages, Applications and Technologies - SLATE. :51-69. Abstract7.pdf

Quality assessment of open source software is becoming an important and active research area. One of the reasons for this recent interest is the consequence of Internet popularity. Nowadays, programming also involves looking for the large set of open source libraries and tools that may be reused when developing our software applications. In order to reuse such open source software artifacts, programmers not only need the guarantee that the reused artifact is certified, but also that independently developed artifacts can be easily combined into a coherent piece of software. In this paper we describe a domain specific language that allows programmers to describe in an abstract level how software artifacts can be combined into powerful software certification processes. This domain specific language is the building block of a web-based, open-source software certification portal. This paper introduces the embedding of such domain specific language as combinator library written in the Haskell programming language. The semantics of this language is expressed via attribute grammars that are embedded in Haskell, which provide a modular and incremental setting to define the combination of software artifacts.

Cunha J, Visser J, Alves T, Saraiva JA.  2011.  Type-Safe Evolution of Spreadsheets. Fundamental Approaches to Software Engineering - FASE. 6603:186–201. Abstractfase11.pdf

Spreadsheets are notoriously error-prone. To help avoid the introduction of errors when changing spreadsheets, models that capture the structure and interdependencies of spreadsheets at a conceptual level have been proposed. Thus, spreadsheet evolution can be made safe within the confines of a model. As in any other model/instance setting, evolution may not only require changes at the instance level but also at the model level. When model changes are required, the safety of instance evolution can not be guarded by the model alone. We have designed an appropriate representation of spreadsheet models, including the fundamental notions of formulæand references. For these models and their instances, we have designed coupled transformation rules that cover specific spreadsheet evolution steps, such as the insertion of columns in all occurrences of a repeated block of cells. Each model-level transformation rule is coupled with instance level migration rules from the source to the target model and vice versa. These coupled rules can be composed to create compound transformations at the model level inducing compound transformations at the instance level. This approach guarantees safe evolution of spreadsheets even when models change.

Cunha J, Fernandes JP, Mendes J, Saraiva JA.  2011.  Embedding and Evolution of Spreadsheet Models in Spreadsheet Systems. Proceedings of the Symposium on Visual Languages and Human-Centric Computing - VL/HCC. :186–201. Abstractvl-hcc11.pdf

This paper describes the embedding of ClassSheet models in spreadsheet systems. ClassSheet models are wellknown and describe the business logic of spreadsheet data. We embed this domain specific model representation on the (general purpose) spreadsheet system it models. By defining such an embedding, we provide end users a model-driven engineering spreadsheet developing environment. End users can interact with both the model and the spreadsheet data in the same environment. Moreover, we use advanced techniques to evolve spreadsheets and models and to have them synchronized. In this paper we present our work on extending a widely used spreadsheet system with such a model-driven spreadsheet engineering environment.

Beckwith L, Cunha J, Fernandes JP, Saraiva JA.  2011.  End-users Productivity in Model-based Spreadsheets: An Empirical Study. Proceedings of the Third International Symposium on End-User Development - IS-EUD. :282–288. Abstractis-eud11.pdf

Spreadsheets are widely used and studies show that most of the existing ones contain non-trivial errors. To improve end-users productivity, recent research proposes the use of a model-driven engineering approach to spreadsheets. In this paper we conduct the first empirical study to assess the effectiveness and efficiency of this approach. A set of spreadsheet end users worked with two different model-based spreadsheets. We present and analyze here the results achieved.

Beckwith L, Cunha J, Fernandes JP, Saraiva JA.  2011.  An Empirical Study on End-users Productivity Using Model-based Spreadsheets. Proceedings of the European Spreadsheet Risks Interest Group. :87–100. Abstracteusprig11.pdf

Spreadsheets are widely used, and studies have shown that most end-user spreadsheets contain nontrivial errors. To improve end-users productivity, recent research proposes the use of a model-driven engineering approach to spreadsheets. In this paper we conduct the first systematic empirical study to assess the effectiveness and efficiency of this approach. A set of spreadsheet end users worked with two different model-based spreadsheets, and we present and analyze here the results achieved.

Fernandes JP, Saraiva JA, Seidel D, Voigtländer J.  2011.  Strictification of circular programs. Workshop on Partial Evaluation and Program Manipulation - PEPM. :131-140. Abstractfernandessaraivaseidelvoigtlander11.pdf

Circular functional programs (necessarily evaluated lazily) have been used as algorithmic tools, as attribute grammar implementations, and as target for program transformation techniques. Classically, Richard Bird [1984] showed how to transform certain multitraversal programs (which could be evaluated strictly or lazily) into one-traversal ones using circular bindings. Can we go the other way, even for programs that are not in the image of his technique? That is the question we pursue in this paper. We develop an approach that on the one hand lets us deal with typical examples corresponding to attribute grammars, but on the other hand also helps to derive new algorithms for problems not previously in reach.

Cunha J, Erwig M, Saraiva JA.  2010.  Automatically Inferring ClassSheet Models from Spreadsheets. Proceedings of the Symposium on Visual Languages and Human-Centric Computing - VL/HCC. :93–100. Abstractvl-hcc10.pdf

Many errors in spreadsheet formulas can be avoided if spreadsheets are built automatically from higher-level models that can encode and enforce consistency constraints.
However, designing such models is time consuming and requires expertise beyond the knowledge to work with spreadsheets. Legacy spreadsheets pose a particular challenge to the approach of controlling spreadsheet evolution through higher-level models, because the need for a model might be overshadowed by two problems: (A) The benefit of creating a spreadsheet is lacking since the legacy spreadsheet already exists, and (B) existing data must be transferred into the new model-generated spreadsheet.To address these problems and to support the modeldriven spreadsheet engineering approach, we have developed a tool that can automatically infer ClassSheet models from spreadsheets. To this end, we have adapted a method to infer entity/relationship models from relational database to the spreadsheets/ClassSheets realm. We have implemented our techniques in the HAEXCEL framework and integrated it with the ViTSL/Gencel spreadsheet generator, which allows the automatic generation of refactored spreadsheets from the inferred ClassSheet model. The resulting spreadsheet guides further changes and provably safeguards the spreadsheet against a large class of formula errors. The developed tool is a significant 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.

Silva JC, Silva CE, Campos JC, Saraiva JA.  2010.  GUI Behavior from Source Code Analysis. 4a. Conferência de Grupo Português de Computação Gráfica. :81-88. Abstractsilvascs10.pdf

When developing interactive applications, considering the correctness of graphical user interfaces (GUIs) code is essential. GUIs are critical components of today's software, and contemporary software tools do not provide enough support for ensuring GUIs' code quality. GUIsurfer, a GUI reverse engineering tool, enables evaluation of behavioral properties of user interfaces. It performs static analysis of GUI code, generating state machines that can help in the evaluation of interactive applications. This paper describes the design, software architecture, and the use of GUIsurfer through an example. The tool is easily re-targetable, and support is available to Java/Swing, and WxHaskell. The paper sets the ground for a generalization effort to consider rich internet applications. It explores the GWT web applications' user interface programming toolkit.

Silva JC, Silva CE, Gonçalo R, Saraiva JA, Campos JC.  2010.  The GUISurfer tool: towards a language independent approach to reverse engineering GUI code. Proceedings of the 2nd ACM SIGCHI Symposium on Engineering interactive computing systems. :181-186. Abstracteics141-silva.pdf

Graphical user interfaces (GUIs) are critical components of today's software. Developers are dedicating a larger portion of code to implementing them. Given their increased importance, correctness of GUIs code is becoming essential. This paper describes the latest results in the development of GUISurfer, a tool to reverse engineer the GUI layer of interactive computing systems. The ultimate goal of the tool is to enable analysis of interactive system from source code.

Saraiva JA, Fernandes JP, Monteiro M, Diniz P, Cardoso J.  2010.  A domain- specific aspect language for transforming MATLAB programs. Fifth Workshop on Domain-Specific Aspect Languages (DSAL). Abstract

Aspect-oriented programming enables software developers to augment programs with information out of the scope of the base language while not hampering the code readability and thus its portability. MATLAB is a popular modeling/programming language that can significantly benefit from aspect-oriented programming features.

Cunha J, Saraiva JA, Visser J.  2009.  Discovery-based edit assistance for spreadsheets. Proceedings of the Symposium on Visual Languages and Human-Centric Computing - VL/HCC. :233–237. Abstractvl-hcc09.pdf

Spreadsheets can be viewed as a highly flexible endusers programming environment which enjoys wide-spread adoption. But spreadsheets lack many of the structured programming concepts of regular programming paradigms. In particular, the lack of data structures in spreadsheets may lead spreadsheet users to cause redundancy, loss, or corruption of data during edit actions. In this paper, we demonstrate how implicit structural properties of spreadsheet data can be exploited to offer edit assistance to spreadsheet users. Our approach is based on the discovery of functional dependencies among data items which allow automatic reconstruction of a relational database schema. From this schema, new formulas and visual objects are embedded into the spreadsheet to offer features for auto-completion, guarded deletion, and controlled insertion. Schema discovery and spreadsheet enhancement are carried out automatically in the background and do not disturb normal user experience.