org.deri.iris.utils.equivalence
Interface IEquivalentTerms

All Known Implementing Classes:
IgnoreTermEquivalence, TermEquivalence

public interface IEquivalentTerms

Defines equivalence between terms.

Author:
Adrian Marte

Method Summary
 boolean areEquivalent(ITerm x, ITerm y)
          Checks if the specified terms are equivalent.
 ITerm findRepresentative(ITerm term)
          Returns a representative term for the specified terms.
 Set<ITerm> getEquivalent(ITerm term)
          Returns the set of terms which are equivalent to the specified term.
 void setEquivalent(ITerm x, ITerm y)
          Defines the specified terms as equivalent.
 

Method Detail

areEquivalent

boolean areEquivalent(ITerm x,
                      ITerm y)
Checks if the specified terms are equivalent.

Parameters:
x - The first term.
y - The second term.
Returns:
true if the two given terms are equivalent, false otherwise.

setEquivalent

void setEquivalent(ITerm x,
                   ITerm y)
Defines the specified terms as equivalent.

Parameters:
x - The first term.
y - The second term.

findRepresentative

ITerm findRepresentative(ITerm term)
Returns a representative term for the specified terms. If two terms are equivalent, they have the same representative term.

Parameters:
term - The term.
Returns:
The representative term for the specified term.

getEquivalent

Set<ITerm> getEquivalent(ITerm term)
Returns the set of terms which are equivalent to the specified term. The set also contains the term itself.

Parameters:
term - The term.
Returns:
The set of terms which are equivalent to the specified term. The set also contains the term itself.