Package edu.tufts.hrilab.action
Class Effect
java.lang.Object
edu.tufts.hrilab.action.Effect
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionEffect
(Predicate p, EffectType t) Effect
(Predicate p, EffectType t, Observable obs) Effect
(Predicate p, EffectType t, Observable obs, boolean autoGenerated) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.bindToContext
(ArgumentBasedContext context) Bind the predicate in the effect to a context.boolean
getType()
Get effect type.int
hashCode()
boolean
toString()
verify
(ActionContext context) Verify that effect is observed.
-
Constructor Details
-
Effect
-
Effect
-
Effect
-
-
Method Details
-
applySemanticTypes
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
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
-
getType
Get effect type. See below.- Returns:
- effect type
-
getObservable
- Returns:
- observable
-
isAutoGenerated
public boolean isAutoGenerated()- Returns:
- true if effect is auto generated post condition (e.g. did-action)
-
verify
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
-
hashCode
public int hashCode() -
equals
-