Cunha J, Couto M, Carção T, Fernandes JP, Saraiva JA.  2014.  Detecting Anomalous Energy Consumption in Android Applications. SBLP - 
XVIII Simpósio Brasileiro de Linguagens de Programação . Abstractsblp14.pdf

The use of powerful mobile devices, like smartphones, tablets and laptops, are changing the way programmers develop software. While in the past the primary goal to optimize software was the run time optimization, nowadays there is a growing awareness of the need to reduce energy consumption. This paper presents a technique and a tool to detect anomalous energy consumption in Android applications, and to relate it directly with the source code of the application. We propose a dynamically calibrated model for energy consumption for the Android ecosystem, and that supports different devices. The model is then used as an API to monitor the application execution: first, we instrument the application source code so that we can relate energy consumption to the application source code; second, we use a statistical approach, based on fault-localization techniques, to localize abnormal energy consumption in the source code .

Silva JC, Silva JL, Campos JC, Saraiva JA.  2013.  Uma Abordagem para a Geração de Casos de Teste Baseada em Modelos. Sistemas e Tecnologias de Informação. 2:142-146. Abstractid-265-jcsilva.pdf

The analytical methods based on evaluation models of interactive systems were proposed as an alternative to user testing in the last stages of the software development due to its costs. However, the use of isolated behavioral models of the system limits the results of the analytical methods. An example of these limitations relates to the fact that they are unable to identify implementation issues that will impact on usability. With the introduction of model-based testing we are enable to test if the implemented software meets the specified model. This paper presents an model-based approach for test cases generation from the static analysis of source code.

Cunha J, Fernandes JP, Mendes J, Saraiva JA.  2013.  Complexity Metrics for ClassSheet Models. ICCSA - - International Conference on Computational Science and Its Applications. :459-474. Abstracticcsa-sq13.pdf

This paper proposes a set of metrics for the assessment of the complexity of models de ning the business logic of spreadsheets. This set can be considered the rst step in the direction of building a quality standard for spreadsheet models, that is still to be de ned. The computation of concrete metric values has further been integrated under a well-established model-driven spreadsheet development environment, providing a framework for the analysis of spreadsheet models under spreadsheets themselves.

Cunha J, Fernandes JP, Mendes J, Pereira R, Saraiva JA.  2013.  Querying model-driven spreadsheets. Symposium on Visual Languages and Human-Centric Computing - VL/HCC. :83-86. Abstractvlhcc13.pdf

Spreadsheets are being used with many different purposes that range from toy applications to complete information systems. In any of these cases, they are often used as data repositories that can grow significantly. As the amount of data grows, it also becomes more difficult to extract concrete information out of them.
This paper focuses on the problem of spreadsheet querying. In particular, we propose an expressive and composable technique where intuitive queries can be defined. Our approach builds on a model-driven spreadsheet development environment, and queries are expressed referencing entities in the model of a spreadsheet instead of in its actual data. Finally, the system that we have implemented relies on Google’s query function for spreadsheets.

Belo O, Cunha J, Fernandes JP, Mendes J, Pereira R, Saraiva JA.  2013.  QuerySheet: A bidirectional query environment for model-driven spreadsheets. Symposium on Visual Languages and Human-Centric Computing - VL/HCC. :199-200. Abstractvlhcc2013-td.pdf

This paper presents a tool, named QUERYSHEET, to query spreadsheets. We defined a language to write the queries, which resembles SQL, the language to query databases. This allows to write queries which are more related to the spreadsheet content than with current approaches.

Martins P, Carvalho NR, Fernandes JP, Almeida JJ, Saraiva JA.  2013.  A Framework for Modular and Customizable Software Analysis. 13th International Conference on Computational Science and Applications - ICCSA. :443-458. Abstracticcsa13.pdf

This paper presents a framework for the analysis of software artifacts. We revise and propose techniques that aid in the manipulation and combination of target-language specific tools, and in handling and controlling the results of such tools. We also propose to integrate under our framework techniques that are capable of performing language independent analyses.
The final result of our work is an analysis environment that is modular and flexible and that allows easy and elegant implementations of complex analysis suites.
We finally conduct a proof of concept for our framework by analyzing a well-known, widely used open-source software package.

Pardo A, Fernandes JP, Saraiva JA.  2013.  Multiple Intermediate Structure Deforestation by Shortcut Fusion. Simpósio Brasileiro de Linguagens de Programação - SBLP. :120-134. Abstractsblp13_b.pdf

Shortcut fusion is a well-known optimization technique for functional programs. Its aim is to transform multi-pass algorithms into single pass ones, achieving deforestation of the intermediate structures that multi-pass algorithms need to construct. Shortcut fusion has already been extended in several ways. It can be applied to monadic programs, maintaining the global effects, and also to obtain circular and higher-order programs. The techniques proposed so far, however, only consider programs defined as the composition of a single producer with a single consumer. In this paper, we analyse shortcut fusion laws to deal with programs consisting of an arbitrary number of function compositions.

Martins P, Fernandes JP, Saraiva JA.  2013.  Zipper-Based Attribute Grammars and Their Extensions. Simpósio Brasileiro de Linguagens de Programação - SBLP. :135-149. Abstractsblp13.pdf

Attribute grammars are a suitable formalism to express complex software language analysis and manipulation algorithms, which rely on multiple traversals of the underlying syntax tree. Recently, Attribute Grammars have been extended with mechanisms such as references and high-order and circular attributes. Such extensions provide a powerful modular mechanism and allow the specification of complex fix-point computations. This paper defines an elegant and simple, zipper-based embedding of attribute grammars and their extensions as first class citizens. In this setting, language specifications are defined as a set of independent, off-the-shelf components that can easily be composed into a powerful, executable language processor. Several real examples of language specification and processing programs have been implemented in this setting.

Cunha J, Saraiva JA, Visser J.  2012.  Model-Based Programming Environments for Spreadsheets. Brazilian Symposium on Programming Languages - SBLP. 7554:117–133. Abstractsblp12.pdf

Although spreadsheets can be seen as a flexible programming environment, they lack some of the concepts of regular programming languages, such as structured data types. This can lead the user to edit the spreadsheet in a wrong way and perhaps cause corrupt or redundant data. We devised a method for extraction of a relational model from a spreadsheet and the subsequent embedding of the model back into the spreadsheet to create a model-based spreadsheet programming environment. The extraction algorithm is specific for spreadsheets since it considers particularities such as layout and column arrangement. The extracted model is used to generate formulas and visual elements that are then embedded in the spreadsheet helping the user to edit data in a correct way. We present preliminary experimental results from applying our approach to a sample of spreadsheets from the EUSES Spreadsheet Corpus.

Cunha J, Fernandes JP, Mendes J, Saraiva JA.  2012.  Extension and Implementation of ClassSheet Models. Proceedings of the Symposium on Visual Languages and Human-Centric Computing - VL/HCC. :19–22. Abstractvlhcc12.pdf

In this paper we explore the use of models in the context of spreadsheet engineering. We review a successful spreadsheet modeling language, whose semantics we further extend. With this extension we bring spreadsheet models closer to the business models of spreadsheets themselves. An addon for a widely used spreadsheet system, providing bidirectional model-driven spreadsheet development, was also improved to include the proposed model extension.

Cunha J, Fernandes JP, Mendes J, Pacheco H, Saraiva JA.  2012.  Bidirectional Transformation of Model-Driven Spreadsheets. Theory and Practice of Model Transformations - ICMT. 7307:105–120. Abstracticmt12.pdf

Spreadsheets play an important role in software organizations. Indeed, in large software organizations, spreadsheets are not only used to de ne sheets containing data and formulas, but also to collect information from di erent systems, to adapt data coming from one system to the format required by another, to perform operations to enrich or simplify data, etc. In fact, over time many spreadsheets turn out to be used for storing and processing increasing amounts of data and supporting increasing numbers of users. Unfortunately, spreadsheet systems provide poor support for modularity, abstraction, and transformation, thus, making the maintenance, update and evolution of spreadsheets a very complex and error-prone task.
We present techniques for model-driven spreadsheet engineering where we employ bidirectional transformations to maintain spreadsheet models and instances synchronized. In our setting, the business logic of spreadsheets is de ned by ClassSheet models to which the spreadsheet data conforms, and spreadsheet users may evolve both the model and the data instances. Our techniques are implemented as part of the MDSheet framework: an extension for a traditional spreadsheet system.

Cunha J, Fernandes JP, Peixoto C, Saraiva JA.  2012.  A Quality Model for Spreadsheets. Proceedings of the 8th International Conference on the Quality of Information and Communications Technology, Quality in ICT Evolution Track - QUATIC. :231–236. Abstractquatic12.pdf

In this paper we present a quality model for spreadsheets, based on the ISO/IEC 9126 standard that defines a generic quality model for software. To each of the software characteristics defined in the ISO/IEC 9126, we associate an equivalent spreadsheet characteristic. Then, we propose a set of spreadsheet specific metrics to assess the quality of a spreadsheet in each of the defined characteristics. In order to obtain the normal distribution of expected values for a spreadsheet in each of the metrics that we propose, we have executed them against all spreadsheets in the large and widely used EUSES spreadsheet corpus. Then, we quantify each characteristic of our quality model after computing the values of our metrics, and we define quality scores for the different ranges of values. Finally, to automate the atribution of a quality score to a given spreadsheet, according to our quality model, we have integrated the computation of the metrics it includes in both a batch and a web-based tool.

Cunha J, Fernandes JP, Mendes J, Saraiva JA.  2012.  Towards an Evaluation of Bidirectional Model-driven Spreadsheets. User evaluation for Software Engineering Researchers - USER. :25–28. Abstractuser12.pdf

Spreadsheets are widely recognized as popular programming systems with a huge number of spreadsheets being created every day. Also, spreadsheets are often used in the decision processes of profit-oriented companies. While this illustrates their practical importance, studies have shown that up to 90% of real-world spreadsheets contain errors. In order to improve the productivity of spreadsheet endusers, the software engineering community has proposed to employ model-driven approaches to spreadsheet development.
In this paper we describe the evaluation of a bidirectional model-driven spreadsheet environment. In this environment, models and data instances are kept in conformity, even after an update on any of these artifacts. We describe the issues of an empirical study we plan to conduct, based on our previous experience with end-user studies. Our goal is to assess if this model-driven spreadsheet development framework does in fact contribute to improve the productivity of spreadsheet users.

Cunha J, Fernandes JP, Mendes J, Saraiva JA.  2012.  A Bidirectional Model-driven Spreadsheet Environment. Proceedings of the 34rd International Conference on Software Engineering - ICSE. :1443–1444. Abstracticse_abstract_poster12.pdf

In this extended abstract we present a bidirectional model-driven framework to develop spreadsheets. By being model driven, our approach allows to evolve a spreadsheet model and automatically have the data co-evolved. The bidirectional component achieves precisely the inverse, that is, to evolve the data and automatically obtain a new model to which the data conforms.

Cunha J, Fernandes JP, Mendes J, Saraiva JA.  2012.  Towards a Catalog of Spreadsheet Smells. The 12th International Conference on Computational Science and Its Applications - ICCSA. 7336:202–216. Abstracticcsa12.pdf

Spreadsheets are considered to be the most widely used programming language in the world, and reports have shown that 90% of real-world spreadsheets contain errors. In this work, we try to identify spreadsheet smells, a concept adapted from software, which consists of a surface indication that usually corresponds to a deeper problem. Our smells have been integrated in a tool, and were computed for a large spreadsheet repository. Finally, the analysis of the results we obtained led to the re nement of our initial catalog.