unify* ( x x-env y y-env trail tmp-env -- success? )


Vocabulary
logic.private

Inputs
xan object
x-envan object
yan object
y-envan object
trailan object
tmp-envan object


Outputs
success?an object


Definition


:: unify* ( x x-env y y-env trail tmp-env -- success? )
*trace?* get-global :> trace? 0 :> depth! trace? [
*trace-depth* counter depth! depth [ "\t" printf ] times
"Unification of " printf x-env x of pprint
" and " printf y pprint nl
] when x x-env y y-env trail tmp-env (unify*)
:> success? trace? [
depth [ "\t" printf ] times success?
[ "==> Success\n" ] [ "==> Fail\n" ] if
"%s\n" printf *trace-depth* get-global 1 -
*trace-depth* set-global
] when success? ; inline