A semantics-based determinacy analysis for prolog with cut

  • Torben Æ. Mogensen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1181)


At PEPM'91 Sahlin presented a determinacy analysis for Prolog with cut. The analysis was, however, not justified in any kind of semantics for Prolog, so correctness was argued with respect to an intuitive idea of the behaviour of Prolog programs.

We now start with a denotational semantics of Prolog and derive a variant of Sahlins analysis as an abstraction of this. We observe that we avoid some problems Sahlin had, and in addition get rid of some redundant domain elements, which our semantics show can not be distinguished by any context.

To obtain better precision in the abstract interpretation we do fixed-point iteration in two steps: First we find the least equivalence class using a powedomain ordering, then we find the least fixed-point within that equivalence class using the subset ordering. We believe this method is original.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    S. Abramsky and C. Hankin, Abstract Interpretation of Declarative Languages, Chichester: Ellis Horwood, 1987.Google Scholar
  2. 2.
    A. de Bruin and E.P. de Vink, Continuation Semantics for PROLOG with Cut, Proceedings of TAPSOFT'89, Springer LNCS 351, pp. 178–192, 1989.Google Scholar
  3. 3.
    S. K. Debray and P. Mishra, Denotational and Operational Semantics for Prolog, Journal of Logic Programming 5, pp. 61–91, 1988.Google Scholar
  4. 4.
    N. D. Jones and A. Mycroft, Stepwise Development of Operational and Denotational Semantics for PROLOG, 1984 International Symposium on Logic Programming, pp. 281–288, IEEE Computer Society Press 1984.Google Scholar
  5. 5.
    G. D. Plotkin, A Powerdomain Construction, SIAM J. of Computing, Vol 5, No.3, September 1976.Google Scholar
  6. 6.
    D. Sahlin, Determinacy Analysis for Full Prolog, Proceedings of PEPM'91, pp. 23–30, ACM Press 1991.Google Scholar
  7. 7.
    SICStus Prolog User's Manual (v. 2.1), SICS, 1983Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Torben Æ. Mogensen
    • 1
  1. 1.DIKUUniversity of CopenhagenKøbenhavn ØDenmark

Personalised recommendations