LiftPlant
The Lift Plant
The lift plant may communicate the status of some of
its components by means of sensors (the position of cabin and
of the doors at the floors and the working status of the motor),
and its components may be influenced by means of orders
(open\close the door at a given floor,
stop\move up\move down the motor).
Moreover, the users may enter or leave the cabin,
and a sensor is able to communicate if some user is inside the
cabin.
LiftPlant: Parts and Constituent Features
LiftPlant: Property Spreadsheet
LiftPlant: Cells Contents
-
CABINPOSITION:CABINPOSITION
-
- incompat1
- CABINPOSITION(f1) incompatible with CABINPOSITION(f2)
(The cabin position sensor cannot communicate two different data simultaneously;
recall that it is implicitly assumed that f1 is different from f2)
- pre-cond1
- if CABINPOSITION(f) happen then cabinPosition = f
(The cabin position sensor always communicates the correct data)
- post-cond1
-
- vital1
- in one case next CABINPOSITION(cabinPosition) happen
(The cabin position sensor never breaks down, thus it is always able to communicate the
correct data)
-
CABINPOSITION:DOORPOSITION
-
- incompat2
-
(The cabin position and the
door positions sensors are independent)
-
CABINPOSITION:MOTORSTATUS
-
- incompat2
-
(The cabin position and the
motor status sensors are independent)
-
CABINPOSITION:OPENDOOR
-
- incompat2
-
(The cabin position sensor and the devices for
receiving the door orders are independent)
-
CABINPOSITION:CLOSEDOOR
-
- incompat2
-
(The cabin position sensor and the devices for
receiving the door orders are independent)
-
CABINPOSITION:MOTORSTOP
-
- incompat2
-
(The cabin position sensor and the device for
receiving the motor orders are independent)
-
CABINPOSITION:MOTORUP
-
- incompat2
-
(The cabin position sensor and the device for
receiving the motor orders are independent)
-
CABINPOSITION:MOTORDOWN
-
- incompat2
-
(The cabin position sensor and the device for
receiving the motor orders are independent)
-
CABINPOSITION:USERINSIDE
-
- incompat2
-
(The cabin position and
the users inside sensors are independent)
-
CABINPOSITION:cabinPosition
-
- pre-cond2
- if CABINPOSITION(f) happen then cabinPosition = f
- post-cond2
- vital2
- if cabinPosition = f then
in one case next CABINPOSITION(f) happen
-
CABINPOSITION:doorPosition
-
- pre-cond2
- post-cond2
- vital2
(The cabin position sensor is independent
from the door positions)
-
CABINPOSITION:motorStatus
-
- pre-cond2
- post-cond2
- vital2
(The cabin position sensor is independent
from the status of the motor)
-
CABINPOSITION:userInside
-
- pre-cond2
- post-cond2
- vital2
(The cabin position sensor is independent
from the number of users inside the cabin)
-
DOORPOSITION:CABINPOSITION
-
- incompat2
-
(The cabin and the
door positions sensors are independent)
-
DOORPOSITION:DOORPOSITION
-
- incompat1
- DOORPOSITION(f,dps1) incompatible with DOORPOSITION(f,dps2)
(The door position sensor cannot communicate two different data simultaneously;
recall that it is implicitly assumed that dps1 is different from
dps2)
- pre-cond1
- if DOORPOSITION(f,dps) happen then doorPosition(f) = dps
(The door position sensor always communicates the correct data)
- post-cond1
-
- vital1
- in one case next DOORPOSITION(f,doorPosition(f)) happen
(The door position sensor never breaks down, thus they are always able to communicate the
correct data)
-
-
DOORPOSITION:MOTORSTATUS
-
- incompat2
-
(The door positions and the
motor status sensors are independent)
-
DOORPOSITION:OPENDOOR
-
- incompat2
-
(The door position sensors and the devices for
receiving the door orders are independent)
-
DOORPOSITION:CLOSEDOOR
-
- incompat2
-
(The door position sensors and the devices for
receiving the door orders are independent)
-
DOORPOSITION:MOTORSTOP
-
- incompat2
-
(The door position sensors and the device for
receiving the motor orders are independent)
-
DOORPOSITION:MOTORUP
-
- incompat2
-
(The door position sensors and the device for
receiving the motor orders are independent)
-
DOORPOSITION:MOTORDOWN
-
- incompat2
-
(The door position sensors and the device for
receiving the motor orders are independent)
-
DOORPOSITION:USERINSIDE
-
- incompat2
-
(The door position and
the users inside sensors are independent)
-
DOORPOSITION:cabinPosition
-
- pre-cond2
- post-cond2
- vital2
(The door position sensors are independent
from the cabin position)
-
DOORPOSITION:doorPosition
-
- pre-cond2
- if DOORPOSITION(f,dps) happen then doorPosition(f) = dps
- post-cond2
- vital2
- if doorPosition(f) = dps then
in one case next DOORPOSITION(f,dps) happen
-
CABINPOSITION:motorStatus
-
- pre-cond2
- post-cond2
- vital2
(The door position sensors are independent
from the status of the motor)
-
DOORPOSITION:userInside
-
- pre-cond2
- post-cond2
- vital2
(The door position sensors are independent
from the number of users inside the cabin)
-
MOTORSTATUS:CABINPOSITION
-
- incompat2
-
(The cabin position and the
motor status sensors are independent)
-
MOTORSTATUS:DOORPOSITION
-
- incompat2
-
(The
motor status and the door posisitons sensors are independent)
-
MOTORSTATUS:MOTORSTATUS
-
- incompat1
- MOTORSTATUS(ms1) incompatible with MOTORSTATUS(ms2)
(The motor status sensor cannot communicate different data simultaneously;
recall that it is implicitly assumed that ms1 is different from ms2)
- pre-cond1
- if MOTORSTATUS(ms) happen then motorStatus = ms
(The motor status sensor always communicates the correct data)
- post-cond1
- vital1
- in one case next MOTORSTATUS(motorStatus) happen
(The motor status sensor never breaks down, thus it is always able to communicate the
correct data)
-
MOTORSTATUS:OPENDOOR
-
- incompat2
-
(The motor status sensor and the devices for
receiving the door orders are independent)
-
MOTORSTATUS:CLOSEDOOR
-
- incompat2
-
(The motor status sensor and the devices for
receiving the door orders are independent)
-
MOTORSTATUS:MOTORSTOP
-
- incompat2
-
(The motor status sensor and the device for
receiving the motor orders are independent)
-
MOTORSTATUS:MOTORUP
-
- incompat2
-
(The motor status sensor and the device for
receiving the motor orders are independent)
-
MOTORSTATUS:MOTORDOWN
-
- incompat2
-
(The motor status sensor and the device for
receiving the motor orders are independent)
-
MOTORSTATUS:USERINSIDE
-
- incompat2
-
(The motor status and
the users inside sensors are independent)
-
MOTORSTATUS:cabinPosition
-
- pre-cond2
- post-cond2
- vital2
(The motor status sensor
is independent from the cabin position)
-
MOTORSTATUS:doorPosition
-
- pre-cond2
- post-cond2
- vital2
(The motor status sensor
is independent from the door positions)
-
MOTORSTATUS:motorStatus
-
- pre-cond2
-
if MOTORSTATUS(ms) happen then motorStatus = ms
- post-cond2
- vital2
- if motorStatus = ms then
in one case next MOTORSTATUS(ms) happen
-
MOTORSTATUS:userInside
-
- pre-cond2
- post-cond2
- vital2
(The motor status sensor
is independent
from the number of users inside the cabin)
-
OPENDOOR:CABINPOSITION
-
- incompat2
-
(The devices for receiving the door orders are independent
from the cabin position sensor)
-
OPENDOOR:DOORPOSITION
-
- incompat2
-
(The devices for receiving the door orders are independent
from the door position sensors)
-
OPENDOOR:MOTORSTATUS
-
- incompat2
-
(The devices for receiving the door orders are independent
from the motor status sensor)
-
OPENDOOR:OPENDOOR
-
- incompat1
- OPENDOOR(f1) incompatible with OPENDOOR(f2)
OPENDOOR(f1) incompatible with CLOSEDOOR(f2)
(No two door orders may be received simultaneously)
- pre-cond1
- if OPENDOOR(f) happen then
motorStatus = stop and cabinPosition = f and
for all f' • if f ≠ f' then doorPosition(f') = closed
(The open door at floor f order can be executed only when the motor is stopped, the
cabin is at floor f, and the doors at all the other floors are closed)
- post-cond1
-
if OPENDOOR(f) happen then
doorPosition'(f) = open
(The open door order is always correctly executed)
- vital1
- if motorStatus = stop and cabinPosition = f and
for all f' • if f ≠ f' then doorPosition(f') = closed then
in one case next OPENDOOR(f) happen
(Whenever the open door order may be executed, it can be
received)
-
OPENDOOR:CLOSEDOOR
-
- incompat2
-
OPENDOOR(f1) incompatible with CLOSEDOOR(f2)
(No two door orders may be received simultaneously)
-
OPENDOOR:MOTORSTOP
-
- incompat2
-
(The devices for receiving the door orders and those for
receiving the motor orders are independent)
-
OPENDOOR:MOTORUP
-
- incompat2
-
(The devices for receiving the door orders and those for
receiving the motor orders are independent)
-
OPENDOOR:MOTORDOWN
-
- incompat2
-
(The devices for receiving the door orders and those for
receiving the motor orders are independent)
-
OPENDOOR:USERINSIDE
-
- incompat2
-
(The device for receiving the door order and
the users inside sensor are independent)
-
OPENDOOR:cabinPosition
-
- pre-cond2
- if OPENDOOR(f) happen then
cabinPosition = f
(The open door at floor f order can be executed only when the
cabin is at floor f)
- post-cond2
- vital2
- if motorStatus = stop and cabinPosition = f and
for all f' • if f ≠ f' then doorPosition(f') = closed then
in one case next OPENDOOR(f) happen
(Whenever the open door order may be executed, it can be
received)
-
OPENDOOR:doorPosition
-
- pre-cond2
-
if OPENDOOR(f) then
for all f' • if f ≠ f' then doorPosition(f') = closed
(The door at a floor may be opened only when those
at the other floors are closed, thus also if it is already open)
- post-cond2
- if OPENDOOR(f) then doorPosition'(f) = open
(The open door order is always correctly executed)
- vital2
-
OPENDOOR:motorStatus
-
- pre-cond2
-
if OPENDOOR(f) happen then motorStatus = stop
- post-cond2
- vital2
-
OPENDOOR:userInside
-
- pre-cond2
- post-cond2
- vital2
-
CLOSEDOOR:CABINPOSITION
-
- incompat2
-
(The devices for receiving the door orders are independent
from the cabin position sensor)
-
CLOSEDOOR:DOORPOSITION
-
- incompat2
-
(The devices for receiving the door orders are independent
from the door position sensors)
-
CLOSEDOOR:MOTORSTATUS
-
- incompat2
-
(The devices for receiving the door orders are independent
from the motor status sensor)
-
CLOSEDOOR:OPENDOOR
-
- incompat2
- CLOSEDOOR(f1) incompatible with OPENDOOR(f2)
(No two door orders may be received simultaneously)
-
CLOSEDOOR:CLOSEDOOR
-
- incompat1
- CLOSEDOOR(f1) incompatible with CLOSEDOOR(f2)
CLOSEDOOR(f1) incompatible with OPENDOOR(f2)
(No two door orders may be received simultaneously)
- pre-cond1
- if CLOSEDOOR(f) happen then
motorStatus = stop and cabinPosition = f
(The close door at floor f order can be executed only
when the motor is stopped and the
cabin is at floor f)
- post-cond1
-
if CLOSEDOOR(f) happen then
doorPosition'(f) = closed
(The close door order is always correctly executed)
- vital1
- if motorStatus = stop and cabinPosition = f then
in one case next CLOSEDOOR(f) happen
(Whenever the close door order may be executed, it can be
received)
-
CLOSEDOOR:MOTORSTOP
-
- incompat2
-
(The devices for receiving the door orders and those for
receiving the motor orders are independent)
-
CLOSEDOOR:MOTORUP
-
- incompat2
-
(The devices for receiving the door orders and those for
receiving the motor orders are independent)
-
CLOSEDOOR:MOTORDOWN
-
- incompat2
-
(The devices for receiving the door orders and those for
receiving the motor orders are independent)
-
CLSOEDOOR:USERINSIDE
-
- incompat2
-
(The device for receiviing the door order and the
the users inside sensor are independent)
-
CLOSEDOOR:cabinPosition
-
- pre-cond2
- if CLOSEDOOR(f) happen then
cabinPosition = f
(The close door at floor f order can be executed only
when the cabin is at floor f)
- post-cond2
- vital2
- if motorStatus = stop and cabinPosition = f then
in one case next CLOSEDOOR(f) happen
(Whenever the close door order may be executed, it can be
received)
-
CLOSEDOOR:doorPosition
-
- pre-cond2
- post-cond2
- if CLOSEDOOR(f) happen then doorPosition'(f) = closed
(The close door order is always correctly executed)
- vital2
-
CLOSEDOOR:motorStatus
-
- pre-cond2
-
if CLOSEDOOR(f) happen then motorStatus = stop
(The close door order can be executed only when the
motor is stopped)
- post-cond2
- vital2
-
CLOSEDOOR:userInside
-
- pre-cond2
- post-cond2
- vital2
-
MOTORSTOP:CABINPOSITION
-
- incompat2
-
(The device for receiving the motor orders is independent
from the cabin position sensor)
-
MOTORSTOP:DOORPOSITION
-
- incompat2
-
(The devices for receiving the motor orders are independent
from the door position sensors)
-
MOTORSTOP:MOTORSTATUS
-
- incompat2
-
(The device for receiving the motor orders is independent
from the motor status sensor)
-
MOTORSTOP:OPENDOOR
-
- incompat2
-
(Motor and door orders may be received simultaneously)
-
MOTORSTOP:CLOSEDOOR
-
- incompat2
-
(Motor and door orders may be received simultaneously)
-
MOTORSTOP:MOTORSTOP
-
- incompat1
- MOTORSTOP incompatible with MOTORDOWN
MOTORSTOP incompatible with MOTORUP
(No two motor orders may be received simultaneously)
- pre-cond1
(The motor stop order can be always received)
- post-cond1
-
if MOTORSTOP happen then
motorStatus' = stop and cabinPosition' = cabinPosition
(The motor stop order is always correctly executed
and the cabin is immediately stopped)
- vital1
- in one case next MOTORSTOP happen
(The motor stop order can be always received)
-
MOTORSTOP:MOTORUP
-
- incompat2
-
MOTORSTOP incompatible with MOTORUP
(No two motor orders may be received simultaneously)
-
MOTORSTOP:MOTORDOWN
-
- incompat2
- MOTORSTOP incompatible with MOTORDOWN
(No two motor orders may be received simultaneously)
-
MOTORSTOP:USERINSIDE
-
- incompat2
-
(The device for receiviing the motor order and
the users inside sensor are independent)
-
MOTORSTOP:cabinPosition
-
- pre-cond2
(The motor stop order can be executed whatever is
the position of the cabin)
- post-cond2
- if MOTORSTOP happen then cabinPosition' = cabinPosition
(When the motor stop order is executed, the
cabin is immediately stopped)
- vital2
-
MOTORSTOP:doorPosition
-
- pre-cond2
(The motor stop order can be executed whatever is
the position of the doors)
- post-cond2
- vital2
-
MOTORSTOP:motorStatus
-
- pre-cond2
- post-cond2
- if MOTORSTOP happen then motorStatus' =
stop
(The motor stop order is always correctly executed)
- vital2
-
MOTORSTOP:userInside
-
- pre-cond2
- post-cond2
- vital2
-
MOTORUP:CABINPOSITION
-
- incompat2
-
(The device for receiving the motor orders is independent
from the cabin position sensor)
-
MOTORUP:DOORPOSITION
-
- incompat2
-
(The device for receiving the motor orders are independent
from the door position sensors)
-
MOTORUP:MOTORSTATUS
-
- incompat2
-
(The device for receiving the motor orders is independent
from the motor status sensor)
-
MOTORUP:OPENDOOR
-
- incompat2
-
(Motor and door orders may be received simultaneously)
-
MOTORUP:CLOSEDOOR
-
- incompat2
-
(Motor and door orders may be received simultaneously)
-
MOTORUP:MOTORSTOP
-
- incompat2
- MOTORUP incompatible with MOTORSTOP
(No two motor orders may be received simultaneously)
-
MOTORUP:MOTORUP
-
- incompat1
- MOTORUP incompatible with MOTORSTOP
MOTORUP incompatible with MOTORDOWN
(No two motor orders may be received simultaneously)
- pre-cond1
-
if MOTORUP happen then motorStatus = stop and cabinPosition ≠ top
(The motor up order can be executed only when the
motor is stopped and the cabin is not at the top floor)
- post-cond1
-
if MOTORUP happen then motorStatus' = up
(The motor stop order is always correctly executed)
- vital1
- if motorStatus = stop and cabinPosition ≠ top then
in one case next MOTORUP happen
(If the motor is stopped and the cabin is not at the
top floor, the motor up order can be received)
-
MOTORUP:MOTORDOWN
-
- incompat2
- MOTORUP incompatible with MOTORDOWN
(No two motor orders may be received simultaneously)
-
MOTORUP:USERINSIDE
-
- incompat2
-
(The device for receiviing the motor order and
the users inside sensor are independent)
-
MOTORUP:cabinPosition
-
- pre-cond2
-
if MOTORUP happen then cabinPosition ≠ top
(The motor up order can be executed only when the
cabin is not at the top floor)
- post-cond2
- vital2
-
MOTORUP:doorPosition
-
- pre-cond2
(The motor up order can be executed whatever are the
positions of the doors)
- post-cond2
- vital2
-
MOTORUP:motorStatus
-
- pre-cond2
- if MOTORUP happen then motorStatus =
stop
- post-cond2
- if MOTORUP happen then motorStatus' = up
(The motor up order is always correctly executed)
- vital2
-
MOTORUP:userInside
-
- pre-cond2
- post-cond2
- vital2
-
MOTORDOWN:CABINPOSITION
-
- incompat2
-
(The device for receiving the motor orders is independent
from the cabin position sensor)
-
MOTORDOWN:DOORPOSITION
-
- incompat2
-
(The device for receiving the motor orders is independent
from the door position sensors)
-
MOTORDOWN:MOTORSTATUS
-
- incompat2
-
(The device for receiving the motor orders is independent
from the motor status sensor)
-
MOTORDOWN:OPENDOOR
-
- incompat2
-
(Motor and door orders may be received simultaneously)
-
MOTORDOWN:CLOSEDOOR
-
- incompat2
-
(Motor and door orders may be received simultaneously)
-
MOTORDOWN:MOTORSTOP
-
- incompat1
- MOTORDOWN incompatible with MOTORSTOP
(No two motor orders may be received simultaneously)
-
MOTORDOWN:MOTORUP
-
- incompat2
- MOTORDOWN incompatible with MOTORUP
(No two motor orders may be received simultaneously)
-
MOTORDOWN:MOTORDOWN
-
- incompat1
- MOTORDOWN incompatible with MOTORSTOP
MOTORDOWN incompatible with MOTORUP
(No two motor orders may be received simultaneously)
- pre-cond1
-
if MOTORDOWN happen then motorStatus =
stop and cabinPosition ≠
ground
(The motor down order can be executed only when the
motor is stopped and the cabin is not at the ground floor)
- post-cond1
-
if MOTORDOWN happen then motorStatus' = down
(The motor down order is always correctly executed)
- vital1
- if motorStatus = stop and cabinPosition ≠ ground then
in one case next MOTORDOWN happen
(If the motor is stopped and the cabin is not at the
ground floor, the motor down order can be received)
-
MOTORDOWN:USERINSIDE
-
- incompat2
-
(The device for receiviing the motor order and
the users inside sensor are independent)
-
MOTORDOWN:cabinPosition
-
- pre-cond2
-
if MOTORDOWN happen then cabinPosition ≠ ground
(The motor down order can be executed only when the
cabin is not at the ground floor)
- post-cond2
- vital2
-
MOTORDOWN:doorPosition
-
- pre-cond2
(The motor down order can be executed whatever are the
positions of the doors)
- post-cond2
- vital2
-
MOTORDOWN:motorStatus
-
- pre-cond2
- if MOTORDOWN happen then motorStatus = stop
- post-cond2
- if MOTORDOWN happen then motorStatus' = down
(The motor down order is always correctly executed)
- vital2
-
MOTORDOWN:userInside
-
- pre-cond2
- post-cond2
- vital2
-
USERINSIDE:CABINPOSITION
-
- incompat2
-
(The users inside and the cabin position sensors are independent)
-
USERINSIDE:DOORPOSITION
-
- incompat2
-
(The users inside and door positions sensors
are independent)
-
USERINSIDE:MOTORSTATUS
-
- incompat2
-
(The users inside
and the motor status sensors are independent)
-
USERINSIDE:OPENDOOR
-
- incompat2
-
(The users inside sensor
and the device for receiving the door order are independent)
-
USERINSIDE:CLOSEDOOR
-
- incompat2
-
(The users inside sensor
and the device for receiving the door order are independent)
-
USERINSIDE:MOTORSTOP
-
- incompat2
-
(The users inside sensor
and the device for receiving the motor order are independent)
-
USERINSIDE:MOTORUP
-
- incompat2
-
(The users inside sensor
and the device for receiving the motor order are independent)
-
USERINSIDE:MOTORDOWN
-
- incompat2
-
(The users inside sensor
and the device for receiving the motor order are independent)
-
USERINSIDE:USERINSIDE
-
- incompat1
- USERINSIDE(b) incompatible with
USERINSIDE(b')
(The users inside sensor cannot communicate two different data simultaneously;
recall that it is implicitly assumed that i ≠ j)
- pre-cond1
-
if USERINSIDE(b) happen then b = (userInside ≠ 0)
(The users inside sensor always communicates the correct data)
- post-cond1
- vital1
- if b = (userInside ≠ 0) then in one case next USERINSIDE(b) happen
(The users inside sensor never breaks down, thus it is always able to communicate the correct data)
-
USERINSIDE:cabinPosition
-
- pre-cond2
- post-cond2
- vital2
-
USERINSIDE:doorPosition
-
- pre-cond2
- post-cond2
- vital2
-
USERINSIDE:motorStatus
-
- pre-cond2
- post-cond2
- vital2
-
USERINSIDE:userInside
-
- pre-cond1
-
if USERINSIDE(b) happen then b = (userInside ≠ 0)
(The users inside sensor can communicate only correct data)
- post-cond1
- vital1
- if b = (userInside ≠ 0) then in one case next USERINSIDE(b) happen
(The users inside sensor is always ready to communicate
the correct data)
-
cabinPosition:CABINPOSITION
-
- pre-cond2
- if CABINPOSITION(f) happen then cabinPosition = f
(The cabin position sensor always communicate the correct data)
- post-cond2
- vital2
- if cabinPosition = f then in one case next CABINPOSITION(f) happen
(The cabin position sensor is always ready to communicate the correct data)
-
cabinPosition:DOORPOSITION
-
- pre-cond2
- post-cond2
- vital2
-
cabinPosition:MOTORSTATUS
-
- pre-cond2
- post-cond2
- vital2
-
cabinPosition:OPENDOOR
-
- pre-cond2
- if OPENDOOR(f) happen then
cabinPosition = f
(The open door at floor f order can be executed only when
the cabin is at f)
- post-cond2
- vital2
- if motorStatus = stop and cabinPosition = f and
for all f' • if f ≠ f' then doorPosition(f') = closed then
in one case next OPENDOOR(f) happen
(Whenever the open door order may be executed, it can be
received)
-
cabinPosition:CLOSEDOOR
-
- pre-cond2
- if CLOSEDOOR(f) happen then
cabinPosition = f
(The close door at floor f order can be executed only
when the cabin is at floor f)
- post-cond2
- vital2
- if motorStatus = stop and cabinPosition = f then
in one case next CLOSEDOOR(f) happen
(Whenever the close door order may be executed, it can be
received)
-
cabinPosition:MOTORSTOP
-
- pre-cond2
(The motor stop order can be executed whatever is
the position of the cabin)
- post-cond2
- if MOTORSTOP happen then cabinPosition' = cabinPosition
(When the motor stop order is executed, the
cabin is immediately stopped)
- vital2
-
cabinPosition:MOTORUP
-
- pre-cond2
- if MOTORUP happen then cabinPosition ≠ top
- post-cond2
- vital2
-
cabinPosition:MOTORDOWN
-
- pre-cond2
- if MOTORDOWN happen then cabinPosition ≠ ground
- post-cond2
- vital2
-
cabinPosition:USERINSIDE
-
- pre-cond2
- post-cond2
- vital2
-
cabinPosition:cabinPosition
-
- value1
- how-change
-
if cabinPosition ≠ cabinPosition' then
(cabinPosition' = next(cabinPosition) and motorStatus = up) or
(cabinPosition' = previous(cabinPosition) and motorStatus = down)
(The cabin changes position only if the motor is
moving up/down)
- change-vital
-
if motorStatus = up then in any case next cabinPosition = next(cabinPosition)
if motorStatus = down then in any case next cabinPosition = previous(cabinPosition)
(If the motor is
moving up/down, then the cabin changes position)
-
cabinPosition:doorPosition
-
- value2
- if doorPosition(f) = open then cabinPosition = f
(The door at floor f can be open only when
the cabin is at f)
-
cabinPosition:motorStatus
-
- value2
-
cabinPosition:userInside
-
- value2
-
doorPosition:CABINPOSITION
-
- pre-cond2
- post-cond2
- vital2
-
doorPosition:DOORPOSITION
-
- pre-cond2
- if DOORPOSITION(f,dps) happen then doorPosition(f) = dps
(The door position sensors always communicate the correct data)
- post-cond2
- vital2
- if doorPosition(f) = dps then in one case next DOORPOSITION(f,dps) happen
(The door position sensors are always ready to communicate the correct data)
-
doorPosition:MOTORSTATUS
-
- pre-cond2
- post-cond2
- vital2
-
doorPosition:OPENDOOR
-
- pre-cond2
-
if OPENDOOR(f) then
for all f' • if f ≠ f' then doorPosition(f') = closed
(The door at a floor may be opened only when those
at the other floors are closed, thus also if it is already open)
- post-cond2
- if OPENDOOR(f) then doorPosition'(f) = open
(The open door order is always correctly executed)
- vital2
-
doorPosition:CLOSEDOOR
-
- pre-cond2
- (The close door at floor f order can be executed
also when the door is already closed)
- post-cond2
- if CLOSEDOOR(f) happen then doorPosition'(f) = closed
(The close door order is always correctly executed)
- vital2
-
doorPosition:MOTORSTOP
-
- pre-cond2
(The motor stop order can be executed whatever is
the position of the doors)
- post-cond2
- vital2
-
doorPosition:MOTORUP
-
- pre-cond2
(The motor up order can be executed whatever are the
positions of the doors)
- post-cond2
- vital2
-
doorPosition:MOTORDOWN
-
- pre-cond2
(The motor down order can be executed whatever are the
positions of the doors)
- post-cond2
- vital2
-
doorPosition:USERINSIDE
-
- pre-cond2
- post-cond2
- vital2
-
doorPosition:cabinPosition
-
- value2
- if doorPosition(f) = open then cabinPosition = f
(The door at floor f can be open only when
the cabin is at f)
-
doorPosition:doorPosition
-
- value1
- how-change
-
if doorPosition(f) = open and doorPosition'(f) = closed then
CLOSEDOOR(f) happen
(The door at f becomes closed only if the
corresponding order is executed)
if doorPosition(f) = closed and doorPosition'(f) = open then
OPENDOOR(f) happen
(The door at f becomes open only if the
corresponding order is executed)
- change-vital
-
doorPosition:motorStatus
-
- value2
-
doorPosition:userInside
-
- value2
-
motorStatus:CABINPOSITION
-
- pre-cond2
- post-cond2
- vital2
-
motorStatus:DOORPOSITION
-
- pre-cond2
- post-cond2
- vital2
-
motorStatus:MOTORSTATUS
-
- pre-cond2
- if MOTORSTATUS = ms happen then motorStatus = ms
(The motor status sensor always communicates the correct data)
- post-cond2
- vital2
- if motorStatus = ms then MOTORSTATUS = ms happen
(The motor status sensor is always ready to communicate the
correct data)
-
motorStatus:OPENDOOR
-
- pre-cond2
- post-cond2
- vital2
-
motorStatus:CLOSEDOOR
-
- pre-cond2
- post-cond2
- vital2
-
motorStatus:MOTORSTOP
-
- pre-cond2
- post-cond2
- if MOTORSTOP happen then motorStatus' = stop
(The motor stop order is always correctly executed)
- vital2
-
motorStatus:MOTORUP
-
- pre-cond2
- if MOTORUP happen then motorStatus = stop
(The motor up order can be executed only if the
motor is stopped)
- post-cond2
- if MOTORUP happen then motorStatus' = up
(The motor up order is always correctly executed)
- vital2
-
motorStatus:MOTORDOWN
-
- pre-cond2
- if MOTORDOWN happen then motorStatus = stop
(The motor down order can be executed only if the
motor is stopped)
- post-cond2
- if MOTORDOWN happen then motorStatus' = down
(The motor down order is always correctly executed)
- vital2
-
motorStatus:USERINSIDE
-
- pre-cond2
- post-cond2
- vital2
-
motorStatus:cabinPosition
-
- value2
-
motorStatus:doorPosition
-
- value2
-
motorStatus:motorStatus
-
- value1
- how-change
-
if motorStatus = stop and motorStatus' = up then
MOTORUP happen
if motorStatus = stop and motorStatus' = down then
MOTORDOWN happen
if motorStatus ≠ stop and motorStatus' = stop then
MOTORSTOP happen
(The motor changes its status only when it receive
the corresponding order)
- change-vital
-
motorStatus:userInside
-
- value2
-
userInside:CABINPOSITION
-
- pre-cond2
- post-cond2
- vital2
-
userInside:DOORPOSITION
-
- pre-cond2
- post-cond2
- vital2
-
userInside:MOTORSTATUS
-
- pre-cond2
- post-cond2
- vital2
-
userInside:OPENDOOR
-
- pre-cond2
- post-cond2
- vital2
-
userInside:CLOSEDOOR
-
- pre-cond2
- post-cond2
- vital2
-
userInside:MOTORSTOP
-
- pre-cond2
- post-cond2
- vital2
-
userInside:MOTORUP
-
- pre-cond2
- post-cond2
- vital2
-
userInside:MOTORDOWN
-
- pre-cond2
- post-cond2
- vital2
-
userInside:cabinPosition
-
- value2
-
userInside:doorPosition
-
- value2
-
userInside:motorStatus
-
- value2
-
userInside:userInside
-
- value1
- userInside >= 0 and userInside =< 5
The phisical limits of the cabin is five persons.
- how-change
-
if userInside ≠ userInside' = then
exists f s.t. doorPosition(f) = open and cabinPosition = f and
motorStatus = Stop
(User may enter/leaving the cabin only when the
cabin is stopped at a floor with open doors)
- change-vital
-
if userInside ≠ 0 then in any case eventually userInside = 0
(It is assumed that in any case eventually the users will leave the
cabin; this information helps understand the typical user behaviour)
LiftPlant: Properties
SENSORS
The sensors cannot communicate two different data simultaneously;
recall that in the property "X incompatible with Y" it is implicitly assumed that "X" is different from "Y".
CABINPOSITION(f1) incompatible with CABINPOSITION(f2)
DOORPOSITION(f,dps1) incompatible with DOORPOSITION(f,dps2)
MOTORSTATUS(ms1) incompatible with MOTORSTATUS(ms2)
USERINSIDE(b) incompatible with
USERINSIDE(b')
The sensors always communicate the correct data.
if CABINPOSITION(f) happen then cabinPosition = f
if DOORPOSITION(f,dps) happen then doorPosition(f) = dps
if MOTORSTATUS(ms) happen then motorStatus = ms
if USERINSIDE(b) happen then b = (userInside ≠ 0)
The sensors never break down, thus they are always able to communicate the correct data.
in one case next CABINPOSITION(cabinPosition) happen
in one case next DOORPOSITION(f,doorPosition(f)) happen
in one case next MOTORSTATUS(motorStatus) happen
in one case next USERINSIDE(userInside ≠ 0) happen
The sensors and the devices for receiving the orders are independent,
that is they can send their data and receive the orders also simultaneously.
Motor and door orders may be received simultaneously.
DOORS
No two door orders may be received simultaneously.
OPENDOOR(f1) incompatible with OPENDOOR(f2)
OPENDOOR(f1) incompatible with CLOSEDOOR(f2)
CLOSEDOOR(f1) incompatible with CLOSEDOOR(f2)
The open door at floor f order can be executed only when the motor is stopped, the
cabin is at floor f, and the doors at all the other floors are closed
(thus also if the door at f is already open), and it is always correctly executed.
if OPENDOOR(f) happen then
motorStatus = stop and cabinPosition = f and
for all f' • if f ≠ f' then doorPosition(f') = closed and
doorPosition'(f) = open
Whenever the open door order may be executed, it can be received
if motorStatus = stop and cabinPosition = f and
for all f' • if f ≠ f' then doorPosition(f') = closed then
in one case next OPENDOOR(f) happen
The close door at floor f order can be executed only when the motor is stopped and the cabin is at floor f
(thus also if the door at f is already open), and it is always correctly executed.
if CLOSEDOOR(f) happen then
motorStatus = stop and cabinPosition = f and
doorPosition'(f) = closed
Whenever the close door order may be executed, it can be received.
if motorStatus = stop and cabinPosition = f then
in one case next CLOSEDOOR(f) happen
The door at floor f can be open only when the cabin is at f.
if doorPosition(f) = open then cabinPosition = f
The door at f becomes closed /open only if the corresponding order is executed.
if doorPosition(f) = open and doorPosition'(f) = closed then
CLOSEDOOR(f) happen
if doorPosition(f) = closed and doorPosition'(f) = open then
OPENDOOR(f) happen
MOTOR & CABIN
No two motor orders may be received simultaneously.
MOTORSTOP incompatible with MOTORDOWN
MOTORSTOP incompatible with MOTORUP
MOTORDOWN incompatible with MOTORUP
The motor stop order can be always executed, and it is always correctly
executed stopping immediately the cabin.
if MOTORSTOP happen then
motorStatus' = stop and cabinPosition' = cabinPosition
The motor stop order can be always be received.
in one case next MOTORSTOP happen
The motor up order can be executed only when the motor is stopped and the cabin is not at the top floor
(while the doors may be in any position), and it is always correctly executed.
if MOTORUP happen then
motorStatus = stop and cabinPosition ≠ top and
motorStatus' = up
If the motor is stopped and the cabin is not at the top floor, the motor up
order can be received.
if motorStatus = stop and cabinPosition ≠ top then
in one case next MOTORUP happen
The motor down order can be executed only when the motor is stopped and the cabin is not at the ground floor
(while the doors may be in any position), and it is always correctly executed.
if MOTORDOWN happen then
motorStatus = stop and cabinPosition ≠ ground and
motorStatus' = down
If the motor is stopped and the cabin is not at the ground floor, then the motor down order can be received.
if motorStatus = stop and cabinPosition ≠ ground then
in one case next MOTORDOWN happen
The cabin changes position only if the motor is moving up/down.
if cabinPosition ≠ cabinPosition' then
(cabinPosition' = next(cabinPosition) and motorStatus = up) or
(cabinPosition' = previous(cabinPosition) and motorStatus = down)
If the motor is moving up/down, then the cabin changes position.
if motorStatus = up then in any case next cabinPosition = next(cabinPosition)
if motorStatus = down then in any case next cabinPosition = previous(cabinPosition)
The motor changes its status only when it receive the corresponding order.
if motorStatus = stop and motorStatus' = up then
MOTORUP happen
if motorStatus = stop and motorStatus' = down then
MOTORDOWN happen
if motorStatus ≠ stop and motorStatus' = stop then
MOTORSTOP happen
USERS
The phisical limits of the cabin is five persons.
userInside >= 0 and userInside =< 5
User may enter/leaving the cabin only when the cabin is stopped at a floor with open doors.
if userInside ≠ userInside' = then
exists f s.t. doorPosition(f) = open and cabinPosition = f and motorStatus = Stop
It is assumed that in any case eventually the users will leave the cabin;
this information helps understand the typical user behaviour.
if userInside ≠ 0 then in any case eventually userInside = 0
LiftPlant: CASL_LTL Specification
spec ELEMINTER =
free type elemInter ::=
CABINPOSITION(Floor) |
OPENDOOR(Floor) |
CLOSEDOOR(Floor) |
DOORPOSITION(Floor,DoorPosition) |
MOTORUP |
MOTORDOWN |
MOTORSTOP |
MOTORSTATUS(MotorStatus) |
USERINSIDE(Bool)
spec LiftPlant =
FINITESET[ ELEMINTER] and Floor and MotorStatus and DoorPosition then
dsort St label FiniteSet[elemInter]
ops cabinPosition: St -> Floor
doorPosition: St x Floor -> DoorPosition
motorStatus: St -> MotorStatus
usersInside:St -> Int
axioms
%% SENSORS
%% The sensors cannot communicate two different data simultaneously;
%% recall that in the property "X incompatible with Y" it is implicitly assumed that "X" is different from "Y".
not (f1 = f2) and S -- L --> S' =>
not(CABINPOSITION(f1) in L and CABINPOSITION(f2) in L)
not (dps1 = dps2) and S -- L --> S' =>
not(DOORPOSITION(f,dps1) in L and DOORPOSITION(f,dps2) in L)
not (ms1 = ms2) and S -- L --> S' =>
not(MOTORSTATUS(ms1) in L and MOTORSTATUS(ms2) in L)
not (b = b') and S -- L --> S' =>
not(USERINSIDE(b) in L and
USERINSIDE(b') in L)
%% The sensors always communicate the correct data.
S -- L --> S' and CABINPOSITION(f) in L => cabinPosition(S) = f
S -- L --> S' and DOORPOSITION(f,dps) in L => doorPosition(S,f) = dps
S -- L --> S' and MOTORSTATUS(ms) in L => motorStatus(S) = ms
S -- L --> S' and USERINSIDE(b) in L =>
b = (userInside(S) ≠ 0)
%% The sensors never break down, thus they are always able to communicate the correct data.
in_one_case(S, next < L • CABINPOSITION(cabinPosition(S)) in L >)
in_one_case(S, next < L • DOORPOSITION(f,doorPosition(S,f)) in L >)
in_one_case(S, next < L • MOTORSTATUS(motorStatus(S)) in L >)
in_one_case(S, next < L • USERINSIDE(userInside(S) ≠ 0) in L >)
%% The sensors and the devices for receiving the orders are independent,
%% that is they can send their data and receive the orders also simultaneously.
%% Motor and door orders may be received simultaneously.
%% DOORS
%% No two door orders may be received simultaneously.
not (f1 = f2) and S -- L --> S' =>
not(OPENDOOR(f1) in L and OPENDOOR(f2) in L)
S -- L --> S' =>
not(OPENDOOR(f1) in L and CLOSEDOOR(f2) in L)
not (f1 = f2) and S -- L --> S' =>
not(CLOSEDOOR(f1) in L and CLOSEDOOR(f2) in L)
%% The open door at floor f order can be executed only when the motor is stopped, the
%% cabin is at floor f, and the doors at all the other floors are closed
%% (thus also if the door at f is already open), and it is always correctly executed.
S -- L --> S' and OPENDOOR(f) in L =>
motorStatus(S) = stop and cabinPosition(S) = f and
for all f' • if f ≠ f' => doorPosition(S,f') = closed and
doorPosition(S',f) = open
%% Whenever the open door order may be executed, it can be received
S -- L --> S' and motorStatus(S) = stop and cabinPosition(S) = f and
(for all f' • if f ≠ f' => doorPosition(S,f') = closed) =>
in_one_case(S, next < L • OPENDOOR(f) in L >)
%% The close door at floor f order can be executed only when the motor is stopped and the cabin is at floor f
%% (thus also if the door at f is already open), and it is always correctly executed.
S -- L --> S' and CLOSEDOOR(f) in L =>
motorStatus(S) = stop and cabinPosition(S) = f and
doorPosition(S',f) = closed
%% Whenever the close door order may be executed, it can be received.
S -- L --> S' and motorStatus(S) = stop and cabinPosition(S) = f =>
in_one_case(S, next < L • CLOSEDOOR(f) in L >)
%% The door at floor f can be open only when the cabin is at f.
doorPosition(S,f) = open => cabinPosition(S) = f
%% The door at f becomes closed /open only if the corresponding order is executed.
S -- L --> S' and doorPosition(S,f) = open and doorPosition(S',f) = closed =>
CLOSEDOOR(f) in L
S -- L --> S' and doorPosition(S,f) = closed and doorPosition(S',f) = open =>
OPENDOOR(f) in L
%% MOTOR & CABIN
%% No two motor orders may be received simultaneously.
S -- L --> S' =>
not(MOTORSTOP in L and MOTORDOWN in L)
S -- L --> S' =>
not(MOTORSTOP in L and MOTORUP in L)
S -- L --> S' =>
not(MOTORDOWN in L and MOTORUP in L)
%% The motor stop order can be always executed, and it is always correctly
%% executed stopping immediately the cabin.
S -- L --> S' and MOTORSTOP in L =>
motorStatus(S') = stop and cabinPosition(S') = cabinPosition(S)
%% The motor stop order can be always be received.
in_one_case(S, next < L • MOTORSTOP in L >)
%% The motor up order can be executed only when the motor is stopped and the cabin is not at the top floor
%% (while the doors may be in any position), and it is always correctly executed.
S -- L --> S' and MOTORUP in L =>
motorStatus(S) = stop and cabinPosition(S) ≠ top and
motorStatus(S') = up
%% If the motor is stopped and the cabin is not at the top floor, the motor up
%% order can be received.
motorStatus(S) = stop and cabinPosition(S) ≠ top =>
in_one_case(S, next < L • MOTORUP in L >)
%% The motor down order can be executed only when the motor is stopped and the cabin is not at the ground floor
%% (while the doors may be in any position), and it is always correctly executed.
S -- L --> S' and MOTORDOWN in L =>
motorStatus(S) = stop and cabinPosition(S) ≠ ground and
motorStatus(S') = down
%% If the motor is stopped and the cabin is not at the ground floor, if the motor down order can be received.
motorStatus(S) = stop and cabinPosition(S) ≠ ground =>
in_one_case(S, next < L • MOTORDOWN in L >)
%% The cabin changes position only if the motor is moving up/down.
S -- L --> S' and cabinPosition(S) ≠ cabinPosition(S') =>
(cabinPosition(S') = next((cabinPosition(S)) and motorStatus(S) = up) or
(cabinPosition(S') = previous(cabinPosition(S)) and motorStatus(S) = down)
%% If the motor is moving up/down, => the cabin changes position.
motorStatus(S) = up => in_any_case(S, next < S • cabinPosition(S) = next(cabinPosition(S))>)
motorStatus(S) = down => in_any_case(S, next < S • cabinPosition(S) = previous(cabinPosition(S))>)
%% The motor changes its status only when it receive the corresponding order.
S -- L --> S' and motorStatus(S) = stop and motorStatus(S') = up =>
MOTORUP in L
S -- L --> S' and motorStatus(S) = stop and motorStatus(S') = down =>
MOTORDOWN in L
S -- L --> S' and motorStatus(S) ≠ stop and motorStatus(S') = stop =>
MOTORSTOP in L
USERS
%% The phisical limits of the cabin is five persons.
userInside(S) >= 0 and userInside(S) =< 5
%% User may enter/leaving the cabin only when the cabin is stopped at a floor with open doors.
S -- L --> S' and userInside(S) ≠ userInside(S') =>
exists f • doorPosition(S,f) = open and cabinPosition(S) = f and motorStatus(S) = Stop
%% It is assumed that in any case eventually the users will leave the cabin;
%% this information helps understand the typical user behaviour.
userInside(S) ≠ 0 => in_any_case(S, eventually < S • userInside(S) = 0>)