João Saraiva

dblp:97/3668 · DBLP profile ↗
← Back
67ranked-venue papers
5as first author
18since 2021 · last 2026
—ORCID · conflict

Domains — the database's venue-derived domains; a paper can count in several

Software engineering, systems software and programming languages · 49 · 4 first-author · 16 since 2021Human-computer interaction and ubiquitous computing · 11 · 1 first-author · 1 since 2021Applied, interdisciplinary, general and emerging computing · 7 · 1 since 2021Artificial intelligence and machine learning · 1 · 1 since 2021Databases, data management, data science and information retrieval · 1
YearPublicationVenuePosition
2026 Why Just-In-Time Compilation Matters: Evaluating Runtime and Energy Efficiency
abstract
Just-in-time (JIT) compilation is a core feature of many modern programming languages, combining the portability of interpreted languages with the performance benefits of ahead-of-time compilation. Originally introduced to improve the runtime performance of interpreted languages, JIT compilation dynamically compiles frequently executed code during program execution.
Simão Cunha, João Saraiva
SLE3
2026 Ztrategic: Libraries and Tools For Software Language Specification, Transformation, and Testing
abstract
This tool paper presents the Ztrategic framework, which integrates strategic term rewriting and attributes grammars through a unifying navigation abstraction based on functional zippers. The resulting zipper-based embedding is both concise and expressive, integrating the strengths of both formalisms. Together, these mechanisms serve as foundational building blocks for Ztrategic for supporting property-based testing in language engineering.
Emanuel Rodrigues, José Nuno Macedo, João Saraiva
SLE3
2025 Property-based Testing of Attribute Grammars
abstract
Software testing is an integral part of modern software development. Testing frameworks are part of the toolset of any software language allowing programmers to test their programs in order to detect bugs. Unfortunately, there is no work on testing in attribute grammars.
José Nuno Macedo, Marcos Viera, João Saraiva
SLE3
2025 Understanding the adoption of modern Javascript features: An empirical study on open-source systems
Walter Lucas 0001, Rafael Campos Nunes, Rodrigo Bonifácio, Fausto Carvalho, Michael Silva, Adriano Torres, Paola R. G. Accioly, Eduardo Monteiro, João Saraiva
Empir. Softw. Eng.10
2024 pyZtrategic: A Zipper-Based Embedding of Strategies and Attribute Grammars in Python
abstract
This paper presents pyZtrategic: a library that embeds strategic term rewriting and attribute grammars in the Python programming language. Strategic term rewriting and attribute grammars are two powerful programming techniques widely used in language engineering: The former relies on strategies to apply term rewrite rules in defining large-scale language transformations, while the latter is suitable to express context-dependent language processing algorithms. Thus, pyZtrategic offers Python programmers recursion schemes (strategies) which apply term rewrite rules in defining large scale language transformations. It also offers attribute grammars to express context-dependent language processing algorithms. PyZtrategic offers the best of those two worlds, thus providing powerful abstractions to express software maintenance and evolution tasks. Moreover, we developed several language engineering problems in pyZtrategic, and we compare it to well established strategic programming and attribute grammar systems. Our preliminary results show that our library offers similar expressiveness as such systems, but, unfortunately, it does suffer from the current poor runtime performance of the Python language.
Emanuel Rodrigues, José Nuno Macedo, Marcos Viera, João Saraiva
ENASE4
2024 Trading Runtime for Energy Efficiency: Leveraging Power Caps to Save Energy across Programming Languages
abstract
Energy efficiency of software is crucial in minimizing environmental impact and reducing operational costs of ICT systems. Energy efficiency is therefore a key area of contemporary software language engineering research. A recurrent discussion that excites our community is whether runtime performance is always a proxy for energy efficiency. While a generalized intuition seems to suggest this is the case, this intuition does not align with the fact that energy is the accumulation of power over time; hence, time is only one of the factors in this accumulation. We focus on the other factor, power, and the impact that capping it has on the energy efficiency of running software. We conduct an extensive investigation comparing regular and power-capped executions of 9 benchmark programs obtained from The Computer Language Benchmarks Game, across 20 distinct programming languages. Our results show that employing power caps can be used to trade running time, which is degraded, for energy efficiency, which is improved, in all the programming languages and in all benchmarks that were considered. We observe overall energy savings of almost 14% across the 20 programming languages, with notable savings of 27% in Haskell. This saving, however, comes at the cost of an overall increase of the program's execution time of 91% in average. We are also able to draw similar observations using language specific benchmarks for programming languages of different paradigms and with different execution models. This is achieved analyzing a wide range of benchmark programs from the nofib Benchmark Suite of Haskell Programs, DaCapo Benchmark Suite for Java, and the Python Performance Benchmark Suite. We observe energy savings of approximately 8% to 21% across the test suites, with execution time increases ranging from 21% to 46%. Notably, the DaCapo suite exhibits the most significant values, with 20.84% energy savings and a 45.58% increase in execution time. Our results have the potential to drive significant energy savings in the context of computational tasks for which runtime is not critical, including Batch Processing Systems, Background Data Processing and Automated Backups.
Simão Cunha, Luís Silva, João Saraiva, João Paulo Fernandes
SLE3
2024 A large-scale empirical study on mobile performance: energy, run-time and memory
abstract
Abstract Software performance concerns have been attracting research interest at an increasing rate, especially regarding energy performance in non-wired computing devices. In the context of mobile devices, several research works have been devoted to assessing the performance of software and its underlying code. One important contribution of such research efforts is sets of programming guidelines aiming at identifying efficient and inefficient programming practices, and consequently to steer software developers to write performance-friendly code. Despite recent efforts in this direction, it is still almost unfeasible to obtain universal and up-to-date knowledge regarding software and respective source code performance. Namely regarding energy performance, where there has been growing interest in optimizing software energy consumption due to the power restrictions of such devices. There are still many difficulties reported by the community in measuring performance, namely in large-scale validation and replication. The Android ecosystem is a particular example, where the great fragmentation of the platform, the constant evolution of the hardware, the software platform, the development libraries themselves, and the fact that most of the platform tools are integrated into the IDE’s GUI, makes it extremely difficult to perform performance studies based on large sets of data/applications. In this paper, we analyze the execution of a diversified corpus of applications of significant magnitude. We analyze the source-code performance of 1322 versions of 215 different Android applications, dynamically executed with over than 27900 tested scenarios, using state-of-the-art black-box testing frameworks with different combinations of GUI inputs. Our empirical analysis allowed to observe that semantic program changes such as adding functionality and repairing bugfixes are the changes more associated with relevant impact on energy performance. Furthermore, we also demonstrate that several coding practices previously identified as energy-greedy do not replicate such behavior in our execution context and can have distinct impacts across several performance indicators: runtime, memory and energy consumption. Some of these practices include some performance issues reported by the Android Lint and Android SDK APIs. We also provide evidence that the evaluated performance indicators have little to no correlation with the performance issues’ priority detected by Android Lint. Finally, our results allowed us to demonstrate that there are significant differences in terms of performance between the most used libraries suited for implementing common programming tasks, such as HTTP communication, JSON manipulation, image loading/rendering, among others, providing a set of recommendations to select the most efficient library for each performance indicator. Based on the conclusions drawn and in the extension of the developed work, we also synthesized a set of guidelines that can be used by practitioners to replicate energy studies and build more efficient mobile software.
Rui Rua, João Saraiva
Empir. Softw. Eng.2
2024 Zipper-based embedding of strategic attribute grammars
abstract
Strategic term re-writing and attribute grammars are two powerful programming techniques widely used in language engineering. The former relies on strategies to apply term re-write rules in defining large-scale language transformations, while the latter is suitable to express context-dependent language processing algorithms. These two techniques can be expressed and combined via a powerful navigation abstraction: generic zippers. This results in a concise zipper-based embedding offering the expressiveness of both techniques. In addition, we increase the functionalities of strategic programming, enabling the definition of outwards traversals; i.e. outside the starting position. Such elegant embedding has a severe limitation since it recomputes attribute values. This paper presents a proper and efficient embedding of both techniques. First, attribute values are memoized in the zipper data structure, thus avoiding their re-computation. Moreover, strategic zipper based functions are adapted to access such memoized values. We have hosted our memoized zipper-based embedding of strategic attribute grammars both in the Haskell and Python programming languages. Moreoever, we benchmarked the libraries supporting both embedding against the state-of-the-art Haskell-based Strafunski and Scala-based Kiama libraries. The first results show that our Haskell Ztrategic library is very competitive against those two well established libraries.
José Nuno Macedo, Emanuel Rodrigues, Marcos Viera, João Saraiva
J. Syst. Softw.4
2024 Embracing modern C++ features: An empirical assessment on the KDE community
abstract
Abstract Similar to software systems, programming languages evolve substantially over time. Indeed, the community has more recently seen the release of new versions of mainstream languages in shorter and shorter time frames. For instance, the C++ working group has begun to release a new version of the language every 3 years, which now has a greater number of modern C++ features and improvements in modern standards (C++11, C++14, C++17, and C++ 20). Nonetheless, there is little empirical evidence on how developers are transitioning to use modern C++ constructs in legacy systems, and not understanding the trends and reasons for adopting these new modern C++ features might hinder software developers in conducting rejuvenation efforts. In this paper, we conduct an in‐depth study to understand the development practices of KDE contributors to evolve their projects toward the use of modern C++ features. Our results show a trend in the widespread adoption of some modern C++ features (lambda expressions, auto‐typed variables, and range‐based for) in KDE community projects. We also found that developers in the KDE community are making large efforts to modernize their programs using automated tools, and we present some modernization scenarios and the benefits of adopting modern C++ features of the C++ programming language. Our results might help C++ software developers, in general, to evolve C++ legacy systems and tools builders to implement more effective tools that could help in rejuvenation efforts.
Walter Lucas 0001, Fausto Carvalho, Rafael Campos Nunes, Rodrigo Bonifácio, João Saraiva, Paola R. G. Accioly
J. Softw. Evol. Process.5
2024 Programming languages ranking based on energy measurements
Alberto Gordillo, Coral Calero, María Ángeles Moraga, Félix García 0001, João Paulo Fernandes, Rui Abreu 0001, João Saraiva
Softw. Qual. J.7
2023 Understanding the Motivations, Challenges, and Practices of Software Rejuvenation
abstract
The continuous evolution of programming languages has brought benefits and new challenges for software developers. In recent years, we have witnessed a rapid release of new versions of mainstream programming languages like Java. While these advancements promise better security, enhanced performance, and increased developers’ productivity, the constant release of new language versions has posed a particular challenge for practitioners: how to keep their systems up-to-date with new language releases. This thesis aims to understand the pains, motivations, and practices developers follow during rejuvenating efforts—a particular kind of software maintenance whose goal is to avoid obsolesce due to the evolution of programming languages. To this end, we are building and validating a theory using a mixed methods study. In the first study, we interviewed 23 software developers and used the Constructivist Grounded Theory Method to identify recurrent challenges and practices used in rejuvenation efforts. In the second study, we mined the software repositories of open-source projects written in C++ and JavaScript to identify the adoption of new language features and whether or not software developers conduct large rejuvenation efforts. The first study highlights the benefits of new feature adoption and rejuvenation, revealing developer methods and challenges. The second study emphasizes open-source adoption trends and patterns for modern features. In the third and final study, our goal is to share our theory on software rejuvenation with practitioners through the Focus Group method with industrial patterns.
Walter Lucas 0001, Rodrigo Bonifácio, João Saraiva
ICSME3
2023 PyAnaDroid: A fully-customizable execution pipeline for benchmarking Android Applications
abstract
This paper presents PyAnaDroid, an open-source, fully-customizable execution pipeline designed to benchmark the performance of Android native projects and applications, with a special emphasis on benchmarking energy performance. PyAnaDroid is currently being used for developing large-scale mobile software empirical studies and for supporting an advanced academic course on program testing and analysis. The presented artifact is an expandable and reusable pipeline to automatically build, test and analyze Android applications. This tool was made openly available in order to become a reference tool to transparently conduct, share and validate empirical studies regarding Android applications. This document presents the architecture of PyAnaDroid, several use cases, and the results of a preliminary analysis that illustrates its potential.Video demo: https://youtu.be/7AV3nrh4Qc8
Rui Rua, João Saraiva
ICSME2
2023 GPT-3-Powered Type Error Debugging: Investigating the Use of Large Language Models for Code Repair
abstract
Type systems are responsible for assigning types to terms in programs. That way, they enforce the actions that can be taken and can, consequently, detect type errors during compilation. However, while they are able to flag the existence of an error, they often fail to pinpoint its cause or provide a helpful error message. Thus, without adequate support, debugging this kind of errors can take a considerable amount of effort. Recently, neural network models have been developed that are able to understand programming languages and perform several downstream tasks. We argue that type error debugging can be enhanced by taking advantage of this deeper understanding of the language’s structure. In this paper, we present a technique that leverages GPT-3’s capabilities to automatically fix type errors in OCaml programs. We perform multiple source code analysis tasks to produce useful prompts that are then provided to GPT-3 to generate potential patches. Our publicly available tool, Mentat, supports multiple modes and was validated on an existing public dataset with thousands of OCaml programs. We automatically validate successful repairs by using Quickcheck to verify which generated patches produce the same output as the user-intended fixed version, achieving a 39% repair rate. In a comparative study, Mentat outperformed two other techniques in automatically fixing ill-typed OCaml programs.
Francisco Ribeiro, José Nuno Macedo, Kanae Tsushima, Rui Abreu 0001, João Saraiva
SLE5
2022 Energy Efficiency of Python Machine Learning Frameworks
Salwa Ajel, Francisco Ribeiro, Ridha Ejbali, João Saraiva
ISDA (2)4
2022 E-MANAFA: Energy Monitoring and ANAlysis tool For Android
abstract
This article introduces the E-MANAFA energy profiler, a plug-and-play, device-independent, model-based profiler capable of obtaining fine-grained energy measurements on Android devices. Besides having the capability to calculate performance metrics such as the energy consumed and runtime during a time interval, E-MANAFA also allows to estimate the energy consumed by each device component (e.g. CPU, WI-FI, screen). In this article, we present the main elements that compose this framework, as well as its workflow. In order to present the power of this tool, we demonstrate how the tool can measure the overhead of the instrumentation technique used in the PyAnaDroid application benchmarking pipeline, which already supports E-MANAFA to monitor power consumption in its Android application automatic execution process. Video demo: shorturl.at/hmyz5
Rui Rua, João Saraiva
ASE2
2021 Bringing Green Software to Computer Science Curriculum: Perspectives from Researchers and Educators
abstract
Only recently has the software engineering community started conducting research on developing energy efficient software, or green software. This is shadowed when compared to the research already produced in the computer hardware community. While research in green software is rapidly increasing, several recent studies with software engineers show that they still miss techniques, knowledge, and tools to develop greener software. Indeed, all such studies suggest that green software should be part of a modern Computer Science Curriculum.
João Saraiva, Ziliang Zong, Rui Pereira
ITiCSE (1)1
2021 On Understanding Contextual Changes of Failures
abstract
Recent studies show that many real-world software faults are due to slight modifications (mutations) to the program. Thus, analyzing transformations made by a developer and associating them with well-known mutation operators can help pinpoint and repair the root cause of failures. This paper proposes a mutation operator inference technique: given the original program and one of its subsequent forms, it infers which mutation operators would transform the original and produce such a version. Moreover, we implemented this technique as a tool called Morpheus, which analyzes faulty Java programs. We have also validated both the technique and tool by analyzing a repository with 1753 modifications for 20 different programs, successfully inferring mutation operators 78% of times. Furthermore, we also show that several program versions result from not just a single mutation operator but multiple ones. In the end, we resort to real-world case studies to demonstrate the advantages of this approach regarding program repair.
Francisco Ribeiro, Rui Abreu 0001, João Saraiva
QRS3
2021 Ranking programming languages by energy efficiency
Rui Pereira, Marco Couto 0001, Francisco Ribeiro, Rui Rua, Jácome Cunha, João Paulo Fernandes, João Saraiva
Sci. Comput. Program.7
2020 InDubio: A Combinator Library to Disambiguate Ambiguous Grammars
José Nuno Macedo, João Saraiva
ICCSA (4)2
2020 On energy debt: managing consumption on evolving software
abstract
This paper introduces the concept of energy debt: a new metric, reflecting the implied cost in terms of energy consumption over time, of choosing a flawed implementation of a software system rather than a more robust, yet possibly time consuming, approach. A flawed implementation is considered to contain code smells, known to have a negative influence on the energy consumption.
Marco Couto 0001, Daniel Maia, João Saraiva, Rui Pereira
TechDebt@ICSE3
2020 Energy Refactorings for Android in the Large and in the Wild
abstract
Improving the energy efficiency of mobile applications is a timely goal, as it can contribute to increase a device's usage time, which most often is powered by batteries. Recent studies have provided empirical evidence that refactoring energy-greedy code patterns can in fact reduce the energy consumed by an application. These studies, however, tested the impact of refactoring patterns individually, often locally (e.g., by measuring method-level gains) and using a small set of applications. We studied the application-level impact of refactorings, comparing individual refactorings, among themselves and against the combinations on which they appear. We use scenarios that simulate realistic application usage on a large-scale repository of Android applications. To fully automate the detection and refactoring procedure, as well as the execution of test cases, we developed a publicly available tool called Chimera. Our findings include statistical evidence that i) individual refactorings produce consistent gains, but with different impacts, ii) combining as much refactorings as possible most often, but not always, increases energy savings when compared to individual refactorings, and iii) a few combinations are harmful to energy savings, as they can actually produce more losses than gains. We prepared a set of guidelines for developers to follow, aiding them on deciding how to refactor and consistently reduce energy.
Marco Couto 0001, João Saraiva, João Paulo Fernandes
SANER2
2020 SPELLing out energy leaks: Aiding developers locate energy inefficient code
Rui Pereira, Tiago Carção, Marco Couto 0001, Jácome Cunha, João Paulo Fernandes, João Saraiva
J. Syst. Softw.6
2019 GreenSource: a large-scale collection of Android code, tests and energy metrics
abstract
This paper presents the GreenSource infrastructure: a large body of open source code, executable Android applications, and curated dataset containing energy code metrics. The dataset contains energy metrics obtained by both static analysing the applications' source code and by executing them with available test inputs. To automate the execution of the applications we developed the AnaDroid tool which instruments its code, compiles and executes it with test inputs in any Android device, while collecting energy metrics. GreenSource includes all Android applications included in the MUSE Java source code repository, while AnaDroid implements all Android's energy greedy features described in the literature, GreenSource aims at characterizing energy consumption in the Android ecosystem, providing both Android developers and researchers a setting to reason about energy efficient Android software development.
Rui Rua, Marco Couto 0001, João Saraiva
MSR3
2019 Memoized zipper-based attribute grammars and their higher order extension
João Paulo Fernandes, Pedro Martins 0001, Alberto Pardo, João Saraiva, Marcos Viera
Sci. Comput. Program.4
2018 jStanley: placing a green thumb on Java collections
abstract
Software developers are more and more eager to understand their code’s energy performance. However, even with such knowledge it is di cult to know how to improve the code. Indeed, little tool support exists to understand the energy consumption pro le of a software system and to eventually (automatically) improve its code.
Rui Pereira, Pedro Simão, Jácome Cunha, João Saraiva
ASE4
2017 Energy efficiency across programming languages: how do energy, time, and memory relate?
abstract
This paper presents a study of the runtime, memory usage and energy consumption of twenty seven well-known software languages. We monitor the performance of such languages using ten different programming problems, expressed in each of the languages. Our results show interesting findings, such as, slower/faster languages consuming less/more energy, and how memory usage influences energy consumption. Finally, we show how to use our results to provide software engineers support to decide which language to use when energy efficiency is a concern.
Rui Pereira, Marco Couto 0001, Francisco Ribeiro, Rui Rua, Jácome Cunha, João Paulo Fernandes, João Saraiva
SLE7
2017 Systematic spreadsheet construction processes
abstract
Spreadsheets are used in professional business contexts to make decisions based on collected data. Usually, these spreadsheets are developed by end users in an ad-hoc way. Thus, the business logic of a concrete spreadsheet is not explicit to end users, making its correctness hard to assess and users have to trust. We present an approach where structure and computational behavior of a spreadsheet are specified by a model with a process-like notation based on pre-defined functional spreadsheet services with typed interfaces. This enables a consistent construction process of a spreadsheet that comprises defining its structure and computational behavior as well as filling it with data and executing the defined computational behavior. Thus, concrete spreadsheets are equipped with a specification of their construction process. This supports their understanding and correct usage, even in case of legacy spreadsheets. The approach has been developed in cooperation with an industrial partner.
Jorge Mendes 0001, Jácome Cunha, Francisco J. Duarte, Gregor Engels, João Saraiva, Stefan Sauer 0001
VL/HCC5
2016 Parsing and reflective printing, bidirectionally
Zirun Zhu, Yongzhe Zhang, Hsiang-Shang Ko, Pedro Martins 0001, João Saraiva, Zhenjiang Hu 0002
SLE5
2016 Model inference for spreadsheets
Jácome Cunha, Martin Erwig, Jorge Mendes 0001, João Saraiva
Autom. Softw. Eng.4
2016 Evaluating refactorings for spreadsheet models
Jácome Cunha, João Paulo Fernandes, Pedro Martins 0001, Jorge Mendes 0001, Rui Pereira, João Saraiva
J. Syst. Softw.6
2016 Embedding attribute grammars and their extensions using functional zippers
Pedro Martins 0001, João Paulo Fernandes, João Saraiva, Eric Van Wyk, Anthony M. Sloane
Sci. Comput. Program.3
2016 Multiple intermediate structure deforestation by shortcut fusion
Alberto Pardo, João Paulo Fernandes, João Saraiva
Sci. Comput. Program.3
2015 Embedding, Evolution, and Validation of Model-Driven Spreadsheets
abstract
This paper proposes and validates a model-driven software engineering technique for spreadsheets. The technique that we envision builds on the embedding of spreadsheet models under a widely used spreadsheet system. This means that we enable the creation and evolution of spreadsheet models under a spreadsheet system. More precisely, we embed ClassSheets, a visual language with a syntax similar to the one offered by common spreadsheets, that was created with the aim of specifying spreadsheets. Our embedding allows models and their conforming instances to be developed under the same environment. In practice, this convenient environment enhances evolution steps at the model level while the corresponding instance is automatically co-evolved. Finally, we have designed and conducted an empirical study with human users in order to assess our technique in production environments. The results of this study are promising and suggest that productivity gains are realizable under our model-driven spreadsheet development setting.
Jácome Cunha, João Paulo Fernandes, Jorge Mendes 0001, João Saraiva
IEEE Trans. Software Eng.4
2014 Smelling Faults in Spreadsheets
abstract
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 well-known 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.
Rui Abreu 0001, Jácome Cunha, João Paulo Fernandes, Pedro Martins 0001, Alexandre Perez, João Saraiva
ICSME6
2014 FaultySheet Detective: When Smells Meet Fault Localization
abstract
This paper presents a tool, dubbed Faulty Sheet Detective, for aiding in spreadsheet fault localization, which combines the detection of bad smells with a generic spectrum-based fault localization algorithm.
Rui Abreu 0001, Jácome Cunha, João Paulo Fernandes, Pedro Martins 0001, Alexandre Perez, João Saraiva
ICSME6
2014 Generating attribute grammar-based bidirectional transformations from rewrite rules
abstract
Higher order attribute grammars provide a convenient means for specifying uni-directional transformations, but they provide no direct support for bidirectional transformations. In this paper we show how rewrite rules (with non-linear right hand sides) that specify a forward/get transformation can be inverted to specify a partial backward/put transformation. These inverted rewrite rules can then be extended with additional rules based on characteristics of the source language grammar and forward transformations to create, under certain circumstances, a total backward transformation. Finally, these rules are used to generate attribute grammar specifications implementing both transformations.
Pedro Martins 0001, João Saraiva, João Paulo Fernandes, Eric Van Wyk
PEPM2
2014 Embedding model-driven spreadsheet queries in spreadsheet systems
abstract
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.
Jácome Cunha, João Paulo Fernandes, Jorge Mendes 0001, Rui Pereira, João Saraiva
VL/HCC5
2014 ES-SQL: Visually querying spreadsheets
abstract
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.
Jácome Cunha, João Paulo Fernandes, Jorge Mendes 0001, Rui Pereira, João Saraiva
VL/HCC5
2014 An Approach for Graphical User Interface External Bad Smells Detection
João Carlos Silva 0002, José Creissac Campos, João Saraiva, José Luís Silva 0001
WorldCIST (2)3
2014 Model-based programming environments for spreadsheets
Jácome Cunha, Jorge Mendes 0001, João Saraiva, Joost Visser 0001
Sci. Comput. Program.3
2013 Complexity Metrics for ClassSheet Models
Jácome Cunha, João Paulo Fernandes, Jorge Mendes 0001, João Saraiva
ICCSA (2)4
2013 A Framework for Modular and Customizable Software Analysis
Pedro Martins 0001, Nuno Ramos Carvalho, João Paulo Fernandes, José João Almeida, João Saraiva
ICCSA (2)5
2013 QuerySheet: A bidirectional query environment for model-driven spreadsheets
abstract
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.
Orlando Belo, Jácome Cunha, João Paulo Fernandes, Jorge Mendes 0001, Rui Pereira, João Saraiva
VL/HCC6
2013 Querying model-driven spreadsheets
abstract
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.
Jácome Cunha, João Paulo Fernandes, Jorge Mendes 0001, Rui Pereira, João Saraiva
VL/HCC5
2013 Special section on the Brazilian Symposium on Programming Languages
André L. M. Santos, João Saraiva
Sci. Comput. Program.2
2012 Towards a Catalog of Spreadsheet Smells
Jácome Cunha, João Paulo Fernandes, Hugo Ribeiro, João Saraiva
ICCSA (4)4
2012 Program and Aspect Metrics for MATLAB
Pedro Martins 0001, Paulo Lopes, João Paulo Fernandes, João Saraiva, João M. P. Cardoso
ICCSA (4)4
2012 MDSheet: A framework for model-driven spreadsheet engineering
abstract
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.
Jácome Cunha, João Paulo Fernandes, Jorge Mendes 0001, João Saraiva
ICSE4
2012 A bidirectional model-driven spreadsheet environment
abstract
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.
Jácome Cunha, João Paulo Fernandes, Jorge Mendes 0001, João Saraiva
ICSE4
2012 SmellSheet detective: A tool for detecting bad smells in spreadsheets
abstract
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 spreadsheets within the EUSES corpus, in order to validate and evolve our bad smells catalog.
Jácome Cunha, João Paulo Fernandes, Pedro Martins 0001, Jorge Mendes 0001, João Saraiva
VL/HCC5
2012 Extension and implementation of ClassSheet models
abstract
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.
Jácome Cunha, João Paulo Fernandes, Jorge Mendes 0001, João Saraiva
VL/HCC4
2011 Type-Safe Evolution of Spreadsheets
Jácome Cunha, Joost Visser 0001, Tiago L. Alves, João Saraiva
FASE4
2011 Strictification of circular programs
abstract
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.
João Paulo Fernandes, João Saraiva, Daniel Seidel, Janis Voigtländer
PEPM2
2011 Embedding and evolution of spreadsheet models in spreadsheet systems
abstract
This paper describes the embedding of ClassSheet models in spreadsheet systems. ClassSheet models are well-known and describe the business logic of spreadsheet data. We embed this domain specific model representation on the (general purpose) spreadsheet system. 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.
Jácome Cunha, Jorge Mendes 0001, João Saraiva, João Paulo Fernandes
VL/HCC3
2010 Automatically Inferring ClassSheet Models from Spreadsheets
abstract
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 model-driven 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.
Jácome Cunha, Martin Erwig, João Saraiva
VL/HCC3
2009 From spreadsheets to relational databases and back
abstract
This paper presents techniques and tools to transform spreadsheets into relational databases and back. A set of data refinement rules is introduced to map a tabular datatype into a relational database schema. Having expressed the transformation of the two data models as data refinements, we obtain for free the functions that migrate the data. We use well-known relational database techniques to optimize and query the data. Because data refinements define bi-directional transformations we can map such database back to an optimized spreadsheet. We have implemented the data refinement rules and we constructed Haskell-based tools to manipulate, optimize and refactor Excel-like spreadsheets.
Jácome Cunha, João Saraiva, Joost Visser 0001
PEPM2
2009 Shortcut fusion rules for the derivation of circular and higher-order monadic programs
abstract
Functional programs often combine separate parts using intermediate data structures for communicating results. These programs are modular, easier to understand and maintain, but suffer from inefficiencies due to the generation of those gluing data structures. To eliminate such redundant data structures, some program transformation techniques have been proposed. One such technique is shortcut fusion, and has been studied in the context of both pure and monadic functional programs.
Alberto Pardo, João Paulo Fernandes, João Saraiva
PEPM3
2009 Discovery-based edit assistance for spreadsheets
abstract
Spreadsheets can be viewed as a highly flexible end-users 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.
Jácome Cunha, João Saraiva, Joost Visser 0001
VL/HCC2
2008 The Objects and Arrows of Computational Design
Don S. Batory, Maider Azanza, João Saraiva
MoDELS3
2007 A shortcut fusion rule for circular program calculation
abstract
Circular programs are a powerful technique to express multiple traversal algorithms as a single traversal function in a lazy setting. In this paper, we present a shortcut deforestation technique to calculate circular programs. The technique we propose takes as input the composition of two functions, such that the first builds an intermediate structure and some additional context information which are then processed by the second one, to produce the final result. Our transformation into circular programs achieves intermediate structure deforestation and multiple traversal elimination. Furthermore, the calculated programs preserve the termination properties of the original ones.
João Paulo Fernandes, Alberto Pardo, João Saraiva
Haskell3
2007 Tools and libraries to model and manipulate circular programs
abstract
This paper presents techniques to model circular lazy programs in a strict, purely functional setting. Circular lazy programs model any algorithm based on multiple traversals over a recursive data structure as a single traversal function. Such elegant and concise circular programs are defined in a (strict or lazy) functional language and they are transformed into efficient strict and deforested, multiple traversal programs by using attribute grammars-based techniques. Moreover, we use standard slicing techniques to slice such circular lazy programs.
João Paulo Fernandes, João Saraiva
PEPM2
2007 Report on selected papers from LDTA 2003
Barrett R. Bryant, João Saraiva
Sci. Comput. Program.2
2003 Generating Spreadsheet-Like Tools from Strong Attribute Grammars
João Saraiva, S. Doaitse Swierstra
GPCE1
2002 Component-Based Programming for Higher-Order Attribute Grammars
João Saraiva
GPCE1
2000 Functional Incremental Attribute Evaluation
João Saraiva, S. Doaitse Swierstra, Matthijs F. Kuiper
CC1
1999 Data Structure Free Compilation
João Saraiva, S. Doaitse Swierstra
CC1
1998 Lrc - A Generator for Incremental Language-Oriented Tools
Matthijs F. Kuiper, João Saraiva
CC2