de.upb.swt.epctools.simulator.symbolic
Class SimNode

java.lang.Object
  extended by de.upb.swt.epctools.model.Node
      extended by de.upb.swt.epctools.simulator.symbolic.SimNode
All Implemented Interfaces:
ModelListener
Direct Known Subclasses:
SimConnector, SimItem

public abstract class SimNode
extends Node

This is an important EPC model class representing an EPC node


Field Summary
protected  de.upb.swt.mcie.formulas.Formula m_contact_formula
           
protected  de.upb.swt.mcie.formulas.Formula m_tr_formula
           
 
Fields inherited from class de.upb.swt.epctools.model.Node
m_description, m_name, part, STATE_FALSE, STATE_TRUE, STATE_UNKNOWN, TYPE_AND, TYPE_EVENT, TYPE_FUNCTION, TYPE_NONE, TYPE_OBJECT, TYPE_OR, TYPE_RANGE, TYPE_ROLE, TYPE_XOR
 
Fields inherited from interface de.upb.swt.epctools.model.tools.ModelListener
MSG_ARC_ADDED, MSG_ARC_RECONNECTED, MSG_ARC_REMOVED, MSG_BEND_POINT_CHANGE, MSG_CHANGED_ALGORITHM, MSG_CONSTRAINT_CHANGED, MSG_DESCRIPTION_CHANGED, MSG_FOLDERS_CHANGED, MSG_HIGHLIGHTING_CHANGED, MSG_IN_ARC_ADDED, MSG_IN_ARC_REMOVED, MSG_INFO_CHANGED, MSG_LOCATION_CHANGED, MSG_NAME_CHANGED, MSG_NODE_ADDED, MSG_NODE_REMOVED, MSG_OUT_ARC_ADDED, MSG_OUT_ARC_REMOVED, MSG_SIZE_CHANGED, MSG_SOURCE_CHANGED, MSG_STRUCTURE_CHANGED, MSG_TARGET_CHANGED
 
Constructor Summary
SimNode(SimEPC parent_epc)
          Initialization
 
Method Summary
abstract  de.upb.swt.mcie.formulas.Formula computeContactFormula()
          Returns a formula corresponding to all states where "this" Node is in contact situation.
abstract  de.upb.swt.mcie.formulas.Formula computeFormula()
          This abstract function is implemented by each node type and computes a formula (which is stored in m_tr_formula) corresponding to a transition relation for the concerned node.
 void computeNextState()
          This function must be overwritten by derived classes; it computes the resulting state when process folders are processed to outgoing Arcs.
static Node createNode(SimEPC parent_epc, int type)
          Returns a new Node of given type.
 de.upb.swt.mcie.formulas.Formula getContactFormula()
          Returns a formula corresponding to all contact situations.
 de.upb.swt.mcie.formulas.Formula getFormula()
          Returns a formula describing the Node's behaviour, that can be transformed to an ROBDD.
 de.upb.swt.mcie.robdds.Variable[] getInputOutputROBDDVariables()
           
 boolean hasLocalSemantics()
          Returns true if the semantics of "this" Node can be computed with local information.
 byte isEnabled()
          This function should be overwritten by derived classes to return whether the concerned Node may process folders to the Outgoing Arcs.
 byte isInContact()
          Returns true if the Node is in a contact situation in the actual state.
protected  de.upb.swt.mcie.formulas.Formula simpleComputeContactFormula()
          This function is a default function for isInContactSituation().
protected  de.upb.swt.mcie.formulas.Formula simpleComputeFormula()
          This is a default implementation of computeFormula() that corresponds to the behaviour of an and split/join; it can be used also by event and function Nodes.
 
Methods inherited from class de.upb.swt.epctools.model.Node
addListener, createNode, forwardMessage, getColor, getDescription, getDistantParent, getEPC, getHeight, getId, getIncomingArcs, getListeners, getMessage, getName, getOutgoingArcs, getPosX, getPosY, getType, getTypes, getTypeString, getWidth, isHighlighted, removeListener, sendRefreshMessage, setColor, setConstraint, setDescription, setHeight, setHighlighted, setId, setName, setPosition, setType, setWidth, simpleIsEnabled, simpleIsInContact, simpleNextStateComputation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_tr_formula

protected de.upb.swt.mcie.formulas.Formula m_tr_formula

m_contact_formula

protected de.upb.swt.mcie.formulas.Formula m_contact_formula
Constructor Detail

SimNode

public SimNode(SimEPC parent_epc)
Initialization

Method Detail

isInContact

public byte isInContact()
Description copied from class: Node
Returns true if the Node is in a contact situation in the actual state.

Overrides:
isInContact in class Node

isEnabled

public byte isEnabled()
Description copied from class: Node
This function should be overwritten by derived classes to return whether the concerned Node may process folders to the Outgoing Arcs. The return value can be Node.STATE_TRUE or Node.STATE_FALSE, all other results mean that the state could not be computed using local information only (i.e. incoming and outgoing arcs). The computation depends on whether multiple folders on Arcs are allowed or not.

Overrides:
isEnabled in class Node

computeNextState

public void computeNextState()
Description copied from class: Node
This function must be overwritten by derived classes; it computes the resulting state when process folders are processed to outgoing Arcs.

Specified by:
computeNextState in class Node

hasLocalSemantics

public boolean hasLocalSemantics()
Description copied from class: Node
Returns true if the semantics of "this" Node can be computed with local information.

Overrides:
hasLocalSemantics in class Node

computeContactFormula

public abstract de.upb.swt.mcie.formulas.Formula computeContactFormula()
Returns a formula corresponding to all states where "this" Node is in contact situation.


simpleComputeContactFormula

protected de.upb.swt.mcie.formulas.Formula simpleComputeContactFormula()
This function is a default function for isInContactSituation().


simpleComputeFormula

protected de.upb.swt.mcie.formulas.Formula simpleComputeFormula()
This is a default implementation of computeFormula() that corresponds to the behaviour of an and split/join; it can be used also by event and function Nodes.


computeFormula

public abstract de.upb.swt.mcie.formulas.Formula computeFormula()
This abstract function is implemented by each node type and computes a formula (which is stored in m_tr_formula) corresponding to a transition relation for the concerned node. The formula depends on ingoing and outgoing connections of the node, but also on every connection in the epc, because a transition relation must define the behaviour for every state of the system.


getFormula

public de.upb.swt.mcie.formulas.Formula getFormula()
Returns a formula describing the Node's behaviour, that can be transformed to an ROBDD. Note that the returned formula is not always up to date. Each formula computed by computeFormula() is cached so getFormula() only returns the correct result if computeFormula() was called before. In epctools, the computeFormula() methods for all nodes will be called by refreshTransitionData() in the EPC class, when the user wants to display enabled nodes and when the user has made a change by editing the diagram in the epctools editor. The formulas are up to date iff the flag m_nodes_up_to_date is true.


getContactFormula

public de.upb.swt.mcie.formulas.Formula getContactFormula()
Returns a formula corresponding to all contact situations.


getInputOutputROBDDVariables

public de.upb.swt.mcie.robdds.Variable[] getInputOutputROBDDVariables()

createNode

public static Node createNode(SimEPC parent_epc,
                              int type)
Returns a new Node of given type.