Abstract
Abstract -The role of modelling is important in software or system development. Modelling provides a way for developers to perform model design, model analysis and model synthesis. However, each phase have different requirements which leads to the use of different modelling language for each phase. For example, in model design, usually UML is used due to its semiformal notational nature, making it easier for developers and other stakeholders without prior knowledge on modelling or programming language to understand. In model analysis, due to its mathematical needs in carrying out mathematical analysis, a modelling language with formal semantics like Petri Net is needed. This results in a condition called heterogeneity, where two modelling language could not communicate with each other. This paper aims to bridge the gap by introducing transformation rules between two type of modelling language which is Petri Net (from model analysis) and UML Sequence Diagram (from model design). This paper also aims to introduce a method of applying Model Driven Development (MDD) model transformation from Petri Nets to UML Sequence Diagram.
I. INTRODUCTION
The role of modelling is vital in a software or system development. By using models in a software or system design, level of abstraction can be raised and various types of views of the system can be obtained. Also, with modelling, developers can perform model design, model analysis and model synthesis. In model design, the view of the system is represented in the form of models. Developers usually go for a semi-formal notational modelling language because it represents a good balance between the ease-of-use and precision. In model analysis, developers are able to use the models to perform preliminary analysis for the system. Due to the mathematical nature of the analysis, the modelling language used have to be made up of formal semantics and mathematical-based. Meanwhile in model synthesis, it is the process of allowing two or more models to be joined together based on a set of common elements. Due to the different requirements needed in different phase, different types of modelling languages are needed in model design, analysis and synthesis. This paper is inspired by the limitation of SD2PN, which is a model driven approach to represent Sequence Diagrams as Free Choice Petri Nets [1] . Using SD2PN, developers are able to transform Sequence Diagram models to Petri Net models. By doing so, model analysis could be performed before the actual implementation phase. Preliminary analysis can be done on the Petri Net models to reduce critical errors. However, developers are still required to manually update the Sequence Diagram models after performing analysis on the Petri Net models. This is because SD2PN is only a one-way transformation process. This makes it a tedious repeated process.
I. INTRODUCTION
Hence the main contribution of this paper is to design a set of transformation rules to overcome the limitation of SD2PN. The set of transformation rules aims to transform Petri Net models to Sequence Diagram models. With the new set of transformation rules, developers can first use SD2PN to transform Sequence Diagram models to Petri Net models for preliminary analysis. After making changes to the Petri Net models, developers can use the transformation rules showed in this paper to help transform Petri Net models to Sequence Diagram models.
II. FOUNDATION
This section will explain on the basic foundation of Model Driven Development, Petri Net, Sequence Diagram and SD2PN.
A. Model Driven Development
The role of modelling in software development is promoted mainly via Model Driven Development [2] . Models in the context of MDD are captured in machine-readable representation, using languages which are generally adopted by software industry [3] . So it makes them possible to communicate with such models to different parties and reuse them. This in turn results in a lower software production cost and shorter development cycles. In this paper, MDD is used to develop a method to benefit from advantages of using two representation of a system, Petri Nets and Sequence Diagrams.
A. Model Driven Development
Meta Object Facility (MOF) [4] is one of the standards for describing metamodels. Metamodel is defined as model of the models, from which models of the system are instantiated. Model Driven Development Fig. 1 above illustrates the outline of MDA and the process of Model Transformation. As shown by Czarnecki and Helsen [5] the main features that are common to model transformation includes specification, the pre-condition and post conditions for a model transformation, the set of transformation rules, the directionality of the transformations and also the source and target relationship. For this paper, the model transformation is based on MOF where a number of Transformation Rules are utilized to define how different elements of one metamodel (source) are mapped into the elements of another metamodel (destination). The process of Model Transformation is carried out automatically via software tools which are commonly referred to as Model Transformation Framework. A typical Model Transformation Framework involves three inputs, which is source metamodel, destination metamodel and transformation rules. For any instance of the source metamodel, a transformation engine executes the rules to create an instance of the destination metamodel. Examples of Model Transformation Framework include SiTra [6] and ATL [7] .
B. Petri Nets
Petri Net is a formal modeling language that is represented graphically with a strong mathematical foundation [8] . It is used to model control flow in a system and is capable of modeling concurrency and synchronization in distributed system. Petri Net can be defined as of below: Definition 1: Petri Net is a triple N = (S, T, F), where S is a finite set of places and T is a set of transition where
B. Petri Nets
A marking of N is a function m:S → {0,1,2,3, …}, where each place s ∈ S is assigned the number of tokens. M 0 is used to show the initial marking, the number of tokens in each place at the beginning of execution.
B. Petri Nets
Graphically, Petri Net consists of three components, which are places (circles), transitions (rectangles) and arcs (arrows). A place represents different states of the system while a transition represents the events or actions which cause the change of a state. An arc connects a place with a transition or a transition with a place. Token is also another element in Petri Net. The movement of a token from a place to a new place indicates a change of state. The movement of the token is also known as firing. A Petri Net where conflicts and concurrencies are not happening simultaneously is called a Free Choice Petri Net [9] .
C. Sequence Diagram
Sequence Diagram is the UML 2.0 version of Message Sequence Charts [10] . It shows object interactions arranged in time sequence and how processes work with each other and in what order. This in turn makes them effective in modelling behavior and alternatives. Components in a sequence diagram include lifeline, message, interaction operator, event and combined fragment. A message can be denoted as an event, or the flow of information between the objects in Sequence Diagrams, so a message is considered to be a Sequence Diagram fragments. The four InteractionOperatorKind (alternative, option, break and parallel) as mentioned earlier in part B are able to change the flow of events in different ways, hence they are also considered as a fragment type too. Hence, SD2PN only considers five types of Sequence Diagram fragments, which are messages, alternative, option, break and parallel. The transformation rules are set for each five types of Sequence Diagram fragments.
III. TRANSFORMATION RULES
In this part, the transformation rules for each type of Petri Net fragments will be presented.
A. Identifying the fragments in Petri Nets
In the graphical notation of Petri Net, a . symbol denotes an arc. If the symbol appears before the labelling, it represents an incoming arc, if it appears after the labelling, it represents an outgoing arc. . > 1, we can see that the outgoing arc of the first state (S 1 ) is equals to one, and the outgoing arc for the first transition (T 1 ) is more than one, in this case the outgoing arc for T 1 is two. This denotes that it is the start of a parallel fragment. The notation of T n = 1 and . T 1 > 1, can be explained as follows, when the (n)th number of transition is 1 and the incoming arc of that transition is more than 1. In this case, the second transition (T 2 ) is one and the incoming arc of T 2 is more than one. This indicates that this is the end of a parallel fragment. = ∅ can be explained by, when the outgoing arc for S 1 is 2 and the outgoing arc of either one of the next two states is a null set, then it is a break fragment. In this case, the outgoing arc for S 1 is two, while the outgoing arc for S 3 is a null set. Hence it is a break fragment. S 2 = 1 Based on the methods above, a Petri Net can be broken down into five fragments, which is parallel, break, option, alternative and message fragments.
B. PN2SD (Petri Nets to Sequence Diagram) Transformation
Rules In this part, the transformation rules for the five types of Petri Net fragments will be shown. However, the step in transforming is slightly different compared to SD2PN. In transforming Petri Net model to Sequence Diagram model, the parallel, break, option and alternative fragments are identified first. By doing so, the possibility of finding an Interaction Operator within another Interaction Operator is easier. After finding out the operators, then only the message fragment is transformed.
B. PN2SD (Petri Nets to Sequence Diagram) Transformation
Upon identifying a parallel fragment in Petri Net, transformation rule 1 can be applied; which is for each parallel fragment in Petri Net detected, a parallel fragment for Sequence Diagram is created. s1 t1 t2 s2 Fig. 8 .
B. PN2SD (Petri Nets to Sequence Diagram) Transformation
Applying PN2SD to a parallel fragment Fig. 8 shows how a parallel fragment from Petri Net is represented in Sequence Diagram. The placeholder 1 and 2 is represented by Par_fragment1 and 2 respectively in the Sequence Diagram. The parallel operator specifies that two or more sets of event should occur concurrently without any predefined set of condition [11] . Applying PN2SD to a break fragment Fig. 9 shows how a break fragment from Petri Net is represented in Sequence Diagram. The placeholder 1 is represented by Break_fragment1 in the Sequence Diagram. As described by [11] , break consist of a guard (condition), when it is satisfied, the operation breaks (terminate). Fig. 10 illustrates how an alternative fragment from Petri Net is represented in Sequence Diagram. The placeholder 1 and 2 is represented as Alt_fragment 1 and 2 respectively in Sequence Diagram. The alternative operator specifies that a set of event may occur if a condition is satisfied and another set of event will occur if otherwise [11] . For option fragment, it can be treated similarly to the alternative fragment. Hence the same Sequence Diagram Interaction Operator will be produced, only that it is an option operator type. And also placeholder 1 and 2 will instead be represented by Opt_fragment1 and 2. s1 m t1 s2 Fig. 11 . Applying PN2SD to a message fragment Last but not least, Fig. 11 shows how a message fragment in Petri Net is represented in Sequence Diagram. According to UML Superstructure 2.0 [10] , it describes message either as a call for the execution of an operation or depicting sending and receiving of a signal.
IV. DISCUSSION AND CONCLUSION
This paper is the first step in applying a model driven approach to represent Petri Nets in Sequence Diagram. The model transformation steps include the Petri Net fragment identification and also applying PN2SD to Petri Net fragments. The main contribution of the paper is to identify the Petri Net fragments in a Petri Net and to use a model driven approach to represent Petri Net fragment in Sequence Diagram fragment. Due to progress of the research, a method to combine the Sequence Diagram fragments is excluded from this paper. That in turn, will be published in another paper, which is a result paper for the whole research.
ACKNOWLEDGEMENT
We would like to express our gratitude to the university for providing a platform for our research. Other than that, we are also grateful for Malaysia's Department of Higher Education in providing the Fundamental Research Grant Scheme for our research.
ACKNOWLEDGEMENT
Last but not least, we would also like to express our appreciation to all the previous researchers for their publications which helped a lot in our research for this paper. Without going through their publications, we would not have produced this paper.

{'paper_id': '7820586', 'title': 'A Model Driven method to represent Free Choice Petri Nets as Sequence Diagram', 's2_url': 'https://api.semanticscholar.org/CorpusID:7820586', 'source': 'S2ORC'}