Liste des Groupes | Revenir à s logic |
In unification with occurs check cycles in a graphYou did not word that exactly correctly.
are prevented before they happen. You are such a moron.
The "occurs check" does that. It checks V ∈ T, BEFOREIt checks for the absence of cycles and returns
a variable V gets instantiated to T.
On the other hand acyclic_term/1 can figure out whetherClocksin & Mellish says that it is optional because
a term as variable V instantiated to T, where V ∈ T,
AFTER a cycle allowing unification has been performed,
i.e. the ordinary (=)/2.
You are an idiot, you confuse these predicate:
- acyclic_term/1
With this predicate:
- unify_with_occurs_check/2.
Usually unify_with_occurs_check/2 is not implemented as:
/* not how it is done */
unify_with_occurs_check(X,Y) :-
X = Y,
acyclic_term(X).
The problem is the above wouldn't allow enough fast failure.
Les messages affichés proviennent d'usenet.