Based on chapters 23 and 24 in The Way of Z.
Links to more Z lectures.
This page looks best when this
and this X are
about the same size:
X. See these viewing tips.
Large systems are composed of components collected into subsystems. Complex components can be built up from simpler ones using schema inclusion.
![]() |
Param | ![]() | |
![]() |
|||
![]() | |||
| preset, setpoint, value: SIGNAL | |||
![]() | |||
![]() |
PS | ![]() | |
![]() |
|||
![]() | |||
| Param | |||
| contactor: SWITCH | |||
| faults: | |||
![]() | |||
![]() | |||
| faults | |||
| contactor = open | |||
| ... | |||
![]() | |||
| On |
| TurnOn |
| Servo |
COMBINING COMPONENTS
Each component has a name. Components have different types but they all have the same type of name. Names of similar components are collected into sets. The state of the entire system is a collection of functions from names to bindings of the component types.
| [NAME] |
| ps = { rf, mainfld, ... } |
| s = { mainprb, deflprb, ... } |
![]() |
Cyclotron | ![]() | |
![]() |
|||
![]() | |||
| supply: ps | |||
| servo: s | |||
| ... | |||
![]() | |||
![]() | |||
| ... | |||
![]() | |||
PROMOTION
Operations on single components can be promoted to operations on the whole system. First define a framing schema.
![]() |
CycloFramePS | ![]() | |
![]() |
|||
![]() | |||
| ps?: ps | |||
![]() | |||
![]() | |||
| { ps? } | |||
![]() | |||
Then combined the component operation with the frame, identifying the component of interest.
![]() |
TurnOnMainfld | ![]() | |
![]() |
|||
![]() | |||
| CycloFramePS | |||
| TurnOn | |||
![]() | |||
![]() | |||
| ps? = mainfld | |||
![]() | |||
SUBSYSTEMS
Subsystems can be modelled by sets of names of dissimilar objects. States and operations can be defined on subsystems.
| rfsys, cyclo, bla, blb, blc, iso, fix: | ||
![]() |
TurnOnBLA | ![]() | |
![]() |
|||
![]() | |||
![]() | |||
![]() | |||
![]() | |||
![]() |
BLAReady | ![]() | |
![]() |
|||
![]() | |||
| Cyclotron | |||
![]() | |||
![]() | |||
| supply | |||
![]() | |||
WHOLE SYSTEMS
Complex operations can be described compactly.
![]() |
SafeTurnOnBeam | ![]() | |
![]() |
|||
![]() | |||
| TurnOnBeam | |||
![]() | |||
![]() | |||
| IsoTest | |||
| IsoTreat | |||
| Preconditions for other modes ... | |||
![]() | |||
| T_TurnOnBeam |
OBJECT-ORIENTED STYLE IN Z
Schema inclusion is much like inheritance in object-oriented programming languages, but every schema type is distinct (no ``subtypes'').
| Param |
| PS |
| panel: Param | ||
| mainfld: PS | ||
![]() | ||
![]() | ||
| panel.setpoint = mainfld.setpoint | ||
| offset == ( | Definition |
| offset panel | Type correct |
| offset mainfld | Type error! |
Use a projection function to extract the Param.
| offset (( | Type correct |
Back to Z lectures.