Next: 2.2 Design and Implementation
Up: 2 Position
Previous: 2 Position
At the most abstract level, all actions of a system can be assumed to occur in intervals without overlap. An interval at this level of abstraction represents a cycle of the concrete system.
A theory SData gives
definitions of the types and constants used in the system, and
will be included in each of the other theories:
Each physical component has an associated monitor which
provides an interface between it and the controller. This monitor is
responsible for managing the protocol of communications between the
controller and the components, and for detecting errors in data and
communications.
@
/* Minimum water level */
/* Maximum water level */
/* Minimum normal water level */
/* Maximum normal water level */
/* Maximum steam production */
/* Capacity of boiler */
/* Capacity of pump */
/* Max rate of steam increase */
/* Min rate of steam increase */
/* Sampling interval */
The axioms of the monitor theory for the water measure formalise the requirements given in [2, pages 500-509].
If a level measure failure occurs, the system must react by recording the failure:
The signal must then be repeated untilA signal resets the attribute:
and leads to the generation of a :A valid water level event sets the value of :
The theory of the steam measure monitor is identical in structure to the
water measure monitor. Formally it is an isomorphic image under the
morphism which maps C to W,
to
, etc.
A similar structure can be given for the theory of the
pump, pump monitor and
the pump controller and its monitor. Indeed we can recognise a number of
commonalities between the monitor theories (only the criteria for detecting
sensor failures, and for recording the current state,
are different). There are common subtheories
FailureManager of the form
These in their turn could be subdivided into parts dealing with
the communication protocol (axioms 3 and 5) and parts dealing with the
recording of failure status (axioms 1, 2 and 4).
condition: Condition
A theory Transmission
has the form
where we regard the PState and PCState types as isomorphic to as in [2].
Therefore the theory can be re-expressed in terms of Transmission, via the morphism m7 of Figure 2:
and FailureManager, via the morphism m1 The attribute and axioms to initialise and set this quantity are defined locally in , and the axiom determining when a component failure occurs is also defined in this theory.
Similar constructions work for the pump and pump controller (flow monitor)
components. Figure 2 shows the structure of this part
of the system.
Separate copies of the FailureManager and Transmission
theories are
included in each of the component theories, but we identify all the
different actions
so that a transmission failure in
any component
generates the same system error event.
The theory of the controller then extends the co-limit of the
monitor theories with the following attributes and actions:
cstate: CState
react
terminate
stop
The specification can be validated via animation [11]. The actions and are general operations which will be interpreted as opening and closing certain pumps in the actual physical system: we have defined a layered architecture in which the implementation details of such abstract actions are hidden from the high-level controller.
K. Lano, J. Bicarregui, T. Maibaum, and J. Fiadeiro