• Aucun résultat trouvé

Coordination Rules Generation from Coloured Petri Net Models

N/A
N/A
Protected

Academic year: 2022

Partager "Coordination Rules Generation from Coloured Petri Net Models"

Copied!
2
0
0

Texte intégral

(1)

Coordination Rules Generation from Coloured Petri Net Models

Adja Ndeye Sylla, Maxime Louvel, François Pacull

Univ. Grenoble Alpes, CEA, LETI, MINATEC Campus, F-38054 Grenoble, France [email protected], [email protected], [email protected]

Abstract. This paper presents an environment to automatically gener- ate coordination rules from coloured Petri nets models.

1 Introduction

Today’s systems such as building automation or industrial control processes are composed of many heterogenous and interacting components. These interac- tions raise problems such as data sharing and concurrent accesses. Coordination models and languages [4] are essential to provide a simple way to handle these interactions. LINC [3] is a rule based coordination environment. It is used to develop and deploy distributed applications. A LINC application is a set of rules enacted in distributed rule engines. LINC relies on powerful mechanisms such as transactions to ensure the normal execution of a rule. However, this does not prevent from writing conflicting rules. Currently, these conflicts are detected at execution time, when bugs are observed.

2 Contribution

The proposed approach consists in generating LINC rules from coloured Petri Net (CPN) models [2]. An application is first modelled using CPNs. This helps exchanges among all team members. Then the refined CPNs are verified to avoid undesired behaviours. Finally, the corresponding LINC rules are automatically generated and directly executed by LINC.

An application developed using LINC is a set of rules manipulating resources in several bags (bags are a distributed associative memory [1]). A resource is a tuple of strings and is manipulated using three operations: rd, get, and put to respectively verify the presence of resources, consume and insert resources. A rule consists of a precondition (i.e. verification of conditions) and a performance (i.e. actions to perform, atomically when the conditions are verified). To enable the automatic generation of LINC rules, we limit the colours. Colours defining states of the system are enumeration. Other tokens are tuples of strings.

To generate the rules, we define a transformation to move from CPN to LINC rules (Table 1a). Tokens in places are mapped to resources in bags. A transition is mapped to a performance. Indeed they both verify conditions and atomically

(2)

perform actions. An arc is mapped to an operation: both direction to rd, place to transition to getand transition to place to put. In LINC rule, the precon- dition explicitly specifies that the performance is triggerable when the specified resources are present. This is implicit in a CPN (i.e. a transition is enabled as soon as the specified tokens are present). Thus precondition is generated using the incoming arcs of a transition. To enable the graphical representation and the verification of LINC applications which were manually developed, we define the reverse transformation to move from LINC rules to CPN (Table 1b).

Coloured Petri net LINC rule

Token Resource

Place Bag

Transition Performance

Arc Operation

orientation type

Arcsincoming in a transitionPrecondition (a) CPN model to LINC model

LINC Coloured Petri net Resource Token

Bag Place

Operation Arc type orientation Performance Transition Precondition Implicit in CPN

(b) LINC model to CPN model Table 1: Defined transformations

Verification of CPN is limited in existing tools. Thus a CPN is first trans- formed to a PN by unrolling the colours with enumeration. Other places are left as is. Then, the generated PN is verified using existing model checkers. This enables to verify undesired behaviours such as deadclok and livelock.

3 Conclusion

This paper has presented a method to automatically generate rules from vali- dated Coloured Petri Nets. CPNs verification ensures the global behaviour and LINC ensures that each step is actually executed according to the CPN. Hence distributed applications can safely be executed in actual distributed and em- bedded systems. This has been validated in a smart parking solution including several off-the-shelves hardware and software components.

References

1. N. Carriero and D. Gelernter. Linda in context. Commun. ACM, 1989.

2. K. Jensen. Coloured Petri nets: basic concepts, analysis methods and practical use.

Springer Science & Business Media, 2013.

3. M. Louvel and F. Pacull. Linc: A compact yet powerful coordination environment.

InCoordination Models and Languages. Springer, 2014.

4. G. Papadopoulos and F. Arbab. Coordination models and languages. Advances in computers, 1998.

326 PNSE’15 – Petri Nets and Software Engineering

Références

Documents relatifs

We define a partition of the set of integers k in the range [1, m−1] prime to m into two or three subsets, where one subset consists of those integers k which are < m/2,

This assumption is however not used in the definition of the ttelson constant, and we shall therefore consider also another type of Kelson- constant, which is more

In earlier work [5], we have proposed the PetriCode approach and a support- ing software tool [7] has been developed for automatically generating protocol implementations based on

A deep theorem, known as the Newlander-Nirenberg theorem, originally proved in 1957, states that a C ∞ almost complex structure derives from a holomorphic structure if and only if it

Then, the author proposed a complete type inference algorithm for Wand's system [Rem89], but it was formalized only in the case of a nite set of labels (a previous solution given

If B is the family of continuous measures on some perfect compact metric space, Theorem 4.1 can of course be greatly improved: by the Baire Category Theorem, any dense G δ subset of

[r]

DOIIESS (wHERE DATA ERROR OCCURREO).. ,PHYStCIIL BUFFER ADDRESS.. ANY WRITE ,CHECK ERROR IS REPORTED.. THE DISK WITH R/l.NDOM PATTERNS.. THIS IS AN ,UNEXCEPTED ERROR