org.deri.iris.rules.stratification
Class LocalStratificationDecorator.Adornment

java.lang.Object
  extended by org.deri.iris.rules.stratification.LocalStratificationDecorator.Adornment
Enclosing class:
LocalStratificationDecorator

public static class LocalStratificationDecorator.Adornment
extends Object

An immutable adornment for a single term of a rule head.


Constructor Summary
LocalStratificationDecorator.Adornment()
           
 
Method Summary
 LocalStratificationDecorator.Adornment addNegatedConstant(ITerm constantTerm)
          Indicate that the rule will never produce 'constantTerm' values in the term decorated with this adornment.
 List<ITerm> getNegatedConstants()
          Get the negated constants (if any) that this adornment represents.
 ITerm getPositiveConstant()
          Get the positive constant (if any) that this adornment represents.
 LocalStratificationDecorator.MatchType match(ITerm termFromNegatedSubgoal)
          Find how well a term (from a dependant rule's negated sub-goal) matches the term decorated with this adornment.
 LocalStratificationDecorator.Adornment setConstantTerm(ITerm constantTerm)
          Indicate that the rule will ONLY produce 'constantTerm' values in the term decorated with this adornment.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalStratificationDecorator.Adornment

public LocalStratificationDecorator.Adornment()
Method Detail

match

public LocalStratificationDecorator.MatchType match(ITerm termFromNegatedSubgoal)
Find how well a term (from a dependant rule's negated sub-goal) matches the term decorated with this adornment.

Parameters:
termFromNegatedSubgoal - The 'interesting' negated sub goal from some rule
Returns:
An indication of how well this term can fulfil the corresponding term in the negated sub-goal

addNegatedConstant

public LocalStratificationDecorator.Adornment addNegatedConstant(ITerm constantTerm)
Indicate that the rule will never produce 'constantTerm' values in the term decorated with this adornment.

Parameters:
constantTerm - The constant term.
Returns:
The new adornment

setConstantTerm

public LocalStratificationDecorator.Adornment setConstantTerm(ITerm constantTerm)
Indicate that the rule will ONLY produce 'constantTerm' values in the term decorated with this adornment.

Parameters:
constantTerm - The constant term.
Returns:
The new adornment

toString

public String toString()
Overrides:
toString in class Object

getNegatedConstants

public List<ITerm> getNegatedConstants()
Get the negated constants (if any) that this adornment represents.

Returns:
The list of negated constants.

getPositiveConstant

public ITerm getPositiveConstant()
Get the positive constant (if any) that this adornment represents.

Returns:
The positive adornment or null if there isn't one.