35 research outputs found

    Practical use of static composition of refactoring operations

    Get PDF
    6 pagesInternational audienceRefactoring tools are commonly used for remodularization tasks. Basic refactoring operations are combined to perform complex program transformations, but the resulting composed operations are rarely reused, even partially, because popular tools have few support for composition. In this paper, we recast two calculus for static composition of refactorings in a type system framework and we discuss their use for inferring useful properties. We illustrate the value of support for static composition in refactoring tools with a complex remodularization use case: a round-trip transformation between programs conforming to the Composite and Visitor patterns

    Program Transformation based Views for Modular Maintenance

    Get PDF
    PosterNational audienceModular programming is a practical solution for separation of concerns but the support for modularity provided by programming languages does not resolve the classic expression problem and more generally the tyranny of the dominant decomposition: evolutions are modular only on the principal axis of decomposition. To solve this problem, a practical solution would be to be able to choose the architecture of an application each time one has to make it evolve. We provide a prototype tool for the Haskell language to support that. Our tool allows to build transformations to switch Haskell programs from one structure to another. We do this by driving a refactoring tool for Haskell (HaRe): transformations are built by chaining elementary operations of refactoring. Since each elementary refactoring operation preserve the semantics, the whole transformations also do

    Invertible Program Restructurings for Continuing Modular Maintenance

    Get PDF
    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

    Get PDF
    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

    Views, Program Transformations, and the Evolutivity Problem in a Functional Language

    Get PDF
    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

    Refactoring = Substitution + Rewriting: Towards Generic, Language-Independent Refactorings

    Get PDF

    Synthesis of OCL Pre-conditions for Graph Transformation Rules

    Get PDF
    Proceedings of: Third International Conference on Model Transformation (ICMT 2010): Theory and Practice of Model Transformation. Málaga, Spain, 28 June-02 July, 2010Graph transformation (GT) is being increasingly used in Model Driven Engineering (MDE) to describe in-place transformations like animations and refactorings. For its practical use, rules are often complemented with OCL application conditions. The advancement of rule post-conditions into pre-conditions is a well-known problem in GT, but current techniques do not consider OCL. In this paper we provide an approach to advance post-conditions with arbitrary OCL expressions into pre-conditions. This presents benefits for the practical use of GT in MDE, as it allows: (i) to automatically derive pre-conditions from the meta-model integrity constraints, ensuring rule correctness, (ii) to derive pre-conditions from graph constraints with OCL expressions and (iii) to check applicability of rule sequences with OCL conditions.Work funded by the Spanish Ministry of Science and Innovation through projects “Design and construction of a Conceptual Modeling Assistant” (TIN2008-00444/TIN - Grupo Consolidado), “METEORIC” (TIN2008-02081),mobility grants JC2009-00015 and PR2009-0019, and the R&D program of the Community of Madrid (S2009/TIC-1650, project “e-Madrid”).Publicad

    A Study on Developer Perception of Transformation Languages for Refactoring

    Get PDF
    Although there is much research advancing state-of-art of program transformation tools, their application in industry source code change problems has not yet been gauged. In this context, the purpose of this paper is to better understand developer familiarity and comfort with these languages by conducting a survey. It poses, and answers, four research questions to understand how frequently source code transformation languages are applied to refactoring tasks, how well-known these languages are in industry, what developers think are obstacles to adoption, and what developer refactoring habits tell us about their current use, or underuse, of transformation languages. The results show that while source code transformation languages can fill a needed niche in refactoring, research must motivate their application. We provide explanations and insights based on data, aimed at the program transformation and refactoring communities, with a goal to motivate future research and ultimately improve industry adoption of transformation languages for refactoring tasks

    Refactoring = Substitution + Rewriting: Towards Generic, Language-Independent Refactorings

    Get PDF
    Eelco Visser’s work has always encouraged stepping back from the particular to look at the underlying, conceptual problems. In that spirit 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
    corecore