 
 
 
 
 
 
 
  
        [User's Manual]
    
  
    
    [Code]
ALE uses the Martelli-Montanari algorithm, which is a variation
of the union algorithm for union-find data structures. The
Martelli-Montanari algorithm operates on a finite set of equations
 
 . Initially
. Initially  , where
, where  and
 and  are the terms to be unified, and
are the terms to be unified, and 
 . Then the
algorithm chooses from
. Then the
algorithm chooses from  an arbitrary equation and performs acts
according to the following rules:
 an arbitrary equation and performs acts
according to the following rules:
| Equation from  | Action | |
| 1 |  | replace by the equations  | 
| 2 |  | fail | 
| 3 |  | delete equation | 
| 4 |  or  where  does not occur in  | add  to  , apply the substitution  to  and the term in  | 
| 5 |  or  where  occurs in  and  | fail | 
 becomes empty, or the
procedure fails.
 becomes empty, or the
procedure fails.
Feature structure unification in ALE is done by ud/2
predicate, which first dereferences the two feature structures
to be unified getting the most recent term encoding of the feature
structure together with its tag, and then it runs the
Martelli-Montanari algorithm on the term encodings.
 
 
 
 
 
 
