Tree Constraint Solving
unify(C)
- Remove equation c from C
- case x=x: do nothing
- case f(s1,..,sn)=g(t1,..,tn): return false
- case f(s1,..,sn)=f(t1,..,tn):
- add s1=t1, .., sn=tn to C
- case t=x (x variable): add x=t to C
- case x=t (x variable): add x=t to S
- substitute t for x everywhere else in C and S