Abstract
This paper describes how high level implementations of (need-ed) narrowing into Prolog can be improved by analysing definitional trees. First, we introduce a refined representation of definitional trees that handles properly the knowledge about the inductive positions of a pattern. The aim is to take advantage of the new representation of definitional trees to improve the aforementioned kind of implementation systems. Second, we introduce selective unfolding transformations, on determinate atom calls in the Prolog code, by examining the existence of what we call “deterministic (sub)branches” in a definitional tree. As a result of this analysis, we define some generic algorithms that allow us to compile a functional logic program into a set of Prolog clauses which increases determinism and incorporates some refinements that are obtained by ad hoc artifices in other similar implementations of functional logic languages. We also present and discuss the advantages of our proposals by means of some simple examples.
Supported by CICYT TIC 2001-2705-C03-01, Acción Integrada Hispano-Italiana HI2000-0161, and Acción Integrada Hispano-Alemana HA2001-0059.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Alpuente, M., Falaschi, M., Julián, P., Vidal, G.: Uniform Lazy Narrowing. Journal of Logic and Computation 13(2), 27 (2003)
Antoy, S.: Definitional trees. In: Kirchner, H., Levi, G. (eds.) ALP 1992. LNCS, vol. 632, pp. 143–157. Springer, Heidelberg (1992)
Antoy, S.: Optimal non-deterministic functional logic computations. In: Hanus, M., Heering, J., Meinke, K. (eds.) ALP 1997 and HOA 1997. LNCS, vol. 1298, pp. 16–30. Springer, Heidelberg (1997)
Antoy, S.: Constructor-based conditional narrowing. In: Proc. of (PPDP 2001). LNCS. Springer, Heidelberg (2001)
Antoy, S.: Needed Narrowing in Prolog. In: Kuchen, H., Swierstra, S.D. (eds.) PLILP 1996. LNCS, vol. 1140, pp. 473–474. Springer, Heidelberg (1996)
Antoy, S., Echahed, R., Hanus, M.: A Needed Narrowing Strategy. Journal of the ACM 47(4), 776–822 (2000)
Antoy, S., Hanus, M.: Compiling multi-paradigm declarative programs into Prolog. In: Kirchner, H. (ed.) FroCos 2000. LNCS, vol. 1794, pp. 171–185. Springer, Heidelberg (2000)
Antoy, S., Engelke, M., Hanus, M., Höppner, K., Koj, J., Niederau, P., Sadre, R., Steiner, F.: Packs 1.5: The Portland Aachen Kiel Curry System User Manual. Technical Report Version of May, 23, University of Kiel, Germany (2003), Available from http://www.informatik.uni-kiel.de/~pakcs/
Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge University Press, Cambridge (1998)
Gallagher, J., Bruynooghe, M.: Some Low-Level Source Transformations for Logic Programs. In: Proc. of 2nd Workshop on Meta-Programming in Logic, pp. 229–246 (1990)
Giovannetti, E., Levi, G., Moiso, C., Palamidessi, C.: Kernel Leaf: A Logic plus Functional Language. Journal of Computer and System Sciences 42, 363–377 (1991)
Hanus, M.: The Integration of Functions into Logic Programming: From Theory to Practice. Journal of Logic Programming 19&20, 583–628 (1994)
Hanus, M.: Efficient translation of lazy functional logic programs into Prolog. In: Proietti, M. (ed.) LOPSTR 1995. LNCS, vol. 1048, pp. 252–266. Springer, Heidelberg (1996)
Hanus, M., Huch, F.: An open system to support web-based learning. In: Proc. of WFLP 2003, pp. 269–282. Universidad Politécnica de Valencia (2003)
Hanus, M. (ed.) Curry: An Integrated Functional Logic Language (1999), Available at http://www.informatik.uni-kiel.de/~curry
Loogen, R., López-Fraguas, F., Rodríguez-Artalejo, M.: A Demand Driven Computation Strategy for Lazy Narrowing. In: Penjam, J., Bruynooghe, M. (eds.) PLILP 1993. LNCS, vol. 714, pp. 184–200. Springer, Heidelberg (1993)
López-Fraguas, F., Sánchez-Hernández, J.: TOY: A Multiparadigm Declarative System. In: Narendran, P., Rusinowitch, M. (eds.) RTA 1999. LNCS, vol. 1631, pp. 244–247. Springer, Heidelberg (1999)
Moreno, J.G., González, M.H., López-Fraguas, F., Artalejo, M.R.: An Approach to Declarative Programming Based on a Rewriting Logic. Journal of Logic Programming 1(40), 47–87 (1999)
Moreno-Navarro, J., Rodríguez-Artalejo, M.: Logic Programming with Functions and Predicates: The language Babel. Journal of Logic Programming 12(3), 191–224 (1992)
Ramesh, R., Ramakrishnan, I., Warren, D.: Automata–Driven Indexing of Prolog Clauses. Journal of Logic Programming 23(2), 151–202 (1995)
Tamaki, H., Sato, T.: Unfold/Fold Transformations of Logic Programs. In: Proc. of ICLP, pp. 127–139 (1984)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Julián Iranzo, P., Villamizar Lamus, C. (2004). Analysing Definitional Trees: Looking for Determinism. In: Kameyama, Y., Stuckey, P.J. (eds) Functional and Logic Programming. FLOPS 2004. Lecture Notes in Computer Science, vol 2998. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24754-8_6
Download citation
DOI: https://doi.org/10.1007/978-3-540-24754-8_6
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-21402-1
Online ISBN: 978-3-540-24754-8
eBook Packages: Springer Book Archive