Files
spark2014/docs/case_study/ex6/indicator.ads

24 lines
484 B
Ada

package Indicator
--# own out Outputs : Settings;
is
--# type Settings is abstract;
function IsOn return Boolean;
procedure TurnOn
with Post => (IsOn);
--# global out Outputs;
--# derives Outputs from ;
--# post IsOn (Outputs);
--
-- Turns the indicator on.
procedure TurnOff
with Post => (not IsOn);
--# global out Outputs;
--# derives Outputs from ;
--# post not IsOn (Outputs);
--
-- Turns the indicator off.
end Indicator;