Professional Documents
Culture Documents
33
Payment Service: Figure 6 illustrates that provides a service to
the customers in which a resource which receives the payment
from a customer and forwards his order.
34
1. Component Integration
35
or not. If it is true, then it will be checked that for every provider
Algorithm: Verify component Integration property there is acquire and vice versa.
Input: {Actions}, Patterns Second rule is that for communication, the medium should
Output: TRUE, FALSE be the same i.e. their number of parameters and colset both must
be the same.
1 BFS(v){ Third rule is used to check that marked node is visited and
2 {add v to queue and mark it} components are connected according to their rules as discussed
3 Add(Q, v) above.
4 Markvas visited
5 while (not IsEmpty(Q)) do
6 begin
7 w = QueueFront(Q)
8 Remove(Q)
9 {loop invariant: there is a path from vertex w to every vertex
in the queue Q}
10 for each unvisited vertex u adjacent to w do
11 begin
12 Mark u as visited
13 Add (Q , u)
14 src = w
15 dest = u
16 if srcPattren or destPattren not found
17 exit using pattern not found error
18 for each provider p in srcPattren
19 begin
20 Rule1:
21 r = destPattren requires
22 if p not in r and r not in p {not usage of provider in
requires and vice versa} Figure 11: Restaurant Model Graph
23 exit using condition 1 not met error
24 Rule2: Scenario B (Counter Example)
25 pType = dataType in provider p In this scenario, we change the behavior of the waiter in which
26 dType = dataType in require r he takes the order from the customers. After the food is ready,
27 pColSet = color set in provider p waiter serves the food to the customers and the customer request
28 dColSet = color set in require r for bill and goes to waiting state and leaves the restaurant
29 if pType is not equal to dType and pColSet is not equal to without payment.
dColSet The red line shown in the graph represents the customer leaving
the restaurant without payment. We verify the behavior of model
30 exit using condition 2 not met error to check if it is working correctly. In order to verify the model,
31 Rule3: we apply the BSF algorithm.
32 mark src, dest as linked{components are linked as they Using this algorithm we check the components are connected
have met all the required conditions} correctly.
33 exit using success code
34 end {for}
35 if exit code is not success
36 mark src, dest as not linked{components are not linked as
they have not met all the required conditions}
37 end { for }
38 end{ while}
Scenario A
Using Graph Stream Library, we build restaurant model
graph. Orange nodes represent that node are visited and green
arrow shows that components are correctly connected according
to their rules that are defined in algorithm.
According to the first rule, it must be checked whether the
source pattern and destination pattern are present in the meta file
Figure 12: Restaurant Model Graph (Counter Example)
36
2. Deadlock Freedom CPNs and its techniques are very beneficial as it is one of the
competitive tools for development of models for systems. CPN’s
A built in function ListDeadMarkings () is executed after the role in Composability verification is very constructive, because
creation of state-space which, after searching the whole state- it also focuses on dynamic Composability level.
space, provides a list of all dead markings. Empty set means that
there are no deadlocks in model. CPN communities have been working on the analysis techniques
to improve the performance of CPN tools and their work
3. Mismatching: provides a notable and efficient reasoning when working on the
model correctness.
Services promote business so they are assumed as good state. An In future, we aim to build a complex system in different
example of bad state may be going out of restaurant without application areas e.g business critical systems or mission critical
paying the bill because it causes loss to the restaurant. The systems using pattern based approach and also checking the
correct sequence of events to reach the good state “service” is correctness of system through verification techniques.
given below:
V. REFRENCES
Customer! OrderFood ĺ Waiter! TakingOrder ĺ [1] K. Jensen and L. M. Kristensen, "Coloured Petri Nets Modelling and .
WaitingForFood! FoodReady ĺ Waiter! ServeFood ĺ . Validation of Concurrent Systems," Springer-Verlag Berlin Heidelberg, . .
2009.
Customer! Bill ĺ Waiter! ReceivedPayment
[2] N. M. and W. M. v. d. Aalst, "Towards a Pattern Language for Colored .
When the monitor notices the sequence, it will activate “Leave Petri Nets," sixth workshop and tutorial on practical use Coloured Petri . .
Without Payment” event because after the event “Waiter Serves Nets and the CPN Tools., 2005.
Food” is done, the next event is “The Customer Requesting Bill” [3] I. Mahmood, R. Ayani, V. Vlassov, and F. Moradi, " Verifying Dynamic .
but due to no payment it goes into the waiting state. The Semantic Composability of BOM-Based ComposedModels Using Colored .
composed restaurant model can be considered verified in terms Petri Nets", ACM/IEEE/SCS 26th Workshop on Principles of Advanced . .
of requirements and behavior of the system if the good states are and Distributed Simulation, 2012.
reached more than zero times and the system never reaches to a
[4] Lemos, A. J. P., P. and A. , "Reuse of coloured petri nets software
bad state. ……models.," In: Proc. of The Eighth International Conference on Software
……Engineering and Knowledge Engineering,SEKE’01, Buenos Aires,
The behavior of the waiter is changed in this scenario, i.e. he ……Argentina, p. 145–152, 2001.
takes the order and instantly he calculates the customer’s bill
[5] L. D. d. Silva, K. G. and A. P., "Petri Nets for Component-Based ……
and provides it to him so that the customer can make the ……. Software Systems Development," I-Tech Education and Publishing, ……
payment. Meanwhile, the waiter waits for the payment Vienna, Austria, February 2008.
Figure 10. Once the bill is paid by the customer, the order is
conveyed to the kitchen by the waiter. [6] C. Alexander, "Timeless Way of Building", Oxford University Press, …..
1979.
Customer! OrderFood ĺ Waiter! TakingOrder ĺ [7] E. Gamma, R. Helm, R. Johnson and J. Vlissides, "Design Patterns, ……
Customer! Bill ĺ Waiter! ReceivedPayment Elements of Reusable Object-Oriented Software" Addison-Wesley, …… 1995.
WaitingForFood! FoodReady ĺ Waiter! ServeFood ĺ
[8] K. C. Gorgonio and A. Perkusich , "Adaptation of Coloured Petri Nets …..
Models of Software Artifacts for Reuse," Springer-Verlag Berlin …..
As all the events are same but the order is different, this system …….Heidelberg, 2002.
modification passes structural analysis.
[9] M. D. Petty and E. W. Weisel, "A theory of simulation composability", ….
Old Dominion University, Norfolk, Virginia,, 2004..
IV. SUMMARY AND CONCLUSION:
[10] I. Mahmood, "A Verification Framework for Component Based
In this paper, we proposed the reusability of pattern. We built …….Modeling and Simulation "Putting the pieces together", Doctoral thesis
a pattern and reused them to build complex models according to …….in Electronics and Computer Systems, Sweden, 2013.
the given requirement. The modeler doesn’t need to build a
[11] Wil M. P. van der Aalst, C. Stahl, M. Westergaard, “Strategies for
component from the scratch. Using CPN hierarchical features …….Modeling Complex Processes Using Colored Petri Nets”, Springer,
we developed the component. Through composability, we …….Berlin, Heidelberg, 2013.
combined different components and made a model. In order to
[12] 2017. CPN Tools. Accessed December 2017. http://cpntools.org/.
achieve successful composability, we needed verification.
[13] M. N. and J. W. Janneck, "Design patterns in petri net system modeling",
We used the BFS algorithm to check the components are …… Proceedings.," Fourth IEEE International Conference on Engineering of
correctly connected as per requirement specifications. We …. Complex Computer Systems (Cat. No.98EX193), 1998.
verified different properties in our restaurant model including
component integration, deadlock freedom and miss matching. In [14] L. M. Kristensen, "State Space Methods for Coloured Petri Nets,",
……Department of Computer Science, University of Aarhus, Aarhus,
order to ensure that our model works correctly, we verified these ……Denmark, Ph.D. Dissertation, 2000.
properties. For efficient and accurate verification of models,
37
[15] O. Balci, "Verification, Validation and Accreditation of simulation
…….models", in Proceedings of the Winter Simulation Conference, Atlanta,
…….GA, 1997.
38