## Synthesis of programs in computational logic (2004)

Venue: | PROGRAM DEVELOPMENT IN COMPUTATIONAL LOGIC |

Citations: | 7 - 0 self |

### BibTeX

@INPROCEEDINGS{Basin04synthesisof,

author = {David Basin and Yves Deville and Pierre Flener and Andreas Hamfelt and Jørgen Fischer Nilsson},

title = {Synthesis of programs in computational logic},

booktitle = {PROGRAM DEVELOPMENT IN COMPUTATIONAL LOGIC},

year = {2004},

pages = {30--65},

publisher = {Springer}

}

### Years of Citing Articles

### OpenURL

### Abstract

Since the early days of programming and automated reasoning, researchers have developed methods for systematically constructing programs from their specifications. Especially the last decade has seen a flurry of activities including the advent of specialized conferences, such as LOPSTR, covering the synthesis of programs in computational logic. In this paper we analyze and compare three state-of-the-art methods for synthesizing recursive programs in computational logic. The three approaches are constructive/deductive synthesis, schema-guided synthesis, and inductive synthesis. Our comparison is carried out in a systematic way where, for each approach, we describe the key ideas and synthesize a common running example. In doing so, we explore the synergies between the approaches, which we believe are necessary in order to achieve progress over the next decade in this field.

### Citations

5327 |
Design Patterns: Elements of Reusable Object-Oriented Software
- Gamma, Helm, et al.
- 1995
(Show Context)
Citation Context ...t handle more sophisticated design strategies, namely strategies abstracting a class of programs that cannot be obtained by instantiation with formulae. Typical examples are so-called design patterns =-=[38]-=-, which aim at the description of software design solutions and architectures (typically described by UML diagrams and text). How to extend schemas to handle such strategies is an open problem in prog... |

628 | Inverse entailment and Progol
- Muggleton
(Show Context)
Citation Context ...il) ∧ p(b, b · nil). The syntactical generalization of terms has been extended to a notion of generalized subsumption of clauses [18,63] and further to a method known as inverse resolution, see e.g., =-=[58]-=-. This method has proven useful for concept formation, deductive databases and data mining. However, it is too weak for induction of recursive logic programs. Consider examples of list concatenation, ... |

474 |
The Calculus of Constructions
- Coquand, Huet
- 1988
(Show Context)
Citation Context ...ionistic implication) that specifies t’s properties. Of course, the specification language is quite weak, so it is difficult to specify many interesting properties. In stronger type theories, such as =-=[24,56]-=-, types correspond to propositions in richer logics and one can, for example, specify sorting as ⊢ t :(∀x : int list . ∃y : int list . perm(x, y) ∧ ord(y)) . (1) This asserts that the program t is a f... |

466 |
A further note on inductive generalization
- Plotkin
- 1971
(Show Context)
Citation Context ...l). These two unit clauses generalize to the clause program p(X, X·Y ) ←. Thisrests on the existence of a dual of the most general unifier of two atoms known as the least general generalization (LGG) =-=[63,62]-=-. In this simple case, the LGG yields the intended program as a unit clause witness, p(X, X · Y ) ⊢ p(a, a · b · nil) ∧ p(b, b · nil). The syntactical generalization of terms has been extended to a no... |

361 | Formal methods: State of the art and future directions
- Clarke, Wing
- 1996
(Show Context)
Citation Context ...hus has many relationships with formal specification [69]. As the end product is a verified correct program, program synthesis is also related to formal methods in the development of computer systems =-=[22]-=-, and to automated software engineering. All of these disciplines share the goal of improving the quality of software. Program Synthesis in Computational Logic. It is generally recognized that a good ... |

288 |
The Lambda Calculus: its Syntax and Semantics, volume 103
- Barendregt
- 1984
(Show Context)
Citation Context ...g synthesis of functional programs in constructive type theory. Constructive type theories are logics used for reasoning about functional programs. The simplest example is the simply typed λ-calculus =-=[5,48]-=-, which we briefly review here. Programs in the simply typed λ-calculus are terms in the λ-calculus, which are built from variables, application, and abstraction. Types are built from a set of base ty... |

276 |
Symbolic Logic and Mechanical Theorem Proving
- Chang
- 1973
(Show Context)
Citation Context ...ion, to synthesize, or solve for, programs during proofs. This idea goes back to work in the 1960s on using first-order resolution to construct terms that represent plans or, more generally, programs =-=[19,42]-=-. In the logical framework community, the use of higher-order metalogics to represent rules and the use of higher-order unification to apply them is now standard, e.g., [2,8,9,23]. For example, the Is... |

269 |
Constructive mathematics and computer programming
- Martin-Löf
- 1982
(Show Context)
Citation Context ...ionistic implication) that specifies t’s properties. Of course, the specification language is quite weak, so it is difficult to specify many interesting properties. In stronger type theories, such as =-=[24,56]-=-, types correspond to propositions in richer logics and one can, for example, specify sorting as ⊢ t :(∀x : int list . ∃y : int list . perm(x, y) ∧ ord(y)) . (1) This asserts that the program t is a f... |

255 | The Gödel Programming Language - Hill, Lloyd - 1994 |

238 | KIDS: A semiautomatic program development system
- Smith
- 1990
(Show Context)
Citation Context ...ell-founded relations needs to be available.sSynthesis of Programs in Computational Logic 45 Human Interaction. Schema-guided synthesis can be fully automated, as demonstrated with Cypress [65], Kids =-=[66]-=-, DesignWare [67], and PlanWare [15]. However, interactive synthesis is preferable, with the human programmer taking the creative, high-level, heuristic design decisions, and the synthesizer doing the... |

223 | Application of theorem proving to problem solving
- Green
- 1969
(Show Context)
Citation Context ...ion, to synthesize, or solve for, programs during proofs. This idea goes back to work in the 1960s on using first-order resolution to construct terms that represent plans or, more generally, programs =-=[19,42]-=-. In the logical framework community, the use of higher-order metalogics to represent rules and the use of higher-order unification to apply them is now standard, e.g., [2,8,9,23]. For example, the Is... |

192 | The execution algorithm of Mercury: An efficient purely declarative logic programming language
- Somogyi, Henderson, et al.
- 1996
(Show Context)
Citation Context ...l-mode atpos(+, −, +), say, the corresponding logic program atpos(L, I, E) ← I =0,L= E · S atpos(L, I, E) ←¬I =0,I= s(T ), atpos(V,T,E), L = F · V can be implemented [25], say by the Mercury compiler =-=[68]-=-, into the following steadfast program: atpos(E · S, 0,E) ← atpos(F · V,s(T ),E) ← atpos(V,T,E) The comp operator had to be moved in front of the recursive call to achieve this. (Prolog cannot do this... |

175 | Logic programming in the LF logical framework
- Pfenning
- 1991
(Show Context)
Citation Context ...er-order (meta-)language and proofs are constructed by higher-order resolution. A higher-order logic programming language or logical framework based on higher-order resolution like λ-Prolog [27], ELF =-=[61]-=-, or Isabelle [59] would support this kind of proof. There are two conclusions we would like to draw. First, verification and synthesis are closely related activities. In fact, when rules are applied ... |

163 |
Isabelle: A Generic Theorem Prover, volume 828 of LNCS
- Paulson
- 1994
(Show Context)
Citation Context ...nguage and proofs are constructed by higher-order resolution. A higher-order logic programming language or logical framework based on higher-order resolution like λ-Prolog [27], ELF [61], or Isabelle =-=[59]-=- would support this kind of proof. There are two conclusions we would like to draw. First, verification and synthesis are closely related activities. In fact, when rules are applied using (higher-orde... |

162 | A.: Rippling: A Heuristic for Guiding Inductive Proofs
- Bundy, Stevens, et al.
- 1993
(Show Context)
Citation Context ...[50,51], for example, show how to completely automate the construction of such synthesis proofs in a tactic based setting. In this work, the most important tactic implements the rippling heuristic of =-=[17,12]-=-. This heuristic automates the application of rewrite or equivalence preserving transformation rules in a way that minimizes differences between terms or formulas. Rippling is typically used in induct... |

113 |
Introduction to combinators and λcalculus
- Hindley, Seldin
- 1986
(Show Context)
Citation Context ...g synthesis of functional programs in constructive type theory. Constructive type theories are logics used for reasoning about functional programs. The simplest example is the simply typed λ-calculus =-=[5,48]-=-, which we briefly review here. Programs in the simply typed λ-calculus are terms in the λ-calculus, which are built from variables, application, and abstraction. Types are built from a set of base ty... |

106 |
Transformational systems and the algebraic structure of atomic formulas
- Reynolds
- 1970
(Show Context)
Citation Context ...l). These two unit clauses generalize to the clause program p(X, X·Y ) ←. Thisrests on the existence of a dual of the most general unifier of two atoms known as the least general generalization (LGG) =-=[63,62]-=-. In this simple case, the LGG yields the intended program as a unit clause witness, p(X, X · Y ) ⊢ p(a, a · b · nil) ∧ p(b, b · nil). The syntactical generalization of terms has been extended to a no... |

93 |
Generalized Subsumption and its Applications to Induction and Redundancy
- Buntine
- 1988
(Show Context)
Citation Context ...ntended program as a unit clause witness, p(X, X · Y ) ⊢ p(a, a · b · nil) ∧ p(b, b · nil). The syntactical generalization of terms has been extended to a notion of generalized subsumption of clauses =-=[18,63]-=- and further to a method known as inverse resolution, see e.g., [58]. This method has proven useful for concept formation, deductive databases and data mining. However, it is too weak for induction of... |

91 | Automatically configuring constraint satisfaction programs: A case study
- Minton
- 1996
(Show Context)
Citation Context ...tion, one knows nothing about the quality of the overall specification and thus has to forge ahead. The question then arises of how to exploit the redundancy. A convincing proposal was made by Minton =-=[57]-=-: to cope with the instance sensitivity of the heuristics used to efficiently solve ubiquitous, NP-hard, constraint satisfaction problems, industry-strength solver synthesizers should use training ins... |

78 |
Equivalences of logic programs
- Maher
- 1988
(Show Context)
Citation Context ... many proposed methods and [26] contains a good survey. They differ in the form of their axioms (Horn clauses, iff -definitions, etc.), exact notion of equivalence used (and there are many, see e.g., =-=[55]-=-), and ease of automation. Many of these, for example unfold-fold based transformations [60], can be recast as synthesis by resolution using rules like those presented here [7,10]. 3.2 Overview Specif... |

69 |
Specifying theorem provers in a higher-order logic programming language
- Felty, Miller
- 1988
(Show Context)
Citation Context ... in a higher-order (meta-)language and proofs are constructed by higher-order resolution. A higher-order logic programming language or logical framework based on higher-order resolution like λ-Prolog =-=[27]-=-, ELF [61], or Isabelle [59] would support this kind of proof. There are two conclusions we would like to draw. First, verification and synthesis are closely related activities. In fact, when rules ar... |

69 |
Edinburgh LCF: A Mechanical Logic
- Gordon, Milner, et al.
- 1979
(Show Context)
Citation Context ...ence to atpos. Heuristics and Human Interaction. Proof rules, like those given above, can be applied interactively, semi-interactively, or even automatically. The use of a tactic based theorem prover =-=[41]-=-, which allows users to write programs that construct proofs, leaves open the degree of automation. [50,51], for example, show how to completely automate the construction of such synthesis proofs in a... |

60 |
A 15 year Perspective on Automatic Programming
- Balzer
- 1985
(Show Context)
Citation Context ... The objective of program synthesis is to develop methods and tools to mechanize or automate (part of) this process. In the last 30 years, program synthesis has been an active research area; see e.g. =-=[14,4,40,13,26,29]-=- for a description of major achievements. The starting point of program synthesis is usually a formal specification, that is an expression in some formal language (a language having a syntax, a semant... |

56 | Logic program synthesis from incomplete specifications
- Flener, Deville
- 1993
(Show Context)
Citation Context ...sional definition of the relation), which is by nature incomplete (when the extensional definition is infinite). Specifications in inductive synthesis may also include negative examples or properties =-=[28,36]-=-, but in general they remain incomplete. This incompleteness is a significant difference and, as we will see, it has far-reaching consequences. Indeed, it will play a key role in differentiating induc... |

54 |
Top-down synthesis of divide-and-conquer algorithms
- Smith
- 1985
(Show Context)
Citation Context ...ams and ≺ well-founded relations needs to be available.sSynthesis of Programs in Computational Logic 45 Human Interaction. Schema-guided synthesis can be fully automated, as demonstrated with Cypress =-=[65]-=-, Kids [66], DesignWare [67], and PlanWare [15]. However, interactive synthesis is preferable, with the human programmer taking the creative, high-level, heuristic design decisions, and the synthesize... |

38 | Logic program synthesis. The - DeVille, Lau - 1994 |

35 | Formal Specification: A Roadmap
- Lamsweerde
- 2000
(Show Context)
Citation Context ...ification, that is an expression in some formal language (a language having a syntax, a semantics, and usually a proof theory). Program synthesis thus has many relationships with formal specification =-=[69]-=-. As the end product is a verified correct program, program synthesis is also related to formal methods in the development of computer systems [22], and to automated software engineering. All of these... |

34 | Inductive synthesis of recursive logic programs: Achievements and prospects. Submitted to the Journal of Logic Programming
- Flener, Ylmaz
(Show Context)
Citation Context ...sional definition of the relation), which is by nature incomplete (when the extensional definition is infinite). Specifications in inductive synthesis may also include negative examples or properties =-=[28,36]-=-, but in general they remain incomplete. This incompleteness is a significant difference and, as we will see, it has far-reaching consequences. Indeed, it will play a key role in differentiating induc... |

34 | M.: Transformation of logic programs
- Pettorossi, Proietti
- 1998
(Show Context)
Citation Context ...oms (Horn clauses, iff -definitions, etc.), exact notion of equivalence used (and there are many, see e.g., [55]), and ease of automation. Many of these, for example unfold-fold based transformations =-=[60]-=-, can be recast as synthesis by resolution using rules like those presented here [7,10]. 3.2 Overview Specifications. In type theory, programs and specifications belong to different languages. When sy... |

34 | Toward a classification approach to design
- Smith
- 1996
(Show Context)
Citation Context ...ions needs to be available.sSynthesis of Programs in Computational Logic 45 Human Interaction. Schema-guided synthesis can be fully automated, as demonstrated with Cypress [65], Kids [66], DesignWare =-=[67]-=-, and PlanWare [15]. However, interactive synthesis is preferable, with the human programmer taking the creative, high-level, heuristic design decisions, and the synthesizer doing the more clerical wo... |

29 |
The synthesis of logic programs from inductive proofs
- Bundy, Smaill, et al.
- 1990
(Show Context)
Citation Context ...of earlier by resolving with ↔−refl. In this example, our goal was to transform atpos so that the result falls within a particular subset of first-order formulae, sometimes called pure logic programs =-=[16]-=- or logic descriptions [25], that define logic programs. These formulae can be easily translated to Horn clauses or run directly in a language like Gödel [47]. In this case, we get the clauses: which ... |

28 | Steadfast logic programs
- Lau, Ornaghi, et al.
- 1999
(Show Context)
Citation Context ...A theory with at least one open symbol is an open theory; otherwise it is closed. This terminology applies to formal specifications and logic programs. An (open) program for a relation r is steadfast =-=[25,53]-=- with respect to its specification if it is correct with respect to its specification whenever composed with programs that are correct with respect to the specifications of its (open) relations other ... |

26 | Middle-out reasoning for synthesis and induction
- Kraan, Basin, et al.
- 1996
(Show Context)
Citation Context ...eractively, semi-interactively, or even automatically. The use of a tactic based theorem prover [41], which allows users to write programs that construct proofs, leaves open the degree of automation. =-=[50,51]-=-, for example, show how to completely automate the construction of such synthesis proofs in a tactic based setting. In this work, the most important tactic implements the rippling heuristic of [17,12]... |

24 | Logic program synthesis via proof planning
- Kraan, Basin, et al.
- 1992
(Show Context)
Citation Context ...eractively, semi-interactively, or even automatically. The use of a tactic based theorem prover [41], which allows users to write programs that construct proofs, leaves open the degree of automation. =-=[50,51]-=-, for example, show how to completely automate the construction of such synthesis proofs in a tactic based setting. In this work, the most important tactic implements the rippling heuristic of [17,12]... |

23 | On specification frameworks and deductive synthesis of logic programs
- Lau, Ornaghi
(Show Context)
Citation Context ...icult ones offline, so that they are proven once and for all at schema design time. Also, the reuse of existing programs is made the main synthesis mechanism. A symbol occurring in a theory T is open =-=[52]-=- in T if it is neither defined in T , nor a predefined symbol. A non-open symbol in T is closed in T . A theory with at least one open symbol is an open theory; otherwise it is closed. This terminolog... |

19 |
Interactive Program Derivation
- Coen
- 1992
(Show Context)
Citation Context ...ore generally, programs [19,42]. In the logical framework community, the use of higher-order metalogics to represent rules and the use of higher-order unification to apply them is now standard, e.g., =-=[2,8,9,23]-=-. For example, the Isabelle distribution [59] comes with encodings of a number of type theories, where programs can be synthesized as described here. The vast majority of approaches for synthesizing l... |

17 |
On computational open-endedness in Martin-Löf’s type theory
- Howe
- 1991
(Show Context)
Citation Context ...their execution and meaning. That is, because the logic is constructive, the synthesized terms can be executed and their evaluation behavior agrees with the semantics of the type theory. In contrast, =-=[49]-=-, for example, presents a classical type theory where programs correspond to (noncomputable) oracles that cannot be executed. There one might say that the line is crossed from constructive (and deduct... |

17 | An opportunistic approach for logic program analysis and optimisation using enhanced schema-based transformations
- Vasconcelos, Fuchs
(Show Context)
Citation Context ...e a sequence of zero or more variables and hence the induction rule given cannot be captured by a single schema, but rather requires a family of schemas, one for each n. Extensions here are possible; =-=[64,28,70,39,20]-=- provide notions of schema patterns that describe such families and can be specialized as needed before, or during, synthesis. Schemas are here defined as abstractions of classes of programs. At the s... |

16 |
pproaches to automatic programming
- Biermann
- 1976
(Show Context)
Citation Context ... The objective of program synthesis is to develop methods and tools to mechanize or automate (part of) this process. In the last 30 years, program synthesis has been an active research area; see e.g. =-=[14,4,40,13,26,29]-=- for a description of major achievements. The starting point of program synthesis is usually a formal specification, that is an expression in some formal language (a language having a syntax, a semant... |

16 | Planware --Domain-Specific Synthesis of High-performance Schedulers
- Blaine, Gilham, et al.
- 1998
(Show Context)
Citation Context ...ailable.sSynthesis of Programs in Computational Logic 45 Human Interaction. Schema-guided synthesis can be fully automated, as demonstrated with Cypress [65], Kids [66], DesignWare [67], and PlanWare =-=[15]-=-. However, interactive synthesis is preferable, with the human programmer taking the creative, high-level, heuristic design decisions, and the synthesizer doing the more clerical work. The design issu... |

16 | On Correct Program Schemas
- Flener, Lau, et al.
(Show Context)
Citation Context ... parameters, an open program T called the template, and specifications S of the relations in T , such that T is steadfast with respect to S in that axiomatization. The schema DC can be abduced, as in =-=[32]-=-, from our informal account of how divide-and-conquer programs work. The parameters SX, SY, SZ, SH are sorts; they are used in the signatures of the other parameters, which are relations. There are no... |

16 | Inductive metalogic programming
- Hamfelt, Nilsson
- 1994
(Show Context)
Citation Context ...ubstantially reduce search and allow us to effectively use the metainterpreter as the backbone of our ILP method by reversing the provability metalogic programming demo predicate as examined e.g., in =-=[43]-=- and in [21] for ordinary definite clauses. In [46] we compare with other inductive synthesis systems and report results on successful automatic synthesis of a number of textbook programs including no... |

15 |
editors. Automatic Program Construction Techniques
- Biermann, Guiho, et al.
- 1984
(Show Context)
Citation Context ... The objective of program synthesis is to develop methods and tools to mechanize or automate (part of) this process. In the last 30 years, program synthesis has been an active research area; see e.g. =-=[14,4,40,13,26,29]-=- for a description of major achievements. The starting point of program synthesis is usually a formal specification, that is an expression in some formal language (a language having a syntax, a semant... |

15 |
Synthesis and transformation of logic programs in the Whelk proof development system
- Wiggins
- 1992
(Show Context)
Citation Context ... constructivity and the proof theory behind it, see [11].) Many proposed methods for the constructive synthesis of logic programs can also be explained in this way. For example, the Whelk Calculus of =-=[71]-=-, which is motivated by experiments in synthesizing relations in a constructive type theory, can be recast as this kind of synthesis [6].s4 Schema-Guided Synthesis Synthesis of Programs in Computation... |

12 | Logic frameworks for logic programs
- Basin
- 1994
(Show Context)
Citation Context ...re are many, see e.g., [55]), and ease of automation. Many of these, for example unfold-fold based transformations [60], can be recast as synthesis by resolution using rules like those presented here =-=[7,10]-=-. 3.2 Overview Specifications. In type theory, programs and specifications belong to different languages. When synthesizing logic programs, the specification language is typically the language of a fi... |

12 |
The design of divide and conquer algorithms
- Smith
- 1985
(Show Context)
Citation Context ...e a sequence of zero or more variables and hence the induction rule given cannot be captured by a single schema, but rather requires a family of schemas, one for each n. Extensions here are possible; =-=[64,28,70,39,20]-=- provide notions of schema patterns that describe such families and can be specialized as needed before, or during, synthesis. Schemas are here defined as abstractions of classes of programs. At the s... |

11 | Correct-schema-guided synthesis of steadfast programs
- Flener, Lau, et al.
- 1997
(Show Context)
Citation Context ...call to achieve this. (Prolog cannot do this, so mode-specific implementation is left as a manual task to the Prolog programmer.) This example illustrated a relatively simple use of the DC schema. In =-=[31]-=-, a quicksort program is synthesized, using a variant of the divide-and-conquer schema DC with two recursive calls.s4.4 Analysis Synthesis of Programs in Computational Logic 47 Schema-guided synthesis... |

11 | Extensible logic program schemata
- Gegg-Harrison
(Show Context)
Citation Context ...e a sequence of zero or more variables and hence the induction rule given cannot be captured by a single schema, but rather requires a family of schemas, one for each n. Extensions here are possible; =-=[64,28,70,39,20]-=- provide notions of schema patterns that describe such families and can be specialized as needed before, or during, synthesis. Schemas are here defined as abstractions of classes of programs. At the s... |

11 | Nilsson: Declarative Logic Programming with Primitive Recursive Relations on Lists
- Hamfelt
- 1996
(Show Context)
Citation Context ...am to be synthesized atpos = make3,2,1(foldrrev (cons, make1,3(cons))). The relationship between such a pair of variant programs is theoretically established by a duality theorem stated and proved in =-=[44]-=-. In order to facilitate the comparison of the synthesis approaches, let us transform the first Combilog form of the atpos definite clause program into a recursive atpos program. We first unfold the a... |

10 | Logic program schemas, constraints, and semiunification
- Chasseur, Deville
- 1997
(Show Context)
Citation Context |