A domain-theoretic approach to functional and logic programming
- 1 January 1992
- journal article
- research article
- Published by Cambridge University Press (CUP) in Journal of Functional Programming
- Vol. 2 (3) , 273-321
- https://doi.org/10.1017/s095679680000040x
Abstract
The integration of functional and logic programming languages has been a topic of great interest in the last decade. Many proposals have been made, yet none is completely satisfactory especially in the context of higher order functions and lazy evaluation. This paper addresses these shortcomings via a new approach: domain theory as a common basis for functional and logic programming. Our integrated language remains essentially within the functional paradigm. The logic programming capability is provided by set abstraction (via Zermelo-Frankel set notation), using the Herbrand universe as a set abstraction generator, but for efficiency reasons our proposed evaluation procedure treats this generator's enumeration parameter as a logical variable. The language is defined in terms of (computable) domain-theoretic constructions and primitives, using the lower (or angelic) powerdomain to model the set abstraction facility. The result is a simple, elegant and purely declarative language that successfully combines the most important features of both pure functional programming and pure Horn logic programming. Referential transparency with respect to the underlying mathematical model is maintained throughout. An implicitly correct operational semantics is obtained by direct execution of the denotational semantic definition, modified suitably to permit logical variables whenever the Herbrand universe is being generated within a set abstraction. Completeness of the operational semantics requires a form of parallel evaluation, rather than the more familiar left-most rule.Keywords
This publication has 14 references indexed in Scilit:
- Conception, evolution, and application of functional programming languagesACM Computing Surveys, 1989
- Narrowing and unification in functional programming —An evaluation mechanism for absolute set abstractionPublished by Springer Nature ,1989
- The relation between logic and functional languages: a surveyThe Journal of Logic Programming, 1986
- Equations, sets, and reduction semantics for functional and logic programmingPublished by Association for Computing Machinery (ACM) ,1986
- Equality, types, modules, and (why not?) generics for logic programmingThe Journal of Logic Programming, 1984
- Compiler prototyping using formal semanticsACM SIGPLAN Notices, 1984
- R for SemanticsACM Transactions on Programming Languages and Systems, 1982
- The Semantics of Predicate Logic as a Programming LanguageJournal of the ACM, 1976
- The Relation between Computational and Denotational Properties for Scott’s ${\text{D}}_\infty $-Models of the Lambda-CalculusSIAM Journal on Computing, 1976
- Correct and optimal implementations of recursion in a simple programming languageJournal of Computer and System Sciences, 1974