Skip to main content

Static analysis of Prolog with cut

  • Conference paper
  • First Online:
Logic Programming and Automated Reasoning (LPAR 1993)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 698))

Abstract

This paper presents a general approach to the Abstract Interpretation of Prolog programs with cut. In most of previous approaches the cut primitive is merely ignored.

Our method consists in trasforming an interpreter for Prolog into an interpreter that computes on abstract values and that performs loop-checks by storing all encountered call patterns into a table. In order to guarantee correctness, this tabled interpreter needs information about the sure success of the corresponding concrete computations. Such information, called control information, is used to control the execution of the cuts by the tabled interpreter: a cut is executed only if the control information guarantees that it is also executed at the concrete level, otherwise, the cut is ignored. Control information can be easily added to any abstract domain.

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. K. Apt: Introduction to Logic Programming. Handbook of Theoretical Computer Science, J.van Leeuwen, editor, North Holland, 1990.

    Google Scholar 

  2. R. Barbuti, M. Codish, R. Giacobazzi, and G. Levi: Modelling Prolog Control. In: Proc. Nineteenth Annual ACM Symposium on Principles of Programming Languages, pp 95–104. ACM Press, 1992.

    Google Scholar 

  3. P. Codognet and G. Filé: Computations, abstractions and constraints in logic programs. In: Proc. Fourth International Conference on Programming Languages (ICCL'92), Oakland, U.S.A., April 1992.

    Google Scholar 

  4. P. Cousot and R. Cousot: Abstract Interpretation and Application to Logic Programs. Journal of Logic Programming, 13(2&3):103–179, July, 1992.

    Article  Google Scholar 

  5. M. Bruynooghe, M. Codish, D. Dams and G. Filé: Freeness analysis for logic programs, 1992. To appear in ICLP'93.

    Google Scholar 

  6. A. Cortesi and G. Filé: Abstract Interpretation of Logic Programs: an abstract domain for groundness, equivalence, sharing and freeness analysis. In: N.D. Jones and P. Hudak (eds): ACM Symposium on partial evaluation and semantics based program manipulation. SIGPLAN NOTICES, 26(9), pp. 52–61. 1991.

    Google Scholar 

  7. A. Cortesi, G. Filé, and S. Rossi: Abstract Interpretation of Prolog: the treatment of the buit-ins. In: Costantini (ed): Proc. GULP'92, 1992.

    Google Scholar 

  8. A. Cortesi, G. Filé, and W. Winsborough: Prop revisited: Propositional Formulas as Abstract Domain for Groundness Analysis. In: G. Kahn (ed): Proceedings of the IEEE sixth annual symposium on Logic In Computer Science (LICS'91), pp. 322–327, Amsterdam, 1991. IEEE Press.

    Google Scholar 

  9. S.K. Debray and P. Mishra: Denotational and Operational Semantics for Prolog. In: M. Wirsing (ed): Formal Description of Programming Concepts III, pp. 245–269. North-Holland, Amsterdam, 1987. 1987.

    Google Scholar 

  10. T. Kanamori and T. Kawamura: Abstract Interpretation based on OLDT-resolution. ICOT Research Report, Tokyo, July, 1990.

    Google Scholar 

  11. B. Le Charlier and S. Rossi: An Accurate Abstract Interpretation Framework for Prolog with cut. Submitted to ILPS'93.

    Google Scholar 

  12. J.W. Lloyd: Foundations of Logic Programming. Springer, 1987.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Andrei Voronkov

Rights and permissions

Reprints and permissions

Copyright information

© 1993 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Filé, G., Rossi, S. (1993). Static analysis of Prolog with cut. In: Voronkov, A. (eds) Logic Programming and Automated Reasoning. LPAR 1993. Lecture Notes in Computer Science, vol 698. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-56944-8_48

Download citation

  • DOI: https://doi.org/10.1007/3-540-56944-8_48

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-56944-2

  • Online ISBN: 978-3-540-47830-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics