|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IVMComparison
The IVMComparison interface is the interface for comparisons used in the virtual machine to specify the virtual machine extensions.
Field Summary | |
---|---|
static int |
BELIEFS
Specified as matching strategy to resolve OAs using beliefs from a specified agent |
static int |
FACTS
Specifies as matching strategy to resolve OAs using facts |
static int |
NONE
Specifies no matching strategy, OAs are not resolved |
Method Summary | |
---|---|
void |
buildRSN(gov.nasa.arc.brahms.vm.engine.rsn.ReasoningStateNetwork rsn,
gov.nasa.arc.brahms.vm.engine.rsn.IRSNFrameNode frame,
gov.nasa.arc.brahms.vm.engine.rsn.RSNActivityRefNode actref,
int modifier)
Adds this comparison to the reasoning state network to build up a reasoning state network that maintains a state of what statements matched with the comparison. |
boolean |
evaluate(gov.nasa.arc.brahms.vm.engine.rsn.RSNFrameNode frame,
int modifier,
int truthvalue,
gov.nasa.arc.brahms.vm.engine.rsn.RSNFrameNode.FrameEvaluationRecord evalRcd)
Evaluates the comparison as part of a preconditioon determining whether or not the comparison has a successfull match with a statement. |
java.util.LinkedList |
getConcludingStatements(VMActiveInstanceCtx agent,
VMFrameCtx frame,
boolean updateJava)
Matches the comparison with the belief set of the specified agent and creates the statements that would result from the comparison after the match. |
java.util.LinkedList |
getDetectableFacts(VMActiveInstanceCtx agent,
VMFrameCtx frame)
Matches the comparison with the fact set of the world and returns the statements that match with the left hand side of the comparison after resolving the left hand side. |
java.util.LinkedList |
getTransferableCommunicativeActs(VMActiveInstanceCtx agent,
VMFrameCtx frame)
Resolves the CommunicativeAct specified for the transfer definition to the (list of) CommunicativeAct(s) to be transferred. |
java.util.LinkedList |
getTransferableStatements(VMActiveInstanceCtx agent,
VMFrameCtx frame,
int truthvalue)
Matches the comparison of a transfer definition with the belief set of the specified agent and returns the statements that match with the comparison after resolving the lhs and rhs. |
VMBeliefCtx |
hasTriggeringBelief(VMActiveInstanceCtx agent,
VMFrameCtx frame,
int truthvalue)
Checks whether the specified agent has a belief that can activate the trigger for which this comparison is the condition. |
boolean |
isDetectableFact(VMFactCtx fact,
VMActiveInstanceCtx agent,
VMFrameCtx frame)
Checks whether the specified fact can be detected by matching the fact against the left hand side of the comparison. |
boolean |
isTriggeringBelief(VMBeliefCtx belief,
VMActiveInstanceCtx agent,
VMFrameCtx frame,
int truthvalue)
Checks whether the specified belief can cause the activation of the trigger by matching the belief against the comparison. |
Field Detail |
---|
static final int NONE
static final int FACTS
static final int BELIEFS
Method Detail |
---|
java.util.LinkedList getConcludingStatements(VMActiveInstanceCtx agent, VMFrameCtx frame, boolean updateJava) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
The comparison serves as an assignment where the rhs is matched and resolved and new statements are created preserving the left hand side and assigning it the value(s) matched on the right hand side. On the left hand side only the object is resolved to concepts if instead of a concept, current, a variable or a parameter is specified.
Note:This method is only usable with consequences, not with detectables, transfer definitions and preconditions. Left hand side of preconditions can contain expressions which are not handled by this method. Transfer definitions and detectables require rhs matching and not assignment.
agent
- the agent with whom's belief set we need to matchframe
- the frame containing variable contexts for variables used by the comparison.updateJava
- whether to update Java objects as a side effect of determining the concluded statements
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an error occurs in retrieving information from the static or
dynamic modeljava.util.LinkedList getTransferableCommunicativeActs(VMActiveInstanceCtx agent, VMFrameCtx frame) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
agent
- the agent initiating the communicationframe
- the frame containing variable contexts for variables used by the comparison.
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an error occurs in retrieving information from the static or
dynamic modeljava.util.LinkedList getTransferableStatements(VMActiveInstanceCtx agent, VMFrameCtx frame, int truthvalue) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
agent
- the agent with whom's belief set we need to matchframe
- the frame containing variable contexts for variables used by the comparison.truthvalue
- the truth value of the comparison (TRUE, FALSE, UNKNOWN)
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an error occurs in retrieving information from the static or
dynamic modelIConstants.TRUE
,
IConstants.FALSE
,
IConstants.UNKNOWN
java.util.LinkedList getDetectableFacts(VMActiveInstanceCtx agent, VMFrameCtx frame) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Note:This method is only usable with detectables as it limits the matching to facts in the world and only matches against the left hand side.
agent
- the agent that is checking for detectionframe
- the frame containing variable contexts for variables used by the comparison.
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an error occurs in retrieving information from the static or
dynamic modelboolean isDetectableFact(VMFactCtx fact, VMActiveInstanceCtx agent, VMFrameCtx frame) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
fact
- the fact that is checked for detectionagent
- the agent that is checking for detectionframe
- the frame containing variable contexts for variables used by the comparison.
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an error occurs in retrieving information from the static or
dynamic modelVMBeliefCtx hasTriggeringBelief(VMActiveInstanceCtx agent, VMFrameCtx frame, int truthvalue) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
agent
- the agent that is checking the trigger and whom's belief set is
checked for a matching beliefframe
- the frame containing variable contexts for variables used by the comparison.truthvalue
- the specified truth value of the detectable condition (TRUE, FALSE, UNKNOWN)
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an error occurs in retrieving information from the static or
dynamic modelIConstants.TRUE
,
IConstants.FALSE
,
IConstants.UNKNOWN
boolean isTriggeringBelief(VMBeliefCtx belief, VMActiveInstanceCtx agent, VMFrameCtx frame, int truthvalue) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
belief
- the belief to be checked for activation of the triggeragent
- the agent that is checking the triggerframe
- the frame containing variable contexts for variables used by the comparison.truthvalue
- the specified truth value of the detectable condition (TRUE, FALSE, UNKNOWN)
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an error occurs in retrieving information from the static or
dynamic modelIConstants.TRUE
,
IConstants.FALSE
,
IConstants.UNKNOWN
void buildRSN(gov.nasa.arc.brahms.vm.engine.rsn.ReasoningStateNetwork rsn, gov.nasa.arc.brahms.vm.engine.rsn.IRSNFrameNode frame, gov.nasa.arc.brahms.vm.engine.rsn.RSNActivityRefNode actref, int modifier) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
rsn
- the ReasoningStateNetwork to be builtframe
- the RSNFrameNode for the frame in which this
comparison is used.actref
- the optional RSNActivityRefNode for the activity reference
referencing a composite activity in which the frame
and the precondition are specified.modifier
- the modifier of the (pre)condition
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an error occurs in building up
the RSN with this comparisonboolean evaluate(gov.nasa.arc.brahms.vm.engine.rsn.RSNFrameNode frame, int modifier, int truthvalue, gov.nasa.arc.brahms.vm.engine.rsn.RSNFrameNode.FrameEvaluationRecord evalRcd) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
frame
- the RSNFrameNode for the frame in which the comparison's precondition
is specifiedmodifier
- the modifier of the (pre)conditiontruthvalue
- the truthvalue of the (pre)condition (TRUE, FALSE, UNKNOWN)evalRcd
- the record in which to store bindings for variables and statements
matching preconditions
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an internal error occursIConstants.TRUE
,
IConstants.FALSE
,
IConstants.UNKNOWN
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |