Hostname: page-component-76fb5796d-r6qrq Total loading time: 0 Render date: 2024-04-25T09:19:22.625Z Has data issue: false hasContentIssue false

A domain-theoretic approach to functional and logic programming

Published online by Cambridge University Press:  07 November 2008

Frank S. K. Silbermann
Affiliation:
Department of Computer Science, School of Engineering, 301 Stanley Thomas Hall, Tulane University, New Orleans, LA 70118, USA (fs@cs.tulane.edu)
Bharat Jayaraman
Affiliation:
Department of Computer Science, State University of New York at Buffalo, Buffalo, NY 14260, USA (bharat@cs.buffalo.edu)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

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.

Type
Articles
Copyright
Copyright © Cambridge University Press 1992

References

Abelson, H. and Sussman, G. 1985. Structure and Interpretation of Computer Programs. MIT Press.Google Scholar
Ashcroft, E. A. and Wadge, W. W. 1982. Prescription for semantics. Trans. On Programming Languages and Systems, 4 (2): April, 283294.CrossRefGoogle Scholar
Bellia, M. and Levi, G. 1986. The relation between logic and functional languages: a survey. J. Logic Prog. 3: 217236.CrossRefGoogle Scholar
Berkling, K., Robinson, J. A. and Siebert, E. E. G. 1982. A Proposal for a Fifth Generation Logic and Functional Programming System, Based on Highly Parallel Reduction Machine Architecture. Syracuse Univ., November.Google Scholar
Clocksin, W. F. and Mellish, C. S. 1981. Programming in Prolog. Springer-Verlag.Google Scholar
Darlington, J., Field, A. J. and Pull, H. 1986. Unification of functional and logic languages. In DeGroot, D. and Lindstrom, G. eds., Logic Programming, Relations, Functions and Equations, Prentice-Hall, 3770.Google Scholar
Darlington, J. and Guo, Y. 1989. Narrowing and unification in functional programming – an evaluation mechanism for absolute set abstraction. In 3rd International Conf. Rewriting Techniques and Applications, Chapel Hill, NC: 92108.CrossRefGoogle Scholar
DeGroot, D. and Lindstrom, G. 1986. Logic Programming: Functions, Equations, and Relations. Prentice-Hall.Google Scholar
Dershowitz, N. and Plaisted, D. A. 1985. Applicative programming cum logic programming. In Symposium on Logic Programming, Boston, MA; 5466.Google Scholar
Goguen, J. 1988. Higher Order Functions Considered Unnecessary for Higher Order Programming. SRI Project No. 1243, SRI International.Google Scholar
Goguen, J. A. and Meseguer, J. 1984. Equality, types, modules, and (why not?) generics for logic programming. J. Logic Prog. 2: 179210.CrossRefGoogle Scholar
Gunter, C. A. and Scott, D. S. 1990. Semantic domains. In van Leeuwen, J. ed., Handbook of Theoretical Computer Science, Elsevier: 634652.Google Scholar
Hickey, T. 1989. CLP and structure abstraction. In 16th ACM POPL, Austin, TX: 124133.Google Scholar
Hudak, P., Wadler, P. et al. 1988. Report on the Functional Programming Language Haskell. Yale Research Report DCS/RR-666, December.Google Scholar
Hudak, P. 1989. Conception, evolution, and application of functional programming languages. ACM Computing Surveys, 21 (3), September: 359411.CrossRefGoogle Scholar
Hughes, J. 1990. Why functional programming matters. In Turner, D. A., ed., Research Topics in Functional Programming, Addison-Wesley.Google Scholar
Jaffar, J. and Lassez, J.-L. 1987. Constraint logic programming. In 14th ACM POPL, Munich: 111119.Google Scholar
Jayaraman, B. and Silbermann, F. S. K. 1986. Equations, sets, and reduction semantics for functional and logic programming. In 1986 ACM Conf. on LISP and Functional Programming, Boston, MA: 320331.Google Scholar
Khabaza, T. 1984. Negation as failure and parallelism. In International Symposium on Logic Programming, Atlantic City, NJ: 7075.Google Scholar
Lindstrom, G. 1985. Functional programming and the logical variable. In 12th ACM Symposium on Principles of Programming Languages, New Orleans, LA: 266280.Google Scholar
Lloyd, J. 1987. Foundations of Logic Programming (2nd edition), Springer-Verlag.CrossRefGoogle Scholar
McCarthy, J. et al. 1965. LISP 1.5 Programmer's Manual, MIT Press.Google Scholar
Main, M. G. 1987. A powerdomain primer. Bull. Euro. Assoc. for Theoretical Computer Sci., 33; October.Google Scholar
Manna, Z. 1974. Mathematical Theory of Computation, McGraw-Hill.Google Scholar
Milner, R. 1984. A proposal for standard ML. In ACM Symposium on LISP and Functional Programming, Austin, TX: 184197.Google Scholar
Naish, L. 1985. Negation and Control in Prolog. Doctoral Dissertation, University of Melbourne.Google Scholar
Pleban, U. F. 1984. Compiler prototyping using formal semantics. In Proc. ACM SIGPLAN '84 Symposium on Compiler Construction, SIGPLAN Notices, 19 (6), June.CrossRefGoogle Scholar
Peyton Jones, S. L. 1987. The Implementation of Functional Programming Languages, Prentice-Hall.Google Scholar
Reddy, U. S. 1985. Narrowing as the operational semantics of functional languages. In 1985 Symposium on Logic Programming, Boston, MA: 138151.Google Scholar
Robinson, J. A. and Sibert, E. 1982. LOGLISP: An alternative to PROLOG. Machine Intelligence, 10: 299314.Google Scholar
Robinson, J. A. 1984. New Generation Knowledge Processing: Syracuse University Parallel Expression Reduction. First Annual Progress Report, December.Google Scholar
Robinson, J. A. 1986. The future of logic programming. In Symposium on Logic in Computer Science, Ireland.Google Scholar
Schmidt, D. A. 1986. Denotational Semantics: A Methodology for Language Development. Allyn and Bacon.Google Scholar
Scott, D. S. 1982. Domains for denotational semantics. Volume 140 of Lecture Notes in Computer Science, Springer.Google Scholar
Silbermann, F. S. K. and Jayaraman, B. 1989. Set abstraction in functional and logic programming. In Fourth International Conf. on Functional Programming and Computer Architecture, London, UK.Google Scholar
Smolka, G. and Panangadan, P. 1985. A Higher-order Language with Unification and Multiple Results, Tech. Report TR 85–685, Cornell University, May.Google Scholar
Stoy, J. E. 1977. Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory, MIT Press.Google Scholar
Turner, D. A. 1985. Miranda: A non-strict functional language with polymorphic types. In Conf. on Functional Prog. Langs. and Comp. Arch., Nancy, France: 116.Google Scholar
van Emden, M. H. and Kowalski, R. A. 1976. The semantics of predicate logic as a programming language. J. ACM, 23 (4), 733743.CrossRefGoogle Scholar
Vuillemin, J. 1974. Correct and optimal implementations of recursion in a simple programming language. J. Computer and System Sci., 9: 332354.CrossRefGoogle Scholar
Wadsworth, C. 1976. The relation between computational and denotational properties for Scott's D-models of the Lambda-calculus. SIAM J. of Computing, 5 (3): 488521.CrossRefGoogle Scholar
Warren, D. H. D. 1982. Higher-order extensions of Prolog: are they needed? Machine Intelligence, 10: 441454.Google Scholar
Warren, D. H. D. 1983. An Abstract Instruction Set for Prolog, Tech. Note 309, SRI International.Google Scholar
You, J-H. and Subrahmanyam, P. A. 1986. Equational logic programming: an extension to equational programming. In 13th ACM Symposium on Principles of Programming Languages, St. Petersburg, FL: 209218.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.