An Efficient Abstract Machine for Curry
The functional logic programming language Curry integrates features from functional, logic, and concurrent programming. It combines lazy evaluation, higher-order functions, logic variables, partial data structures, built-in search and the concurrent evaluation of (equational) constraints. Curry amalgamates the most important operational principles developed in the area of integrated functional logic languages: residuation and narrowing. The effects of non-determinism stemming from the narrowing semantics can be encapsulated using the primitive try operator. This is necessary to implement declarative I/O in the presence of non-deterministic computations and allows to implement different search strategies.
In the present paper we develop an abstract machine for the implementation of Curry. The focus in this paper will be on the efficient implementation of encapsulated search in a lazy functional logic language.
Unable to display preview. Download preview PDF.
- [ALN87]H. Alt-Kaci, P. Lincoln, and R. Nasr. Le Fun: Logic, equations, and functions. In Proc. 4th ILPS, pages 17–23, 1987.Google Scholar
- [Gup94]G. Gupta. Multiprocessor Execution of Logic Programs. Kluwer, 1994.Google Scholar
- [Han99]M. Hanus. Curry: An integrated functional logic language, (version 0.5). http://www-i2.informatik.rwth-aachen.de/`hanus/curry, 1999.Google Scholar
- [HCS95]F. Henderson, Th. Conway, and Z. Somogyi. Compiling logic programs to C using GNU C as a portable assembler. In Proc. of the ILPS ‘85 Postconference Workshop on Sequential Implementation Technologies for Logic Programming Languages, pages 1–15, 1995.Google Scholar
- [HKM95]M. Hanus, H. Kuchen, and J. Moreno-Navarro. Curry: A truly functional logic language. In Proc. ILPS’95 Workshop on Visions for the Future of Logic Programming, pages 95–107, 1995.Google Scholar
- [HPW92]P. Hudak, S. Peyton Jones, and P. Wadler. Report on the programming language Haskell (version 1.2). SIGPLAN Notices, 27 (5), 1992.Google Scholar
- [HS97]M. Hanus and R. Sadre. A concurrent implementation of Curry in Java. In Proc. ILPS’97 Workshop on Parallelism and Implementation Technology for (Constraint) Logic Programming Languages, 1997.Google Scholar
- [HS98]M. Hanus and F. Steiner. Controlling search in functional logic programs. In Proc. PLILP’98, 1998.Google Scholar
- [Joh87]T. Johnsson. Compiling lazy functional languages. PhD thesis, Chalmers Univ. of Technology, 1987.Google Scholar
- [Mi178]R. Milner. A theory of type polymorphism in programming. Journal of Computer System Science, 17 (3), 1978.Google Scholar
- [MSS95]M. Mehl, R. Scheidhauer, and Ch. Schulte. An abstract machine for Oz. In Proc. PLILP’95,pages 151–168. Springer, LNCS 982, 1995..Google Scholar
- [PW93]S. Peyton Jones and P. Wadler. Imperative functional programming. In Proc. 20th POPL’93, pages 123–137, 1993.Google Scholar
- [Red85]U. Reddy. Narrowing as the operational semantics of functional languages. In Proc. ILPS’85, pages 138–151, 1985.Google Scholar
- [Smo95]G. Smolka. The Oz programming model. In J. van Leeuwen, editor, Current Trends in Computer Science. Springer LNCS 1000, 1995.Google Scholar
- [SS86]L. Sterling and E. Shapiro. The Art of Prolog. MIT Press, 1986.Google Scholar
- [War83]D. Warren. An abstract Prolog instruction set. TR 309, SRI, 1983.Google Scholar