Research on Mapping UML to Petri-Net in System Modeling

. The paper analyzes the need of complex system modeling.According to the advantage and shortage of UML and Perti net, comprehensive usage of Petri net and UML can efficiently improve the comprehensiveness, consistency, accuracy and completeness of the model describing (cid:714) The translation rules from UML to Petri net were proposed. So the UML model can be analyzed and verified better.


Submitting the manuscript
A model is the complete abstraction of a system, and the model including the comprehension and understanding that how to solve the problem and the solution of the problem. The model makes up of element and has certain system structure. The system model is the abstraction of actual system. For the huge system which has many equipments and complicated conjunction relation, how to optimize the information interaction is emphases. It has high request for the real-time communication and the cooperatively of the sub-system. The information interaction relation and type that between the system and sub-system and inner sub-system is complicated. And it has high request for real-time. Making good model for this kind of system, it can build up good foundation for development and maintenance of system.

The introduction of UML
Along with the advance of system's complicacy, it is more and more urgent to the need of good model language. UML develops with the object-oriented system analysis and design. It is mainly used to build the system model within the analysis and design stage, and it has scalability and commonality. Being the third generation object-oriented modeling language, it is a kind of graphical language, including demand analysis and structure and allocation. The definition of UML includes semanteme and notation. The semantic description is based on the definition of accurate metamodel. The metamodel provides a brief and consistent and general definition elucidation for the elementses in semanteme and notation. With these, developer can obtain unanimity on semanteme. UML includes use case diagram and collaboration diagram and interaction diagram and sequence diagram, and can also induce for the static state modeling mechanism and dynamic modeling mechanism. Figure 1 is the step of UML modeling process. Being an object-oriented model tool which has good definition and easy expression and direct description, UML provides effective tool for design and analysis of information system. But while constructing complicated and huge system, it is difficult to embody the cryptic concurrency between objects and the consistency of constraint rule between objects. And it is also difficult to display the dynamic behavior character completely. UML is applicable to describe any type of system with object-oriented technique, and is applicable to different stage of system development. From the need description to the test and maintenance after completing, UML all can be used.

Petri net
Petri net is put forward by Germany Carl Adam in his doctor dissertation in 1962 firstly. Petri net can not only be used to analyze the static structure, but also the dynamic behavior. And it is a kind of mathematic and graphical tool to describe and analyze. To develop the information processing system which is parallel or asynchronous or distributed or concurrent or indeterminacy, it can construct the Petri net model and analyze. Then, we can get the information about the system structure and the dynamic state behavior.
According to the information, we can evaluate and improve the system. The state element and variety element of Petri net use Place and Transition to express respectively. The function of transition is changing the state, and the function of place is to decide whether the transition can take place. The dependency relationship between transition and place uses directional-arc (arrowhead) to denote and it is a Petri net. We use circle to represent the place, and use rectangle to represent the transition, and use directionalarc to represent the input that from place to transition and output that from transition to place. During building the model, if use the concept of condition and events, then position represent the condition and transition represent the events, and all these can constitute a Petri net, such as figure 2.  2 shows that the events are the action taking place in the system. The occurrence of these actions is controled by the state of system, while these states can be sescribed with a set of condition. Condition is the property or logic description of system and a condition can be established or not established. Because the event is an action, it probably takes place. The occurrence of an event may need a few conditions to be established at the same time, and all these conditions are called the prior condition of event. The occurrence of the event may cause the prior condition disappear and produce other conditions, and those aonditions are called subsequent condition. Petri net studies the structure and dynamic behavior of system, and pay attention to the state variety and the relation of variety that possiblly take place in the system. The Petri net can descripe the dynamic character of system laconically, such as concurrent, conflict synchronous etc. It has corresponding analysis method. So Petri net is broadly applied in building model and analysis.  The conversion of model is not to re-construct a new model, and it has to keep certain restriction. It can discover the likeness between UML and Petri net based on analysis. UML shows object accepting and sending the message and operation inside the object. Petri net shows inner place and transition. UML statechart is classic Object-Oriented variant, and it describes an object how to transfer state under events driving in its life cycle, and it gives the origin and terminus. And also it displays the detail of object's dynamic behavior, so it can convert into object's Sub-Petri net. Therefore it can withdraw information from UML statechart to construct object's Petri net model.

02038-p.2
The mapping rule is as follows, such as Figure 4. The place in Petri net model mapping to properties of objects in UML model. The Subnet in Petri net model mapping to statechart of object in UML model. The place corresponds to the activity in statechart and the transition corresponds to the action in the statechart. The transition in Petri net model mapping to activity in UML activity diagram, and the place mapping to condition. The door transition in Petri net model mapping to the message event in UML interaction diagram (sequence diagram and collaboration diagram).
activity diagram Figure 4. Petri net model mapping to UML model UML analysis and disassemble the system from top lever bottom, and attain genus and various charts that shows the relation between the genus. Figure 5 is the statechart of UML and Figure 5 is the sequence diagram of UML. Figure 6 shows that event 1 and event 2 and event 3 and event 4 are external events. When object accepts external events, the statechart can show the operation of the object which accepts the message and the change of state under the corresponding condition. Subnet in Petri net model, and the source state mapping to ex-gather place of transition, and the object state mapping to behind gather place of transition, and the convertion element mapping to two arc from ex-gather place to transition and from transition to behind gather place, such as figure 8. The sequence diagram in UML model describes the delivering relation of message between objects, and mapping this relation to communication relation between Object-Oriented Petri net objects. By this way, the model described by UML using class diagram and interaction diagram and collaboration diagram is mappinged to Petri net model described by place and transition and connected relation. With completing the mapping, gradual and concrete Petri net model can be established. Corresponding to UML diagram, the reflected Petri net model is also hierarchical type, and the whole Petri net model includes several Sub Petri nets. Corresponding to UML, the reflected Petri net model is also Object-Oriented. Divided into many parts, every part corresponds to one object, and the relationship between parts only pass message event. The model described with UML is reflected to Petri net model, and then it can be analyzed and optimized and described with mathematics based on Petri net theory, and carry out continuous improvement to the model.