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 published on a yearly basis
Papers
More filters
••
08 Oct 2014TL;DR: As processors gain in complexity and heterogeneity, compilers are asked to perform program transformations of ever-increasing complexity to effectively map an input program to the target hardware.
Abstract: As processors gain in complexity and heterogeneity, compilers are asked to perform program transformations of ever-increasing complexity to effectively map an input program to the target hardware. It is critical to develop methods and tools to automatically assert the correctness of programs generated by such modern optimizing compilers.
25 citations
••
07 Feb 2015TL;DR: Thorin is presented: a higher-order, functional IR based on continuation-passing style that abandons explicit scope nesting in favor of a dependency graph that makes Thorin an attractive IR for both imperative as well as functional languages.
Abstract: Many modern programming languages support both imperative and functional idioms. However, state-of-the-art imperative intermediate representations (IRs) cannot natively represent crucial functional concepts (like higher-order functions). On the other hand, functional IRs employ an explicit scope nesting, which is cumbersome to maintain across certain transformations. In this paper we present Thorin: a higher-order, functional IR based on continuation-passing style that abandons explicit scope nesting in favor of a dependency graph. This makes Thorin an attractive IR for both imperative as well as functional languages. Furthermore, we present a novel program transformation to eliminate the overhead caused by higher-order functions. The main component of this transformation is lambda mangling: an important transformation primitive in Thorin. We demonstrate that lambda mangling subsumes many classic program transformations like tail-recursion elimination, loop unrolling or (partial) inlining. In our experiments we show that higher-order programs translated with Thorin are consistently as fast as C programs.
25 citations
••
17 Oct 2010TL;DR: A general framework for optimizing the monitoring of loops relative to a property is presented, which allows monitors to process a loop in constant-time rather than time that is proportional to the number of loop iterations.
Abstract: There has been significant interest in equipping programs with runtime checks aimed at detecting errors to improve fault detection during testing and in the field. Recent work in this area has studied methods for efficiently monitoring a program execution's conformance to path property specifications, e.g., such as those captured by a finite state automaton. These techniques show great promise, but their broad applicability is hampered by the fact that for certain combinations of programs and properties the overhead of checking can slow the program down by up to 3500%.We have observed that, in many cases, the overhead of runtime monitoring is due to the behavior of program loops. We present a general framework for optimizing the monitoring of loops relative to a property. This framework allows monitors to process a loop in constant-time rather than time that is proportional to the number of loop iterations. We present the results of an empirical study that demonstrates that significant overhead reduction that can be achieved by applying the framework to monitor properties of several large Java programs.
25 citations
••
07 Sep 2009TL;DR: Tidier is a software tool that tidies Erlang source code, making it cleaner, simpler, and often also more efficient, and a set of refactorings which are general enough to be applied to the source code of programs written in Haskell or Clean and possibly even in non-functional languages.
Abstract: This paper describes the design goals and current status of tidier, a software tool that tidies Erlang source code, making it cleaner, simpler, and often also more efficient. In contrast to other refactoring tools, tidier is completely automatic and is not tied to any particular editor or IDE. Instead, tidier comes with a suite of code transformations that can be selected by its user via command-line options and applied in bulk on a set of modules or entire applications using a simple command. Alternatively, users can use tidier's GUI to inspect one by one the transformations that will be performed on their code and manually select only those that they fancy. We have used tidier to clean up various applications of Erlang/OTP and have tested it on many open source Erlang code bases of significant size. We briefly report our experiences and show opportunities for tidier's current set of transformations on existing Erlang code out there. As a by-product, our paper also documents what we believe are good coding practices in Erlang. Last but not least, our paper describes in detail the automatic code cleanup methodology we advocate and a set of refactorings which are general enough to be applied, as is or with only small modifications, to the source code of programs written in Haskell or Clean and possibly even in non-functional languages.
25 citations
••
01 Apr 1991TL;DR: The result is a modular and efficient algorithm, which avoids a too excessive introduction of trivial redefinitions along the hnes of [RWZ], and is RWZ-optimal for arbitrary flow graphs.
Abstract: Common subexpression elimination, partia] redundancy elimination and loop invariant code motion, are all instances of the same general run-time optimization problem: how to optimally place computations within a program. In [SKR1] we presented a modular algorithm for this problem, which optimally moves computations within programs wrt Herbrand equivalence. In this paper we consider two elaborations of this algorithm~ which are dealt with in Part I and Part II, respectively. Part I deals with the problem that the full variant of the algorithm of [SKR1] may excessively introduce trivial redefinitions of registers in order to cover a single computation. Rosen, Wegman • and Zadeck avoided such a too excessive introduction of trivial redefinitions by means of some practically oriented restrictions, and they proposed an effffcient algorithm, which optimally moves the computations of acyclic flow graphs under these additional constraints (the algorithm is "RWZoptimal" for acyclic flow graphs) [I~WZ]. Here we adapt our algorithm to this notion of optimaiity. The result is a modular and efficient algorithm, which avoids a too excessive introduction of trivial redefinitions along the hnes of [RWZ], and is RWZ-optimal for arbitrary flow graphs. Part II modularly extends the algorithm of [SKR1] in order to additionally cover strength reduction. This extension generalizes and improves all classical techniques for strength reduction in that it overcomes their structural restrictions concerning admissible program structures (e.g. previously determined loops) and admissible term structures (e.g. terms built of induction variables and region constants). Additiona~y, the program transformation obtained by our algorithm is guaranteed to be safe and to improve run-time efficiency. Both properties are not guaranteed by previous techniques.
25 citations