34
35:- module(rtcprops, [acheck/1, acheck/2, acheck/3, no_acheck/1, no_acheck/2]). 36
37:- use_module(library(assertions)). 38:- use_module(library(metaprops)). 39:- use_module(library(globprops)). 40:- init_expansors. 41
42:- true comp [functor/3,
43 predicate_property/2,
44 current_predicate/2,
45 (>)/2,
46 (<)/2,
47 (>=)/2,
48 (=<)/2,
49 (=\=)/2,
50 (=:=)/2,
51 (is)/2,
52 atomic_list_concat/2,
53 atomic_list_concat/3,
54 atom_number/2,
55 atom_codes/2,
56 sub_atom/5,
57 maplist/2,
58 maplist/3,
59 maplist/4,
60 maplist/5,
61 memberchk/2] + no_acheck(rt).
62
63:- type acstatus/1.
87acstatus(unimplemented).
88acstatus(incomplete).
89acstatus(complete).
90acstatus(unknown).
91acstatus(exhaustive).
92acstatus(impossible).
93
94:- type ctrt/1.
95
96ctrt(ct).
97ctrt(rt).
98
99:- global acheck(T, Status, G) : ctrt * acstatus * callable
100 # "The ~w assertion check of ~w has the status ~w."-[T, G, Status].
101
102acheck(_, _, Goal) :- call(Goal).
103
104:- global acheck(T, G) + equiv(acheck(T, complete, G))
105 # "Equivalent to acheck(~w, complete, ~w)."-[T, G].
106
107acheck(_, Goal) :- call(Goal).
108
109:- global acheck(G) + equiv(acheck(ct, acheck(rt, G))).
110
111acheck(Goal) :- call(Goal).
112
113:- global no_acheck(T, G) + equiv(acheck(T, impossible, G))
114 # "Declares that the assertion in which this comp property appears must not
115 be checked at compile-time/run-time.".
116
117no_acheck(_, Goal) :- call(Goal).
118
119:- global no_acheck(G) + equiv(noacheck(ct, noacheck(rt, G))).
120
121no_acheck(Goal) :- call(Goal)