Skip to main content

Prolog semantics for measuring space consumption

  • Conference paper
  • First Online:
Logic Programming

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 592))

Abstract

A new operational semantics of Prolog is introduced which allows measuring space consumption of Prolog programs. Space complexity classes are introduced in four subsets of Prolog: kernel Prolog (no structures, no builtins), kernel dynamic Prolog (dynamic clauses control operators allowed), flat Prolog (the subset of kernel Prolog with no lists) and flat dynamic Prolog (the corresponding subset of kernel dynamic Prolog. Main results show that functional programs can be reduced to deterministic ones, any program in kernel Prolog can be transformed into equivalent program with optimized recursion guaranteeing constant local stack and trail, and any program in dynamic kernel Prolog can be transformed into an equivalent purely iterative program.

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. Lloyd, J.W. Foundations of logic programming. Springer Series Symbolic Computation Artificial Intelligence(1987).

    Google Scholar 

  2. Warren, D. An abstract Prolog instruction set. — Tech. note 309, SRI Intern.(1983).

    Google Scholar 

  3. Tick, E. Warren, D. Towards a pipelined Prolog processor. New Generation Computing, 2, pp. 323–345(1984).

    Google Scholar 

  4. Gallagher, J. Codish, M. Shapiro, E. Specialization of Prolog and FCP programs using abstract interpretation. New Generation Computing, 6, pp. 159–186(1988).

    Google Scholar 

  5. Janssens, G. Bruynooghe, M. On abstracting the procedural behavior of logic programs. This volume.

    Google Scholar 

  6. Kanamory, T. Kawamura, T. Analyzing success patterns of logic programs by abstract hybrid interpretation. ICOT Tech. Report, TR.279(1987).

    Google Scholar 

  7. Debray, S.K. Warren, D.S. Automatic mode inference of logic programs”. J.Logic Programming, 5(3), pp. 207–229(1988).

    Article  Google Scholar 

  8. Mannila, H. Ukkonen, E. Flow analysis of Prolog programs. Proc. 4th Symp. on Logic Programming, pp. 205–214, San Francisco(1987).

    Google Scholar 

  9. Mellish, C.S. Abstract interpretation of Prolog programs. Proc. 3d Int. Conf. on Logic Programming, pp. 181–198, London(1986).

    Google Scholar 

  10. Boulanger, D. Deep logic program transformation using abstract interpretation. This volume.

    Google Scholar 

  11. Bruynooghe, M. The memory management of Prolog implementations. Logic Programming, N.Y, Academic Press, pp. 193–210(1982).

    Google Scholar 

  12. Warren, D. An improved Prolog implementation which optimizes tail recursion. Proc. of the Logic Programming Workshop (Tarnlund, S.A. ed.), Debrecen, Hungary(1980).

    Google Scholar 

  13. Dikovsky, A.Ja. Space considerations in Prolog. Proc. of the Symp. on Logical Foundations of Comput. Sci. “Logic at Botik'89”, (Meyer, A.R. Taitslineds.), pp.101–107(1989).

    Google Scholar 

  14. Gavrilenko, Ju. Recursion and iteration on Cuper algebras (Russ.). To publish.

    Google Scholar 

  15. Gavrilenko, Ju. Applications of Cuper algebras to the theory of tail recursion in logic programming (Russ.). To publish.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

A. Voronkov

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Dikovsky, A.J. (1992). Prolog semantics for measuring space consumption. In: Voronkov, A. (eds) Logic Programming. Lecture Notes in Computer Science, vol 592. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55460-2_13

Download citation

  • DOI: https://doi.org/10.1007/3-540-55460-2_13

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

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

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

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics