Class Justification

java.lang.Object
edu.tufts.hrilab.action.justification.Justification
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AndJustification, ConditionJustification, OrJustification

public abstract class Justification extends Object implements Serializable
Justification why a context has specific status only stored for single status getFailedPredicates, get predicates contributing to failure of context getBindings, get bindings for predicates
See Also:
  • Constructor Details

    • Justification

      public Justification()
    • Justification

      public Justification(boolean val)
  • Method Details

    • getValue

      public final boolean getValue()
    • setValue

      public final void setValue(boolean value)
    • getStep

      public Predicate getStep()
    • setStep

      public void setStep(Predicate step)
    • getPredicates

      public abstract List<Predicate> getPredicates()
      Get the entire list of conditions within the justification
      Returns:
      list of conditions
    • getBindings

      public abstract List<Map<Variable,Symbol>> getBindings()
      Get all the possible bindings for each condition within the justification
      Returns:
      list of the bindings for each condition
    • getFailedConditions

      public abstract List<Predicate> getFailedConditions()
      Get the conditions which do not hold. This will attempt to bind any free-variables in the failed conditions in the returned values. If multiple binding options exist, a single condition can produce multiple bound conditions.
      Returns:
      list of failed predicates
    • getFailureReason

      public abstract List<Predicate> getFailureReason()
      Get the conditions which hold in the environment, but cause the failure. This will attempt to bind any free-variables in the failed conditions in the returned values. If multiple binding options exist, a single condition can produce multiple bound conditions.
      Returns:
      list of predicates which hold in the environment
    • getFailureBindings

      public abstract List<Map<Variable,Symbol>> getFailureBindings()
      Get the bindings for the failed conditions.
      Returns:
      list of the bindings for each failed condition
    • getBindings

      public abstract Set<Symbol> getBindings(Variable arg)
      Get the bindings for a specific argument
      Parameters:
      arg - the arg to find bindings for
      Returns:
      set of bindings for the argument
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object