Combining Petri Nets and UML for Model-based Software Engineering

UML is by far the most widely used modelling language used nowadays in software engineering, due to its large scope and its wide tool support. This software standard offers many diagrams that cover all typical perspectives for describing and modelling the software systems under consideration. Among those diagrams, UML includes diagrams (activity diagram, state machine diagram, use case diagrams, and the interaction diagrams) for describing the behaviour (or functionality) of a software system. Petri nets constitute a well-proven formal modelling language, suitable for describing the behaviour of systems with characteristics like concurrency, distribution, resource sharing, and synchronisation. Thus, one may question why not combining some UML diagrams with Petri nets for effectively supporting the activities of the software engineer. The usage of Petri nets for/in Software Engineering was addressed by several well-known researchers, like, for example, Reisig [6], Pezz` [1], Machado [5], and Kindler [4]. In this invited paper, we discuss some alternatives to introduce Petri nets into a UML-based software development process. In particular, we describe how Coloured Petri Net (CPN) models can be used to describe the set of scenarios associated with a given use case. We describe three different alternatives that can be adopted to achieve that purpose. The first approach, initially presented in [7], suggests a set of rules that allow software engineers to transform the behaviour described by a UML 2.0 sequence diagram into a CPN model. Sequence diagrams in UML 2.0 are much richer than those in UML 1.x, namely by allowing several traces to be combined in a unique diagram, using highlevel operators over interactions. The main purpose of the transformation is to allow the development team to construct animations based on the CPN model that can be shown to the users or the clients in order to reproduce the expected scenarios and thus validate them. Thus, non-technical stakeholders are able to discuss and validate the captured requirements. The usage of animation is an important topic in this context, since it permits the user to discuss the system behaviour using the problem domain language. In the second approach, discussed in [3], we assume that developers specify the functionality of the system under consideration with use cases, each of which is described by a set of UML 2.0 sequence diagrams. For each use case, there should exist at least one sequence diagram that represents and describes its main scenario. Other sequence diagrams for the same use case are considered to be variations of the main sce

[1]  Giovanni Denaro,et al.  Petri Nets and Software Engineering , 2003, Lectures on Concurrency and Petri Nets.

[2]  Ricardo J. Machado,et al.  Requirements Validation: Execution of UML Models with CPN Tools , 2007, International Journal on Software Tools for Technology Transfer.

[3]  João M. Fernandes,et al.  Requirements Engineering for Reactive Systems: Coloured Petri Nets for an Elevator Controller , 2007, 14th Asia-Pacific Software Engineering Conference (APSEC'07).

[4]  João M. Fernandes,et al.  Some rules to transform sequence diagrams into coloured Petri nets , 2006 .

[5]  O. Ribeiro,et al.  Designing Tool Support for Translating Use Cases and UML 2.0 Sequence Diagrams into a Coloured Petri Net , 2007, Sixth International Workshop on Scenarios and State Machines (SCESM'07: ICSE Workshops 2007).

[6]  Ekkart Kindler,et al.  Model-Based Software Engineering and Process-Aware Information Systems , 2009, Trans. Petri Nets Other Model. Concurr..

[7]  Wolfgang Reisig,et al.  Petri Nets in Software Engineering , 1986, Advances in Petri Nets.

[8]  Vladimiro Sassone,et al.  Petri Nets and Other Models of Concurrency , 1996, Petri Nets.