Class Effect

java.lang.Object
edu.tufts.hrilab.action.Effect
All Implemented Interfaces:
Serializable

public class Effect extends Object implements Serializable
An Effect is the result of an action. It consists of a predicate (description of the effect), an EffectType describing when that effect is presumed to hold, and if the effect should be observed or assumed to hold (i.e., inferred).
See Also:
  • Constructor Details

  • Method Details

    • applySemanticTypes

      public void applySemanticTypes(ActionDBEntry actionDBEntry)
      Using the roles from the ActionDBEntry, attempt to extract semantic type information from the roles and apply them to the predicate(s) in this Effect.
      Parameters:
      actionDBEntry -
    • bindToContext

      public Effect bindToContext(ArgumentBasedContext context)
      Bind the predicate in the effect to a context.
      Parameters:
      context - Context in which to look up variable bindings
      Returns:
      New Effect with unbound arguments bound, if possible.
    • getPredicate

      public Predicate getPredicate()
    • getType

      public EffectType getType()
      Get effect type. See below.
      Returns:
      effect type
    • getObservable

      public Observable getObservable()
      Returns:
      observable
    • isAutoGenerated

      public boolean isAutoGenerated()
      Returns:
      true if effect is auto generated post condition (e.g. did-action)
    • verify

      public Justification verify(ActionContext context)
      Verify that effect is observed.
      Parameters:
      context - context providing variable bindings
      Returns:
      justification. true if effect applies, false if it can't be observed.
    • toString

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

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