Abstract
The abstract interpretation framework has been used mainly in the global analysis of programs. Most often also, this interpretation is applied to the source Prolog program. In this paper we present an abstract interpretation of more local nature, and applied to the intermediate code (WAM). The purpose of obtaining a more efficient specialized version of the program remains the same as in global analysis approaches. Our specialization is multiple, meaning that we generate a different version for each entry pattern detected by analysis. This poly-variant unfolding of predicates allows the local (predicate level) analysis to propagate inter-procedurally relevant information. Besides time and complexity reduction of local versus global analysis, our approach is suited for goal-independent specialization, and for the partial selection of predicates to specialize. The evaluation of this more general specialization of programs in a full compiler shows that it is an alternative to global and goal-dependent methods.
Keywords:
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
1. Hassan Aït-Kaci. Warren’s Abstract Machine - A Tutorial Reconstruction. MIT Press, 1991.
Mats Carlsson. Internals of Sicstus Prolog version 0.6. Internal Report, Gigalips Project, November 1987.
Mats Carlsson. Design and Implementation of an OR-Parallel Prolog Engine. SICS Dissertation Series 02, The Royal Institute of Technology, 1990.
Philippe Codognet and Daniel Diaz. wamcc: Compiling Prolog to C. In Leon Sterling, editor, Proc. of the 12th International Conference on Logic Programming, pages 317–332, Cambridge, June 13-18 1995. MIT Press.
P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proc. of SPPL’77, pages 238–252, Los Angeles, California, 1977.
P. Cousot and R. Cousot. Abstract interpretation and application to logic programs. The Journal of Logic Programming, 13(1, 2, 3 and 4):103–179, 1992.
S. K. Debray. Abstract Interpretation and Low-Level Code Optimization. In Proc. of PEPM’95, pages 111–121. ACM Press, June 1995.
M. Ferreira. Advanced Specialization Techniques for the Compilation of Declarative Languages . PhD thesis, Universidade do Porto, April 2002.
M. Ferreira and L. Damas. Multiple specialization of WAM code. Proc. of PADL’99, LNCS, 1551:243–258, 1999.
M. Hermenegildo, R. Warren, and S. K. Debray. Global Flow Analysis as a Practical Compilation Tool. JLP, 13(4):349–367, August 1992.
D. Jacobs, A. Langen, and W. Winsborough. Multiple specialization of logic programs with run-time tests. Proc. of ICLP’90, pages 717–731, June 1990.
A. Kelly, A. Macdonald, K. Marriott, P. Stuckey, and R. Yap. Effectiveness of optimizing compilation for CLP(R). Proc. of JICSLP’96, pages 37–51, 1996.
A. King and P. Soper. Depth-k sharing and freeness. In Proc. of the ICLP’94, pages 553–568. The MIT Press, 1994.
A. Krall and T. Berger. The VAMAI-an abstract machine for incremental global dataflow analysis of Prolog. In ICLP’95 Post-Conference Workshop on Abstract Interpretation of Logic Languages, pages 80–91, Tokyo, 1995.
A. Krall and U. Neumerkel. The Vienna Abstract Machine. In Proc. of PLIP’90, number 456 in LNCS, pages 121–135. Sweeden, Springer-Verlag, 1990.
Thomas Lindgren. Polyvariant detection of uninitialized arguments of Prolog predicates. Journal of Logic Programming, 28(3):217–229, September 1996.
G. Puebla and M. Hermenegildo. Implementation of Multiple Specialization in Logic Programs. In Proc. of PEPM’95, pages 77–87. ACM Press, June 1995.
Taisuke Sato and Hisao Tamaki. Enumeration of success patterns in logic programs. Theoretical Computer Science, 34(1–2):227–240, November 1984.
J. Tan and I. Lin. Compiling dataflow analysis of logic programs. In Proc. of PLDI’92, pages 106–115, San Francisco, California, 1992. SIGPLAN.
A. Taylor. Removal of Dereferencing and Trailing in Prolog Compilation. In Proc. of ICLP’89, pages 48–60, Lisbon, 1989. The MIT Press.
A. Taylor. High Performance Prolog Implementation. PhD thesis, University of Sydney, June 1991.
P. Van Roy. Can Logic Programming Execute as Fast as Imperative Programming? PhD thesis, University of California at Berkeley, November 1990.
W. H. Winsborough. Path-dependent reachability analysis for multiple specialization. In Proc. of NACLP’89. “MIT Press”, 1989.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ferreira, M., Damas, L. (2003). WAM Local Analysis. In: Dahl, V., Wadler, P. (eds) Practical Aspects of Declarative Languages. PADL 2003. Lecture Notes in Computer Science, vol 2562. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-36388-2_20
Download citation
DOI: https://doi.org/10.1007/3-540-36388-2_20
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-00389-2
Online ISBN: 978-3-540-36388-0
eBook Packages: Springer Book Archive