Actions
Concepts
A performance of an action, which may be part
of an enclosing action, either:
- completes, corresponding to normal termination (the
performance of the enclosing action
proceeds normally); or
- escapes, corresponding to exceptional termination
(parts of the enclosing action are skipped
until the escape is trapped); or
- fails, corresponding to abandoning the performance
of an action (the enclosing action performs
an alternative action,
if there is one, otherwise it fails too); or
- diverges, corresponding to nontermination (the
enclosing action also diverges).
Actions can be used to represent the semantics of programs: action
performances correspond to possible program behaviours. Furthermore,
actions can represent the (perhaps indirect) contribution that
parts of programs, such as statements and expressions, make to the
semantics of entire programs.
An action may be nondeterministic, having different possible
performances for the same initial information. Nondeterminism
represents implementation-dependence, where the behaviour of a
program (or the contribution of a part of it) may vary between
different implementations---or even between different instants of
time on the same implementation. Note that nondeterminism does not imply
actual randomness: each implementation of a nondeterministic behaviour may be
absolutely deterministic.
The information processed by action performance may be classified
according to how far it tends to be propagated, as follows:
- transient: tuples of data, corresponding
to intermediate results;
- scoped: bindings of tokens to data,
corresponding to symbol tables;
- stable: data stored in cells, corresponding to
the values assigned to variables;
- permanent: data communicated between distributed
actions.
Transient information is made available to an action for immediate
use. Scoped information, in contrast, may generally be referred to
throughout an entire action, although it may also be hidden
temporarily. Stable information can be changed, but not hidden, in
the action, and it persists until explicitly destroyed. Permanent
information cannot even be changed, merely augmented.
When an action is performed, transient information is given only on
completion or escape, and scoped information is produced only on
completion. In contrast, changes to stable information and extensions
to permanent information are made during action performance,
and are unaffected by subsequent divergence, failure, or escape.
The different kinds of information give rise to so-called
facets of actions, focusing on the
processing of at most one kind
of information at a time:
- the basic facet, processing independently of
information (control flows);
- the functional facet, processing transient
information (actions are given and give data);
- the declarative facet, processing scoped
information (actions receive and produce bindings);
- the imperative facet, processing stable
information (actions reserve and unreserve cells
of storage, and change the data stored in cells); and
- the communicative facet, processing permanent
information (actions send messages, receive messages in buffers,
and offer contracts to em agents).
These facets of actions are independent. For instance,
changing the data stored in a cell---or even unreserving the
cell---does not affect any bindings. There are, however, some
directive actions, which process a mixture of scoped
and stable information, so as to provide finite representations of
self-referential bindings. There are also some hybrid primitive actions
and combinators, which involve more than one kind of information at once, such
as an action that both reserves a cell of storage and gives it as transient
data.
The notation for specifying actions consists of action
primitives, which may involve yielders, and action
combinators, which operate on one or two subactions.
Action Notation 1 Summary|
Yielders Concepts|
Data Concepts