@@ -28,7 +28,9 @@ Not only can the WolfSSL Ada binding be used in Ada applications but
2828also SPARK applications (a subset of the Ada language suitable
2929formal verification). To formally verify the Ada code in this repository
3030open the client.gpr with GNAT Studio and then select
31- SPARK -> Prove All Sources and use Proof Level 2.
31+ SPARK -> Prove All Sources and use Proof Level 2. Or when using the command
32+ line, use ` gnatprove -Pclient.gpr --level=4 -j12 ` (` -j12 ` is there in
33+ order to instruct the prover to use 12 CPUs if available).
3234
3335```
3436Summary of SPARK analysis
@@ -53,19 +55,31 @@ Total 172 17 (10%) . 1
5355
5456## Compiler and Build System installation
5557
56- ### GNAT Community Edition 2021
57- Download and install the GNAT community Edition 2021 compiler and studio:
58- https://www.adacore.com/download
58+ ### Recommended: [ Alire] ( https://alire.ada.dev )
59+ [ Alire] ( https://alire.ada.dev ) is a modern package manager for the Ada
60+ ecosystem. The latest version is available for Windows, OSX, Linux and FreeBSD
61+ systems. It can install a complete Ada toolchain if needed, see ` alr install `
62+ for more information.
5963
60- Linux Install:
64+ In order to use WolfSSL in a project, just add WolfSSL as a dependency by
65+ running ` alr with wolfssl ` within your project's directory.
6166
62- ``` sh
63- chmod +x gnat-2021-20210519-x86_64-linux-bin
64- ./gnat-2021-20210519-x86_64-linux-bin
65- ```
67+ If the project is to be verified with SPARK, just add ` gnatprove ` as a
68+ dependency by running ` alr with gnatprove ` and then running ` alr gnatprove ` ,
69+ which will execute the SPARK solver. If you get warnings, it is recommended to
70+ increase the prove level: ` alr gnatprove --level=4 ` .
71+
72+ ### GNAT FSF Compiler and GPRBuild manual installation
73+ In May 2022 AdaCore announced the end of the GNAT Community releases.
74+ Pre-built binaries for the GNAT FSF compiler and GPRBuild can be
75+ downloaded and manually installed from here:
76+ https://github.com/alire-project/GNAT-FSF-builds/releases
77+ Make sure the executables for the compiler and GPRBuild are on the PATH
78+ and use gprbuild to build the source code.
79+
80+ #### Manual build of the project
6681
6782``` sh
68- export PATH=" /opt/GNAT/2021/bin:$PATH "
6983cd wrapper/Ada
7084gprclean
7185gprbuild default.gpr
@@ -82,15 +96,6 @@ gprbuild -XOS=Windows default.gpr
8296gprbuild -XOS=Windows client.gpr
8397```
8498
85-
86- ### GNAT FSF Compiler and GPRBuild manual installation
87- In May 2022 AdaCore announced the end of the GNAT Community releases.
88- Pre-built binaries for the GNAT FSF compiler and GPRBuild can be
89- downloaded and manually installed from here:
90- https://github.com/alire-project/GNAT-FSF-builds/releases
91- Make sure the executables for the compiler and GPRBuild are on the PATH
92- and use gprbuild to build the source code.
93-
9499## Files
95100The (D)TLS v1.3 client example in the Ada/SPARK programming language
96101using the WolfSSL library can be found in the files:
@@ -103,15 +108,3 @@ using the WolfSSL library can be found in the files:
103108tls_server_main.adb
104109tls_server.ads
105110tls_server.adb
106-
107- A feature of the Ada language that is not part of SPARK is exceptions.
108- Some packages of the Ada standard library and GNAT specific packages
109- provided by the GNAT compiler can therefore not be used directly but
110- need to be put into wrapper packages that does not raise exceptions.
111- The packages that provide access to sockets and command line arguments
112- to applications implemented in the SPARK programming language can be
113- found in the files:
114- spark_sockets.ads
115- spark_sockets.adb
116- spark_terminal.ads
117- spark_terminal.adb
0 commit comments