Logtalk reference manual
Predicate directive: annotation/1

annotation/1

Description

annotation(AnnotationTemplate)

Experimental directive for declaring annotations of predicate clause heads. Annotations typically use an infix operator and can be found on several Prolog libraries and extensions such as ProbLog and CHR. The annotation value can be any Prolog term. The annotation template uses a notation similar to meta-predicate templates. Annotation values which are goals are represented by the integer 0. Non-goal annotation values are represented by the atom *.

Template and modes

annotation(+annotation_template_term)

Examples

:- annotation('==>'(0,0)).
:- annotation('#'(0,*)).

:- annotation('~'(*, 0)).