Information Technology Reference
In-Depth Information
Algorithm 1. Algorithm to initialize an object life cycle, call Algorithm 2 from a
reachability graph and post-process nodes already processed in Algorithm 2 (RG2OLC)
1: IN: RG DP N =( N,M,T RG ); WRITERS BP
2: OUT: S OLC ; T OLC ; WARN⊆ N
3: S OLC ←{START STATE} ; T OLC ←∅
4: INPUT ← ( WRITERS,firstNode,START STATE,∅, ∅, ∅, ∅,S OLC ,T OLC )
5: ( S OLC ,T OLC ,PNODES,PP,WARN ) ← RG 2 OLC ( INPUT )
6: found← 1 // Post-processing of nodes in PP
7: while found =0 do
8: found← 0
9: for all ( node, assocPath ) ∈ PP do
10: for all ( s i ,s o ,path ) ∈ T OLC do
11: if node ∈ path then
12: found← found +1; newT ← ( s i ,s o ,path )
13: T OLC ← T OLC replace ( newT, node, assocPath )
14: end if
15: end for
16: end for
17: end while
18: return ( S OLC ,T OLC ,WARN )
Its behaviour consists of calling Algorithm 2 with the appropriate parameters
and post-processing the resulting reachability graph. Algorithm 2 is a recursive
algorithm that builds an OLC by processing a reachability graph node by node
from its start node. Its input set and steps are described below.
Input of Algorithm 2.
- WRIT
E is the set of activities that write the data object.
- cNode
N is the node being processed.
- cState
D is the current state of the data object.
- PNODES
N is the set of already processed nodes.
- PATH
N contains a set of nodes of the reachability graph, which is
the information required in the transitions of the object life cycle.
- PP =
{
pair 1 ,pair 2 , ..., pair n }
,where pair i =( node, assocPath ) ,node i
N is a set of pairs containing a node of the reachability
graph and a set of nodes associated to that node, which conceptually
corresponds to the path contained in variable PATH when processing
that node.
- WARN
N, assocPath i
N is a set of nodes related to deadlocks in the Petri net.
- S OLC
S OLC is the set of states of the resulting object life cycle.
- T OLC
T OLC is the set of transitions of the resulting object life cycle.
Check for and add new transitions (lines 3-7). A new transition of one of
thetypesshowninFigures5aand5bmustbeaddedtotheOLCincasethat
a new state of the data object is found in the reachability graph. If, on the
contrary, the node shows that the data object is still in the current state but
Search WWH ::




Custom Search