EastWest : TrafficLight
[ leftGreenArrow ]
WestEast : TrafficLight
[ no leftGreenArrow ]
[ Canada && no Quebec ]
[ vertical ]
[ no RightGreenArrow ]
[ no countdownTimer ]
[ leftArrow && no greenFlashing ]
abstract TrafficLight
red : Lamp
yellow : Lamp
green : Lamp
leftGreenArrow : Lamp ?
rightGreenArrow : Lamp ?
arrowsOff ?
[ arrowsOff <=> no leftGreenArrow.on && no leftGreenArrow.flashing ]
[ arrowsOff <=> no rightGreenArrow.on && no rightGreenArrow.flashing ]
emergencyVehicle ?
xor TrafficSignals
[ emergencyVehicle => if allWayYellow then some allYellow else some warning ]
prepareToStop
[ red.off ]
[ yellow.on ]
[ green.off ]
stop
[ red.on ]
[ yellow.off ]
[ green.off ]
warning
[ red.off ]
[ green.off ]
prepareToGo
[ red.on ]
[ yellow.on ]
[ green.off ]
allYellow
[ red.off ]
[ green.off ]
[ EastWest.TrafficSignals.proceed <=> WestEast.TrafficSignals.proceed ]
[ EastWest.TrafficSignals.prepareToStop <=> WestEast.TrafficSignals.prepareToStop ]
[ EastWest.TrafficSignals.stop <=> WestEast.TrafficSignals.stop ]
[ EastWest.TrafficSignals.allStop <=> WestEast.TrafficSignals.allStop ]
[ EastWest.TrafficSignals.allYellow <=> WestEast.TrafficSignals.allYellow ]
[ EastWest.TrafficSignals.advancedLeft => WestEast.TrafficSignals.stop ]
[ EastWest.TrafficSignals.extendedLeft => WestEast.TrafficSignals.stop ]
TrafficLightSystem
Lamps
Red
Yellow
Green
LeftGreenArrow ?
RightGreenArrow ?
countdownTimer ?
[ no USA ]
redAndYellowToGreen ?
allWayFlashingRedAsStop ?
allWayYellow ?
[ no USA ]
or advancedOrExtendedLeft ?
greenFlashing
leftArrow
xor mountLocation
inFront
behind
xor orientation
vertical
horizontal
[ Europe => LeftGreenArrow && RightGreenArrow ]
[ Europe => redAndYellowToGreen ]
[ USA => allWayFlashingRedAsStop ]
[ Canada => advancedOrExtendedLeft ]
[ Canada => no redAndYellowToGreen ]
[ Canada => no allWayFlashingRedAsStop ]
[ Canada => allWayYellow ]
[ Europe => inFront ]
[ NorthAmerica => behind ]
[ Quebec => horizontal ]
xor Jurisdiction
Europe
UK ?
mux NorthAmerica
USA
Canada
Quebec ?
Australia
NewZealand
abstract xor Lamp
on
off
flashing