
This library contains the set of basic properties used by the builtin predicates, and which constitute the basic data types and properties of the language. They are intented to be used as properties in assertions (for both runtime and compile time checking).
Note that most of those properties can be used directly from goals as type testing builtins, and they should be correct when terms are sufficiently instantiated. Calling with uninstantiated terms have undefined behaviour (failure or non termination, depending on the type). Please use the run-time checking facilities (inst/2 and compat/2) to ensure well-defined behaviour. For low-level instantiation checks we encourage the use term_typing builtins.
Usage:term(X)
X is any term.
Usage:int(T)
T is an integer.
Usage:nnegint(T)
T is a non-negative integer.
Usage:flt(T)
T is a float.
Usage:num(T)
T is a number.
Usage:atm(T)
T is an atom.
Usage:struct(T)
T is a compound term.
Usage:gnd(T)
T is ground.
Usage:gndstr(T)
T is a ground compound term.
Usage:constant(T)
T is an atomic term (an atom or a number).
Other properties:
Usage:cgoal(T)
T is a term which represents a goal, i.e., an atom or a structure.
Other properties:
Usage:callable(T)
T is instantiated with an atom or a structure (also known as callable).
Other properties:
Usage:internal_module_id(M)
M is an internal module identifier
Usage:operator_specifier(X)
X specifies the type and associativity of an operator.
Other properties:
list([]).
list([_1|L]) :-
list(L).
Usage:list(L)
L is a list.
Other properties:
L is a list, and for all its elements, T holds.
Usage:list(T,L)
L is a list of Ts.
Meta-predicate with arguments: list(pred(1),?).
Usage:nlist(T,L)
L is T or a nested list of Ts. Note that if T is term, this type is equivalent to term, this fact explains why we do not have an nlist/1 type.
Meta-predicate with arguments: nlist(pred(1),?).
Usage:member(X,L)
X is an element of L.
Other properties:
Usage:sequence(T,S)
S is a sequence of Ts.
Meta-predicate with arguments: sequence(pred(1),?).
Usage:sequence_or_list(T,S)
S is a sequence or list of Ts.
Meta-predicate with arguments: sequence_or_list(pred(1),?).
Usage:character_code(T)
T is an integer which is a character code.
Other properties:
Usage:string(T)
T is a string (a list of character codes).
Other properties:
Usage:bytelist(T)
T is list of bytes.
Other properties:
P is a Name/Arity structure denoting a predicate name:
predname(P/A) :-
atm(P),
nnegint(A).
Usage:predname(P)
P is a predicate name.
Other properties:
Usage:atm_or_atm_list(T)
T is an atom or a list of atoms.
Other properties:
Usage:compat(Term,Prop)
Term is compatible with Prop.
Meta-predicate with arguments: compat(?,pred(1)).
Usage:inst(Term,Prop)
Term is instantiated enough to satisfy Prop.
Meta-predicate with arguments: inst(?,pred(1)).
Usage:iso(G)
Complies with the ISO-Prolog standard.
Meta-predicate with arguments: iso(goal).
Usage:deprecated(G)
DEPRECATED.
Meta-predicate with arguments: deprecated(goal).
Usage:srcloc(Goal,Src,LB,LE)
Usage:example(G)
EXAMPLE.
Meta-predicate with arguments: example(goal).
Usage:fails(X)
Calls of the form X fail.
Usage:not_further_inst(G,V)
V is not further instantiated.
Meta-predicate with arguments: not_further_inst(goal,?).
Declares that G is side-effect free (if its execution has no observable result other than its success, its failure, or its abortion), soft (if its execution may have other observable results which, however, do not affect subsequent execution, e.g., input/output), or hard (e.g., assert/retract).
Usage:sideff(G,X)
G is side-effect X.
Usage:regtype(G)
Defines a regular type.
Meta-predicate with arguments: regtype(goal).
Usage:native(Pred)
This predicate is understood natively by CiaoPP.
Meta-predicate with arguments: native(goal).
Usage:native(Pred,Key)
This predicate is understood natively by CiaoPP as Key.
Meta-predicate with arguments: native(goal,?).
Usage:rtcheck(G)
Equivalent to rtcheck(G, complete).
Usage:rtcheck(G,Status)
The runtime check of this property is Status.
Usage:no_rtcheck(G)
G is not checked during run-time checking.
Usage:eval(Goal)
Goal is evaluable at compile-time.
Meta-predicate with arguments: eval(goal).
Usage:equiv(Goal1,Goal2)
Goal1 is equivalent to Goal2.
Meta-predicate with arguments: equiv(goal,goal).
Usage:bind_ins(Goal)
Goal is binding insensitive.
Meta-predicate with arguments: bind_ins(goal).
Usage:error_free(Goal)
Goal is error free.
Meta-predicate with arguments: error_free(goal).
Usage:memo(Goal)
Goal should be memoized (not unfolded).
Meta-predicate with arguments: memo(goal).
Usage:filter(Vars,Goal)
Vars should be filtered during global control).
Usage:flag_values(X)
Define the valid flag values
Usage:pe_type(Goal)
Goal will be filtered in partial evaluation time according to the PE types defined in the assertion.
Meta-predicate with arguments: pe_type(goal).