Bx Examples Repository
Title: Unweighted And Weighted Petri Nets
Version: 0.1
Type:
Sketch.
Overview
This example tests handling of information loss in one direction, i.e., going from unweighted Petri nets to weighted Petri nets.
Models
A representation of the source and target data structures as meta-models is depicted in the diagram below.
The only difference is that the connections between Transitions and Places are nodified to be able to introduce an attribute representing the weight of the connection.
Consistency
A given unweighted Petri net and weighted Petri net are consistent if (1) there is a bijection from places and transitions in the unweighted Petri net to places and transitions in the weighted Petri net, (2) for every connection between a transition and place in the unweighted Petri net, there is a suitable (cf. the metamodels) Edge connecting the same transition and place (with some arbitrary weight that is irrelevant for consistency).
Consistency Restoration
Many possibilities here: one could set a default weight (e.g., 1) when creating edges, or simply ask the user for the missing weight. In any case, when propagating changes on the unweighted Petri net to the weighted Petri net, weights should be retained as far as this is possible without violating consistency.
Properties [optional section]
Variants [optional section]
Discussion
References [optional section]
This example is taken from the following paper:
[1] Westfechtel, Bernhard. "Case-based exploration of bidirectional transformations in QVT Relations." Software & Systems Modeling (2016): 1-41.
Author(s)
Bernhard Westfechtel, Anthony Anjorin
Reviewer(s)
Comments
Artefacts [optional section]
An implementation with QVT-R can be taken from: Westfechtel, Bernhard. "Case-based exploration of bidirectional transformations in QVT Relations." Software & Systems Modeling (2016): 1-41.
An implementation with TGGs can be downloaded from here or viewed as diagrams here.
Note that both the paper and implementations focussed on "batch" forward and backward transformations and not on consistency restoration.