Class ConditionJustification

java.lang.Object
edu.tufts.hrilab.action.justification.Justification
edu.tufts.hrilab.action.justification.ConditionJustification
All Implemented Interfaces:
Serializable

public class ConditionJustification extends Justification
See Also:
  • Constructor Details

    • ConditionJustification

      public ConditionJustification(boolean value)
      Constructor indicating true/false without indicating a particular condition.
      Parameters:
      value -
    • ConditionJustification

      public ConditionJustification(boolean value, Predicate condition)
      Constructor indicating the logical truth value of the condition predicate, as well as the overall value of the justification.
      Parameters:
      value -
      condition -
    • ConditionJustification

      public ConditionJustification(boolean value, Predicate condition, List<Map<Variable,Symbol>> bindings)
      Constructor indicating the logical truth value of the condition predicate, as well as the overall value of the justification. The bindings contain binding options for any free-variables in the condition predicate.
      Parameters:
      value -
      condition -
      bindings -
  • Method Details

    • getPredicates

      public List<Predicate> getPredicates()
      Description copied from class: Justification
      Get the entire list of conditions within the justification
      Specified by:
      getPredicates in class Justification
      Returns:
      list of conditions
    • getBindings

      public List<Map<Variable,Symbol>> getBindings()
      Description copied from class: Justification
      Get all the possible bindings for each condition within the justification
      Specified by:
      getBindings in class Justification
      Returns:
      list of the bindings for each condition
    • getFailedConditions

      public List<Predicate> getFailedConditions()
      Description copied from class: Justification
      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.
      Specified by:
      getFailedConditions in class Justification
      Returns:
      list of failed predicates
    • getFailureReason

      public List<Predicate> getFailureReason()
      Description copied from class: Justification
      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.
      Specified by:
      getFailureReason in class Justification
      Returns:
      list of predicates which hold in the environment
    • getFailureBindings

      public List<Map<Variable,Symbol>> getFailureBindings()
      Description copied from class: Justification
      Get the bindings for the failed conditions.
      Specified by:
      getFailureBindings in class Justification
      Returns:
      list of the bindings for each failed condition
    • getBindings

      public Set<Symbol> getBindings(Variable argument)
      Description copied from class: Justification
      Get the bindings for a specific argument
      Specified by:
      getBindings in class Justification
      Parameters:
      argument - the arg to find bindings for
      Returns:
      set of bindings for the argument
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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