2,885 research outputs found
Towards sound refactoring in erlang
Erlang is an actor-based programming
language used extensively for building concurrent, reactive
systems that are highly available and suff er minimum
downtime. Such systems are often mission critical, making
system correctness vital. Refactoring is code restructuring
that improves the code but does not change
behaviour. While using automated refactoring tools is
less error-prone than performing refactorings manually,
automated refactoring tools still cannot guarantee that
the refactoring is correct, i.e., program behaviour is preserved.
This leads to lack of trust in automated refactoring
tools. We rst survey solutions to this problem
proposed in the literature. Erlang refactoring tools as
commonly use approximation techniques which do not
guarantee behaviour while some other works propose the
use of formal methodologies. In this work we aim to
develop a formal methodology for refactoring Erlang
code. We study behavioural preorders, with a special focus
on the testing preorder as it seems most suited to
our purpose.peer-reviewe
Renaming Global Variables in C Mechanically Proved Correct
Most integrated development environments are shipped with refactoring tools.
However, their refactoring operations are often known to be unreliable. As a
consequence, developers have to test their code after applying an automatic
refactoring. In this article, we consider a refactoring operation (renaming of
global variables in C), and we prove that its core implementation preserves the
set of possible behaviors of transformed programs. That proof of correctness
relies on the operational semantics of C provided by CompCert C in Coq.Comment: In Proceedings VPT 2016, arXiv:1607.0183
Property-Based Testing - The ProTest Project
The ProTest project is an FP7 STREP on property based testing. The purpose of the project is to develop software engineering approaches to improve reliability of service-oriented networks; support fault-finding and diagnosis based on specified properties of the system. And to do so we will build automated tools that will generate and run tests, monitor execution at run-time, and log events for analysis.
The Erlang / Open Telecom Platform has been chosen as our initial implementation vehicle due to its robustness and reliability within the telecoms sector. It is noted for its success in the ATM telecoms switches by Ericsson, one of the project partners, as well as for multiple other uses such as in facebook, yahoo etc. In this paper we provide an overview of the project goals, as well as detailing initial progress in developing property based testing techniques and tools for the concurrent functional programming language Erlang
Safe Concurrency Introduction through Slicing
Traditional refactoring is about modifying the structure of existing code without changing its behaviour, but with the aim of making code easier to understand, modify, or reuse. In this paper, we introduce three novel refactorings for retrofitting concurrency to Erlang applications, and demonstrate how the use of program slicing makes the automation of these refactorings possible
Deuce: A Lightweight User Interface for Structured Editing
We present a structure-aware code editor, called Deuce, that is equipped with
direct manipulation capabilities for invoking automated program
transformations. Compared to traditional refactoring environments, Deuce
employs a direct manipulation interface that is tightly integrated within a
text-based editing workflow. In particular, Deuce draws (i) clickable widgets
atop the source code that allow the user to structurally select the
unstructured text for subexpressions and other relevant features, and (ii) a
lightweight, interactive menu of potential transformations based on the current
selections. We implement and evaluate our design with mostly standard
transformations in the context of a small functional programming language. A
controlled user study with 21 participants demonstrates that structural
selection is preferred to a more traditional text-selection interface and may
be faster overall once users gain experience with the tool. These results
accord with Deuce's aim to provide human-friendly structural interactions on
top of familiar text-based editing.Comment: ICSE 2018 Paper + Supplementary Appendice
Quantitative Assessment of the Impact of Automatic Static Analysis Issues on Time Efficiency
Background: Automatic Static Analysis (ASA) tools analyze source code and look for code patterns (aka smells) that might cause defective behavior or might degrade other dimensions of software quality, e.g. efficiency. There are many potentially negative code patterns, and ASA tools typically report a huge list of them even in small programs. Moreover, so far, little evidence is available about the negative impact on performance of code patterns identified by such tools. A consequence is that programmers cannot appreciate the benefits of ASA tools and tend not to include them in their workflow. Aims: Quantitatively assess the impact of issues signaled by ASA tools on time efficiency. Method: We select 20 issues and for each of them we set up two source code fragments: one containing the issue and the corresponding refactored version, functionally identical but without the issue. We set up three different platforms, isolated from network and other user programs, then we execute the code fragments, and measure the execution time of both code versions. Results: We find that eleven issues have an actual negative impact on performance. We also compute for each issue an estimation for the delay provoked by a single execution. Conclusions: We produce a set of issues with a verified negative impact on performance. They can be checked easily with an analysis tool and code can be refactored to obtain a provably more efficient code. We also provide the estimated delay cost of each issue in the environments where we conduct the tests. These results can be improved with the help of other researchers: repeating the tests in several platforms would make it possible to build up a wider benchmar
A Framework for Datatype Transformation
We study one dimension in program evolution, namely the evolution of the
datatype declarations in a program. To this end, a suite of basic
transformation operators is designed. We cover structure-preserving
refactorings, but also structure-extending and -reducing adaptations. Both the
object programs that are subject to datatype transformations, and the meta
programs that encode datatype transformations are functional programs.Comment: Minor revision; now accepted at LDTA 200
Structured Review of Code Clone Literature
This report presents the results of a structured review of code clone literature. The aim of the review is to assemble a conceptual model of clone-related concepts which helps us to reason about clones. This conceptual model unifies clone concepts from a wide range of literature, so that findings about clones can be compared with each other
- โฆ