Skip to main content

Overlapping Rules and Logic Variables in Functional Logic Programs

  • Conference paper
Logic Programming (ICLP 2006)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4079))

Included in the following conference series:

Abstract

Functional logic languages extend purely functional languages with two features: operations defined by overlapping rules and logic variables in both defining rules and expressions to evaluate. In this paper, we show that only one of these features is sufficient in a core language. On the one hand, overlapping rules can be eliminated by introducing logic variables in rules. On the other hand, logic variables can be eliminated by introducing operations defined by overlapping rules. The proposed transformations between different classes of programs not only give a better understanding of the features of functional logic programs but also may simplify implementations of functional logic languages.

This work was partially supported by the German Research Council (DFG) grant Ha 2457/5-1 and the NSF grant CCR-0218224.

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. Albert, E., Hanus, M., Huch, F., Oliver, J., Vidal, G.: Operational Semantics for Declarative Multi-Paradigm Languages. Journal of Symbolic Computation 40(1), 795–829 (2005)

    Article  MATH  MathSciNet  Google Scholar 

  2. Albert, E., Hanus, M., Vidal, G.: A Practical Partial Evaluator for a Multi-Paradigm Declarative Language. Journal of Functional and Logic Programming 2002(1) (2002)

    Google Scholar 

  3. Antoy, S.: Definitional Trees. In: Kirchner, H., Levi, G. (eds.) ALP 1992. LNCS, vol. 632, pp. 143–157. Springer, Heidelberg (1992)

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

  5. Antoy, S.: Constructor-based Conditional Narrowing. In: Proc. of the 3rd International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming (PPDP 2001), pp. 199–206. ACM Press, New York (2001)

    Chapter  Google Scholar 

  6. Antoy, S.: Evaluation Strategies for Functional Logic Programming. Journal of Symbolic Computation 40(1), 875–903 (2005)

    Article  MATH  MathSciNet  Google Scholar 

  7. Antoy, S., Echahed, R., Hanus, M.: A Needed Narrowing Strategy. Journal of the ACM 47(4), 776–822 (2000)

    Article  MathSciNet  Google Scholar 

  8. Antoy, S., Hanus, M.: Overlapping Rules and Logic Variables in Functional Logic Programs. Technical Report 0608, Christian-Albrechts-Universität Kiel (2006)

    Google Scholar 

  9. Antoy, S., Hanus, M., Liu, J., Tolmach, A.: A Virtual Machine for Functional Logic Computations. In: Grelck, C., Huch, F., Michaelson, G.J., Trinder, P. (eds.) IFL 2004. LNCS, vol. 3474, pp. 108–125. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  10. Antoy, S., Tolmach, A.: Typed Higher-Order Narrowing without Higher-Order Strategies. In: Middeldorp, A. (ed.) FLOPS 1999. LNCS, vol. 1722, pp. 335–352. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  11. Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge University Press, Cambridge (1998)

    Google Scholar 

  12. Bergstra, J.A., Klop, J.W.: Conditional Rewrite Rules: Confluence and Termination. Journal of Computer and System Sciences 32(3), 323–362 (1986)

    Article  MATH  MathSciNet  Google Scholar 

  13. Brassel, B., Hanus, M., Huch, F., Silva, J., Vidal, G.: Run-Time Profiling of Functional Logic Programs. In: Etalle, S. (ed.) LOPSTR 2004. LNCS, vol. 3573, pp. 182–197. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  14. Braßel, B., Hanus, M., Huch, F., Vidal, G.: A Semantics for Tracing Declarative Multi-Paradigm Programs. In: Proceedings of the 6th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP 2004), pp. 179–190. ACM Press, New York (2004)

    Chapter  Google Scholar 

  15. Braßel, B., Huch, F.: Translating Curry to Haskell. In: Proc. of the ACM SIGPLAN 2005 Workshop on Curry and Functional Logic Programming (WCFLP 2005), pp. 60–65. ACM Press, New York (2005)

    Google Scholar 

  16. Claessen, K., Ljunglöf, P.: Typed Logical Variables in Haskell. In: Proc. ACM SIGPLAN Haskell Workshop, Montreal (2000)

    Google Scholar 

  17. de Dios Castro, J., López-Fraguas, F.J.: Elimination of Extra Variables in Functional Logic Programs. Personal communication (2006)

    Google Scholar 

  18. Dershowitz, N., Jouannaud, J.-P.: Rewrite Systems. In: van Leeuwen, J. (ed.) Handbook of Theoretical Computer Science, vol. B, pp. 243–320. Elsevier, Amsterdam (1990)

    Google Scholar 

  19. Giovannetti, E., Levi, G., Moiso, C., Palamidessi, C.: Kernel LEAF: A Logic plus Functional Language. Journal of Computer and System Sciences 42(2), 139–185 (1991)

    Article  MATH  Google Scholar 

  20. Hanus, M.: The Integration of Functions into Logic Programming: From Theory to Practice. Journal of Logic Programming 19&20, 583–628 (1994)

    Article  MathSciNet  Google Scholar 

  21. Hanus, M.: A Unified Computation Model for Functional and Logic Programming. In: Proc. of the 24th ACM Symposium on Principles of Programming Languages (Paris), pp. 80–93 (1997)

    Google Scholar 

  22. Hanus, M., Sadre, R.: An Abstract Machine for Curry and its Concurrent Implementation in Java. Journal of Functional and Logic Programming 1999(6) (1999)

    Google Scholar 

  23. Hanus, M. (ed.): Curry: An Integrated Functional Logic Language (Vers. 0.8.2) (2006), Available at: http://www.informatik.uni-kiel.de/~curry

  24. Huet, G., Lévy, J.-J.: Computations in Orthogonal Rewriting Systems. In: Lassez, J.-L., Plotkin, G. (eds.) Computational Logic: Essays in Honor of Alan Robinson, pp. 395–443. MIT Press, Cambridge (1991)

    Google Scholar 

  25. Launchbury, J.: A Natural Semantics for Lazy Evaluation. In: Proc. 20th ACM Symposium on Principles of Programming Languages (POPL 1993), pp. 144–154. ACM Press, New York (1993)

    Chapter  Google Scholar 

  26. Fraguas, F.J.L., Hernández, J.S.: TOY: A Multiparadigm Declarative System. In: Narendran, P., Rusinowitch, M. (eds.) RTA 1999. LNCS, vol. 1631, pp. 244–247. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  27. Lux, W., Kuchen, H.: An Efficient Abstract Machine for Curry. In: Beiersdörfer, K., Engels, G., Schäfer, W. (eds.) Informatik 1999 — Annual meeting of the German Computer Science Society (GI), pp. 390–399. Springer, Heidelberg (1999)

    Google Scholar 

  28. Moreno-Navarro, J.J., Rodríguez-Artalejo, M.: Logic Programming with Functions and Predicates: The Language BABEL. Journal of Logic Programming 12, 191–223 (1992)

    Article  MATH  Google Scholar 

  29. Ochoa, C., Silva, J., Vidal, G.: Dynamic Slicing Based on Redex Trails. In: Proc. of the ACM SIGPLAN 2004 Symposium on Partial Evaluation and Program Manipulation (PEPM 2004), pp. 123–134. ACM Press, New York (2004)

    Chapter  Google Scholar 

  30. Tolmach, A., Antoy, S., Nita, M.: Implementing Functional Logic Languages Using Multiple Threads and Stores. In: Proc. of the Ninth ACM SIGPLAN International Conference on Functional Programming (ICFP 2004), pp. 90–102. ACM Press, New York (2004)

    Chapter  Google Scholar 

  31. Warren, D.H.D.: Higher-order extensions to PROLOG: are they needed? Machine Intelligence 10, 441–454 (1982)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Antoy, S., Hanus, M. (2006). Overlapping Rules and Logic Variables in Functional Logic Programs . In: Etalle, S., Truszczyński, M. (eds) Logic Programming. ICLP 2006. Lecture Notes in Computer Science, vol 4079. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11799573_9

Download citation

  • DOI: https://doi.org/10.1007/11799573_9

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-36635-5

  • Online ISBN: 978-3-540-36636-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics