M. Kulas. Annotations for Prolog - A concept and runtime handling. In A. Bossi, editor, Selected Papers of the 9th Int. Workshop on Logic-Based Program Synthesis and Transformation (LOPSTR'99), Venezia, volume 1817 of LNCS, pages 234-254. Springer-Verlag, 2000.

Abstract

A concept of annotations for rendering procedural aspects of Prolog is introduced, built around well-known procedural concepts of Standard Prolog. Annotations describe properties of predicates. Such properties can be pre or post conditions, which must hold true when a predicate is called or exited, respectively. We introduce two more kinds of annotations, fail and redo annotations, hence incorporating a whole model of Prolog execution into our language. This enables natural rendering of many procedural properties of Prolog which cannot be expressed with only pre/post conditions, like non-failure. Every annotation can be narrowed down to a subset of calls, via calling premiss. With the novel idea of context we supersede program-point assertions. The annotations are defined simply as Prolog goals, making them fully parametric and therefore comfortable for debugging. All examples presented are actual runs of our system Nope.

Available: PS, BibTeX