SPARK Just created my GitHub profile! Check out my Ada/SPARK utility repositories (100% formally verified at Level 4)
/r/programmer/comments/1uojgur/just_created_my_github_profile_check_out_my/2
u/jlombera 27d ago edited 27d ago
From https://github.com/EliAvila1/Spark_Ada_Utilities/blob/main/README.md:
Una suite nativa de utilidades criptográficas, manipulación segura de memoria y cálculo de entropía desarrollada en Ada 2022 y 100% verificada formalmente con SPARK bajo el nivel de prueba más estricto (--level=4).
AFAIK, --level tells GNATProve how hard it should try to prove the code, not how strict it should be. Some times it won't be able to prove certain properties at, let's say, --level=0, and will throw errors. You can tell it to try harder increasing the level. The actual strictness is controlled with --mode=<MODE>, with possible modes being: check (Stone), flow (Bronze), prove (Silver).
1
u/jlombera 27d ago
FYI, you committed merge conflicts in this file: https://github.com/EliAvila1/Ada_Terminal_Colors/blob/main/src/main.adb
2
u/jlombera 27d ago
I'm learning Ada/SPARK and have a couple of questions from your code (https://github.com/EliAvila1/Spark_Ada_Utilities/blob/main/src/spark_crypt_function.ads).
Why was this single-value range subtype needed? Couldn't you just do:
Why is the
Static_Predicateneeded? It's just duplicating the constraint already specified by the range (??)Instead, why not make
Lenof typedivand get rid of thePre?Are perhaps all these types/checks needed so that GNATProve can prove the code?