Skip to content
This repository was archived by the owner on May 22, 2023. It is now read-only.

Commit eb5f932

Browse files
committed
Fix proofs for GNAT CE 2020
ref #178
1 parent db4d2ac commit eb5f932

File tree

12 files changed

+32
-19
lines changed

12 files changed

+32
-19
lines changed

src/memory/client/linux/gneiss-memory-client.adb

+4-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ is
5858
end Initialize;
5959

6060
procedure Modify (Session : in out Client_Session;
61-
Ctx : in out Context)
61+
Ctx : in out Context) with
62+
SPARK_Mode => Off
63+
-- Object_Size cannot be annotated to Buffer
64+
-- This causes a check in the Address overlay
6265
is
6366
Length : constant Integer := Gneiss_Internal.Syscall.Stat_Size (Session.Fd);
6467
Last : constant Buffer_Index := Get_Last (Length);

src/memory/server/linux/gneiss-memory-server.adb

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ is
1010
function Get_Last is new Gneiss_Internal.Util.Get_Last (Buffer_Index);
1111

1212
procedure Modify (Session : in out Server_Session;
13-
Ctx : in out Context)
13+
Ctx : in out Context) with
14+
SPARK_Mode => Off
15+
-- Object_Size cannot be annotated to Buffer
16+
-- This causes a check in the Address overlay
1417
is
1518
Length : constant Integer := Gneiss_Internal.Syscall.Stat_Size (Session.Fd);
1619
Last : constant Buffer_Index := Get_Last (Length);

src/rom/client/linux/gneiss-rom-client.adb

+4-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ is
4040
end Initialize;
4141

4242
procedure Update (Session : in out Client_Session;
43-
Ctx : in out Context)
43+
Ctx : in out Context) with
44+
SPARK_Mode => Off
45+
-- Object_Size cannot be annotated to Buffer
46+
-- This causes a check in the Address overlay
4447
is
4548
Length : constant Integer := Gneiss_Internal.Syscall.Stat_Size (Session.Fd);
4649
Last : constant Buffer_Index := Get_Last (Length);

test/hello_world/component.ads

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ with Gneiss_Internal;
66
package Component with
77
SPARK_Mode,
88
Abstract_State => (Component_State, Platform_State),
9-
Initializes => (Platform_State)
9+
Initializes => (Platform_State, Main.Platform)
1010
is
1111

1212
procedure Construct (Capability : Gneiss.Capability) with

test/linux.sh

+12-8
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,18 @@ make -C ada-runtime
1010

1111
set -e
1212

13-
./cement prove test/message_client.gpr . lib test -u component
14-
./cement prove test/message_server.gpr . lib test -u component
15-
./cement prove test/hello_world.gpr . lib test -u component
16-
./cement prove test/log_proxy.gpr . lib test -u component
17-
./cement prove test/rom.gpr . lib test -u component
18-
./cement prove test/memory_client.gpr . lib test -u component
19-
./cement prove test/memory_server.gpr . lib test -u component
20-
./cement prove test/timer.gpr . lib test -u component
13+
if [ "$(gcc -dumpversion)" = "9.3.1" ]
14+
then
15+
# Only prove with GNAT CE 2020/GNAT Pro 21
16+
./cement prove test/message_client.gpr . lib test -u component
17+
./cement prove test/message_server.gpr . lib test -u component
18+
./cement prove test/hello_world.gpr . lib test -u component
19+
./cement prove test/log_proxy.gpr . lib test -u component
20+
./cement prove test/rom.gpr . lib test -u component
21+
./cement prove test/memory_client.gpr . lib test -u component
22+
./cement prove test/memory_server.gpr . lib test -u component
23+
./cement prove test/timer.gpr . lib test -u component
24+
fi
2125

2226
./cement build test/message_client/message_client.xml . lib test
2327
./cement build test/hello_world/hello_world.xml . lib test

test/log_proxy/component.ads

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ with Gneiss_Internal;
66
package Component with
77
SPARK_Mode,
88
Abstract_State => (Component_State, Platform_State),
9-
Initializes => (Platform_State)
9+
Initializes => (Platform_State, Main.Platform)
1010
is
1111

1212
procedure Construct (Cap : Gneiss.Capability) with

test/memory_client/component.ads

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ with Gneiss.Component;
66
package Component with
77
SPARK_Mode,
88
Abstract_State => Platform_State,
9-
Initializes => (Platform_State)
9+
Initializes => (Platform_State, Main.Platform)
1010
is
1111

1212
procedure Construct (Cap : Gneiss.Capability) with

test/memory_server/component.ads

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ with Gneiss_Internal;
66
package Component with
77
SPARK_Mode,
88
Abstract_State => (Component_State, Platform_State),
9-
Initializes => (Platform_State)
9+
Initializes => (Platform_State, Main.Platform)
1010
is
1111

1212
procedure Construct (Cap : Gneiss.Capability) with

test/message_client/component.ads

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ with Gneiss_Internal;
66
package Component with
77
SPARK_Mode,
88
Abstract_State => (Component_State, Platform_State),
9-
Initializes => (Platform_State)
9+
Initializes => (Platform_State, Main.Platform)
1010
is
1111

1212
procedure Construct (Cap : Gneiss.Capability) with

test/message_server/component.ads

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ with Gneiss_Internal;
66
package Component with
77
SPARK_Mode,
88
Abstract_State => (Component_State, Platform_State),
9-
Initializes => (Platform_State)
9+
Initializes => (Platform_State, Main.Platform)
1010
is
1111

1212
procedure Construct (Cap : Gneiss.Capability) with

test/rom/component.ads

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ with Gneiss_Internal;
66
package Component with
77
SPARK_Mode,
88
Abstract_State => (Component_State, Platform_State),
9-
Initializes => (Platform_State)
9+
Initializes => (Platform_State, Main.Platform)
1010
is
1111

1212
procedure Construct (Capability : Gneiss.Capability) with

test/timer/component.ads

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ with Gneiss_Internal;
66
package Component with
77
SPARK_Mode,
88
Abstract_State => (Component_State, Platform_State),
9-
Initializes => (Platform_State)
9+
Initializes => (Platform_State, Main.Platform)
1010
is
1111

1212
procedure Construct (Cap : Gneiss.Capability) with

0 commit comments

Comments
 (0)