Skip to main content

Mode analysis of functional logic programs

  • Conference paper
  • First Online:
Static Analysis (SAS 1994)

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

Included in the following conference series:

Abstract

Functional logic languages amalgamate functional and logic programming paradigms. They can be efficiently implemented by extending techniques known from logic programming. Such implementations can be largely improved if information about the run-time behavior, in particular the modes of function calls, is available at compile time. In this paper we present a framework to derive such globed information. The concrete operational semantics considered in this paper is normalizing innermost narrowing, which combines the deterministic reduction principle of functional languages with the nondeterministic search principle of logic languages. Due to the normalization process between narrowing steps, standard analysis frameworks for logic programming cannot be applied. Therefore we develop new techniques to correctly approximate the effect of the intermediate normalization process.

The research described in this paper was supported in part by the German Ministry for Research and Technology (BMFT) under grant ITS 9103. The responsibility for the contents of this publication lies with the authors.

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. M. Alpuente, M. Falaschi, and F. Manzo. Analyses of Inconsistency for Incremental Equational Logic Programming. In Proc. of the 4th International Symposium on Programming Language Implementation and Logic Programming, pp. 443–457. Springer LNCS 631, 1992.

    Google Scholar 

  2. D. Bert, and R. Echahed. Design and Implementation of a Generic, Logic and Functional Programming Language. In Proc. European Symposium on Programming, pp. 119–132. Springer LNCS 213, 1986.

    Google Scholar 

  3. P.G. Bosco, E. Giovannetti, and C. Moiso. Narrowing vs. SLD-Resolution. Theoretical Computer Science 59, pp. 3–23, 1988.

    Article  Google Scholar 

  4. J. Boye. Avoiding Dynamic Delays in Functional Logic Programs. In Proc. of the 5th International Symposium on Programming Language Implementation and Logic Programming, pp. 12–27. Springer LNCS 714, 1993.

    Google Scholar 

  5. M. Bruynooghe. A Practical Framework for the Abstract Interpretation of Logic Programs. Journal of Logic Programming (10), pp. 91–124, 1991.

    Article  Google Scholar 

  6. P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction of approximation of fixpoints. In Proc. of the 4th ACM Symposium on Principles of Programming Languages, pp. 238–252, 1977.

    Google Scholar 

  7. N. Dershowitz and J.-P. Jouannaud. Rewrite Systems. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, Vol. B, pp. 243–320. Elsevier, 1990.

    Google Scholar 

  8. M.J. Fay. First-Order Unification in an Equational Theory. In Proc. 4th Workshop on Automated Deduction, pp. 161–167, Austin (Texas), 1979. Academic Press.

    Google Scholar 

  9. L. Fribourg. SLOG: A Logic Programming Language Interpreter Based on Clausal Superposition and Rewriting. In Proc. IEEE Internat. Symposium on Logic Programming, pp. 172–184, Boston, 1985.

    Google Scholar 

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

    Article  Google Scholar 

  11. M. Hanus. Compiling Logic Programs with Equality. In Proc. of the 2nd Int. Workshop on Programming Language Implementation and Logic Programming, pp. 387–401. Springer LNCS 456, 1990.

    Google Scholar 

  12. M. Hanus. Efficient Implementation of Narrowing and Rewriting. In Proc. Int. Workshop on Processing Declarative Knowledge, pp. 344–365. Springer LNAI 567, 1991.

    Google Scholar 

  13. M. Hanus. Improving Control of Logic Programs by Using Functional Logic Languages. In Proc. of the 4th International Symposium on Programming Language Implementation and Logic Programming, pp. 1–23. Springer LNCS 631, 1992.

    Google Scholar 

  14. M. Hanus. On the Completeness of Residuation. In Proc. of the 1992 Joint International Conference and Symposium on Logic Programming, pp. 192–206. MIT Press, 1992.

    Google Scholar 

  15. M. Hanus. The Integration of Functions into Logic Programming: From Theory to Practice. Journal of Logic Programming, Vol. 19–20, 1994.

    Google Scholar 

  16. M. Hanus. Towards the Global Optimization of Functional Logic Programs. In Proc. 5th International Conference on Compiler Construction, pp. 68–82. Springer LNCS 786, 1994.

    Google Scholar 

  17. D. Jacobs and A. Langen. Accurate and Efficient Approximation of Variable Aliasing in Logic Programs. In Proc. of the 1989 North American Conference on Logic Programming, pp. 154–165. MIT Press, 1989.

    Google Scholar 

  18. G. Janssens, and M. Bruynooghe. Deriving Descriptions of Possible Values of Program Variables. Journal of Logic Programming, Vol. 13, No. 2 & 3, pp. 205–258, 1992.

    Article  Google Scholar 

  19. H. Kuchen, R. Loogen, J.J. Moreno-Navarro, and M. Rodríguez-Artalejo. Graphbased Implementation of a Functional Logic Language. In Proc. ESOP 90, pp. 271–290. Springer LNCS 432, 1990.

    Google Scholar 

  20. B. Le Charlier, K. Musumbu, and P. Van Hentenryck. A Generic Abstract Interpretation Algorithm and its Complexity Analysis. In Proc. International Conference on Logic Programming, pp. 64–78. MIT Press, 1991.

    Google Scholar 

  21. R. Loogen. Relating the Implementation Techniques of Functional and Functional Logic Languages, New Generation Computing, Vol. 11, pp. 179–215, 1993.

    Google Scholar 

  22. A. Marien, G. Janssens, A. Mulkers, and M. Bruynooghe. The impact of abstract interpretation: an experiment in code generation. In Proc. Sixth International Conference on Logic Programming (Lisboa), pp. 33–47. MIT Press, 1989.

    Google Scholar 

  23. K. Marriott, M.J. Garcia de la Banda, and M. Hermenegildo. Analyzing Logic Programs with Dynamic Scheduling. In Proc. 21st ACM Symposium on Principles of Programming Languages, pp. 240–253, Portland, 1994.

    Google Scholar 

  24. C.S. Mellish. Some Global Optimizations for a Prolog Compiler. Journal of Logic Programming (1), pp. 43–66, 1985.

    Article  Google Scholar 

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

    Article  Google Scholar 

  26. U. Nilsson. Systematic Semantic Approximations of Logic Programs. In Proc. of the 2nd Int. Workshop on Programming Language Implementation and Logic Programming, pp. 293–306. Springer LNCS 456, 1990.

    Google Scholar 

  27. U.S. Reddy. Narrowing as the Operational Semantics of Functional Languages. In Proc. IEEE Internat. Symposium on Logic Programming, pp. 138–151, Boston, 1985.

    Google Scholar 

  28. A. Taylor. Removal of Dereferencing and Trailing in Prolog Compilation. In Proc. Sixth International Conference on Logic Programming (Lisboa), pp. 48–60. MIT Press, 1989.

    Google Scholar 

  29. A. Taylor. LIPS on a MIPS: Results form a Prolog Compiler for a RISC. In Proc. Seventh International Conference on Logic Programming, pp. 174–185. MIT Press, 1990.

    Google Scholar 

  30. P. Van Roy. An Intermediate Language to Support Prolog's Unification. In Proc. of the 1989 North American Conference on Logic Programming, pp. 1148–1164. MIT Press, 1989.

    Google Scholar 

  31. P.L. Van Roy. Can Logic Programming Execute as Fast as Imperative Programming? PhD thesis, Univ. of California Berkeley, 1990. Report No. UCB/CSD 90/600.

    Google Scholar 

  32. D.H.D. Warren. Implementing PROLOG — Compiling Logic Programs. 1 and 2. D.A.I. Research Report No. 39 and 40, University of Edinburgh, 1977.

    Google Scholar 

  33. F. Zartmann. Global Analysis of Functional Logic Programs. Technical Report, Max-Planck-Institut für Informatik, Saarbrücken, 1994.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Baudouin Le Charlier

Rights and permissions

Reprints and permissions

Copyright information

© 1994 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hanus, M., Zartmann, F. (1994). Mode analysis of functional logic programs. In: Le Charlier, B. (eds) Static Analysis. SAS 1994. Lecture Notes in Computer Science, vol 864. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58485-4_31

Download citation

  • DOI: https://doi.org/10.1007/3-540-58485-4_31

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-58485-8

  • Online ISBN: 978-3-540-49005-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics