module Checklist exports all definitions values -- Before Start Checklist -- Items in Aircraft -- Flight Deck... (can't check) fuel: ItemObject = mk_ItemObject(, mk_Switch(, false)); pax_sign: ItemObject = mk_ItemObject(, mk_Switch(, true)); windows: ItemObject = mk_ItemObject(, mk_Switch(, false)); -- Preflight steps acol: ItemObject = mk_ItemObject(, mk_Switch(, false)); aircraft_panels: Items = {"Fuel Pump" |-> fuel, "Passenger Signs" |-> pax_sign, "Windows" |-> windows, "Anti Collision Lights" |-> acol}; -- Checklist -- Flight Deck... (can't check) fuel_chkl: ChecklistItem = mk_ChecklistItem("Fuel Pump", , , false); pax_sign_chkl: ChecklistItem = mk_ChecklistItem("Passenger Signs", , , false); windows_chkl: ChecklistItem = mk_ChecklistItem("Windows", , , false); -- Preflight steps acol_chkl: ChecklistItem = mk_ChecklistItem("Anti Collision Lights", , , false); before_start_procedure: Procedure = [fuel_chkl, pax_sign_chkl, windows_chkl, acol_chkl]; aircraft = mk_Aircraft(aircraft_panels, before_start_procedure); types --@doc The dataref name in X-Plane Dataref = seq1 of char; -- Aircraft -- Switches --@doc The state a switch can be in SwitchState = | | ; --@LF why have a type kist as a rename? ItemState = SwitchState; --@TODO | Button | ... --@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 == (s.position = => s.middlePosition); -- Knob Knob :: position : nat --@LF how can a state be an int? perhaps a proper type (i..e. subset of int range or a union?) states : set1 of nat inv k == k.position in set k.states; Lever = nat inv t == t <= 100; Throttle :: thrust: Lever reverser: Lever inv t == (t.reverser > 0 <=> t.thrust = 0); --@doc The type that the action of the button is ItemType = | |