scispace - formally typeset
Search or ask a question
Topic

Program transformation

About: Program transformation is a research topic. Over the lifetime, 2468 publications have been published within this topic receiving 73415 citations.


Papers
More filters
Book ChapterDOI
20 Sep 1995
TL;DR: This paper identifies and clarifies foundational issues involved in multi-level metasystem hierarchies and makes connections between logic programming and metacomputation.
Abstract: Self-applicable partial evaluators have been used for more than a decade for generating compilers and other program generators, but it seems hard to reason about the mechanics of hierarchies of program transformers and to describe applications that go beyond the ‘classical’ Futamura projections. This paper identifies and clarifies foundational issues involved in multi-level metasystem hierarchies. After studying the role of abstraction, encoding, and metasystem transition, the Futamura projections are reexamined and problems of their practical realization are discussed. Finally, preliminary results using a multi-level metaprogramming environment for self-application are reported. Connections between logic programming and metacomputation are made.

12 citations

Book ChapterDOI
28 Nov 2001
TL;DR: In this paper, the authors present a source-level profiler for multi-paradigm declarative languages which integrate features from functional and logic programming, such as Curry.
Abstract: We present the basis of a source-level profiler for multiparadigm declarative languages which integrate features from (lazy) functional and logic programming. Our profiling scheme is symbolic in the sense that it is independent of the particular language implementation. This is achieved by counting the number of basic operations performed during the execution of program calls, e.g., the number of unfolding steps, the number of matching operations, etc. The main contribution of this paper is the formal specification of the attribution of execution costs to cost centers, which is particularly difficult in the context of lazy languages. A prototype implementation of the symbolic profiler has been undertaken for the multi-paradigm language Curry. Preliminary results demonstrate the practicality of our approach and its applications in the field of program transformation.

12 citations

Proceedings ArticleDOI
04 Dec 2001
TL;DR: This paper presents the automata-based testing environment for Java multi-thread programs, and design and implement key components-automata generator, program transformer and replay controller, and proposes a program transformation method to guide a program to be executed according to the sequence accepted by the automaton.
Abstract: Deterministic execution testing has been considered a promising method for concurrent program testing because of its reproducibility. However, since deterministic execution requires that a synchronization sequence to be replayed is feasible and valid, it is not directly applicable to a situation in which synchronization sequences, being valid but infeasible, are taken into account. To resolve this problem, we proposed automata-based testing in previous work, where a concurrent program is executed according to one sequence accepted by the automaton recognizing all sequences semantically equivalent to a given sequence. In this paper, we present the automata-based testing environment for Java multi-thread programs, and design and implement key components-automata generator, program transformer and replay controller. Algorithms for generating the equivalence automaton of a given sequence are presented and a program transformation method is suggested in order to guide a program to be executed according to the sequence accepted by the automaton. The replay controller is also redesigned and implemented to adopt the automaton. By illustrating automata-based testing procedures with the gas station example, we show how the proposed approach works in Java multi-threaded programs.

12 citations

Book ChapterDOI
Wim Vanhoof1
26 Aug 2004
TL;DR: An analysis that searches for semantically equivalent code fragments within a given logic program and formally characterize three situations of duplicated functionality and their associated refactorings: the extraction of a duplicated goal into a new predicate, the removal of equivalent predicates and the generalization of two predicates into a higher-order predicate.
Abstract: In this work, we devise an analysis that searches for semantically equivalent code fragments within a given logic program. The presence of duplicated code (or functionality) is a primary indication that the design of the program can be improved by performing a so-called refactoring transformation. Within the framework of our analysis, we formally characterize three situations of duplicated functionality and their associated refactorings: the extraction of a duplicated goal into a new predicate, the removal of equivalent predicates and the generalization of two predicates into a higher-order predicate. The resulting analysis detects in a completely automatic way what program fragments are suitable candidates for the considered refactoring transformations.

12 citations

Journal ArticleDOI
TL;DR: This paper reflects on the experience of building tools to refactor functional programs written in Haskell (HaRe) and Erlang (Wrangler) and draws some general conclusions, some of which apply particularly to functional languages, while many others are of general value.
Abstract: Refactoring is the process of changing the design of a program without changing what it does. Typical refactorings, such as function extraction and generalisation, are intended to make a program more amenable to extension, more comprehensible and so on. Refactorings differ from other sorts of program transformation in being applied to source code, rather than to a ‘core’ language within a compiler, and also in having an effect across a code base, rather than to a single function definition, say. Because of this, there is a need to give automated support to the process. This paper reflects on our experience of building tools to refactor functional programs written in Haskell (HaRe) and Erlang (Wrangler). We begin by discussing what refactoring means for functional programming languages, first in theory, and then in the context of a larger example. Next, we address system design and details of system implementation as well as contrasting the style of refactoring and tooling for Haskell and Erlang. Building both tools led to reflections about what particular refactorings mean, as well as requiring analyses of various kinds, and we discuss both of these. We also discuss various extensions to the core tools, including integrating the tools with test frameworks; facilities for detecting and eliminating code clones; and facilities to make the systems extensible by users. We then reflect on our work by drawing some general conclusions, some of which apply particularly to functional languages, while many others are of general value.

12 citations


Network Information
Related Topics (5)
Model checking
16.9K papers, 451.6K citations
92% related
Compiler
26.3K papers, 578.5K citations
88% related
Programming paradigm
18.7K papers, 467.9K citations
87% related
Executable
24K papers, 391.1K citations
86% related
Component-based software engineering
24.2K papers, 461.9K citations
86% related
Performance
Metrics
No. of papers in the topic in previous years
YearPapers
20234
202218
202126
202042
201956
201836