151 research outputs found
Trustworthy Refactoring via Decomposition and Schemes: A Complex Case Study
Widely used complex code refactoring tools lack a solid reasoning about the
correctness of the transformations they implement, whilst interest in proven
correct refactoring is ever increasing as only formal verification can provide
true confidence in applying tool-automated refactoring to industrial-scale
code. By using our strategic rewriting based refactoring specification
language, we present the decomposition of a complex transformation into smaller
steps that can be expressed as instances of refactoring schemes, then we
demonstrate the semi-automatic formal verification of the components based on a
theoretical understanding of the semantics of the programming language. The
extensible and verifiable refactoring definitions can be executed in our
interpreter built on top of a static analyser framework.Comment: In Proceedings VPT 2017, arXiv:1708.0688
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
Invertible Program Restructurings for Continuing Modular Maintenance
When one chooses a main axis of structural decompostion for a software, such
as function- or data-oriented decompositions, the other axes become secondary,
which can be harmful when one of these secondary axes becomes of main
importance. This is called the tyranny of the dominant decomposition. In the
context of modular extension, this problem is known as the Expression Problem
and has found many solutions, but few solutions have been proposed in a larger
context of modular maintenance. We solve the tyranny of the dominant
decomposition in maintenance with invertible program transformations. We
illustrate this on the typical Expression Problem example. We also report our
experiments with Java and Haskell programs and discuss the open problems with
our approach.Comment: 6 pages, Early Research Achievements Track; 16th European Conference
on Software Maintenance and Reengineering (CSMR 2012), Szeged : Hungary
(2012
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
Refactoring = Substitution + Rewriting
We present an approach to describing refactorings that abstracts away from
particular refactorings to classes of similar transformations, and presents an
implementation of these that works by substitution and subsequent rewriting.
Substitution is language-independent under this approach, while the rewrites
embody language-specific aspects. Intriguingly, it also goes back to work on
API migration by Huiqing Li and the first author, and sets refactoring in that
general context.Comment: 6p
Towards Trustworthy Refactoring in Erlang
Tool-assisted refactoring transformations must be trustworthy if programmers
are to be confident in applying them on arbitrarily extensive and complex code
in order to improve style or efficiency. We propose a simple, high-level but
rigorous, notation for defining refactoring transformations in Erlang, and show
that this notation provides an extensible, verifiable and executable
specification language for refactoring. To demonstrate the applicability of our
approach, we show how to define and verify a number of example refactorings in
the system.Comment: In Proceedings VPT 2016, arXiv:1607.0183
Proving renaming for Haskell via dependent types : a case-study in refactoring soundness
We present a formally verified refactoring framework for a subset of Haskell 98. Our framework is implemented in the dependently-typed language, Idris, which allows us to encode soundness proofs as an integral part of the implementation. We give the formal definition of our static semantics for our Haskell 98 subset, which we encode as part of the AST, ensuring that only well-formed programs may be represented and transformed. This forms a foundation upon which refactorings can be formally specified. We then define soundness of refactoring implementations as conformity to their specification. We demonstrate our approach via renaming, a canonical and well-understood refactoring, giving its implementation alongside its formal specification and soundness proof.Postprin
Views, Program Transformations, and the Evolutivity Problem in a Functional Language
We report on an experience to support multiple views of programs to solve the
tyranny of the dominant decomposition in a functional setting. We consider two
possible architectures in Haskell for the classical example of the expression
problem. We show how the Haskell Refactorer can be used to transform one view
into the other, and the other way back. That transformation is automated and we
discuss how the Haskell Refactorer has been adapted to be able to support this
automated transformation. Finally, we compare our implementation of views with
some of the literature.Comment: 19 page
- …