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).
Usage:cgoal(T)
T is a term which represents a goal, i.e., an atom or a structure.
Usage:callable(T)
T is instantiated with an atom or a structure (also known as callable).
Usage:internal_module_id(M)
M is an internal module identifier
Usage:operator_specifier(X)
X specifies the type and associativity of an operator.
list([]). list([_1|L]) :- list(L).
Usage:list(L)
L is a list.
L is a list, and for all its elements, T holds.
Usage:list(T,L)
L is a list of Ts.
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.
Usage:member(X,L)
X is an element of L.
Usage:sequence(T,S)
S is a sequence of Ts.
Usage:sequence_or_list(T,S)
S is a sequence or list of Ts.
Usage:character_code(T)
T is an integer which is a character code.
Usage:string(T)
T is a string (a list of character codes).
Usage:bytelist(T)
T is list of bytes.
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.
Usage:atm_or_atm_list(T)
T is an atom or a list of atoms.
Usage:compat(Term,Prop)
Term is compatible with Prop.
Usage:inst(Term,Prop)
Term is instantiated enough to satisfy Prop.
Usage:iso(G)
Complies with the ISO-Prolog standard.
Usage:deprecated(G)
DEPRECATED.
Usage:srcloc(Goal,Src,LB,LE)
Usage:example(G)
EXAMPLE.
Usage:fails(X)
Calls of the form X fail.
Usage:not_further_inst(G,V)
V is not further instantiated.
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.
Usage:native(Pred)
This predicate is understood natively by CiaoPP.
Usage:native(Pred,Key)
This predicate is understood natively by CiaoPP as Key.
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.
Usage:equiv(Goal1,Goal2)
Goal1 is equivalent to Goal2.
Usage:bind_ins(Goal)
Goal is binding insensitive.
Usage:error_free(Goal)
Goal is error free.
Usage:memo(Goal)
Goal should be memoized (not unfolded).
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.