Skip to main content

Implementing Encapsulated Search for a Lazy Functional Logic Language

  • Conference paper
Functional and Logic Programming (FLOPS 1999)

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

Included in the following conference series:

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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. Gupta, G., Jayaraman, B.: Analysis of Or-Parallel Execution Models. ACM TOPLAS 15(4), 659–680 (1993)

    Article  Google Scholar 

  3. Hanus, M.: On the Completeness of Residuation. In: Proc. JICSLP 1992, pp. 192–206. MIT Press, Cambridge (1992)

    Google Scholar 

  4. Hanus, M.: Curry: An integrated functional logic language (version 0.5) (1999), http://www-i2.informatik.rwth-aachen.de/~hanus/curry

  5. 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. Hudak, P., Peyton Jones, S., Wadler, P.: Report on the Programming Language Haskell (version 1.2). SIGPLAN Notices 27(5) (1992)

    Google Scholar 

  7. 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)

    Chapter  Google Scholar 

  8. Johnsson, T.: Efficient Compilation of Lazy Evaluation. In: Proc. SIGPLAN 1984 Symposium on Compiler Construction, pp. 58–69 (1984)

    Google Scholar 

  9. Johnsson, T.: Compiling Lazy Functional Languages. PhD thesis, Chalmers Univ. of Technology (1987)

    Google Scholar 

  10. 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. 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)

    Article  Google Scholar 

  12. Lux, W., Kuchen, H.: An Abstract Machine for Curry. Technical Report, Univerisity of Münster (1999)

    Google Scholar 

  13. 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)

    Chapter  Google Scholar 

  14. Peyton Jones, S.: Implementing Lazy Functional Languages on Stock Hardware: The Spineless Tagless G-machine. Journal of Functional Programming 2(1), 73–80 (1992)

    Article  Google Scholar 

  15. Peyton Jones, S., Wadler, P.: Imperative Functional Programming. In: Proc. 20th POPL 1993, pp. 123–137 (1993)

    Google Scholar 

  16. Reddy, U.: Narrowing as the Operational Semantics of Functional Languages. In: Proc. ILPS 1985, pp. 138–151 (1985)

    Google Scholar 

  17. 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. 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. Warren, D.: An Abstract Prolog Instruction Set. Technical Report 309, SRI (1983)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Lux, W. (1999). Implementing Encapsulated Search for a Lazy Functional Logic Language. In: Middeldorp, A., Sato, T. (eds) Functional and Logic Programming. FLOPS 1999. Lecture Notes in Computer Science, vol 1722. Springer, Berlin, Heidelberg. https://doi.org/10.1007/10705424_7

Download citation

  • DOI: https://doi.org/10.1007/10705424_7

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-66677-6

  • Online ISBN: 978-3-540-47950-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics