Skip to main content

Avoiding dynamic delays in functional logic programs

  • Conference paper
  • First Online:
Progamming Language Implementation and Logic Programming (PLILP 1993)

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

Abstract

In several functional logic programming languages, functional expressions must be evaluated before unification with another term, but this can only be done if the functional expression is ground. If the functional expression is non-ground, then unification must be delayed until all the arguments have become instantiated to ground terms. If the delaying mechanism uses dynamic tests, the program will be unnecessarily inefficient.

We present an analysis method for statically determining at what point in the program a given functional expression can be evaluated. This analysis is then used for transforming a functional logic program into an equivalent program, in which most dynamic delays are avoided. We show that this transformation can lead to considerable improvements in performance, compared to a dynamic delaying strategy.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. H. Aït-Kaci. An overview of LIFE. In Schmidt, Stogny (eds.) Next generation information system technology, pp. 42–58, LNCS 504, Springer-Verlag, 1990.

    Google Scholar 

  2. H. Aït-Kaci, P. Lincoln and R. Nasr. LeFun: Logic, Equations and FUNctions. In Proc. 4th IEEE international symposium on logic programming, pp. 17–23, 1987.

    Google Scholar 

  3. K. Apt and A. Pellegrini. Why the occur-check is not a problem. In Programming language implementation and logic programming, pp. 69–86, LNCS 631, Springer-Verlag, 1992.

    Google Scholar 

  4. J-L. Bouquard. Étude des rapports entre grammaires attribuées et programmation logique: application au test d'occurrence et è l'analyse statique, PhD thesis, University of Tours, 1992.

    Google Scholar 

  5. J. Boye. S-SLD-resolution — an operational semantics for logic programs with external procedures. In Programming language implementation and logic programming, pp. 383–393, LNCS 528, Springer-Verlag, 1991.

    Google Scholar 

  6. J. Boye, J. Paakki and J. Małuszyński. Dependency-based groundness analysis of functional logic programs. Research report LiTH-IDA-R-93-20, Linköping university, 1993.

    Google Scholar 

  7. P. Deransart, G. Ferrand and M. Téguia. NSTO programs. In Proc. of the international symposium on logic programming, pp. 533–547, The MIT Press, 1991.

    Google Scholar 

  8. P. Deransart, M. Jourdan and B. Lorho. Attribute grammars — Definitions, systems and bibliography. LNCS 323, Springer-Verlag, 1988.

    Google Scholar 

  9. P. Deransart and J. Małuszyński. Relating logic programs and attribute grammars. Journal of logic programming, 2(2), pp. 119–156, 1985.

    Article  Google Scholar 

  10. P. Deransart and J. Małuszyński. A grammatical view on logic programming. The MIT Press. To appear 1993.

    Google Scholar 

  11. B. Dumant. Checking the soundness of resolution schemes. In Proc. of the joint international conference and symposium on logic programming, pp. 37–51, The MIT Press, 1992.

    Google Scholar 

  12. L. Fribourg. SLOG: A logic programming language interpreter based on clausal superposition and rewriting. In Proc. of the IEEE international symposium on logic programming, pp. 172–184, Boston, 1985.

    Google Scholar 

  13. M. Hanus. A functional and logic language with polymorphic types. In Proc. of the international symposium on design and implementation of symbolic computation systems, pp. 215–224, LNCS 429, Springer-Verlag, 1990.

    Google Scholar 

  14. M. Hanus. On the completeness of residuation. In Proc. of the joint international conference and symposium on logic programming, pp. 192–206, The MIT Press, 1992.

    Google Scholar 

  15. S. Hölldobler. Foundations of equational logic programming. Lecture notes in artificial intelligence 353, Springer-Verlag, 1989.

    Google Scholar 

  16. D. Knuth. Semantics of context-free languages. Mathematical systems theory, 2, pp. 127–145, 1968.

    Article  Google Scholar 

  17. A. Kågedal and F. Kluźniak. Enriching Prolog with S-unification. In Darlington and Dietrich, (eds.), PHOENIX Seminar and Workshop on Declarative Programming, Workshops in Computing, Sasbachwalden, Germany. Springer-Verlag, 1991.

    Google Scholar 

  18. J. Małuszyński, S. Bonnier, J. Boye, F. Kluźniak, A. Kågedal and U. Nilsson. Logic programs with external procedures. In Apt, de Bakker, Rutten (eds.) Logic programming languages: constraints, functions and objects. The MIT Press, 1993.

    Google Scholar 

  19. J. Moreno-Navarro and M. Rodriguez-Artalejo. Logic programming with functions and predicates: the language BABEL. Journal of logic programming (12), pp. 191–223, 1992.

    Google Scholar 

  20. L. Naish. Adding equations to NU-Prolog. In Programming language implementation and logic programming, pp. 15–26, LNCS 528, Springer-Verlag, 1991.

    Google Scholar 

  21. U. Nilsson and J. Małuszyński. Logic, programming and Prolog. John Wiley and sons, 1990.

    Google Scholar 

  22. L. Plümer. Termination proofs for logic programs. Lecture notes in artificial intelligence 446, Springer-Verlag, 1990.

    Google Scholar 

  23. P. Sundblad. Transformation of GAPLog programs (preliminary title). Master's thesis, Linköping university, 1993.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Maurice Bruynooghe Jaan Penjam

Rights and permissions

Reprints and permissions

Copyright information

© 1993 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Boye, J. (1993). Avoiding dynamic delays in functional logic programs. In: Bruynooghe, M., Penjam, J. (eds) Progamming Language Implementation and Logic Programming. PLILP 1993. Lecture Notes in Computer Science, vol 714. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57186-8_68

Download citation

  • DOI: https://doi.org/10.1007/3-540-57186-8_68

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

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

  • Online ISBN: 978-3-540-47945-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics