Abstract
We study the problem of producing a good compiler for Prolog that generates efficient code for its input programs on the basis of the information inferred by a static analysis of those programs.
The main contribution of our work is to show that in many cases such an optimizing compiler can be obtained by a simple modification of an already existing Prolog compiler.
Our general method is illustrated by describing how the SICStus compiler has been modified in such a way that it uses information about uninitialized variables in order to generate better code than that it would generate without that information. We give tables that measure the costs and advantages of producing that optimizing SICStus compiler. In order to show the generality of our approach, we present also the design of a simple modification of SICStus compiler incorporating recursively dereferenced variables.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Ait-Kaci, H.: Warren’s Abstract Machine. The MIT Press, Cambridge (1991), Prepared with LATEX
Baldan, D.: An Abstract Interpretation Framework for WAM Level Properties. PhD hesis, Department of Pure and Applied Mathematics, University of Padova, Italy (1999)
Bigot, P.A., Gudeman, D., Debray, S.K.: Output value placement in moded Logic programs. In: van Hentenryck, P. (ed.) Logic Programming – Proceedings of the Eleventh International Conference on Logic Programming, pp. 175–189. The MIT Press, Cambridge (1994) Massachusetts Institute of Technology
Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Fourth ACM symposium on Principles of Programming Languages, Los Angeles, california, pp. 238–252. ACM Press, New York (1977)
Grassi, A.: L’individuazione dei Termini Ricorsivamente Dereferenziati nei Programmi Prolog. PhD thesis, Università degli Studi di Padova (March 1998)
Le Charlier, B., Van Hentenryck, P.: Experimental evaluation of a generic abtract interpretation algorithm for PROLOG. ACM Transactions on Programming Languages and Systems 16(1), 35–101 (1994)
Lindgren, T.: Polyvariant detection of uninitialized arguments of prolog predicates. Journal of Logic Programming 28(3), 217–229 (1996)
Lloyd, J.W.: Foundation of Logic Programming, 2nd edn. Springer, Heidelberg (1988)
Mulkers, A.: Live Data Structures in Logic Programs. LNCS, vol. 675. Springer, Heidelberg (1993)
Somogyi, Z., Henderson, F., Conway, T., Jeffery, D.: The Mercury Language Reference Manual (1997)
Taylor, A.: Removal of dereferencing and trailing in prolog compilation. In: Levi, G., Martelli, M. (eds.) Proceedings of the 6th International Conference on Logic Programming (ICLP 1989), Lisbon, Portugal, pp. 48–62. MIT Press, Cambridge (1989)
Taylor, A.: High Performance Prolog Implementation. PhD thesis, Basser Department of Computer Science, University of Sydney (June 1991)
Van Roy, P.L.: Can Logic Programming Execute as Fast as Imperative Programing. PhD thesis, Computer Science Division, University of California Berkeley (December 1990)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Baldan, D., Civran, N., Filé, G., Pulvirenti, F. (1999). A Simple and General Method for Integrating Abstract Interpretation in SICStus. In: Nadathur, G. (eds) Principles and Practice of Declarative Programming. PPDP 1999. Lecture Notes in Computer Science, vol 1702. Springer, Berlin, Heidelberg. https://doi.org/10.1007/10704567_13
Download citation
DOI: https://doi.org/10.1007/10704567_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-66540-3
Online ISBN: 978-3-540-48164-5
eBook Packages: Springer Book Archive