Locations
An event in a DCR graph is located in two ways:
- It is defined at a particular place.
- It may be located inside a Nesting or Container event.
Location of Definition (Forms)
Say we have a DCR graph which contains a form F
, and that this form
contains an event A
. The form F
is necessarily a self-contained DCR
graph1, and so the marking of A
must live inside F
.
An event B
not in the form convesely must live outside F
. In particular,
its marking must live someplace outside F
.
The place in the graph where the marking of an event E
sits is the location
of definition of E
.
1F
must be self-contained because we eventually pass it on to the
form engine.
Location of Definition (Subprocesses)
Multi-instance subprocesses generate new events. We distinguish between an A
generated in one instance with an A
generated by another by the location of
their definition. E.g., if one A
is part of the 7th instance of subprocess P
and another is part of the 8th, we distinguish between them by the location
of their definition, in this case inside distinct instances of P
Location of Definition (Relations)
The location of definition of an event is important because event names in relations always refer to the closest event with that name, going upwards. This is necessary because subprocesses would not otherwise be able to have relations between events in the spawned process and outside, e.g.:
(A defined at the root)
P[0] (subprocess instance, defines B)
B -->* A
P[1] (subprocess instance, defines B)
B -->* A
Here, the two instances of P
both contain an event named B
, and a relation
from this event to the event A
defined at the root. The template for P
specifies the relation A -->* B
, knowing that A
will be refer to the
root definition of A
, and B
will be refer to the local B
in the defined
by the template itself.
Location of Event
Events also have a second notion of location: They may be inside a Nesting or a Container. However, the location of an event, an the location of its definition need not be the same thing, and the engine supports events located in more than one place.
We distinguish between the two types of location by speaking of "location of definition" for placement of markings and simply "location" for placement of the event inside Nesting and Containers.
Syntax of Locations
A location is represented by an object of type DCR.Path, which we typically generate from strings. Refer to the constructor Path constructor for strings for examples of the string syntax.
Setting Locations
The location of definition for an event is set by the location given when the event is constructed, see Graph.AddEvent.
The location of an event inside a Nesting or Container can be modified by the Graph.AddLocation and Graph.RemoveLocation methods.