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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Aït-Kaci, H., Lincoln, P., Nasr, R.: Le Fun: Logic, Equations and Functions. In: Proc. ILPS 1987, pp. 17–23 (1987)
Gupta, G., Jayaraman, B.: Analysis of Or-Parallel Execution Models. ACM TOPLAS 15(4), 659–680 (1993)
Hanus, M.: On the Completeness of Residuation. In: Proc. JICSLP 1992, pp. 192–206. MIT Press, Cambridge (1992)
Hanus, M.: Curry: An integrated functional logic language (version 0.5) (1999), http://www-i2.informatik.rwth-aachen.de/~hanus/curry
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)
Hudak, P., Peyton Jones, S., Wadler, P.: Report on the Programming Language Haskell (version 1.2). SIGPLAN Notices 27(5) (1992)
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)
Johnsson, T.: Efficient Compilation of Lazy Evaluation. In: Proc. SIGPLAN 1984 Symposium on Compiler Construction, pp. 58–69 (1984)
Johnsson, T.: Compiling Lazy Functional Languages. PhD thesis, Chalmers Univ. of Technology (1987)
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)
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)
Lux, W., Kuchen, H.: An Abstract Machine for Curry. Technical Report, Univerisity of Münster (1999)
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)
Peyton Jones, S.: Implementing Lazy Functional Languages on Stock Hardware: The Spineless Tagless G-machine. Journal of Functional Programming 2(1), 73–80 (1992)
Peyton Jones, S., Wadler, P.: Imperative Functional Programming. In: Proc. 20th POPL 1993, pp. 123–137 (1993)
Reddy, U.: Narrowing as the Operational Semantics of Functional Languages. In: Proc. ILPS 1985, pp. 138–151 (1985)
Smolka, G.: The Oz Programming Model. In: van Leeuwen, J. (ed.) Current Trends in Computer Science. LNCS, vol. 1000, Springer, Heidelberg (1995)
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)
Warren, D.: An Abstract Prolog Instruction Set. Technical Report 309, SRI (1983)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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