abstract final Feature
abstract final FeatureModel
WinFeatures : FeatureModel
manualUpDown : Feature
express : Feature ?
pinchProtection : Feature ?
abstract final Component
abstract Port
abstract final Command
abstract State
abstract final StateMachine
motorUp : Command
motorStop : Command
motorDown : Command
abstract WinMotor : Component
cmd : Port -> Command
abstract final UserRequest
up : UserRequest
expressUp : UserRequest ?
stop : UserRequest
down : UserRequest
[ express <=> expressUp ]
[ all c : WinController | pinchProtection <=> c.pinchDetector ]
abstract WinController : Component
motor : WinMotor
pinchDetector : Component ?
req : Port -> UserRequest ?
endOfTravel : Port ?
objectDetected : Port ?
[ lone req, endOfTravel, objectDetected ]
[ always req = expressUp => next no req ]
final xor WinStates : StateMachine
xor movingUp : State
[ req = down --> movingDown ]
initial basic : State
[ ! req = expressUp --> basic ]
movingUpX : State
[ this --> movingUpX ]
initial xor stopped : State
[ closed && req = down --> movingDown ]
[ partlyOpen && req = up --> movingUp ]
[ open && req = up --> movingUp ]
[ ! (closed && req = down || partlyOpen && (req = up || req = down) || open && req = up) --> stopped ]
closed : State
[ this --> closed ]
partlyOpen : State
[ this --> partlyOpen ]
open : State
[ this --> open ]
movingDown : State
[ req = up --> movingUp ]
[ ! (req = up || endOfTravel || req = stop) --> movingDown ]
[ all c : WinController | no pinchProtection => no c.objectDetected ]
abstract WinCtrWithContChime : WinController
chime : Port ?
[ movingUpX <=> chime ]
abstract WinCtrWithChime : WinController
chime : Port ?
[ no movingUpX => no chime ]
[ chime --> no chime ]
[ no chime && movingUpX --> movingUpX => chime ]
abstract ChimingStrategy
active : State ?
audible : State ?
NoChiming : ChimingStrategy
[ not audible ]
Continuous : ChimingStrategy
[ active => audible ]
Intermittent : ChimingStrategy
[ audible --> not audible ]
[ not audible --> active => audible ]
abstract WinControllerStrategies : WinController
chime : Port ?
strategy -> ChimingStrategy
[ strategy.active <=> movingUpX ]
[ strategy.active.audible <=> chime ]
wc : WinController
assert [ wc.req = down && wc.WinStates.stopped.closed --> no wc.WinStates.stopped.closed ]
assert [ never wc.WinStates.stopped.closed && wc.motor.cmd = motorUp ]
assert [ wc.objectDetected --> no wc.WinStates.movingUp ]
assert [ wc.objectDetected && wc.WinStates.movingUp.movingUpX --> no wc.WinStates.movingUp ]