14.3. Execution Model
The Perspectives Language is partly declarative. It lets the modeller describe contexts, roles, properties, perspectives and more, on the type level. But it also contains assignment statements to update instances of those types, to track a changing world. Assignments are always carried out by an end user, either by direct manipulation through the user interface (e.g. by dropping a role onto another, signalling the PDR that the former should fill the latter), or by executing actions, which are pre-packaged sequences of statements. But there is yet another mechanism responsible for executing assignment statements and that is actions carried out automatically on behalf of some user when the state of a context or role changes.
More specifically, when a resource enters or leaves a state, actions may be carried out automatically. This raises some questions, a.o.:
-
Does state change statement by statement, during action execution?
-
If a resource moves in a new state S because of the execution of a statement in a sequence, when exactly will statements to be executed on entering S be carried out?
-
How does resource creation and deletion relate to state change?
-
When a context and its roles are deleted, in what order are on exit statements executed?
In this text we give answers by describing our design decisions. Together, they give the execution model of the Perspectives Language.