Skip to main content
Log in

Specialisation of Prolog and FCP programs using abstract interpretation

  • Published:
New Generation Computing Aims and scope Submit manuscript

Abstract

This paper presents an approach to specialising logic programs which is based on abstract interpretation. Program specialisation involves two stages, the construction of an abstract computation tree and a program construction stage. For the tree construction stage, abstract OLDT resolution is defined and used to construct a complete and finite tree corresponding to a given logic program and a goal. In the program construction stage, a specialised program is extracted from this tree.

We focus on two logic programming languages: sequential Prolog and Flat Concurrent Prolog. Although the procedural reading of concurrent logic programs is very different from that of sequential programs, the techniques presented provide a uniform approach to the specialisation of both languages. We present the results for Prolog rigorously, and extend them less formally to Flat Concurrent Prolog.

There are two main advantages of basing program specialisation on abstract interpretation. Firstly, termination can be ensured by using abstract interpretations over finite domains, while performing a complete flow analysis of the program. Secondly, correctness of the specialised program is closely related to well-defined consistency conditions on the concrete and abstract interpretations.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

References

  1. Cousot, P. and Cousot, R., “Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints,”POPL 77.

  2. Mycroft, A., “Abstract Interpretation and Optimising Transformations for Applicative Programs, “Ph. D Thesis, University of Edinburgh, Dept. of Comp. Sci., Dec., 1981.

  3. Bruynooghe, M., Janssens, G., Callebaut, A. and Demoen, B., “Abstract Interpretation: Towards the Global Optimisation of Prolog Programs,”Proceedings of IEEE Symposium on Logic Programming, San Francisco, 1987.

  4. Debray, S. K., “Global Optimizations of Logic Programs,”Ph. D Thesis, State University of New York at Stony Brook, December, 1986.

  5. Jones, N. D. and Søndergaard, H., “A Semantics-Based Framework for the Abstract Interpretation of Prolog,” inAbstract Interpretation of Declarative Languages (S. Abramsky and C. Hankin eds.), Ellis Horwood, 1987.

  6. Kanamori, T. and Kawamura, T., “Analyzing Success Patterns of Logic Programs by Abstract Hybrid Interpretation,”ICOT Technical Report, 1987.

  7. Mannila, H. and Ukkonen, E., “Flow Analysis of Prolog Programs”,Proceedings of IEEE Symposium on Logic Programming, San Francisco, 1987.

  8. Mellish, C. S., “Abstract Interpretation of Prolog Programs”,Proc. 3rd ICLP LNCS 225, Springer-Verlag, 1986.

  9. Shapiro E., “Concurrent Prolog: A Progress Report,”IEEE Computer, August, 1986.

  10. Harel D. and Pnueli A., “On The Development of Reactive Systems,” inLogics and Models of Concurrent Systems (K. R. Apt ed)., Springer-Verlag, 1985.

  11. Brock, J. D. and Ackerman, W. B., “Scenarios: A Model of Non-determinate Computations,” in Dias and Ramos (eds.),Formalization of programming Concepts, LNCS 107, pp. 251–259, Springer-Verlag, 1981.

  12. Takeuchi, A., “Affinity Between Meta Interpreters and Partial Evaluation,” ICOT Technical Report, TR-166 (April 1986)

  13. Eder, E., “Properties of Substitutions and Unifications,”J. Symbolic Computation (1985) 1, pp. 31–46.

    Article  MATH  MathSciNet  Google Scholar 

  14. Futamura, Y., “Partial Evaluation of Computation Process: An Approach to a Compiler Compiler,”Systems, Computers, Controls, 2(5), pp. 45–50, 1971.

    Google Scholar 

  15. Ershov, A. P., “On the Partial Computation Principle,”,Information Processing Letters; 6(2): 38–41, April 1977.

    Article  MATH  Google Scholar 

  16. Jones, N., Sestoft, P. and Søndergaard, H. “An experiment in Partial Evaluation: The Generation of a Compiler Generator,” in J. P. Jouannaud (ed.),Rewriting Techniques and Applications, Dijon, France, 1985, LNCS 202, pp. 124–140, Springer-Verlag.

  17. Tamaki, H. and Sato, T., “OLD Resolution with Tabulation”, Proc. 3rd ICLP, LNCS, 225, Springer-Verlag, 1986.

  18. Bruynooghe, M., “A Framework for the Abstract Interpretation of Prolog”, Report CW 62, Dept. of Computer Science, Katholieke Universiteit Leuven, Belgium, October 1987.

    Google Scholar 

  19. Winsborough, W., “A Minimal Graph Semantics for Logic Programs,” University of Wisconsin —Madison Technical Report, Dept. of Computer Science, August 1987.

  20. Fujita, H., “Abstract Interpretation and Partial Evaluation of Prolog Programs,” ICOT Technical Report, September 1986.

  21. Safra, S., “Partial Evaluation of Concurrent Prolog and its Implications”, Masters Thesis, Technical Report, CS 86-24, Dept. of Computer Science Weizmann Institute (1986).

  22. Furukawa, K., Okumura, A. and Murakami, M., “Unfolding Rules for GHC Programs,” ICOT Technical Report, 1987.

  23. Gerth, R., Codish, M., Lichtenstein, Y. and Shapiro, E., “Fully Abstract Denotational Semantics for Concurrent Prolog,” Proc. LICS’88, Edinburgh (1988).

Download references

Author information

Authors and Affiliations

Authors

About this article

Cite this article

Gallagher, J., Codish, M. & Shapiro, E. Specialisation of Prolog and FCP programs using abstract interpretation. New Gener Comput 6, 159–186 (1988). https://doi.org/10.1007/BF03037136

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF03037136

Keywords

Navigation