-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrakes.ads
46 lines (35 loc) · 996 Bytes
/
brakes.ads
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
-- Author: A. Ireland
--
-- Address: School Mathematical & Computer Sciences
-- Heriot-Watt University
-- Edinburgh, EH14 4AS
--
-- E-mail: [email protected]
--
-- Last modified: 10.9.2022
--
-- Filename: brakes.ads
--
-- Description: Models the car braking subsystem associated
-- with the BSCU.
pragma SPARK_Mode (On);
package Brakes
is
pragma Elaborate_Body;
State: Boolean;
-- returns true if brakes state is true
function Enabled return Boolean
with
Global => (Input => State),
Depends => (Enabled'Result => State);
-- sets brakes state to true
procedure Enable
with
Global => (In_Out => State),
Depends => (state =>null, null => State);
-- sets brakes state to false
procedure Disable
with
Global => (In_Out => State),
Depends => (state => null, null => State);
end Brakes;