Automatic bottom-up analysis and transformation of logic programs
The comparatively small size and clean declarative semantics of logic programs hide performance issues that must be accounted for if the programs are to be executed using the currently available technology. Proposals have been made to tackle these computational issues by analysing a program and trying to optimise its code. We introduce a bottom-up method for analysing logic programs. The method incrementally builds self-contained subtheories of the initial program, starting from facts and then picking up more complex clauses that depend on simpler, previously analysed constructs. A transformation system is then applied to these subtheories yielding more efficient subprograms. Eventually a subtheory that encompasses the full initial program is obtained.
KeywordsLogic programming automatic program transformation
Unable to display preview. Download preview PDF.
- [FF92]N. E. Fuchs and M. P. J Fromherz. Schema-Based Transformations of Logic Programs. In Proceedings of the International Workshop on Logic Program Synthesis and Transformation (LoPSTr'92). Springer-Verlag, 1992.Google Scholar
- [Gal95]J. P. Gallagher. A Bottom-Up Analysis Toolkit. Technical report, Dept. Comp. Sci., Univ. of Bristol, 1995. Invited talk given at WAILL (Workshop on Abstract Interpretation of Logic Languages), Israel.Google Scholar
- [HL78]G. Huet and B. Lang. Proving and Applying Program Transformations Expressed with Second-Order Patterns. Acta Informatica, 11:31–55, 1978.Google Scholar
- [LS90]A. Lakhotia and L. Sterling. How to Control Unfolding when Specialising Interpreters. In L. Sterling, editor, The Practice of Prolog. MIT Press, 1990.Google Scholar
- [PP92]M. Proietti and A. Pettorossi. Best-first Strategies for Incremental Transformations of Logic Programs. In Proceedings of the Second International Workshop on Logic Program Synthesis and Transformation (LoPSTr'92), 1992.Google Scholar
- [PP94]M. Proietti and A. Pettorossi. Transformations of Logic Programs: Foundations and Techniques. Journal of Logic Programming, 19, 20:261–320, 1994.Google Scholar
- [Rob91]D. Robertson. A Simple Prolog Techniques Editor for Novice Users. In 3rd Annual Conference on Logic Programming, Edinburgh, Scotland, April 1991. Springer-Verlag.Google Scholar
- [VAa96]W. W. Vasconcelos and M. T. Aragão. Proving Schema-Based Transformations for Logic Programs. Extended Abstract, 1996. Available from authors.Google Scholar
- [VF95]W. W. Vasconcelos and N. E. Fuchs. Opportunistic Logic Program Analysis and Optimisation: Enhanced Schema-Based Transformations for Logic Programs and their Usage in an Opportunistic Framework for Program Analysis and Optimisation. Tech. Rep. 95.24, IFI, Univ. Zürich, 1995.Google Scholar
- [VF96a]W. W. Vasconcelos and N. E. Fuchs. An Opportunistic Approach for Logic Program Analysis and Optimisation using Enhanced Schema-Based Transformations. In Proc. 5th Int'l Workshop on Logic Program Synthesis and Transformation (LoPSTr'95), The Netherlands, 1996. Springer-Verlag.Google Scholar
- [VF96b]W. W. Vasconcelos and N. E. Fuchs. Prolog Program Development via Enhanced Schema-Based Transformations. Technical report, Department of Artificial Intelligence, University of Edinburgh, 1996.Google Scholar