Go to the first, previous, next, last section, table of contents.


Basic data types and properties

Author(s): Daniel Cabeza, Manuel Hermenegildo.

Version: 1.5#118 (2000/4/19, 18:13:43 CEST)

Version of last change: 1.3#100 (1999/11/12, 17:14:25 MET)

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 can be used both as type testing builtins within programs (by calling them explicitly) and as properties in assertions.

Usage and interface (basic_props)

Documentation on exports (basic_props)

REGTYPE: term/1:

The most general type (includes all possible terms).

Usage 1: term(X)

Usage 2: term(X)

REGTYPE: int/1:

The type of integers. The range of integers is [-2^2147483616, 2^2147483616). Thus for all practical purposes, the range of integers can be considered infinite.

Usage 1: int(T)

Usage 2: int(T)

REGTYPE: nnegint/1:

The type of non-negative integers, i.e., natural numbers.

Usage 1: nnegint(T)

Usage 2: nnegint(T)

REGTYPE: flt/1:

The type of floating-point numbers. The range of floats is the one provided by the C double type, typically [4.9e-324, 1.8e+308] (plus or minus).

Usage 1: flt(T)

Usage 2: flt(T)

REGTYPE: num/1:

The type of numbers, that is, integer or floating-point.

Usage 1: num(T)

Usage 2: num(T)

REGTYPE: atm/1:

The type of atoms, or non-numeric constants. The name of an atom must be of less than 512 characters.

Usage 1: atm(T)

Usage 2: atm(T)

REGTYPE: struct/1:

The type of compound terms, or terms with non-zeroary functors.

Usage 1: struct(T)

Usage 2: struct(T)

REGTYPE: gnd/1:

The type of all terms without variables.

Usage 1: gnd(T)

Usage 2: gnd(T)

REGTYPE: constant/1:

Usage 1: constant(T)

Usage 2: constant(T)

REGTYPE: callable/1:

Usage 1: callable(T)

Usage 2: callable(T)

REGTYPE: operator_specifier/1:

The type and associativity of an operator is described by the following mnemonic atoms:

xfx
Infix, non-associative: it is a requirement that both of the two subexpressions which are the arguments of the operator must be of lower precedence than the operator itself.
xfy
Infix, right-associative: only the first (left-hand) subexpression must be of lower precedence; the right-hand subexpression can be of the same precedence as the main operator.
xfx
Infix, left-associative: same as above, but the other way around.
fx
Prefix, non-associative: the subexpression must be of lower precedence than the operator.
fy
Prefix, associative: the subexpression can be of the same precedence as the operator.
xf
Postfix, non-associative: the subexpression must be of lower precedence than the operator.
yf
Postfix, associative: the subexpression can be of the same precedence as the operator.

Usage 1: operator_specifier(X)

Usage 2: operator_specifier(X)

REGTYPE: list/1:

A list is formed with successive applications of the functor '.'/2, and its end is the atom []

Usage 1: list(L)

Usage 2: list(L)

REGTYPE: list/2:

Meta-predicate with arguments: list(?,pred(1)).

Usage 1: list(L,T)

Usage 2: list(L,T)

PROPERTY: member/2:

Usage 1: member(X,L)

Usage 2: member(X,L)

REGTYPE: sequence/2:

A sequence is formed with zero, one or more occurrences of the operator ','/2. For example, a, b, c is a sequence of three atoms, a is a sequence of one atom.

Meta-predicate with arguments: sequence(?,pred(1)).

Usage 1: sequence(S,T)

Usage 2: sequence(S,T)

REGTYPE: sequence_or_list/2:

Meta-predicate with arguments: sequence_or_list(?,pred(1)).

Usage 1: sequence_or_list(S,T)

Usage 2: sequence_or_list(S,T)

REGTYPE: character_code/1:

Usage 1: character_code(T)

Usage 2: character_code(T)

REGTYPE: string/1:

Usage 1: string(T)

Usage 2: string(T)

REGTYPE: predname/1:

Usage 1: predname(P)

Usage 2: predname(P)

REGTYPE: atm_or_atm_list/1:

Usage 1: atm_or_atm_list(T)

Usage 2: atm_or_atm_list(T)

PROPERTY: compat/2:

This property captures the notion of type or property compatibility. The instantiation or constraint state of the term is compatible with the given property, in the sense that assuming that imposing that property on the term does not render the store inconsistent. For example, terms X (i.e., a free variable), [Y|Z], and [Y,Z] are all compatible with the regular type list/1, whereas the terms f(a) and [1|2] are not.

Meta-predicate with arguments: compat(?,pred(1)).

Usage 1: compat(Term,Prop)

Usage 2: compat(Term,Prop)

PROPERTY: iso/1:

Usage 1: iso(G)

Usage 2: iso(G)

PROPERTY: not_further_inst/2:

Usage 1: not_further_inst(G,V)

Usage 2: not_further_inst(G,V)

PROPERTY: regtype/1:

Usage 1: regtype(G)

Usage 2: regtype(G)


Go to the first, previous, next, last section, table of contents.