Skip to content

Commit

Permalink
More stable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanBlanchard committed Nov 2, 2024
1 parent fe884fc commit 3986dae
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 33 deletions.
4 changes: 0 additions & 4 deletions code/acsl-logic-definitions/inductive/even-0.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* run.config
STDOPT:+"-wp-prover alt-ergo,z3"
*/

/*@
inductive even_natural{L}(integer n) {
case even_nul{L}:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
Unreachable: 2
Alt-Ergo: 2
Unsuccess: 1
[wp:pedantic-assigns] even-0.c:15: Warning:
[wp:pedantic-assigns] even-0.c:11: Warning:
No 'assigns' specification for function 'foo'.
Callers assumptions might be imprecise.
[wp:pedantic-assigns] even-0.c:20: Warning:
[wp:pedantic-assigns] even-0.c:16: Warning:
No 'assigns' specification for function 'bar'.
Callers assumptions might be imprecise.
4 changes: 4 additions & 0 deletions code/function-contract/modularity/ex-4-change-answer.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* run.config
STDOPT:+"-wp-timeout 5"
*/

enum note { N500, N200, N100, N50, N20, N10, N5, N2, N1 };
int const values[] = { 500, 200, 100, 50, 20, 10, 5, 2, 1 };

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# frama-c -wp -wp-rte [...]
# frama-c -wp -wp-rte -wp-timeout 5 [...]
[kernel] Parsing ex-4-change-answer.c (with preprocessing)
[wp] Running WP plugin...
[rte:annot] annotating function make_change
Expand Down Expand Up @@ -99,12 +99,12 @@
Unreachable: 1
Qed: 61
Alt-Ergo: 27
[wp] ex-4-change-answer.c:11: Warning:
[wp] ex-4-change-answer.c:15: Warning:
Memory model hypotheses for function 'remove_max_notes':
/*@ behavior wp_typed:
requires \separated(rest, (int const *)values + (..)); */
int remove_max_notes(enum note n, int *rest);
[wp] ex-4-change-answer.c:53: Warning:
[wp] ex-4-change-answer.c:57: Warning:
Memory model hypotheses for function 'make_change':
/*@
behavior wp_typed:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* run.config
DEPS: @PTEST_DEPS@ @PTEST_DIR@/@PTEST_NAME@.@[email protected]@PTEST_CONFIG@/interactive/*.v
STDOPT:+"-wp-prover alt-ergo,coq -warn-unsigned-overflow -warn-unsigned-downcast -wp-session @PTEST_DIR@/@PTEST_NAME@.@[email protected]@PTEST_CONFIG@"
STDOPT:+"-wp-timeout 5 -wp-prover alt-ergo,coq -warn-unsigned-overflow -warn-unsigned-downcast -wp-session @PTEST_DIR@/@PTEST_NAME@.@[email protected]@PTEST_CONFIG@"
*/

#include <stddef.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# frama-c -wp -wp-rte -warn-unsigned-overflow -warn-unsigned-downcast [...]
# frama-c -wp -wp-rte -wp-timeout 5 -warn-unsigned-overflow -warn-unsigned-downcast [...]
[kernel] Parsing insert_sort-proved.c (with preprocessing)
[wp] Running WP plugin...
[rte:annot] annotating function insert
Expand Down
4 changes: 4 additions & 0 deletions code/statements/function-calls/ex-2-terminates-answer.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* run.config
STDOPT:+"-wp-timeout 5"
*/

#include <limits.h>
#include <stddef.h>

Expand Down
4 changes: 4 additions & 0 deletions code/statements/function-calls/ex-2-terminates.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* run.config
STDOPT:+"-wp-timeout 5"
*/

#include <limits.h>
#include <stddef.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# frama-c -wp -wp-rte [...]
# frama-c -wp -wp-rte -wp-timeout 5 [...]
[kernel] Parsing ex-2-terminates-answer.c (with preprocessing)
[wp] Running WP plugin...
[rte:annot] annotating function abs
[rte:annot] annotating function distance
[rte:annot] annotating function distances
[rte:annot] annotating function prepare
[kernel:annot:missing-spec] ex-2-terminates-answer.c:52: Warning:
[kernel:annot:missing-spec] ex-2-terminates-answer.c:56: Warning:
Neither code nor explicit exits for function initialize,
generating default clauses. See -generated-spec-* options for more info
[kernel:annot:missing-spec] ex-2-terminates-answer.c:59: Warning:
[kernel:annot:missing-spec] ex-2-terminates-answer.c:63: Warning:
Neither code nor explicit exits for function connect,
generating default clauses. See -generated-spec-* options for more info
[rte:annot] annotating function terminates_f1
Expand All @@ -17,9 +17,9 @@
[wp] [Valid] Goal abs_terminates (Cfg) (Trivial)
[wp] [Valid] Goal terminates_f1_exits (Cfg) (Unreachable)
[wp] [Valid] Goal terminates_f2_exits (Cfg) (Unreachable)
[wp] ex-2-terminates-answer.c:73: Warning:
[wp] ex-2-terminates-answer.c:77: Warning:
Missing assigns clause (assigns 'everything' instead)
[wp] ex-2-terminates-answer.c:80: Warning:
[wp] ex-2-terminates-answer.c:84: Warning:
Missing assigns clause (assigns 'everything' instead)
[wp] 46 goals scheduled
[wp] [Valid] typed_abs_ensures (Qed)
Expand Down Expand Up @@ -73,9 +73,9 @@
Unreachable: 3
Qed: 35
Alt-Ergo: 11
[wp:pedantic-assigns] ex-2-terminates-answer.c:72: Warning:
[wp:pedantic-assigns] ex-2-terminates-answer.c:76: Warning:
No 'assigns' specification for function 'terminates_f1'.
Callers assumptions might be imprecise.
[wp:pedantic-assigns] ex-2-terminates-answer.c:79: Warning:
[wp:pedantic-assigns] ex-2-terminates-answer.c:83: Warning:
No 'assigns' specification for function 'terminates_f2'.
Callers assumptions might be imprecise.
14 changes: 7 additions & 7 deletions code/statements/function-calls/oracle/ex-2-terminates.res.oracle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# frama-c -wp -wp-rte [...]
# frama-c -wp -wp-rte -wp-timeout 5 [...]
[kernel] Parsing ex-2-terminates.c (with preprocessing)
[wp] Running WP plugin...
[rte:annot] annotating function abs
[rte:annot] annotating function distance
[rte:annot] annotating function distances
[rte:annot] annotating function prepare
[kernel:annot:missing-spec] ex-2-terminates.c:51: Warning:
[kernel:annot:missing-spec] ex-2-terminates.c:55: Warning:
Neither code nor explicit exits for function initialize,
generating default clauses. See -generated-spec-* options for more info
[kernel:annot:missing-spec] ex-2-terminates.c:58: Warning:
[kernel:annot:missing-spec] ex-2-terminates.c:62: Warning:
Neither code nor explicit exits for function connect,
generating default clauses. See -generated-spec-* options for more info
[rte:annot] annotating function terminates_f1
Expand All @@ -17,9 +17,9 @@
[wp] [Valid] Goal abs_terminates (Cfg) (Trivial)
[wp] [Valid] Goal terminates_f1_exits (Cfg) (Unreachable)
[wp] [Valid] Goal terminates_f2_exits (Cfg) (Unreachable)
[wp] ex-2-terminates.c:72: Warning:
[wp] ex-2-terminates.c:76: Warning:
Missing assigns clause (assigns 'everything' instead)
[wp] ex-2-terminates.c:79: Warning:
[wp] ex-2-terminates.c:83: Warning:
Missing assigns clause (assigns 'everything' instead)
[wp] 45 goals scheduled
[wp] [Valid] typed_abs_ensures (Qed)
Expand Down Expand Up @@ -73,9 +73,9 @@
Qed: 33
Alt-Ergo: 10
Unsuccess: 2
[wp:pedantic-assigns] ex-2-terminates.c:71: Warning:
[wp:pedantic-assigns] ex-2-terminates.c:75: Warning:
No 'assigns' specification for function 'terminates_f1'.
Callers assumptions might be imprecise.
[wp:pedantic-assigns] ex-2-terminates.c:78: Warning:
[wp:pedantic-assigns] ex-2-terminates.c:82: Warning:
No 'assigns' specification for function 'terminates_f2'.
Callers assumptions might be imprecise.
6 changes: 3 additions & 3 deletions english/acsl-logic-definitions/inductive.tex
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
an even natural number'':


\CodeBlockInput[5][13]{c}{even-0.c}
\CodeBlockInput[1][9]{c}{even-0.c}


Which describes the two cases:
Expand All @@ -44,7 +44,7 @@
This can be used to prove the following assertions:


\CodeBlockInput[15][18]{c}{even-0.c}
\CodeBlockInput[11][14]{c}{even-0.c}


Note that, since the solver has to recursively unfold the inductive definition,
Expand All @@ -58,7 +58,7 @@
to the fact that the following assertion cannot be proved:


\CodeBlockInput[20]{c}{even-0.c}
\CodeBlockInput[16]{c}{even-0.c}



Expand Down
2 changes: 1 addition & 1 deletion english/statements/function-calls.tex
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
In the following program:


\CodeBlockInput{c}{ex-2-terminates.c}
\CodeBlockInput{c}[5]{ex-2-terminates.c}


Explain why termination clauses are verified or not. Modify the specification so
Expand Down
6 changes: 3 additions & 3 deletions french/acsl-logic-definitions/inductive.tex
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
naturel pair ».


\CodeBlockInput[5][13]{c}{even-0.c}
\CodeBlockInput[1][9]{c}{even-0.c}


Ce prédicat définit bien les deux cas :
Expand All @@ -51,7 +51,7 @@
Cette définition peut être utilisée pour prouver les assertions suivantes :


\CodeBlockInput[15][18]{c}{even-0.c}
\CodeBlockInput[11][14]{c}{even-0.c}


Notons que, puisque le solveur doit récursivement dérouler la définition
Expand All @@ -66,7 +66,7 @@
peut pas être prouvée :


\CodeBlockInput[20]{c}{even-0.c}
\CodeBlockInput[16]{c}{even-0.c}


De plus, nous préférons généralement indiquer la condition selon laquelle une
Expand Down
2 changes: 1 addition & 1 deletion french/statements/function-calls.tex
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@
Dans le programme suivant :


\CodeBlockInput{c}{ex-2-terminates.c}
\CodeBlockInput{c}[5]{ex-2-terminates.c}


Expliquer pourquoi les clauses de terminaison sont vérifiées ou pas. Modifier
Expand Down

0 comments on commit 3986dae

Please sign in to comment.