## SYSTEMATIC SYNTHESIS OF λ-TERMS

Citations: | 1 - 1 self |

### BibTeX

@MISC{Koopman_systematicsynthesis,

author = {Pieter Koopman and Rinus Plasmeijer},

title = {SYSTEMATIC SYNTHESIS OF λ-TERMS},

year = {}

}

### OpenURL

### Abstract

Abstract. In this paper we show how to generate terms in the λ-calculus that match a given number of function argument result pairs. It appears that the number of λ-terms is too large to find terms reasonably fast based on the grammar of λ-calculus alone. By adding knowledge such as the desired number of arguments it is possible to synthesize λ-terms effectively for some interesting examples. This yields surprising terms that are unlikely to be found by a human. An interesting subproblem is the determination of suitability of candidate terms based on equivalence of terms. We used an approximation of equivalence by a finite number of reduction steps. This implies that the test for equivalence can also yield the value undefined. Fortunately the test system used is able to handle undefined test results. For Henk Barendregt on his sixtieth birthday 1.

### Citations

532 | Lambda Calculi with Types
- Barendregt
- 1992
(Show Context)
Citation Context ...s, like the generalization of behavior in adaptive systems. In this paper we concentrate on untyped λ-terms as described by Barendregt in [1] extended with numbers and some operations on numbers. See =-=[3]-=- for an introduction to typed λ-calculus. 2000 ACM Subject Classification: D.1.2, I.2.2. Key words and phrases: Program Synthesis, Automatic Programming, λ-Terms, programming by example. LOGICAL METHO... |

202 |
The Lambda Calculus: its Syntax and Semantics (revised ed
- Barendregt
- 1984
(Show Context)
Citation Context ... also serious applications of this kind of synthesis techniques, like the generalization of behavior in adaptive systems. In this paper we concentrate on untyped λ-terms as described by Barendregt in =-=[1]-=- extended with numbers and some operations on numbers. See [3] for an introduction to typed λ-calculus. 2000 ACM Subject Classification: D.1.2, I.2.2. Key words and phrases: Program Synthesis, Automat... |

41 | R.: Gast: Generic Automated Software Testing
- Koopman, Alimarine, et al.
- 2003
(Show Context)
Citation Context ...ct syntax trees of candidate functions are generated [8]. Such a syntax tree is turned into the equivalent function. The suitability of these functions is determined by the automatic test system G∀st =-=[7]-=-. The test system is used to find functions f matching the desired property, by stating that such a function does not exists, e.g. ∀f.¬(f 4 = 5 ∧ f 5 = 8). The counterexamples found by G∀st are exactl... |

32 |
Eekelen. Concurrent Clean language report, version 1.0
- Plasmeijer, van
- 1995
(Show Context)
Citation Context ...he test system G∀st checks properties in first order logic by evaluating the property for a (large) number of arguments. G∀st is implemented as a library for the functional programming language Clean =-=[10]-=-. This library provides operators corresponding to the logical operators from logic as well as a class of functions called test to check properties. The test system treats every ordinary function argu... |

23 | Systematic search for lambda expressions
- Katayama
- 2005
(Show Context)
Citation Context ...tion we keep track of the bound variables and only generate them at applied occurrences. In principle that can be further improved by keeping track of the type of these variables, as done by Katayama =-=[6]-=-. Third, we will generate the right number of arguments for constants like Plus and If. Forth, it is useless to generate numerical constants as first argument of an Ap. Fifth, if the right constants a... |

8 | Generic Generation of Elements of Types
- Koopman, Plasmeijer
- 2005
(Show Context)
Citation Context ...te functions, for our example primitive recursive functions of type Int→Int will do. Using the generic generation of instances of this type, abstract syntax trees of candidate functions are generated =-=[8]-=-. Such a syntax tree is turned into the equivalent function. The suitability of these functions is determined by the automatic test system G∀st [7]. The test system is used to find functions f matchin... |

4 | R.: Systematic synthesis of functions
- Koopman, Plasmeijer
- 2006
(Show Context)
Citation Context ... example. LOGICAL METHODS IN COMPUTER SCIENCE DOI:10.2168/LMCS-??? 1 c○ Koopman and Plasmeijer Creative CommonssThe approach to generate λ-terms obeying some property is inspired by our previous work =-=[9]-=-. In that paper we described how one can synthesize functions matching a property such as f 4 = 5 ∧ f 5 = 8. In general there are umpteen functions matching a given set of input-output pairs. In progr... |

3 | Generating random lambda calculus terms
- Wang
- 2005
(Show Context)
Citation Context ...unctions matching examples. He generates only first order terms, all other things (like recursion) have to be defined as a recursion pattern in a library of primitive functions. 11sBroda [5] and Wang =-=[11]-=- discuss algorithms to generate λ-terms randomly. Broda uses a grammar to specify the type of the terms, somewhat similar to our generation functions. Henk Barendregt has touched the generation of λ-t... |

2 | Enumerators of lambda terms are reducing - Barendregt - 1992 |

2 | Enumerators of lambda terms are reducing constructively
- Barendregt
- 1995
(Show Context)
Citation Context ...enerate λ-terms randomly. Broda uses a grammar to specify the type of the terms, somewhat similar to our generation functions. Henk Barendregt has touched the generation of λ-terms via enumeration in =-=[1, 2, 4]-=-. By adding constructs like the Y -combinator and multiplication to the terms, the generated terms become more powerful. Hence complex functions will be found quicker. Without the struggle for nonterm... |

2 | Generating normal inhabitants of types with a common structure
- Broda, Damas
(Show Context)
Citation Context ...neration of functions matching examples. He generates only first order terms, all other things (like recursion) have to be defined as a recursion pattern in a library of primitive functions. 11sBroda =-=[5]-=- and Wang [11] discuss algorithms to generate λ-terms randomly. Broda uses a grammar to specify the type of the terms, somewhat similar to our generation functions. Henk Barendregt has touched the gen... |