Miscellaneous ISO Prolog predicates

Author(s): Daniel Cabeza, Jose F. Morales.

This module implements some miscellaneous ISO Prolog predicates.

Usage and interface

Documentation on exports

PREDICATEonce/1
once(G)

Finds the first solution of goal G (if any). once/1 behaves as call/1, except that no further solutions are explored on backtracking.

Usage:ISO

  • The following properties should hold at call time:
    (basic_props:callable/1)G is a term which represents a goal, i.e., an atom or a structure.
Meta-predicate with arguments: once(goal).

PREDICATEcompound/1
compound(T)

T is currently instantiated to a compound term.

Usage:ISO

PREDICATEsub_atom/5
sub_atom(Atom,Before,Length,After,Sub_atom)

Is true iff atom Atom can be broken into three pieces, AtomL, Sub_atom and AtomR such that Before is the number of characters of the name of AtomL, Length is the number of characters of the name of Sub_atom and After is the number of characters of the name of AtomR

Usage:ISO

unify_with_occurs_check(X,Y)

Attempts to compute and apply a most general unifier of the two terms X and Y. Is true iff X and Y are unifiable.

Usage:ISO

Documentation on imports

This module has the following direct dependencies:

Known bugs and planned improvements

  • There is a naive implementation of compound/1, perhaps is better to implement it as a builtin -- EMM.