de.upb.swt.epctools.simulator.explicit
Class EPC_DS

java.lang.Object
  extended by de.upb.swt.epctools.simulator.explicit.EPC_DS

public class EPC_DS
extends java.lang.Object

Implements the data structure for an EPC model.

Author:
Ekkart Kindler, kindler@upb.de

Field Summary
(package private)  java.util.HashMap arcMap
          Maps arcs of the actual EPC model to the arcs (arcs) of this data structure.
(package private)  Arc_DS[] arcs
          The arcs of the EPC data structure.
(package private)  State currentState
          The current state of the EPC
(package private)  EPC epcModel
          The actual EPC model to which this data structure belongs.
(package private)  Node_DS[] localNodes
          The local nodes of the EPC data structure.
(package private)  java.util.HashMap nodeMap
          Maps nodes of the actual EPC model to the nodes of this data structure.
(package private)  JoinConnector_DS[][] nonlocalNodes
          Non local nodes according to priorities.
(package private)  OrJoinConnector_DS[] orJoinNodes
          The OR-join nodes of the EPC data structure.
static int PROP_NOT_WEAKLY_SOUND
           
static int PROP_SOUND
           
static int PROP_UNDEFINED
           
static int PROP_WEAKLY_SOUND
           
(package private)  TransitionSystem ts
          The transition system belonging to this EPC;
(package private)  XorJoinConnector_DS[] xorJoinNodes
          The XOR-join nodes of the EPC data structure.
 
Constructor Summary
EPC_DS(EPC epcModel)
          Creates the data structure for an EPC model.
 
Method Summary
 void abort()
          Aborts the calculation of the transition system.
 void calculateTransitionSystem()
          Calculates the transition system starting from the current state of the model EPC.
 int checkSoundness()
           
 boolean hasContact()
          Returns whether there were contact situations during the construction of the transition system of this EPC model.
 boolean isClean()
          Returns whether the calculated transition system is clean.
 boolean isEnabled(Node modelNode)
          Returns whether the given node of the EPC model is enabled in the current state.
 void resume()
          Prepares for resuming the calulation of the transition system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

epcModel

EPC epcModel
The actual EPC model to which this data structure belongs.


arcMap

java.util.HashMap arcMap
Maps arcs of the actual EPC model to the arcs (arcs) of this data structure.


nodeMap

java.util.HashMap nodeMap
Maps nodes of the actual EPC model to the nodes of this data structure.


arcs

Arc_DS[] arcs
The arcs of the EPC data structure.


localNodes

Node_DS[] localNodes
The local nodes of the EPC data structure.


orJoinNodes

OrJoinConnector_DS[] orJoinNodes
The OR-join nodes of the EPC data structure.


xorJoinNodes

XorJoinConnector_DS[] xorJoinNodes
The XOR-join nodes of the EPC data structure.


nonlocalNodes

JoinConnector_DS[][] nonlocalNodes
Non local nodes according to priorities.


ts

TransitionSystem ts
The transition system belonging to this EPC;


currentState

State currentState
The current state of the EPC


PROP_UNDEFINED

public static final int PROP_UNDEFINED
See Also:
Constant Field Values

PROP_NOT_WEAKLY_SOUND

public static final int PROP_NOT_WEAKLY_SOUND
See Also:
Constant Field Values

PROP_WEAKLY_SOUND

public static final int PROP_WEAKLY_SOUND
See Also:
Constant Field Values

PROP_SOUND

public static final int PROP_SOUND
See Also:
Constant Field Values
Constructor Detail

EPC_DS

public EPC_DS(EPC epcModel)
       throws EPCSyntaxError
Creates the data structure for an EPC model.

Parameters:
epcModel - the EPC model
Throws:
EPCSyntaxError
Method Detail

abort

public void abort()
Aborts the calculation of the transition system. The calculation can be resumed by first calling and then calling again.


resume

public void resume()
Prepares for resuming the calulation of the transition system. After aborting the calculation of the transition system by , this method must be called before calling again.


calculateTransitionSystem

public void calculateTransitionSystem()
                               throws EPCSimulationException
Calculates the transition system starting from the current state of the model EPC.

Throws:
EPCSimulationException - if not enough memory is available

checkSoundness

public int checkSoundness()

isEnabled

public boolean isEnabled(Node modelNode)
Returns whether the given node of the EPC model is enabled in the current state.

Parameters:
modelNode -
Returns:
true if the node is enabled

isClean

public boolean isClean()
Returns whether the calculated transition system is clean.

Returns:
true if the transition system is clean

hasContact

public boolean hasContact()
Returns whether there were contact situations during the construction of the transition system of this EPC model. Note that this does not imply that there is a contact situation in one of the reachable states in the final transition system.

Returns:
true if there were contact situations during the construction of the transition system