1,741 research outputs found

    RedAlert: Determinacy Inference for Prolog

    Get PDF
    This paper revisits the problem of determinacy inference addressing the problem of how to uniformly handle cut. To this end a new semantics is introduced for cut, which is abstracted to systematically derive a backward analysis that derives conditions sufficient for a goal to succeed at most once. The method is conceptionally simpler and easier to implement than existing techniques, whilst improving the latter's handling of cut. Formal arguments substantiate correctness and experimental work, and a tool called 'RedAlert' demonstrates the method's generality and applicability.Comment: Theory and Practice of Logic Programming, 2011, 27th Int'l. Conference on Logic Programming (ICLP'11) Special Issue, volume 11, issue 4-

    Automated Termination Analysis for Logic Programs with Cut

    Full text link
    Termination is an important and well-studied property for logic programs. However, almost all approaches for automated termination analysis focus on definite logic programs, whereas real-world Prolog programs typically use the cut operator. We introduce a novel pre-processing method which automatically transforms Prolog programs into logic programs without cuts, where termination of the cut-free program implies termination of the original program. Hence after this pre-processing, any technique for proving termination of definite logic programs can be applied. We implemented this pre-processing in our termination prover AProVE and evaluated it successfully with extensive experiments

    Continuation semantics for PROLOG with cut

    Get PDF
    We present a denotational continuation semantics for PROLOG with cut. First a uniform language B is studied, which captures the control flow aspects of PROLOG. The denotational semantics for B is proven equivalent to a transition system based operational semantics. The congruence proof relies on the representation of the operational semantics as a chain of approximations and on a convenient induction principle. Finally, we interpret the abstract language B such that we obtain equivalent denotational and operational models for PROLOG itself

    Retractions in comparing PROLOG semantics

    Get PDF
    We present an operational model O and a continuation based denotational model D for a uniform variant of PROLOG, including the cut operator. The two semantical definitions make use of higher order transformations Phi and Psi, respectively. We prove O and D equivalent in a novel way by comparing yet another pair of higher order transformations Phi~ and Psi~, that yield Phi and Psi, respectively, by application of a suitable abstraction operator

    Comparative metric semantics for concurrent Prolog

    Get PDF
    AbstractThis paper shows the equivalence of two semantics for a version of Concurrent Prolog with non-flat guards: an operational semantics based on a transition system and a denotational semantics which is a metric semantics (the domains are metric spaces). We do this in the following manner. First a uniform language L is considered, that is a language where the atomic actions have arbitrary interpretations. For this language we define an operational and a denotational semantics, and we prove that the denotational semantics is correct with respect to the operational semantics. This result relies on Banach's fixed point theorem. Techniques stemming from imperative languages are used. Then we show how to translate a Concurrent Prolog program to a program in L by selecting certain basic sets for L and then instantiating the interpretation function for the atomic actions. In this way we induce the two semantics for Concurrent Prolog and the equivalence between the two semantics

    Operational and Goal-Independent Denotational Semantics for Prolog with Cut

    Get PDF
    In this paper we propose an operational and a denotational semantics for Prolog. We deal with the control rules of Prolog and the cut operator. Our denotational semantics provides a goal--independent semantics. This means that the behaviour of a goal in a program is defined as the evaluation of the goal in the denotation (semantics) of the program. We show how our denotational semantics can be specialised into a computed answer semantics and into a call pattern semantics. Our work provides a basis for a precise abstract interpretation of Prolog programs
    • …
    corecore