Program Derivation by Fixed Point Computation

Abstract This paper develops a transformational paradigm by which nonnumerical algorithms are treated as fixed point computations derived from very high level problem specifications. We begin by presenting an abstract functional problem specification language SQ+, which is shown to express any partial recursive function in a fixed point normal form. Next, we give a nondeterministic iterative schema that in the case of finite iteration generalizes the “chaotic iteration” of Cousot and Cousot for computing fixed points of monotone functions efficiently. New techniques are discussed for recomputing fixed points of distributive functions efficiently. Numerous examples illustrate how these techniques for computing and recomputing fixed points can be incorporated within a transformational programming methodology to facilitate the design and verification of nonnumerical algorithms.

[1]  Edmond Schonberg,et al.  Programming by Refinement, as Exemplified by the SETL Representation Sublanguage , 1979, TOPL.

[2]  Thomas W. Reps,et al.  Incremental Context-Dependent Analysis for Language-Based Editors , 1983, TOPL.

[3]  Dana S. Scott,et al.  Data Types as Lattices , 1976, SIAM J. Comput..

[4]  Rodney Farrow Automatic generation of fixed-point-finding evaluators for circular, but well-defined, attribute grammars , 1986, SIGPLAN '86.

[5]  Jacob T. Schwartz,et al.  Optimization of Very High Level Languages - I. Value Transmission and Its Corollaries , 1975, Comput. Lang..

[6]  Thomas Reps,et al.  Programming Techniques and Data Structures , 1981 .

[7]  Friedrich L. Bauer,et al.  Algorithmic Language and Program Development , 1982, Texts and Monographs in Computer Science.

[8]  Michel Sintzoff Calculating properties of programs by valuations on specific models , 1972 .

[9]  Jacob T. Schwartz,et al.  Automatic data structure choice in a language of very high level , 1975, CACM.

[10]  Jeffrey F. Naughton,et al.  Minimizing function-free recursive inference rules , 1989, JACM.

[11]  Stuart C. Shapiro,et al.  Using Active Connection Graphs for Reasoning with Recursive Rules , 1981, IJCAI.

[12]  Patrick Cousot,et al.  Automatic synthesis of optimal invariant assertions: Mathematical foundations , 1977, Artificial Intelligence and Programming Languages.

[13]  Peter Aczel,et al.  An Introduction to Inductive Definitions , 1977 .

[14]  Robert Paige,et al.  Transformational programming: applications to algorithms and systems , 1983, POPL '83.

[15]  David Harel,et al.  A Programming Language for the Inductive Sets, and Applications , 1984, Inf. Control..

[16]  Neil Immerman,et al.  Relational Queries Computable in Polynomial Time , 1986, Inf. Control..

[17]  Robert Paige,et al.  Finite Differencing of Computable Expressions , 1982, TOPL.

[18]  Jeffrey D. Ullman,et al.  Implementation of logical query languages for databases , 1985, TODS.

[19]  G. Grätzer General Lattice Theory , 1978 .

[20]  John H. Reif,et al.  Symbolic evaluation and the global value graph , 1977, POPL.

[21]  Jeffrey D. Ullman,et al.  A Simple Algorithm for Global Data Flow Analysis Problems , 1975, SIAM J. Comput..

[22]  John E. Hopcroft,et al.  An n log n algorithm for minimizing states in a finite automaton , 1971 .

[23]  Allen Goldberg,et al.  Stream processing , 1984, LFP '84.

[24]  Gary A. Kildall,et al.  A unified approach to global program optimization , 1973, POPL.

[25]  John W. Backus,et al.  Can programming be liberated from the von Neumann style?: a functional style and its algebra of programs , 1978, CACM.

[26]  Ken Kennedy,et al.  An algorithm for reduction of operator strength , 1977, Commun. ACM.

[27]  Jacob T. Schwartz,et al.  On programming : an interim report on the SETL Project , 1973 .

[28]  P. Cousot,et al.  Constructive versions of tarski's fixed point theorems , 1979 .

[29]  Robert Paige,et al.  Binding performance at language design time , 1987, POPL '87.

[30]  Alfred V. Aho,et al.  Universality of data retrieval languages , 1979, POPL.

[31]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[32]  Lawrence J. Henschen,et al.  On compiling queries in recursive first-order databases , 1984, JACM.

[33]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[34]  Patrick Cousot,et al.  Semantic foundations of program analysis , 1981 .

[35]  Neil Immerman Languages which capture complexity classes , 1983, STOC '83.

[36]  Saharon Shelah,et al.  Fixed-Point Extensions of First-Order Logic , 1985, FOCS.

[37]  Jeffrey D. Ullman,et al.  A Scheme for the Automatic Inference of Variable Types , 1980, JACM.

[38]  Christos H. Papadimitriou,et al.  A note the expressive power of Prolog , 1985, Bull. EATCS.

[39]  Mark N. Wegman,et al.  Constant propagation with conditional branches , 1985, POPL.

[40]  Elaine J. Weyuker,et al.  Computability, complexity, and languages , 1983 .

[41]  Jay Earley,et al.  High Level Iterators and a Method for Automatically Designing Data Structure Representation , 1976, Comput. Lang..

[42]  Robert E. Tarjan,et al.  Iterative algorithms for global flow analysis , 1976 .

[43]  Robert E. Tarjan,et al.  A Linear Time Solution to the Single Function Coarsest Partition Problem , 1985, Theor. Comput. Sci..

[44]  Yuri Gurevich,et al.  Toward logic tailored for computational complexity , 1984 .

[45]  Robert Paige,et al.  Programming with Invariants , 1986, IEEE Software.

[46]  Micha Sharir,et al.  An Automatic Technique for Selection of Data Representations in SETL Programs , 1981, TOPL.

[47]  John Cocke,et al.  Programming languages and their compilers , 1969 .

[48]  Patrick Suppes,et al.  Axiomatic set theory , 1969 .

[49]  Patrick Cousot,et al.  Automatic synthesis of optimal invariant assertions: Mathematical foundations , 1977, Artificial Intelligence and Programming Languages.

[50]  Lawrence J. Henschen,et al.  Synthesizing Least Fixed Point Queries Into Non-Recursive Iterative Programs , 1983, IJCAI.

[51]  A. Tarski A LATTICE-THEORETICAL FIXPOINT THEOREM AND ITS APPLICATIONS , 1955 .

[52]  Robert E. Tarjan,et al.  Depth-First Search and Linear Graph Algorithms , 1972, SIAM J. Comput..

[53]  Barbara G. Ryder,et al.  Applicability of Incremental Iterative Algorithms , 1985 .

[54]  Jeffrey D. Ullman,et al.  Design Overview of the NAIL! System , 1986, ICLP.

[55]  Robert Paige,et al.  Fixed point computation and transformational programming , 1987 .

[56]  Jr. Hartley Rogers Theory of Recursive Functions and Effective Computability , 1969 .

[57]  E. F. CODD,et al.  A relational model of data for large shared data banks , 1970, CACM.

[58]  Martin S. Feather,et al.  A survey and classification of some program transformation approaches and techniques , 1987 .

[59]  Robert E. Tarjan,et al.  Three Partition Refinement Algorithms , 1987, SIAM J. Comput..

[60]  Robert Paige,et al.  Supercompilers - Extended Abstract , 1984 .

[61]  Jeffrey D. Ullman,et al.  Global Data Flow Analysis and Iterative Algorithms , 1976, J. ACM.

[62]  Fritz Henglein,et al.  Mechanical Translation of Set Theoretic Problem Specifications into Efficient RAM Code-A Case Study , 1987, J. Symb. Comput..

[63]  Jeffrey D. Ullman,et al.  Induction variables in very high level languages , 1976, POPL.

[64]  Yuri Gurevich,et al.  Monotone versus positive , 1987, JACM.

[65]  Marvin C. Paull Algorithm design: A recursion transformation framework , 1988 .

[66]  J. W. de Bakker,et al.  Mathematical theory of program correctness , 1980, Prentice-Hall international series in computer science.

[67]  Benjamin Arazi An Approach for Generating Different Types of Gray Codes , 1984, Inf. Control..