Program abstraction and instantiation

Our goal is to develop formal methods for abstracting a given set of programs into a program schemaand for instantiating a given schema to satisfy concrete specifications. Abstraction and instantiationare two important phases in software development which allow programmers to apply knowledgelearned in the solutions of past problems when faced with new situations. For example, from twoprograms using a linear (or binary) search technique, an abstract schema can be derived that embodiesthe shared idea and that can be instantiated to solve similar new problems. Along similar lines, thedevelopment and application of program transformations are considered. We suggest the formulation of analogies as a basic tool in program abstraction. An analogy is firstsought between the specifications of the given programs; this yields an abstract specification thatmay be instantiated to any of the given concrete specifications. The analogy is then used as a basisfor transforming the existing programs into an abstract schema that represents the embeddedtechnique, with the invariant assertions and correctness proofs of the given programs helping toverify and complete the analogy. A given concrete specification of a new problem may then becompared with the abstract specification of the schema to suggest an instantiation of the schemathat yields a correct program.

[1]  David R. Barstow Knowledgebased Pgm Constr , 1979 .

[2]  Heikki Mannila,et al.  Derivation of efficient DAG marking algorithms , 1983, POPL '83.

[3]  Arthur G. Duncan,et al.  Abstractions, instantiations, and proofs of marking algorithms , 1977 .

[4]  Lawrence Yelowitz,et al.  Control Structure Abstractions of the Backtracking Programming Technique , 1976, IEEE Transactions on Software Engineering.

[5]  Peter Deussen One Abstract Accepting Algorithm for all Kinds of Parsers , 1979, ICALP.

[6]  Jack Mostow,et al.  Toward Better Models of the Design Process , 1985, AI Mag..

[7]  J. Carbonell Learning by Analogy: Formulating and Generalizing Plans from Past Experience , 1983 .

[8]  M. N. Muralidharan A Methodology for Algorithm Development Through Schema Transformations , 1982 .

[9]  Andrzej Blikle Towards Mathematical Structured Programming , 1977, Formal Description of Programming Concepts.

[10]  Richard C. Waters,et al.  Abstraction, Inspection and Debugging in Programming , 1981 .

[11]  David R. Barstow,et al.  Knowledge-based program construction , 1979 .

[12]  Zohar Manna,et al.  The Evolution of Programs: Automatic Program Modification , 1977, IEEE Transactions on Software Engineering.

[13]  Willem P. de Roever,et al.  The evolution of list-copying algorithms and the need for structured program verification , 1979, POPL.

[14]  Arthur G. Duncan,et al.  Abstractions, instantiations, and proofs of marking algorithms , 1977, Artificial Intelligence and Programming Languages.

[15]  Jonathan C. Shultis,et al.  Transformations of FP program schemes , 1981, FPCA '81.

[16]  Jayadev Misra An Approach to Formal Definitions and Proofs of Programming Principles , 1978, IEEE Transactions on Software Engineering.

[17]  Patrick Henry Winston,et al.  Learning and reasoning by analogy , 1980, CACM.

[18]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

[19]  Donald E. Knuth,et al.  Structured Programming with go to Statements , 1974, CSUR.

[20]  Niklaus Wirth,et al.  Algorithms + Data Structures = Programs , 1976 .

[21]  David S. Wile,et al.  Program developments: formal explanations of implementations , 1983, CACM.

[22]  Nachum Dershowitz The evolution of programs , 1983, Progress in computer science.

[23]  Ben Wegbreit Goal-Directed Program Transformation , 1976, IEEE Trans. Software Eng..

[24]  Robert S. Boyer,et al.  Proving Theorems about LISP Functions , 1973, JACM.

[25]  Zohar Manna,et al.  Logical analysis of programs , 1976, CACM.

[26]  Alan Bundy,et al.  Using Meta-Level Inference for Selective Application of Multiple Rewrite Rules in Algebraic Manipulation , 1980, CADE.

[27]  H. Raymond Strong,et al.  Characterizations of Flowchartable Recursions , 1973, J. Comput. Syst. Sci..

[28]  Richard A. Posner,et al.  Reasoning by Analogy , 1886, The Indian medical gazette.

[29]  Stephen K. Reed,et al.  Book reviewIntelligence, information processing, and analogical reasoning: by Robert J. Sternberg. Hillsdale, New Jersey: Lawrence Erlbaum Associates, 1977. xi + 348 pp. $19.95 , 1977 .

[30]  D. C. Cooper The Equivalence of Certain Computations , 1966, Comput. J..

[31]  Claude Kirchner,et al.  Algebraic Manipulations as a Unification and Matching Strategy for Linear Equations in Signed Binary Trees , 1981, IJCAI.

[32]  Richard S. Bird,et al.  Notes on recursion elimination , 1977, CACM.

[33]  Ralf Steinbrüggen,et al.  Program Transformation Systems , 1983, CSUR.

[34]  Dennis F. Kibler,et al.  Improving and refining programs by program manipulation , 1976, ACM '76.

[35]  David Gries,et al.  An introduction to programming: A structured approach using PL/1 and PL/C , 1973 .

[36]  Robert Balzer,et al.  Transformational Implementation: An Example , 1981, IEEE Transactions on Software Engineering.

[37]  Ben Wegbreit,et al.  Goal-Directed Program Transformation , 1976, IEEE Transactions on Software Engineering.

[38]  Robert Moll,et al.  Program synthesis by analogy , 1977, SIGART Newsl..

[39]  Allen Newell,et al.  Human Problem Solving. , 1973 .

[40]  Jacques J. Arsac,et al.  Syntactic source to source transforms and program manipulation , 1979, CACM.

[41]  Rob Kling,et al.  A Paradigm for Reasoning by Analogy , 1971, IJCAI.

[42]  John McDermott,et al.  Learning to Use Analogies , 1979, IJCAI.

[43]  Frank M. Brown,et al.  Inductive Reasoning on Recursive Equations , 1979, Artif. Intell..

[44]  M. A. Tainsh Intelligence, Information Processing and Analogical Reasoning: The Componential Analysis of Human Abilities. By Robert J. Sternberg. (New York: John Wiley & Sons Ltd., 1977.) [Pp. xi + 348.] £14-20. , 1980 .

[45]  Nicholas V. Findler,et al.  TOWARD ANALOGICAL REASONING IN PROBLEM SOLVING BY COMPUTERS , 1979 .

[46]  Edsger W. Dijkstra Why Naive Program Transformation Systems Are Unlikely to Work , 1982 .

[47]  Zohar Manna,et al.  Knowledge and Reasoning in Program Synthesis , 1974, IJCAI.

[48]  Robert A. Kowalski,et al.  Logic for problem solving , 1982, The computer science library : Artificial intelligence series.

[49]  Alan Bundy,et al.  Using Meta-Level Inference for Selective Application of Multiple Rewrite Rule Sets in Algebraic Manipulation , 1980, Artif. Intell..

[50]  Daniel C. Brotsky Program Understanding through Cliché Recognition , 1981 .

[51]  Willem P. de Roever,et al.  The Evolution of List-Copying Algorithms. , 1979 .

[52]  Arthur G. Duncan,et al.  Studies in Abstract/Concrete Mappings in Proving Algorithm Correctness , 1979, ICALP.

[53]  Robert W. Floyd Toward Interactive Design of Correct Programs , 1971, IFIP Congress.

[54]  Friedrich L. Bauer,et al.  Programming as an evolutionary process , 1975, ICSE '76.

[55]  Edsger W. Dijkstra,et al.  Notes on structured programming , 1970 .

[56]  Vipin Kumar,et al.  General Branch and Bound, and its Relation to A and AO , 1984, Artif. Intell..

[57]  David A. Plaisted,et al.  Theorem Proving with Abstraction , 1981, Artif. Intell..

[58]  John Darlington,et al.  A system which automatically improves programs , 1973, Acta Informatica.

[59]  Susan L. Gerhart,et al.  Knowledge about programs: A model and case study , 1975, Reliable Software.

[60]  Susan L. Gerhart,et al.  Correctness-preserving program transformations , 1975, POPL '75.

[61]  Richard C. Waters,et al.  The Programmer's Apprentice: Knowledge Based Program Editing , 1982, IEEE Transactions on Software Engineering.

[62]  Richard Fikes,et al.  Learning and Executing Generalized Robot Plans , 1993, Artif. Intell..

[63]  Gerald Jay Sussman,et al.  A Computer Model of Skill Acquisition , 1975 .

[64]  David B. Loveman,et al.  Program Improvement by Source-to-Source Transformation , 1977, J. ACM.

[65]  Allen Newell,et al.  How can Merlin understand , 1973 .