Points-to Analysis for Context-Oriented JavaScript Programs

We have published and presented a paper at the 25th ACM International Workshop on Formal Techniques for Java-like Programs (FTfJP ’23). DOI: https://doi.org/10.1145/3605156.3606451


Static analyses, as points-to analysis, are useful to determine and assure different properties about a program, such as security or type
safety. While existing analyses are effective in programs restricted to static features, precision declines in the presence of dynamic language features, and even further when the system behavior changes dynamically. As a consequence, improved points-to sets algorithms taking into account such language features and uses are required. In this paper, we present and extension of the point-to sets analysis to incorporate the language abstractions introduced by context-oriented programming adding the capability for programs to adapt their behavior dynamically to the system’s execution context. To do this, we extend WALA to detect the context-oriented language abstractions, and their representation within the system, to capture the dynamic behavior, in the particular case of the Context Traits
JavaScript language extension. To prove the effectiveness of our extension, we evaluate the precision of the points-to set analysis with respect to the state of the art, over four context-oriented programs taken from the literature.

Benefits, Challenges, and Usability Evaluation of DeloreanJS: A Back-in-Time Debugger for JavaScript

At the Pragmatics laboratory, we have developed and published DeloreanJS: A Back-in-Time Debugger for JavaScript. This debugger is a proof-of-concept of how continuations can be used to create a usable debugger. DeloreanJS is available at: http://pleger.cl/sites/deloreanjs. DOI: https://doi.org/10.7717/peerj-cs.1238

JavaScript Web applications are a common product in industry. As with most applications, Web applica- tions can acquire software flaws (known as bugs), whose symptoms are seen during the development stage and, even worse, in production. The use of debuggers is beneficial for detecting bugs. Unfortunately, most JavaScript debuggers (1) only support the “step into/through” feature in an execution program to detect a bug, and (2) do not allow developers to go back-in-time at the application execution to take actions to detect the bug accurately. For example, the second limitation does not allow developers to modify the value of a variable to fix a bug while the application is running or test if the same bug is triggered with other values of that variable.

Using concepts such as continuations and static analysis, this paper presents a usable debugger for JavaScript, named DeloreanJS, which enables developers to go back-in-time in different execution points and resume the execution of a Web application to improve the understanding of a bug, or even experiment with hypothetical scenarios around the bug. Using an online and available version, we illustrate the benefits of DeloreanJS through five examples of bugs in JavaScript. Here, you can read the abstract:

Although DeloreanJS is developed for JavaScript, a dynamic prototype-based object model with side effects (mutable variables), we discuss our proposal with the state-of-art/practice of debuggers in terms of features. For example, modern browsers like Mozilla Firefox include a debugger in their distribution that only support for the breakpoint feature. However, DeloreanJS uses a graphical user interface that considers back-in-time features. The aim of this study is to evaluate and compare the usability of DeloreanJS and Mozilla Firefox’s debugger using the System Usability Scale approach. We requested 30 undergraduate students from two computer science programs to solve five tasks. Among the findings, we highlight two results. First, we found that 100% (15) of participants recommended DeloreanJS, and only 53% (8) recommended Firefox’s debugger to complete the tasks. Second, whereas the average score for DeloreanJS is 71.6 (“Good”), the average score for Firefox’s debugger is 55.8 (“Acceptable”).

An Expressive and Modular Layer Activation Mechanism for Context-Oriented Programming

A paper was recently accepted in the journal Information and Software Technology, which develops EMA, an Expressive and Modular layer Activation mechanism, as a JavaScript library for Context-Oriented Programming (COP). You can find the paper: https://doi.org/10.1016/j.infsof.2022.107132

Context. There is a trend in the software industry towards building systems that dynamically adapt their behavior in response to their surrounding
environment, given the proliferation of various technological devices, such as notebooks, smartphones, and wearables, capable of capturing their execution context. Context-oriented Programming (COP) allows developers to use layer abstractions to adapt software behavior to the context. A layer is associated with a context and can be dynamically activated in direct response to gathered information from its surrounding execution environment. However, most existing layer activation mechanisms have been tailored specifically to address a particular concern; implying that developers need to tweak layer definitions in contortive ways or create new specialized activation mechanisms altogether if their specific needs are not supported.

Objective. Complementing ideas to expressively declare activation mechanism models with interfaces that define conditionals of activation mechanisms modularly, this paper proposes an Expressive and Modular Activation mechanism, named EMA.

Method. To propose EMA, we analyze existing activation mechanisms in COP regarding activation features and scope strategies. After, we propose the design of EMA and validate it with a case study discussion.

Results. Using a concrete JavaScript implementation of EMA, named EMAjs,
we can implement two Web applications: a smartphone application as an example to illustrate EMAjs in action, and an application of home automation to discuss and compare our proposal.

Conclusions. Our proposed mechanism allows developers to instantiate different activation scope strategies and interfaces to decouple the declaration of activation mechanism conditionals from the base code.

Evaluations of Integrated Programming Environment for First-Year Students in Computer Engineering

A new paper has been accepted in the Journal of Universal Computer Science, where the authors are: Matias Salinas, Paul Leger, Hiroaki Fukuda, Nicolás Cardozo, Vannessa Duarte, and Ismael Figureoa (To appear). Here is the abstract:

Many factors influence the problems that currently exist in the learning-teaching process of programming. The use of an Integrated Development Environment (IDE) makes the experience a complicated process because these IDEs focus on professional programmers and not on novice learners. This also affects the classrooms of the university “Pontificia Universidad
Católica de Valpara ́ıso (PUCV)” (Chile). The use of professional IDEs negatively affects the learning process of first-year students who face the development of the algorithms for the first time. One of the IDE widely used for teaching programming courses is Code::Blocks, which is a tool for professional developers. Through a heuristic and usability evaluation, we found that Code::Blocks has a complex user interface and a functional overload. Using these two findings, as well as recommendations given during these tests, we highlight the important aspects that an IDE for novice learners should have. Taking into account previous observations and state-of-the-art/practice of IDEs, a functional IDE prototype, named Incre-IDLE , is developed. In addition to Code::Blocks evaluations, this paper reports the results of a heuristic and usability evaluation applied to first-year students at PUCV about functionalities provided by Incre-IDLE. These results suggest that Incre-IDLE has a simple interface, is easy to install and use, and does not have functional overload (i.e., spend a considerable amount of time learning the tool). Concretely, the results show that 66.7% of the students could complete tasks easily and 100% of them found the GUI intuitive. In terms of GUI, 83.3% considered the application interface “very simple”; and the text, concepts, and icons “very understandable” by 66.7%. The
students also found the tool “motivating” (66.7%) or “very motivating” (33.3%). These results closely match the findings obtained by the heuristic evaluation of Incre-IDLE from the experts: 83.3% of them rated it as “useful” or “very useful”, and only a 16.7% rated it as “useless”.

Evolution of a Haskell Repository and its Use of Monads: An Exploratory Study of Stackage

Our paper about the study of the evolution of Stackage, a curated repository for the Haskell language, has been accepted in the Proceedings of the 37th Annual ACM Symposium on Applied Computing.


Evolution of a Haskell Repository and its Use of Monads: An Exploratory Study of Stackage

Package repositories for a programming language are increasingly common. A repository can keep a register of the evolution of its packages. In the programming language Haskell, with its defining characteristic monads, we can find the Stackage repository, which is a curated repository for stable Haskell packages in the Hackage repository. Despite the widespread use of Stackage in its industrial target, we are not aware of much empirical research about how this repository has evolved, including the use of monads. This paper presents an empirical study that covers the evolution of fourteen Long-Term Support (LTS) releases (period 2014 – 2020) of available packages (12.46 gigabytes), including the use of monads from the mtl package that provides the standard monad core (e.g., state, reader, continuations). To the best of our knowledge, this is the first large-scale analysis of the evolution of the Stackage repository with regard to packages used and monads. Our findings show, for example, a growing trend of packages is depending on other packages whose versions are not available in a particular release of Stackage; opening a potential stability issue. Like previous studies, these results may evidence how developers use Haskell and give guidelines to Stackage maintainers.

Double Impact of Pragmatics on JCC 2020

Two papers are accepted at XXXIX International Conference of the Chilean Computer Science Society, SCCC’ 2020. Papers are:

  • Empirical Comparison of Supervised Algorithms for Ransomware Identification on Network Traffic. Carlos Manzano, Claudio Meneses, Paul Leger.
  • A Collaborative Learning Strategy in an MIS Development Course Using Case Method in Engineering in Information and Management ControlMargareth Cleveland, Paul Leger.

Special Edition on Information and Software Technology

Professor Paul Leger becomes a Guest Editor on the journal Information and Software Technology, which is a specialized software engineering journal in Elsevier (WoS-q2/SJR-q1).
This special issue is “Visualization applied to Software Engineering” and you can find more information on https://www.journals.elsevier.com/information-and-software-technology