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.
Preview
Unable to display preview. Download preview PDF.
References
Lloyd, J.W. Foundations of logic programming. Springer Series Symbolic Computation Artificial Intelligence(1987).
Warren, D. An abstract Prolog instruction set. — Tech. note 309, SRI Intern.(1983).
Tick, E. Warren, D. Towards a pipelined Prolog processor. New Generation Computing, 2, pp. 323–345(1984).
Gallagher, J. Codish, M. Shapiro, E. Specialization of Prolog and FCP programs using abstract interpretation. New Generation Computing, 6, pp. 159–186(1988).
Janssens, G. Bruynooghe, M. On abstracting the procedural behavior of logic programs. This volume.
Kanamory, T. Kawamura, T. Analyzing success patterns of logic programs by abstract hybrid interpretation. ICOT Tech. Report, TR.279(1987).
Debray, S.K. Warren, D.S. Automatic mode inference of logic programs”. J.Logic Programming, 5(3), pp. 207–229(1988).
Mannila, H. Ukkonen, E. Flow analysis of Prolog programs. Proc. 4th Symp. on Logic Programming, pp. 205–214, San Francisco(1987).
Mellish, C.S. Abstract interpretation of Prolog programs. Proc. 3d Int. Conf. on Logic Programming, pp. 181–198, London(1986).
Boulanger, D. Deep logic program transformation using abstract interpretation. This volume.
Bruynooghe, M. The memory management of Prolog implementations. Logic Programming, N.Y, Academic Press, pp. 193–210(1982).
Warren, D. An improved Prolog implementation which optimizes tail recursion. Proc. of the Logic Programming Workshop (Tarnlund, S.A. ed.), Debrecen, Hungary(1980).
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).
Gavrilenko, Ju. Recursion and iteration on Cuper algebras (Russ.). To publish.
Gavrilenko, Ju. Applications of Cuper algebras to the theory of tail recursion in logic programming (Russ.). To publish.
Author information
Authors and Affiliations
Editor information
Rights 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