Skip to main content

Improvements in compile-time analysis for Ground Prolog

  • Conference paper
  • First Online:
Progamming Language Implementation and Logic Programming (PLILP 1993)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 714))

Abstract

Ground Prolog is a restricted subset of pure Prolog that enables a very good data flow analysis. This will make it possible to compile Ground Prolog programs to object code which is as efficient as code produced by normal imperative language compilers.

Ground Prolog does not allow that terms contain uninstantiated variables at runtime. Programs must therefore rely on algorithms that uses term copying to update data structures. The efficient execution of Ground Prolog programs will therefore rely heavily on analysis methods that, at compile time, can remove this term copying wherever possible (compile time garbage collection).

Kluźniak defined methods for data flow analysis of Ground Prolog programs that can be used for type synthesis and for compile time garbage collection.

In this paper it is shown how the type synthesis can be improved, thereby also improving the compile time garbage collection analysis, and the possibility of compiling programs to efficient code.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. M. Bruynooghe, G. Janssens, A. Callebaut, and B. Demoen. Abstract interpretation: Towards the global optimization of Prolog programs. In Proceedings of the 1987 Symposium on Logic Programming [5], pages 192–204.

    Google Scholar 

  2. Maurice Bruynooghe. Compile time garbage collection. Technical Report CW43, Departement Computerwetenschappen,Katholieke Universiteit, Leuven, 1986.

    Google Scholar 

  3. Maurice Bruynooghe. Compile time garbage collection or how to transform programs in an assignment-free language into code with assignments. In IFIP TC 2 Working Conference on Program Specification and Transformation, Bad Tölz, F.R. Germany, 1986.

    Google Scholar 

  4. W. Drabent. Do logic programs resemble programs in conventional languages? In Proceedings of the 1987 Symposium on Logic Programming [5], pages 389–397.

    Google Scholar 

  5. IEEE. Proceedings of the 1987 Symposium on Logic Programming, San Francisco, August–September 1987. Computer Society Press.

    Google Scholar 

  6. Andreas Kågedal. Logic Programming with External Procedures: an Implementation. Licentiate thesis no. 326, Linköping University, Dept. of Computer and Information Science, S-581 83 Linköping, Sweden, 1992.

    Google Scholar 

  7. F. Kluźniak. Type synthesis for Ground Prolog. In Jean-Louis Lassez, editor, Proceedings of the Fourth International Conference on Logic Pro gramming, MIT Press Series in Logic Programming, pages 788–816, Melbourne, 1987. The MIT Press.

    Google Scholar 

  8. F. Kluźniak and S. Szpakowicz. Prolog for Programmers. Academic Press, London, 1985.

    Google Scholar 

  9. Feliks Kluźniak. Static Analysis of Logic Programs. PhD thesis, Warsaw University, 1986. in Polish; unpublished.

    Google Scholar 

  10. Feliks Kluźniak. Compile time garbage collection for Ground Prolog. In Robert A. Kowalski and Kenneth A. Bowen, editors, Proceedings of the Fifth International Conference and Symposium on Logic Programming, pages 1490–1505, Seatle, 1988. ALP, IEEE, The MIT Press.

    Google Scholar 

  11. C. S. Mellish. Some global optimizations for a Prolog compiler. The Journal of Logic Programming, 2(1):43–66, April 1985.

    Google Scholar 

  12. Anne Mulkers. Deriving Live Data Structures in Logic Programs by Means of Abstract Interpretation. PhD thesis, Department of Computer Science, Katholieke Universiteit Leuven, December 1991. To appear as Lecture Notes in Computer Science 675, Springer-Verlag.

    Google Scholar 

  13. Peter Lodewijk Van Roy. Can Logic Programming Execute as Fast as Imperative Programming? PhD thesis, University of California at Berkeley, November 1990. Report No. UCB/CSD 90/600.

    Google Scholar 

  14. David H. D. Warren. An abstract Prolog instruction set. Technical Note 309, SRI International, Menlo Park, CA, October 1983.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Maurice Bruynooghe Jaan Penjam

Rights and permissions

Reprints and permissions

Copyright information

© 1993 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kågedal, A. (1993). Improvements in compile-time analysis for Ground Prolog. In: Bruynooghe, M., Penjam, J. (eds) Progamming Language Implementation and Logic Programming. PLILP 1993. Lecture Notes in Computer Science, vol 714. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57186-8_73

Download citation

  • DOI: https://doi.org/10.1007/3-540-57186-8_73

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-57186-5

  • Online ISBN: 978-3-540-47945-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics