Advertisement

A Memoizing Semantics for Functional Logic Languages

  • Salvador España
  • Vicent Estruch
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2986)

Abstract

Declarative multi-paradigm languages combine the main features of functional and logic programming, like laziness, logic variables and non-determinism. The operational semantics of these languages is based on a combination of narrowing and residuation. In this article, we introduce a non-standard memoizing semantics for multi-paradigm declarative programs and prove its equivalence with the standard operational semantics. Both pure functional and pure logic programming have for long time taken advantage of tabling or memoizing schemes [15,19,7], which motivates the interest in the adapation of this technique to the integrated paradigm.

Keywords

Programming languages formal semantics memoization 

References

  1. 1.
    Albert, E., Vidal, G.: The Narrowing-Driven Approach to Functional Logic Program Specialization. New Generation Computing 20(1), 3–26 (2002)zbMATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Alpuente, M., Correa, F.J., Falaschi, M.: Debugging Scheme of Functional Logic Programs. In: Hanus, M. (ed.) Proc. of International Workshop on Functional and (Constraint) Logic Programming, WFLP 2001. Electronic Notes in Theoretical Computer Science, vol. 64. Elsevier Science Publishers, Amsterdam (2002)Google Scholar
  3. 3.
    Antoy, S.: Definitional Trees. In: Kirchner, H., Levi, G. (eds.) ALP 1992. LNCS, vol. 632, pp. 143–157. Springer, Heidelberg (1992)CrossRefGoogle Scholar
  4. 4.
    Antoy, S., Ariola, Z.M.: Narrowing the narrowing space. In: Hartel, P.H., Kuchen, H. (eds.) PLILP 1997. LNCS, vol. 1292, pp. 1–15. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  5. 5.
    Antoy, S., Echahed, R., Hanus, M.: A Needed Narrowing Strategy. Journal of the ACM (J. ACM) 47, 776–822 (2000)CrossRefMathSciNetGoogle Scholar
  6. 6.
    Barklund, J.: Tabulation of Functions in Definite Clause Programs. In: Penjam, J. (ed.) PLILP 1994. LNCS, vol. 844, pp. 465–466. Springer, Heidelberg (1994)Google Scholar
  7. 7.
    Chen, W., Warren, D.S.: Tabled Evaluation with Delaying for General Logic Programs. Journal of the ACM 43(1), 20–74 (1996)zbMATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Cook, B., Launchbury, J.: Disposable Memo Functions. ACM SIGPLAN Notices 32(8), 310–318 (1997)CrossRefGoogle Scholar
  9. 9.
    Cormen, T.H., Leiserson, C.E., Rivest, R.L.: Introduction to Algorithms. MIT Press, Cambridge (1992)Google Scholar
  10. 10.
    Hanus, M.: Curry: An Integrated Functional Logic Language (2000), Available at: http://www.informatik.uni-kiel.de/~mh/curry
  11. 11.
    Hanus, M.: The Integration of Functions into Logic Programming: From Theory to Practice. Journal of Logic Programming 19&20, 583–628 (1994)Google Scholar
  12. 12.
    Hanus, M.: A Unified Computation Model for Functional and Logic Programming. In: Proc. 24st ACM Symposium on Principles of Programming Languages (POPL 1997), pp. 80–93 (1997)Google Scholar
  13. 13.
    Hanus, M., Prehofer, C.: Higher-Order Narrowing with Definitional Trees. Journal of Functional Programming 9(1), 33–75 (1999)zbMATHCrossRefMathSciNetGoogle Scholar
  14. 14.
    Hortalá-González, T., Ullán, E.: An abstract machine based system for a lazy narrowing calculus. In: Kuchen, H., Ueda, K. (eds.) FLOPS 2001. LNCS, vol. 2024, pp. 216–232. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  15. 15.
    Hughes, J.: Lazy memo-functions. In: Jouannaud, J.-P. (ed.) FPCA 1985. LNCS, vol. 201, pp. 129–146. Springer, Heidelberg (1985)Google Scholar
  16. 16.
    Leuschel, M., Mertens, B., Sagonas, K.: Preserving termination of tabled logic programs while unfolding. In: Fuchs, N.E. (ed.) LOPSTR 1997. LNCS, vol. 1463, pp. 189–205. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  17. 17.
    Lux, W., Kuchen, H.: An Efficient Abstract Machine for Curry. In: Proc. of the 8th Int’l Workshop on Functional and Logic Programming (WFLP 1999), pp. 171–181 (1999)Google Scholar
  18. 18.
    Ramakrishnan, V., Rao, P., Sagonas, K.F., Swift, T., Warren, D.S.: Efficient access mechanisms for tabled logic programs. Journal of Logic Programming 38(1), 31–54 (1999)zbMATHCrossRefGoogle Scholar
  19. 19.
    Tamaki, H., Sato, T.: Old Resolution with Tabulation. In: Shapiro, E. (ed.) ICLP 1986. LNCS, vol. 225, pp. 84–98. Springer, Heidelberg (1986)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2004

Authors and Affiliations

  • Salvador España
    • 1
  • Vicent Estruch
    • 1
  1. 1.Departamento de Sistemas Informáticos y ComputaciónDSIC Technical University of ValenciaValenciaSpain

Personalised recommendations