scispace - formally typeset
Search or ask a question

Showing papers on "Program transformation published in 1983"


Proceedings ArticleDOI
24 Jan 1983
TL;DR: This paper presents a method for systematically converting control dependences to data dependences in this fashion by eliminating goto statements and introducing logical variables to control the execution of statements in the program.
Abstract: Program analysis methods, especially those which support automatic vectorization, are based on the concept of interstatement dependence where a dependence holds between two statements when one of the statements computes values needed by the other. Powerful program transformation systems that convert sequential programs to a form more suitable for vector or parallel machines have been developed using this concept [AllK 82, KKLW 80].The dependence analysis in these systems is based on data dependence. In the presence of complex control flow, data dependence is not sufficient to transform programs because of the introduction of control dependences. A control dependence exists between two statements when the execution of one statement can prevent the execution of the other. Control dependences do not fit conveniently into dependence-based program translators.One solution is to convert all control dependences to data dependences by eliminating goto statements and introducing logical variables to control the execution of statements in the program. In this scheme, action statements are converted to IF statements. The variables in the conditional expression of an IF statement can be viewed as inputs to the statement being controlled. The result is that control dependences between statements become explicit data dependences expressed through the definitions and uses of the controlling logical variables.This paper presents a method for systematically converting control dependences to data dependences in this fashion. The algorithms presented here have been implemented in PFC, an experimental vectorizer written at Rice University.

616 citations


Journal ArticleDOI
TL;DR: This paper reviews and classifies transformation systems and is intended to acquaint the reader with the current state of the art and provide a basis for comparing the different approaches.
Abstract: Interest is increasing in the transformational approach to programming and in mechanical aids for supporting the program development process. Available aids range from simple editorlike devices to rather powerful interactive transformation systems and even to automatic synthesis tools. This paper reviews and classifies transformation systems and is intended to acquaint the reader with the current state of the art and provide a basis for comparing the different approaches. It is also designed to provide easy access to specific details of the various methodologies.

365 citations


Journal ArticleDOI
TL;DR: This report discusses the documentation requirements of the development process and describes a prototype system for constructing and maintaining this documentation information and indicates the many remaining open issues and the direction to be taken in the pursuit of solutions.
Abstract: : Automated program transformation systems are emerging as the basis for a new programming methodology in which high-level, understandable specifications are transformed into efficient programs. Subsequent modification of the original specification will be dealt with by reimplementation of the specification. For such a system to be practical, these reimplementations must occur relatively quickly and reliably, in comparison with the original implementation. We believe the reimplementation requirement necessitates that a formal document--the program development--be constructed during the development process to explain the resulting implementation to future maintainters of the specification. The overall goal of our work has been to develop a language for capturing and explaining these developments and the resulting implementations. This language must be capable of expressing: the implementor's goal structure, all program manipulations necessary for implementation and optimization, and plans of such optimizations. In this report, we discuss the documentation requirements of the development process and then describe a prototype system for constructing and maintaining this documentation information. Finally, we indicate the many remaining open issues and the direction to be taken in the pursuit of solutions. (Author)

137 citations


01 Sep 1983
TL;DR: A program transformation technique for programs in a general stream language L whereby a data-driven Evaluation of the transformed program performs exactly the same computation as a demand-driven evaluation of the original program.
Abstract: : This document describes a program transformation technique for programs in a general stream language L whereby a data-driven evaluation of the transformed program performs exactly the same computation as a demand-driven evaluation of the original program. The transformational technique suggests a simple denotational characterization of demand-driven evaluation. (Author)

26 citations


Book ChapterDOI
01 Jan 1983
TL;DR: This methodology and its formal foundations are outlined and a number of sorting programs are developed along these lines leading to a decision tree of the program family of different sorting programs.
Abstract: The construction of a program is considered as a process consisting of a sequence of formal steps. Each step is characterized by a particular transformation rule. In general, the development starts with a formal specification and ends with an efficient program. In the first part of this paper this methodology and its formal foundations are briefly outlined. In the second part a number of sorting programs is developed along these lines leading to a decision tree of the program family of different sorting programs.

21 citations


Book ChapterDOI
01 Jan 1983
TL;DR: This paper considers this transformation process in some detail and uses it to exemplify the ideas on structuring program transformations and the sort of systems that are being developed.
Abstract: Program transformation offers a systematic way of developing correct and efficient programs from specifications. The formal system, outlined in Burstall and Darlington [1977], that has become known as the unfold/fold system, offers a very simple formal base which is nevertheless capable of achieving a wide class of transformations. However significant transformations expressed solely in terms of these rules became too complex to be communicated or achieved by a system. To overcome these problems we are developing a transformation meta-language that allows transformations to be explicated in a structured way without removing the formal base of these transformations. Constructs in this meta-language consist of higher level transformation processes or tactics such as combine loops, remove recursion or re-use storage. These are ultimately expressible in terms of the unfold/fold steps but provide a richer vocabulary for communicating transformation plans either to man or machine. One of the more useful of these tactics is one that enables implementations for abstract data types to be synthesised automatically. In this paper we consider this transformation process in some detail and use it to exemplify our ideas on structuring program transformations and the sort of systems that we envisage being developed.

11 citations


Journal ArticleDOI
TL;DR: A program transformation strategy called meta-shifting is developed for control optimization of programs written in languages with control freedom, which simulates (approximately) normal order evaluation of the original program, under interpreters with arbitrary evaluation order.
Abstract: A program transformation strategy called meta-shifting is developed for control optimization of programs written in languages with control freedom. The strategy involves writing a specialized evaluator for each program (segment) with specific control. It is applied to an equational language to derive a general method to transform one program into another, which simulates (approximately) normal order evaluation of the original program, under interpreters with arbitrary evaluation order.

6 citations


Journal Article
TL;DR: It is shown that a lazy progam can be associated with any LD program and the concept of safe LD programs which were LD programs that performed a bounded amount of extra computation over that performed by their corresponding lazy programs are explored.
Abstract: : In Part I of this paper, we presented a scheme whereby a compiler could propagate demands through programs in a powerful stream language L. A data-driven evaluation of the transformed program performed exactly the same computation as a demand-driven evaluation of the original program. In this paper, we explore a different transformation which trades the complexity of demand propagation for a bounded amount of extra computation on some data lines. We showed that a lazy progam can be associated with any LD program and explored the concept of safe LD programs which were LD programs that performed a bounded amount of extra computation over that performed by their corresponding lazy programs. Since the set of safe programs is not closed under composition, we defined strongly-safe programs as being that subset of safe programs which is closed under composition. A class of strongly-safe programs is the set of all LD programs that are safe and input-output equivalent to their corresponding lazy programs.

5 citations


Proceedings Article
08 Aug 1983
TL;DR: The scheme of program transformation presented here involves finding the solution of the given linear equation and transforming this solution and the task of transforming right-associative sequence programs into left associative ones is reduced.
Abstract: In this paper is presented a technique for transforming a class of recursive equations called linear equations into iterative equations. Linear equations are characterized by involving at the most one recursive call for any invocation. In contrast to the conventional techniques, the scheme of program transformation presented here involves finding the solution of the given linear equation and transforming this solution. The solutions of linear equations can always be expressed using a construct called abstract sequence. Two classes of abstract sequence programs are identified: right-associative and left-associative sequence programs. The former are obtained by solving linear equations and the latter correspond to iterative programs. The task of transforming linear recursive programs into iterative programs is thus reduced to the task of transforming right-associative sequence programs into left associative ones. Various transformation rules are developed based on an algebra of functional programs.

4 citations


Book ChapterDOI
28 Mar 1983
TL;DR: This paper is based on the view that the main stage of compilation, the code generation phase, has very much in common with the simplification of algebraic expressions.
Abstract: This paper is based on the view that the main stage of compilation, the code generation phase, has very much in common with the simplification of algebraic expressions. The compiler is seen as symbolic program manipulator, the so-called intermediary language as data-structure (a combination of tree structures and symbol table) to store programs which is convenient for executing simplification, decomposition and optimization steps. The main aspect of code generation is decomposition leading to a program which is still using constructs of the source language but without any composed parts. It is based on a few operations on the internal data-structure-representation of the source program.

1 citations


Book ChapterDOI
01 Jan 1983
TL;DR: The use of non-determinism in the early stages of the development of traditional, sequential programs is advocated as an aid to avoiding the pitfalls of premature decision making as discussed by the authors.
Abstract: An attempt is made to identify the most important decisions which arise in the processes of program synthesis and program transformation by analysing in detail the steps involved in designing two classical algorithms — binary search and Dijkstra’s shortest path algorithm. The use of non-determinism in the early stages of the development of traditional, sequential programs is advocated as an aid to avoiding the pitfalls of premature decision making. Dynamic programming is then suggested as a technique for evaluating nondeterministic decisions and its use illustrated by the proof of the optimality of binary search in the worst and average cases and by developing an optimal gcd algorithm.