8 research outputs found
RedAlert: Determinacy Inference for Prolog
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-
Operational and Goal-Independent Denotational Semantics for Prolog with Cut
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
Dealing with Explicit Exceptions in Prolog
International audienceExisting logic languages provide some simple " extra-logical " constructs for control manipulation , such as the cut of standard Prolog and the exception handling constructs of other versions of Prolog (e.g. SICStus Prolog). Aspects specifically concerning the flow of control in a language can be quite naturally modelled by means of the Denotational Semantics, and in particular the Denotational Semantics with Continuations. In this paper we define a De-notational Semantics with Continuations to model the flow of control of a small fragment of a logic language with an explicit exception handling mechanism. Finally we show how the cut operator can be simulated by an appropriate use of the characterized exception handling constructs