Implementing Encapsulated Search for a Lazy Functional Logic Language

  • Wolfgang Lux
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1722)


A distinguishing feature of logic and functional logic languages is their ability to perform computations with partial data and to search for solutions of a goal. Having a built-in search strategy is convenient but not always sufficient. For many practical applications the built-in search strategy (usually depth-first search via global backtracking) is not well suited. Also the non-deterministic instantiation of unbound logic variables conflicts with the monadic I/O concept, which requires a single-threaded use of the world.

A solution to these problems is to encapsulate search via a primitive operator try, which returns all possible solutions to a search goal in a list. In the present paper we develop an abstract machine that aims at an efficient implementation of encapsulated search in a lazy functional logic language.


Abstract Machine Goal Variable Functional Logic Lazy Evaluation Concurrent Evaluation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. ALN87.
    Aït-Kaci, H., Lincoln, P., Nasr, R.: Le Fun: Logic, Equations and Functions. In: Proc. ILPS 1987, pp. 17–23 (1987)Google Scholar
  2. GJ93.
    Gupta, G., Jayaraman, B.: Analysis of Or-Parallel Execution Models. ACM TOPLAS 15(4), 659–680 (1993)CrossRefGoogle Scholar
  3. Han92.
    Hanus, M.: On the Completeness of Residuation. In: Proc. JICSLP 1992, pp. 192–206. MIT Press, Cambridge (1992)Google Scholar
  4. Han99.
    Hanus, M.: Curry: An integrated functional logic language (version 0.5) (1999),
  5. HCS95.
    Henderson, F., Conway, T., Somogyi, Z.: Compiling Logic Programs to C Using GNUC as a Portable Assemble. In: Proc. of the ILPS 1995 Post-conference Workshop on Sequential Implementation Technologies for Logic Programming Languages, pp. 1–15 (1995)Google Scholar
  6. HPW92.
    Hudak, P., Peyton Jones, S., Wadler, P.: Report on the Programming Language Haskell (version 1.2). SIGPLAN Notices 27(5) (1992)Google Scholar
  7. HS98.
    Hanus, M., Steiner, F.: Controlling Search in Declarative Programs. In: Palamidessi, C., Meinke, K., Glaser, H. (eds.) ALP 1998 and PLILP 1998. LNCS, vol. 1490, pp. 374–390. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  8. Joh84.
    Johnsson, T.: Efficient Compilation of Lazy Evaluation. In: Proc. SIGPLAN 1984 Symposium on Compiler Construction, pp. 58–69 (1984)Google Scholar
  9. Joh87.
    Johnsson, T.: Compiling Lazy Functional Languages. PhD thesis, Chalmers Univ. of Technology (1987)Google Scholar
  10. KLMR92.
    Kuchen, H., Loogen, R., Moreno-Navarro, J., Rodríguez-Artalejo, M.: Graph-Based Implementation of a Functional Logic Language. In: Kirchner, H., Wechler, W. (eds.) ALP 1990. LNCS, vol. 463, pp. 298–317. Springer, Heidelberg (1990)Google Scholar
  11. KLMR96.
    Kuchen, H., Loogen, R., Moreno-Navarro, J., Rodríguez-Artalejo, M.: The Functional Logic Language Babel and its Implementation on a Graph Machine. New Generation Computing 14, 391–427 (1996)CrossRefGoogle Scholar
  12. LK99.
    Lux, W., Kuchen, H.: An Abstract Machine for Curry. Technical Report, Univerisity of Münster (1999)Google Scholar
  13. MSS95.
    Mehl, M., Scheidhauer, R., Schulte, C.: An Abstract Machine for Oz. In: Swierstra, S.D. (ed.) PLILP 1995. LNCS, vol. 982, pp. 151–168. Springer, Heidelberg (1995)CrossRefGoogle Scholar
  14. Pey92.
    Peyton Jones, S.: Implementing Lazy Functional Languages on Stock Hardware: The Spineless Tagless G-machine. Journal of Functional Programming 2(1), 73–80 (1992)CrossRefGoogle Scholar
  15. PW93.
    Peyton Jones, S., Wadler, P.: Imperative Functional Programming. In: Proc. 20th POPL 1993, pp. 123–137 (1993)Google Scholar
  16. Red85.
    Reddy, U.: Narrowing as the Operational Semantics of Functional Languages. In: Proc. ILPS 1985, pp. 138–151 (1985)Google Scholar
  17. Smo95.
    Smolka, G.: The Oz Programming Model. In: van Leeuwen, J. (ed.) Current Trends in Computer Science. LNCS, vol. 1000, Springer, Heidelberg (1995)Google Scholar
  18. SSW94.
    Schulte, C., Smolka, G., Würtz, J.: Encapsulated Search and Constraint Programming in Oz. In: Proc. of the Second Workshop on Principles and Practice of Constraint Programming, Springer, Heidelberg (1994)Google Scholar
  19. War83.
    Warren, D.: An Abstract Prolog Instruction Set. Technical Report 309, SRI (1983)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1999

Authors and Affiliations

  • Wolfgang Lux
    • 1
  1. 1.Universität Münster 

Personalised recommendations