jdrew.oo.bu
Class Unifier

java.lang.Object
  extended by jdrew.oo.bu.Unifier

public class Unifier
extends java.lang.Object

Title: OO jDREW

Description: Reasoning Engine for the Semantic Web - Supporting OO RuleML 0.88

Copyright: Copyright (c) 2005


Constructor Summary
Unifier()
          This method is used to create a unifier that is used to test whether or not 2 terms are equal.
Unifier(DefiniteClause fact, DefiniteClause rule)
          This method is used to create a unifier that is used to test whether a fact unifies with a rule.
 
Method Summary
 DefiniteClause resolvent()
          This method will produce the resolvent of unifing a fact with a rule.
 boolean unifies()
          This method returns the value of the unified variable.
 boolean unify(Term term1, Term term2)
          This method is used to check if two terms unify with each other; and to perform any variable bindings that are necessary to make the terms unfiy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Unifier

public Unifier()
This method is used to create a unifier that is used to test whether or not 2 terms are equal.


Unifier

public Unifier(DefiniteClause fact,
               DefiniteClause rule)
This method is used to create a unifier that is used to test whether a fact unifies with a rule.

Parameters:
fact - DefiniteClause fact - this is the fact that will be used to try and unify with the rule.
rule - DefiniteClause - this is the rule that will be used to try and unify with the fact.
Method Detail

resolvent

public DefiniteClause resolvent()
This method will produce the resolvent of unifing a fact with a rule.

Returns:
DefiniteClause the resolvent that was produced by unifying a fact and rule.

unifies

public boolean unifies()
This method returns the value of the unified variable.

Returns:
boolean

unify

public boolean unify(Term term1,
                     Term term2)
This method is used to check if two terms unify with each other; and to perform any variable bindings that are necessary to make the terms unfiy. For more details see the inline comments in the source of this method and/or look at the description of the unify(Term, Term) method of the jdrew.oo.bu.Unifier class.

Parameters:
term1 - Term One of the terms to attempt to unify.
term2 - Term The second term to attempt to unify.
Returns:
boolean Returns true if the two terms unify; false otherwise.