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
01 Jan 1995
TL;DR: The transformations are presented as source to source transformations in a simple functional language so that by composing these simple and small high level transformations one can achieve most of the benefits of more complicated and specialised transformations.
Abstract: In this paper we describe the full set of local program transformations implemented in the Glasgow Haskell Compiler. The transformations are presented as source to source transformations in a simple functional language. The idea is that by composing these simple and small high level transformations one can achieve most of the benefits of more complicated and specialised transformations, many of which are often implemented as code generation optimisations.

24 citations

Proceedings ArticleDOI
11 Apr 2011
TL;DR: This paper proposes an automatic program transformation that transforms error-handling code into the Linux coding style, and applies this transformation to the Linux 2.6.34 kernel source code, on which it reorganizes the error handling code of over 1800 functions.
Abstract: The C language does not provide any abstractions for exception handling or other forms of error handling, leaving programmers to devise their own conventions for detecting and handling errors. The Linux coding style guidelines suggest placing error handling code at the end of each function, where it can be reached by gotos whenever an error is detected. This coding style has the advantage of putting all of the error-handling code in one place, which eases understanding and maintenance, and reduces code duplication. Nevertheless, this coding style is not always applied. In this paper, we propose an automatic program transformation that transforms error-handling code into this style. We have applied our transformation to the Linux 2.6.34 kernel source code, on which it reorganizes the error handling code of over 1800 functions, in about 25 minutes.

24 citations

Proceedings ArticleDOI
David F. Bacon1, Robert E. Strom
01 Apr 1991
TL;DR: A transparent program transformation which converts a sequential execution of S1; SZ by a procesl; in a multiprocess environment into an optimistic parallel execution of SI and S2, using the framework of guarded cornputatiow.
Abstract: We present a transparent program transformation which converts a sequential execution of S1; SZ by a procesl; in a multiprocess environment into an optimistic parallel execution of SI and S2. Such a transformation is valuable in the case where S1 and SZ cannot be para.llelized by static analysis either because S2 reads a value from S1 or because S1 and S2 each interact with an external process. The optimistic transformation works under a weaker set of conditions: (1) if the value Sz reads from S1 can usually, but not always, be correctly guessed ahead of time, and (2) if S1 and S2 interact with an external process, conflicts which violate the ordering of S1 and % are possible but rare. Practical applications of this approach include executing the likely outcome of a test in pwdlel with making the test, and converting sequences of calls into streams of asynchronous sends. We analyze the problem using the framework of guarded cornputatiow, in which each computation is tagged with the set of guesses on which it depends. We present an algorithm for managing communications, thread creation, committing, and aborting in the transformed program. We contrast our approach with related work.

24 citations

Book ChapterDOI
26 Aug 2004
TL;DR: An analysis for detecting procedures and goals that are deterministic, or predicates whose clause tests are mutually exclusive (which implies that at most one of their clauses will succeed) even if they are not deterministic (because they call other predicates that can produce more than one solution).
Abstract: We propose an analysis for detecting procedures and goals that are deterministic (i.e. that produce at most one solution), or predicates whose clause tests are mutually exclusive (which implies that at most one of their clauses will succeed) even if they are not deterministic (because they call other predicates that can produce more than one solution). Applications of such determinacy information include detecting programming errors, performing certain high-level program transformations for improving search efficiency, optimizing low level code generation and parallel execution, and estimating tighter upper bounds on the computational costs of goals and data sizes, which can be used for program debugging, resource consumption and granularity control, etc. We have implemented the analysis and integrated it in the CiaoPP system, which also infers automatically the mode and type information that our analysis takes as input. Experiments performed on this implementation show that the analysis is fairly accurate and efficient.

24 citations

Journal Article
TL;DR: Hat as discussed by the authors is a tool for generating a trace of a computation of a Haskell 98 program and viewing such a trace in various different ways, such as program comprehension and debugging, using a stand-alone program transformation.
Abstract: Hat is a programmer's tool for generating a trace of a computation of a Haskell 98 program and viewing such a trace in various different ways. Applications include program comprehension and debugging. A new version of Hat uses a stand-alone program transformation to produce self-tracing Haskell programs. The transformation is small and works with any Haskell 98 compiler that implements the standard foreign function interface. We present general techniques for building compiler independent tools similar to Hat based on program transformation. We also point out which features of Haskell 98 caused us particular grief.

24 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