module Checklist exports all definitions values -- Before Start Checklist -- Items in Aircraft -- Flight Deck... (can't check) fuel: Item = mk_Item("Fuel Pump", , mk_Switch(, false)); pax_sign: Item = mk_Item("Passenger Signs", , mk_Switch(, true)); windows: Item = mk_Item("Windows", , mk_Switch(, false)); -- Preflight steps acol: Item = mk_Item("Anti Collision Lights", , mk_Switch(, false)); aircraft: Aircraft = [fuel, pax_sign, windows, acol]; -- Checklist -- Flight Deck... (can't check) fuel_chkl: ChecklistItem = mk_ChecklistItem(fuel.name, , , false); pax_sign_chkl: ChecklistItem = mk_ChecklistItem(pax_sign.name, , , false); windows_chkl: ChecklistItem = mk_ChecklistItem(windows.name, , , false); -- Preflight steps acol_chkl: ChecklistItem = mk_ChecklistItem(acol.name, , , false); before_start_procedure: Procedure = [fuel_chkl, pax_sign_chkl, windows_chkl, acol_chkl]; types String = seq of char; -- Aircraft -- Switches --@doc The state a switch can be in -- 1 means off SwitchState = | | ; ItemState = SwitchState; --@doc A switch, with the possible states it can be in, and the state that it is in Switch :: position : SwitchState middlePosition : bool inv s == if s.middlePosition = false then s.position <> else true; -- Knob Knob :: position : nat1 states : seq of int inv k == k.position <= len k.states; Lever = nat inv t == t <= 100; Throttle :: thrust: Lever reverser: Lever inv t == if t.thrust > 0 then t.reverser = 0 else t.reverser >= 0; --@doc The type that the action of the button is ItemType = | |