Output from Unification in OBJ3


This is the output from running the OBJ3 code for unification.
awk% obj
                     \|||||||||||||||||/
                   --- Welcome to OBJ3 ---
                     /|||||||||||||||||\
         OBJ3 version 2.04oxford built: 1994 Feb 28 Mon 15:07:40
            Copyright 1988,1989,1991 SRI International
                   1999 Feb 19 Fri 5:18:48
OBJ> in unify
==========================================
obj LIST
==========================================
obj SUBST
==========================================
***> first without occur check
==========================================
obj UNIFY
==========================================
reduce in UNIFY : unify ('f['g['X] 'Y] = 'f['g['h['Y]] 'h['Z]])
rewrites: 55
result System: {('Y = 'h['Z]) & ('X = 'h['h['Z]])}
==========================================
reduce in UNIFY : unify ('f['X 'Y] = 'f['Y 'g['Y]])
rewrites: 43
result System: {('Y = 'g['Y]) & ('X = 'g['Y])}
==========================================
reduce in UNIFY : unify ('f['g['X] 'Y] = 'f['g['h['Y]] 'h['Z]]) & (
    'h['X] = 'Z)
rewrites: 94
result System: {('Z = 'h['h['h['Z]]]) & ('Y = 'h['h['h['h['Z]]]]) & 
    ('X = 'h['h['h['h['h['Z]]]]])}
==========================================
reduce in UNIFY : unify ('f['X 'g['Y]] = 'f['Z 'Z])
rewrites: 43
result System: {('Z = 'g['Y]) & ('X = 'g['Y])}
==========================================
reduce in UNIFY : unify ('f['X 'g['Y]] = 'f['Z])
rewrites: 15
result Eqn: fail
==========================================
reduce in UNIFY : unify ('f['Y 'g['Y]] = 'f['h['Z] 'Z])
rewrites: 44
result System: {('Z = 'g['h['Z]]) & ('Y = 'h['g['h['Z]]])}
==========================================
reduce in UNIFY : unify ('f['Y 'a[nil]] = 'f['g['a[nil]] 'Z])
rewrites: 41
result System: {('Z = 'a[nil]) & ('Y = 'g['a[nil]])}
==========================================
***> now add occur check
==========================================
obj UNIFY-OCH
==========================================
reduce in UNIFY-OCH : unify ('f['g['X] 'Y] = 'f['g['h['Y]] 'h['Z]])
rewrites: 74
result System: {('Y = 'h['Z]) & ('X = 'h['h['Z]])}
==========================================
reduce in UNIFY-OCH : unify ('f['X 'Y] = 'f['Y 'g['Y]])
rewrites: 28
result Eqn: fail
==========================================
reduce in UNIFY-OCH : unify ('f['g['X] 'Y] = 'f['g['h['Y]] 'h['Z]]) & 
    ('h['X] = 'Z)
rewrites: 108
result Eqn: fail
==========================================
reduce in UNIFY-OCH : unify ('f['X 'g['Y]] = 'f['Z 'Z])
rewrites: 63
result System: {('Z = 'g['Y]) & ('X = 'g['Y])}
==========================================
reduce in UNIFY-OCH : unify ('f['X 'g['Y]] = 'f['Z])
rewrites: 15
result Eqn: fail
==========================================
***> reduce unify 'f['Y 'g['Y]] = 'f['h['Z] 'Z].
==========================================
***> this blows up!
==========================================
reduce in UNIFY-OCH : unify ('f['Y 'a[nil]] = 'f['g['a[nil]] 'Z])
rewrites: 44
result System: {('Z = 'a[nil]) & ('Y = 'g['a[nil]])}
OBJ> q
Bye.
awk% 

Back to the OBJ3 source code for unification.
Back to CSE 230 homepage
Maintained by Joseph Goguen
Last modified 23 February 1999