From 233eb82a5c240110926564ba10e0d6ba5ac47c69 Mon Sep 17 00:00:00 2001 From: Julien Signoles <julien.signoles@cea.fr> Date: Thu, 12 Apr 2012 11:11:41 +0000 Subject: [PATCH] [E-ACSL] tests ok again thanks to -e-acsl-share --- src/plugins/e-acsl/read_header.ml | 4 +- .../oracle/valid_index.err.oracle | 0 .../oracle/valid_index.res.oracle | 3 - .../oracle/valid_range.err.oracle | 0 .../oracle/valid_range.res.oracle | 3 - .../e-acsl/tests/e-acsl-reject/valid_index.i | 7 - .../e-acsl/tests/e-acsl-reject/valid_range.i | 7 - .../e-acsl/tests/e-acsl-runtime/addrOf.i | 4 +- .../e-acsl/tests/e-acsl-runtime/arith.i | 4 +- .../e-acsl/tests/e-acsl-runtime/array.i | 4 +- src/plugins/e-acsl/tests/e-acsl-runtime/at.i | 4 +- .../e-acsl/tests/e-acsl-runtime/cast.i | 4 +- .../e-acsl/tests/e-acsl-runtime/comparison.i | 4 +- .../e-acsl/tests/e-acsl-runtime/false.i | 4 +- .../tests/e-acsl-runtime/function_contract.i | 4 +- .../tests/e-acsl-runtime/integer_constant.i | 4 +- .../e-acsl/tests/e-acsl-runtime/invariant.i | 4 +- .../tests/e-acsl-runtime/labeled_stmt.i | 4 +- .../e-acsl/tests/e-acsl-runtime/lazy.i | 4 +- .../tests/e-acsl-runtime/linear_search.i | 4 +- .../tests/e-acsl-runtime/nested_code_annot.i | 4 +- src/plugins/e-acsl/tests/e-acsl-runtime/not.i | 4 +- .../e-acsl/tests/e-acsl-runtime/null.i | 4 +- .../e-acsl-runtime/oracle/addrOf.1.res.oracle | 103 +++++++++++++++ .../e-acsl-runtime/oracle/addrOf.res.oracle | 103 +++++++++++++++ .../e-acsl-runtime/oracle/arith.1.res.oracle | 78 ++++++++++-- .../e-acsl-runtime/oracle/arith.res.oracle | 103 +++++++++++++++ .../e-acsl-runtime/oracle/array.1.res.oracle | 96 +++++++++++++- .../e-acsl-runtime/oracle/array.res.oracle | 103 +++++++++++++++ .../e-acsl-runtime/oracle/at.1.res.oracle | 93 +++++++++++++- .../tests/e-acsl-runtime/oracle/at.res.oracle | 103 +++++++++++++++ .../e-acsl-runtime/oracle/cast.1.res.oracle | 96 +++++++++++++- .../e-acsl-runtime/oracle/cast.res.oracle | 103 +++++++++++++++ .../oracle/comparison.1.res.oracle | 95 +++++++++++++- .../oracle/comparison.res.oracle | 103 +++++++++++++++ .../e-acsl-runtime/oracle/empty.1.res.oracle | 120 ++++++++++++++++++ .../e-acsl-runtime/oracle/false.1.res.oracle | 103 +++++++++++++++ .../e-acsl-runtime/oracle/false.res.oracle | 103 +++++++++++++++ .../oracle/function_contract.1.res.oracle | 92 +++++++++++++- .../oracle/function_contract.res.oracle | 103 +++++++++++++++ .../tests/e-acsl-runtime/oracle/gen_addrOf.c | 103 +++++++++++++++ .../tests/e-acsl-runtime/oracle/gen_addrOf2.c | 103 +++++++++++++++ .../tests/e-acsl-runtime/oracle/gen_arith.c | 103 +++++++++++++++ .../tests/e-acsl-runtime/oracle/gen_arith2.c | 28 ++++ .../tests/e-acsl-runtime/oracle/gen_array.c | 103 +++++++++++++++ .../tests/e-acsl-runtime/oracle/gen_array2.c | 85 +++++++++++++ .../tests/e-acsl-runtime/oracle/gen_at.c | 103 +++++++++++++++ .../tests/e-acsl-runtime/oracle/gen_at2.c | 69 ++++++++++ .../tests/e-acsl-runtime/oracle/gen_cast.c | 103 +++++++++++++++ .../tests/e-acsl-runtime/oracle/gen_cast2.c | 74 +++++++++++ .../e-acsl-runtime/oracle/gen_comparison.c | 103 +++++++++++++++ .../e-acsl-runtime/oracle/gen_comparison2.c | 77 +++++++++++ .../tests/e-acsl-runtime/oracle/gen_false.c | 103 +++++++++++++++ .../tests/e-acsl-runtime/oracle/gen_false2.c | 103 +++++++++++++++ .../oracle/gen_function_contract.c | 103 +++++++++++++++ .../oracle/gen_function_contract2.c | 74 +++++++++++ .../oracle/gen_integer_constant.c | 103 +++++++++++++++ .../oracle/gen_integer_constant2.c | 81 ++++++++++++ .../e-acsl-runtime/oracle/gen_invariant.c | 103 +++++++++++++++ .../e-acsl-runtime/oracle/gen_invariant2.c | 85 +++++++++++++ .../e-acsl-runtime/oracle/gen_labeled_stmt.c | 103 +++++++++++++++ .../e-acsl-runtime/oracle/gen_labeled_stmt2.c | 85 +++++++++++++ .../tests/e-acsl-runtime/oracle/gen_lazy.c | 103 +++++++++++++++ .../tests/e-acsl-runtime/oracle/gen_lazy2.c | 69 ++++++++++ .../e-acsl-runtime/oracle/gen_linear_search.c | 103 +++++++++++++++ .../oracle/gen_linear_search2.c | 66 ++++++++++ .../oracle/gen_nested_code_annot.c | 103 +++++++++++++++ .../oracle/gen_nested_code_annot2.c | 85 +++++++++++++ .../tests/e-acsl-runtime/oracle/gen_not.c | 103 +++++++++++++++ .../tests/e-acsl-runtime/oracle/gen_not2.c | 85 +++++++++++++ .../tests/e-acsl-runtime/oracle/gen_null.c | 103 +++++++++++++++ .../tests/e-acsl-runtime/oracle/gen_null2.c | 103 +++++++++++++++ .../oracle/gen_other_constants.c | 103 +++++++++++++++ .../oracle/gen_other_constants2.c | 85 +++++++++++++ .../tests/e-acsl-runtime/oracle/gen_ptr.c | 103 +++++++++++++++ .../tests/e-acsl-runtime/oracle/gen_ptr2.c | 47 +++++++ .../tests/e-acsl-runtime/oracle/gen_quantif.c | 103 +++++++++++++++ .../e-acsl-runtime/oracle/gen_quantif2.c | 45 +++++++ .../tests/e-acsl-runtime/oracle/gen_result.c | 103 +++++++++++++++ .../tests/e-acsl-runtime/oracle/gen_result2.c | 71 +++++++++++ .../tests/e-acsl-runtime/oracle/gen_sizeof.c | 103 +++++++++++++++ .../tests/e-acsl-runtime/oracle/gen_sizeof2.c | 85 +++++++++++++ .../e-acsl-runtime/oracle/gen_stmt_contract.c | 103 +++++++++++++++ .../oracle/gen_stmt_contract2.c | 74 +++++++++++ .../tests/e-acsl-runtime/oracle/gen_true.c | 103 +++++++++++++++ .../tests/e-acsl-runtime/oracle/gen_true2.c | 103 +++++++++++++++ .../tests/e-acsl-runtime/oracle/gen_typedef.c | 103 +++++++++++++++ .../e-acsl-runtime/oracle/gen_typedef2.c | 81 ++++++++++++ .../oracle/integer_constant.1.res.oracle | 94 +++++++++++++- .../oracle/integer_constant.res.oracle | 103 +++++++++++++++ .../oracle/invariant.1.res.oracle | 96 +++++++++++++- .../oracle/invariant.res.oracle | 103 +++++++++++++++ .../oracle/labeled_stmt.1.res.oracle | 96 +++++++++++++- .../oracle/labeled_stmt.res.oracle | 103 +++++++++++++++ .../e-acsl-runtime/oracle/lazy.1.res.oracle | 88 ++++++++++++- .../e-acsl-runtime/oracle/lazy.res.oracle | 103 +++++++++++++++ .../oracle/linear_search.1.res.oracle | 91 ++++++++++++- .../oracle/linear_search.res.oracle | 103 +++++++++++++++ .../oracle/nested_code_annot.1.res.oracle | 96 +++++++++++++- .../oracle/nested_code_annot.res.oracle | 103 +++++++++++++++ .../e-acsl-runtime/oracle/not.1.res.oracle | 96 +++++++++++++- .../e-acsl-runtime/oracle/not.res.oracle | 103 +++++++++++++++ .../e-acsl-runtime/oracle/null.1.res.oracle | 103 +++++++++++++++ .../e-acsl-runtime/oracle/null.res.oracle | 103 +++++++++++++++ .../oracle/other_constants.1.res.oracle | 96 +++++++++++++- .../oracle/other_constants.res.oracle | 103 +++++++++++++++ .../e-acsl-runtime/oracle/ptr.1.res.oracle | 82 +++++++++++- .../e-acsl-runtime/oracle/ptr.res.oracle | 103 +++++++++++++++ .../oracle/quantif.1.res.oracle | 81 +++++++++++- .../e-acsl-runtime/oracle/quantif.res.oracle | 103 +++++++++++++++ .../e-acsl-runtime/oracle/result.1.res.oracle | 89 ++++++++++++- .../e-acsl-runtime/oracle/result.res.oracle | 103 +++++++++++++++ .../e-acsl-runtime/oracle/sizeof.1.res.oracle | 96 +++++++++++++- .../e-acsl-runtime/oracle/sizeof.res.oracle | 103 +++++++++++++++ .../oracle/stmt_contract.1.res.oracle | 92 +++++++++++++- .../oracle/stmt_contract.res.oracle | 103 +++++++++++++++ .../e-acsl-runtime/oracle/true.1.res.oracle | 103 +++++++++++++++ .../e-acsl-runtime/oracle/true.res.oracle | 103 +++++++++++++++ .../oracle/typedef.1.res.oracle | 99 ++++++++++++++- .../e-acsl-runtime/oracle/typedef.res.oracle | 103 +++++++++++++++ .../tests/e-acsl-runtime/other_constants.i | 4 +- src/plugins/e-acsl/tests/e-acsl-runtime/ptr.i | 4 +- .../e-acsl/tests/e-acsl-runtime/quantif.i | 4 +- .../e-acsl/tests/e-acsl-runtime/result.i | 4 +- .../e-acsl/tests/e-acsl-runtime/sizeof.i | 4 +- .../tests/e-acsl-runtime/stmt_contract.i | 4 +- .../e-acsl/tests/e-acsl-runtime/true.i | 4 +- .../e-acsl/tests/e-acsl-runtime/typedef.i | 4 +- src/plugins/e-acsl/tests/test_config.in | 4 +- src/plugins/e-acsl/typing.ml | 5 + src/plugins/e-acsl/visit.ml | 5 + 131 files changed, 9196 insertions(+), 119 deletions(-) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-reject/oracle/valid_index.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-reject/oracle/valid_index.res.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-reject/oracle/valid_range.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-reject/oracle/valid_range.res.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-reject/valid_index.i delete mode 100644 src/plugins/e-acsl/tests/e-acsl-reject/valid_range.i diff --git a/src/plugins/e-acsl/read_header.ml b/src/plugins/e-acsl/read_header.ml index 369c5d481b7..426a62eb438 100644 --- a/src/plugins/e-acsl/read_header.ml +++ b/src/plugins/e-acsl/read_header.ml @@ -39,10 +39,10 @@ let put_file_in_buffer fname buf = (* TODO: must be project-compliant. The memoized buffer should be reset when we have to redo the visitor in a different setting. *) - +(* let add_include buf hfile = Buffer.add_string buf (Format.sprintf "#include %S\n" hfile) - + *) let text = let buf = Buffer.create 97 in fun () -> diff --git a/src/plugins/e-acsl/tests/e-acsl-reject/oracle/valid_index.err.oracle b/src/plugins/e-acsl/tests/e-acsl-reject/oracle/valid_index.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-reject/oracle/valid_index.res.oracle b/src/plugins/e-acsl/tests/e-acsl-reject/oracle/valid_index.res.oracle deleted file mode 100644 index 5bf750cbbec..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-reject/oracle/valid_index.res.oracle +++ /dev/null @@ -1,3 +0,0 @@ -tests/e-acsl-reject/valid_index.i:5:[e-acsl] warning: E-ACSL construct `\valid' is not yet supported. Ignoring annotation. -[e-acsl] 0 annotation was ignored, being untypable. -[e-acsl] 1 annotation was ignored, being unsupported. diff --git a/src/plugins/e-acsl/tests/e-acsl-reject/oracle/valid_range.err.oracle b/src/plugins/e-acsl/tests/e-acsl-reject/oracle/valid_range.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-reject/oracle/valid_range.res.oracle b/src/plugins/e-acsl/tests/e-acsl-reject/oracle/valid_range.res.oracle deleted file mode 100644 index f0201b41da7..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-reject/oracle/valid_range.res.oracle +++ /dev/null @@ -1,3 +0,0 @@ -tests/e-acsl-reject/valid_range.i:5:[e-acsl] warning: E-ACSL construct `\valid' is not yet supported. Ignoring annotation. -[e-acsl] 0 annotation was ignored, being untypable. -[e-acsl] 1 annotation was ignored, being unsupported. diff --git a/src/plugins/e-acsl/tests/e-acsl-reject/valid_index.i b/src/plugins/e-acsl/tests/e-acsl-reject/valid_index.i deleted file mode 100644 index 307fc8697fd..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-reject/valid_index.i +++ /dev/null @@ -1,7 +0,0 @@ -/* run.config - COMMENT: \valid_index */ - -void main(int *x, int i) { - /*@ assert \valid_index(x, i); */ - return; -} diff --git a/src/plugins/e-acsl/tests/e-acsl-reject/valid_range.i b/src/plugins/e-acsl/tests/e-acsl-reject/valid_range.i deleted file mode 100644 index cc6e5a855c8..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-reject/valid_range.i +++ /dev/null @@ -1,7 +0,0 @@ -/* run.config - COMMENT: \valid_range */ - -void main(int *x, int a, int b) { - /*@ assert \valid_range(x, a, b); */ - return; -} diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/addrOf.i b/src/plugins/e-acsl/tests/e-acsl-runtime/addrOf.i index 16d73e9cd0a..75b3cb71bc4 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/addrOf.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/addrOf.i @@ -1,7 +1,7 @@ /* run.config COMMENT: addrOf - EXECNOW: LOG gen_addrOf.c BIN gen_addrOf.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/addrOf.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_addrOf.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_addrOf.out ./tests/e-acsl-runtime/result/gen_addrOf.c && ./tests/e-acsl-runtime/result/gen_addrOf.out - EXECNOW: LOG gen_addrOf2.c BIN gen_addrOf2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/addrOf.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_addrOf2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_addrOf2.out ./tests/e-acsl-runtime/result/gen_addrOf2.c && ./tests/e-acsl-runtime/result/gen_addrOf2.out + EXECNOW: LOG gen_addrOf.c BIN gen_addrOf.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/addrOf.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_addrOf.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_addrOf.out ./tests/e-acsl-runtime/result/gen_addrOf.c && ./tests/e-acsl-runtime/result/gen_addrOf.out + EXECNOW: LOG gen_addrOf2.c BIN gen_addrOf2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/addrOf.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_addrOf2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_addrOf2.out ./tests/e-acsl-runtime/result/gen_addrOf2.c && ./tests/e-acsl-runtime/result/gen_addrOf2.out */ int main(void) { diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/arith.i b/src/plugins/e-acsl/tests/e-acsl-runtime/arith.i index 0942b226fd3..8467353a062 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/arith.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/arith.i @@ -1,8 +1,8 @@ /* run.config COMMENT: arithmetic operations COMMENT: add the last assertion when fixing BTS #751 - EXECNOW: LOG gen_arith.c BIN gen_arith.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/arith.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_arith.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_arith.out ./tests/e-acsl-runtime/result/gen_arith.c -lgmp && ./tests/e-acsl-runtime/result/gen_arith.out - EXECNOW: LOG gen_arith2.c BIN gen_arith2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/arith.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_arith2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_arith2.out ./tests/e-acsl-runtime/result/gen_arith2.c -lgmp && ./tests/e-acsl-runtime/result/gen_arith2.out + EXECNOW: LOG gen_arith.c BIN gen_arith.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/arith.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_arith.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_arith.out ./tests/e-acsl-runtime/result/gen_arith.c -lgmp && ./tests/e-acsl-runtime/result/gen_arith.out + EXECNOW: LOG gen_arith2.c BIN gen_arith2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/arith.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_arith2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_arith2.out ./tests/e-acsl-runtime/result/gen_arith2.c -lgmp && ./tests/e-acsl-runtime/result/gen_arith2.out */ int main(void) { diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/array.i b/src/plugins/e-acsl/tests/e-acsl-runtime/array.i index 0bc00ae3a3b..0d54884cede 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/array.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/array.i @@ -1,7 +1,7 @@ /* run.config COMMENT: arrays - EXECNOW: LOG gen_array.c BIN gen_array.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/array.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_array.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_array.out ./tests/e-acsl-runtime/result/gen_array.c -lgmp && ./tests/e-acsl-runtime/result/gen_array.out - EXECNOW: LOG gen_array2.c BIN gen_array2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/array.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_array2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_array2.out ./tests/e-acsl-runtime/result/gen_array2.c -lgmp && ./tests/e-acsl-runtime/result/gen_array2.out + EXECNOW: LOG gen_array.c BIN gen_array.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/array.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_array.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_array.out ./tests/e-acsl-runtime/result/gen_array.c -lgmp && ./tests/e-acsl-runtime/result/gen_array.out + EXECNOW: LOG gen_array2.c BIN gen_array2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/array.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_array2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_array2.out ./tests/e-acsl-runtime/result/gen_array2.c -lgmp && ./tests/e-acsl-runtime/result/gen_array2.out */ int T1[3],T2[4]; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/at.i b/src/plugins/e-acsl/tests/e-acsl-runtime/at.i index bdbdb5a109b..281f6d35f1f 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/at.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/at.i @@ -1,7 +1,7 @@ /* run.config COMMENT: \at - EXECNOW: LOG gen_at.c BIN gen_at.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/at.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_at.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_at.out ./tests/e-acsl-runtime/result/gen_at.c -lgmp && ./tests/e-acsl-runtime/result/gen_at.out - EXECNOW: LOG gen_at2.c BIN gen_at2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/at.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_at2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_at2.out ./tests/e-acsl-runtime/result/gen_at2.c -lgmp && ./tests/e-acsl-runtime/result/gen_at2.out + EXECNOW: LOG gen_at.c BIN gen_at.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/at.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_at.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_at.out ./tests/e-acsl-runtime/result/gen_at.c -lgmp && ./tests/e-acsl-runtime/result/gen_at.out + EXECNOW: LOG gen_at2.c BIN gen_at2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/at.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_at2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_at2.out ./tests/e-acsl-runtime/result/gen_at2.c -lgmp && ./tests/e-acsl-runtime/result/gen_at2.out */ int A = 0; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/cast.i b/src/plugins/e-acsl/tests/e-acsl-runtime/cast.i index 241b55c97db..730411fd4be 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/cast.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/cast.i @@ -1,7 +1,7 @@ /* run.config COMMENT: cast - EXECNOW: LOG gen_cast.c BIN gen_cast.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/cast.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_cast.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_cast.out ./tests/e-acsl-runtime/result/gen_cast.c -lgmp && ./tests/e-acsl-runtime/result/gen_cast.out - EXECNOW: LOG gen_cast2.c BIN gen_cast2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/cast.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_cast2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_cast2.out ./tests/e-acsl-runtime/result/gen_cast2.c -lgmp && ./tests/e-acsl-runtime/result/gen_cast2.out + EXECNOW: LOG gen_cast.c BIN gen_cast.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/cast.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_cast.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_cast.out ./tests/e-acsl-runtime/result/gen_cast.c -lgmp && ./tests/e-acsl-runtime/result/gen_cast.out + EXECNOW: LOG gen_cast2.c BIN gen_cast2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/cast.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_cast2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_cast2.out ./tests/e-acsl-runtime/result/gen_cast2.c -lgmp && ./tests/e-acsl-runtime/result/gen_cast2.out */ int main(void) { diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/comparison.i b/src/plugins/e-acsl/tests/e-acsl-runtime/comparison.i index defe8bebc70..54a4ca7e3da 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/comparison.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/comparison.i @@ -1,7 +1,7 @@ /* run.config COMMENT: comparison operators - EXECNOW: LOG gen_comparison.c BIN gen_comparison.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/comparison.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_comparison.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_comparison.out ./tests/e-acsl-runtime/result/gen_comparison.c -lgmp && ./tests/e-acsl-runtime/result/gen_comparison.out - EXECNOW: LOG gen_comparison2.c BIN gen_comparison2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/comparison.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_comparison2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_comparison2.out ./tests/e-acsl-runtime/result/gen_comparison2.c -lgmp && ./tests/e-acsl-runtime/result/gen_comparison2.out + EXECNOW: LOG gen_comparison.c BIN gen_comparison.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/comparison.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_comparison.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_comparison.out ./tests/e-acsl-runtime/result/gen_comparison.c -lgmp && ./tests/e-acsl-runtime/result/gen_comparison.out + EXECNOW: LOG gen_comparison2.c BIN gen_comparison2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/comparison.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_comparison2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_comparison2.out ./tests/e-acsl-runtime/result/gen_comparison2.c -lgmp && ./tests/e-acsl-runtime/result/gen_comparison2.out */ int main(void) { diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/false.i b/src/plugins/e-acsl/tests/e-acsl-runtime/false.i index 2175d76f16b..27d617e1ade 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/false.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/false.i @@ -1,7 +1,7 @@ /* run.config COMMENT: assert \false - EXECNOW: LOG gen_false.c BIN gen_false.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/false.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_false.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_false.out ./tests/e-acsl-runtime/result/gen_false.c && ./tests/e-acsl-runtime/result/gen_false.out - EXECNOW: LOG gen_false2.c BIN gen_false2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/false.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_false2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_false2.out ./tests/e-acsl-runtime/result/gen_false2.c && ./tests/e-acsl-runtime/result/gen_false2.out + EXECNOW: LOG gen_false.c BIN gen_false.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/false.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_false.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_false.out ./tests/e-acsl-runtime/result/gen_false.c && ./tests/e-acsl-runtime/result/gen_false.out + EXECNOW: LOG gen_false2.c BIN gen_false2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/false.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_false2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_false2.out ./tests/e-acsl-runtime/result/gen_false2.c && ./tests/e-acsl-runtime/result/gen_false2.out */ int main(void) { int x = 0; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/function_contract.i b/src/plugins/e-acsl/tests/e-acsl-runtime/function_contract.i index 50278e074e5..e3002072d79 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/function_contract.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/function_contract.i @@ -1,7 +1,7 @@ /* run.config COMMENT: function contract - EXECNOW: LOG gen_function_contract.c BIN gen_function_contract.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/function_contract.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_function_contract.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_function_contract.out ./tests/e-acsl-runtime/result/gen_function_contract.c -lgmp && ./tests/e-acsl-runtime/result/gen_function_contract.out - EXECNOW: LOG gen_function_contract2.c BIN gen_function_contract2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/function_contract.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_function_contract2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_function_contract2.out ./tests/e-acsl-runtime/result/gen_function_contract2.c -lgmp && ./tests/e-acsl-runtime/result/gen_function_contract2.out + EXECNOW: LOG gen_function_contract.c BIN gen_function_contract.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/function_contract.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_function_contract.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_function_contract.out ./tests/e-acsl-runtime/result/gen_function_contract.c -lgmp && ./tests/e-acsl-runtime/result/gen_function_contract.out + EXECNOW: LOG gen_function_contract2.c BIN gen_function_contract2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/function_contract.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_function_contract2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_function_contract2.out ./tests/e-acsl-runtime/result/gen_function_contract2.c -lgmp && ./tests/e-acsl-runtime/result/gen_function_contract2.out */ int X = 0, Y = 2; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/integer_constant.i b/src/plugins/e-acsl/tests/e-acsl-runtime/integer_constant.i index 40fb7213f05..449478a0340 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/integer_constant.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/integer_constant.i @@ -1,8 +1,8 @@ /* run.config COMMENT: integer constant + a stmt after the assertion COMMENT: waiting for fixing BTS #745 - EXECNOW: LOG gen_integer_constant.c BIN gen_integer_constant.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/integer_constant.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_integer_constant.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_integer_constant.out ./tests/e-acsl-runtime/result/gen_integer_constant.c -lgmp && ./tests/e-acsl-runtime/result/gen_integer_constant.out - EXECNOW: LOG gen_integer_constant2.c BIN gen_integer_constant2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/integer_constant.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_integer_constant2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_integer_constant2.out ./tests/e-acsl-runtime/result/gen_integer_constant2.c -lgmp && ./tests/e-acsl-runtime/result/gen_integer_constant2.out + EXECNOW: LOG gen_integer_constant.c BIN gen_integer_constant.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/integer_constant.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_integer_constant.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_integer_constant.out ./tests/e-acsl-runtime/result/gen_integer_constant.c -lgmp && ./tests/e-acsl-runtime/result/gen_integer_constant.out + EXECNOW: LOG gen_integer_constant2.c BIN gen_integer_constant2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/integer_constant.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_integer_constant2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_integer_constant2.out ./tests/e-acsl-runtime/result/gen_integer_constant2.c -lgmp && ./tests/e-acsl-runtime/result/gen_integer_constant2.out */ int main(void) { int x; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/invariant.i b/src/plugins/e-acsl/tests/e-acsl-runtime/invariant.i index 35cc1d9107c..7d25adf08cd 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/invariant.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/invariant.i @@ -1,7 +1,7 @@ /* run.config COMMENT: invariant - EXECNOW: LOG gen_invariant.c BIN gen_invariant.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/invariant.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_invariant.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_invariant.out ./tests/e-acsl-runtime/result/gen_invariant.c -lgmp && ./tests/e-acsl-runtime/result/gen_invariant.out - EXECNOW: LOG gen_invariant2.c BIN gen_invariant2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/invariant.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_invariant2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_invariant2.out ./tests/e-acsl-runtime/result/gen_invariant2.c -lgmp && ./tests/e-acsl-runtime/result/gen_invariant2.out + EXECNOW: LOG gen_invariant.c BIN gen_invariant.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/invariant.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_invariant.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_invariant.out ./tests/e-acsl-runtime/result/gen_invariant.c -lgmp && ./tests/e-acsl-runtime/result/gen_invariant.out + EXECNOW: LOG gen_invariant2.c BIN gen_invariant2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/invariant.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_invariant2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_invariant2.out ./tests/e-acsl-runtime/result/gen_invariant2.c -lgmp && ./tests/e-acsl-runtime/result/gen_invariant2.out */ int main(void) { int x = 0; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/labeled_stmt.i b/src/plugins/e-acsl/tests/e-acsl-runtime/labeled_stmt.i index fe23e93377d..6002e91d589 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/labeled_stmt.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/labeled_stmt.i @@ -1,7 +1,7 @@ /* run.config COMMENT: labeled stmt and gotos - EXECNOW: LOG gen_labeled_stmt.c BIN gen_labeled_stmt.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/labeled_stmt.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_labeled_stmt.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_labeled_stmt.out ./tests/e-acsl-runtime/result/gen_labeled_stmt.c -lgmp && ./tests/e-acsl-runtime/result/gen_labeled_stmt.out - EXECNOW: LOG gen_labeled_stmt2.c BIN gen_labeled_stmt2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/labeled_stmt.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_labeled_stmt2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_labeled_stmt2.out ./tests/e-acsl-runtime/result/gen_labeled_stmt2.c -lgmp && ./tests/e-acsl-runtime/result/gen_labeled_stmt2.out + EXECNOW: LOG gen_labeled_stmt.c BIN gen_labeled_stmt.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/labeled_stmt.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_labeled_stmt.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_labeled_stmt.out ./tests/e-acsl-runtime/result/gen_labeled_stmt.c -lgmp && ./tests/e-acsl-runtime/result/gen_labeled_stmt.out + EXECNOW: LOG gen_labeled_stmt2.c BIN gen_labeled_stmt2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/labeled_stmt.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_labeled_stmt2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_labeled_stmt2.out ./tests/e-acsl-runtime/result/gen_labeled_stmt2.c -lgmp && ./tests/e-acsl-runtime/result/gen_labeled_stmt2.out */ int X = 0; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/lazy.i b/src/plugins/e-acsl/tests/e-acsl-runtime/lazy.i index 8dc2a3b17bb..de5b1f69fd8 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/lazy.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/lazy.i @@ -1,7 +1,7 @@ /* run.config COMMENT: terms and predicates using lazy operators - EXECNOW: LOG gen_lazy.c BIN gen_lazy.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/lazy.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_lazy.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_lazy.out ./tests/e-acsl-runtime/result/gen_lazy.c -lgmp 2> /dev/null && ./tests/e-acsl-runtime/result/gen_lazy.out - EXECNOW: LOG gen_lazy2.c BIN gen_lazy2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/lazy.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_lazy2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_lazy2.out ./tests/e-acsl-runtime/result/gen_lazy2.c -lgmp 2> /dev/null && ./tests/e-acsl-runtime/result/gen_lazy2.out + EXECNOW: LOG gen_lazy.c BIN gen_lazy.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/lazy.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_lazy.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_lazy.out ./tests/e-acsl-runtime/result/gen_lazy.c -lgmp 2> /dev/null && ./tests/e-acsl-runtime/result/gen_lazy.out + EXECNOW: LOG gen_lazy2.c BIN gen_lazy2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/lazy.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_lazy2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_lazy2.out ./tests/e-acsl-runtime/result/gen_lazy2.c -lgmp 2> /dev/null && ./tests/e-acsl-runtime/result/gen_lazy2.out */ int main(void) { diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/linear_search.i b/src/plugins/e-acsl/tests/e-acsl-runtime/linear_search.i index 75bf70bacf2..8c4a3650b23 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/linear_search.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/linear_search.i @@ -1,7 +1,7 @@ /* run.config COMMENT: linear search (example of the TAP'12 article) - EXECNOW: LOG gen_linear_search.c BIN gen_linear_search.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/linear_search.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_linear_search.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_linear_search.out ./tests/e-acsl-runtime/result/gen_linear_search.c -lgmp && ./tests/e-acsl-runtime/result/gen_linear_search.out - EXECNOW: LOG gen_linear_search2.c BIN gen_linear_search2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/linear_search.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_linear_search2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_linear_search2.out ./tests/e-acsl-runtime/result/gen_linear_search2.c -lgmp && ./tests/e-acsl-runtime/result/gen_linear_search2.out + EXECNOW: LOG gen_linear_search.c BIN gen_linear_search.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/linear_search.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_linear_search.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_linear_search.out ./tests/e-acsl-runtime/result/gen_linear_search.c -lgmp && ./tests/e-acsl-runtime/result/gen_linear_search.out + EXECNOW: LOG gen_linear_search2.c BIN gen_linear_search2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/linear_search.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_linear_search2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_linear_search2.out ./tests/e-acsl-runtime/result/gen_linear_search2.c -lgmp && ./tests/e-acsl-runtime/result/gen_linear_search2.out */ int A[10]; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/nested_code_annot.i b/src/plugins/e-acsl/tests/e-acsl-runtime/nested_code_annot.i index 1be16d7cf5b..ae5104404b7 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/nested_code_annot.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/nested_code_annot.i @@ -1,7 +1,7 @@ /* run.config COMMENT: structured stmt with several code annotations inside - EXECNOW: LOG gen_nested_code_annot.c BIN gen_nested_code_annot.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/nested_code_annot.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_nested_code_annot.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_nested_code_annot.out ./tests/e-acsl-runtime/result/gen_nested_code_annot.c -lgmp && ./tests/e-acsl-runtime/result/gen_nested_code_annot.out - EXECNOW: LOG gen_nested_code_annot2.c BIN gen_nested_code_annot2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/nested_code_annot.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_nested_code_annot2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_nested_code_annot2.out ./tests/e-acsl-runtime/result/gen_nested_code_annot2.c -lgmp && ./tests/e-acsl-runtime/result/gen_nested_code_annot2.out + EXECNOW: LOG gen_nested_code_annot.c BIN gen_nested_code_annot.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/nested_code_annot.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_nested_code_annot.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_nested_code_annot.out ./tests/e-acsl-runtime/result/gen_nested_code_annot.c -lgmp && ./tests/e-acsl-runtime/result/gen_nested_code_annot.out + EXECNOW: LOG gen_nested_code_annot2.c BIN gen_nested_code_annot2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/nested_code_annot.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_nested_code_annot2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_nested_code_annot2.out ./tests/e-acsl-runtime/result/gen_nested_code_annot2.c -lgmp && ./tests/e-acsl-runtime/result/gen_nested_code_annot2.out */ int main(void) { diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/not.i b/src/plugins/e-acsl/tests/e-acsl-runtime/not.i index 4012c7bdadd..6280913c7f7 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/not.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/not.i @@ -1,7 +1,7 @@ /* run.config COMMENT: predicate [!p] - EXECNOW: LOG gen_not.c BIN gen_not.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/not.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_not.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_not.out ./tests/e-acsl-runtime/result/gen_not.c && ./tests/e-acsl-runtime/result/gen_not.out - EXECNOW: LOG gen_not2.c BIN gen_not2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/not.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_not2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_not2.out ./tests/e-acsl-runtime/result/gen_not2.c -lgmp && ./tests/e-acsl-runtime/result/gen_not2.out + EXECNOW: LOG gen_not.c BIN gen_not.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/not.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_not.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_not.out ./tests/e-acsl-runtime/result/gen_not.c && ./tests/e-acsl-runtime/result/gen_not.out + EXECNOW: LOG gen_not2.c BIN gen_not2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/not.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_not2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_not2.out ./tests/e-acsl-runtime/result/gen_not2.c -lgmp && ./tests/e-acsl-runtime/result/gen_not2.out */ int main(void) { int x = 0; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/null.i b/src/plugins/e-acsl/tests/e-acsl-runtime/null.i index 2b04ba44e00..281ac755a1d 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/null.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/null.i @@ -1,7 +1,7 @@ /* run.config COMMENT: assert \null == 0 - EXECNOW: LOG gen_null.c BIN gen_null.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/null.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_null.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_null.out ./tests/e-acsl-runtime/result/gen_null.c -lgmp && ./tests/e-acsl-runtime/result/gen_null.out - EXECNOW: LOG gen_null2.c BIN gen_null2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/null.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_null2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_null2.out ./tests/e-acsl-runtime/result/gen_null2.c -lgmp && ./tests/e-acsl-runtime/result/gen_null2.out + EXECNOW: LOG gen_null.c BIN gen_null.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/null.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_null.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_null.out ./tests/e-acsl-runtime/result/gen_null.c -lgmp && ./tests/e-acsl-runtime/result/gen_null.out + EXECNOW: LOG gen_null2.c BIN gen_null2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/null.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_null2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_null2.out ./tests/e-acsl-runtime/result/gen_null2.c -lgmp && ./tests/e-acsl-runtime/result/gen_null2.out */ int main(void) { diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.1.res.oracle index 3bd2589edff..a2d9b51febc 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.1.res.oracle @@ -16,6 +16,109 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status valid __retres ∈ {0} x ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.res.oracle index 3bd2589edff..a2d9b51febc 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.res.oracle @@ -16,6 +16,109 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status valid __retres ∈ {0} x ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/arith.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/arith.1.res.oracle index 737b404ffa0..6d5c2538d20 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/arith.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/arith.1.res.oracle @@ -5,14 +5,17 @@ PROJECT_FILE.i:237:[value] Assertion got status valid. [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:243. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init <- main. Called from PROJECT_FILE.i:244. +[value] using specification for function __gmpz_init PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. [value] Done for function __gmpz_init [value] computing for function __gmpz_neg <- main. Called from PROJECT_FILE.i:245. +[value] using specification for function __gmpz_neg PROJECT_FILE.i:128:[value] Function __gmpz_neg: precondition got status valid. PROJECT_FILE.i:129:[value] Function __gmpz_neg: precondition got status valid. [value] Done for function __gmpz_neg @@ -21,6 +24,7 @@ PROJECT_FILE.i:129:[value] Function __gmpz_neg: precondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:247. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -31,6 +35,7 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status unkno [value] Done for function e_acsl_assert [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:249. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_clear <- main. @@ -77,6 +82,7 @@ PROJECT_FILE.i:273:[value] Assertion got status valid. [value] Done for function __gmpz_init [value] computing for function __gmpz_com <- main. Called from PROJECT_FILE.i:280. +[value] using specification for function __gmpz_com PROJECT_FILE.i:167:[value] Function __gmpz_com: precondition got status valid. PROJECT_FILE.i:168:[value] Function __gmpz_com: precondition got status valid. [value] Done for function __gmpz_com @@ -105,6 +111,7 @@ PROJECT_FILE.i:288:[value] Assertion got status valid. [value] Done for function __gmpz_init [value] computing for function __gmpz_add <- main. Called from PROJECT_FILE.i:299. +[value] using specification for function __gmpz_add PROJECT_FILE.i:133:[value] Function __gmpz_add: precondition got status valid. PROJECT_FILE.i:134:[value] Function __gmpz_add: precondition got status valid. PROJECT_FILE.i:135:[value] Function __gmpz_add: precondition got status valid. @@ -152,6 +159,7 @@ PROJECT_FILE.i:313:[value] Assertion got status valid. [value] Done for function __gmpz_init [value] computing for function __gmpz_sub <- main. Called from PROJECT_FILE.i:324. +[value] using specification for function __gmpz_sub PROJECT_FILE.i:139:[value] Function __gmpz_sub: precondition got status valid. PROJECT_FILE.i:140:[value] Function __gmpz_sub: precondition got status valid. PROJECT_FILE.i:141:[value] Function __gmpz_sub: precondition got status valid. @@ -199,6 +207,7 @@ PROJECT_FILE.i:338:[value] Assertion got status valid. [value] Done for function __gmpz_init [value] computing for function __gmpz_mul <- main. Called from PROJECT_FILE.i:349. +[value] using specification for function __gmpz_mul PROJECT_FILE.i:145:[value] Function __gmpz_mul: precondition got status valid. PROJECT_FILE.i:146:[value] Function __gmpz_mul: precondition got status valid. PROJECT_FILE.i:147:[value] Function __gmpz_mul: precondition got status valid. @@ -257,6 +266,7 @@ PROJECT_FILE.i:378:[value] Assertion got status valid. [value] Done for function e_acsl_assert [value] computing for function __gmpz_tdiv_q <- main. Called from PROJECT_FILE.i:380. +[value] using specification for function __gmpz_tdiv_q PROJECT_FILE.i:151:[value] Function __gmpz_tdiv_q: precondition got status valid. PROJECT_FILE.i:152:[value] Function __gmpz_tdiv_q: precondition got status valid. PROJECT_FILE.i:153:[value] Function __gmpz_tdiv_q: precondition got status valid. @@ -298,6 +308,7 @@ PROJECT_FILE.i:153:[value] Function __gmpz_tdiv_q: precondition got status valid PROJECT_FILE.i:395:[value] Assertion got status valid. [value] computing for function __gmpz_init_set_str <- main. Called from PROJECT_FILE.i:403. +[value] using specification for function __gmpz_init_set_str PROJECT_FILE.i:86:[value] Function __gmpz_init_set_str: postcondition got status valid. [value] Done for function __gmpz_init_set_str [value] computing for function __gmpz_init_set_si <- main. @@ -362,6 +373,7 @@ PROJECT_FILE.i:437:[value] Assertion got status valid. [value] Done for function e_acsl_assert [value] computing for function __gmpz_tdiv_r <- main. Called from PROJECT_FILE.i:439. +[value] using specification for function __gmpz_tdiv_r PROJECT_FILE.i:157:[value] Function __gmpz_tdiv_r: precondition got status valid. PROJECT_FILE.i:158:[value] Function __gmpz_tdiv_r: precondition got status valid. PROJECT_FILE.i:159:[value] Function __gmpz_tdiv_r: precondition got status valid. @@ -893,33 +905,67 @@ struct __anonstruct___mpz_struct_1 { typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); + allocates \nothing; assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ ensures \valid(\old(z)); + allocates \nothing; assigns *z; */ extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); /*@ requires \valid(z1); requires \valid(z2); - assigns *z1; */ + allocates \nothing; + assigns *z1; +*/ extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); - assigns *z1; + allocates \nothing; + assigns *z1; + */ extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, @@ -927,7 +973,9 @@ extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); - assigns *z1; + allocates \nothing; + assigns *z1; + */ extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, @@ -935,7 +983,9 @@ extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); - assigns *z1; + allocates \nothing; + assigns *z1; + */ extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, @@ -943,7 +993,9 @@ extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); - assigns *z1; + allocates \nothing; + assigns *z1; + */ extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, @@ -951,16 +1003,26 @@ extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); - assigns *z1; + allocates \nothing; + assigns *z1; + */ extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); /*@ requires \valid(z1); requires \valid(z2); - assigns *z1; */ + allocates \nothing; + assigns *z1; +*/ extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/arith.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/arith.res.oracle index 051c837ec68..7de092274cb 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/arith.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/arith.res.oracle @@ -122,6 +122,109 @@ PROJECT_FILE.i:327:[value] Assertion got status valid. x ∈ {-3} y ∈ {2} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/array.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/array.1.res.oracle index cf012ba073f..994ad872b43 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/array.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/array.1.res.oracle @@ -14,6 +14,7 @@ PROJECT_FILE.i:246:[value] entering loop for the first time PROJECT_FILE.i:253:[value] Assertion got status unknown. [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:258. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init_set_si <- main. @@ -21,6 +22,7 @@ PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:260. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -31,6 +33,7 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status unkno [value] Done for function e_acsl_assert [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:262. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_clear <- main. @@ -74,18 +77,109 @@ struct __anonstruct___mpz_struct_1 { }; typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/array.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/array.res.oracle index 69e6c62edf4..2b385ff3c64 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/array.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/array.res.oracle @@ -33,6 +33,109 @@ PROJECT_FILE.i:256:[value] Assertion got status unknown. [1..3] ∈ {0; 2; 4; 6} __retres ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.1.res.oracle index a1153e3a661..399b44fc764 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.1.res.oracle @@ -11,6 +11,7 @@ tests/e-acsl-runtime/at.i:34:[e-acsl] warning: missing guard for ensuring that p A ∈ {0} [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:390. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init_set_si <- main. @@ -18,21 +19,25 @@ PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init <- main. Called from PROJECT_FILE.i:392. +[value] using specification for function __gmpz_init PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. [value] Done for function __gmpz_init [value] computing for function __gmpz_add <- main. Called from PROJECT_FILE.i:393. +[value] using specification for function __gmpz_add PROJECT_FILE.i:133:[value] Function __gmpz_add: precondition got status valid. PROJECT_FILE.i:134:[value] Function __gmpz_add: precondition got status valid. PROJECT_FILE.i:135:[value] Function __gmpz_add: precondition got status valid. [value] Done for function __gmpz_add [value] computing for function __gmpz_init_set <- main. Called from PROJECT_FILE.i:394. +[value] using specification for function __gmpz_init_set PROJECT_FILE.i:73:[value] Function __gmpz_init_set: precondition got status valid. PROJECT_FILE.i:74:[value] Function __gmpz_init_set: postcondition got status valid. [value] Done for function __gmpz_init_set [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:395. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_clear <- main. @@ -50,6 +55,7 @@ PROJECT_FILE.i:401:[value] Assertion got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:408. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -317,33 +323,114 @@ struct __anonstruct___mpz_struct_1 { typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); + allocates \nothing; assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z_orig); ensures \valid(\old(z)); - assigns *z; */ + allocates \nothing; + assigns *z; + +*/ extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); - assigns *z1; + allocates \nothing; + assigns *z1; + */ extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.res.oracle index 4901c0de27a..a5c5c549f1c 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.res.oracle @@ -104,6 +104,109 @@ PROJECT_FILE.i:290:[value] Assertion got status unknown. __e_acsl_at_2 ∈ {1} __e_acsl_at_3 ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/cast.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/cast.1.res.oracle index 3daebf6c49c..11d52f4df4c 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/cast.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/cast.1.res.oracle @@ -7,6 +7,7 @@ tests/e-acsl-runtime/cast.i:19:[e-acsl] warning: missing guard for ensuring that PROJECT_FILE.i:237:[value] Assertion got status valid. [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:242. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init_set_si <- main. @@ -14,6 +15,7 @@ PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:244. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -24,6 +26,7 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status unkno [value] Done for function e_acsl_assert [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:246. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_clear <- main. @@ -72,6 +75,7 @@ PROJECT_FILE.i:265:[value] Assertion got status valid. PROJECT_FILE.i:279:[value] Assertion got status valid. [value] computing for function __gmpz_init_set_ui <- main. Called from PROJECT_FILE.i:284. +[value] using specification for function __gmpz_init_set_ui PROJECT_FILE.i:78:[value] Function __gmpz_init_set_ui: postcondition got status valid. [value] Done for function __gmpz_init_set_ui [value] computing for function __gmpz_init_set_ui <- main. @@ -96,10 +100,12 @@ PROJECT_FILE.i:294:[value] Assertion got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init_set_str <- main. Called from PROJECT_FILE.i:302. +[value] using specification for function __gmpz_init_set_str PROJECT_FILE.i:86:[value] Function __gmpz_init_set_str: postcondition got status valid. [value] Done for function __gmpz_init_set_str [value] computing for function __gmpz_get_ui <- main. Called from PROJECT_FILE.i:303. +[value] using specification for function __gmpz_get_ui PROJECT_FILE.i:180:[value] Function __gmpz_get_ui: precondition got status valid. [value] Done for function __gmpz_get_ui [value] computing for function __gmpz_init_set_si <- main. @@ -166,27 +172,111 @@ struct __anonstruct___mpz_struct_1 { }; typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); + allocates \nothing; assigns *z; - assigns *z \from n; */ + assigns *z \from n; +*/ extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); + allocates \nothing; assigns *z; - assigns *z \from n; */ + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ ensures \valid(\old(z)); + allocates \nothing; assigns *z; */ extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ requires \valid(z); + allocates \nothing; assigns \nothing; */ extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/cast.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/cast.res.oracle index 6630d462341..54ffcc42b94 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/cast.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/cast.res.oracle @@ -42,6 +42,109 @@ PROJECT_FILE.i:254:[value] Assertion got status valid. x ∈ {0} y ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/comparison.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/comparison.1.res.oracle index 08952c52d4e..be718900a91 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/comparison.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/comparison.1.res.oracle @@ -5,6 +5,7 @@ PROJECT_FILE.i:238:[value] Assertion got status valid. [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:243. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init_set_si <- main. @@ -12,6 +13,7 @@ PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:245. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -22,6 +24,7 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status unkno [value] Done for function e_acsl_assert [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:247. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_clear <- main. @@ -218,10 +221,12 @@ PROJECT_FILE.i:382:[value] Assertion got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init <- main. Called from PROJECT_FILE.i:389. +[value] using specification for function __gmpz_init PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. [value] Done for function __gmpz_init [value] computing for function __gmpz_neg <- main. Called from PROJECT_FILE.i:390. +[value] using specification for function __gmpz_neg PROJECT_FILE.i:128:[value] Function __gmpz_neg: precondition got status valid. PROJECT_FILE.i:129:[value] Function __gmpz_neg: precondition got status valid. [value] Done for function __gmpz_neg @@ -401,25 +406,111 @@ struct __anonstruct___mpz_struct_1 { typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); + allocates \nothing; assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); /*@ requires \valid(z1); requires \valid(z2); - assigns *z1; */ + allocates \nothing; + assigns *z1; +*/ extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/comparison.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/comparison.res.oracle index a58077a3990..ea92e0e330d 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/comparison.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/comparison.res.oracle @@ -103,6 +103,109 @@ PROJECT_FILE.i:290:[value] Assertion got status valid. y ∈ {1} s ∈ {{ "toto" }} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/empty.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/empty.1.res.oracle index 9526b80c620..bc28b3d231f 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/empty.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/empty.1.res.oracle @@ -1,2 +1,122 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); +/*@ terminates \false; + ensures \false; + assigns \nothing; */ +extern void exit(int status); +/*@ assigns \nothing; */ +extern int printf(char const * , ...); +/*@ requires predicate ≢ 0; */ +void e_acsl_assert(int predicate, char *kind, char *pred_txt, int line) +{ + if (! predicate) { + printf("%s failed at line %d.\nThe failing predicate is:\n%s.\n",kind, + line,pred_txt); + exit(1); + } + return; +} + diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.1.res.oracle index 2fff7cb2725..1d8175ec54a 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.1.res.oracle @@ -9,6 +9,109 @@ __retres ∈ {0} x ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.res.oracle index 2fff7cb2725..1d8175ec54a 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.res.oracle @@ -9,6 +9,109 @@ __retres ∈ {0} x ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.1.res.oracle index a0f2519f180..4ffb9069ff0 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.1.res.oracle @@ -8,6 +8,7 @@ Called from PROJECT_FILE.i:686. [value] computing for function __gmpz_init_set_si <- f <- main. Called from PROJECT_FILE.i:240. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init_set_si <- f <- main. @@ -15,6 +16,7 @@ PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- f <- main. Called from PROJECT_FILE.i:242. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -25,6 +27,7 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status unkno [value] Done for function e_acsl_assert [value] computing for function __gmpz_clear <- f <- main. Called from PROJECT_FILE.i:244. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_clear <- f <- main. @@ -165,10 +168,12 @@ PROJECT_FILE.i:331:[value] Function j, behavior b2: precondition got status vali [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init <- j <- main. Called from PROJECT_FILE.i:354. +[value] using specification for function __gmpz_init PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. [value] Done for function __gmpz_init [value] computing for function __gmpz_add <- j <- main. Called from PROJECT_FILE.i:355. +[value] using specification for function __gmpz_add PROJECT_FILE.i:133:[value] Function __gmpz_add: precondition got status valid. PROJECT_FILE.i:134:[value] Function __gmpz_add: precondition got status valid. PROJECT_FILE.i:135:[value] Function __gmpz_add: precondition got status valid. @@ -629,28 +634,111 @@ struct __anonstruct___mpz_struct_1 { typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); + allocates \nothing; assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); - assigns *z1; + allocates \nothing; + assigns *z1; + */ extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.res.oracle index 7d6e1928c16..400a73210d6 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.res.oracle @@ -159,6 +159,109 @@ PROJECT_FILE.i:352:[value] Function m, behavior b2: postcondition got status val X ∈ {7} __retres ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_addrOf.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_addrOf.c index dec62651953..02ba9483e3f 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_addrOf.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_addrOf.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_addrOf2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_addrOf2.c index dec62651953..02ba9483e3f 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_addrOf2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_addrOf2.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_arith.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_arith.c index 7c48658ca15..c90a8d89fb5 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_arith.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_arith.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_arith2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_arith2.c index 6c558cd24a3..501472caade 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_arith2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_arith2.c @@ -9,6 +9,15 @@ typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ @@ -17,6 +26,19 @@ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); assigns *z; */ extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -75,6 +97,12 @@ extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, assigns *z1; */ extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_array.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_array.c index b83c4643cab..14f0858316d 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_array.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_array.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_array2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_array2.c index e491a9fd62d..765225105ac 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_array2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_array2.c @@ -6,10 +6,39 @@ struct __anonstruct___mpz_struct_1 { }; typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -18,6 +47,62 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_at.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_at.c index a68e68da0b3..d10663b18a4 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_at.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_at.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_at2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_at2.c index 616548f8c0e..9fdc34f7abb 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_at2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_at2.c @@ -14,10 +14,31 @@ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); assigns *z; */ extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -26,6 +47,11 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); @@ -34,6 +60,49 @@ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_cast.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_cast.c index a073e25196f..9951c989edd 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_cast.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_cast.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_cast2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_cast2.c index c655258bea3..1d668b087d0 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_cast2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_cast2.c @@ -6,6 +6,14 @@ struct __anonstruct___mpz_struct_1 { }; typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ @@ -18,6 +26,19 @@ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); assigns *z; */ extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -26,6 +47,59 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ requires \valid(z); assigns \nothing; */ extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_comparison.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_comparison.c index dd4723386a5..c6ac392a84a 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_comparison.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_comparison.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_comparison2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_comparison2.c index 256fd03e8b8..028172b274e 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_comparison2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_comparison2.c @@ -9,10 +9,36 @@ typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -26,6 +52,57 @@ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, assigns *z1; */ extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_false.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_false.c index e0ed9f64049..8e99a4e8bf7 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_false.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_false.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_false2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_false2.c index e0ed9f64049..8e99a4e8bf7 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_false2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_false2.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_function_contract.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_function_contract.c index 503577c7bd2..c901731124a 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_function_contract.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_function_contract.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_function_contract2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_function_contract2.c index 8ec3072d54d..30a7e26d4ae 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_function_contract2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_function_contract2.c @@ -9,10 +9,36 @@ typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -21,6 +47,11 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); @@ -29,6 +60,49 @@ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_integer_constant.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_integer_constant.c index 3268ebf06c1..485f4f20a61 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_integer_constant.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_integer_constant.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_integer_constant2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_integer_constant2.c index caf494e2518..09a6cc83032 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_integer_constant2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_integer_constant2.c @@ -6,6 +6,18 @@ struct __anonstruct___mpz_struct_1 { }; typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ @@ -14,6 +26,19 @@ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); assigns *z; */ extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -22,6 +47,62 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_invariant.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_invariant.c index 6374b50c962..685bd5edadd 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_invariant.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_invariant.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_invariant2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_invariant2.c index 7eca3cd070c..e9f51efe586 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_invariant2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_invariant2.c @@ -6,10 +6,39 @@ struct __anonstruct___mpz_struct_1 { }; typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -18,6 +47,62 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_labeled_stmt.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_labeled_stmt.c index 8cfc0944f5e..bb8aab64743 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_labeled_stmt.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_labeled_stmt.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_labeled_stmt2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_labeled_stmt2.c index 9eb453927b0..30a9f60a014 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_labeled_stmt2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_labeled_stmt2.c @@ -6,10 +6,39 @@ struct __anonstruct___mpz_struct_1 { }; typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -18,6 +47,62 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_lazy.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_lazy.c index a0097215fbd..5c32aeb27d1 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_lazy.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_lazy.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_lazy2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_lazy2.c index a8187ddaab8..b95fc745217 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_lazy2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_lazy2.c @@ -14,10 +14,31 @@ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); assigns *z; */ extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -26,6 +47,35 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); @@ -34,6 +84,25 @@ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_linear_search.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_linear_search.c index 6c0a686341d..1244d3b3c4c 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_linear_search.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_linear_search.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_linear_search2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_linear_search2.c index 00191ad4af0..9d65a683fa5 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_linear_search2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_linear_search2.c @@ -9,15 +9,36 @@ typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); /*@ requires \valid(z_orig); requires \valid(z); assigns *z; */ extern void __gmpz_set(__mpz_struct * /*[1]*/ z, __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -26,6 +47,11 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); @@ -34,6 +60,46 @@ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ requires \valid(z); assigns \nothing; */ extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_nested_code_annot.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_nested_code_annot.c index bc68c1e9cb5..24033162a75 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_nested_code_annot.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_nested_code_annot.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_nested_code_annot2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_nested_code_annot2.c index b6bfac7f56f..f89c038e6eb 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_nested_code_annot2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_nested_code_annot2.c @@ -6,10 +6,39 @@ struct __anonstruct___mpz_struct_1 { }; typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -18,6 +47,62 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_not.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_not.c index 3d0bd39a388..1811eee6ea3 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_not.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_not.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_not2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_not2.c index b5619eb2e9e..6823615dfbd 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_not2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_not2.c @@ -6,10 +6,39 @@ struct __anonstruct___mpz_struct_1 { }; typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -18,6 +47,62 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_null.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_null.c index 490d6369536..fa38fe3696d 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_null.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_null.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_null2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_null2.c index 490d6369536..fa38fe3696d 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_null2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_null2.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_other_constants.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_other_constants.c index 0f54974d2ae..a0a6d367f99 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_other_constants.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_other_constants.c @@ -1,8 +1,111 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; enum bool { false = 0, true = 1 }; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_other_constants2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_other_constants2.c index a8d921fdfcf..3edbeb50aa1 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_other_constants2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_other_constants2.c @@ -10,10 +10,39 @@ enum bool { false = 0, true = 1 }; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -22,6 +51,62 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr.c index d6f919c40a2..21d918c42af 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr2.c index 323797a2dbf..7f93020babb 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr2.c @@ -9,10 +9,36 @@ typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -21,6 +47,11 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); @@ -53,6 +84,22 @@ extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ requires \valid(z); assigns \nothing; */ extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_quantif.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_quantif.c index 36fdd810dff..5929b6d4a3f 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_quantif.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_quantif.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_quantif2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_quantif2.c index d03eb4a3430..5f77a0771d0 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_quantif2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_quantif2.c @@ -9,15 +9,36 @@ typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); /*@ requires \valid(z_orig); requires \valid(z); assigns *z; */ extern void __gmpz_set(__mpz_struct * /*[1]*/ z, __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -26,6 +47,11 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); @@ -39,6 +65,14 @@ extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, requires \valid(z3); assigns *z1; */ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); @@ -58,6 +92,17 @@ extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_result.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_result.c index b90ab9275f7..d14ec1e98d2 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_result.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_result.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_result2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_result2.c index 03b6e2c8387..f320bab0f97 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_result2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_result2.c @@ -9,10 +9,36 @@ typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -21,6 +47,19 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); @@ -29,6 +68,38 @@ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ requires \valid(z); assigns \nothing; */ extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_sizeof.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_sizeof.c index 859f8feea2c..e98523ada8e 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_sizeof.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_sizeof.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_sizeof2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_sizeof2.c index f3946fef302..ab47374b1cd 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_sizeof2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_sizeof2.c @@ -6,10 +6,39 @@ struct __anonstruct___mpz_struct_1 { }; typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -18,6 +47,62 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stmt_contract.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stmt_contract.c index de89196695b..8914e200a46 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stmt_contract.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stmt_contract.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stmt_contract2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stmt_contract2.c index b00fbe8752b..04395c4b086 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stmt_contract2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stmt_contract2.c @@ -9,10 +9,36 @@ typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -21,6 +47,11 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); @@ -29,6 +60,49 @@ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_true.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_true.c index 7f65200db0b..f3319748937 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_true.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_true.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_true2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_true2.c index 7f65200db0b..f3319748937 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_true2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_true2.c @@ -1,4 +1,107 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_typedef.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_typedef.c index 415096f8544..c5f507b0e1d 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_typedef.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_typedef.c @@ -1,5 +1,108 @@ /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef unsigned char uint8; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_typedef2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_typedef2.c index 4d3a6da84de..7d2ad8916ee 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_typedef2.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_typedef2.c @@ -7,6 +7,14 @@ struct __anonstruct___mpz_struct_1 { typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; typedef unsigned char uint8; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ @@ -15,6 +23,23 @@ extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); assigns *z; assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); @@ -23,6 +48,62 @@ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); assigns \nothing; */ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/integer_constant.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/integer_constant.1.res.oracle index b24f0f21fc0..8d9f88f7628 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/integer_constant.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/integer_constant.1.res.oracle @@ -5,10 +5,12 @@ PROJECT_FILE.i:234:[value] Assertion got status valid. [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:238. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:239. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -19,6 +21,7 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status unkno [value] Done for function e_acsl_assert [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:241. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear PROJECT_FILE.i:246:[value] Assertion got status valid. @@ -44,6 +47,7 @@ PROJECT_FILE.i:246:[value] Assertion got status valid. PROJECT_FILE.i:260:[value] Assertion got status valid. [value] computing for function __gmpz_init_set_str <- main. Called from PROJECT_FILE.i:264. +[value] using specification for function __gmpz_init_set_str PROJECT_FILE.i:86:[value] Function __gmpz_init_set_str: postcondition got status valid. [value] Done for function __gmpz_init_set_str [value] computing for function __gmpz_cmp <- main. @@ -71,22 +75,110 @@ struct __anonstruct___mpz_struct_1 { }; typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ ensures \valid(\old(z)); + allocates \nothing; assigns *z; */ extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/integer_constant.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/integer_constant.res.oracle index a9e4db13f8d..6b5660d5481 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/integer_constant.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/integer_constant.res.oracle @@ -26,6 +26,109 @@ PROJECT_FILE.i:241:[value] Assertion got status valid. __retres ∈ {0} x ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.1.res.oracle index 5d6c7570081..13d6eaa5603 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.1.res.oracle @@ -5,6 +5,7 @@ PROJECT_FILE.i:238:[value] entering loop for the first time [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:247. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init_set_si <- main. @@ -12,6 +13,7 @@ PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:249. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -32,6 +34,7 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status inval PROJECT_FILE.i:257:[value] assigning non deterministic value for the first time [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:258. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_clear <- main. @@ -878,18 +881,109 @@ struct __anonstruct___mpz_struct_1 { }; typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.res.oracle index dca00b248c8..43471fb766e 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.res.oracle @@ -143,6 +143,109 @@ PROJECT_FILE.i:249:[value] warning: 2's complement assumed for overflow __retres ∈ {0} x ∈ [--..--] /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.1.res.oracle index ef7809ecd89..b2c81c57022 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.1.res.oracle @@ -6,6 +6,7 @@ PROJECT_FILE.i:237:[value] Assertion got status valid. [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:242. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init_set_si <- main. @@ -13,6 +14,7 @@ PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:244. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -23,6 +25,7 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status unkno [value] Done for function e_acsl_assert [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:246. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_clear <- main. @@ -101,18 +104,109 @@ struct __anonstruct___mpz_struct_1 { }; typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.res.oracle index 2b20402fe6d..4f0037070f3 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.res.oracle @@ -30,6 +30,109 @@ PROJECT_FILE.i:231:[value] Function main: postcondition got status valid. X ∈ {3} __retres ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.1.res.oracle index 894c29aa4d0..c8cee4189f9 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.1.res.oracle @@ -5,6 +5,7 @@ PROJECT_FILE.i:237:[value] Assertion got status valid. [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:243. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init_set_si <- main. @@ -12,6 +13,7 @@ PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:245. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -27,6 +29,7 @@ PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:253:[value] assigning non deterministic value for the first time [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:254. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_clear <- main. @@ -67,6 +70,7 @@ PROJECT_FILE.i:264:[value] Assertion got status valid. [value] Done for function __gmpz_cmp [value] computing for function __gmpz_init <- main. Called from PROJECT_FILE.i:284. +[value] using specification for function __gmpz_init PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. [value] Done for function __gmpz_init PROJECT_FILE.i:285:[value] Assertion got status invalid (stopping propagation). @@ -521,6 +525,7 @@ PROJECT_FILE.i:649:[value] Assertion got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init_set <- main. Called from PROJECT_FILE.i:666. +[value] using specification for function __gmpz_init_set PROJECT_FILE.i:73:[value] Function __gmpz_init_set: precondition got status valid. PROJECT_FILE.i:74:[value] Function __gmpz_init_set: postcondition got status valid. [value] Done for function __gmpz_init_set @@ -814,25 +819,85 @@ struct __anonstruct___mpz_struct_1 { typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); + allocates \nothing; assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z_orig); ensures \valid(\old(z)); - assigns *z; */ + allocates \nothing; + assigns *z; + +*/ extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); @@ -841,6 +906,25 @@ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.res.oracle index bf61e8feb34..b3f0f2a984a 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.res.oracle @@ -92,6 +92,109 @@ PROJECT_FILE.i:407:[value] Assertion got status valid. x ∈ {0} y ∈ {1} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.1.res.oracle index 7a60caee427..d76477191eb 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.1.res.oracle @@ -17,19 +17,23 @@ PROJECT_FILE.i:491:[value] assigning non deterministic value for the first time PROJECT_FILE.i:231:[value] Function search: precondition got status unknown. [value] computing for function __gmpz_init <- search <- main. Called from PROJECT_FILE.i:252. +[value] using specification for function __gmpz_init PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. [value] Done for function __gmpz_init [value] computing for function __gmpz_init_set_si <- search <- main. Called from PROJECT_FILE.i:255. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_set <- search <- main. Called from PROJECT_FILE.i:256. +[value] using specification for function __gmpz_set PROJECT_FILE.i:94:[value] Function __gmpz_set: precondition got status valid. PROJECT_FILE.i:95:[value] Function __gmpz_set: precondition got status valid. [value] Done for function __gmpz_set [value] computing for function __gmpz_clear <- search <- main. Called from PROJECT_FILE.i:257. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear PROJECT_FILE.i:260:[value] entering loop for the first time @@ -38,6 +42,7 @@ PROJECT_FILE.i:260:[value] entering loop for the first time [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- search <- main. Called from PROJECT_FILE.i:265. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -46,6 +51,7 @@ PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_get_ui <- search <- main. Called from PROJECT_FILE.i:278. +[value] using specification for function __gmpz_get_ui PROJECT_FILE.i:180:[value] Function __gmpz_get_ui: precondition got status valid. [value] Done for function __gmpz_get_ui PROJECT_FILE.i:279:[kernel] warning: accessing out of bounds index [0..4294967295]. assert __e_acsl_i_2 < 10; @@ -60,6 +66,7 @@ PROJECT_FILE.i:279:[kernel] warning: accessing out of bounds index [0..429496729 [value] Done for function __gmpz_init [value] computing for function __gmpz_add <- search <- main. Called from PROJECT_FILE.i:282. +[value] using specification for function __gmpz_add PROJECT_FILE.i:133:[value] Function __gmpz_add: precondition got status valid. PROJECT_FILE.i:134:[value] Function __gmpz_add: precondition got status valid. PROJECT_FILE.i:135:[value] Function __gmpz_add: precondition got status valid. @@ -591,34 +598,112 @@ struct __anonstruct___mpz_struct_1 { typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); + allocates \nothing; assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); /*@ requires \valid(z_orig); requires \valid(z); - assigns *z; */ + allocates \nothing; + assigns *z; +*/ extern void __gmpz_set(__mpz_struct * /*[1]*/ z, __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); - assigns *z1; + allocates \nothing; + assigns *z1; + */ extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ requires \valid(z); + allocates \nothing; assigns \nothing; */ extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.res.oracle index a73abc132a0..bf9aecd3cd3 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.res.oracle @@ -76,6 +76,109 @@ PROJECT_FILE.i:353:[value] Assertion got status unknown. __retres ∈ {0} found ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.1.res.oracle index a6cd77100c7..2772653ca1d 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.1.res.oracle @@ -5,6 +5,7 @@ PROJECT_FILE.i:237:[value] Assertion got status valid. [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:242. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init_set_si <- main. @@ -12,6 +13,7 @@ PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:244. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -22,6 +24,7 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status unkno [value] Done for function e_acsl_assert [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:246. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_clear <- main. @@ -157,18 +160,109 @@ struct __anonstruct___mpz_struct_1 { }; typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.res.oracle index 445fa9ec137..9224a7f034c 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.res.oracle @@ -41,6 +41,109 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status valid x ∈ {2} y ∈ {1} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/not.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/not.1.res.oracle index 2caebeda7ab..bf61d223e3b 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/not.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/not.1.res.oracle @@ -5,6 +5,7 @@ PROJECT_FILE.i:235:[value] Assertion got status valid. [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:240. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init_set_si <- main. @@ -12,6 +13,7 @@ PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:242. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -22,6 +24,7 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status unkno [value] Done for function e_acsl_assert [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:244. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_clear <- main. @@ -42,18 +45,109 @@ struct __anonstruct___mpz_struct_1 { }; typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/not.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/not.res.oracle index 4a97d4b6fbf..4c3ac9bc979 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/not.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/not.res.oracle @@ -16,6 +16,109 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status valid __retres ∈ {0} x ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.1.res.oracle index aec6c5c837d..ab6c33e94b5 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.1.res.oracle @@ -15,6 +15,109 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status valid [value] Values at end of function main: __retres ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.res.oracle index aec6c5c837d..ab6c33e94b5 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.res.oracle @@ -15,6 +15,109 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status valid [value] Values at end of function main: __retres ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.1.res.oracle index 8db164854d3..1deb1f69c3c 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.1.res.oracle @@ -11,10 +11,12 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status valid PROJECT_FILE.i:240:[value] Assertion got status valid. [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:244. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:245. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -25,6 +27,7 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status unkno [value] Done for function e_acsl_assert [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:247. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear PROJECT_FILE.i:251:[value] Assertion got status valid. @@ -65,18 +68,109 @@ enum bool { false = 0, true = 1 }; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.res.oracle index 7c9a6c3c1cd..9f3ef2a8c53 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.res.oracle @@ -25,10 +25,113 @@ PROJECT_FILE.i:243:[value] Assertion got status valid. [value] Values at end of function main: __retres ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; enum bool { false = 0, true = 1 }; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.1.res.oracle index 1fefc463b8b..17573c0bd07 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.1.res.oracle @@ -18,6 +18,7 @@ tests/e-acsl-runtime/ptr.i:27:[e-acsl] warning: missing guard for ensuring that PROJECT_FILE.i:241:[value] Assertion got status valid. [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:246. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init_set_si <- main. @@ -25,6 +26,7 @@ PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:248. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -35,6 +37,7 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status unkno [value] Done for function e_acsl_assert [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:250. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_clear <- main. @@ -89,10 +92,12 @@ PROJECT_FILE.i:283:[value] Assertion got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init <- main. Called from PROJECT_FILE.i:298. +[value] using specification for function __gmpz_init PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. [value] Done for function __gmpz_init [value] computing for function __gmpz_mul <- main. Called from PROJECT_FILE.i:299. +[value] using specification for function __gmpz_mul PROJECT_FILE.i:145:[value] Function __gmpz_mul: precondition got status valid. PROJECT_FILE.i:146:[value] Function __gmpz_mul: precondition got status valid. PROJECT_FILE.i:147:[value] Function __gmpz_mul: precondition got status valid. @@ -116,12 +121,14 @@ PROJECT_FILE.i:304:[value] Assertion got status valid. [value] Done for function e_acsl_assert [value] computing for function __gmpz_tdiv_q <- main. Called from PROJECT_FILE.i:307. +[value] using specification for function __gmpz_tdiv_q PROJECT_FILE.i:151:[value] Function __gmpz_tdiv_q: precondition got status valid. PROJECT_FILE.i:152:[value] Function __gmpz_tdiv_q: precondition got status valid. PROJECT_FILE.i:153:[value] Function __gmpz_tdiv_q: precondition got status valid. [value] Done for function __gmpz_tdiv_q [value] computing for function __gmpz_get_ui <- main. Called from PROJECT_FILE.i:308. +[value] using specification for function __gmpz_get_ui PROJECT_FILE.i:180:[value] Function __gmpz_get_ui: precondition got status valid. [value] Done for function __gmpz_get_ui PROJECT_FILE.i:309:[kernel] warning: accessing out of bounds index [0..4294967295]. assert __e_acsl_9 < 3; @@ -178,6 +185,7 @@ PROJECT_FILE.i:331:[value] Assertion got status valid. [value] Done for function __gmpz_init [value] computing for function __gmpz_add <- main. Called from PROJECT_FILE.i:342. +[value] using specification for function __gmpz_add PROJECT_FILE.i:133:[value] Function __gmpz_add: precondition got status valid. PROJECT_FILE.i:134:[value] Function __gmpz_add: precondition got status valid. PROJECT_FILE.i:135:[value] Function __gmpz_add: precondition got status valid. @@ -213,6 +221,7 @@ PROJECT_FILE.i:352:[value] Assertion got status valid. [value] Done for function __gmpz_init [value] computing for function __gmpz_sub <- main. Called from PROJECT_FILE.i:365. +[value] using specification for function __gmpz_sub PROJECT_FILE.i:139:[value] Function __gmpz_sub: precondition got status valid. PROJECT_FILE.i:140:[value] Function __gmpz_sub: precondition got status valid. PROJECT_FILE.i:141:[value] Function __gmpz_sub: precondition got status valid. @@ -458,24 +467,64 @@ struct __anonstruct___mpz_struct_1 { typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); + allocates \nothing; assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); - assigns *z1; + allocates \nothing; + assigns *z1; + */ extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, @@ -483,7 +532,9 @@ extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); - assigns *z1; + allocates \nothing; + assigns *z1; + */ extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, @@ -491,7 +542,9 @@ extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); - assigns *z1; + allocates \nothing; + assigns *z1; + */ extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, @@ -499,12 +552,31 @@ extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); - assigns *z1; + allocates \nothing; + assigns *z1; + */ extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ requires \valid(z); + allocates \nothing; assigns \nothing; */ extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.res.oracle index 12003282f58..076fa27db94 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.res.oracle @@ -89,6 +89,109 @@ PROJECT_FILE.i:285:[value] Assertion got status valid. [2] ∈ {5} p ∈ {{ &t + {8} }} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/quantif.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/quantif.1.res.oracle index 798e024a66e..8a0d0d725d7 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/quantif.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/quantif.1.res.oracle @@ -5,19 +5,23 @@ PROJECT_FILE.i:233:[value] Assertion got status unknown. [value] computing for function __gmpz_init <- main. Called from PROJECT_FILE.i:238. +[value] using specification for function __gmpz_init PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. [value] Done for function __gmpz_init [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:241. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_set <- main. Called from PROJECT_FILE.i:242. +[value] using specification for function __gmpz_set PROJECT_FILE.i:94:[value] Function __gmpz_set: precondition got status valid. PROJECT_FILE.i:95:[value] Function __gmpz_set: precondition got status valid. [value] Done for function __gmpz_set [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:243. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear PROJECT_FILE.i:246:[value] entering loop for the first time @@ -26,6 +30,7 @@ PROJECT_FILE.i:246:[value] entering loop for the first time [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:251. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -62,6 +67,7 @@ PROJECT_FILE.i:268:[value] assigning non deterministic value for the first time [value] Done for function __gmpz_init [value] computing for function __gmpz_add <- main. Called from PROJECT_FILE.i:283. +[value] using specification for function __gmpz_add PROJECT_FILE.i:133:[value] Function __gmpz_add: precondition got status valid. PROJECT_FILE.i:134:[value] Function __gmpz_add: precondition got status valid. PROJECT_FILE.i:135:[value] Function __gmpz_add: precondition got status valid. @@ -511,6 +517,7 @@ PROJECT_FILE.i:689:[value] Assertion got status valid. [value] Done for function e_acsl_assert [value] computing for function __gmpz_tdiv_r <- main. Called from PROJECT_FILE.i:691. +[value] using specification for function __gmpz_tdiv_r PROJECT_FILE.i:157:[value] Function __gmpz_tdiv_r: precondition got status valid. PROJECT_FILE.i:158:[value] Function __gmpz_tdiv_r: precondition got status valid. PROJECT_FILE.i:159:[value] Function __gmpz_tdiv_r: precondition got status valid. @@ -577,6 +584,7 @@ PROJECT_FILE.i:717:[value] Assertion got status valid. [value] Done for function e_acsl_assert [value] computing for function __gmpz_tdiv_q <- main. Called from PROJECT_FILE.i:720. +[value] using specification for function __gmpz_tdiv_q PROJECT_FILE.i:151:[value] Function __gmpz_tdiv_q: precondition got status valid. PROJECT_FILE.i:152:[value] Function __gmpz_tdiv_q: precondition got status valid. PROJECT_FILE.i:153:[value] Function __gmpz_tdiv_q: precondition got status valid. @@ -610,6 +618,7 @@ PROJECT_FILE.i:153:[value] Function __gmpz_tdiv_q: precondition got status valid [value] Done for function __gmpz_clear [value] computing for function __gmpz_mul <- main. Called from PROJECT_FILE.i:735. +[value] using specification for function __gmpz_mul PROJECT_FILE.i:145:[value] Function __gmpz_mul: precondition got status valid. PROJECT_FILE.i:146:[value] Function __gmpz_mul: precondition got status valid. PROJECT_FILE.i:147:[value] Function __gmpz_mul: precondition got status valid. @@ -669,29 +678,66 @@ struct __anonstruct___mpz_struct_1 { typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); + allocates \nothing; assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); /*@ requires \valid(z_orig); requires \valid(z); - assigns *z; */ + allocates \nothing; + assigns *z; +*/ extern void __gmpz_set(__mpz_struct * /*[1]*/ z, __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); - assigns *z1; + allocates \nothing; + assigns *z1; + */ extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, @@ -701,13 +747,25 @@ extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, requires \valid(z3); assigns *z1; */ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + allocates \nothing; + assigns *z1; + +*/ extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); - assigns *z1; + allocates \nothing; + assigns *z1; + */ extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, @@ -715,11 +773,24 @@ extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); - assigns *z1; + allocates \nothing; + assigns *z1; + */ extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/quantif.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/quantif.res.oracle index de94afd00ac..6f90ee2cb0f 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/quantif.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/quantif.res.oracle @@ -115,6 +115,109 @@ PROJECT_FILE.i:409:[value] Assertion got status valid. [value] Values at end of function main: __retres ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.1.res.oracle index 1eabe282a15..f01ff012335 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.1.res.oracle @@ -8,6 +8,7 @@ tests/e-acsl-runtime/result.i:7:[e-acsl] warning: missing guard for ensuring tha Called from PROJECT_FILE.i:305. [value] computing for function __gmpz_init_set_si <- f <- main. Called from PROJECT_FILE.i:245. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init_set_si <- f <- main. @@ -15,16 +16,19 @@ PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init <- f <- main. Called from PROJECT_FILE.i:247. +[value] using specification for function __gmpz_init PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. [value] Done for function __gmpz_init [value] computing for function __gmpz_sub <- f <- main. Called from PROJECT_FILE.i:248. +[value] using specification for function __gmpz_sub PROJECT_FILE.i:139:[value] Function __gmpz_sub: precondition got status valid. PROJECT_FILE.i:140:[value] Function __gmpz_sub: precondition got status valid. PROJECT_FILE.i:141:[value] Function __gmpz_sub: precondition got status valid. [value] Done for function __gmpz_sub [value] computing for function __gmpz_get_ui <- f <- main. Called from PROJECT_FILE.i:249. +[value] using specification for function __gmpz_get_ui PROJECT_FILE.i:180:[value] Function __gmpz_get_ui: precondition got status valid. [value] Done for function __gmpz_get_ui [value] computing for function __gmpz_init_set_si <- f <- main. @@ -32,6 +36,7 @@ PROJECT_FILE.i:180:[value] Function __gmpz_get_ui: precondition got status valid [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- f <- main. Called from PROJECT_FILE.i:251. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -42,6 +47,7 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status unkno [value] Done for function e_acsl_assert [value] computing for function __gmpz_clear <- f <- main. Called from PROJECT_FILE.i:254. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_clear <- f <- main. @@ -129,29 +135,110 @@ struct __anonstruct___mpz_struct_1 { typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); + allocates \nothing; assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); assigns *z1; */ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + allocates \nothing; + assigns *z1; + +*/ extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ requires \valid(z); + allocates \nothing; assigns \nothing; */ extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.res.oracle index ce1128caba2..bb6f07a5fde 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.res.oracle @@ -45,6 +45,109 @@ PROJECT_FILE.i:251:[value] Function h: postcondition got status valid. [value] Values at end of function main: __retres ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.1.res.oracle index 61632acf3c0..a86fb6666f0 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.1.res.oracle @@ -5,6 +5,7 @@ PROJECT_FILE.i:235:[value] Assertion got status valid. [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:240. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init_set_si <- main. @@ -12,6 +13,7 @@ PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:242. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -22,6 +24,7 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status unkno [value] Done for function e_acsl_assert [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:245. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_clear <- main. @@ -62,18 +65,109 @@ struct __anonstruct___mpz_struct_1 { }; typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.res.oracle index 2b518ac5d9f..a5e581636b3 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.res.oracle @@ -21,6 +21,109 @@ PROJECT_FILE.i:238:[value] Assertion got status valid. __retres ∈ {0} x ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.1.res.oracle index 29d612138e1..0d645b4a265 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.1.res.oracle @@ -4,6 +4,7 @@ [value] Values of globals at initialization [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:243. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init_set_si <- main. @@ -11,6 +12,7 @@ PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:245. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -21,6 +23,7 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status unkno [value] Done for function e_acsl_assert [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:247. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_clear <- main. @@ -136,10 +139,12 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_init <- main. Called from PROJECT_FILE.i:344. +[value] using specification for function __gmpz_init PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. [value] Done for function __gmpz_init [value] computing for function __gmpz_add <- main. Called from PROJECT_FILE.i:345. +[value] using specification for function __gmpz_add PROJECT_FILE.i:133:[value] Function __gmpz_add: precondition got status valid. PROJECT_FILE.i:134:[value] Function __gmpz_add: precondition got status valid. PROJECT_FILE.i:135:[value] Function __gmpz_add: precondition got status valid. @@ -449,28 +454,111 @@ struct __anonstruct___mpz_struct_1 { typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(x)); + allocates \nothing; assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); assigns *z; assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + allocates \nothing; + assigns *z; + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); /*@ requires \valid(z1); requires \valid(z2); requires \valid(z3); - assigns *z1; + allocates \nothing; + assigns *z1; + */ extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2, __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.res.oracle index 3dcea3b26f4..b88df09198c 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.res.oracle @@ -84,6 +84,109 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status valid x ∈ {7} y ∈ {2} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.1.res.oracle index 33190956028..51e4462d8b0 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.1.res.oracle @@ -16,6 +16,109 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status valid __retres ∈ {0} x ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.res.oracle index 33190956028..51e4462d8b0 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.res.oracle @@ -16,6 +16,109 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status valid __retres ∈ {0} x ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.1.res.oracle index cf851039bd9..8449ee85fd0 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.1.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.1.res.oracle @@ -5,14 +5,17 @@ PROJECT_FILE.i:236:[value] Assertion got status valid. [value] computing for function __gmpz_init_set_ui <- main. Called from PROJECT_FILE.i:241. +[value] using specification for function __gmpz_init_set_ui PROJECT_FILE.i:78:[value] Function __gmpz_init_set_ui: postcondition got status valid. [value] Done for function __gmpz_init_set_ui [value] computing for function __gmpz_init_set_si <- main. Called from PROJECT_FILE.i:242. +[value] using specification for function __gmpz_init_set_si PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. [value] Done for function __gmpz_init_set_si [value] computing for function __gmpz_cmp <- main. Called from PROJECT_FILE.i:243. +[value] using specification for function __gmpz_cmp PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. [value] Done for function __gmpz_cmp @@ -23,6 +26,7 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status unkno [value] Done for function e_acsl_assert [value] computing for function __gmpz_clear <- main. Called from PROJECT_FILE.i:245. +[value] using specification for function __gmpz_clear PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function __gmpz_clear [value] computing for function __gmpz_clear <- main. @@ -44,22 +48,111 @@ struct __anonstruct___mpz_struct_1 { typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; typedef unsigned char uint8; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); /*@ ensures \valid(\old(z)); + allocates \nothing; assigns *z; - assigns *z \from n; */ + assigns *z \from n; +*/ extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); /*@ ensures \valid(\old(z)); + allocates \nothing; assigns *z; - assigns *z \from n; */ + assigns *z \from n; +*/ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); + allocates \nothing; assigns *x; */ extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); /*@ requires \valid(z1); requires \valid(z2); - assigns \nothing; */ + allocates \nothing; + assigns \nothing; + +*/ extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.res.oracle index c46b994892b..4f3305384f5 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.res.oracle @@ -16,7 +16,110 @@ PROJECT_FILE.i:221:[value] Function e_acsl_assert: precondition got status valid __retres ∈ {0} x ∈ {0} /* Generated by Frama-C */ +struct __anonstruct___mpz_struct_1 { + int _mp_alloc ; + int _mp_size ; + unsigned long *_mp_d ; +}; +typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef unsigned char uint8; +/*@ ensures \valid(\old(x)); + assigns *x; */ +extern void __gmpz_init(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z_orig); + ensures \valid(\old(z)); + assigns *z; */ +extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, + int base); +/*@ requires \valid(z_orig); + requires \valid(z); + assigns *z; */ +extern void __gmpz_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); +/*@ requires \valid(z); + assigns *z; + assigns *z \from n; */ +extern void __gmpz_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ requires \valid(z1); + requires \valid(z2); + assigns *z1; */ +extern int __gmpz_com(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z); + assigns \nothing; */ +extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); +/*@ requires \valid(z); + assigns \nothing; */ +extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/other_constants.i b/src/plugins/e-acsl/tests/e-acsl-runtime/other_constants.i index 53506aef6a1..b26c6e51ea5 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/other_constants.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/other_constants.i @@ -1,7 +1,7 @@ /* run.config COMMENT: non integer constants - EXECNOW: LOG gen_other_constants.c BIN gen_other_constants.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/other_constants.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_other_constants.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_other_constants.out ./tests/e-acsl-runtime/result/gen_other_constants.c -lgmp && ./tests/e-acsl-runtime/result/gen_other_constants.out - EXECNOW: LOG gen_other_constants2.c BIN gen_other_constants2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/other_constants.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_other_constants2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_other_constants2.out ./tests/e-acsl-runtime/result/gen_other_constants2.c -lgmp && ./tests/e-acsl-runtime/result/gen_other_constants2.out + EXECNOW: LOG gen_other_constants.c BIN gen_other_constants.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/other_constants.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_other_constants.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_other_constants.out ./tests/e-acsl-runtime/result/gen_other_constants.c -lgmp && ./tests/e-acsl-runtime/result/gen_other_constants.out + EXECNOW: LOG gen_other_constants2.c BIN gen_other_constants2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/other_constants.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_other_constants2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_other_constants2.out ./tests/e-acsl-runtime/result/gen_other_constants2.c -lgmp && ./tests/e-acsl-runtime/result/gen_other_constants2.out */ enum bool { false, true }; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/ptr.i b/src/plugins/e-acsl/tests/e-acsl-runtime/ptr.i index bbeded7a8bf..48b5eba57b8 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/ptr.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/ptr.i @@ -1,7 +1,7 @@ /* run.config COMMENT: pointers and pointer arithmetic - EXECNOW: LOG gen_ptr.c BIN gen_ptr.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/ptr.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_ptr.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_ptr.out ./tests/e-acsl-runtime/result/gen_ptr.c -lgmp && ./tests/e-acsl-runtime/result/gen_ptr.out - EXECNOW: LOG gen_ptr2.c BIN gen_ptr2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/ptr.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_ptr2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_ptr2.out ./tests/e-acsl-runtime/result/gen_ptr2.c -lgmp && ./tests/e-acsl-runtime/result/gen_ptr2.out + EXECNOW: LOG gen_ptr.c BIN gen_ptr.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/ptr.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_ptr.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_ptr.out ./tests/e-acsl-runtime/result/gen_ptr.c -lgmp && ./tests/e-acsl-runtime/result/gen_ptr.out + EXECNOW: LOG gen_ptr2.c BIN gen_ptr2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/ptr.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_ptr2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_ptr2.out ./tests/e-acsl-runtime/result/gen_ptr2.c -lgmp && ./tests/e-acsl-runtime/result/gen_ptr2.out */ int main(void) { diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/quantif.i b/src/plugins/e-acsl/tests/e-acsl-runtime/quantif.i index bff75f39b04..466552b8ae8 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/quantif.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/quantif.i @@ -1,7 +1,7 @@ /* run.config COMMENT: quantifiers - EXECNOW: LOG gen_quantif.c BIN gen_quantif.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/quantif.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_quantif.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_quantif.out ./tests/e-acsl-runtime/result/gen_quantif.c -lgmp && ./tests/e-acsl-runtime/result/gen_quantif.out - EXECNOW: LOG gen_quantif2.c BIN gen_quantif2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/quantif.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_quantif2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_quantif2.out ./tests/e-acsl-runtime/result/gen_quantif2.c -lgmp && ./tests/e-acsl-runtime/result/gen_quantif2.out + EXECNOW: LOG gen_quantif.c BIN gen_quantif.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/quantif.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_quantif.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_quantif.out ./tests/e-acsl-runtime/result/gen_quantif.c -lgmp && ./tests/e-acsl-runtime/result/gen_quantif.out + EXECNOW: LOG gen_quantif2.c BIN gen_quantif2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/quantif.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_quantif2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_quantif2.out ./tests/e-acsl-runtime/result/gen_quantif2.c -lgmp && ./tests/e-acsl-runtime/result/gen_quantif2.out */ int main(void) { diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/result.i b/src/plugins/e-acsl/tests/e-acsl-runtime/result.i index b90f3b93ebc..d160c8b00bd 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/result.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/result.i @@ -1,7 +1,7 @@ /* run.config COMMENT: \result - EXECNOW: LOG gen_result.c BIN gen_result.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/result.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_result.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_result.out ./tests/e-acsl-runtime/result/gen_result.c -lgmp && ./tests/e-acsl-runtime/result/gen_result.out - EXECNOW: LOG gen_result2.c BIN gen_result2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/result.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_result2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_result2.out ./tests/e-acsl-runtime/result/gen_result2.c -lgmp && ./tests/e-acsl-runtime/result/gen_result2.out + EXECNOW: LOG gen_result.c BIN gen_result.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/result.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_result.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_result.out ./tests/e-acsl-runtime/result/gen_result.c -lgmp && ./tests/e-acsl-runtime/result/gen_result.out + EXECNOW: LOG gen_result2.c BIN gen_result2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/result.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_result2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_result2.out ./tests/e-acsl-runtime/result/gen_result2.c -lgmp && ./tests/e-acsl-runtime/result/gen_result2.out */ /*@ ensures \result == (int)(x - x); */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/sizeof.i b/src/plugins/e-acsl/tests/e-acsl-runtime/sizeof.i index 31c48a7c5ff..f1846fc53e1 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/sizeof.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/sizeof.i @@ -1,7 +1,7 @@ /* run.config COMMENT: sizeof - EXECNOW: LOG gen_sizeof.c BIN gen_sizeof.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/sizeof.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_sizeof.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_sizeof.out ./tests/e-acsl-runtime/result/gen_sizeof.c -lgmp && ./tests/e-acsl-runtime/result/gen_sizeof.out - EXECNOW: LOG gen_sizeof2.c BIN gen_sizeof2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/sizeof.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_sizeof2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_sizeof2.out ./tests/e-acsl-runtime/result/gen_sizeof2.c -lgmp && ./tests/e-acsl-runtime/result/gen_sizeof2.out + EXECNOW: LOG gen_sizeof.c BIN gen_sizeof.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/sizeof.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_sizeof.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_sizeof.out ./tests/e-acsl-runtime/result/gen_sizeof.c -lgmp && ./tests/e-acsl-runtime/result/gen_sizeof.out + EXECNOW: LOG gen_sizeof2.c BIN gen_sizeof2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/sizeof.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_sizeof2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_sizeof2.out ./tests/e-acsl-runtime/result/gen_sizeof2.c -lgmp && ./tests/e-acsl-runtime/result/gen_sizeof2.out */ int main(void) { diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/stmt_contract.i b/src/plugins/e-acsl/tests/e-acsl-runtime/stmt_contract.i index 80339ee75da..28095ad4514 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/stmt_contract.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/stmt_contract.i @@ -1,7 +1,7 @@ /* run.config COMMENT: stmt contract - EXECNOW: LOG gen_stmt_contract.c BIN gen_stmt_contract.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/stmt_contract.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_stmt_contract.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_stmt_contract.out ./tests/e-acsl-runtime/result/gen_stmt_contract.c -lgmp && ./tests/e-acsl-runtime/result/gen_stmt_contract.out - EXECNOW: LOG gen_stmt_contract2.c BIN gen_stmt_contract2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/stmt_contract.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_stmt_contract2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_stmt_contract2.out ./tests/e-acsl-runtime/result/gen_stmt_contract2.c -lgmp && ./tests/e-acsl-runtime/result/gen_stmt_contract2.out + EXECNOW: LOG gen_stmt_contract.c BIN gen_stmt_contract.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/stmt_contract.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_stmt_contract.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_stmt_contract.out ./tests/e-acsl-runtime/result/gen_stmt_contract.c -lgmp && ./tests/e-acsl-runtime/result/gen_stmt_contract.out + EXECNOW: LOG gen_stmt_contract2.c BIN gen_stmt_contract2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/stmt_contract.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_stmt_contract2.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_stmt_contract2.out ./tests/e-acsl-runtime/result/gen_stmt_contract2.c -lgmp && ./tests/e-acsl-runtime/result/gen_stmt_contract2.out */ int main(void) { int x = 0, y = 2; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/true.i b/src/plugins/e-acsl/tests/e-acsl-runtime/true.i index 266b8915cd3..e265bc72c00 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/true.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/true.i @@ -1,7 +1,7 @@ /* run.config COMMENT: assert \true - EXECNOW: LOG gen_true.c BIN gen_true.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/true.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_true.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_true.out ./tests/e-acsl-runtime/result/gen_true.c && ./tests/e-acsl-runtime/result/gen_true.out - EXECNOW: LOG gen_true2.c BIN gen_true2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/true.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_true2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_true2.out ./tests/e-acsl-runtime/result/gen_true2.c && ./tests/e-acsl-runtime/result/gen_true2.out + EXECNOW: LOG gen_true.c BIN gen_true.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/true.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_true.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_true.out ./tests/e-acsl-runtime/result/gen_true.c && ./tests/e-acsl-runtime/result/gen_true.out + EXECNOW: LOG gen_true2.c BIN gen_true2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/true.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_true2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_true2.out ./tests/e-acsl-runtime/result/gen_true2.c && ./tests/e-acsl-runtime/result/gen_true2.out */ int main(void) { int x = 0; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/typedef.i b/src/plugins/e-acsl/tests/e-acsl-runtime/typedef.i index 096dd94d635..e1b344d879a 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/typedef.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/typedef.i @@ -1,7 +1,7 @@ /* run.config COMMENT: typedef (from a Bernard's bug report) - EXECNOW: LOG gen_typedef.c BIN gen_typedef.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/typedef.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_typedef.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_typedef.out ./tests/e-acsl-runtime/result/gen_typedef.c -lgmp && ./tests/e-acsl-runtime/result/gen_typedef.out - EXECNOW: LOG gen_typedef2.c BIN gen_typedef2.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/typedef.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_typedef2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_typedef2.out ./tests/e-acsl-runtime/result/gen_typedef2.c -lgmp && ./tests/e-acsl-runtime/result/gen_typedef2.out + EXECNOW: LOG gen_typedef.c BIN gen_typedef.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/typedef.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_typedef.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_typedef.out ./tests/e-acsl-runtime/result/gen_typedef.c -lgmp && ./tests/e-acsl-runtime/result/gen_typedef.out + EXECNOW: LOG gen_typedef2.c BIN gen_typedef2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/typedef.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_typedef2.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_typedef2.out ./tests/e-acsl-runtime/result/gen_typedef2.c -lgmp && ./tests/e-acsl-runtime/result/gen_typedef2.out */ typedef unsigned char uint8; diff --git a/src/plugins/e-acsl/tests/test_config.in b/src/plugins/e-acsl/tests/test_config.in index ce1cb611b7a..febb6081e03 100644 --- a/src/plugins/e-acsl/tests/test_config.in +++ b/src/plugins/e-acsl/tests/test_config.in @@ -1,3 +1,3 @@ -CMD: FRAMAC_SHARE=./share @frama-c@ -cpp-command="gcc -C -E -I${FRAMAC_SHARE}" +CMD: @frama-c@ -e-acsl-share ./share/e-ascl -cpp-command="gcc -C -E -I${FRAMAC_SHARE}" OPT: -e-acsl-check -FILTER:@SEDCMD@ -e "s|${FRAMAC_SHARE}|FRAMAC_SHARE|g" -e "s|[a-zA-Z/\\]\+frama_c_project_e-acsl_[a-z0-9]*|PROJECT_FILE|" +FILTER:@SEDCMD@ -e "s|[a-zA-Z/\\]\+frama_c_project_e-acsl_[a-z0-9]*|PROJECT_FILE|" diff --git a/src/plugins/e-acsl/typing.ml b/src/plugins/e-acsl/typing.ml index 1384ff91496..8a393c7d64e 100644 --- a/src/plugins/e-acsl/typing.ml +++ b/src/plugins/e-acsl/typing.ml @@ -254,6 +254,7 @@ let rec type_term t = (try join ty2 ty3 with Cannot_compare -> assert false) | Tat(t, _) -> type_term t | Tbase_addr _ -> Error.not_yet "\\base_addr" + | Toffset _ -> Error.not_yet "\\offset" | Tblock_length _ -> Error.not_yet "\\block_length" | Tnull -> int_to_interv 0 | TCoerce _ -> Error.not_yet "coercion" (* Jessie specific *) @@ -301,6 +302,7 @@ and type_term_offset = function | TIndex(t, o) -> ignore (type_term t); type_term_offset o + | TModel _ -> Error.not_yet "model" and unary_arithmetic op t = let ty = type_term t in @@ -384,6 +386,9 @@ let rec type_predicate_named p = match p.content with | Pexists _ -> Error.not_yet "unguarded \\exists quantification" | Pat(p, _) -> type_predicate_named p | Pvalid _ -> Error.not_yet "\\valid" + | Pvalid_read _ -> Error.not_yet "\\valid_read" + | Pallocable _ -> Error.not_yet "\\allocate" + | Pfreeable _ -> Error.not_yet "\\free" | Pfresh _ -> Error.not_yet "\\fresh" | Psubtype _ -> Error.not_yet "subtyping relation" (* Jessie specific *) | Pinitialized _ -> Error.not_yet "\\initialized" diff --git a/src/plugins/e-acsl/visit.ml b/src/plugins/e-acsl/visit.ml index c520bdf5806..d3826d9bbaa 100644 --- a/src/plugins/e-acsl/visit.ml +++ b/src/plugins/e-acsl/visit.ml @@ -130,6 +130,7 @@ and toffset_to_offset ?loc env = function d_term t; let offset, env = toffset_to_offset env offset in Index(e, offset), env + | TModel _ -> Error.not_yet "model" and tlval_to_lval env (host, offset) = let host, env, name = thost_to_host env host in @@ -321,6 +322,7 @@ and context_insensitive_term_to_exp env t = let e, env, is_mpz_string = at_to_exp env (Some t) label e in e, env, is_mpz_string, "" | Tbase_addr _ -> Error.not_yet "\\base_addr" + | Toffset _ -> Error.not_yet "\\offset" | Tblock_length _ -> Error.not_yet "\\block_length" | Tnull -> mkCast (zero ~loc) (TPtr(TVoid [], [])), env, false, "null" | TCoerce _ -> Error.not_yet "coercion" (* Jessie specific *) @@ -477,6 +479,9 @@ let rec named_predicate_to_exp ?name env p = assert (not is_string); e, env | Pvalid _ -> Error.not_yet "\\valid" + | Pvalid_read _ -> Error.not_yet "\\valid_read" + | Pallocable _ -> Error.not_yet "\\allocate" + | Pfreeable _ -> Error.not_yet "\\free" | Pfresh _ -> Error.not_yet "\\fresh" | Psubtype _ -> Error.not_yet "subtyping relation" (* Jessie specific *) | Pinitialized _ -> Error.not_yet "\\initialized" -- GitLab