Process

Inputs: , two logical predicate formulae

  1. Initialise the set of equations and add the equality (potentially as a tuple) to it.
  2. Repeat the following continuously (while) contains equations of the forms below, do the associated operation
FormMeaningOperation

where and are terms and is a function
Same Function SignatureDecompose into equations and add them to

where and are terms
are functions
OR
Different Function SignatureNo way of unification, halt/fail

where is a variable
Redundant EquationDelete the equation from

where is a variable
is a function containing
Infinite Loop
No way of unification, halt/fail
or
where is a variable
is a function
is a constant
Opposite Sides,Swap the equation ( on LHS) and replace in
where
is a variable
is a term that doesn’t contain or equal
Valid RenamingTreat as , apply the renaming to all other equations in
  1. Finally, switch all to to create the final mapping.
  2. Return

Properties

  • This algorithm always halts, so the problem of syntactic unification is decidable
  • If the algorithm fails, it guarantees that and are non-unifiable
  • Else, the resultant unifier is a most general unifier

Time Complexity

Case ScenarioInput DescriptionGrowth FunctionBig-ONotes
Worst
Average
Best
^time-complexity

Resources