Extra-logical properties for typing

Author(s): Daniel Cabeza, Manuel Hermenegildo.

This library contains traditional Prolog predicates for testing types. They depend on the state of instantiation of their arguments, thus being of extra-logical nature.

Usage and interface

Documentation on exports

PROPERTYvar/1

Usage:var(X)

X is a free variable.

  • The following properties hold globally:
    (basic_props:native/2)This predicate is understood natively by CiaoPP as free(X).
Other properties:

  • The following properties hold globally:
    (native_props:is_det/1)All calls of the form var(Arg1) are deterministic.
    (native_props:test_type/2)Indicates the type of test that a predicate performs. Required by the nonfailure analyisis.
var(X)

var(X)

  • If the following properties hold at call time:
    (term_typing:nonvar/1)X is currently a term which is not a free variable.
    then the following properties hold globally:
    (basic_props:eval/1)var(X) is evaluable at compile-time.
var(X)

  • If the following properties hold at call time:
    (term_typing:nonvar/1)X is currently a term which is not a free variable.
    then the following properties hold globally:
    (basic_props:equiv/2)var(X) is equivalent to fail.
var(X)

  • If the following properties hold at call time:
    (term_typing:var/1)X is a free variable.
    then the following properties hold globally:
    (basic_props:equiv/2)var(X) is equivalent to true.

PROPERTYnonvar/1

Usage:nonvar(X)

X is currently a term which is not a free variable.

  • The following properties hold globally:
    (basic_props:native/2)This predicate is understood natively by CiaoPP as not_free(X).
Other properties:

  • The following properties hold globally:
    (native_props:is_det/1)All calls of the form nonvar(Arg1) are deterministic.
nonvar(X)

nonvar(X)

  • If the following properties hold at call time:
    (term_typing:nonvar/1)X is currently a term which is not a free variable.
    then the following properties hold globally:
    (basic_props:eval/1)nonvar(X) is evaluable at compile-time.
nonvar(T)

  • If the following properties hold at call time:
    (term_typing:var/1)T is a free variable.
    then the following properties hold globally:
    (basic_props:equiv/2)nonvar(T) is equivalent to fail.
nonvar(T)

  • If the following properties hold at call time:
    (term_typing:nonvar/1)T is currently a term which is not a free variable.
    then the following properties hold globally:
    (basic_props:equiv/2)nonvar(T) is equivalent to true.

PROPERTYatom/1

Usage:atom(X)

X is currently instantiated to an atom.

  • The following properties hold globally:
    (basic_props:native/1)This predicate is understood natively by CiaoPP.
Other properties: atom(X)

  • The following properties hold globally:
    (native_props:is_det/1)All calls of the form atom(Arg1) are deterministic.
    (native_props:test_type/2)Indicates the type of test that a predicate performs. Required by the nonfailure analyisis.
atom(X)

atom(X)

  • If the following properties hold at call time:
    (term_typing:nonvar/1)X is currently a term which is not a free variable.
    then the following properties hold globally:
    (basic_props:eval/1)atom(X) is evaluable at compile-time.
atom(T)

  • If the following properties hold at call time:
    (term_typing:var/1)T is a free variable.
    then the following properties hold globally:
    (basic_props:equiv/2)atom(T) is equivalent to fail.

PROPERTYinteger/1

Usage:integer(X)

X is currently instantiated to an integer.

  • The following properties hold globally:
    (basic_props:native/1)This predicate is understood natively by CiaoPP.
Other properties: integer(X)

  • The following properties hold globally:
    (native_props:is_det/1)All calls of the form integer(Arg1) are deterministic.
    (native_props:test_type/2)Indicates the type of test that a predicate performs. Required by the nonfailure analyisis.
integer(X)

integer(X)

  • If the following properties hold at call time:
    (term_typing:nonvar/1)X is currently a term which is not a free variable.
    then the following properties hold globally:
    (basic_props:eval/1)integer(X) is evaluable at compile-time.
integer(T)

  • If the following properties hold at call time:
    (term_typing:var/1)T is a free variable.
    then the following properties hold globally:
    (basic_props:equiv/2)integer(T) is equivalent to fail.

PROPERTYfloat/1

Usage:float(X)

X is currently instantiated to a float.

  • The following properties hold globally:
    (basic_props:native/1)This predicate is understood natively by CiaoPP.
Other properties: float(X)

  • The following properties hold globally:
    (native_props:is_det/1)All calls of the form float(Arg1) are deterministic.
    (native_props:test_type/2)Indicates the type of test that a predicate performs. Required by the nonfailure analyisis.
float(X)

float(X)

  • If the following properties hold at call time:
    (term_typing:nonvar/1)X is currently a term which is not a free variable.
    then the following properties hold globally:
    (basic_props:eval/1)float(X) is evaluable at compile-time.
float(T)

  • If the following properties hold at call time:
    (term_typing:var/1)T is a free variable.
    then the following properties hold globally:
    (basic_props:equiv/2)float(T) is equivalent to fail.

PROPERTYnumber/1

Usage:number(X)

X is currently instantiated to a number.

  • The following properties hold globally:
    (basic_props:native/1)This predicate is understood natively by CiaoPP.
Other properties: number(X)

  • The following properties hold globally:
    (native_props:is_det/1)All calls of the form number(Arg1) are deterministic.
    (native_props:test_type/2)Indicates the type of test that a predicate performs. Required by the nonfailure analyisis.
number(X)

number(X)

  • If the following properties hold at call time:
    (term_typing:nonvar/1)X is currently a term which is not a free variable.
    then the following properties hold globally:
    (basic_props:eval/1)number(X) is evaluable at compile-time.
number(T)

  • If the following properties hold at call time:
    (term_typing:var/1)T is a free variable.
    then the following properties hold globally:
    (basic_props:equiv/2)number(T) is equivalent to fail.

PROPERTYatomic/1

Usage:atomic(X)

X is currently instantiated to an atom or a number.

  • The following properties hold globally:
    (basic_props:native/1)This predicate is understood natively by CiaoPP.
Other properties: atomic(T)

  • The following properties hold globally:
    (native_props:is_det/1)All calls of the form atomic(Arg1) are deterministic.
    (native_props:test_type/2)Indicates the type of test that a predicate performs. Required by the nonfailure analyisis.
atomic(X)

atomic(X)

  • If the following properties hold at call time:
    (term_typing:nonvar/1)X is currently a term which is not a free variable.
    then the following properties hold globally:
    (basic_props:eval/1)atomic(X) is evaluable at compile-time.
atomic(T)

  • If the following properties hold at call time:
    (term_typing:var/1)T is a free variable.
    then the following properties hold globally:
    (basic_props:equiv/2)atomic(T) is equivalent to fail.

PROPERTYground/1

Usage:ground(X)

X is currently ground (it contains no variables).

  • The following properties hold globally:
    (basic_props:native/1)This predicate is understood natively by CiaoPP.
Other properties: ground(X)

  • The following properties hold globally:
    (native_props:is_det/1)All calls of the form ground(Arg1) are deterministic.
    (native_props:test_type/2)Indicates the type of test that a predicate performs. Required by the nonfailure analyisis.
ground(X)

ground(X)

  • If the following properties hold at call time:
    (term_typing:ground/1)X is currently ground (it contains no variables).
    then the following properties hold globally:
    (basic_props:eval/1)ground(X) is evaluable at compile-time.
ground(X)

  • If the following properties hold at call time:
    (term_typing:var/1)X is a free variable.
    then the following properties hold globally:
    (basic_props:equiv/2)ground(X) is equivalent to fail.
ground(X)

  • If the following properties hold at call time:
    (term_typing:ground/1)X is currently ground (it contains no variables).
    then the following properties hold globally:
    (basic_props:equiv/2)ground(X) is equivalent to true.

PROPERTYtype/2

Usage:type(X,Y)

X is internally of type Y (var, attv, float, integer, structure, atom or list).

  • The following properties hold globally:
    (basic_props:native/1)This predicate is understood natively by CiaoPP.
Other properties: type(X,Y)

  • The following properties hold globally:
    (native_props:is_det/1)All calls of the form type(Arg1,Arg2) are deterministic.

type(X,Y)

  • If the following properties hold at call time:
    (term_typing:nonvar/1)X is currently a term which is not a free variable.
    then the following properties hold globally:
    (basic_props:eval/1)type(X,Y) is evaluable at compile-time.

Documentation on imports

This module has the following direct dependencies: