Port Annotations for Prolog

Kulaš, Marija

A concept of annotations for rendering procedural aspects of Prolog is presented. We circumvent the need for a new language: our language is a subset of Standard Prolog and is built around well-known procedural concepts. Still, it is a very powerful language of annotations, compared to related approaches. 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. Our concept tanscends pre/post conditions: 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. There are two more novelties in our approach. First, any annotation can be 'narrowed down' to a subset of calls, via templates and contexts, giving much more flexible and pertinent statements. Notably the novel concept of contexts adds significant expressive power. Second, the annotations are applied via a general kind of matching instead of unification, enabling the use of local variables. We provide many detailed illustrations of the potentials of the approach. All presented examples are actual runs of our system Nope, which is a Prolog module.

Vorschau

Zitieren

Zitierform:

Kulaš, Marija: Port Annotations for Prolog. Hagen 1999. FernUniversität in Hagen.

Zugriffsstatistik

Gesamt

Volltextzugriffe:
Metadatenansicht:

12 Monate

Volltextzugriffe:
Metadatenansicht:

Rechte

Nutzung und Vervielfältigung:
Alle Rechte vorbehalten

Export

powered by MyCoRe