From 27658644e193620fecf8d2f34d07517e0d9abacf Mon Sep 17 00:00:00 2001 From: Julien Signoles <julien.signoles@cea.fr> Date: Mon, 8 Feb 2016 14:01:04 +0100 Subject: [PATCH] [tests] remove useless GMP tests --- src/plugins/e-acsl/.gitignore | 2 + .../e-acsl/tests/e-acsl-runtime/addrOf.i | 2 +- .../e-acsl/tests/e-acsl-runtime/alias.i | 2 +- .../e-acsl/tests/e-acsl-runtime/call.c | 2 +- .../e-acsl-runtime/compound_initializers.c | 2 +- .../e-acsl/tests/e-acsl-runtime/empty.i | 1 - .../e-acsl/tests/e-acsl-runtime/false.i | 2 +- .../e-acsl/tests/e-acsl-runtime/freeable.c | 2 +- .../tests/e-acsl-runtime/function_contract.i | 2 +- .../e-acsl/tests/e-acsl-runtime/ghost.i | 2 +- .../e-acsl/tests/e-acsl-runtime/init.c | 2 +- .../e-acsl/tests/e-acsl-runtime/invariant.i | 2 +- .../tests/e-acsl-runtime/labeled_stmt.i | 2 +- .../e-acsl/tests/e-acsl-runtime/lazy.i | 2 +- .../tests/e-acsl-runtime/linear_search.i | 2 +- .../tests/e-acsl-runtime/literal_string.i | 2 +- .../e-acsl/tests/e-acsl-runtime/localvar.c | 4 +- .../e-acsl/tests/e-acsl-runtime/loop.i | 2 +- .../e-acsl/tests/e-acsl-runtime/mainargs.c | 2 +- .../e-acsl/tests/e-acsl-runtime/memsize.c | 2 +- .../tests/e-acsl-runtime/nested_code_annot.i | 2 +- .../e-acsl/tests/e-acsl-runtime/null.i | 2 +- .../e-acsl-runtime/oracle/addrOf.1.res.oracle | 20 - ...{addrOf.0.err.oracle => addrOf.err.oracle} | 0 ...{addrOf.0.res.oracle => addrOf.res.oracle} | 0 .../e-acsl-runtime/oracle/alias.1.res.oracle | 21 - .../{addrOf.1.err.oracle => alias.err.oracle} | 0 .../{alias.0.res.oracle => alias.res.oracle} | 0 .../e-acsl-runtime/oracle/call.1.res.oracle | 34 - .../{alias.0.err.oracle => call.err.oracle} | 0 .../{call.0.res.oracle => call.res.oracle} | 0 .../oracle/compound_initializers.1.res.oracle | 43 - ...racle => compound_initializers.err.oracle} | 0 ...racle => compound_initializers.res.oracle} | 0 .../e-acsl-runtime/oracle/empty.1.res.oracle | 48 -- .../{call.0.err.oracle => empty.err.oracle} | 0 .../{empty.0.res.oracle => empty.res.oracle} | 0 .../e-acsl-runtime/oracle/false.1.res.oracle | 13 - .../{call.1.err.oracle => false.err.oracle} | 0 .../{false.0.res.oracle => false.res.oracle} | 0 .../oracle/freeable.1.res.oracle | 31 - ...izers.0.err.oracle => freeable.err.oracle} | 0 ...eable.0.res.oracle => freeable.res.oracle} | 0 .../oracle/function_contract.1.res.oracle | 22 - ...rr.oracle => function_contract.err.oracle} | 0 ...es.oracle => function_contract.res.oracle} | 0 .../tests/e-acsl-runtime/oracle/gen_addrOf2.c | 108 --- .../tests/e-acsl-runtime/oracle/gen_alias2.c | 104 --- .../tests/e-acsl-runtime/oracle/gen_call2.c | 162 ---- .../oracle/gen_compound_initializers2.c | 288 ------- .../tests/e-acsl-runtime/oracle/gen_false2.c | 54 -- .../e-acsl-runtime/oracle/gen_freeable2.c | 188 ----- .../oracle/gen_function_contract2.c | 779 ------------------ .../tests/e-acsl-runtime/oracle/gen_ghost2.c | 155 ---- .../tests/e-acsl-runtime/oracle/gen_init2.c | 116 --- .../e-acsl-runtime/oracle/gen_invariant2.c | 124 --- .../e-acsl-runtime/oracle/gen_labeled_stmt2.c | 148 ---- .../tests/e-acsl-runtime/oracle/gen_lazy2.c | 755 ----------------- .../oracle/gen_linear_search2.c | 573 ------------- .../oracle/gen_literal_string2.c | 229 ----- .../e-acsl-runtime/oracle/gen_localvar2.c | 164 ---- .../tests/e-acsl-runtime/oracle/gen_loop2.c | 580 ------------- .../e-acsl-runtime/oracle/gen_mainargs2.c | 676 --------------- .../e-acsl-runtime/oracle/gen_memsize2.c | 490 ----------- .../oracle/gen_nested_code_annot2.c | 188 ----- .../tests/e-acsl-runtime/oracle/gen_null2.c | 52 -- .../oracle/gen_other_constants2.c | 101 --- .../tests/e-acsl-runtime/oracle/gen_ptr2.c | 352 -------- .../e-acsl-runtime/oracle/gen_ptr_init2.c | 162 ---- .../tests/e-acsl-runtime/oracle/gen_result2.c | 197 ----- .../tests/e-acsl-runtime/oracle/gen_sizeof2.c | 89 -- .../tests/e-acsl-runtime/oracle/gen_stdout2.c | 159 ---- .../oracle/gen_stmt_contract2.c | 423 ---------- .../tests/e-acsl-runtime/oracle/gen_true2.c | 54 -- .../e-acsl-runtime/oracle/gen_typedef2.c | 99 --- .../tests/e-acsl-runtime/oracle/gen_valid2.c | 614 -------------- .../e-acsl-runtime/oracle/gen_valid_alias2.c | 303 ------- .../oracle/gen_valid_in_contract2.c | 196 ----- .../tests/e-acsl-runtime/oracle/gen_vector2.c | 249 ------ .../e-acsl-runtime/oracle/ghost.1.res.oracle | 27 - .../{empty.0.err.oracle => ghost.err.oracle} | 0 .../{ghost.0.res.oracle => ghost.res.oracle} | 0 .../e-acsl-runtime/oracle/init.1.res.oracle | 22 - .../{empty.1.err.oracle => init.err.oracle} | 0 .../{init.0.res.oracle => init.res.oracle} | 0 .../oracle/invariant.1.res.oracle | 21 - ...alse.0.err.oracle => invariant.err.oracle} | 0 ...iant.0.res.oracle => invariant.res.oracle} | 0 .../oracle/labeled_stmt.1.res.oracle | 19 - ...e.1.err.oracle => labeled_stmt.err.oracle} | 0 ...t.0.res.oracle => labeled_stmt.res.oracle} | 0 .../e-acsl-runtime/oracle/lazy.1.res.oracle | 26 - ...{freeable.0.err.oracle => lazy.err.oracle} | 0 .../{lazy.0.res.oracle => lazy.res.oracle} | 0 .../oracle/linear_search.1.res.oracle | 44 - ....1.err.oracle => linear_search.err.oracle} | 0 ....0.res.oracle => linear_search.res.oracle} | 0 .../oracle/literal_string.1.res.oracle | 37 - ...0.err.oracle => literal_string.err.oracle} | 0 ...0.res.oracle => literal_string.res.oracle} | 0 .../oracle/localvar.1.res.oracle | 35 - ...tract.1.err.oracle => localvar.err.oracle} | 0 ...alvar.0.res.oracle => localvar.res.oracle} | 0 .../e-acsl-runtime/oracle/loop.1.res.oracle | 37 - .../{ghost.0.err.oracle => loop.err.oracle} | 0 .../{loop.0.res.oracle => loop.res.oracle} | 0 .../oracle/mainargs.1.err.oracle | 0 .../oracle/mainargs.1.res.oracle | 57 -- ...ghost.1.err.oracle => mainargs.err.oracle} | 0 ...nargs.0.res.oracle => mainargs.res.oracle} | 0 .../oracle/memsize.0.err.oracle | 0 .../oracle/memsize.1.err.oracle | 0 .../oracle/memsize.1.res.oracle | 56 -- .../{init.0.err.oracle => memsize.err.oracle} | 0 ...emsize.0.res.oracle => memsize.res.oracle} | 0 .../oracle/nested_code_annot.0.err.oracle | 0 .../oracle/nested_code_annot.1.err.oracle | 0 .../oracle/nested_code_annot.1.res.oracle | 18 - ...rr.oracle => nested_code_annot.err.oracle} | 0 ...es.oracle => nested_code_annot.res.oracle} | 0 .../e-acsl-runtime/oracle/null.0.err.oracle | 0 .../e-acsl-runtime/oracle/null.1.err.oracle | 0 ...invariant.0.err.oracle => null.err.oracle} | 0 .../{null.0.res.oracle => null.res.oracle} | 0 .../oracle/other_constants.0.err.oracle | 0 .../oracle/other_constants.1.err.oracle | 0 .../oracle/other_constants.1.res.oracle | 18 - ....err.oracle => other_constants.err.oracle} | 0 ....res.oracle => other_constants.res.oracle} | 0 .../e-acsl-runtime/oracle/ptr.0.err.oracle | 0 .../e-acsl-runtime/oracle/ptr.1.err.oracle | 0 .../e-acsl-runtime/oracle/ptr.1.res.oracle | 35 - ...beled_stmt.0.err.oracle => ptr.err.oracle} | 0 .../{ptr.0.res.oracle => ptr.res.oracle} | 0 .../oracle/ptr_init.0.err.oracle | 0 .../oracle/ptr_init.1.err.oracle | 0 .../oracle/ptr_init.1.res.oracle | 34 - ..._stmt.1.err.oracle => ptr_init.err.oracle} | 0 ..._init.0.res.oracle => ptr_init.res.oracle} | 0 .../e-acsl-runtime/oracle/result.0.err.oracle | 0 .../e-acsl-runtime/oracle/result.1.err.oracle | 0 .../e-acsl-runtime/oracle/result.1.res.oracle | 22 - .../{lazy.0.err.oracle => result.err.oracle} | 0 ...{result.0.res.oracle => result.res.oracle} | 0 .../e-acsl-runtime/oracle/sizeof.0.err.oracle | 0 .../e-acsl-runtime/oracle/sizeof.1.err.oracle | 0 .../e-acsl-runtime/oracle/sizeof.1.res.oracle | 18 - .../{lazy.1.err.oracle => sizeof.err.oracle} | 0 ...nstants.0.res.oracle => sizeof.res.oracle} | 0 .../e-acsl-runtime/oracle/stdout.0.err.oracle | 0 .../e-acsl-runtime/oracle/stdout.1.err.oracle | 0 .../e-acsl-runtime/oracle/stdout.1.res.oracle | 55 -- ..._search.0.err.oracle => stdout.err.oracle} | 0 ...{stdout.0.res.oracle => stdout.res.oracle} | 0 .../oracle/stmt_contract.0.err.oracle | 0 .../oracle/stmt_contract.1.err.oracle | 0 .../oracle/stmt_contract.1.res.oracle | 20 - ....1.err.oracle => stmt_contract.err.oracle} | 0 ....0.res.oracle => stmt_contract.res.oracle} | 0 .../e-acsl-runtime/oracle/true.0.err.oracle | 0 .../e-acsl-runtime/oracle/true.1.err.oracle | 0 .../e-acsl-runtime/oracle/true.1.res.oracle | 14 - ...al_string.0.err.oracle => true.err.oracle} | 0 ..._contract.0.res.oracle => true.res.oracle} | 0 .../oracle/typedef.0.err.oracle | 0 .../oracle/typedef.0.res.oracle | 14 - .../oracle/typedef.1.err.oracle | 0 .../oracle/typedef.1.res.oracle | 19 - ...string.1.err.oracle => typedef.err.oracle} | 0 .../{true.0.res.oracle => typedef.res.oracle} | 0 .../e-acsl-runtime/oracle/valid.0.err.oracle | 0 .../e-acsl-runtime/oracle/valid.1.err.oracle | 0 .../e-acsl-runtime/oracle/valid.1.res.oracle | 52 -- ...localvar.0.err.oracle => valid.err.oracle} | 0 .../{valid.0.res.oracle => valid.res.oracle} | 0 .../oracle/valid_alias.0.err.oracle | 0 .../oracle/valid_alias.1.err.oracle | 0 .../oracle/valid_alias.1.res.oracle | 57 -- ...ar.1.err.oracle => valid_alias.err.oracle} | 0 ...as.0.res.oracle => valid_alias.res.oracle} | 0 .../oracle/valid_in_contract.0.err.oracle | 0 .../oracle/valid_in_contract.1.err.oracle | 0 .../oracle/valid_in_contract.1.res.oracle | 25 - ...rr.oracle => valid_in_contract.err.oracle} | 0 ...es.oracle => valid_in_contract.res.oracle} | 0 .../e-acsl-runtime/oracle/vector.0.err.oracle | 0 .../e-acsl-runtime/oracle/vector.1.err.oracle | 0 .../e-acsl-runtime/oracle/vector.1.res.oracle | 53 -- .../{loop.1.err.oracle => vector.err.oracle} | 0 ...{vector.0.res.oracle => vector.res.oracle} | 0 .../tests/e-acsl-runtime/other_constants.i | 2 +- src/plugins/e-acsl/tests/e-acsl-runtime/ptr.i | 2 +- .../e-acsl/tests/e-acsl-runtime/ptr_init.c | 2 +- .../e-acsl/tests/e-acsl-runtime/result.i | 2 +- .../e-acsl/tests/e-acsl-runtime/sizeof.i | 2 +- .../e-acsl/tests/e-acsl-runtime/stdout.c | 2 +- .../tests/e-acsl-runtime/stmt_contract.i | 2 +- .../e-acsl/tests/e-acsl-runtime/test_config | 1 - .../e-acsl/tests/e-acsl-runtime/true.i | 2 +- .../e-acsl/tests/e-acsl-runtime/typedef.i | 2 +- .../e-acsl/tests/e-acsl-runtime/valid.c | 2 +- .../e-acsl/tests/e-acsl-runtime/valid_alias.c | 4 +- .../tests/e-acsl-runtime/valid_in_contract.c | 4 +- .../e-acsl/tests/e-acsl-runtime/vector.c | 4 +- .../result/.gitkeep} | 0 205 files changed, 39 insertions(+), 10037 deletions(-) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{addrOf.0.err.oracle => addrOf.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{addrOf.0.res.oracle => addrOf.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/alias.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{addrOf.1.err.oracle => alias.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{alias.0.res.oracle => alias.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/call.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{alias.0.err.oracle => call.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{call.0.res.oracle => call.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/compound_initializers.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{alias.1.err.oracle => compound_initializers.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{compound_initializers.0.res.oracle => compound_initializers.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/empty.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{call.0.err.oracle => empty.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{empty.0.res.oracle => empty.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{call.1.err.oracle => false.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{false.0.res.oracle => false.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/freeable.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{compound_initializers.0.err.oracle => freeable.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{freeable.0.res.oracle => freeable.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{compound_initializers.1.err.oracle => function_contract.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{function_contract.0.res.oracle => function_contract.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_addrOf2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_alias2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_call2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_compound_initializers2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_false2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_freeable2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_function_contract2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ghost2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_init2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_invariant2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_labeled_stmt2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_lazy2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_linear_search2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_literal_string2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_localvar2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_loop2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_mainargs2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_memsize2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_nested_code_annot2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_null2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_other_constants2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr_init2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_result2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_sizeof2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stdout2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stmt_contract2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_true2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_typedef2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_valid2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_valid_alias2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_valid_in_contract2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_vector2.c delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ghost.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{empty.0.err.oracle => ghost.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{ghost.0.res.oracle => ghost.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/init.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{empty.1.err.oracle => init.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{init.0.res.oracle => init.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{false.0.err.oracle => invariant.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{invariant.0.res.oracle => invariant.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{false.1.err.oracle => labeled_stmt.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{labeled_stmt.0.res.oracle => labeled_stmt.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{freeable.0.err.oracle => lazy.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{lazy.0.res.oracle => lazy.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{freeable.1.err.oracle => linear_search.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{linear_search.0.res.oracle => linear_search.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/literal_string.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{function_contract.0.err.oracle => literal_string.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{literal_string.0.res.oracle => literal_string.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/localvar.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{function_contract.1.err.oracle => localvar.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{localvar.0.res.oracle => localvar.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/loop.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{ghost.0.err.oracle => loop.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{loop.0.res.oracle => loop.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/mainargs.1.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/mainargs.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{ghost.1.err.oracle => mainargs.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{mainargs.0.res.oracle => mainargs.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/memsize.0.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/memsize.1.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/memsize.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{init.0.err.oracle => memsize.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{memsize.0.res.oracle => memsize.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.0.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.1.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{init.1.err.oracle => nested_code_annot.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{nested_code_annot.0.res.oracle => nested_code_annot.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.0.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.1.err.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{invariant.0.err.oracle => null.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{null.0.res.oracle => null.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.0.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.1.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{invariant.1.err.oracle => other_constants.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{null.1.res.oracle => other_constants.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.0.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.1.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{labeled_stmt.0.err.oracle => ptr.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{ptr.0.res.oracle => ptr.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr_init.0.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr_init.1.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr_init.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{labeled_stmt.1.err.oracle => ptr_init.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{ptr_init.0.res.oracle => ptr_init.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.0.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.1.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{lazy.0.err.oracle => result.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{result.0.res.oracle => result.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.0.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.1.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{lazy.1.err.oracle => sizeof.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{other_constants.0.res.oracle => sizeof.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stdout.0.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stdout.1.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stdout.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{linear_search.0.err.oracle => stdout.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{stdout.0.res.oracle => stdout.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.0.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.1.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{linear_search.1.err.oracle => stmt_contract.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{sizeof.0.res.oracle => stmt_contract.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.0.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.1.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{literal_string.0.err.oracle => true.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{stmt_contract.0.res.oracle => true.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.0.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.0.res.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.1.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{literal_string.1.err.oracle => typedef.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{true.0.res.oracle => typedef.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid.0.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid.1.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{localvar.0.err.oracle => valid.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{valid.0.res.oracle => valid.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_alias.0.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_alias.1.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_alias.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{localvar.1.err.oracle => valid_alias.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{valid_alias.0.res.oracle => valid_alias.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_in_contract.0.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_in_contract.1.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_in_contract.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{loop.0.err.oracle => valid_in_contract.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{valid_in_contract.0.res.oracle => valid_in_contract.res.oracle} (100%) delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/vector.0.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/vector.1.err.oracle delete mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/vector.1.res.oracle rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{loop.1.err.oracle => vector.err.oracle} (100%) rename src/plugins/e-acsl/tests/e-acsl-runtime/oracle/{vector.0.res.oracle => vector.res.oracle} (100%) rename src/plugins/e-acsl/tests/{e-acsl-runtime/oracle/mainargs.0.err.oracle => gmp/result/.gitkeep} (100%) diff --git a/src/plugins/e-acsl/.gitignore b/src/plugins/e-acsl/.gitignore index 88f271c1bfa..119c34a25fd 100644 --- a/src/plugins/e-acsl/.gitignore +++ b/src/plugins/e-acsl/.gitignore @@ -75,6 +75,8 @@ /tests/e-acsl-reject/result/*_DEP /tests/e-acsl-reject/result/*.log /tests/bts/result/* +/tests/gmp/result/*.log +/tests/gmp/result/gen*.c /tests/check/obj/* .frama-c tests/ptests_config 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 d3b99cab2ba..cff0d54c18d 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 COMMENT: no diff - 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_runtime.sh addrOf2 + COMMENT: no diff */ void f(){ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/alias.i b/src/plugins/e-acsl/tests/e-acsl-runtime/alias.i index f0e62abe25d..1542f9cb290 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/alias.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/alias.i @@ -1,7 +1,7 @@ /* run.config COMMENT: alias COMMENT: no diff - EXECNOW: LOG gen_alias2.c BIN gen_alias2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/alias.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_alias2.c > /dev/null && ./gcc_runtime.sh alias2 + COMMENT: no diff */ void f(int* dest, int val) diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/call.c b/src/plugins/e-acsl/tests/e-acsl-runtime/call.c index 0d4fe90d0cd..9f76ef1c383 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/call.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/call.c @@ -2,7 +2,7 @@ COMMENT: function call STDOPT: +"-val-builtin __malloc:Frama_C_alloc_size -val-builtin __free:Frama_C_free" COMMENT: no diff - EXECNOW: LOG gen_call2.c BIN gen_call2.out @frama-c@ -cpp-extra-args="-I`@frama-c@ -print-share-path`/libc" -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/call.c -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_call2.c > /dev/null && ./gcc_runtime.sh call2 + COMMENT: no diff */ #include <stdlib.h> diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/compound_initializers.c b/src/plugins/e-acsl/tests/e-acsl-runtime/compound_initializers.c index 6ef66ddcf55..8c42e459c57 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/compound_initializers.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/compound_initializers.c @@ -1,7 +1,7 @@ /* run.config COMMENT: Compound initializers COMMENT: no diff - EXECNOW: LOG gen_compound_initializers2.c BIN gen_compound_initializers2.out @frama-c@ -machdep x86_64 -cpp-extra-args="-I`@frama-c@ -print-share-path`/libc" -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/compound_initializers.c -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_compound_initializers2.c > /dev/null && ./gcc_runtime.sh compound_initializers2 + COMMENT: no diff */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/empty.i b/src/plugins/e-acsl/tests/e-acsl-runtime/empty.i index bfe0e542270..9671d3e91f4 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/empty.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/empty.i @@ -1,5 +1,4 @@ /* run.config COMMENT: empty file OPT: -e-acsl-check -e-acsl -then-on e-acsl -print - OPT: -e-acsl-gmp-only -e-acsl -then-on e-acsl -print */ 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 f281753c78c..2ea37062e66 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 COMMENT: no diff - 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_runtime.sh false2 + COMMENT: no diff */ int main(void) { int x = 0; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/freeable.c b/src/plugins/e-acsl/tests/e-acsl-runtime/freeable.c index 473a4f5928f..67bc13acdfa 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/freeable.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/freeable.c @@ -2,7 +2,7 @@ COMMENT: \freeable STDOPT: +"-val-builtin __malloc:Frama_C_alloc_size -val-builtin __free:Frama_C_free" COMMENT: no diff - EXECNOW: LOG gen_freeable2.c BIN gen_freeable2.out @frama-c@ -machdep gcc_x86_64 -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/freeable.c -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_freeable2.c > /dev/null && ./gcc_runtime.sh freeable2 + COMMENT: no diff */ #include "stdlib.h" 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 f027d045d7c..23d40f7f10c 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 COMMENT: no diff - 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_runtime.sh function_contract2 + COMMENT: no diff */ int X = 0, Y = 2; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/ghost.i b/src/plugins/e-acsl/tests/e-acsl-runtime/ghost.i index b4f36ed0ce6..d4495643f0b 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/ghost.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/ghost.i @@ -2,7 +2,7 @@ COMMENT: ghost code STDOPT: #"-cpp-extra-args=\"-I`@frama-c@ -print-share-path`/libc\"" +"-val-builtin __malloc:Frama_C_alloc_size -val-builtin __free:Frama_C_free" COMMENT: no diff - EXECNOW: LOG gen_ghost2.c BIN gen_ghost2.out @frama-c@ -cpp-extra-args="-I`@frama-c@ -print-share-path`/libc" -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/ghost.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_ghost2.c > /dev/null && ./gcc_runtime.sh ghost2 + COMMENT: no diff */ /*@ ghost int G = 0; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/init.c b/src/plugins/e-acsl/tests/e-acsl-runtime/init.c index e2564d5c428..34bad5830f2 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/init.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/init.c @@ -1,7 +1,7 @@ /* run.config COMMENT: initialization of globals (bts #1818) COMMENT: no diff - EXECNOW: LOG gen_init2.c BIN gen_init2.out @frama-c@ -machdep x86_64 -cpp-extra-args="-I`@frama-c@ -print-share-path`/libc" -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/init.c -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_init2.c > /dev/null && ./gcc_runtime.sh init2 + COMMENT: no diff */ int a = 0, b; 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 71c48b93f55..c97f905201d 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 STDOPT: +"-slevel 11" - 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_runtime.sh invariant2 + COMMENT: no diff */ 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 5047e5c57a0..4ee107fef8d 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 COMMENT: no diff - 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_runtime.sh labeled_stmt2 + COMMENT: no diff */ 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 4b1e28a3ceb..d2c7bbb950f 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 COMMENT: no diff - 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_runtime.sh lazy2 + COMMENT: no diff */ 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 474fcf35d38..8d4e7bd3f63 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 from the SAC'13 article) COMMENT: no diff - 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_runtime.sh linear_search2 + COMMENT: no diff */ int A[10]; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/literal_string.i b/src/plugins/e-acsl/tests/e-acsl-runtime/literal_string.i index 281037444fe..3fecfc58d63 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/literal_string.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/literal_string.i @@ -1,7 +1,7 @@ /* run.config COMMENT: literal string COMMENT: no diff - EXECNOW: LOG gen_literal_string2.c BIN gen_literal_string2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/literal_string.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_literal_string2.c > /dev/null && ./gcc_runtime.sh literal_string2 + COMMENT: no diff */ int main(void); diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/localvar.c b/src/plugins/e-acsl/tests/e-acsl-runtime/localvar.c index 2cf19baf224..76c75310c15 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/localvar.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/localvar.c @@ -1,8 +1,8 @@ /* run.config COMMENT: allocation and de-allocation of local variables - STDOPT: #"-cpp-extra-args=\"-I`@frama-c@ -print-share-path`/libc\"" +"-val-builtin __malloc:Frama_C_alloc_size -val-builtin __free:Frama_C_free" + STDOPT: +"-val-builtin __malloc:Frama_C_alloc_size -val-builtin __free:Frama_C_free" + COMMENT: no diff COMMENT: no diff - EXECNOW: LOG gen_localvar2.c BIN gen_localvar2.out @frama-c@ -cpp-extra-args="-I`@frama-c@ -print-share-path`/libc" -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/localvar.c -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_localvar2.c > /dev/null && ./gcc_runtime.sh localvar2 */ #include <stdlib.h> diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/loop.i b/src/plugins/e-acsl/tests/e-acsl-runtime/loop.i index 613c9161ef4..ee96cc07785 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/loop.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/loop.i @@ -2,7 +2,7 @@ COMMENT: loop invariants STDOPT: +"-slevel 160" COMMENT: no diff - EXECNOW: LOG gen_loop2.c BIN gen_loop2.out @frama-c@ -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/loop.i -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_loop2.c > /dev/null && ./gcc_runtime.sh loop2 + COMMENT: no diff */ void simple_loop() { diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/mainargs.c b/src/plugins/e-acsl/tests/e-acsl-runtime/mainargs.c index 7b5a74dbacf..e090a760c42 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/mainargs.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/mainargs.c @@ -1,7 +1,7 @@ /* run.config COMMENT: the contents of argv should be valid COMMENT: no diff - EXECNOW: LOG gen_mainargs2.c BIN gen_mainargs2.out @frama-c@ -machdep x86_64 -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/mainargs.c -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_mainargs2.c > /dev/null && ./gcc_test.sh e-acsl-runtime mainargs2 "" bar baz + COMMENT: no diff */ #include <string.h> diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/memsize.c b/src/plugins/e-acsl/tests/e-acsl-runtime/memsize.c index b4a9ee7cf2f..f67fc6f60da 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/memsize.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/memsize.c @@ -1,7 +1,7 @@ /* run.config COMMENT: Checking heap memory size COMMENT: no diff - EXECNOW: LOG gen_memsize2.c BIN gen_memsize2.out @frama-c@ -machdep=gcc_x86_$(getconf LONG_BIT) -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/memsize.c -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_memsize2.c > /dev/null && ./gcc_runtime.sh memsize2 + COMMENT: no diff */ #include <stdlib.h> 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 4fa8d4b823e..10b724e7cab 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 COMMENT: no diff - 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_runtime.sh nested_code_annot2 + COMMENT: no diff */ int main(void) { 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 e342967ab54..a3e4ca19474 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 COMMENT: no diff - 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_runtime.sh null2 + COMMENT: no diff */ 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 deleted file mode 100644 index 49684ab1126..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.1.res.oracle +++ /dev/null @@ -1,20 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __store_block -[value] using specification for function __full_init -[value] using specification for function __initialized -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __delete_block -[value] using specification for function __e_acsl_memory_clean -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/alias.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/alias.1.res.oracle deleted file mode 100644 index 0c77241ff78..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/alias.1.res.oracle +++ /dev/null @@ -1,21 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __store_block -[value] using specification for function __full_init -[value] using specification for function __initialize -[value] using specification for function __delete_block -[value] using specification for function __initialized -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __e_acsl_memory_clean -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/alias.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/alias.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/alias.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/alias.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/alias.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/alias.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/call.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/call.1.res.oracle deleted file mode 100644 index 67d328ebf2e..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/call.1.res.oracle +++ /dev/null @@ -1,34 +0,0 @@ -[e-acsl] beginning translation. -FRAMAC_SHARE/libc/stdlib.h:156:[e-acsl] warning: E-ACSL construct `\fresh' is not yet supported. Ignoring annotation. -tests/e-acsl-runtime/call.c:18:[e-acsl] warning: E-ACSL construct `complete behaviors' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/call.c:18:[e-acsl] warning: E-ACSL construct `disjoint behaviors' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/call.c:18:[e-acsl] warning: E-ACSL construct `assigns clause in behavior' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/call.c:18:[e-acsl] warning: E-ACSL construct `logic function application' is not yet supported. - Ignoring annotation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __store_block -[value] using specification for function __full_init -FRAMAC_SHARE/libc/stdlib.h:156:[value] allocating variable __malloc___e_acsl_malloc_l156 -[value] using specification for function __delete_block -FRAMAC_SHARE/libc/stdlib.h:163:[value] warning: function __e_acsl_malloc, behavior allocation: postcondition got status unknown. (Behavior may be inactive, no reduction performed.) -FRAMAC_SHARE/libc/stdlib.h:168:[value] warning: function __e_acsl_malloc, behavior no_allocation: postcondition got status invalid. (Behavior may be inactive, no reduction performed.) -FRAMAC_SHARE/libc/stdlib.h:156:[value] allocating variable __malloc___e_acsl_malloc_l156_0 -[value] using specification for function __initialize -[value] using specification for function __valid -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __e_acsl_memory_clean -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/alias.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/call.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/alias.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/call.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/call.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/call.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/call.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/call.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/compound_initializers.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/compound_initializers.1.res.oracle deleted file mode 100644 index 033d0a1dab0..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/compound_initializers.1.res.oracle +++ /dev/null @@ -1,43 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] - _F ∈ {9} - _A[0] ∈ {{ "XX" }} - [1] ∈ {{ "YY" }} - _B ∈ {{ "ZZ" }} - _C ∈ {0} - _D[0] ∈ {44} - [1] ∈ {88} - _E ∈ {44} - _G[0].str ∈ {{ "First" }} - [0].num ∈ {99} - [1].str ∈ {{ "Second" }} - [1].num ∈ {147} - __e_acsl_literal_string ∈ {0} - __e_acsl_literal_string_2 ∈ {0} - __e_acsl_literal_string_3 ∈ {0} - __e_acsl_literal_string_4 ∈ {0} - __e_acsl_literal_string_5 ∈ {0} -[value] using specification for function __store_block -[value] using specification for function __full_init -[value] using specification for function __literal_string -[value] using specification for function __valid -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __initialized -[value] using specification for function __valid_read -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function __gmpz_clear -[value] using specification for function __delete_block -[value] using specification for function __e_acsl_memory_clean -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/alias.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/compound_initializers.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/alias.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/compound_initializers.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/compound_initializers.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/compound_initializers.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/compound_initializers.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/compound_initializers.res.oracle 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 deleted file mode 100644 index c96be87ab71..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/empty.1.res.oracle +++ /dev/null @@ -1,48 +0,0 @@ -[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing) -[kernel] Parsing FRAMAC_SHARE/e-acsl/e_acsl.h (with preprocessing) -[kernel] Parsing FRAMAC_SHARE/e-acsl/e_acsl_gmp_types.h (with preprocessing) -[kernel] Parsing FRAMAC_SHARE/e-acsl/e_acsl_gmp.h (with preprocessing) -[kernel] Parsing FRAMAC_SHARE/e-acsl/memory_model/e_acsl_mmodel_api.h (with preprocessing) -[kernel] Parsing FRAMAC_SHARE/e-acsl/memory_model/e_acsl_bittree.h (with preprocessing) -[kernel] Parsing FRAMAC_SHARE/e-acsl/memory_model/e_acsl_mmodel.h (with preprocessing) -[kernel] Parsing tests/e-acsl-runtime/empty.i (no preprocessing) -[e-acsl] beginning translation. -[e-acsl] warning: cannot find entry point `main'. - Please use option `-main' for specifying a valid entry point. - The generated program may miss memory instrumentation - if there are memory-related annotations. -[e-acsl] translation done in project "e-acsl". -/* 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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ ghost extern int __e_acsl_internal_heap; */ - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/call.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/empty.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/call.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/empty.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/empty.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/empty.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/empty.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/empty.res.oracle 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 deleted file mode 100644 index 6d6583f6638..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.1.res.oracle +++ /dev/null @@ -1,13 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/call.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/call.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/freeable.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/freeable.1.res.oracle deleted file mode 100644 index 48a19d4a6d1..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/freeable.1.res.oracle +++ /dev/null @@ -1,31 +0,0 @@ -[e-acsl] beginning translation. -FRAMAC_SHARE/libc/stdlib.h:174:[e-acsl] warning: E-ACSL construct `\allocable' is not yet supported. Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:156:[e-acsl] warning: E-ACSL construct `\fresh' is not yet supported. Ignoring annotation. -tests/e-acsl-runtime/freeable.c:13:[e-acsl] warning: E-ACSL construct `complete behaviors' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/freeable.c:13:[e-acsl] warning: E-ACSL construct `disjoint behaviors' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/freeable.c:13:[e-acsl] warning: E-ACSL construct `assigns clause in behavior' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/freeable.c:13:[e-acsl] warning: E-ACSL construct `logic function application' is not yet supported. - Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:177:[e-acsl] warning: E-ACSL construct `assigns clause in behavior' is not yet supported. - Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:177:[e-acsl] warning: E-ACSL construct `\allocate' is not yet supported. Ignoring annotation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __store_block -tests/e-acsl-runtime/freeable.c:15:[value] warning: assertion got status unknown. -tests/e-acsl-runtime/freeable.c:15:[value] completely invalid value in evaluation of - argument (void *)p -tests/e-acsl-runtime/freeable.c:15:[kernel] warning: accessing uninitialized left-value. assert \initialized(&p); -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/compound_initializers.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/freeable.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/compound_initializers.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/freeable.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/freeable.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/freeable.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/freeable.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/freeable.res.oracle 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 deleted file mode 100644 index a5904b43663..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.1.res.oracle +++ /dev/null @@ -1,22 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] - X ∈ {0} - Y ∈ {2} -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __gmpz_clear -[value] using specification for function __gmpz_init -[value] using specification for function __gmpz_add -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/compound_initializers.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/compound_initializers.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.res.oracle 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 deleted file mode 100644 index af4f3a3fd81..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_addrOf2.c +++ /dev/null @@ -1,108 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \initialized((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __initialized(void *ptr, - size_t size); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -void f(void) -{ - int m; - int *u; - int *p; - __store_block((void *)(& p),4U); - __store_block((void *)(& u),4U); - __store_block((void *)(& m),4U); - __full_init((void *)(& u)); - u = & m; - __full_init((void *)(& p)); - p = u; - __full_init((void *)(& m)); - m = 123; - /*@ assert \initialized(p); */ - { - int __e_acsl_initialized; - __e_acsl_initialized = __initialized((void *)p,sizeof(int)); - e_acsl_assert(__e_acsl_initialized,(char *)"Assertion",(char *)"f", - (char *)"\\initialized(p)",12); - } - __delete_block((void *)(& p)); - __delete_block((void *)(& u)); - __delete_block((void *)(& m)); - return; -} - -int main(void) -{ - int __retres; - int x; - x = 0; - f(); - /*@ assert &x ≡ &x; */ - e_acsl_assert(& x == & x,(char *)"Assertion",(char *)"main", - (char *)"&x == &x",18); - __retres = 0; - __e_acsl_memory_clean(); - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_alias2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_alias2.c deleted file mode 100644 index 2fde5581758..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_alias2.c +++ /dev/null @@ -1,104 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __initialize(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \initialized((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __initialized(void *ptr, - size_t size); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -void f(int *dest, int val) -{ - int *ptr; - __store_block((void *)(& ptr),4U); - __store_block((void *)(& dest),4U); - __full_init((void *)(& ptr)); - ptr = dest; - __initialize((void *)ptr,sizeof(int)); - *ptr = val; - __delete_block((void *)(& dest)); - __delete_block((void *)(& ptr)); - return; -} - -int main(void) -{ - int __retres; - int i; - __store_block((void *)(& i),4U); - f(& i,255); - /*@ assert \initialized(&i); */ - { - int __e_acsl_initialized; - __e_acsl_initialized = __initialized((void *)(& i),sizeof(int)); - e_acsl_assert(__e_acsl_initialized,(char *)"Assertion",(char *)"main", - (char *)"\\initialized(&i)",16); - } - __retres = 0; - __delete_block((void *)(& i)); - __e_acsl_memory_clean(); - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_call2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_call2.c deleted file mode 100644 index d8e01ffbb5d..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_call2.c +++ /dev/null @@ -1,162 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -void *__malloc(size_t size); - -/*@ ghost extern int __e_acsl_init; */ - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __initialize(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures \result ≡ 1 ⇒ \valid((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __valid(void *ptr, size_t size); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ assigns __fc_heap_status, \result; - assigns __fc_heap_status \from size, __fc_heap_status; - assigns \result \from size, __fc_heap_status; - allocates \result; - - behavior allocation: - assumes is_allocable(size); - ensures \fresh{Old, Here}(\result,\old(size)); - assigns __fc_heap_status, \result; - assigns __fc_heap_status \from size, __fc_heap_status; - assigns \result \from size, __fc_heap_status; - - behavior no_allocation: - assumes ¬is_allocable(size); - ensures \result ≡ \null; - assigns \result; - assigns \result \from \nothing; - allocates \nothing; - - complete behaviors no_allocation, allocation; - disjoint behaviors no_allocation, allocation; - */ -void *__e_acsl_malloc(size_t size) -{ - void *__retres; - __store_block((void *)(& __retres),4U); - __retres = __malloc(size); - __delete_block((void *)(& __retres)); - return __retres; -} - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - -*/ -/*@ ensures \valid(\result); */ -int *f(int *x, int *y) -{ - __store_block((void *)(& x),4U); - __store_block((void *)(& y),4U); - __initialize((void *)y,sizeof(int)); - *y = 1; - __delete_block((void *)(& x)); - __delete_block((void *)(& y)); - return x; -} - -/*@ ensures \valid(\result); */ -int *__e_acsl_f(int *x, int *y) -{ - int *__retres; - __store_block((void *)(& __retres),4U); - __store_block((void *)(& x),4U); - __store_block((void *)(& y),4U); - __retres = f(x,y); - { - int __e_acsl_valid; - __e_acsl_valid = __valid((void *)__retres,sizeof(int)); - e_acsl_assert(__e_acsl_valid,(char *)"Postcondition",(char *)"f", - (char *)"\\valid(\\result)",12); - __delete_block((void *)(& x)); - __delete_block((void *)(& y)); - __delete_block((void *)(& __retres)); - return __retres; - } -} - -int main(void) -{ - int __retres; - int x; - int *p; - int *q; - int *r; - __store_block((void *)(& q),4U); - __store_block((void *)(& p),4U); - __store_block((void *)(& x),4U); - __full_init((void *)(& x)); - x = 0; - __full_init((void *)(& q)); - q = (int *)__e_acsl_malloc(sizeof(int)); - r = (int *)__e_acsl_malloc(sizeof(int)); - __full_init((void *)(& p)); - p = __e_acsl_f(& x,q); - __full_init((void *)(& q)); - q = __e_acsl_f(& x,r); - __retres = 0; - __delete_block((void *)(& q)); - __delete_block((void *)(& p)); - __delete_block((void *)(& x)); - __e_acsl_memory_clean(); - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_compound_initializers2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_compound_initializers2.c deleted file mode 100644 index 006f7b2a248..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_compound_initializers2.c +++ /dev/null @@ -1,288 +0,0 @@ -/* Generated by Frama-C */ -char *__e_acsl_literal_string_3; -char *__e_acsl_literal_string; -char *__e_acsl_literal_string_2; -char *__e_acsl_literal_string_4; -char *__e_acsl_literal_string_5; -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned long size_t; -struct ST { - char *str ; - int num ; -}; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __literal_string(void *ptr); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures \result ≡ 1 ⇒ \valid((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __valid(void *ptr, size_t size); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \valid_read((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __valid_read(void *ptr, - size_t size); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \initialized((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __initialized(void *ptr, - size_t size); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int _F; - -char *_A[2] = {(char *)"XX", (char *)"YY"}; -char *_B = (char *)"ZZ"; -char *_C; -int _D[2] = {44, 88}; -int _E = 44; -int _F = 9; -struct ST _G[2] = - {{.str = (char *)"First", .num = 99}, {.str = (char *)"Second", .num = 147}}; -void __e_acsl_memory_init(void) -{ - __e_acsl_literal_string_3 = "ZZ"; - __store_block((void *)__e_acsl_literal_string_3,sizeof("ZZ")); - __full_init((void *)__e_acsl_literal_string_3); - __literal_string((void *)__e_acsl_literal_string_3); - __e_acsl_literal_string = "YY"; - __store_block((void *)__e_acsl_literal_string,sizeof("YY")); - __full_init((void *)__e_acsl_literal_string); - __literal_string((void *)__e_acsl_literal_string); - __e_acsl_literal_string_2 = "XX"; - __store_block((void *)__e_acsl_literal_string_2,sizeof("XX")); - __full_init((void *)__e_acsl_literal_string_2); - __literal_string((void *)__e_acsl_literal_string_2); - __e_acsl_literal_string_4 = "Second"; - __store_block((void *)__e_acsl_literal_string_4,sizeof("Second")); - __full_init((void *)__e_acsl_literal_string_4); - __literal_string((void *)__e_acsl_literal_string_4); - __e_acsl_literal_string_5 = "First"; - __store_block((void *)__e_acsl_literal_string_5,sizeof("First")); - __full_init((void *)__e_acsl_literal_string_5); - __literal_string((void *)__e_acsl_literal_string_5); - __store_block((void *)(_G),32UL); - __full_init((void *)(& _G)); - __store_block((void *)(& _E),4UL); - __full_init((void *)(& _E)); - __store_block((void *)(_D),8UL); - __full_init((void *)(& _D)); - __store_block((void *)(& _C),8UL); - __full_init((void *)(& _C)); - __store_block((void *)(& _B),8UL); - __full_init((void *)(& _B)); - __store_block((void *)(_A),16UL); - __full_init((void *)(& _A)); - __store_block((void *)(& _F),4UL); - __full_init((void *)(& _F)); - return; -} - -int main(int argc, char **argv) -{ - int __retres; - __e_acsl_memory_init(); - /*@ assert \valid((char **)_A); */ - { - int __e_acsl_valid; - __e_acsl_valid = __valid((void *)(_A),sizeof(char *)); - e_acsl_assert(__e_acsl_valid,(char *)"Assertion",(char *)"main", - (char *)"\\valid((char **)_A)",35); - } - /*@ assert \valid_read(_A[0]); */ - { - int __e_acsl_initialized; - int __e_acsl_and; - __e_acsl_initialized = __initialized((void *)(_A),sizeof(char *)); - if (__e_acsl_initialized) { - int __e_acsl_valid_read; - __e_acsl_valid_read = __valid_read((void *)_A[0],sizeof(char)); - __e_acsl_and = __e_acsl_valid_read; - } - else __e_acsl_and = 0; - e_acsl_assert(__e_acsl_and,(char *)"Assertion",(char *)"main", - (char *)"\\valid_read(_A[0])",36); - } - /*@ assert \valid_read(_A[1]); */ - { - int __e_acsl_initialized_2; - int __e_acsl_and_2; - __e_acsl_initialized_2 = __initialized((void *)(& _A[1]),sizeof(char *)); - if (__e_acsl_initialized_2) { - int __e_acsl_valid_read_2; - __e_acsl_valid_read_2 = __valid_read((void *)_A[1],sizeof(char)); - __e_acsl_and_2 = __e_acsl_valid_read_2; - } - else __e_acsl_and_2 = 0; - e_acsl_assert(__e_acsl_and_2,(char *)"Assertion",(char *)"main", - (char *)"\\valid_read(_A[1])",37); - } - /*@ assert \valid_read(_B); */ - { - int __e_acsl_valid_read_3; - __e_acsl_valid_read_3 = __valid_read((void *)_B,sizeof(char)); - e_acsl_assert(__e_acsl_valid_read_3,(char *)"Assertion",(char *)"main", - (char *)"\\valid_read(_B)",38); - } - /*@ assert \valid(&_C); */ - { - int __e_acsl_valid_2; - __e_acsl_valid_2 = __valid((void *)(& _C),sizeof(char *)); - e_acsl_assert(__e_acsl_valid_2,(char *)"Assertion",(char *)"main", - (char *)"\\valid(&_C)",39); - } - /*@ assert \valid((int *)_D); */ - { - int __e_acsl_valid_3; - __e_acsl_valid_3 = __valid((void *)(_D),sizeof(int)); - e_acsl_assert(__e_acsl_valid_3,(char *)"Assertion",(char *)"main", - (char *)"\\valid((int *)_D)",40); - } - /*@ assert \valid(&_E); */ - { - int __e_acsl_valid_4; - __e_acsl_valid_4 = __valid((void *)(& _E),sizeof(int)); - e_acsl_assert(__e_acsl_valid_4,(char *)"Assertion",(char *)"main", - (char *)"\\valid(&_E)",41); - } - /*@ assert \valid(&_F); */ - { - int __e_acsl_valid_5; - __e_acsl_valid_5 = __valid((void *)(& _F),sizeof(int)); - e_acsl_assert(__e_acsl_valid_5,(char *)"Assertion",(char *)"main", - (char *)"\\valid(&_F)",42); - } - /*@ assert _E ≡ 44; */ - { - mpz_t __e_acsl__E; - mpz_t __e_acsl; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl__E,(long)_E); - __gmpz_init_set_si(__e_acsl,(long)44); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl__E), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Assertion",(char *)"main", - (char *)"_E == 44",43); - __gmpz_clear(__e_acsl__E); - __gmpz_clear(__e_acsl); - } - /*@ assert \valid(&_G); */ - { - int __e_acsl_valid_6; - __e_acsl_valid_6 = __valid((void *)(& _G),sizeof(struct ST [2])); - e_acsl_assert(__e_acsl_valid_6,(char *)"Assertion",(char *)"main", - (char *)"\\valid(&_G)",44); - } - /*@ assert _G[0].num ≡ 99; */ - { - mpz_t __e_acsl_2; - mpz_t __e_acsl_3; - int __e_acsl_eq_2; - __gmpz_init_set_si(__e_acsl_2,(long)_G[0].num); - __gmpz_init_set_si(__e_acsl_3,(long)99); - __e_acsl_eq_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_2), - (__mpz_struct const *)(__e_acsl_3)); - e_acsl_assert(__e_acsl_eq_2 == 0,(char *)"Assertion",(char *)"main", - (char *)"_G[0].num == 99",45); - __gmpz_clear(__e_acsl_2); - __gmpz_clear(__e_acsl_3); - } - __retres = 0; - __delete_block((void *)(_G)); - __delete_block((void *)(& _E)); - __delete_block((void *)(_D)); - __delete_block((void *)(& _C)); - __delete_block((void *)(& _B)); - __delete_block((void *)(_A)); - __delete_block((void *)(& _F)); - __e_acsl_memory_clean(); - return __retres; -} - - 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 deleted file mode 100644 index f5f1034d249..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_false2.c +++ /dev/null @@ -1,54 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ ghost extern int __e_acsl_internal_heap; */ - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int main(void) -{ - int __retres; - int x; - x = 0; - if (x) - /*@ assert \false; */ - e_acsl_assert(0,(char *)"Assertion",(char *)"main",(char *)"\\false",8); - __retres = 0; - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_freeable2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_freeable2.c deleted file mode 100644 index a2f9948ec8b..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_freeable2.c +++ /dev/null @@ -1,188 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned long size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -void *__malloc(size_t size); - -void __free(void *p); - -/*@ ghost extern int __e_acsl_init; */ - -/*@ assigns \result; - assigns \result \from ptr; */ -extern __attribute__((__FC_BUILTIN__)) int __freeable(void *ptr); - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ assigns __fc_heap_status, \result; - assigns __fc_heap_status \from size, __fc_heap_status; - assigns \result \from size, __fc_heap_status; - allocates \result; - - behavior allocation: - assumes is_allocable(size); - ensures \fresh{Old, Here}(\result,\old(size)); - assigns __fc_heap_status, \result; - assigns __fc_heap_status \from size, __fc_heap_status; - assigns \result \from size, __fc_heap_status; - - behavior no_allocation: - assumes ¬is_allocable(size); - ensures \result ≡ \null; - assigns \result; - assigns \result \from \nothing; - allocates \nothing; - - complete behaviors no_allocation, allocation; - disjoint behaviors no_allocation, allocation; - */ -void *__e_acsl_malloc(size_t size) -{ - void *__retres; - __store_block((void *)(& __retres),8UL); - __retres = __malloc(size); - __delete_block((void *)(& __retres)); - return __retres; -} - -/*@ assigns __fc_heap_status; - assigns __fc_heap_status \from __fc_heap_status; - frees p; - - behavior deallocation: - assumes p ≢ \null; - requires freeable: \freeable(p); - ensures \allocable(\old(p)); - assigns __fc_heap_status; - assigns __fc_heap_status \from __fc_heap_status; - - behavior no_deallocation: - assumes p ≡ \null; - assigns \nothing; - allocates \nothing; - - complete behaviors no_deallocation, deallocation; - disjoint behaviors no_deallocation, deallocation; - */ -void __e_acsl_free(void *p) -{ - int __e_acsl_at; - { - int __e_acsl_implies; - __store_block((void *)(& p),8UL); - if (! (p != (void *)0)) __e_acsl_implies = 1; - else { - int __e_acsl_freeable; - __e_acsl_freeable = __freeable(p); - __e_acsl_implies = __e_acsl_freeable; - } - e_acsl_assert(__e_acsl_implies,(char *)"Precondition",(char *)"free", - (char *)"p != \\null ==> \\freeable(p)",178); - __store_block((void *)(& __e_acsl_at),4UL); - __e_acsl_at = p != (void *)0; - __free(p); - } - __delete_block((void *)(& p)); - return; -} - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - -*/ -int main(void) -{ - int __retres; - int *p; - __store_block((void *)(& p),8UL); - /*@ assert ¬\freeable(p); */ - { - int __e_acsl_freeable; - __e_acsl_freeable = __freeable((void *)p); - e_acsl_assert(! __e_acsl_freeable,(char *)"Assertion",(char *)"main", - (char *)"!\\freeable(p)",15); - } - /*@ assert ¬\freeable((void *)0); */ - { - int __e_acsl_freeable_2; - __e_acsl_freeable_2 = __freeable((void *)0); - e_acsl_assert(! __e_acsl_freeable_2,(char *)"Assertion",(char *)"main", - (char *)"!\\freeable((void *)0)",16); - } - __full_init((void *)(& p)); - p = (int *)__e_acsl_malloc((unsigned long)4 * sizeof(int)); - /*@ assert ¬\freeable(p+1); */ - { - int __e_acsl_freeable_3; - __e_acsl_freeable_3 = __freeable((void *)(p + (long)1)); - e_acsl_assert(! __e_acsl_freeable_3,(char *)"Assertion",(char *)"main", - (char *)"!\\freeable(p+1)",18); - } - /*@ assert \freeable(p); */ - { - int __e_acsl_freeable_4; - __e_acsl_freeable_4 = __freeable((void *)p); - e_acsl_assert(__e_acsl_freeable_4,(char *)"Assertion",(char *)"main", - (char *)"\\freeable(p)",19); - } - __e_acsl_free((void *)p); - /*@ assert ¬\freeable(p); */ - { - int __e_acsl_freeable_5; - __e_acsl_freeable_5 = __freeable((void *)p); - e_acsl_assert(! __e_acsl_freeable_5,(char *)"Assertion",(char *)"main", - (char *)"!\\freeable(p)",21); - } - __retres = 0; - __delete_block((void *)(& p)); - __e_acsl_memory_clean(); - return __retres; -} - - 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 deleted file mode 100644 index 329843c1b49..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_function_contract2.c +++ /dev/null @@ -1,779 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - assigns *z; - assigns *z \from __e_acsl_init; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init(__mpz_struct * /*[1]*/ z); - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ requires \valid(z1); - requires \valid_read(z2); - requires \valid_read(z3); - assigns *z1; - assigns *z1 \from *z2, *z3; - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int X = 0; -int Y = 2; -/*@ ensures X ≡ 1; */ -void f(void) -{ - X = 1; - return; -} - -/*@ ensures X ≡ 1; */ -void __e_acsl_f(void) -{ - f(); - { - mpz_t __e_acsl_X; - mpz_t __e_acsl; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl_X,(long)X); - __gmpz_init_set_si(__e_acsl,(long)1); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Postcondition",(char *)"f", - (char *)"X == 1",10); - __gmpz_clear(__e_acsl_X); - __gmpz_clear(__e_acsl); - return; - } -} - -/*@ ensures X ≡ 2; - ensures Y ≡ 2; */ -void g(void) -{ - X = 2; - return; -} - -/*@ ensures X ≡ 2; - ensures Y ≡ 2; */ -void __e_acsl_g(void) -{ - g(); - { - mpz_t __e_acsl_X; - mpz_t __e_acsl; - int __e_acsl_eq; - mpz_t __e_acsl_Y; - int __e_acsl_eq_2; - __gmpz_init_set_si(__e_acsl_X,(long)X); - __gmpz_init_set_si(__e_acsl,(long)2); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Postcondition",(char *)"g", - (char *)"X == 2",14); - __gmpz_init_set_si(__e_acsl_Y,(long)Y); - __e_acsl_eq_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_Y), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq_2 == 0,(char *)"Postcondition",(char *)"g", - (char *)"Y == 2",15); - __gmpz_clear(__e_acsl_X); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_Y); - return; - } -} - -/*@ requires X ≡ 2; */ -void h(void) -{ - X ++; - return; -} - -/*@ requires X ≡ 2; */ -void __e_acsl_h(void) -{ - { - mpz_t __e_acsl_X; - mpz_t __e_acsl; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl_X,(long)X); - __gmpz_init_set_si(__e_acsl,(long)2); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Precondition",(char *)"h", - (char *)"X == 2",19); - __gmpz_clear(__e_acsl_X); - __gmpz_clear(__e_acsl); - h(); - } - return; -} - -/*@ requires X ≡ 3; - requires Y ≡ 2; */ -void i(void) -{ - X += Y; - return; -} - -/*@ requires X ≡ 3; - requires Y ≡ 2; */ -void __e_acsl_i(void) -{ - { - mpz_t __e_acsl_X; - mpz_t __e_acsl; - int __e_acsl_eq; - mpz_t __e_acsl_Y; - mpz_t __e_acsl_2; - int __e_acsl_eq_2; - __gmpz_init_set_si(__e_acsl_X,(long)X); - __gmpz_init_set_si(__e_acsl,(long)3); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Precondition",(char *)"i", - (char *)"X == 3",23); - __gmpz_init_set_si(__e_acsl_Y,(long)Y); - __gmpz_init_set_si(__e_acsl_2,(long)2); - __e_acsl_eq_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_Y), - (__mpz_struct const *)(__e_acsl_2)); - e_acsl_assert(__e_acsl_eq_2 == 0,(char *)"Precondition",(char *)"i", - (char *)"Y == 2",24); - __gmpz_clear(__e_acsl_X); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_Y); - __gmpz_clear(__e_acsl_2); - i(); - } - return; -} - -/*@ behavior b1: - requires X ≡ 5; - ensures X ≡ 3; - - behavior b2: - requires X ≡ 3+Y; - requires Y ≡ 2; - ensures X ≡ Y+1; - */ -void j(void) -{ - X = 3; - return; -} - -/*@ behavior b1: - requires X ≡ 5; - ensures X ≡ 3; - - behavior b2: - requires X ≡ 3+Y; - requires Y ≡ 2; - ensures X ≡ Y+1; - */ -void __e_acsl_j(void) -{ - { - mpz_t __e_acsl_X; - mpz_t __e_acsl; - int __e_acsl_eq; - mpz_t __e_acsl_2; - mpz_t __e_acsl_Y; - mpz_t __e_acsl_add; - int __e_acsl_eq_2; - mpz_t __e_acsl_3; - int __e_acsl_eq_3; - __gmpz_init_set_si(__e_acsl_X,(long)X); - __gmpz_init_set_si(__e_acsl,(long)5); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Precondition",(char *)"j", - (char *)"X == 5",29); - __gmpz_init_set_si(__e_acsl_2,(long)3); - __gmpz_init_set_si(__e_acsl_Y,(long)Y); - __gmpz_init(__e_acsl_add); - __gmpz_add(__e_acsl_add,(__mpz_struct const *)(__e_acsl_2), - (__mpz_struct const *)(__e_acsl_Y)); - __e_acsl_eq_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X), - (__mpz_struct const *)(__e_acsl_add)); - e_acsl_assert(__e_acsl_eq_2 == 0,(char *)"Precondition",(char *)"j", - (char *)"X == 3+Y",32); - __gmpz_init_set_si(__e_acsl_3,(long)2); - __e_acsl_eq_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_Y), - (__mpz_struct const *)(__e_acsl_3)); - e_acsl_assert(__e_acsl_eq_3 == 0,(char *)"Precondition",(char *)"j", - (char *)"Y == 2",33); - __gmpz_clear(__e_acsl_X); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_2); - __gmpz_clear(__e_acsl_Y); - __gmpz_clear(__e_acsl_add); - __gmpz_clear(__e_acsl_3); - j(); - } - { - mpz_t __e_acsl_X_2; - mpz_t __e_acsl_4; - int __e_acsl_eq_4; - mpz_t __e_acsl_Y_2; - mpz_t __e_acsl_5; - mpz_t __e_acsl_add_2; - int __e_acsl_eq_5; - __gmpz_init_set_si(__e_acsl_X_2,(long)X); - __gmpz_init_set_si(__e_acsl_4,(long)3); - __e_acsl_eq_4 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X_2), - (__mpz_struct const *)(__e_acsl_4)); - e_acsl_assert(__e_acsl_eq_4 == 0,(char *)"Postcondition",(char *)"j", - (char *)"X == 3",30); - __gmpz_init_set_si(__e_acsl_Y_2,(long)Y); - __gmpz_init_set_si(__e_acsl_5,(long)1); - __gmpz_init(__e_acsl_add_2); - __gmpz_add(__e_acsl_add_2,(__mpz_struct const *)(__e_acsl_Y_2), - (__mpz_struct const *)(__e_acsl_5)); - __e_acsl_eq_5 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X_2), - (__mpz_struct const *)(__e_acsl_add_2)); - e_acsl_assert(__e_acsl_eq_5 == 0,(char *)"Postcondition",(char *)"j", - (char *)"X == Y+1",34); - __gmpz_clear(__e_acsl_X_2); - __gmpz_clear(__e_acsl_4); - __gmpz_clear(__e_acsl_Y_2); - __gmpz_clear(__e_acsl_5); - __gmpz_clear(__e_acsl_add_2); - return; - } -} - -/*@ behavior b1: - assumes X ≡ 1; - requires X ≡ 0; - - behavior b2: - assumes X ≡ 3; - assumes Y ≡ 2; - requires X ≡ 3; - requires X+Y ≡ 5; - */ -void k(void) -{ - X += Y; - return; -} - -/*@ behavior b1: - assumes X ≡ 1; - requires X ≡ 0; - - behavior b2: - assumes X ≡ 3; - assumes Y ≡ 2; - requires X ≡ 3; - requires X+Y ≡ 5; - */ -void __e_acsl_k(void) -{ - { - mpz_t __e_acsl_X; - mpz_t __e_acsl; - int __e_acsl_eq; - int __e_acsl_implies; - mpz_t __e_acsl_3; - int __e_acsl_eq_3; - int __e_acsl_and; - int __e_acsl_implies_2; - int __e_acsl_eq_6; - int __e_acsl_and_2; - int __e_acsl_implies_3; - __gmpz_init_set_si(__e_acsl_X,(long)X); - __gmpz_init_set_si(__e_acsl,(long)1); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X), - (__mpz_struct const *)(__e_acsl)); - if (! (__e_acsl_eq == 0)) __e_acsl_implies = 1; - else { - mpz_t __e_acsl_X_2; - mpz_t __e_acsl_2; - int __e_acsl_eq_2; - __gmpz_init_set_si(__e_acsl_X_2,(long)X); - __gmpz_init_set_si(__e_acsl_2,(long)0); - __e_acsl_eq_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X_2), - (__mpz_struct const *)(__e_acsl_2)); - __e_acsl_implies = __e_acsl_eq_2 == 0; - __gmpz_clear(__e_acsl_X_2); - __gmpz_clear(__e_acsl_2); - } - e_acsl_assert(__e_acsl_implies,(char *)"Precondition",(char *)"k", - (char *)"X == 1 ==> X == 0",40); - __gmpz_init_set_si(__e_acsl_3,(long)3); - __e_acsl_eq_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X), - (__mpz_struct const *)(__e_acsl_3)); - if (__e_acsl_eq_3 == 0) { - mpz_t __e_acsl_Y; - mpz_t __e_acsl_4; - int __e_acsl_eq_4; - __gmpz_init_set_si(__e_acsl_Y,(long)Y); - __gmpz_init_set_si(__e_acsl_4,(long)2); - __e_acsl_eq_4 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_Y), - (__mpz_struct const *)(__e_acsl_4)); - __e_acsl_and = __e_acsl_eq_4 == 0; - __gmpz_clear(__e_acsl_Y); - __gmpz_clear(__e_acsl_4); - } - else __e_acsl_and = 0; - if (! __e_acsl_and) __e_acsl_implies_2 = 1; - else { - mpz_t __e_acsl_X_3; - mpz_t __e_acsl_5; - int __e_acsl_eq_5; - __gmpz_init_set_si(__e_acsl_X_3,(long)X); - __gmpz_init_set_si(__e_acsl_5,(long)3); - __e_acsl_eq_5 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X_3), - (__mpz_struct const *)(__e_acsl_5)); - __e_acsl_implies_2 = __e_acsl_eq_5 == 0; - __gmpz_clear(__e_acsl_X_3); - __gmpz_clear(__e_acsl_5); - } - e_acsl_assert(__e_acsl_implies_2,(char *)"Precondition",(char *)"k", - (char *)"X == 3 && Y == 2 ==> X == 3",44); - __e_acsl_eq_6 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X), - (__mpz_struct const *)(__e_acsl_3)); - if (__e_acsl_eq_6 == 0) { - mpz_t __e_acsl_Y_2; - mpz_t __e_acsl_6; - int __e_acsl_eq_7; - __gmpz_init_set_si(__e_acsl_Y_2,(long)Y); - __gmpz_init_set_si(__e_acsl_6,(long)2); - __e_acsl_eq_7 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_Y_2), - (__mpz_struct const *)(__e_acsl_6)); - __e_acsl_and_2 = __e_acsl_eq_7 == 0; - __gmpz_clear(__e_acsl_Y_2); - __gmpz_clear(__e_acsl_6); - } - else __e_acsl_and_2 = 0; - if (! __e_acsl_and_2) __e_acsl_implies_3 = 1; - else { - mpz_t __e_acsl_X_4; - mpz_t __e_acsl_Y_3; - mpz_t __e_acsl_add; - mpz_t __e_acsl_7; - int __e_acsl_eq_8; - __gmpz_init_set_si(__e_acsl_X_4,(long)X); - __gmpz_init_set_si(__e_acsl_Y_3,(long)Y); - __gmpz_init(__e_acsl_add); - __gmpz_add(__e_acsl_add,(__mpz_struct const *)(__e_acsl_X_4), - (__mpz_struct const *)(__e_acsl_Y_3)); - __gmpz_init_set_si(__e_acsl_7,(long)5); - __e_acsl_eq_8 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_add), - (__mpz_struct const *)(__e_acsl_7)); - __e_acsl_implies_3 = __e_acsl_eq_8 == 0; - __gmpz_clear(__e_acsl_X_4); - __gmpz_clear(__e_acsl_Y_3); - __gmpz_clear(__e_acsl_add); - __gmpz_clear(__e_acsl_7); - } - e_acsl_assert(__e_acsl_implies_3,(char *)"Precondition",(char *)"k", - (char *)"X == 3 && Y == 2 ==> X+Y == 5",45); - __gmpz_clear(__e_acsl_X); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_3); - k(); - } - return; -} - -/*@ ensures X ≡ 5; */ -int l(void) -{ - /*@ assert Y ≡ 2; */ - { - mpz_t __e_acsl_Y; - mpz_t __e_acsl; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl_Y,(long)Y); - __gmpz_init_set_si(__e_acsl,(long)2); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_Y), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Assertion",(char *)"l", - (char *)"Y == 2",51); - __gmpz_clear(__e_acsl_Y); - __gmpz_clear(__e_acsl); - } - return X; -} - -/*@ ensures X ≡ 5; */ -int __e_acsl_l(void) -{ - int __retres; - __retres = l(); - { - mpz_t __e_acsl_X; - mpz_t __e_acsl; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl_X,(long)X); - __gmpz_init_set_si(__e_acsl,(long)5); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Postcondition",(char *)"l", - (char *)"X == 5",49); - __gmpz_clear(__e_acsl_X); - __gmpz_clear(__e_acsl); - return __retres; - } -} - -/*@ behavior b1: - assumes X ≡ 7; - ensures X ≡ 95; - - behavior b2: - assumes X ≡ 5; - assumes Y ≡ 2; - ensures X ≡ 7; - ensures X ≡ \old(X)+Y; - */ -void m(void) -{ - X += Y; - return; -} - -/*@ behavior b1: - assumes X ≡ 7; - ensures X ≡ 95; - - behavior b2: - assumes X ≡ 5; - assumes Y ≡ 2; - ensures X ≡ 7; - ensures X ≡ \old(X)+Y; - */ -void __e_acsl_m(void) -{ - int __e_acsl_at_4; - int __e_acsl_at_3; - int __e_acsl_at_2; - int __e_acsl_at; - __e_acsl_at_4 = X; - { - mpz_t __e_acsl_X_5; - mpz_t __e_acsl_6; - int __e_acsl_eq_6; - int __e_acsl_and_2; - __gmpz_init_set_si(__e_acsl_X_5,(long)X); - __gmpz_init_set_si(__e_acsl_6,(long)5); - __e_acsl_eq_6 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X_5), - (__mpz_struct const *)(__e_acsl_6)); - if (__e_acsl_eq_6 == 0) { - mpz_t __e_acsl_Y_2; - mpz_t __e_acsl_7; - int __e_acsl_eq_7; - __gmpz_init_set_si(__e_acsl_Y_2,(long)Y); - __gmpz_init_set_si(__e_acsl_7,(long)2); - __e_acsl_eq_7 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_Y_2), - (__mpz_struct const *)(__e_acsl_7)); - __e_acsl_and_2 = __e_acsl_eq_7 == 0; - __gmpz_clear(__e_acsl_Y_2); - __gmpz_clear(__e_acsl_7); - } - else __e_acsl_and_2 = 0; - __e_acsl_at_3 = __e_acsl_and_2; - __gmpz_clear(__e_acsl_X_5); - __gmpz_clear(__e_acsl_6); - } - { - mpz_t __e_acsl_X_3; - mpz_t __e_acsl_3; - int __e_acsl_eq_3; - int __e_acsl_and; - __gmpz_init_set_si(__e_acsl_X_3,(long)X); - __gmpz_init_set_si(__e_acsl_3,(long)5); - __e_acsl_eq_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X_3), - (__mpz_struct const *)(__e_acsl_3)); - if (__e_acsl_eq_3 == 0) { - mpz_t __e_acsl_Y; - mpz_t __e_acsl_4; - int __e_acsl_eq_4; - __gmpz_init_set_si(__e_acsl_Y,(long)Y); - __gmpz_init_set_si(__e_acsl_4,(long)2); - __e_acsl_eq_4 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_Y), - (__mpz_struct const *)(__e_acsl_4)); - __e_acsl_and = __e_acsl_eq_4 == 0; - __gmpz_clear(__e_acsl_Y); - __gmpz_clear(__e_acsl_4); - } - else __e_acsl_and = 0; - __e_acsl_at_2 = __e_acsl_and; - __gmpz_clear(__e_acsl_X_3); - __gmpz_clear(__e_acsl_3); - } - { - mpz_t __e_acsl_X; - mpz_t __e_acsl; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl_X,(long)X); - __gmpz_init_set_si(__e_acsl,(long)7); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X), - (__mpz_struct const *)(__e_acsl)); - __e_acsl_at = __e_acsl_eq == 0; - __gmpz_clear(__e_acsl_X); - __gmpz_clear(__e_acsl); - } - m(); - { - int __e_acsl_implies; - int __e_acsl_implies_2; - int __e_acsl_implies_3; - if (! __e_acsl_at) __e_acsl_implies = 1; - else { - mpz_t __e_acsl_X_2; - mpz_t __e_acsl_2; - int __e_acsl_eq_2; - __gmpz_init_set_si(__e_acsl_X_2,(long)X); - __gmpz_init_set_si(__e_acsl_2,(long)95); - __e_acsl_eq_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X_2), - (__mpz_struct const *)(__e_acsl_2)); - __e_acsl_implies = __e_acsl_eq_2 == 0; - __gmpz_clear(__e_acsl_X_2); - __gmpz_clear(__e_acsl_2); - } - e_acsl_assert(__e_acsl_implies,(char *)"Postcondition",(char *)"m", - (char *)"\\old(X == 7) ==> X == 95",58); - if (! __e_acsl_at_2) __e_acsl_implies_2 = 1; - else { - mpz_t __e_acsl_X_4; - mpz_t __e_acsl_5; - int __e_acsl_eq_5; - __gmpz_init_set_si(__e_acsl_X_4,(long)X); - __gmpz_init_set_si(__e_acsl_5,(long)7); - __e_acsl_eq_5 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X_4), - (__mpz_struct const *)(__e_acsl_5)); - __e_acsl_implies_2 = __e_acsl_eq_5 == 0; - __gmpz_clear(__e_acsl_X_4); - __gmpz_clear(__e_acsl_5); - } - e_acsl_assert(__e_acsl_implies_2,(char *)"Postcondition",(char *)"m", - (char *)"\\old(X == 5 && Y == 2) ==> X == 7",62); - if (! __e_acsl_at_3) __e_acsl_implies_3 = 1; - else { - mpz_t __e_acsl_X_6; - mpz_t __e_acsl_8; - mpz_t __e_acsl_Y_3; - mpz_t __e_acsl_add; - int __e_acsl_eq_8; - __gmpz_init_set_si(__e_acsl_X_6,(long)X); - __gmpz_init_set_si(__e_acsl_8,(long)__e_acsl_at_4); - __gmpz_init_set_si(__e_acsl_Y_3,(long)Y); - __gmpz_init(__e_acsl_add); - __gmpz_add(__e_acsl_add,(__mpz_struct const *)(__e_acsl_8), - (__mpz_struct const *)(__e_acsl_Y_3)); - __e_acsl_eq_8 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X_6), - (__mpz_struct const *)(__e_acsl_add)); - __e_acsl_implies_3 = __e_acsl_eq_8 == 0; - __gmpz_clear(__e_acsl_X_6); - __gmpz_clear(__e_acsl_8); - __gmpz_clear(__e_acsl_Y_3); - __gmpz_clear(__e_acsl_add); - } - e_acsl_assert(__e_acsl_implies_3,(char *)"Postcondition",(char *)"m", - (char *)"\\old(X == 5 && Y == 2) ==> X == \\old(X)+Y",63); - return; - } -} - -/*@ requires X > 0; - requires X < 10; - - behavior b1: - assumes X ≡ 7; - ensures X ≡ 8; - - behavior b2: - assumes X ≡ 5; - ensures X ≡ 98; - */ -void n(void) -{ - X ++; - return; -} - -/*@ requires X > 0; - requires X < 10; - - behavior b1: - assumes X ≡ 7; - ensures X ≡ 8; - - behavior b2: - assumes X ≡ 5; - ensures X ≡ 98; - */ -void __e_acsl_n(void) -{ - int __e_acsl_at_2; - int __e_acsl_at; - { - mpz_t __e_acsl_X; - mpz_t __e_acsl; - int __e_acsl_gt; - mpz_t __e_acsl_2; - int __e_acsl_lt; - __gmpz_init_set_si(__e_acsl_X,(long)X); - __gmpz_init_set_si(__e_acsl,(long)0); - __e_acsl_gt = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_gt > 0,(char *)"Precondition",(char *)"n", - (char *)"X > 0",67); - __gmpz_init_set_si(__e_acsl_2,(long)10); - __e_acsl_lt = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X), - (__mpz_struct const *)(__e_acsl_2)); - e_acsl_assert(__e_acsl_lt < 0,(char *)"Precondition",(char *)"n", - (char *)"X < 10",68); - __gmpz_clear(__e_acsl_X); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_2); - { - mpz_t __e_acsl_X_4; - mpz_t __e_acsl_5; - int __e_acsl_eq_3; - __gmpz_init_set_si(__e_acsl_X_4,(long)X); - __gmpz_init_set_si(__e_acsl_5,(long)5); - __e_acsl_eq_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X_4), - (__mpz_struct const *)(__e_acsl_5)); - __e_acsl_at_2 = __e_acsl_eq_3 == 0; - __gmpz_clear(__e_acsl_X_4); - __gmpz_clear(__e_acsl_5); - } - { - mpz_t __e_acsl_X_2; - mpz_t __e_acsl_3; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl_X_2,(long)X); - __gmpz_init_set_si(__e_acsl_3,(long)7); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X_2), - (__mpz_struct const *)(__e_acsl_3)); - __e_acsl_at = __e_acsl_eq == 0; - __gmpz_clear(__e_acsl_X_2); - __gmpz_clear(__e_acsl_3); - } - n(); - } - { - int __e_acsl_implies; - int __e_acsl_implies_2; - if (! __e_acsl_at) __e_acsl_implies = 1; - else { - mpz_t __e_acsl_X_3; - mpz_t __e_acsl_4; - int __e_acsl_eq_2; - __gmpz_init_set_si(__e_acsl_X_3,(long)X); - __gmpz_init_set_si(__e_acsl_4,(long)8); - __e_acsl_eq_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X_3), - (__mpz_struct const *)(__e_acsl_4)); - __e_acsl_implies = __e_acsl_eq_2 == 0; - __gmpz_clear(__e_acsl_X_3); - __gmpz_clear(__e_acsl_4); - } - e_acsl_assert(__e_acsl_implies,(char *)"Postcondition",(char *)"n", - (char *)"\\old(X == 7) ==> X == 8",71); - if (! __e_acsl_at_2) __e_acsl_implies_2 = 1; - else { - mpz_t __e_acsl_X_5; - mpz_t __e_acsl_6; - int __e_acsl_eq_4; - __gmpz_init_set_si(__e_acsl_X_5,(long)X); - __gmpz_init_set_si(__e_acsl_6,(long)98); - __e_acsl_eq_4 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X_5), - (__mpz_struct const *)(__e_acsl_6)); - __e_acsl_implies_2 = __e_acsl_eq_4 == 0; - __gmpz_clear(__e_acsl_X_5); - __gmpz_clear(__e_acsl_6); - } - e_acsl_assert(__e_acsl_implies_2,(char *)"Postcondition",(char *)"n", - (char *)"\\old(X == 5) ==> X == 98",74); - return; - } -} - -int main(void) -{ - int __retres; - __e_acsl_f(); - __e_acsl_g(); - __e_acsl_h(); - __e_acsl_i(); - __e_acsl_j(); - __e_acsl_k(); - __e_acsl_l(); - __e_acsl_m(); - __e_acsl_n(); - __retres = 0; - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ghost2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ghost2.c deleted file mode 100644 index 2b76c7ef682..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ghost2.c +++ /dev/null @@ -1,155 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __initialize(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures \result ≡ 1 ⇒ \valid((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __valid(void *ptr, size_t size); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \valid_read((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __valid_read(void *ptr, - size_t size); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int G = 0; -int *P; -void __e_acsl_memory_init(void) -{ - __store_block((void *)(& P),4U); - __full_init((void *)(& P)); - __store_block((void *)(& G),4U); - __full_init((void *)(& G)); - return; -} - -int main(void) -{ - int __retres; - int *q; - __e_acsl_memory_init(); - __store_block((void *)(& q),4U); - P = & G; - __full_init((void *)(& q)); - q = P; - { - int __e_acsl_valid_read; - int __e_acsl_valid; - __initialize((void *)P,sizeof(int)); - __e_acsl_valid_read = __valid_read((void *)P,sizeof(int)); - e_acsl_assert(__e_acsl_valid_read,(char *)"RTE",(char *)"main", - (char *)"mem_access: \\valid_read(P)",16); - __e_acsl_valid = __valid((void *)P,sizeof(int)); - e_acsl_assert(__e_acsl_valid,(char *)"RTE",(char *)"main", - (char *)"mem_access: \\valid(P)",16); - (*P) ++; - } - /*@ assert *q ≡ G; */ - { - mpz_t __e_acsl; - mpz_t __e_acsl_G; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl,(long)*q); - __gmpz_init_set_si(__e_acsl_G,(long)G); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl), - (__mpz_struct const *)(__e_acsl_G)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Assertion",(char *)"main", - (char *)"*q == G",17); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_G); - } - __retres = 0; - __delete_block((void *)(& P)); - __delete_block((void *)(& G)); - __delete_block((void *)(& q)); - __e_acsl_memory_clean(); - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_init2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_init2.c deleted file mode 100644 index 862762c9009..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_init2.c +++ /dev/null @@ -1,116 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned long size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \initialized((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __initialized(void *ptr, - size_t size); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int a = 0; -int b; -void __e_acsl_memory_init(void) -{ - __store_block((void *)(& b),4UL); - __full_init((void *)(& b)); - __store_block((void *)(& a),4UL); - __full_init((void *)(& a)); - return; -} - -int main(void) -{ - int __retres; - int *p; - int *q; - __e_acsl_memory_init(); - __store_block((void *)(& q),8UL); - __store_block((void *)(& p),8UL); - __full_init((void *)(& p)); - p = & a; - __full_init((void *)(& q)); - q = & b; - /*@ assert \initialized(&b); */ - e_acsl_assert(1,(char *)"Assertion",(char *)"main", - (char *)"\\initialized(&b)",11); - /*@ assert \initialized(q); */ - { - int __e_acsl_initialized; - __e_acsl_initialized = __initialized((void *)q,sizeof(int)); - e_acsl_assert(__e_acsl_initialized,(char *)"Assertion",(char *)"main", - (char *)"\\initialized(q)",12); - } - /*@ assert \initialized(p); */ - { - int __e_acsl_initialized_2; - __e_acsl_initialized_2 = __initialized((void *)p,sizeof(int)); - e_acsl_assert(__e_acsl_initialized_2,(char *)"Assertion",(char *)"main", - (char *)"\\initialized(p)",13); - } - __retres = 0; - __delete_block((void *)(& b)); - __delete_block((void *)(& a)); - __delete_block((void *)(& q)); - __delete_block((void *)(& p)); - __e_acsl_memory_clean(); - return __retres; -} - - 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 deleted file mode 100644 index 43521357a7b..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_invariant2.c +++ /dev/null @@ -1,124 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int main(void) -{ - int __retres; - int x; - x = 0; - { - int i; - i = 0; - while (i < 10) { - /*@ invariant 0 ≤ i < 10; */ - { - mpz_t __e_acsl; - mpz_t __e_acsl_i; - int __e_acsl_le; - int __e_acsl_and; - __gmpz_init_set_si(__e_acsl,(long)0); - __gmpz_init_set_si(__e_acsl_i,(long)i); - __e_acsl_le = __gmpz_cmp((__mpz_struct const *)(__e_acsl), - (__mpz_struct const *)(__e_acsl_i)); - if (__e_acsl_le <= 0) { - mpz_t __e_acsl_i_2; - mpz_t __e_acsl_2; - int __e_acsl_lt; - __gmpz_init_set_si(__e_acsl_i_2,(long)i); - __gmpz_init_set_si(__e_acsl_2,(long)10); - __e_acsl_lt = __gmpz_cmp((__mpz_struct const *)(__e_acsl_i_2), - (__mpz_struct const *)(__e_acsl_2)); - __e_acsl_and = __e_acsl_lt < 0; - __gmpz_clear(__e_acsl_i_2); - __gmpz_clear(__e_acsl_2); - } - else __e_acsl_and = 0; - e_acsl_assert(__e_acsl_and,(char *)"Invariant",(char *)"main", - (char *)"0 <= i < 10",9); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_i); - } - x += i; - /*@ invariant i ≤ x; */ - { - mpz_t __e_acsl_i_3; - mpz_t __e_acsl_x; - int __e_acsl_le_2; - __gmpz_init_set_si(__e_acsl_i_3,(long)i); - __gmpz_init_set_si(__e_acsl_x,(long)x); - __e_acsl_le_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_i_3), - (__mpz_struct const *)(__e_acsl_x)); - e_acsl_assert(__e_acsl_le_2 <= 0,(char *)"Invariant",(char *)"main", - (char *)"i <= x",11); - __gmpz_clear(__e_acsl_i_3); - __gmpz_clear(__e_acsl_x); - } - i ++; - } - } - __retres = 0; - return __retres; -} - - 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 deleted file mode 100644 index 65543717ad6..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_labeled_stmt2.c +++ /dev/null @@ -1,148 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int X = 0; -/*@ ensures X ≡ 3; */ -int __e_acsl_main(void) -{ - int __retres; - goto L1; - L1: - /*@ assert X ≡ 0; */ - { - mpz_t __e_acsl_X; - mpz_t __e_acsl; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl_X,(long)X); - __gmpz_init_set_si(__e_acsl,(long)0); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Assertion",(char *)"main", - (char *)"X == 0",12); - __gmpz_clear(__e_acsl_X); - __gmpz_clear(__e_acsl); - } - X = 1; - goto L2; - L2: - /*@ requires X ≡ 1; - ensures X ≡ 2; */ - { - mpz_t __e_acsl_X_3; - mpz_t __e_acsl_3; - int __e_acsl_eq_3; - { - mpz_t __e_acsl_X_2; - mpz_t __e_acsl_2; - int __e_acsl_eq_2; - __gmpz_init_set_si(__e_acsl_X_2,(long)X); - __gmpz_init_set_si(__e_acsl_2,(long)1); - __e_acsl_eq_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X_2), - (__mpz_struct const *)(__e_acsl_2)); - e_acsl_assert(__e_acsl_eq_2 == 0,(char *)"Precondition", - (char *)"main",(char *)"X == 1",14); - __gmpz_clear(__e_acsl_X_2); - __gmpz_clear(__e_acsl_2); - X = 2; - } - __gmpz_init_set_si(__e_acsl_X_3,(long)X); - __gmpz_init_set_si(__e_acsl_3,(long)2); - __e_acsl_eq_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X_3), - (__mpz_struct const *)(__e_acsl_3)); - e_acsl_assert(__e_acsl_eq_3 == 0,(char *)"Postcondition", - (char *)"main",(char *)"X == 2",14); - __gmpz_clear(__e_acsl_X_3); - __gmpz_clear(__e_acsl_3); - } - if (X) { - X = 3; - __retres = 0; - goto return_label; - } - __retres = 0; - return_label: return __retres; -} - -/*@ ensures X ≡ 3; */ -int main(void) -{ - int __retres; - __retres = __e_acsl_main(); - { - mpz_t __e_acsl_X; - mpz_t __e_acsl; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl_X,(long)X); - __gmpz_init_set_si(__e_acsl,(long)3); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_X), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Postcondition",(char *)"main", - (char *)"X == 3",9); - __gmpz_clear(__e_acsl_X); - __gmpz_clear(__e_acsl); - return __retres; - } -} - - 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 deleted file mode 100644 index 56c8f4f7969..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_lazy2.c +++ /dev/null @@ -1,755 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - assigns *z; - assigns *z \from __e_acsl_init; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init(__mpz_struct * /*[1]*/ z); - -/*@ requires \valid_read(z_orig); - requires ¬\initialized(z); - ensures \valid(\old(z)); - assigns *z; - assigns *z \from *z_orig; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set(__mpz_struct * /*[1]*/ z, - __mpz_struct const * /*[1]*/ z_orig); - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ requires \valid(z1); - requires \valid_read(z2); - requires \valid_read(z3); - assigns *z1; - assigns *z1 \from *z2, *z3; - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int main(void) -{ - int __retres; - int x; - int y; - x = 0; - y = 1; - /*@ assert x ≡ 0 ∧ y ≡ 1; */ - { - mpz_t __e_acsl_x; - mpz_t __e_acsl; - int __e_acsl_eq; - int __e_acsl_and; - __gmpz_init_set_si(__e_acsl_x,(long)x); - __gmpz_init_set_si(__e_acsl,(long)0); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x), - (__mpz_struct const *)(__e_acsl)); - if (__e_acsl_eq == 0) { - mpz_t __e_acsl_y; - mpz_t __e_acsl_2; - int __e_acsl_eq_2; - __gmpz_init_set_si(__e_acsl_y,(long)y); - __gmpz_init_set_si(__e_acsl_2,(long)1); - __e_acsl_eq_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y), - (__mpz_struct const *)(__e_acsl_2)); - __e_acsl_and = __e_acsl_eq_2 == 0; - __gmpz_clear(__e_acsl_y); - __gmpz_clear(__e_acsl_2); - } - else __e_acsl_and = 0; - e_acsl_assert(__e_acsl_and,(char *)"Assertion",(char *)"main", - (char *)"x == 0 && y == 1",11); - __gmpz_clear(__e_acsl_x); - __gmpz_clear(__e_acsl); - } - /*@ assert ¬(x ≢ 0 ∧ y ≡ 1/0); */ - { - mpz_t __e_acsl_x_2; - mpz_t __e_acsl_3; - int __e_acsl_ne; - int __e_acsl_and_2; - __gmpz_init_set_si(__e_acsl_x_2,(long)x); - __gmpz_init_set_si(__e_acsl_3,(long)0); - __e_acsl_ne = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_2), - (__mpz_struct const *)(__e_acsl_3)); - if (__e_acsl_ne != 0) { - mpz_t __e_acsl_y_2; - mpz_t __e_acsl_4; - mpz_t __e_acsl_5; - int __e_acsl_div_guard; - mpz_t __e_acsl_div; - int __e_acsl_eq_3; - __gmpz_init_set_si(__e_acsl_y_2,(long)y); - __gmpz_init_set_si(__e_acsl_4,(long)1); - __gmpz_init_set_si(__e_acsl_5,(long)0); - __e_acsl_div_guard = __gmpz_cmp((__mpz_struct const *)(__e_acsl_5), - (__mpz_struct const *)(__e_acsl_5)); - __gmpz_init(__e_acsl_div); - /*@ assert E_ACSL: 0 ≢ 0; */ - e_acsl_assert(! (__e_acsl_div_guard == 0),(char *)"Assertion", - (char *)"main",(char *)"0 == 0",12); - __gmpz_tdiv_q(__e_acsl_div,(__mpz_struct const *)(__e_acsl_4), - (__mpz_struct const *)(__e_acsl_5)); - __e_acsl_eq_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_2), - (__mpz_struct const *)(__e_acsl_div)); - __e_acsl_and_2 = __e_acsl_eq_3 == 0; - __gmpz_clear(__e_acsl_y_2); - __gmpz_clear(__e_acsl_4); - __gmpz_clear(__e_acsl_5); - __gmpz_clear(__e_acsl_div); - } - else __e_acsl_and_2 = 0; - e_acsl_assert(! __e_acsl_and_2,(char *)"Assertion",(char *)"main", - (char *)"!(x != 0 && y == 1/0)",12); - __gmpz_clear(__e_acsl_x_2); - __gmpz_clear(__e_acsl_3); - } - /*@ assert y ≡ 1 ∨ x ≡ 1; */ - { - mpz_t __e_acsl_y_3; - mpz_t __e_acsl_6; - int __e_acsl_eq_4; - int __e_acsl_or; - __gmpz_init_set_si(__e_acsl_y_3,(long)y); - __gmpz_init_set_si(__e_acsl_6,(long)1); - __e_acsl_eq_4 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_3), - (__mpz_struct const *)(__e_acsl_6)); - if (__e_acsl_eq_4 == 0) __e_acsl_or = 1; - else { - mpz_t __e_acsl_x_3; - mpz_t __e_acsl_7; - int __e_acsl_eq_5; - __gmpz_init_set_si(__e_acsl_x_3,(long)x); - __gmpz_init_set_si(__e_acsl_7,(long)1); - __e_acsl_eq_5 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_3), - (__mpz_struct const *)(__e_acsl_7)); - __e_acsl_or = __e_acsl_eq_5 == 0; - __gmpz_clear(__e_acsl_x_3); - __gmpz_clear(__e_acsl_7); - } - e_acsl_assert(__e_acsl_or,(char *)"Assertion",(char *)"main", - (char *)"y == 1 || x == 1",13); - __gmpz_clear(__e_acsl_y_3); - __gmpz_clear(__e_acsl_6); - } - /*@ assert x ≡ 0 ∨ y ≡ 1/0; */ - { - mpz_t __e_acsl_x_4; - mpz_t __e_acsl_8; - int __e_acsl_eq_6; - int __e_acsl_or_2; - __gmpz_init_set_si(__e_acsl_x_4,(long)x); - __gmpz_init_set_si(__e_acsl_8,(long)0); - __e_acsl_eq_6 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_4), - (__mpz_struct const *)(__e_acsl_8)); - if (__e_acsl_eq_6 == 0) __e_acsl_or_2 = 1; - else { - mpz_t __e_acsl_y_4; - mpz_t __e_acsl_9; - mpz_t __e_acsl_10; - int __e_acsl_div_guard_2; - mpz_t __e_acsl_div_2; - int __e_acsl_eq_7; - __gmpz_init_set_si(__e_acsl_y_4,(long)y); - __gmpz_init_set_si(__e_acsl_9,(long)1); - __gmpz_init_set_si(__e_acsl_10,(long)0); - __e_acsl_div_guard_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_10), - (__mpz_struct const *)(__e_acsl_10)); - __gmpz_init(__e_acsl_div_2); - /*@ assert E_ACSL: 0 ≢ 0; */ - e_acsl_assert(! (__e_acsl_div_guard_2 == 0),(char *)"Assertion", - (char *)"main",(char *)"0 == 0",14); - __gmpz_tdiv_q(__e_acsl_div_2,(__mpz_struct const *)(__e_acsl_9), - (__mpz_struct const *)(__e_acsl_10)); - __e_acsl_eq_7 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_4), - (__mpz_struct const *)(__e_acsl_div_2)); - __e_acsl_or_2 = __e_acsl_eq_7 == 0; - __gmpz_clear(__e_acsl_y_4); - __gmpz_clear(__e_acsl_9); - __gmpz_clear(__e_acsl_10); - __gmpz_clear(__e_acsl_div_2); - } - e_acsl_assert(__e_acsl_or_2,(char *)"Assertion",(char *)"main", - (char *)"x == 0 || y == 1/0",14); - __gmpz_clear(__e_acsl_x_4); - __gmpz_clear(__e_acsl_8); - } - /*@ assert x ≡ 0 ⇒ y ≡ 1; */ - { - mpz_t __e_acsl_x_5; - mpz_t __e_acsl_11; - int __e_acsl_eq_8; - int __e_acsl_implies; - __gmpz_init_set_si(__e_acsl_x_5,(long)x); - __gmpz_init_set_si(__e_acsl_11,(long)0); - __e_acsl_eq_8 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_5), - (__mpz_struct const *)(__e_acsl_11)); - if (! (__e_acsl_eq_8 == 0)) __e_acsl_implies = 1; - else { - mpz_t __e_acsl_y_5; - mpz_t __e_acsl_12; - int __e_acsl_eq_9; - __gmpz_init_set_si(__e_acsl_y_5,(long)y); - __gmpz_init_set_si(__e_acsl_12,(long)1); - __e_acsl_eq_9 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_5), - (__mpz_struct const *)(__e_acsl_12)); - __e_acsl_implies = __e_acsl_eq_9 == 0; - __gmpz_clear(__e_acsl_y_5); - __gmpz_clear(__e_acsl_12); - } - e_acsl_assert(__e_acsl_implies,(char *)"Assertion",(char *)"main", - (char *)"x == 0 ==> y == 1",15); - __gmpz_clear(__e_acsl_x_5); - __gmpz_clear(__e_acsl_11); - } - /*@ assert x ≡ 1 ⇒ y ≡ 1/0; */ - { - mpz_t __e_acsl_x_6; - mpz_t __e_acsl_13; - int __e_acsl_eq_10; - int __e_acsl_implies_2; - __gmpz_init_set_si(__e_acsl_x_6,(long)x); - __gmpz_init_set_si(__e_acsl_13,(long)1); - __e_acsl_eq_10 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_6), - (__mpz_struct const *)(__e_acsl_13)); - if (! (__e_acsl_eq_10 == 0)) __e_acsl_implies_2 = 1; - else { - mpz_t __e_acsl_y_6; - mpz_t __e_acsl_14; - mpz_t __e_acsl_15; - int __e_acsl_div_guard_3; - mpz_t __e_acsl_div_3; - int __e_acsl_eq_11; - __gmpz_init_set_si(__e_acsl_y_6,(long)y); - __gmpz_init_set_si(__e_acsl_14,(long)1); - __gmpz_init_set_si(__e_acsl_15,(long)0); - __e_acsl_div_guard_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_15), - (__mpz_struct const *)(__e_acsl_15)); - __gmpz_init(__e_acsl_div_3); - /*@ assert E_ACSL: 0 ≢ 0; */ - e_acsl_assert(! (__e_acsl_div_guard_3 == 0),(char *)"Assertion", - (char *)"main",(char *)"0 == 0",16); - __gmpz_tdiv_q(__e_acsl_div_3,(__mpz_struct const *)(__e_acsl_14), - (__mpz_struct const *)(__e_acsl_15)); - __e_acsl_eq_11 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_6), - (__mpz_struct const *)(__e_acsl_div_3)); - __e_acsl_implies_2 = __e_acsl_eq_11 == 0; - __gmpz_clear(__e_acsl_y_6); - __gmpz_clear(__e_acsl_14); - __gmpz_clear(__e_acsl_15); - __gmpz_clear(__e_acsl_div_3); - } - e_acsl_assert(__e_acsl_implies_2,(char *)"Assertion",(char *)"main", - (char *)"x == 1 ==> y == 1/0",16); - __gmpz_clear(__e_acsl_x_6); - __gmpz_clear(__e_acsl_13); - } - /*@ assert x≢0? x ≢ 0: y ≢ 0; */ - { - mpz_t __e_acsl_x_7; - mpz_t __e_acsl_16; - int __e_acsl_ne_2; - int __e_acsl_if; - __gmpz_init_set_si(__e_acsl_x_7,(long)x); - __gmpz_init_set_si(__e_acsl_16,0L); - __e_acsl_ne_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_7), - (__mpz_struct const *)(__e_acsl_16)); - if (__e_acsl_ne_2 != 0) { - mpz_t __e_acsl_x_8; - mpz_t __e_acsl_17; - int __e_acsl_ne_3; - __gmpz_init_set_si(__e_acsl_x_8,(long)x); - __gmpz_init_set_si(__e_acsl_17,0L); - __e_acsl_ne_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_8), - (__mpz_struct const *)(__e_acsl_17)); - __e_acsl_if = __e_acsl_ne_3 != 0; - __gmpz_clear(__e_acsl_x_8); - __gmpz_clear(__e_acsl_17); - } - else { - mpz_t __e_acsl_y_7; - mpz_t __e_acsl_18; - int __e_acsl_ne_4; - __gmpz_init_set_si(__e_acsl_y_7,(long)y); - __gmpz_init_set_si(__e_acsl_18,0L); - __e_acsl_ne_4 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_7), - (__mpz_struct const *)(__e_acsl_18)); - __e_acsl_if = __e_acsl_ne_4 != 0; - __gmpz_clear(__e_acsl_y_7); - __gmpz_clear(__e_acsl_18); - } - e_acsl_assert(__e_acsl_if,(char *)"Assertion",(char *)"main", - (char *)"x!=0? x != 0: y != 0",17); - __gmpz_clear(__e_acsl_x_7); - __gmpz_clear(__e_acsl_16); - } - /*@ assert y≢0? y ≢ 0: x ≢ 0; */ - { - mpz_t __e_acsl_y_8; - mpz_t __e_acsl_19; - int __e_acsl_ne_5; - int __e_acsl_if_2; - __gmpz_init_set_si(__e_acsl_y_8,(long)y); - __gmpz_init_set_si(__e_acsl_19,0L); - __e_acsl_ne_5 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_8), - (__mpz_struct const *)(__e_acsl_19)); - if (__e_acsl_ne_5 != 0) { - mpz_t __e_acsl_y_9; - mpz_t __e_acsl_20; - int __e_acsl_ne_6; - __gmpz_init_set_si(__e_acsl_y_9,(long)y); - __gmpz_init_set_si(__e_acsl_20,0L); - __e_acsl_ne_6 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_9), - (__mpz_struct const *)(__e_acsl_20)); - __e_acsl_if_2 = __e_acsl_ne_6 != 0; - __gmpz_clear(__e_acsl_y_9); - __gmpz_clear(__e_acsl_20); - } - else { - mpz_t __e_acsl_x_9; - mpz_t __e_acsl_21; - int __e_acsl_ne_7; - __gmpz_init_set_si(__e_acsl_x_9,(long)x); - __gmpz_init_set_si(__e_acsl_21,0L); - __e_acsl_ne_7 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_9), - (__mpz_struct const *)(__e_acsl_21)); - __e_acsl_if_2 = __e_acsl_ne_7 != 0; - __gmpz_clear(__e_acsl_x_9); - __gmpz_clear(__e_acsl_21); - } - e_acsl_assert(__e_acsl_if_2,(char *)"Assertion",(char *)"main", - (char *)"y!=0? y != 0: x != 0",18); - __gmpz_clear(__e_acsl_y_8); - __gmpz_clear(__e_acsl_19); - } - /*@ assert x≡1? x ≡ 18: x ≡ 0; */ - { - mpz_t __e_acsl_x_10; - mpz_t __e_acsl_22; - int __e_acsl_eq_12; - int __e_acsl_if_3; - __gmpz_init_set_si(__e_acsl_x_10,(long)x); - __gmpz_init_set_si(__e_acsl_22,(long)1); - __e_acsl_eq_12 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_10), - (__mpz_struct const *)(__e_acsl_22)); - if (__e_acsl_eq_12 == 0) { - mpz_t __e_acsl_x_11; - mpz_t __e_acsl_23; - int __e_acsl_eq_13; - __gmpz_init_set_si(__e_acsl_x_11,(long)x); - __gmpz_init_set_si(__e_acsl_23,(long)18); - __e_acsl_eq_13 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_11), - (__mpz_struct const *)(__e_acsl_23)); - __e_acsl_if_3 = __e_acsl_eq_13 == 0; - __gmpz_clear(__e_acsl_x_11); - __gmpz_clear(__e_acsl_23); - } - else { - mpz_t __e_acsl_x_12; - mpz_t __e_acsl_24; - int __e_acsl_eq_14; - __gmpz_init_set_si(__e_acsl_x_12,(long)x); - __gmpz_init_set_si(__e_acsl_24,(long)0); - __e_acsl_eq_14 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_12), - (__mpz_struct const *)(__e_acsl_24)); - __e_acsl_if_3 = __e_acsl_eq_14 == 0; - __gmpz_clear(__e_acsl_x_12); - __gmpz_clear(__e_acsl_24); - } - e_acsl_assert(__e_acsl_if_3,(char *)"Assertion",(char *)"main", - (char *)"x==1? x == 18: x == 0",19); - __gmpz_clear(__e_acsl_x_10); - __gmpz_clear(__e_acsl_22); - } - /*@ assert x ≡ 2 ⇔ y ≡ 3; */ - { - mpz_t __e_acsl_x_13; - mpz_t __e_acsl_25; - int __e_acsl_eq_15; - int __e_acsl_implies_3; - int __e_acsl_equiv; - __gmpz_init_set_si(__e_acsl_x_13,(long)x); - __gmpz_init_set_si(__e_acsl_25,(long)2); - __e_acsl_eq_15 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_13), - (__mpz_struct const *)(__e_acsl_25)); - if (! (__e_acsl_eq_15 == 0)) __e_acsl_implies_3 = 1; - else { - mpz_t __e_acsl_y_10; - mpz_t __e_acsl_26; - int __e_acsl_eq_16; - __gmpz_init_set_si(__e_acsl_y_10,(long)y); - __gmpz_init_set_si(__e_acsl_26,(long)3); - __e_acsl_eq_16 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_10), - (__mpz_struct const *)(__e_acsl_26)); - __e_acsl_implies_3 = __e_acsl_eq_16 == 0; - __gmpz_clear(__e_acsl_y_10); - __gmpz_clear(__e_acsl_26); - } - if (__e_acsl_implies_3) { - mpz_t __e_acsl_y_11; - mpz_t __e_acsl_27; - int __e_acsl_eq_17; - int __e_acsl_implies_4; - __gmpz_init_set_si(__e_acsl_y_11,(long)y); - __gmpz_init_set_si(__e_acsl_27,(long)3); - __e_acsl_eq_17 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_11), - (__mpz_struct const *)(__e_acsl_27)); - if (! (__e_acsl_eq_17 == 0)) __e_acsl_implies_4 = 1; - else { - mpz_t __e_acsl_x_14; - mpz_t __e_acsl_28; - int __e_acsl_eq_18; - __gmpz_init_set_si(__e_acsl_x_14,(long)x); - __gmpz_init_set_si(__e_acsl_28,(long)2); - __e_acsl_eq_18 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_14), - (__mpz_struct const *)(__e_acsl_28)); - __e_acsl_implies_4 = __e_acsl_eq_18 == 0; - __gmpz_clear(__e_acsl_x_14); - __gmpz_clear(__e_acsl_28); - } - __e_acsl_equiv = __e_acsl_implies_4; - __gmpz_clear(__e_acsl_y_11); - __gmpz_clear(__e_acsl_27); - } - else __e_acsl_equiv = 0; - e_acsl_assert(__e_acsl_equiv,(char *)"Assertion",(char *)"main", - (char *)"x == 2 <==> y == 3",22); - __gmpz_clear(__e_acsl_x_13); - __gmpz_clear(__e_acsl_25); - } - /*@ assert x ≡ 0 ⇔ y ≡ 1; */ - { - mpz_t __e_acsl_x_15; - mpz_t __e_acsl_29; - int __e_acsl_eq_19; - int __e_acsl_implies_5; - int __e_acsl_equiv_2; - __gmpz_init_set_si(__e_acsl_x_15,(long)x); - __gmpz_init_set_si(__e_acsl_29,(long)0); - __e_acsl_eq_19 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_15), - (__mpz_struct const *)(__e_acsl_29)); - if (! (__e_acsl_eq_19 == 0)) __e_acsl_implies_5 = 1; - else { - mpz_t __e_acsl_y_12; - mpz_t __e_acsl_30; - int __e_acsl_eq_20; - __gmpz_init_set_si(__e_acsl_y_12,(long)y); - __gmpz_init_set_si(__e_acsl_30,(long)1); - __e_acsl_eq_20 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_12), - (__mpz_struct const *)(__e_acsl_30)); - __e_acsl_implies_5 = __e_acsl_eq_20 == 0; - __gmpz_clear(__e_acsl_y_12); - __gmpz_clear(__e_acsl_30); - } - if (__e_acsl_implies_5) { - mpz_t __e_acsl_y_13; - mpz_t __e_acsl_31; - int __e_acsl_eq_21; - int __e_acsl_implies_6; - __gmpz_init_set_si(__e_acsl_y_13,(long)y); - __gmpz_init_set_si(__e_acsl_31,(long)1); - __e_acsl_eq_21 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_13), - (__mpz_struct const *)(__e_acsl_31)); - if (! (__e_acsl_eq_21 == 0)) __e_acsl_implies_6 = 1; - else { - mpz_t __e_acsl_x_16; - mpz_t __e_acsl_32; - int __e_acsl_eq_22; - __gmpz_init_set_si(__e_acsl_x_16,(long)x); - __gmpz_init_set_si(__e_acsl_32,(long)0); - __e_acsl_eq_22 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_16), - (__mpz_struct const *)(__e_acsl_32)); - __e_acsl_implies_6 = __e_acsl_eq_22 == 0; - __gmpz_clear(__e_acsl_x_16); - __gmpz_clear(__e_acsl_32); - } - __e_acsl_equiv_2 = __e_acsl_implies_6; - __gmpz_clear(__e_acsl_y_13); - __gmpz_clear(__e_acsl_31); - } - else __e_acsl_equiv_2 = 0; - e_acsl_assert(__e_acsl_equiv_2,(char *)"Assertion",(char *)"main", - (char *)"x == 0 <==> y == 1",23); - __gmpz_clear(__e_acsl_x_15); - __gmpz_clear(__e_acsl_29); - } - /*@ assert ((x≢0? x: y)≢0) ≡ (x≡0); */ - { - mpz_t __e_acsl_x_17; - mpz_t __e_acsl_33; - int __e_acsl_ne_8; - mpz_t __e_acsl_if_4; - int __e_acsl_ne_9; - mpz_t __e_acsl_34; - int __e_acsl_eq_23; - mpz_t __e_acsl_35; - int __e_acsl_eq_24; - __gmpz_init_set_si(__e_acsl_x_17,(long)x); - __gmpz_init_set_si(__e_acsl_33,0L); - __e_acsl_ne_8 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_17), - (__mpz_struct const *)(__e_acsl_33)); - if (__e_acsl_ne_8 != 0) { - mpz_t __e_acsl_x_18; - __gmpz_init_set_si(__e_acsl_x_18,(long)x); - __gmpz_init_set(__e_acsl_if_4,(__mpz_struct const *)(__e_acsl_x_18)); - __gmpz_clear(__e_acsl_x_18); - } - else { - mpz_t __e_acsl_y_14; - __gmpz_init_set_si(__e_acsl_y_14,(long)y); - __gmpz_init_set(__e_acsl_if_4,(__mpz_struct const *)(__e_acsl_y_14)); - __gmpz_clear(__e_acsl_y_14); - } - __e_acsl_ne_9 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_if_4), - (__mpz_struct const *)(__e_acsl_33)); - __gmpz_init_set_si(__e_acsl_34,(long)(__e_acsl_ne_9 != 0)); - __e_acsl_eq_23 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_17), - (__mpz_struct const *)(__e_acsl_33)); - __gmpz_init_set_si(__e_acsl_35,(long)(__e_acsl_eq_23 == 0)); - __e_acsl_eq_24 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_34), - (__mpz_struct const *)(__e_acsl_35)); - e_acsl_assert(__e_acsl_eq_24 == 0,(char *)"Assertion",(char *)"main", - (char *)"((x!=0? x: y)!=0) == (x==0)",26); - __gmpz_clear(__e_acsl_x_17); - __gmpz_clear(__e_acsl_33); - __gmpz_clear(__e_acsl_if_4); - __gmpz_clear(__e_acsl_34); - __gmpz_clear(__e_acsl_35); - } - /*@ assert (x ≢ 0 ∧ y ≢ 0) ∨ y ≢ 0; */ - { - mpz_t __e_acsl_x_19; - mpz_t __e_acsl_36; - int __e_acsl_ne_10; - int __e_acsl_and_3; - int __e_acsl_or_3; - __gmpz_init_set_si(__e_acsl_x_19,(long)x); - __gmpz_init_set_si(__e_acsl_36,0L); - __e_acsl_ne_10 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_19), - (__mpz_struct const *)(__e_acsl_36)); - if (__e_acsl_ne_10 != 0) { - mpz_t __e_acsl_y_15; - mpz_t __e_acsl_37; - int __e_acsl_ne_11; - __gmpz_init_set_si(__e_acsl_y_15,(long)y); - __gmpz_init_set_si(__e_acsl_37,0L); - __e_acsl_ne_11 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_15), - (__mpz_struct const *)(__e_acsl_37)); - __e_acsl_and_3 = __e_acsl_ne_11 != 0; - __gmpz_clear(__e_acsl_y_15); - __gmpz_clear(__e_acsl_37); - } - else __e_acsl_and_3 = 0; - if (__e_acsl_and_3) __e_acsl_or_3 = 1; - else { - mpz_t __e_acsl_y_16; - mpz_t __e_acsl_38; - int __e_acsl_ne_12; - __gmpz_init_set_si(__e_acsl_y_16,(long)y); - __gmpz_init_set_si(__e_acsl_38,0L); - __e_acsl_ne_12 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_16), - (__mpz_struct const *)(__e_acsl_38)); - __e_acsl_or_3 = __e_acsl_ne_12 != 0; - __gmpz_clear(__e_acsl_y_16); - __gmpz_clear(__e_acsl_38); - } - e_acsl_assert(__e_acsl_or_3,(char *)"Assertion",(char *)"main", - (char *)"(x != 0 && y != 0) || y != 0",27); - __gmpz_clear(__e_acsl_x_19); - __gmpz_clear(__e_acsl_36); - } - /*@ assert (x ≢ 0 ∨ y ≢ 0) ∧ y ≡ 1; */ - { - mpz_t __e_acsl_x_20; - mpz_t __e_acsl_39; - int __e_acsl_ne_13; - int __e_acsl_or_4; - int __e_acsl_and_4; - __gmpz_init_set_si(__e_acsl_x_20,(long)x); - __gmpz_init_set_si(__e_acsl_39,0L); - __e_acsl_ne_13 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_20), - (__mpz_struct const *)(__e_acsl_39)); - if (__e_acsl_ne_13 != 0) __e_acsl_or_4 = 1; - else { - mpz_t __e_acsl_y_17; - mpz_t __e_acsl_40; - int __e_acsl_ne_14; - __gmpz_init_set_si(__e_acsl_y_17,(long)y); - __gmpz_init_set_si(__e_acsl_40,0L); - __e_acsl_ne_14 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_17), - (__mpz_struct const *)(__e_acsl_40)); - __e_acsl_or_4 = __e_acsl_ne_14 != 0; - __gmpz_clear(__e_acsl_y_17); - __gmpz_clear(__e_acsl_40); - } - if (__e_acsl_or_4) { - mpz_t __e_acsl_y_18; - mpz_t __e_acsl_41; - int __e_acsl_eq_25; - __gmpz_init_set_si(__e_acsl_y_18,(long)y); - __gmpz_init_set_si(__e_acsl_41,(long)1); - __e_acsl_eq_25 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_18), - (__mpz_struct const *)(__e_acsl_41)); - __e_acsl_and_4 = __e_acsl_eq_25 == 0; - __gmpz_clear(__e_acsl_y_18); - __gmpz_clear(__e_acsl_41); - } - else __e_acsl_and_4 = 0; - e_acsl_assert(__e_acsl_and_4,(char *)"Assertion",(char *)"main", - (char *)"(x != 0 || y != 0) && y == 1",28); - __gmpz_clear(__e_acsl_x_20); - __gmpz_clear(__e_acsl_39); - } - /*@ assert (x≢0∨y≢0) ≡ (y≢0); */ - { - mpz_t __e_acsl_x_21; - mpz_t __e_acsl_42; - int __e_acsl_ne_15; - mpz_t __e_acsl_or_5; - mpz_t __e_acsl_y_20; - int __e_acsl_ne_17; - mpz_t __e_acsl_45; - int __e_acsl_eq_26; - __gmpz_init_set_si(__e_acsl_x_21,(long)x); - __gmpz_init_set_si(__e_acsl_42,0L); - __e_acsl_ne_15 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_21), - (__mpz_struct const *)(__e_acsl_42)); - if (__e_acsl_ne_15 != 0) __gmpz_init_set_si(__e_acsl_or_5,1L); - else { - mpz_t __e_acsl_y_19; - mpz_t __e_acsl_43; - int __e_acsl_ne_16; - mpz_t __e_acsl_44; - __gmpz_init_set_si(__e_acsl_y_19,(long)y); - __gmpz_init_set_si(__e_acsl_43,0L); - __e_acsl_ne_16 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_19), - (__mpz_struct const *)(__e_acsl_43)); - __gmpz_init_set_si(__e_acsl_44,(long)(__e_acsl_ne_16 != 0)); - __gmpz_init_set(__e_acsl_or_5,(__mpz_struct const *)(__e_acsl_44)); - __gmpz_clear(__e_acsl_y_19); - __gmpz_clear(__e_acsl_43); - __gmpz_clear(__e_acsl_44); - } - __gmpz_init_set_si(__e_acsl_y_20,(long)y); - __e_acsl_ne_17 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_20), - (__mpz_struct const *)(__e_acsl_42)); - __gmpz_init_set_si(__e_acsl_45,(long)(__e_acsl_ne_17 != 0)); - __e_acsl_eq_26 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_or_5), - (__mpz_struct const *)(__e_acsl_45)); - e_acsl_assert(__e_acsl_eq_26 == 0,(char *)"Assertion",(char *)"main", - (char *)"(x!=0||y!=0) == (y!=0)",29); - __gmpz_clear(__e_acsl_x_21); - __gmpz_clear(__e_acsl_42); - __gmpz_clear(__e_acsl_or_5); - __gmpz_clear(__e_acsl_y_20); - __gmpz_clear(__e_acsl_45); - } - /*@ assert (x≢0 ∧ y≢0) ≡ (x≢0); */ - { - mpz_t __e_acsl_x_22; - mpz_t __e_acsl_46; - int __e_acsl_ne_18; - mpz_t __e_acsl_and_5; - int __e_acsl_ne_20; - mpz_t __e_acsl_49; - int __e_acsl_eq_27; - __gmpz_init_set_si(__e_acsl_x_22,(long)x); - __gmpz_init_set_si(__e_acsl_46,0L); - __e_acsl_ne_18 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_22), - (__mpz_struct const *)(__e_acsl_46)); - if (__e_acsl_ne_18 != 0) { - mpz_t __e_acsl_y_21; - mpz_t __e_acsl_47; - int __e_acsl_ne_19; - mpz_t __e_acsl_48; - __gmpz_init_set_si(__e_acsl_y_21,(long)y); - __gmpz_init_set_si(__e_acsl_47,0L); - __e_acsl_ne_19 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_21), - (__mpz_struct const *)(__e_acsl_47)); - __gmpz_init_set_si(__e_acsl_48,(long)(__e_acsl_ne_19 != 0)); - __gmpz_init_set(__e_acsl_and_5,(__mpz_struct const *)(__e_acsl_48)); - __gmpz_clear(__e_acsl_y_21); - __gmpz_clear(__e_acsl_47); - __gmpz_clear(__e_acsl_48); - } - else __gmpz_init_set_si(__e_acsl_and_5,0L); - __e_acsl_ne_20 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_22), - (__mpz_struct const *)(__e_acsl_46)); - __gmpz_init_set_si(__e_acsl_49,(long)(__e_acsl_ne_20 != 0)); - __e_acsl_eq_27 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_and_5), - (__mpz_struct const *)(__e_acsl_49)); - e_acsl_assert(__e_acsl_eq_27 == 0,(char *)"Assertion",(char *)"main", - (char *)"(x!=0 && y!=0) == (x!=0)",30); - __gmpz_clear(__e_acsl_x_22); - __gmpz_clear(__e_acsl_46); - __gmpz_clear(__e_acsl_and_5); - __gmpz_clear(__e_acsl_49); - } - __retres = 0; - return __retres; -} - - 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 deleted file mode 100644 index 6f087c5d81d..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_linear_search2.c +++ /dev/null @@ -1,573 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - assigns *z; - assigns *z \from __e_acsl_init; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init(__mpz_struct * /*[1]*/ z); - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid_read(z_orig); - requires \valid(z); - assigns *z; - assigns *z \from *z_orig; - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_set(__mpz_struct * /*[1]*/ z, - __mpz_struct const * /*[1]*/ z_orig); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ requires \valid(z1); - requires \valid_read(z2); - requires \valid_read(z3); - assigns *z1; - assigns *z1 \from *z2, *z3; - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); - -/*@ requires \valid_read(z); - assigns \result; - assigns \result \from *z; */ -extern __attribute__((__FC_BUILTIN__)) unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int A[10]; -/*@ requires ∀ ℤ i; 0 ≤ i < 9 ⇒ A[i] ≤ A[i+1]; - - behavior exists: - assumes ∃ ℤ j; 0 ≤ j < 10 ∧ A[j] ≡ elt; - ensures \result ≡ 1; - - behavior not_exists: - assumes ∀ ℤ j; 0 ≤ j < 10 ⇒ A[j] ≢ elt; - ensures \result ≡ 0; - */ -int search(int elt) -{ - int __retres; - int k; - k = 0; - { - int __e_acsl_forall; - mpz_t __e_acsl_i; - mpz_t __e_acsl_4; - mpz_t __e_acsl_k_2; - int __e_acsl_le; - int __e_acsl_and; - __e_acsl_forall = 1; - __gmpz_init(__e_acsl_i); - { - mpz_t __e_acsl_2; - __gmpz_init_set_si(__e_acsl_2,(long)0); - __gmpz_set(__e_acsl_i,(__mpz_struct const *)(__e_acsl_2)); - __gmpz_clear(__e_acsl_2); - } - while (1) { - { - mpz_t __e_acsl_k; - int __e_acsl_lt_2; - __gmpz_init_set_si(__e_acsl_k,(long)k); - __e_acsl_lt_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_i), - (__mpz_struct const *)(__e_acsl_k)); - if (__e_acsl_lt_2 < 0) ; else break; - __gmpz_clear(__e_acsl_k); - } - { - unsigned long __e_acsl_i_2; - mpz_t __e_acsl; - mpz_t __e_acsl_elt; - int __e_acsl_lt; - __e_acsl_i_2 = __gmpz_get_ui((__mpz_struct const *)(__e_acsl_i)); - __gmpz_init_set_si(__e_acsl,(long)A[__e_acsl_i_2]); - __gmpz_init_set_si(__e_acsl_elt,(long)elt); - __e_acsl_lt = __gmpz_cmp((__mpz_struct const *)(__e_acsl), - (__mpz_struct const *)(__e_acsl_elt)); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_elt); - if (__e_acsl_lt < 0) ; - else { - __e_acsl_forall = 0; - goto e_acsl_end_loop1; - } - } - { - mpz_t __e_acsl_3; - mpz_t __e_acsl_add; - __gmpz_init_set_si(__e_acsl_3,1L); - __gmpz_init(__e_acsl_add); - __gmpz_add(__e_acsl_add,(__mpz_struct const *)(__e_acsl_i), - (__mpz_struct const *)(__e_acsl_3)); - __gmpz_set(__e_acsl_i,(__mpz_struct const *)(__e_acsl_add)); - __gmpz_clear(__e_acsl_3); - __gmpz_clear(__e_acsl_add); - } - } - e_acsl_end_loop1: ; - e_acsl_assert(__e_acsl_forall,(char *)"Invariant",(char *)"search", - (char *)"\\forall integer i; 0 <= i < k ==> A[i] < elt",20); - __gmpz_init_set_si(__e_acsl_4,(long)0); - __gmpz_init_set_si(__e_acsl_k_2,(long)k); - __e_acsl_le = __gmpz_cmp((__mpz_struct const *)(__e_acsl_4), - (__mpz_struct const *)(__e_acsl_k_2)); - if (__e_acsl_le <= 0) { - mpz_t __e_acsl_k_3; - mpz_t __e_acsl_5; - int __e_acsl_le_2; - __gmpz_init_set_si(__e_acsl_k_3,(long)k); - __gmpz_init_set_si(__e_acsl_5,(long)10); - __e_acsl_le_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_k_3), - (__mpz_struct const *)(__e_acsl_5)); - __e_acsl_and = __e_acsl_le_2 <= 0; - __gmpz_clear(__e_acsl_k_3); - __gmpz_clear(__e_acsl_5); - } - else __e_acsl_and = 0; - e_acsl_assert(__e_acsl_and,(char *)"Invariant",(char *)"search", - (char *)"0 <= k <= 10",19); - __gmpz_clear(__e_acsl_i); - __gmpz_clear(__e_acsl_4); - __gmpz_clear(__e_acsl_k_2); - /*@ loop invariant 0 ≤ k ≤ 10; - loop invariant ∀ ℤ i; 0 ≤ i < k ⇒ A[i] < elt; - */ - while (k < 10) { - if (A[k] == elt) { - __retres = 1; - goto return_label; - } - else - if (A[k] > elt) { - __retres = 0; - goto return_label; - } - { - mpz_t __e_acsl_6; - mpz_t __e_acsl_k_4; - int __e_acsl_le_3; - int __e_acsl_and_2; - int __e_acsl_forall_2; - mpz_t __e_acsl_i_3; - k ++; - __gmpz_init_set_si(__e_acsl_6,(long)0); - __gmpz_init_set_si(__e_acsl_k_4,(long)k); - __e_acsl_le_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_6), - (__mpz_struct const *)(__e_acsl_k_4)); - if (__e_acsl_le_3 <= 0) { - mpz_t __e_acsl_k_5; - mpz_t __e_acsl_7; - int __e_acsl_le_4; - __gmpz_init_set_si(__e_acsl_k_5,(long)k); - __gmpz_init_set_si(__e_acsl_7,(long)10); - __e_acsl_le_4 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_k_5), - (__mpz_struct const *)(__e_acsl_7)); - __e_acsl_and_2 = __e_acsl_le_4 <= 0; - __gmpz_clear(__e_acsl_k_5); - __gmpz_clear(__e_acsl_7); - } - else __e_acsl_and_2 = 0; - e_acsl_assert(__e_acsl_and_2,(char *)"Invariant",(char *)"search", - (char *)"0 <= k <= 10",19); - __e_acsl_forall_2 = 1; - __gmpz_init(__e_acsl_i_3); - { - mpz_t __e_acsl_9; - __gmpz_init_set_si(__e_acsl_9,(long)0); - __gmpz_set(__e_acsl_i_3,(__mpz_struct const *)(__e_acsl_9)); - __gmpz_clear(__e_acsl_9); - } - while (1) { - { - mpz_t __e_acsl_k_6; - int __e_acsl_lt_4; - __gmpz_init_set_si(__e_acsl_k_6,(long)k); - __e_acsl_lt_4 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_i_3), - (__mpz_struct const *)(__e_acsl_k_6)); - if (__e_acsl_lt_4 < 0) ; else break; - __gmpz_clear(__e_acsl_k_6); - } - { - unsigned long __e_acsl_i_4; - mpz_t __e_acsl_8; - mpz_t __e_acsl_elt_2; - int __e_acsl_lt_3; - __e_acsl_i_4 = __gmpz_get_ui((__mpz_struct const *)(__e_acsl_i_3)); - __gmpz_init_set_si(__e_acsl_8,(long)A[__e_acsl_i_4]); - __gmpz_init_set_si(__e_acsl_elt_2,(long)elt); - __e_acsl_lt_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_8), - (__mpz_struct const *)(__e_acsl_elt_2)); - __gmpz_clear(__e_acsl_8); - __gmpz_clear(__e_acsl_elt_2); - if (__e_acsl_lt_3 < 0) ; - else { - __e_acsl_forall_2 = 0; - goto e_acsl_end_loop2; - } - } - { - mpz_t __e_acsl_10; - mpz_t __e_acsl_add_2; - __gmpz_init_set_si(__e_acsl_10,1L); - __gmpz_init(__e_acsl_add_2); - __gmpz_add(__e_acsl_add_2,(__mpz_struct const *)(__e_acsl_i_3), - (__mpz_struct const *)(__e_acsl_10)); - __gmpz_set(__e_acsl_i_3,(__mpz_struct const *)(__e_acsl_add_2)); - __gmpz_clear(__e_acsl_10); - __gmpz_clear(__e_acsl_add_2); - } - } - e_acsl_end_loop2: ; - e_acsl_assert(__e_acsl_forall_2,(char *)"Invariant",(char *)"search", - (char *)"\\forall integer i; 0 <= i < k ==> A[i] < elt", - 20); - __gmpz_clear(__e_acsl_6); - __gmpz_clear(__e_acsl_k_4); - __gmpz_clear(__e_acsl_i_3); - } - } - } - __retres = 0; - return_label: return __retres; -} - -/*@ requires ∀ ℤ i; 0 ≤ i < 9 ⇒ A[i] ≤ A[i+1]; - - behavior exists: - assumes ∃ ℤ j; 0 ≤ j < 10 ∧ A[j] ≡ elt; - ensures \result ≡ 1; - - behavior not_exists: - assumes ∀ ℤ j; 0 ≤ j < 10 ⇒ A[j] ≢ elt; - ensures \result ≡ 0; - */ -int __e_acsl_search(int elt) -{ - int __e_acsl_at_2; - int __e_acsl_at; - int __retres; - { - int __e_acsl_forall; - mpz_t __e_acsl_i; - __e_acsl_forall = 1; - __gmpz_init(__e_acsl_i); - { - mpz_t __e_acsl_5; - __gmpz_init_set_si(__e_acsl_5,(long)0); - __gmpz_set(__e_acsl_i,(__mpz_struct const *)(__e_acsl_5)); - __gmpz_clear(__e_acsl_5); - } - while (1) { - { - mpz_t __e_acsl_6; - int __e_acsl_lt; - __gmpz_init_set_si(__e_acsl_6,(long)9); - __e_acsl_lt = __gmpz_cmp((__mpz_struct const *)(__e_acsl_i), - (__mpz_struct const *)(__e_acsl_6)); - if (__e_acsl_lt < 0) ; else break; - __gmpz_clear(__e_acsl_6); - } - { - unsigned long __e_acsl_i_2; - mpz_t __e_acsl; - mpz_t __e_acsl_2; - mpz_t __e_acsl_add; - unsigned long __e_acsl_3; - mpz_t __e_acsl_4; - int __e_acsl_le; - __e_acsl_i_2 = __gmpz_get_ui((__mpz_struct const *)(__e_acsl_i)); - __gmpz_init_set_si(__e_acsl,(long)A[__e_acsl_i_2]); - __gmpz_init_set_si(__e_acsl_2,(long)1); - __gmpz_init(__e_acsl_add); - __gmpz_add(__e_acsl_add,(__mpz_struct const *)(__e_acsl_i), - (__mpz_struct const *)(__e_acsl_2)); - __e_acsl_3 = __gmpz_get_ui((__mpz_struct const *)(__e_acsl_add)); - __gmpz_init_set_si(__e_acsl_4,(long)A[__e_acsl_3]); - __e_acsl_le = __gmpz_cmp((__mpz_struct const *)(__e_acsl), - (__mpz_struct const *)(__e_acsl_4)); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_2); - __gmpz_clear(__e_acsl_add); - __gmpz_clear(__e_acsl_4); - if (__e_acsl_le <= 0) ; - else { - __e_acsl_forall = 0; - goto e_acsl_end_loop3; - } - } - { - mpz_t __e_acsl_7; - mpz_t __e_acsl_add_2; - __gmpz_init_set_si(__e_acsl_7,1L); - __gmpz_init(__e_acsl_add_2); - __gmpz_add(__e_acsl_add_2,(__mpz_struct const *)(__e_acsl_i), - (__mpz_struct const *)(__e_acsl_7)); - __gmpz_set(__e_acsl_i,(__mpz_struct const *)(__e_acsl_add_2)); - __gmpz_clear(__e_acsl_7); - __gmpz_clear(__e_acsl_add_2); - } - } - e_acsl_end_loop3: ; - e_acsl_assert(__e_acsl_forall,(char *)"Precondition",(char *)"search", - (char *)"\\forall integer i; 0 <= i < 9 ==> A[i] <= A[i+1]", - 9); - __gmpz_clear(__e_acsl_i); - { - int __e_acsl_forall_2; - mpz_t __e_acsl_j_3; - __e_acsl_forall_2 = 1; - __gmpz_init(__e_acsl_j_3); - { - mpz_t __e_acsl_14; - __gmpz_init_set_si(__e_acsl_14,(long)0); - __gmpz_set(__e_acsl_j_3,(__mpz_struct const *)(__e_acsl_14)); - __gmpz_clear(__e_acsl_14); - } - while (1) { - { - mpz_t __e_acsl_15; - int __e_acsl_lt_3; - __gmpz_init_set_si(__e_acsl_15,(long)10); - __e_acsl_lt_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_j_3), - (__mpz_struct const *)(__e_acsl_15)); - if (__e_acsl_lt_3 < 0) ; else break; - __gmpz_clear(__e_acsl_15); - } - { - unsigned long __e_acsl_j_4; - mpz_t __e_acsl_13; - mpz_t __e_acsl_elt_2; - int __e_acsl_ne; - __e_acsl_j_4 = __gmpz_get_ui((__mpz_struct const *)(__e_acsl_j_3)); - __gmpz_init_set_si(__e_acsl_13,(long)A[__e_acsl_j_4]); - __gmpz_init_set_si(__e_acsl_elt_2,(long)elt); - __e_acsl_ne = __gmpz_cmp((__mpz_struct const *)(__e_acsl_13), - (__mpz_struct const *)(__e_acsl_elt_2)); - __gmpz_clear(__e_acsl_13); - __gmpz_clear(__e_acsl_elt_2); - if (__e_acsl_ne != 0) ; - else { - __e_acsl_forall_2 = 0; - goto e_acsl_end_loop5; - } - } - { - mpz_t __e_acsl_16; - mpz_t __e_acsl_add_4; - __gmpz_init_set_si(__e_acsl_16,1L); - __gmpz_init(__e_acsl_add_4); - __gmpz_add(__e_acsl_add_4,(__mpz_struct const *)(__e_acsl_j_3), - (__mpz_struct const *)(__e_acsl_16)); - __gmpz_set(__e_acsl_j_3,(__mpz_struct const *)(__e_acsl_add_4)); - __gmpz_clear(__e_acsl_16); - __gmpz_clear(__e_acsl_add_4); - } - } - e_acsl_end_loop5: ; - __e_acsl_at_2 = __e_acsl_forall_2; - __gmpz_clear(__e_acsl_j_3); - } - { - int __e_acsl_exists; - mpz_t __e_acsl_j; - __e_acsl_exists = 0; - __gmpz_init(__e_acsl_j); - { - mpz_t __e_acsl_9; - __gmpz_init_set_si(__e_acsl_9,(long)0); - __gmpz_set(__e_acsl_j,(__mpz_struct const *)(__e_acsl_9)); - __gmpz_clear(__e_acsl_9); - } - while (1) { - { - mpz_t __e_acsl_10; - int __e_acsl_lt_2; - __gmpz_init_set_si(__e_acsl_10,(long)10); - __e_acsl_lt_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_j), - (__mpz_struct const *)(__e_acsl_10)); - if (__e_acsl_lt_2 < 0) ; else break; - __gmpz_clear(__e_acsl_10); - } - { - unsigned long __e_acsl_j_2; - mpz_t __e_acsl_8; - mpz_t __e_acsl_elt; - int __e_acsl_eq; - __e_acsl_j_2 = __gmpz_get_ui((__mpz_struct const *)(__e_acsl_j)); - __gmpz_init_set_si(__e_acsl_8,(long)A[__e_acsl_j_2]); - __gmpz_init_set_si(__e_acsl_elt,(long)elt); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_8), - (__mpz_struct const *)(__e_acsl_elt)); - __gmpz_clear(__e_acsl_8); - __gmpz_clear(__e_acsl_elt); - if (! (__e_acsl_eq == 0)) ; - else { - __e_acsl_exists = 1; - goto e_acsl_end_loop4; - } - } - { - mpz_t __e_acsl_11; - mpz_t __e_acsl_add_3; - __gmpz_init_set_si(__e_acsl_11,1L); - __gmpz_init(__e_acsl_add_3); - __gmpz_add(__e_acsl_add_3,(__mpz_struct const *)(__e_acsl_j), - (__mpz_struct const *)(__e_acsl_11)); - __gmpz_set(__e_acsl_j,(__mpz_struct const *)(__e_acsl_add_3)); - __gmpz_clear(__e_acsl_11); - __gmpz_clear(__e_acsl_add_3); - } - } - e_acsl_end_loop4: ; - __e_acsl_at = __e_acsl_exists; - __gmpz_clear(__e_acsl_j); - } - __retres = search(elt); - } - { - int __e_acsl_implies; - int __e_acsl_implies_2; - if (! __e_acsl_at) __e_acsl_implies = 1; - else { - mpz_t __e_acsl_result; - mpz_t __e_acsl_12; - int __e_acsl_eq_2; - __gmpz_init_set_si(__e_acsl_result,(long)__retres); - __gmpz_init_set_si(__e_acsl_12,(long)1); - __e_acsl_eq_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_result), - (__mpz_struct const *)(__e_acsl_12)); - __e_acsl_implies = __e_acsl_eq_2 == 0; - __gmpz_clear(__e_acsl_result); - __gmpz_clear(__e_acsl_12); - } - e_acsl_assert(__e_acsl_implies,(char *)"Postcondition",(char *)"search", - (char *)"\\old(\\exists integer j; 0 <= j < 10 && A[j] == elt) ==> \\result == 1", - 12); - if (! __e_acsl_at_2) __e_acsl_implies_2 = 1; - else { - mpz_t __e_acsl_result_2; - mpz_t __e_acsl_17; - int __e_acsl_eq_3; - __gmpz_init_set_si(__e_acsl_result_2,(long)__retres); - __gmpz_init_set_si(__e_acsl_17,(long)0); - __e_acsl_eq_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_result_2), - (__mpz_struct const *)(__e_acsl_17)); - __e_acsl_implies_2 = __e_acsl_eq_3 == 0; - __gmpz_clear(__e_acsl_result_2); - __gmpz_clear(__e_acsl_17); - } - e_acsl_assert(__e_acsl_implies_2,(char *)"Postcondition", - (char *)"search", - (char *)"\\old(\\forall integer j; 0 <= j < 10 ==> A[j] != elt) ==> \\result == 0", - 15); - return __retres; - } -} - -int main(void) -{ - int __retres; - int found; - { - int i; - i = 0; - while (i < 10) { - A[i] = i * i; - i ++; - } - } - found = __e_acsl_search(36); - /*@ assert found ≡ 1; */ - { - mpz_t __e_acsl_found; - mpz_t __e_acsl; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl_found,(long)found); - __gmpz_init_set_si(__e_acsl,(long)1); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_found), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Assertion",(char *)"main", - (char *)"found == 1",33); - __gmpz_clear(__e_acsl_found); - __gmpz_clear(__e_acsl); - } - found = __e_acsl_search(5); - /*@ assert found ≡ 0; */ - { - mpz_t __e_acsl_found_2; - mpz_t __e_acsl_2; - int __e_acsl_eq_2; - __gmpz_init_set_si(__e_acsl_found_2,(long)found); - __gmpz_init_set_si(__e_acsl_2,(long)0); - __e_acsl_eq_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_found_2), - (__mpz_struct const *)(__e_acsl_2)); - e_acsl_assert(__e_acsl_eq_2 == 0,(char *)"Assertion",(char *)"main", - (char *)"found == 0",36); - __gmpz_clear(__e_acsl_found_2); - __gmpz_clear(__e_acsl_2); - } - __retres = 0; - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_literal_string2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_literal_string2.c deleted file mode 100644 index 97cb30890d1..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_literal_string2.c +++ /dev/null @@ -1,229 +0,0 @@ -/* Generated by Frama-C */ -char *__e_acsl_literal_string; -char *__e_acsl_literal_string_4; -char *__e_acsl_literal_string_3; -char *__e_acsl_literal_string_2; -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __literal_string(void *ptr); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures \result ≡ 1 ⇒ \valid((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __valid(void *ptr, size_t size); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \valid_read((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __valid_read(void *ptr, - size_t size); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \initialized((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __initialized(void *ptr, - size_t size); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int main(void); - -char *T = (char *)"bar"; -int G = 0; -void f(void) -{ - /*@ assert *(T+G) ≡ 'b'; */ - { - mpz_t __e_acsl; - mpz_t __e_acsl_2; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl,(long)*(T + (long)G)); - __gmpz_init_set_si(__e_acsl_2,(long)'b'); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl), - (__mpz_struct const *)(__e_acsl_2)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Assertion",(char *)"f", - (char *)"*(T+G) == \'b\'",13); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_2); - } - G ++; - return; -} - -char *S = (char *)"foo"; -char *S2 = (char *)"foo2"; -int IDX = 1; -int G2 = 2; -char *U = (char *)"baz"; -void __e_acsl_memory_init(void) -{ - __e_acsl_literal_string = "ss"; - __store_block((void *)__e_acsl_literal_string,sizeof("ss")); - __full_init((void *)__e_acsl_literal_string); - __literal_string((void *)__e_acsl_literal_string); - __e_acsl_literal_string_4 = "foo2"; - __store_block((void *)__e_acsl_literal_string_4,sizeof("foo2")); - __full_init((void *)__e_acsl_literal_string_4); - __literal_string((void *)__e_acsl_literal_string_4); - __e_acsl_literal_string_3 = "foo"; - __store_block((void *)__e_acsl_literal_string_3,sizeof("foo")); - __full_init((void *)__e_acsl_literal_string_3); - __literal_string((void *)__e_acsl_literal_string_3); - __e_acsl_literal_string_2 = "bar"; - __store_block((void *)__e_acsl_literal_string_2,sizeof("bar")); - __full_init((void *)__e_acsl_literal_string_2); - __literal_string((void *)__e_acsl_literal_string_2); - __store_block((void *)(& S2),4U); - __full_init((void *)(& S2)); - __store_block((void *)(& S),4U); - __full_init((void *)(& S)); - __store_block((void *)(& T),4U); - __full_init((void *)(& T)); - return; -} - -int main(void) -{ - int __retres; - char *SS; - __e_acsl_memory_init(); - __store_block((void *)(& SS),4U); - __full_init((void *)(& SS)); - SS = (char *)__e_acsl_literal_string; - /*@ assert *(S+G2) ≡ 'o'; */ - { - mpz_t __e_acsl; - mpz_t __e_acsl_2; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl,(long)*(S + (long)G2)); - __gmpz_init_set_si(__e_acsl_2,(long)'o'); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl), - (__mpz_struct const *)(__e_acsl_2)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Assertion",(char *)"main", - (char *)"*(S+G2) == \'o\'",24); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_2); - } - /*@ assert \initialized(S); */ - { - int __e_acsl_initialized; - __e_acsl_initialized = __initialized((void *)S,sizeof(char)); - e_acsl_assert(__e_acsl_initialized,(char *)"Assertion",(char *)"main", - (char *)"\\initialized(S)",25); - } - /*@ assert \valid_read(S2); */ - { - int __e_acsl_valid_read; - __e_acsl_valid_read = __valid_read((void *)S2,sizeof(char)); - e_acsl_assert(__e_acsl_valid_read,(char *)"Assertion",(char *)"main", - (char *)"\\valid_read(S2)",26); - } - /*@ assert ¬\valid(SS); */ - { - int __e_acsl_initialized_2; - int __e_acsl_and; - __e_acsl_initialized_2 = __initialized((void *)(& SS),sizeof(char *)); - if (__e_acsl_initialized_2) { - int __e_acsl_valid; - __e_acsl_valid = __valid((void *)SS,sizeof(char)); - __e_acsl_and = __e_acsl_valid; - } - else __e_acsl_and = 0; - e_acsl_assert(! __e_acsl_and,(char *)"Assertion",(char *)"main", - (char *)"!\\valid(SS)",27); - } - f(); - __retres = 0; - __delete_block((void *)(& S2)); - __delete_block((void *)(& S)); - __delete_block((void *)(& T)); - __delete_block((void *)(& SS)); - __e_acsl_memory_clean(); - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_localvar2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_localvar2.c deleted file mode 100644 index b012a7b28ff..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_localvar2.c +++ /dev/null @@ -1,164 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -struct list { - int element ; - struct list *next ; -}; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -void *__malloc(size_t size); - -/*@ ghost extern int __e_acsl_init; */ - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __initialize(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures \result ≡ 1 ⇒ \valid((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __valid(void *ptr, size_t size); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \initialized((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __initialized(void *ptr, - size_t size); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ assigns __fc_heap_status, \result; - assigns __fc_heap_status \from size, __fc_heap_status; - assigns \result \from size, __fc_heap_status; - allocates \result; - - behavior allocation: - assumes is_allocable(size); - ensures \fresh{Old, Here}(\result,\old(size)); - assigns __fc_heap_status, \result; - assigns __fc_heap_status \from size, __fc_heap_status; - assigns \result \from size, __fc_heap_status; - - behavior no_allocation: - assumes ¬is_allocable(size); - ensures \result ≡ \null; - assigns \result; - assigns \result \from \nothing; - allocates \nothing; - - complete behaviors no_allocation, allocation; - disjoint behaviors no_allocation, allocation; - */ -void *__e_acsl_malloc(size_t size) -{ - void *__retres; - __store_block((void *)(& __retres),4U); - __retres = __malloc(size); - __delete_block((void *)(& __retres)); - return __retres; -} - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - -*/ -struct list *add(struct list *l, int i) -{ - struct list *new; - __store_block((void *)(& new),4U); - __store_block((void *)(& l),4U); - __full_init((void *)(& new)); - new = (struct list *)__e_acsl_malloc(sizeof(struct list)); - /*@ assert \valid(new); */ - { - int __e_acsl_initialized; - int __e_acsl_and; - __e_acsl_initialized = __initialized((void *)(& new), - sizeof(struct list *)); - if (__e_acsl_initialized) { - int __e_acsl_valid; - __e_acsl_valid = __valid((void *)new,sizeof(struct list)); - __e_acsl_and = __e_acsl_valid; - } - else __e_acsl_and = 0; - e_acsl_assert(__e_acsl_and,(char *)"Assertion",(char *)"add", - (char *)"\\valid(new)",20); - } - __initialize((void *)(& new->element),sizeof(int)); - new->element = i; - __initialize((void *)(& new->next),sizeof(struct list *)); - new->next = l; - __delete_block((void *)(& l)); - __delete_block((void *)(& new)); - return new; -} - -int main(void) -{ - int __retres; - struct list *l; - __store_block((void *)(& l),4U); - __full_init((void *)(& l)); - l = (struct list *)0; - __full_init((void *)(& l)); - l = add(l,4); - __full_init((void *)(& l)); - l = add(l,7); - __retres = 0; - __delete_block((void *)(& l)); - __e_acsl_memory_clean(); - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_loop2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_loop2.c deleted file mode 100644 index 789eeed6d95..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_loop2.c +++ /dev/null @@ -1,580 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - assigns *z; - assigns *z \from __e_acsl_init; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init(__mpz_struct * /*[1]*/ z); - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid_read(z_orig); - requires \valid(z); - assigns *z; - assigns *z \from *z_orig; - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_set(__mpz_struct * /*[1]*/ z, - __mpz_struct const * /*[1]*/ z_orig); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ requires \valid(z1); - requires \valid_read(z2); - requires \valid_read(z3); - assigns *z1; - assigns *z1 \from *z2, *z3; - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); - -/*@ requires \valid(z1); - requires \valid_read(z2); - requires \valid_read(z3); - assigns *z1; - assigns *z1 \from *z2, *z3; - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_mul(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); - -/*@ requires \valid_read(z); - assigns \result; - assigns \result \from *z; */ -extern __attribute__((__FC_BUILTIN__)) unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -void simple_loop(void) -{ - int sum; - sum = 0; - { - int i; - i = 0; - { - mpz_t __e_acsl; - mpz_t __e_acsl_i; - int __e_acsl_le; - int __e_acsl_and; - __gmpz_init_set_si(__e_acsl,(long)0); - __gmpz_init_set_si(__e_acsl_i,(long)i); - __e_acsl_le = __gmpz_cmp((__mpz_struct const *)(__e_acsl), - (__mpz_struct const *)(__e_acsl_i)); - if (__e_acsl_le <= 0) { - mpz_t __e_acsl_i_2; - mpz_t __e_acsl_2; - int __e_acsl_le_2; - __gmpz_init_set_si(__e_acsl_i_2,(long)i); - __gmpz_init_set_si(__e_acsl_2,(long)10); - __e_acsl_le_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_i_2), - (__mpz_struct const *)(__e_acsl_2)); - __e_acsl_and = __e_acsl_le_2 <= 0; - __gmpz_clear(__e_acsl_i_2); - __gmpz_clear(__e_acsl_2); - } - else __e_acsl_and = 0; - e_acsl_assert(__e_acsl_and,(char *)"Invariant",(char *)"simple_loop", - (char *)"0 <= i <= 10",10); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_i); - /*@ loop invariant 0 ≤ i ≤ 10; */ - while (i < 10) { - sum += i; - { - mpz_t __e_acsl_3; - mpz_t __e_acsl_i_3; - int __e_acsl_le_3; - int __e_acsl_and_2; - i ++; - __gmpz_init_set_si(__e_acsl_3,(long)0); - __gmpz_init_set_si(__e_acsl_i_3,(long)i); - __e_acsl_le_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_3), - (__mpz_struct const *)(__e_acsl_i_3)); - if (__e_acsl_le_3 <= 0) { - mpz_t __e_acsl_i_4; - mpz_t __e_acsl_4; - int __e_acsl_le_4; - __gmpz_init_set_si(__e_acsl_i_4,(long)i); - __gmpz_init_set_si(__e_acsl_4,(long)10); - __e_acsl_le_4 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_i_4), - (__mpz_struct const *)(__e_acsl_4)); - __e_acsl_and_2 = __e_acsl_le_4 <= 0; - __gmpz_clear(__e_acsl_i_4); - __gmpz_clear(__e_acsl_4); - } - else __e_acsl_and_2 = 0; - e_acsl_assert(__e_acsl_and_2,(char *)"Invariant", - (char *)"simple_loop",(char *)"0 <= i <= 10",10); - __gmpz_clear(__e_acsl_3); - __gmpz_clear(__e_acsl_i_3); - } - } - } - } - return; -} - -void nested_loops(void) -{ - int t[10][15]; - int i; - i = 0; - { - mpz_t __e_acsl; - mpz_t __e_acsl_i; - int __e_acsl_le; - int __e_acsl_and; - __gmpz_init_set_si(__e_acsl,(long)0); - __gmpz_init_set_si(__e_acsl_i,(long)i); - __e_acsl_le = __gmpz_cmp((__mpz_struct const *)(__e_acsl), - (__mpz_struct const *)(__e_acsl_i)); - if (__e_acsl_le <= 0) { - mpz_t __e_acsl_i_2; - mpz_t __e_acsl_2; - int __e_acsl_le_2; - __gmpz_init_set_si(__e_acsl_i_2,(long)i); - __gmpz_init_set_si(__e_acsl_2,(long)10); - __e_acsl_le_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_i_2), - (__mpz_struct const *)(__e_acsl_2)); - __e_acsl_and = __e_acsl_le_2 <= 0; - __gmpz_clear(__e_acsl_i_2); - __gmpz_clear(__e_acsl_2); - } - else __e_acsl_and = 0; - e_acsl_assert(__e_acsl_and,(char *)"Invariant",(char *)"nested_loops", - (char *)"0 <= i <= 10",17); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_i); - /*@ loop invariant 0 ≤ i ≤ 10; */ - while (i < 10) { - { - int j; - j = 0; - { - int __e_acsl_forall; - mpz_t __e_acsl_k; - mpz_t __e_acsl_l; - mpz_t __e_acsl_8; - mpz_t __e_acsl_j_2; - int __e_acsl_le_3; - int __e_acsl_and_2; - __e_acsl_forall = 1; - __gmpz_init(__e_acsl_k); - __gmpz_init(__e_acsl_l); - { - mpz_t __e_acsl_6; - __gmpz_init_set_si(__e_acsl_6,(long)0); - __gmpz_set(__e_acsl_k,(__mpz_struct const *)(__e_acsl_6)); - __gmpz_clear(__e_acsl_6); - } - while (1) { - { - mpz_t __e_acsl_i_3; - int __e_acsl_lt_2; - __gmpz_init_set_si(__e_acsl_i_3,(long)i); - __e_acsl_lt_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_k), - (__mpz_struct const *)(__e_acsl_i_3)); - if (__e_acsl_lt_2 < 0) ; else break; - __gmpz_clear(__e_acsl_i_3); - } - { - mpz_t __e_acsl_4; - __gmpz_init_set_si(__e_acsl_4,(long)0); - __gmpz_set(__e_acsl_l,(__mpz_struct const *)(__e_acsl_4)); - __gmpz_clear(__e_acsl_4); - } - while (1) { - { - mpz_t __e_acsl_j; - int __e_acsl_lt; - __gmpz_init_set_si(__e_acsl_j,(long)j); - __e_acsl_lt = __gmpz_cmp((__mpz_struct const *)(__e_acsl_l), - (__mpz_struct const *)(__e_acsl_j)); - if (__e_acsl_lt < 0) ; else break; - __gmpz_clear(__e_acsl_j); - } - { - unsigned long __e_acsl_k_2; - unsigned long __e_acsl_l_2; - mpz_t __e_acsl_3; - mpz_t __e_acsl_mul; - int __e_acsl_eq; - __e_acsl_k_2 = __gmpz_get_ui((__mpz_struct const *)(__e_acsl_k)); - __e_acsl_l_2 = __gmpz_get_ui((__mpz_struct const *)(__e_acsl_l)); - __gmpz_init_set_si(__e_acsl_3, - (long)t[__e_acsl_k_2][__e_acsl_l_2]); - __gmpz_init(__e_acsl_mul); - __gmpz_mul(__e_acsl_mul,(__mpz_struct const *)(__e_acsl_k), - (__mpz_struct const *)(__e_acsl_l)); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_3), - (__mpz_struct const *)(__e_acsl_mul)); - __gmpz_clear(__e_acsl_3); - __gmpz_clear(__e_acsl_mul); - if (__e_acsl_eq == 0) ; - else { - __e_acsl_forall = 0; - goto e_acsl_end_loop1; - } - } - { - mpz_t __e_acsl_5; - mpz_t __e_acsl_add; - __gmpz_init_set_si(__e_acsl_5,1L); - __gmpz_init(__e_acsl_add); - __gmpz_add(__e_acsl_add,(__mpz_struct const *)(__e_acsl_l), - (__mpz_struct const *)(__e_acsl_5)); - __gmpz_set(__e_acsl_l,(__mpz_struct const *)(__e_acsl_add)); - __gmpz_clear(__e_acsl_5); - __gmpz_clear(__e_acsl_add); - } - } - { - mpz_t __e_acsl_7; - mpz_t __e_acsl_add_2; - __gmpz_init_set_si(__e_acsl_7,1L); - __gmpz_init(__e_acsl_add_2); - __gmpz_add(__e_acsl_add_2,(__mpz_struct const *)(__e_acsl_k), - (__mpz_struct const *)(__e_acsl_7)); - __gmpz_set(__e_acsl_k,(__mpz_struct const *)(__e_acsl_add_2)); - __gmpz_clear(__e_acsl_7); - __gmpz_clear(__e_acsl_add_2); - } - } - e_acsl_end_loop1: ; - e_acsl_assert(__e_acsl_forall,(char *)"Invariant", - (char *)"nested_loops", - (char *)"\\forall integer k, integer l; 0 <= k < i && 0 <= l < j ==> t[k][l] == k*l", - 21); - __gmpz_init_set_si(__e_acsl_8,(long)0); - __gmpz_init_set_si(__e_acsl_j_2,(long)j); - __e_acsl_le_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_8), - (__mpz_struct const *)(__e_acsl_j_2)); - if (__e_acsl_le_3 <= 0) { - mpz_t __e_acsl_j_3; - mpz_t __e_acsl_9; - int __e_acsl_le_4; - __gmpz_init_set_si(__e_acsl_j_3,(long)j); - __gmpz_init_set_si(__e_acsl_9,(long)15); - __e_acsl_le_4 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_j_3), - (__mpz_struct const *)(__e_acsl_9)); - __e_acsl_and_2 = __e_acsl_le_4 <= 0; - __gmpz_clear(__e_acsl_j_3); - __gmpz_clear(__e_acsl_9); - } - else __e_acsl_and_2 = 0; - e_acsl_assert(__e_acsl_and_2,(char *)"Invariant", - (char *)"nested_loops",(char *)"0 <= j <= 15",19); - __gmpz_clear(__e_acsl_k); - __gmpz_clear(__e_acsl_l); - __gmpz_clear(__e_acsl_8); - __gmpz_clear(__e_acsl_j_2); - /*@ loop invariant 0 ≤ j ≤ 15; - loop invariant - ∀ ℤ k, ℤ l; - 0 ≤ k < i ∧ 0 ≤ l < j ⇒ t[k][l] ≡ k*l; - */ - while (j < 15) { - t[i][j] = i * j; - { - mpz_t __e_acsl_10; - mpz_t __e_acsl_j_4; - int __e_acsl_le_5; - int __e_acsl_and_3; - int __e_acsl_forall_2; - mpz_t __e_acsl_k_3; - mpz_t __e_acsl_l_3; - j ++; - __gmpz_init_set_si(__e_acsl_10,(long)0); - __gmpz_init_set_si(__e_acsl_j_4,(long)j); - __e_acsl_le_5 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_10), - (__mpz_struct const *)(__e_acsl_j_4)); - if (__e_acsl_le_5 <= 0) { - mpz_t __e_acsl_j_5; - mpz_t __e_acsl_11; - int __e_acsl_le_6; - __gmpz_init_set_si(__e_acsl_j_5,(long)j); - __gmpz_init_set_si(__e_acsl_11,(long)15); - __e_acsl_le_6 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_j_5), - (__mpz_struct const *)(__e_acsl_11)); - __e_acsl_and_3 = __e_acsl_le_6 <= 0; - __gmpz_clear(__e_acsl_j_5); - __gmpz_clear(__e_acsl_11); - } - else __e_acsl_and_3 = 0; - e_acsl_assert(__e_acsl_and_3,(char *)"Invariant", - (char *)"nested_loops",(char *)"0 <= j <= 15",19); - __e_acsl_forall_2 = 1; - __gmpz_init(__e_acsl_k_3); - __gmpz_init(__e_acsl_l_3); - { - mpz_t __e_acsl_15; - __gmpz_init_set_si(__e_acsl_15,(long)0); - __gmpz_set(__e_acsl_k_3,(__mpz_struct const *)(__e_acsl_15)); - __gmpz_clear(__e_acsl_15); - } - while (1) { - { - mpz_t __e_acsl_i_4; - int __e_acsl_lt_4; - __gmpz_init_set_si(__e_acsl_i_4,(long)i); - __e_acsl_lt_4 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_k_3), - (__mpz_struct const *)(__e_acsl_i_4)); - if (__e_acsl_lt_4 < 0) ; else break; - __gmpz_clear(__e_acsl_i_4); - } - { - mpz_t __e_acsl_13; - __gmpz_init_set_si(__e_acsl_13,(long)0); - __gmpz_set(__e_acsl_l_3, - (__mpz_struct const *)(__e_acsl_13)); - __gmpz_clear(__e_acsl_13); - } - while (1) { - { - mpz_t __e_acsl_j_6; - int __e_acsl_lt_3; - __gmpz_init_set_si(__e_acsl_j_6,(long)j); - __e_acsl_lt_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_l_3), - (__mpz_struct const *)(__e_acsl_j_6)); - if (__e_acsl_lt_3 < 0) ; else break; - __gmpz_clear(__e_acsl_j_6); - } - { - unsigned long __e_acsl_k_4; - unsigned long __e_acsl_l_4; - mpz_t __e_acsl_12; - mpz_t __e_acsl_mul_2; - int __e_acsl_eq_2; - __e_acsl_k_4 = __gmpz_get_ui((__mpz_struct const *)(__e_acsl_k_3)); - __e_acsl_l_4 = __gmpz_get_ui((__mpz_struct const *)(__e_acsl_l_3)); - __gmpz_init_set_si(__e_acsl_12, - (long)t[__e_acsl_k_4][__e_acsl_l_4]); - __gmpz_init(__e_acsl_mul_2); - __gmpz_mul(__e_acsl_mul_2, - (__mpz_struct const *)(__e_acsl_k_3), - (__mpz_struct const *)(__e_acsl_l_3)); - __e_acsl_eq_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_12), - (__mpz_struct const *)(__e_acsl_mul_2)); - __gmpz_clear(__e_acsl_12); - __gmpz_clear(__e_acsl_mul_2); - if (__e_acsl_eq_2 == 0) ; - else { - __e_acsl_forall_2 = 0; - goto e_acsl_end_loop2; - } - } - { - mpz_t __e_acsl_14; - mpz_t __e_acsl_add_3; - __gmpz_init_set_si(__e_acsl_14,1L); - __gmpz_init(__e_acsl_add_3); - __gmpz_add(__e_acsl_add_3, - (__mpz_struct const *)(__e_acsl_l_3), - (__mpz_struct const *)(__e_acsl_14)); - __gmpz_set(__e_acsl_l_3, - (__mpz_struct const *)(__e_acsl_add_3)); - __gmpz_clear(__e_acsl_14); - __gmpz_clear(__e_acsl_add_3); - } - } - { - mpz_t __e_acsl_16; - mpz_t __e_acsl_add_4; - __gmpz_init_set_si(__e_acsl_16,1L); - __gmpz_init(__e_acsl_add_4); - __gmpz_add(__e_acsl_add_4, - (__mpz_struct const *)(__e_acsl_k_3), - (__mpz_struct const *)(__e_acsl_16)); - __gmpz_set(__e_acsl_k_3, - (__mpz_struct const *)(__e_acsl_add_4)); - __gmpz_clear(__e_acsl_16); - __gmpz_clear(__e_acsl_add_4); - } - } - e_acsl_end_loop2: ; - e_acsl_assert(__e_acsl_forall_2,(char *)"Invariant", - (char *)"nested_loops", - (char *)"\\forall integer k, integer l; 0 <= k < i && 0 <= l < j ==> t[k][l] == k*l", - 21); - __gmpz_clear(__e_acsl_10); - __gmpz_clear(__e_acsl_j_4); - __gmpz_clear(__e_acsl_k_3); - __gmpz_clear(__e_acsl_l_3); - } - } - } - } - { - mpz_t __e_acsl_17; - mpz_t __e_acsl_i_5; - int __e_acsl_le_7; - int __e_acsl_and_4; - i ++; - __gmpz_init_set_si(__e_acsl_17,(long)0); - __gmpz_init_set_si(__e_acsl_i_5,(long)i); - __e_acsl_le_7 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_17), - (__mpz_struct const *)(__e_acsl_i_5)); - if (__e_acsl_le_7 <= 0) { - mpz_t __e_acsl_i_6; - mpz_t __e_acsl_18; - int __e_acsl_le_8; - __gmpz_init_set_si(__e_acsl_i_6,(long)i); - __gmpz_init_set_si(__e_acsl_18,(long)10); - __e_acsl_le_8 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_i_6), - (__mpz_struct const *)(__e_acsl_18)); - __e_acsl_and_4 = __e_acsl_le_8 <= 0; - __gmpz_clear(__e_acsl_i_6); - __gmpz_clear(__e_acsl_18); - } - else __e_acsl_and_4 = 0; - e_acsl_assert(__e_acsl_and_4,(char *)"Invariant", - (char *)"nested_loops",(char *)"0 <= i <= 10",17); - __gmpz_clear(__e_acsl_17); - __gmpz_clear(__e_acsl_i_5); - } - } - } - return; -} - -void unnatural_loop(void) -{ - int x; - x = 0; - { - int i; - i = 0; - { - mpz_t __e_acsl; - mpz_t __e_acsl_i; - int __e_acsl_le; - int __e_acsl_and; - __gmpz_init_set_si(__e_acsl,(long)0); - __gmpz_init_set_si(__e_acsl_i,(long)i); - __e_acsl_le = __gmpz_cmp((__mpz_struct const *)(__e_acsl), - (__mpz_struct const *)(__e_acsl_i)); - if (__e_acsl_le <= 0) { - mpz_t __e_acsl_i_2; - mpz_t __e_acsl_2; - int __e_acsl_le_2; - __gmpz_init_set_si(__e_acsl_i_2,(long)i); - __gmpz_init_set_si(__e_acsl_2,(long)6); - __e_acsl_le_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_i_2), - (__mpz_struct const *)(__e_acsl_2)); - __e_acsl_and = __e_acsl_le_2 <= 0; - __gmpz_clear(__e_acsl_i_2); - __gmpz_clear(__e_acsl_2); - } - else __e_acsl_and = 0; - e_acsl_assert(__e_acsl_and,(char *)"Invariant", - (char *)"unnatural_loop",(char *)"0 <= i <= 6",28); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_i); - /*@ loop invariant 0 ≤ i ≤ 6; */ - while (i < 10) { - if (x == 5) break; - x = i; - { - mpz_t __e_acsl_3; - mpz_t __e_acsl_i_3; - int __e_acsl_le_3; - int __e_acsl_and_2; - i ++; - __gmpz_init_set_si(__e_acsl_3,(long)0); - __gmpz_init_set_si(__e_acsl_i_3,(long)i); - __e_acsl_le_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_3), - (__mpz_struct const *)(__e_acsl_i_3)); - if (__e_acsl_le_3 <= 0) { - mpz_t __e_acsl_i_4; - mpz_t __e_acsl_4; - int __e_acsl_le_4; - __gmpz_init_set_si(__e_acsl_i_4,(long)i); - __gmpz_init_set_si(__e_acsl_4,(long)6); - __e_acsl_le_4 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_i_4), - (__mpz_struct const *)(__e_acsl_4)); - __e_acsl_and_2 = __e_acsl_le_4 <= 0; - __gmpz_clear(__e_acsl_i_4); - __gmpz_clear(__e_acsl_4); - } - else __e_acsl_and_2 = 0; - e_acsl_assert(__e_acsl_and_2,(char *)"Invariant", - (char *)"unnatural_loop",(char *)"0 <= i <= 6",28); - __gmpz_clear(__e_acsl_3); - __gmpz_clear(__e_acsl_i_3); - } - } - } - } - return; -} - -int main(void) -{ - int __retres; - simple_loop(); - nested_loops(); - unnatural_loop(); - __retres = 0; - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_mainargs2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_mainargs2.c deleted file mode 100644 index 5af50703b3d..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_mainargs2.c +++ /dev/null @@ -1,676 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned long size_t; -typedef int wchar_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - assigns *z; - assigns *z \from __e_acsl_init; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init(__mpz_struct * /*[1]*/ z); - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, - unsigned long n); - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid_read(z_orig); - requires \valid(z); - assigns *z; - assigns *z \from *z_orig; - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_set(__mpz_struct * /*[1]*/ z, - __mpz_struct const * /*[1]*/ z_orig); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ requires \valid(z1); - requires \valid_read(z2); - requires \valid_read(z3); - assigns *z1; - assigns *z1 \from *z2, *z3; - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); - -/*@ requires \valid(z1); - requires \valid_read(z2); - requires \valid_read(z3); - assigns *z1; - assigns *z1 \from *z2, *z3; - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_mul(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); - -/*@ requires \valid_read(z); - assigns \result; - assigns \result \from *z; */ -extern __attribute__((__FC_BUILTIN__)) unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __init_args(int argc_ref, - char **argv_ref); - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures \result ≡ 1 ⇒ \valid((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __valid(void *ptr, size_t size); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \valid_read((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __valid_read(void *ptr, - size_t size); - -/*@ ensures \result ≡ \block_length(\old(ptr)); - assigns \result; - assigns \result \from ptr; - */ -extern __attribute__((__FC_BUILTIN__)) size_t __block_length(void *ptr); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \initialized((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __initialized(void *ptr, - size_t size); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -/*@ -axiomatic MemCmp { - logic ℤ memcmp{L1, L2}(char *s1, char *s2, ℤ n) - reads \at(*(s1+(0 .. n-1)),L1), \at(*(s2+(0 .. n-1)),L2); - - axiom memcmp_zero{L1, L2}: - ∀ char *s1, char *s2; - ∀ ℤ n; - memcmp{L1, L2}(s1, s2, n) ≡ 0 ⇔ - (∀ ℤ i; 0 ≤ i < n ⇒ \at(*(s1+i),L1) ≡ \at(*(s2+i),L2)); - - } - */ -/*@ -axiomatic MemChr { - logic 𔹠memchr{L}(char *s, ℤ c, ℤ n) - reads *(s+(0 .. n-1)); - - axiom memchr_def{L}: - ∀ char *s; - ∀ ℤ c; - ∀ ℤ n; - memchr{L}(s, c, n) ≡ \true ⇔ - (∃ int i; 0 ≤ i < n ∧ *(s+i) ≡ c); - - } - */ -/*@ -axiomatic MemSet { - logic 𔹠memset{L}(char *s, ℤ c, ℤ n) - reads *(s+(0 .. n-1)); - - axiom memset_def{L}: - ∀ char *s; - ∀ ℤ c; - ∀ ℤ n; - memset{L}(s, c, n) ≡ \true ⇔ - (∀ ℤ i; 0 ≤ i < n ⇒ *(s+i) ≡ c); - - } - */ -/*@ -axiomatic StrLen { - logic ℤ strlen{L}(char *s) - reads *(s+(0 ..)); - - axiom strlen_pos_or_null{L}: - ∀ char *s; - ∀ ℤ i; - 0 ≤ i ∧ (∀ ℤ j; 0 ≤ j < i ⇒ *(s+j) ≢ '\000') ∧ - *(s+i) ≡ '\000' ⇒ strlen{L}(s) ≡ i; - - axiom strlen_neg{L}: - ∀ char *s; - (∀ ℤ i; 0 ≤ i ⇒ *(s+i) ≢ '\000') ⇒ strlen{L}(s) < 0; - - axiom strlen_before_null{L}: - ∀ char *s; - ∀ ℤ i; 0 ≤ i < strlen{L}(s) ⇒ *(s+i) ≢ '\000'; - - axiom strlen_at_null{L}: - ∀ char *s; 0 ≤ strlen{L}(s) ⇒ *(s+strlen{L}(s)) ≡ '\000'; - - axiom strlen_not_zero{L}: - ∀ char *s; - ∀ ℤ i; - 0 ≤ i ≤ strlen{L}(s) ∧ *(s+i) ≢ '\000' ⇒ i < strlen{L}(s); - - axiom strlen_zero{L}: - ∀ char *s; - ∀ ℤ i; - 0 ≤ i ≤ strlen{L}(s) ∧ *(s+i) ≡ '\000' ⇒ i ≡ strlen{L}(s); - - axiom strlen_sup{L}: - ∀ char *s; - ∀ ℤ i; 0 ≤ i ∧ *(s+i) ≡ '\000' ⇒ 0 ≤ strlen{L}(s) ≤ i; - - axiom strlen_shift{L}: - ∀ char *s; - ∀ ℤ i; 0 ≤ i ≤ strlen{L}(s) ⇒ strlen{L}(s+i) ≡ strlen{L}(s)-i; - - axiom strlen_create{L}: - ∀ char *s; - ∀ ℤ i; 0 ≤ i ∧ *(s+i) ≡ '\000' ⇒ 0 ≤ strlen{L}(s) ≤ i; - - axiom strlen_create_shift{L}: - ∀ char *s; - ∀ ℤ i; - ∀ ℤ k; - 0 ≤ k ≤ i ∧ *(s+i) ≡ '\000' ⇒ 0 ≤ strlen{L}(s+k) ≤ i-k; - - axiom memcmp_strlen_left{L}: - ∀ char *s1, char *s2; - ∀ ℤ n; - memcmp{L, L}(s1, s2, n) ≡ 0 ∧ strlen{L}(s1) < n ⇒ - strlen{L}(s1) ≡ strlen{L}(s2); - - axiom memcmp_strlen_right{L}: - ∀ char *s1, char *s2; - ∀ ℤ n; - memcmp{L, L}(s1, s2, n) ≡ 0 ∧ strlen{L}(s2) < n ⇒ - strlen{L}(s1) ≡ strlen{L}(s2); - - axiom memcmp_strlen_shift_left{L}: - ∀ char *s1, char *s2; - ∀ ℤ k, ℤ n; - memcmp{L, L}(s1, s2+k, n) ≡ 0 ≤ k ∧ strlen{L}(s1) < n ⇒ - 0 ≤ strlen{L}(s2) ≤ k+strlen{L}(s1); - - axiom memcmp_strlen_shift_right{L}: - ∀ char *s1, char *s2; - ∀ ℤ k, ℤ n; - memcmp{L, L}(s1+k, s2, n) ≡ 0 ≤ k ∧ strlen{L}(s2) < n ⇒ - 0 ≤ strlen{L}(s1) ≤ k+strlen{L}(s2); - - } - */ -/*@ -axiomatic StrCmp { - logic ℤ strcmp{L}(char *s1, char *s2) - reads *(s1+(0 .. strlen{L}(s1))), *(s2+(0 .. strlen{L}(s2))); - - axiom strcmp_zero{L}: - ∀ char *s1, char *s2; - strcmp{L}(s1, s2) ≡ 0 ⇔ - strlen{L}(s1) ≡ strlen{L}(s2) ∧ - (∀ ℤ i; 0 ≤ i ≤ strlen{L}(s1) ⇒ *(s1+i) ≡ *(s2+i)); - - } - */ -/*@ -axiomatic StrNCmp { - logic ℤ strncmp{L}(char *s1, char *s2, ℤ n) - reads *(s1+(0 .. n-1)), *(s2+(0 .. n-1)); - - axiom strncmp_zero{L}: - ∀ char *s1, char *s2; - ∀ ℤ n; - strncmp{L}(s1, s2, n) ≡ 0 ⇔ - (strlen{L}(s1) < n ∧ strcmp{L}(s1, s2) ≡ 0) ∨ - (∀ ℤ i; 0 ≤ i < n ⇒ *(s1+i) ≡ *(s2+i)); - - } - */ -/*@ -axiomatic StrChr { - logic 𔹠strchr{L}(char *s, ℤ c) - reads *(s+(0 .. strlen{L}(s))); - - axiom strchr_def{L}: - ∀ char *s; - ∀ ℤ c; - strchr{L}(s, c) ≡ \true ⇔ - (∃ ℤ i; 0 ≤ i ≤ strlen{L}(s) ∧ *(s+i) ≡ c); - - } - */ -/*@ -axiomatic WcsLen { - logic ℤ wcslen{L}(wchar_t *s) - reads *(s+(0 ..)); - - axiom wcslen_pos_or_null{L}: - ∀ wchar_t *s; - ∀ ℤ i; - 0 ≤ i ∧ (∀ ℤ j; 0 ≤ j < i ⇒ *(s+j) ≢ 0) ∧ *(s+i) ≡ 0 ⇒ - wcslen{L}(s) ≡ i; - - axiom wcslen_neg{L}: - ∀ wchar_t *s; - (∀ ℤ i; 0 ≤ i ⇒ *(s+i) ≢ 0) ⇒ wcslen{L}(s) < 0; - - axiom wcslen_before_null{L}: - ∀ wchar_t *s; - ∀ int i; 0 ≤ i < wcslen{L}(s) ⇒ *(s+i) ≢ 0; - - axiom wcslen_at_null{L}: - ∀ wchar_t *s; 0 ≤ wcslen{L}(s) ⇒ *(s+wcslen{L}(s)) ≡ 0; - - axiom wcslen_not_zero{L}: - ∀ wchar_t *s; - ∀ int i; 0 ≤ i ≤ wcslen{L}(s) ∧ *(s+i) ≢ 0 ⇒ i < wcslen{L}(s); - - axiom wcslen_zero{L}: - ∀ wchar_t *s; - ∀ int i; - 0 ≤ i ≤ wcslen{L}(s) ∧ *(s+i) ≡ 0 ⇒ i ≡ wcslen{L}(s); - - axiom wcslen_sup{L}: - ∀ wchar_t *s; - ∀ int i; 0 ≤ i ∧ *(s+i) ≡ 0 ⇒ 0 ≤ wcslen{L}(s) ≤ i; - - axiom wcslen_shift{L}: - ∀ wchar_t *s; - ∀ int i; 0 ≤ i ≤ wcslen{L}(s) ⇒ wcslen{L}(s+i) ≡ wcslen{L}(s)-i; - - axiom wcslen_create{L}: - ∀ wchar_t *s; - ∀ int i; 0 ≤ i ∧ *(s+i) ≡ 0 ⇒ 0 ≤ wcslen{L}(s) ≤ i; - - axiom wcslen_create_shift{L}: - ∀ wchar_t *s; - ∀ int i; - ∀ int k; - 0 ≤ k ≤ i ∧ *(s+i) ≡ 0 ⇒ 0 ≤ wcslen{L}(s+k) ≤ i-k; - - } - */ -/*@ -axiomatic WcsCmp { - logic ℤ wcscmp{L}(wchar_t *s1, wchar_t *s2) - reads *(s1+(0 .. wcslen{L}(s1))), *(s2+(0 .. wcslen{L}(s2))); - - axiom wcscmp_zero{L}: - ∀ wchar_t *s1, wchar_t *s2; - wcscmp{L}(s1, s2) ≡ 0 ⇔ - wcslen{L}(s1) ≡ wcslen{L}(s2) ∧ - (∀ ℤ i; 0 ≤ i ≤ wcslen{L}(s1) ⇒ *(s1+i) ≡ *(s2+i)); - - } - */ -/*@ -axiomatic WcsNCmp { - logic ℤ wcsncmp{L}(wchar_t *s1, wchar_t *s2, ℤ n) - reads *(s1+(0 .. n-1)), *(s2+(0 .. n-1)); - - axiom wcsncmp_zero{L}: - ∀ wchar_t *s1, wchar_t *s2; - ∀ ℤ n; - wcsncmp{L}(s1, s2, n) ≡ 0 ⇔ - (wcslen{L}(s1) < n ∧ wcscmp{L}(s1, s2) ≡ 0) ∨ - (∀ ℤ i; 0 ≤ i < n ⇒ *(s1+i) ≡ *(s2+i)); - - } - */ -/*@ logic ℤ minimum(ℤ i, ℤ j) = i<j? i: j; - */ -/*@ logic ℤ maximum(ℤ i, ℤ j) = i<j? j: i; - */ -/*@ -predicate valid_string{L}(char *s) = - 0 ≤ strlen{L}(s) ∧ \valid{L}(s+(0 .. strlen{L}(s))); - */ -/*@ -predicate valid_read_string{L}(char *s) = - 0 ≤ strlen{L}(s) ∧ \valid_read{L}(s+(0 .. strlen{L}(s))); - */ -/*@ -predicate valid_string_or_null{L}(char *s) = - s ≡ \null ∨ valid_string{L}(s); - */ -/*@ -predicate valid_wstring{L}(wchar_t *s) = - 0 ≤ wcslen{L}(s) ∧ \valid{L}(s+(0 .. wcslen{L}(s))); - */ -/*@ -predicate valid_wstring_or_null{L}(wchar_t *s) = - s ≡ \null ∨ valid_wstring{L}(s); - */ -/*@ requires valid_string_src: valid_read_string(s); - ensures \result ≡ strlen(\old(s)); - assigns \result; - assigns \result \from *(s+(0 ..)); - */ -extern size_t strlen(char const *s); - -/*@ requires valid_string_src: valid_read_string(s); - ensures \result ≡ strlen(\old(s)); - assigns \result; - assigns \result \from *(s+(0 ..)); - */ -size_t __e_acsl_strlen(char const *s) -{ - size_t __retres; - __store_block((void *)(& s),8UL); - __retres = strlen(s); - __delete_block((void *)(& s)); - return __retres; -} - -int main(int argc, char **argv) -{ - int __retres; - int i; - __init_args(argc,argv); - /*@ assert \valid(&argc); */ - { - int __e_acsl_valid; - __store_block((void *)(& argc),4UL); - __store_block((void *)(& argv),8UL); - __e_acsl_valid = __valid((void *)(& argc),sizeof(int)); - e_acsl_assert(__e_acsl_valid,(char *)"Assertion",(char *)"main", - (char *)"\\valid(&argc)",12); - } - /*@ assert \valid(&argv); */ - { - int __e_acsl_valid_2; - __e_acsl_valid_2 = __valid((void *)(& argv),sizeof(char **)); - e_acsl_assert(__e_acsl_valid_2,(char *)"Assertion",(char *)"main", - (char *)"\\valid(&argv)",13); - } - /*@ assert ∀ int k; 0 ≤ k < argc ⇒ \valid(argv+k); */ - { - int __e_acsl_forall; - mpz_t __e_acsl_k; - __e_acsl_forall = 1; - __gmpz_init(__e_acsl_k); - { - mpz_t __e_acsl; - __gmpz_init_set_si(__e_acsl,(long)0); - __gmpz_set(__e_acsl_k,(__mpz_struct const *)(__e_acsl)); - __gmpz_clear(__e_acsl); - } - while (1) { - { - mpz_t __e_acsl_argc; - int __e_acsl_lt; - __gmpz_init_set_si(__e_acsl_argc,(long)argc); - __e_acsl_lt = __gmpz_cmp((__mpz_struct const *)(__e_acsl_k), - (__mpz_struct const *)(__e_acsl_argc)); - if (__e_acsl_lt < 0) ; else break; - __gmpz_clear(__e_acsl_argc); - } - { - unsigned long __e_acsl_k_2; - int __e_acsl_valid_3; - __e_acsl_k_2 = __gmpz_get_ui((__mpz_struct const *)(__e_acsl_k)); - __e_acsl_valid_3 = __valid((void *)(argv + __e_acsl_k_2), - sizeof(char *)); - if (__e_acsl_valid_3) ; - else { - __e_acsl_forall = 0; - goto e_acsl_end_loop1; - } - } - { - mpz_t __e_acsl_2; - mpz_t __e_acsl_add; - __gmpz_init_set_si(__e_acsl_2,1L); - __gmpz_init(__e_acsl_add); - __gmpz_add(__e_acsl_add,(__mpz_struct const *)(__e_acsl_k), - (__mpz_struct const *)(__e_acsl_2)); - __gmpz_set(__e_acsl_k,(__mpz_struct const *)(__e_acsl_add)); - __gmpz_clear(__e_acsl_2); - __gmpz_clear(__e_acsl_add); - } - } - e_acsl_end_loop1: ; - e_acsl_assert(__e_acsl_forall,(char *)"Assertion",(char *)"main", - (char *)"\\forall int k; 0 <= k < argc ==> \\valid(argv+k)", - 14); - __gmpz_clear(__e_acsl_k); - } - /*@ assert \block_length(argv) ≡ (argc+1)*sizeof(char *); */ - { - unsigned long __e_acsl_block_length; - mpz_t __e_acsl_block_length_2; - mpz_t __e_acsl_argc_2; - mpz_t __e_acsl_3; - mpz_t __e_acsl_add_2; - mpz_t __e_acsl_sizeof; - mpz_t __e_acsl_mul; - int __e_acsl_eq; - __e_acsl_block_length = __block_length((void *)argv); - __gmpz_init_set_ui(__e_acsl_block_length_2,__e_acsl_block_length); - __gmpz_init_set_si(__e_acsl_argc_2,(long)argc); - __gmpz_init_set_si(__e_acsl_3,(long)1); - __gmpz_init(__e_acsl_add_2); - __gmpz_add(__e_acsl_add_2,(__mpz_struct const *)(__e_acsl_argc_2), - (__mpz_struct const *)(__e_acsl_3)); - __gmpz_init_set_si(__e_acsl_sizeof,8L); - __gmpz_init(__e_acsl_mul); - __gmpz_mul(__e_acsl_mul,(__mpz_struct const *)(__e_acsl_add_2), - (__mpz_struct const *)(__e_acsl_sizeof)); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_block_length_2), - (__mpz_struct const *)(__e_acsl_mul)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Assertion",(char *)"main", - (char *)"\\block_length(argv) == (argc+1)*sizeof(char *)", - 15); - __gmpz_clear(__e_acsl_block_length_2); - __gmpz_clear(__e_acsl_argc_2); - __gmpz_clear(__e_acsl_3); - __gmpz_clear(__e_acsl_add_2); - __gmpz_clear(__e_acsl_sizeof); - __gmpz_clear(__e_acsl_mul); - } - /*@ assert *(argv+argc) ≡ \null; */ - { - int __e_acsl_valid_read; - __e_acsl_valid_read = __valid_read((void *)(argv + (long)argc), - sizeof(char *)); - e_acsl_assert(__e_acsl_valid_read,(char *)"RTE",(char *)"main", - (char *)"mem_access: \\valid_read(argv+(long)argc)",17); - e_acsl_assert(*(argv + (long)argc) == (void *)0,(char *)"Assertion", - (char *)"main",(char *)"*(argv+argc) == \\null",17); - } - /*@ assert ¬\valid(*(argv+argc)); */ - { - int __e_acsl_initialized; - int __e_acsl_and; - __e_acsl_initialized = __initialized((void *)(argv + (long)argc), - sizeof(char *)); - if (__e_acsl_initialized) { - int __e_acsl_valid_read_2; - int __e_acsl_valid_4; - __e_acsl_valid_read_2 = __valid_read((void *)(argv + (long)argc), - sizeof(char *)); - e_acsl_assert(__e_acsl_valid_read_2,(char *)"RTE",(char *)"main", - (char *)"mem_access: \\valid_read(argv+(long)argc)",18); - __e_acsl_valid_4 = __valid((void *)*(argv + (long)argc),sizeof(char)); - __e_acsl_and = __e_acsl_valid_4; - } - else __e_acsl_and = 0; - e_acsl_assert(! __e_acsl_and,(char *)"Assertion",(char *)"main", - (char *)"!\\valid(*(argv+argc))",18); - } - i = 0; - while (i < argc) { - { - int len; - size_t tmp; - tmp = __e_acsl_strlen((char const *)*(argv + i)); - len = (int)tmp; - /*@ assert \valid(*(argv+i)); */ - { - int __e_acsl_initialized_2; - int __e_acsl_and_2; - __e_acsl_initialized_2 = __initialized((void *)(argv + (long)i), - sizeof(char *)); - if (__e_acsl_initialized_2) { - int __e_acsl_valid_read_3; - int __e_acsl_valid_5; - __e_acsl_valid_read_3 = __valid_read((void *)(argv + (long)i), - sizeof(char *)); - e_acsl_assert(__e_acsl_valid_read_3,(char *)"RTE",(char *)"main", - (char *)"mem_access: \\valid_read(argv+(long)i)",21); - __e_acsl_valid_5 = __valid((void *)*(argv + (long)i),sizeof(char)); - __e_acsl_and_2 = __e_acsl_valid_5; - } - else __e_acsl_and_2 = 0; - e_acsl_assert(__e_acsl_and_2,(char *)"Assertion",(char *)"main", - (char *)"\\valid(*(argv+i))",21); - } - /*@ assert ∀ int k; 0 ≤ k ≤ len ⇒ \valid(*(argv+i)+k); */ - { - int __e_acsl_forall_2; - mpz_t __e_acsl_k_3; - __e_acsl_forall_2 = 1; - __gmpz_init(__e_acsl_k_3); - { - mpz_t __e_acsl_4; - __gmpz_init_set_si(__e_acsl_4,(long)0); - __gmpz_set(__e_acsl_k_3,(__mpz_struct const *)(__e_acsl_4)); - __gmpz_clear(__e_acsl_4); - } - while (1) { - { - mpz_t __e_acsl_len; - int __e_acsl_le; - __gmpz_init_set_si(__e_acsl_len,(long)len); - __e_acsl_le = __gmpz_cmp((__mpz_struct const *)(__e_acsl_k_3), - (__mpz_struct const *)(__e_acsl_len)); - if (__e_acsl_le <= 0) ; else break; - __gmpz_clear(__e_acsl_len); - } - { - unsigned long __e_acsl_k_4; - int __e_acsl_valid_read_4; - int __e_acsl_valid_6; - __e_acsl_k_4 = __gmpz_get_ui((__mpz_struct const *)(__e_acsl_k_3)); - __e_acsl_valid_read_4 = __valid_read((void *)(argv + (long)i), - sizeof(char *)); - e_acsl_assert(__e_acsl_valid_read_4,(char *)"RTE",(char *)"main", - (char *)"mem_access: \\valid_read(argv+(long)i)", - 22); - __e_acsl_valid_6 = __valid((void *)(*(argv + (long)i) + __e_acsl_k_4), - sizeof(char)); - if (__e_acsl_valid_6) ; - else { - __e_acsl_forall_2 = 0; - goto e_acsl_end_loop2; - } - } - { - mpz_t __e_acsl_5; - mpz_t __e_acsl_add_3; - __gmpz_init_set_si(__e_acsl_5,1L); - __gmpz_init(__e_acsl_add_3); - __gmpz_add(__e_acsl_add_3,(__mpz_struct const *)(__e_acsl_k_3), - (__mpz_struct const *)(__e_acsl_5)); - __gmpz_set(__e_acsl_k_3,(__mpz_struct const *)(__e_acsl_add_3)); - __gmpz_clear(__e_acsl_5); - __gmpz_clear(__e_acsl_add_3); - } - } - e_acsl_end_loop2: ; - e_acsl_assert(__e_acsl_forall_2,(char *)"Assertion",(char *)"main", - (char *)"\\forall int k; 0 <= k <= len ==> \\valid(*(argv+i)+k)", - 22); - __gmpz_clear(__e_acsl_k_3); - } - } - i ++; - } - __retres = 0; - __delete_block((void *)(& argc)); - __delete_block((void *)(& argv)); - __e_acsl_memory_clean(); - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_memsize2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_memsize2.c deleted file mode 100644 index 1b8a9bb8400..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_memsize2.c +++ /dev/null @@ -1,490 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned long size_t; -typedef unsigned int ino_t; -typedef unsigned int gid_t; -typedef unsigned int uid_t; -typedef long time_t; -typedef unsigned int blkcnt_t; -typedef unsigned int blksize_t; -typedef unsigned int dev_t; -typedef unsigned int mode_t; -typedef unsigned int nlink_t; -typedef long off_t; -struct stat { - dev_t st_dev ; - ino_t st_ino ; - mode_t st_mode ; - nlink_t st_nlink ; - uid_t st_uid ; - gid_t st_gid ; - dev_t st_rdev ; - off_t st_size ; - time_t st_atime ; - time_t st_mtime ; - time_t st_ctime ; - blksize_t st_blksize ; - blkcnt_t st_blocks ; -}; -struct __fc_pos_t { - unsigned long __fc_stdio_position ; -}; -typedef struct __fc_pos_t fpos_t; -struct __fc_FILE { - unsigned int __fc_stdio_id ; - fpos_t __fc_position ; - char __fc_error ; - char __fc_eof ; - int __fc_flags ; - struct stat *__fc_inode ; - unsigned char *__fc_real_data ; - int __fc_real_data_max_size ; -}; -typedef struct __fc_FILE FILE; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -void *__malloc(size_t size); - -void __free(void *p); - -void *__realloc(void *ptr, size_t size); - -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, - unsigned long n); - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ assigns \result; - assigns \result \from ptr; */ -extern __attribute__((__FC_BUILTIN__)) int __freeable(void *ptr); - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ assigns __fc_heap_status, \result; - assigns __fc_heap_status \from size, __fc_heap_status; - assigns \result \from size, __fc_heap_status; - allocates \result; - - behavior allocation: - assumes is_allocable(size); - ensures \fresh{Old, Here}(\result,\old(size)); - assigns __fc_heap_status, \result; - assigns __fc_heap_status \from size, __fc_heap_status; - assigns \result \from size, __fc_heap_status; - - behavior no_allocation: - assumes ¬is_allocable(size); - ensures \result ≡ \null; - assigns \result; - assigns \result \from \nothing; - allocates \nothing; - - complete behaviors no_allocation, allocation; - disjoint behaviors no_allocation, allocation; - */ -void *__e_acsl_malloc(size_t size) -{ - void *__retres; - __store_block((void *)(& __retres),8UL); - __retres = __malloc(size); - __delete_block((void *)(& __retres)); - return __retres; -} - -/*@ assigns __fc_heap_status; - assigns __fc_heap_status \from __fc_heap_status; - frees p; - - behavior deallocation: - assumes p ≢ \null; - requires freeable: \freeable(p); - ensures \allocable(\old(p)); - assigns __fc_heap_status; - assigns __fc_heap_status \from __fc_heap_status; - - behavior no_deallocation: - assumes p ≡ \null; - assigns \nothing; - allocates \nothing; - - complete behaviors no_deallocation, deallocation; - disjoint behaviors no_deallocation, deallocation; - */ -void __e_acsl_free(void *p) -{ - int __e_acsl_at; - { - int __e_acsl_implies; - __store_block((void *)(& p),8UL); - if (! (p != (void *)0)) __e_acsl_implies = 1; - else { - int __e_acsl_freeable; - __e_acsl_freeable = __freeable(p); - __e_acsl_implies = __e_acsl_freeable; - } - e_acsl_assert(__e_acsl_implies,(char *)"Precondition",(char *)"free", - (char *)"p != \\null ==> \\freeable(p)",178); - __store_block((void *)(& __e_acsl_at),4UL); - __e_acsl_at = p != (void *)0; - __free(p); - } - __delete_block((void *)(& p)); - return; -} - -/*@ requires ptr ≡ \null ∨ \freeable(ptr); - assigns __fc_heap_status, \result; - assigns __fc_heap_status \from __fc_heap_status; - assigns \result \from size, ptr, __fc_heap_status; - frees ptr; - allocates \result; - - behavior alloc: - assumes is_allocable(size); - ensures \fresh{Old, Here}(\result,\old(size)); - assigns \result; - assigns \result \from size, __fc_heap_status; - allocates \result; - - behavior dealloc: - assumes ptr ≢ \null; - assumes is_allocable(size); - requires \freeable(ptr); - ensures \allocable(\old(ptr)); - ensures \result ≡ \null ∨ \freeable(\result); - frees ptr; - - behavior fail: - assumes ¬is_allocable(size); - ensures \result ≡ \null; - assigns \result; - assigns \result \from size, __fc_heap_status; - allocates \nothing; - - complete behaviors fail, dealloc, alloc; - disjoint behaviors dealloc, fail; - disjoint behaviors alloc, fail; - */ -void *__e_acsl_realloc(void *ptr, size_t size) -{ - void *__retres; - __store_block((void *)(& __retres),8UL); - { - int __e_acsl_or; - __store_block((void *)(& ptr),8UL); - if (ptr == (void *)0) __e_acsl_or = 1; - else { - int __e_acsl_freeable; - __e_acsl_freeable = __freeable(ptr); - __e_acsl_or = __e_acsl_freeable; - } - e_acsl_assert(__e_acsl_or,(char *)"Precondition",(char *)"realloc", - (char *)"ptr == \\null || \\freeable(ptr)",201); - __retres = __realloc(ptr,size); - } - __delete_block((void *)(& ptr)); - __delete_block((void *)(& __retres)); - return __retres; -} - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - -*/ -void *__calloc(size_t nmemb, size_t size); - -FILE __fc_fopen[512]; -FILE * const __p_fc_fopen = __fc_fopen; -int main(int argc, char **argv) -{ - int __retres; - char *a; - char *b; - __store_block((void *)(& b),8UL); - __store_block((void *)(& a),8UL); - __full_init((void *)(& a)); - a = (char *)__e_acsl_malloc((unsigned long)7); - /*@ assert __memory_size ≡ 7; */ - { - mpz_t __e_acsl___memory_size; - mpz_t __e_acsl; - int __e_acsl_eq; - __gmpz_init_set_ui(__e_acsl___memory_size,__memory_size); - __gmpz_init_set_si(__e_acsl,(long)7); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl___memory_size), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Assertion",(char *)"main", - (char *)"__memory_size == 7",24); - __gmpz_clear(__e_acsl___memory_size); - __gmpz_clear(__e_acsl); - } - __full_init((void *)(& b)); - b = (char *)__e_acsl_malloc((unsigned long)14); - /*@ assert __memory_size ≡ 21; */ - { - mpz_t __e_acsl___memory_size_2; - mpz_t __e_acsl_2; - int __e_acsl_eq_2; - __gmpz_init_set_ui(__e_acsl___memory_size_2,__memory_size); - __gmpz_init_set_si(__e_acsl_2,(long)21); - __e_acsl_eq_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl___memory_size_2), - (__mpz_struct const *)(__e_acsl_2)); - e_acsl_assert(__e_acsl_eq_2 == 0,(char *)"Assertion",(char *)"main", - (char *)"__memory_size == 21",26); - __gmpz_clear(__e_acsl___memory_size_2); - __gmpz_clear(__e_acsl_2); - } - __e_acsl_free((void *)a); - /*@ assert __memory_size ≡ 14; */ - { - mpz_t __e_acsl___memory_size_3; - mpz_t __e_acsl_3; - int __e_acsl_eq_3; - __gmpz_init_set_ui(__e_acsl___memory_size_3,__memory_size); - __gmpz_init_set_si(__e_acsl_3,(long)14); - __e_acsl_eq_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl___memory_size_3), - (__mpz_struct const *)(__e_acsl_3)); - e_acsl_assert(__e_acsl_eq_3 == 0,(char *)"Assertion",(char *)"main", - (char *)"__memory_size == 14",30); - __gmpz_clear(__e_acsl___memory_size_3); - __gmpz_clear(__e_acsl_3); - } - __full_init((void *)(& a)); - a = (char *)0; - __e_acsl_free((void *)a); - /*@ assert __memory_size ≡ 14; */ - { - mpz_t __e_acsl___memory_size_4; - mpz_t __e_acsl_4; - int __e_acsl_eq_4; - __gmpz_init_set_ui(__e_acsl___memory_size_4,__memory_size); - __gmpz_init_set_si(__e_acsl_4,(long)14); - __e_acsl_eq_4 = __gmpz_cmp((__mpz_struct const *)(__e_acsl___memory_size_4), - (__mpz_struct const *)(__e_acsl_4)); - e_acsl_assert(__e_acsl_eq_4 == 0,(char *)"Assertion",(char *)"main", - (char *)"__memory_size == 14",35); - __gmpz_clear(__e_acsl___memory_size_4); - __gmpz_clear(__e_acsl_4); - } - __full_init((void *)(& b)); - b = (char *)__e_acsl_realloc((void *)b,(unsigned long)9); - /*@ assert __memory_size ≡ 9; */ - { - mpz_t __e_acsl___memory_size_5; - mpz_t __e_acsl_5; - int __e_acsl_eq_5; - __gmpz_init_set_ui(__e_acsl___memory_size_5,__memory_size); - __gmpz_init_set_si(__e_acsl_5,(long)9); - __e_acsl_eq_5 = __gmpz_cmp((__mpz_struct const *)(__e_acsl___memory_size_5), - (__mpz_struct const *)(__e_acsl_5)); - e_acsl_assert(__e_acsl_eq_5 == 0,(char *)"Assertion",(char *)"main", - (char *)"__memory_size == 9",39); - __gmpz_clear(__e_acsl___memory_size_5); - __gmpz_clear(__e_acsl_5); - } - __full_init((void *)(& b)); - b = (char *)__e_acsl_realloc((void *)b,(unsigned long)18); - /*@ assert __memory_size ≡ 18; */ - { - mpz_t __e_acsl___memory_size_6; - mpz_t __e_acsl_6; - int __e_acsl_eq_6; - __gmpz_init_set_ui(__e_acsl___memory_size_6,__memory_size); - __gmpz_init_set_si(__e_acsl_6,(long)18); - __e_acsl_eq_6 = __gmpz_cmp((__mpz_struct const *)(__e_acsl___memory_size_6), - (__mpz_struct const *)(__e_acsl_6)); - e_acsl_assert(__e_acsl_eq_6 == 0,(char *)"Assertion",(char *)"main", - (char *)"__memory_size == 18",43); - __gmpz_clear(__e_acsl___memory_size_6); - __gmpz_clear(__e_acsl_6); - } - __full_init((void *)(& b)); - b = (char *)__e_acsl_realloc((void *)b,(unsigned long)0); - __full_init((void *)(& b)); - b = (char *)0; - /*@ assert __memory_size ≡ 0; */ - { - mpz_t __e_acsl___memory_size_7; - mpz_t __e_acsl_7; - int __e_acsl_eq_7; - __gmpz_init_set_ui(__e_acsl___memory_size_7,__memory_size); - __gmpz_init_set_si(__e_acsl_7,(long)0); - __e_acsl_eq_7 = __gmpz_cmp((__mpz_struct const *)(__e_acsl___memory_size_7), - (__mpz_struct const *)(__e_acsl_7)); - e_acsl_assert(__e_acsl_eq_7 == 0,(char *)"Assertion",(char *)"main", - (char *)"__memory_size == 0",48); - __gmpz_clear(__e_acsl___memory_size_7); - __gmpz_clear(__e_acsl_7); - } - __full_init((void *)(& b)); - b = (char *)__e_acsl_realloc((void *)b,(unsigned long)8); - /*@ assert __memory_size ≡ 8; */ - { - mpz_t __e_acsl___memory_size_8; - mpz_t __e_acsl_8; - int __e_acsl_eq_8; - __gmpz_init_set_ui(__e_acsl___memory_size_8,__memory_size); - __gmpz_init_set_si(__e_acsl_8,(long)8); - __e_acsl_eq_8 = __gmpz_cmp((__mpz_struct const *)(__e_acsl___memory_size_8), - (__mpz_struct const *)(__e_acsl_8)); - e_acsl_assert(__e_acsl_eq_8 == 0,(char *)"Assertion",(char *)"main", - (char *)"__memory_size == 8",52); - __gmpz_clear(__e_acsl___memory_size_8); - __gmpz_clear(__e_acsl_8); - } - __full_init((void *)(& b)); - b = (char *)__e_acsl_realloc((void *)0,(unsigned long)8); - /*@ assert __memory_size ≡ 16; */ - { - mpz_t __e_acsl___memory_size_9; - mpz_t __e_acsl_9; - int __e_acsl_eq_9; - __gmpz_init_set_ui(__e_acsl___memory_size_9,__memory_size); - __gmpz_init_set_si(__e_acsl_9,(long)16); - __e_acsl_eq_9 = __gmpz_cmp((__mpz_struct const *)(__e_acsl___memory_size_9), - (__mpz_struct const *)(__e_acsl_9)); - e_acsl_assert(__e_acsl_eq_9 == 0,(char *)"Assertion",(char *)"main", - (char *)"__memory_size == 16",56); - __gmpz_clear(__e_acsl___memory_size_9); - __gmpz_clear(__e_acsl_9); - } - __full_init((void *)(& b)); - b = (char *)__e_acsl_realloc((void *)0,18446744073709551615UL); - /*@ assert __memory_size ≡ 16; */ - { - mpz_t __e_acsl___memory_size_10; - mpz_t __e_acsl_10; - int __e_acsl_eq_10; - __gmpz_init_set_ui(__e_acsl___memory_size_10,__memory_size); - __gmpz_init_set_si(__e_acsl_10,(long)16); - __e_acsl_eq_10 = __gmpz_cmp((__mpz_struct const *)(__e_acsl___memory_size_10), - (__mpz_struct const *)(__e_acsl_10)); - e_acsl_assert(__e_acsl_eq_10 == 0,(char *)"Assertion",(char *)"main", - (char *)"__memory_size == 16",60); - __gmpz_clear(__e_acsl___memory_size_10); - __gmpz_clear(__e_acsl_10); - } - /*@ assert b ≡ (char *)((void *)0); */ - e_acsl_assert(b == (char *)0,(char *)"Assertion",(char *)"main", - (char *)"b == (char *)((void *)0)",61); - __full_init((void *)(& b)); - b = (char *)__calloc(18446744073709551615UL,18446744073709551615UL); - /*@ assert __memory_size ≡ 16; */ - { - mpz_t __e_acsl___memory_size_11; - mpz_t __e_acsl_11; - int __e_acsl_eq_11; - __gmpz_init_set_ui(__e_acsl___memory_size_11,__memory_size); - __gmpz_init_set_si(__e_acsl_11,(long)16); - __e_acsl_eq_11 = __gmpz_cmp((__mpz_struct const *)(__e_acsl___memory_size_11), - (__mpz_struct const *)(__e_acsl_11)); - e_acsl_assert(__e_acsl_eq_11 == 0,(char *)"Assertion",(char *)"main", - (char *)"__memory_size == 16",65); - __gmpz_clear(__e_acsl___memory_size_11); - __gmpz_clear(__e_acsl_11); - } - /*@ assert b ≡ (char *)((void *)0); */ - e_acsl_assert(b == (char *)0,(char *)"Assertion",(char *)"main", - (char *)"b == (char *)((void *)0)",66); - __full_init((void *)(& b)); - b = (char *)__e_acsl_malloc(18446744073709551615UL); - /*@ assert __memory_size ≡ 16; */ - { - mpz_t __e_acsl___memory_size_12; - mpz_t __e_acsl_12; - int __e_acsl_eq_12; - __gmpz_init_set_ui(__e_acsl___memory_size_12,__memory_size); - __gmpz_init_set_si(__e_acsl_12,(long)16); - __e_acsl_eq_12 = __gmpz_cmp((__mpz_struct const *)(__e_acsl___memory_size_12), - (__mpz_struct const *)(__e_acsl_12)); - e_acsl_assert(__e_acsl_eq_12 == 0,(char *)"Assertion",(char *)"main", - (char *)"__memory_size == 16",70); - __gmpz_clear(__e_acsl___memory_size_12); - __gmpz_clear(__e_acsl_12); - } - /*@ assert b ≡ (char *)((void *)0); */ - e_acsl_assert(b == (char *)0,(char *)"Assertion",(char *)"main", - (char *)"b == (char *)((void *)0)",71); - __retres = 0; - __delete_block((void *)(& b)); - __delete_block((void *)(& a)); - __e_acsl_memory_clean(); - return __retres; -} - - 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 deleted file mode 100644 index d9b8a0192cc..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_nested_code_annot2.c +++ /dev/null @@ -1,188 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int main(void) -{ - int __retres; - int x; - int y; - x = 0; - y = 1; - /*@ assert x < y; */ - { - mpz_t __e_acsl_x; - mpz_t __e_acsl_y; - int __e_acsl_lt; - __gmpz_init_set_si(__e_acsl_x,(long)x); - __gmpz_init_set_si(__e_acsl_y,(long)y); - __e_acsl_lt = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x), - (__mpz_struct const *)(__e_acsl_y)); - e_acsl_assert(__e_acsl_lt < 0,(char *)"Assertion",(char *)"main", - (char *)"x < y",9); - __gmpz_clear(__e_acsl_x); - __gmpz_clear(__e_acsl_y); - } - /*@ requires x ≡ 0; - ensures x ≥ 1; */ - { - mpz_t __e_acsl_x_7; - mpz_t __e_acsl_6; - int __e_acsl_ge; - { - mpz_t __e_acsl_x_2; - mpz_t __e_acsl; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl_x_2,(long)x); - __gmpz_init_set_si(__e_acsl,(long)0); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_2), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Precondition",(char *)"main", - (char *)"x == 0",10); - __gmpz_clear(__e_acsl_x_2); - __gmpz_clear(__e_acsl); - if (x) - /*@ assert \false; */ - e_acsl_assert(0,(char *)"Assertion",(char *)"main",(char *)"\\false", - 13); - else { - /*@ requires x ≡ 0; - ensures x ≡ 1; */ - { - mpz_t __e_acsl_x_4; - mpz_t __e_acsl_3; - int __e_acsl_eq_3; - { - mpz_t __e_acsl_x_3; - mpz_t __e_acsl_2; - int __e_acsl_eq_2; - __gmpz_init_set_si(__e_acsl_x_3,(long)x); - __gmpz_init_set_si(__e_acsl_2,(long)0); - __e_acsl_eq_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_3), - (__mpz_struct const *)(__e_acsl_2)); - e_acsl_assert(__e_acsl_eq_2 == 0,(char *)"Precondition", - (char *)"main",(char *)"x == 0",15); - __gmpz_clear(__e_acsl_x_3); - __gmpz_clear(__e_acsl_2); - x ++; - } - __gmpz_init_set_si(__e_acsl_x_4,(long)x); - __gmpz_init_set_si(__e_acsl_3,(long)1); - __e_acsl_eq_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_4), - (__mpz_struct const *)(__e_acsl_3)); - e_acsl_assert(__e_acsl_eq_3 == 0,(char *)"Postcondition", - (char *)"main",(char *)"x == 1",16); - __gmpz_clear(__e_acsl_x_4); - __gmpz_clear(__e_acsl_3); - } - if (x) { - /*@ requires x ≡ 1; - ensures x ≡ 2; */ - { - mpz_t __e_acsl_x_6; - mpz_t __e_acsl_5; - int __e_acsl_eq_5; - { - mpz_t __e_acsl_x_5; - mpz_t __e_acsl_4; - int __e_acsl_eq_4; - __gmpz_init_set_si(__e_acsl_x_5,(long)x); - __gmpz_init_set_si(__e_acsl_4,(long)1); - __e_acsl_eq_4 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_5), - (__mpz_struct const *)(__e_acsl_4)); - e_acsl_assert(__e_acsl_eq_4 == 0,(char *)"Precondition", - (char *)"main",(char *)"x == 1",19); - __gmpz_clear(__e_acsl_x_5); - __gmpz_clear(__e_acsl_4); - x ++; - } - __gmpz_init_set_si(__e_acsl_x_6,(long)x); - __gmpz_init_set_si(__e_acsl_5,(long)2); - __e_acsl_eq_5 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_6), - (__mpz_struct const *)(__e_acsl_5)); - e_acsl_assert(__e_acsl_eq_5 == 0,(char *)"Postcondition", - (char *)"main",(char *)"x == 2",20); - __gmpz_clear(__e_acsl_x_6); - __gmpz_clear(__e_acsl_5); - } - } - else - /*@ assert \false; */ - e_acsl_assert(0,(char *)"Assertion",(char *)"main", - (char *)"\\false",23); - } - } - __gmpz_init_set_si(__e_acsl_x_7,(long)x); - __gmpz_init_set_si(__e_acsl_6,(long)1); - __e_acsl_ge = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_7), - (__mpz_struct const *)(__e_acsl_6)); - e_acsl_assert(__e_acsl_ge >= 0,(char *)"Postcondition",(char *)"main", - (char *)"x >= 1",11); - __gmpz_clear(__e_acsl_x_7); - __gmpz_clear(__e_acsl_6); - } - __retres = 0; - return __retres; -} - - 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 deleted file mode 100644 index a09b2333e52..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_null2.c +++ /dev/null @@ -1,52 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ ghost extern int __e_acsl_internal_heap; */ - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int main(void) -{ - int __retres; - /*@ assert \null ≡ (void *)0; */ - e_acsl_assert((void *)0 == (void *)0,(char *)"Assertion",(char *)"main", - (char *)"\\null == (void *)0",8); - __retres = 0; - return __retres; -} - - 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 deleted file mode 100644 index 20eb9f1b21f..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_other_constants2.c +++ /dev/null @@ -1,101 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -enum bool { - false = 0, - true = 1 -}; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int main(void) -{ - int __retres; - /*@ assert 'c' ≡ 'c'; */ - { - mpz_t __e_acsl; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl,(long)'c'); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Assertion",(char *)"main", - (char *)"\'c\' == \'c\'",12); - __gmpz_clear(__e_acsl); - } - /*@ assert false ≢ true; */ - { - mpz_t __e_acsl_2; - mpz_t __e_acsl_3; - int __e_acsl_ne; - __gmpz_init_set_si(__e_acsl_2,(long)false); - __gmpz_init_set_si(__e_acsl_3,(long)true); - __e_acsl_ne = __gmpz_cmp((__mpz_struct const *)(__e_acsl_2), - (__mpz_struct const *)(__e_acsl_3)); - e_acsl_assert(__e_acsl_ne != 0,(char *)"Assertion",(char *)"main", - (char *)"false != true",13); - __gmpz_clear(__e_acsl_2); - __gmpz_clear(__e_acsl_3); - } - __retres = 0; - return __retres; -} - - 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 deleted file mode 100644 index b58a645ffe7..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr2.c +++ /dev/null @@ -1,352 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - assigns *z; - assigns *z \from __e_acsl_init; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init(__mpz_struct * /*[1]*/ z); - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ requires \valid(z1); - requires \valid_read(z2); - requires \valid_read(z3); - assigns *z1; - assigns *z1 \from *z2, *z3; - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); - -/*@ requires \valid(z1); - requires \valid_read(z2); - requires \valid_read(z3); - assigns *z1; - assigns *z1 \from *z2, *z3; - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_sub(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); - -/*@ requires \valid(z1); - requires \valid_read(z2); - requires \valid_read(z3); - assigns *z1; - assigns *z1 \from *z2, *z3; - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_mul(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); - -/*@ requires \valid(z1); - requires \valid_read(z2); - requires \valid_read(z3); - assigns *z1; - assigns *z1 \from *z2, *z3; - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); - -/*@ requires \valid_read(z); - assigns \result; - assigns \result \from *z; */ -extern __attribute__((__FC_BUILTIN__)) unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __initialize(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int main(void) -{ - int __retres; - int x; - int t[3]; - int *p; - __store_block((void *)(& p),4U); - __store_block((void *)(t),12U); - __store_block((void *)(& x),4U); - __full_init((void *)(& x)); - x = 1; - __initialize((void *)(t),sizeof(int)); - t[0] = 2; - __initialize((void *)(& t[1]),sizeof(int)); - t[1] = 3; - __initialize((void *)(& t[2]),sizeof(int)); - t[2] = 4; - __full_init((void *)(& p)); - p = & x; - /*@ assert *p ≡ 1; */ - { - mpz_t __e_acsl; - mpz_t __e_acsl_2; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl,(long)*p); - __gmpz_init_set_si(__e_acsl_2,(long)1); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl), - (__mpz_struct const *)(__e_acsl_2)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Assertion",(char *)"main", - (char *)"*p == 1",13); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_2); - } - /*@ assert t[0] ≡ 2; */ - { - mpz_t __e_acsl_3; - mpz_t __e_acsl_4; - int __e_acsl_eq_2; - __gmpz_init_set_si(__e_acsl_3,(long)t[0]); - __gmpz_init_set_si(__e_acsl_4,(long)2); - __e_acsl_eq_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_3), - (__mpz_struct const *)(__e_acsl_4)); - e_acsl_assert(__e_acsl_eq_2 == 0,(char *)"Assertion",(char *)"main", - (char *)"t[0] == 2",14); - __gmpz_clear(__e_acsl_3); - __gmpz_clear(__e_acsl_4); - } - /*@ assert t[2] ≡ 4; */ - { - mpz_t __e_acsl_5; - mpz_t __e_acsl_6; - int __e_acsl_eq_3; - __gmpz_init_set_si(__e_acsl_5,(long)t[2]); - __gmpz_init_set_si(__e_acsl_6,(long)4); - __e_acsl_eq_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_5), - (__mpz_struct const *)(__e_acsl_6)); - e_acsl_assert(__e_acsl_eq_3 == 0,(char *)"Assertion",(char *)"main", - (char *)"t[2] == 4",15); - __gmpz_clear(__e_acsl_5); - __gmpz_clear(__e_acsl_6); - } - /*@ assert t[(2*sizeof(int))/sizeof((int)0x0)] ≡ 4; */ - { - mpz_t __e_acsl_7; - mpz_t __e_acsl_sizeof; - mpz_t __e_acsl_mul; - mpz_t __e_acsl_sizeof_2; - mpz_t __e_acsl_8; - int __e_acsl_div_guard; - mpz_t __e_acsl_div; - unsigned long __e_acsl_9; - mpz_t __e_acsl_10; - mpz_t __e_acsl_11; - int __e_acsl_eq_4; - __gmpz_init_set_si(__e_acsl_7,(long)2); - __gmpz_init_set_si(__e_acsl_sizeof,4L); - __gmpz_init(__e_acsl_mul); - __gmpz_mul(__e_acsl_mul,(__mpz_struct const *)(__e_acsl_7), - (__mpz_struct const *)(__e_acsl_sizeof)); - __gmpz_init_set_si(__e_acsl_sizeof_2,4L); - __gmpz_init_set_si(__e_acsl_8,0L); - __e_acsl_div_guard = __gmpz_cmp((__mpz_struct const *)(__e_acsl_sizeof_2), - (__mpz_struct const *)(__e_acsl_8)); - __gmpz_init(__e_acsl_div); - /*@ assert E_ACSL: sizeof((int)0x0) ≢ 0; */ - e_acsl_assert(! (__e_acsl_div_guard == 0),(char *)"Assertion", - (char *)"main",(char *)"sizeof((int)0x0) == 0",16); - __gmpz_tdiv_q(__e_acsl_div,(__mpz_struct const *)(__e_acsl_mul), - (__mpz_struct const *)(__e_acsl_sizeof_2)); - __e_acsl_9 = __gmpz_get_ui((__mpz_struct const *)(__e_acsl_div)); - __gmpz_init_set_si(__e_acsl_10,(long)t[__e_acsl_9]); - __gmpz_init_set_si(__e_acsl_11,(long)4); - __e_acsl_eq_4 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_10), - (__mpz_struct const *)(__e_acsl_11)); - e_acsl_assert(__e_acsl_eq_4 == 0,(char *)"Assertion",(char *)"main", - (char *)"t[(2*sizeof(int))/sizeof((int)0x0)] == 4",16); - __gmpz_clear(__e_acsl_7); - __gmpz_clear(__e_acsl_sizeof); - __gmpz_clear(__e_acsl_mul); - __gmpz_clear(__e_acsl_sizeof_2); - __gmpz_clear(__e_acsl_8); - __gmpz_clear(__e_acsl_div); - __gmpz_clear(__e_acsl_10); - __gmpz_clear(__e_acsl_11); - } - { - int i; - i = 0; - while (i < 2) { - /*@ assert t[i] ≡ i+2; */ - { - mpz_t __e_acsl_12; - mpz_t __e_acsl_i; - mpz_t __e_acsl_13; - mpz_t __e_acsl_add; - int __e_acsl_eq_5; - __gmpz_init_set_si(__e_acsl_12,(long)t[i]); - __gmpz_init_set_si(__e_acsl_i,(long)i); - __gmpz_init_set_si(__e_acsl_13,(long)2); - __gmpz_init(__e_acsl_add); - __gmpz_add(__e_acsl_add,(__mpz_struct const *)(__e_acsl_i), - (__mpz_struct const *)(__e_acsl_13)); - __e_acsl_eq_5 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_12), - (__mpz_struct const *)(__e_acsl_add)); - e_acsl_assert(__e_acsl_eq_5 == 0,(char *)"Assertion",(char *)"main", - (char *)"t[i] == i+2",19); - __gmpz_clear(__e_acsl_12); - __gmpz_clear(__e_acsl_i); - __gmpz_clear(__e_acsl_13); - __gmpz_clear(__e_acsl_add); - } - /*@ assert t[2-i] ≡ 4-i; */ - { - mpz_t __e_acsl_14; - mpz_t __e_acsl_i_2; - mpz_t __e_acsl_sub; - unsigned long __e_acsl_15; - mpz_t __e_acsl_16; - mpz_t __e_acsl_17; - mpz_t __e_acsl_sub_2; - int __e_acsl_eq_6; - __gmpz_init_set_si(__e_acsl_14,(long)2); - __gmpz_init_set_si(__e_acsl_i_2,(long)i); - __gmpz_init(__e_acsl_sub); - __gmpz_sub(__e_acsl_sub,(__mpz_struct const *)(__e_acsl_14), - (__mpz_struct const *)(__e_acsl_i_2)); - __e_acsl_15 = __gmpz_get_ui((__mpz_struct const *)(__e_acsl_sub)); - __gmpz_init_set_si(__e_acsl_16,(long)t[__e_acsl_15]); - __gmpz_init_set_si(__e_acsl_17,(long)4); - __gmpz_init(__e_acsl_sub_2); - __gmpz_sub(__e_acsl_sub_2,(__mpz_struct const *)(__e_acsl_17), - (__mpz_struct const *)(__e_acsl_i_2)); - __e_acsl_eq_6 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_16), - (__mpz_struct const *)(__e_acsl_sub_2)); - e_acsl_assert(__e_acsl_eq_6 == 0,(char *)"Assertion",(char *)"main", - (char *)"t[2-i] == 4-i",20); - __gmpz_clear(__e_acsl_14); - __gmpz_clear(__e_acsl_i_2); - __gmpz_clear(__e_acsl_sub); - __gmpz_clear(__e_acsl_16); - __gmpz_clear(__e_acsl_17); - __gmpz_clear(__e_acsl_sub_2); - } - /*@ assert *(&t[2]-i) ≡ 4-i; */ - { - mpz_t __e_acsl_18; - mpz_t __e_acsl_19; - mpz_t __e_acsl_i_3; - mpz_t __e_acsl_sub_3; - int __e_acsl_eq_7; - __gmpz_init_set_si(__e_acsl_18,(long)*(& t[2] - (long)i)); - __gmpz_init_set_si(__e_acsl_19,(long)4); - __gmpz_init_set_si(__e_acsl_i_3,(long)i); - __gmpz_init(__e_acsl_sub_3); - __gmpz_sub(__e_acsl_sub_3,(__mpz_struct const *)(__e_acsl_19), - (__mpz_struct const *)(__e_acsl_i_3)); - __e_acsl_eq_7 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_18), - (__mpz_struct const *)(__e_acsl_sub_3)); - e_acsl_assert(__e_acsl_eq_7 == 0,(char *)"Assertion",(char *)"main", - (char *)"*(&t[2]-i) == 4-i",21); - __gmpz_clear(__e_acsl_18); - __gmpz_clear(__e_acsl_19); - __gmpz_clear(__e_acsl_i_3); - __gmpz_clear(__e_acsl_sub_3); - } - i ++; - } - } - __full_init((void *)(& p)); - p = & t[2]; - __initialize((void *)(& t[2]),sizeof(int)); - t[2] = 5; - /*@ assert *p ≡ 5; */ - { - mpz_t __e_acsl_20; - mpz_t __e_acsl_21; - int __e_acsl_eq_8; - __gmpz_init_set_si(__e_acsl_20,(long)*p); - __gmpz_init_set_si(__e_acsl_21,(long)5); - __e_acsl_eq_8 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_20), - (__mpz_struct const *)(__e_acsl_21)); - e_acsl_assert(__e_acsl_eq_8 == 0,(char *)"Assertion",(char *)"main", - (char *)"*p == 5",27); - __gmpz_clear(__e_acsl_20); - __gmpz_clear(__e_acsl_21); - } - __retres = 0; - __delete_block((void *)(& p)); - __delete_block((void *)(t)); - __delete_block((void *)(& x)); - __e_acsl_memory_clean(); - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr_init2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr_init2.c deleted file mode 100644 index 7eba374f37b..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr_init2.c +++ /dev/null @@ -1,162 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -void *__malloc(size_t size); - -/*@ ghost extern int __e_acsl_init; */ - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \initialized((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __initialized(void *ptr, - size_t size); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ assigns __fc_heap_status, \result; - assigns __fc_heap_status \from size, __fc_heap_status; - assigns \result \from size, __fc_heap_status; - allocates \result; - - behavior allocation: - assumes is_allocable(size); - ensures \fresh{Old, Here}(\result,\old(size)); - assigns __fc_heap_status, \result; - assigns __fc_heap_status \from size, __fc_heap_status; - assigns \result \from size, __fc_heap_status; - - behavior no_allocation: - assumes ¬is_allocable(size); - ensures \result ≡ \null; - assigns \result; - assigns \result \from \nothing; - allocates \nothing; - - complete behaviors no_allocation, allocation; - disjoint behaviors no_allocation, allocation; - */ -void *__e_acsl_malloc(size_t size) -{ - void *__retres; - __store_block((void *)(& __retres),4U); - __retres = __malloc(size); - __delete_block((void *)(& __retres)); - return __retres; -} - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - -*/ -int *A; -int *B; -void f(void) -{ - A = B; - return; -} - -void g(int *C, int *D) -{ - /*@ assert \initialized(&C); */ - __store_block((void *)(& C),4U); - e_acsl_assert(1,(char *)"Assertion",(char *)"g", - (char *)"\\initialized(&C)",19); - __delete_block((void *)(& C)); - return; -} - -void __e_acsl_memory_init(void) -{ - __store_block((void *)(& B),4U); - __full_init((void *)(& B)); - __store_block((void *)(& A),4U); - __full_init((void *)(& A)); - return; -} - -int main(void) -{ - int __retres; - int *x; - int *y; - __e_acsl_memory_init(); - __store_block((void *)(& y),4U); - __store_block((void *)(& x),4U); - B = (int *)__e_acsl_malloc(sizeof(int)); - __full_init((void *)(& y)); - y = (int *)__e_acsl_malloc(sizeof(int)); - __full_init((void *)(& x)); - x = y; - f(); - /*@ assert \initialized(&A); */ - e_acsl_assert(1,(char *)"Assertion",(char *)"main", - (char *)"\\initialized(&A)",28); - /*@ assert \initialized(&x); */ - { - int __e_acsl_initialized; - __e_acsl_initialized = __initialized((void *)(& x),sizeof(int *)); - e_acsl_assert(__e_acsl_initialized,(char *)"Assertion",(char *)"main", - (char *)"\\initialized(&x)",29); - } - g(x,y); - __retres = 0; - __delete_block((void *)(& B)); - __delete_block((void *)(& A)); - __delete_block((void *)(& y)); - __delete_block((void *)(& x)); - __e_acsl_memory_clean(); - return __retres; -} - - 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 deleted file mode 100644 index c8306f004fe..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_result2.c +++ /dev/null @@ -1,197 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - assigns *z; - assigns *z \from __e_acsl_init; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init(__mpz_struct * /*[1]*/ z); - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ requires \valid(z1); - requires \valid_read(z2); - requires \valid_read(z3); - assigns *z1; - assigns *z1 \from *z2, *z3; - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_sub(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); - -/*@ requires \valid_read(z); - assigns \result; - assigns \result \from *z; */ -extern __attribute__((__FC_BUILTIN__)) unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -/*@ ensures \result ≡ (int)(\old(x)-\old(x)); */ -int f(int x) -{ - x = 0; - return x; -} - -/*@ ensures \result ≡ (int)(\old(x)-\old(x)); */ -int __e_acsl_f(int x) -{ - int __e_acsl_at_2; - int __e_acsl_at; - int __retres; - __e_acsl_at_2 = x; - __e_acsl_at = x; - __retres = f(x); - { - mpz_t __e_acsl_result; - mpz_t __e_acsl; - mpz_t __e_acsl_sub; - unsigned long __e_acsl_2; - mpz_t __e_acsl_cast; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl_result,(long)__retres); - __gmpz_init_set_si(__e_acsl,(long)__e_acsl_at); - __gmpz_init(__e_acsl_sub); - __gmpz_sub(__e_acsl_sub,(__mpz_struct const *)(__e_acsl), - (__mpz_struct const *)(__e_acsl)); - __e_acsl_2 = __gmpz_get_ui((__mpz_struct const *)(__e_acsl_sub)); - __gmpz_init_set_si(__e_acsl_cast,(long)((int)__e_acsl_2)); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_result), - (__mpz_struct const *)(__e_acsl_cast)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Postcondition",(char *)"f", - (char *)"\\result == (int)(\\old(x)-\\old(x))",7); - __gmpz_clear(__e_acsl_result); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_sub); - __gmpz_clear(__e_acsl_cast); - return __retres; - } -} - -int Y = 1; -/*@ ensures \result ≡ Y; */ -int g(int x) -{ - return x; -} - -/*@ ensures \result ≡ Y; */ -int __e_acsl_g(int x) -{ - int __retres; - __retres = g(x); - { - mpz_t __e_acsl_result; - mpz_t __e_acsl_Y; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl_result,(long)__retres); - __gmpz_init_set_si(__e_acsl_Y,(long)Y); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_result), - (__mpz_struct const *)(__e_acsl_Y)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Postcondition",(char *)"g", - (char *)"\\result == Y",18); - __gmpz_clear(__e_acsl_result); - __gmpz_clear(__e_acsl_Y); - return __retres; - } -} - -/*@ ensures \result ≡ 0; */ -int h(void) -{ - int __retres; - __retres = 0; - return __retres; -} - -/*@ ensures \result ≡ 0; */ -int __e_acsl_h(void) -{ - int __retres; - __retres = h(); - { - mpz_t __e_acsl_result; - mpz_t __e_acsl; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl_result,(long)__retres); - __gmpz_init_set_si(__e_acsl,(long)0); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_result), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Postcondition",(char *)"h", - (char *)"\\result == 0",23); - __gmpz_clear(__e_acsl_result); - __gmpz_clear(__e_acsl); - return __retres; - } -} - -int main(void) -{ - int __retres; - __e_acsl_f(1); - __e_acsl_g(Y); - __e_acsl_h(); - __retres = 0; - return __retres; -} - - 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 deleted file mode 100644 index e6821c6545f..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_sizeof2.c +++ /dev/null @@ -1,89 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int main(void) -{ - int __retres; - int x; - x = 0; - x ++; - /*@ assert sizeof(int) ≡ sizeof(x); */ - { - mpz_t __e_acsl_sizeof; - mpz_t __e_acsl_sizeof_2; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl_sizeof,4L); - __gmpz_init_set_si(__e_acsl_sizeof_2,4L); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_sizeof), - (__mpz_struct const *)(__e_acsl_sizeof_2)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Assertion",(char *)"main", - (char *)"sizeof(int) == sizeof(x)",10); - __gmpz_clear(__e_acsl_sizeof); - __gmpz_clear(__e_acsl_sizeof_2); - } - __retres = 0; - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stdout2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stdout2.c deleted file mode 100644 index dcf3ab86d76..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stdout2.c +++ /dev/null @@ -1,159 +0,0 @@ -/* Generated by Frama-C */ -char *__e_acsl_literal_string_2; -char *__e_acsl_literal_string; -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned long size_t; -typedef unsigned int ino_t; -typedef unsigned int gid_t; -typedef unsigned int uid_t; -typedef long time_t; -typedef unsigned int blkcnt_t; -typedef unsigned int blksize_t; -typedef unsigned int dev_t; -typedef unsigned int mode_t; -typedef unsigned int nlink_t; -typedef long off_t; -struct stat { - dev_t st_dev ; - ino_t st_ino ; - mode_t st_mode ; - nlink_t st_nlink ; - uid_t st_uid ; - gid_t st_gid ; - dev_t st_rdev ; - off_t st_size ; - time_t st_atime ; - time_t st_mtime ; - time_t st_ctime ; - blksize_t st_blksize ; - blkcnt_t st_blocks ; -}; -struct __fc_pos_t { - unsigned long __fc_stdio_position ; -}; -typedef struct __fc_pos_t fpos_t; -struct __fc_FILE { - unsigned int __fc_stdio_id ; - fpos_t __fc_position ; - char __fc_error ; - char __fc_eof ; - int __fc_flags ; - struct stat *__fc_inode ; - unsigned char *__fc_real_data ; - int __fc_real_data_max_size ; -}; -typedef struct __fc_FILE FILE; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __literal_string(void *ptr); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -extern FILE *stdout; - -FILE __fc_fopen[512]; -FILE * const __p_fc_fopen = __fc_fopen; -/*@ ensures \result ≡ \null ∨ \subset(\result, &__fc_fopen[0 .. 512-1]); - assigns \result; - assigns \result \from *(filename+(..)), *(mode+(..)), __p_fc_fopen; - */ -extern FILE *fopen(char const *filename, char const *mode); - -/*@ ensures \result ≡ \null ∨ \subset(\result, &__fc_fopen[0 .. 512-1]); - assigns \result; - assigns \result \from *(filename+(..)), *(mode+(..)), __p_fc_fopen; - */ -FILE *__e_acsl_fopen(char const *filename, char const *mode) -{ - FILE *__retres; - __retres = fopen(filename,mode); - return __retres; -} - -void __e_acsl_memory_init(void) -{ - __e_acsl_literal_string_2 = "wb"; - __store_block((void *)__e_acsl_literal_string_2,sizeof("wb")); - __full_init((void *)__e_acsl_literal_string_2); - __literal_string((void *)__e_acsl_literal_string_2); - __e_acsl_literal_string = "/tmp/foo"; - __store_block((void *)__e_acsl_literal_string,sizeof("/tmp/foo")); - __full_init((void *)__e_acsl_literal_string); - __literal_string((void *)__e_acsl_literal_string); - __store_block((void *)(& stdout),8UL); - __full_init((void *)(& stdout)); - return; -} - -int main(void) -{ - int __retres; - FILE *f; - FILE *f2; - __e_acsl_memory_init(); - __store_block((void *)(& f),8UL); - __full_init((void *)(& f)); - f = stdout; - f2 = __e_acsl_fopen(__e_acsl_literal_string,__e_acsl_literal_string_2); - /*@ assert f ≡ __fc_stdout; */ - e_acsl_assert(f == stdout,(char *)"Assertion",(char *)"main", - (char *)"f == __fc_stdout",13); - __retres = 0; - __delete_block((void *)(& stdout)); - __delete_block((void *)(& f)); - __e_acsl_memory_clean(); - return __retres; -} - - 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 deleted file mode 100644 index ac6f0177bbb..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stmt_contract2.c +++ /dev/null @@ -1,423 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - assigns *z; - assigns *z \from __e_acsl_init; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init(__mpz_struct * /*[1]*/ z); - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ requires \valid(z1); - requires \valid_read(z2); - requires \valid_read(z3); - assigns *z1; - assigns *z1 \from *z2, *z3; - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int main(void) -{ - int __retres; - int x; - int y; - x = 0; - y = 2; - /*@ ensures x ≡ 1; */ - { - mpz_t __e_acsl_x; - mpz_t __e_acsl; - int __e_acsl_eq; - x = 1; - __gmpz_init_set_si(__e_acsl_x,(long)x); - __gmpz_init_set_si(__e_acsl,(long)1); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Postcondition",(char *)"main", - (char *)"x == 1",9); - __gmpz_clear(__e_acsl_x); - __gmpz_clear(__e_acsl); - } - /*@ ensures x ≡ 2; - ensures y ≡ 2; */ - { - mpz_t __e_acsl_x_2; - mpz_t __e_acsl_2; - int __e_acsl_eq_2; - mpz_t __e_acsl_y; - int __e_acsl_eq_3; - x = 2; - __gmpz_init_set_si(__e_acsl_x_2,(long)x); - __gmpz_init_set_si(__e_acsl_2,(long)2); - __e_acsl_eq_2 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_2), - (__mpz_struct const *)(__e_acsl_2)); - e_acsl_assert(__e_acsl_eq_2 == 0,(char *)"Postcondition",(char *)"main", - (char *)"x == 2",12); - __gmpz_init_set_si(__e_acsl_y,(long)y); - __e_acsl_eq_3 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y), - (__mpz_struct const *)(__e_acsl_2)); - e_acsl_assert(__e_acsl_eq_3 == 0,(char *)"Postcondition",(char *)"main", - (char *)"y == 2",13); - __gmpz_clear(__e_acsl_x_2); - __gmpz_clear(__e_acsl_2); - __gmpz_clear(__e_acsl_y); - } - /*@ requires x ≡ 2; */ - { - mpz_t __e_acsl_x_3; - mpz_t __e_acsl_3; - int __e_acsl_eq_4; - __gmpz_init_set_si(__e_acsl_x_3,(long)x); - __gmpz_init_set_si(__e_acsl_3,(long)2); - __e_acsl_eq_4 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_3), - (__mpz_struct const *)(__e_acsl_3)); - e_acsl_assert(__e_acsl_eq_4 == 0,(char *)"Precondition",(char *)"main", - (char *)"x == 2",16); - __gmpz_clear(__e_acsl_x_3); - __gmpz_clear(__e_acsl_3); - x ++; - } - /*@ requires x ≡ 3; - requires y ≡ 2; */ - { - mpz_t __e_acsl_x_4; - mpz_t __e_acsl_4; - int __e_acsl_eq_5; - mpz_t __e_acsl_y_2; - mpz_t __e_acsl_5; - int __e_acsl_eq_6; - __gmpz_init_set_si(__e_acsl_x_4,(long)x); - __gmpz_init_set_si(__e_acsl_4,(long)3); - __e_acsl_eq_5 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_4), - (__mpz_struct const *)(__e_acsl_4)); - e_acsl_assert(__e_acsl_eq_5 == 0,(char *)"Precondition",(char *)"main", - (char *)"x == 3",19); - __gmpz_init_set_si(__e_acsl_y_2,(long)y); - __gmpz_init_set_si(__e_acsl_5,(long)2); - __e_acsl_eq_6 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_2), - (__mpz_struct const *)(__e_acsl_5)); - e_acsl_assert(__e_acsl_eq_6 == 0,(char *)"Precondition",(char *)"main", - (char *)"y == 2",20); - __gmpz_clear(__e_acsl_x_4); - __gmpz_clear(__e_acsl_4); - __gmpz_clear(__e_acsl_y_2); - __gmpz_clear(__e_acsl_5); - x += y; - } - /*@ behavior b1: - requires x ≡ 5; - ensures x ≡ 3; - - behavior b2: - requires x ≡ 3+y; - requires y ≡ 2; - ensures x ≡ y+1; - */ - { - mpz_t __e_acsl_x_6; - mpz_t __e_acsl_9; - int __e_acsl_eq_10; - mpz_t __e_acsl_y_4; - mpz_t __e_acsl_10; - mpz_t __e_acsl_add_2; - int __e_acsl_eq_11; - { - mpz_t __e_acsl_x_5; - mpz_t __e_acsl_6; - int __e_acsl_eq_7; - mpz_t __e_acsl_7; - mpz_t __e_acsl_y_3; - mpz_t __e_acsl_add; - int __e_acsl_eq_8; - mpz_t __e_acsl_8; - int __e_acsl_eq_9; - __gmpz_init_set_si(__e_acsl_x_5,(long)x); - __gmpz_init_set_si(__e_acsl_6,(long)5); - __e_acsl_eq_7 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_5), - (__mpz_struct const *)(__e_acsl_6)); - e_acsl_assert(__e_acsl_eq_7 == 0,(char *)"Precondition",(char *)"main", - (char *)"x == 5",24); - __gmpz_init_set_si(__e_acsl_7,(long)3); - __gmpz_init_set_si(__e_acsl_y_3,(long)y); - __gmpz_init(__e_acsl_add); - __gmpz_add(__e_acsl_add,(__mpz_struct const *)(__e_acsl_7), - (__mpz_struct const *)(__e_acsl_y_3)); - __e_acsl_eq_8 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_5), - (__mpz_struct const *)(__e_acsl_add)); - e_acsl_assert(__e_acsl_eq_8 == 0,(char *)"Precondition",(char *)"main", - (char *)"x == 3+y",27); - __gmpz_init_set_si(__e_acsl_8,(long)2); - __e_acsl_eq_9 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_3), - (__mpz_struct const *)(__e_acsl_8)); - e_acsl_assert(__e_acsl_eq_9 == 0,(char *)"Precondition",(char *)"main", - (char *)"y == 2",28); - __gmpz_clear(__e_acsl_x_5); - __gmpz_clear(__e_acsl_6); - __gmpz_clear(__e_acsl_7); - __gmpz_clear(__e_acsl_y_3); - __gmpz_clear(__e_acsl_add); - __gmpz_clear(__e_acsl_8); - x = 3; - } - __gmpz_init_set_si(__e_acsl_x_6,(long)x); - __gmpz_init_set_si(__e_acsl_9,(long)3); - __e_acsl_eq_10 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_6), - (__mpz_struct const *)(__e_acsl_9)); - e_acsl_assert(__e_acsl_eq_10 == 0,(char *)"Postcondition",(char *)"main", - (char *)"x == 3",25); - __gmpz_init_set_si(__e_acsl_y_4,(long)y); - __gmpz_init_set_si(__e_acsl_10,(long)1); - __gmpz_init(__e_acsl_add_2); - __gmpz_add(__e_acsl_add_2,(__mpz_struct const *)(__e_acsl_y_4), - (__mpz_struct const *)(__e_acsl_10)); - __e_acsl_eq_11 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_6), - (__mpz_struct const *)(__e_acsl_add_2)); - e_acsl_assert(__e_acsl_eq_11 == 0,(char *)"Postcondition",(char *)"main", - (char *)"x == y+1",29); - __gmpz_clear(__e_acsl_x_6); - __gmpz_clear(__e_acsl_9); - __gmpz_clear(__e_acsl_y_4); - __gmpz_clear(__e_acsl_10); - __gmpz_clear(__e_acsl_add_2); - } - /*@ behavior b1: - assumes x ≡ 1; - requires x ≡ 0; - - behavior b2: - assumes x ≡ 3; - assumes y ≡ 2; - requires x ≡ 3; - requires x+y ≡ 5; - */ - { - mpz_t __e_acsl_x_7; - mpz_t __e_acsl_11; - int __e_acsl_eq_12; - int __e_acsl_implies; - mpz_t __e_acsl_13; - int __e_acsl_eq_14; - int __e_acsl_and; - int __e_acsl_implies_2; - int __e_acsl_eq_17; - int __e_acsl_and_2; - int __e_acsl_implies_3; - __gmpz_init_set_si(__e_acsl_x_7,(long)x); - __gmpz_init_set_si(__e_acsl_11,(long)1); - __e_acsl_eq_12 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_7), - (__mpz_struct const *)(__e_acsl_11)); - if (! (__e_acsl_eq_12 == 0)) __e_acsl_implies = 1; - else { - mpz_t __e_acsl_x_8; - mpz_t __e_acsl_12; - int __e_acsl_eq_13; - __gmpz_init_set_si(__e_acsl_x_8,(long)x); - __gmpz_init_set_si(__e_acsl_12,(long)0); - __e_acsl_eq_13 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_8), - (__mpz_struct const *)(__e_acsl_12)); - __e_acsl_implies = __e_acsl_eq_13 == 0; - __gmpz_clear(__e_acsl_x_8); - __gmpz_clear(__e_acsl_12); - } - e_acsl_assert(__e_acsl_implies,(char *)"Precondition",(char *)"main", - (char *)"x == 1 ==> x == 0",34); - __gmpz_init_set_si(__e_acsl_13,(long)3); - __e_acsl_eq_14 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_7), - (__mpz_struct const *)(__e_acsl_13)); - if (__e_acsl_eq_14 == 0) { - mpz_t __e_acsl_y_5; - mpz_t __e_acsl_14; - int __e_acsl_eq_15; - __gmpz_init_set_si(__e_acsl_y_5,(long)y); - __gmpz_init_set_si(__e_acsl_14,(long)2); - __e_acsl_eq_15 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_5), - (__mpz_struct const *)(__e_acsl_14)); - __e_acsl_and = __e_acsl_eq_15 == 0; - __gmpz_clear(__e_acsl_y_5); - __gmpz_clear(__e_acsl_14); - } - else __e_acsl_and = 0; - if (! __e_acsl_and) __e_acsl_implies_2 = 1; - else { - mpz_t __e_acsl_x_9; - mpz_t __e_acsl_15; - int __e_acsl_eq_16; - __gmpz_init_set_si(__e_acsl_x_9,(long)x); - __gmpz_init_set_si(__e_acsl_15,(long)3); - __e_acsl_eq_16 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_9), - (__mpz_struct const *)(__e_acsl_15)); - __e_acsl_implies_2 = __e_acsl_eq_16 == 0; - __gmpz_clear(__e_acsl_x_9); - __gmpz_clear(__e_acsl_15); - } - e_acsl_assert(__e_acsl_implies_2,(char *)"Precondition",(char *)"main", - (char *)"x == 3 && y == 2 ==> x == 3",38); - __e_acsl_eq_17 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_7), - (__mpz_struct const *)(__e_acsl_13)); - if (__e_acsl_eq_17 == 0) { - mpz_t __e_acsl_y_6; - mpz_t __e_acsl_16; - int __e_acsl_eq_18; - __gmpz_init_set_si(__e_acsl_y_6,(long)y); - __gmpz_init_set_si(__e_acsl_16,(long)2); - __e_acsl_eq_18 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_6), - (__mpz_struct const *)(__e_acsl_16)); - __e_acsl_and_2 = __e_acsl_eq_18 == 0; - __gmpz_clear(__e_acsl_y_6); - __gmpz_clear(__e_acsl_16); - } - else __e_acsl_and_2 = 0; - if (! __e_acsl_and_2) __e_acsl_implies_3 = 1; - else { - mpz_t __e_acsl_x_10; - mpz_t __e_acsl_y_7; - mpz_t __e_acsl_add_3; - mpz_t __e_acsl_17; - int __e_acsl_eq_19; - __gmpz_init_set_si(__e_acsl_x_10,(long)x); - __gmpz_init_set_si(__e_acsl_y_7,(long)y); - __gmpz_init(__e_acsl_add_3); - __gmpz_add(__e_acsl_add_3,(__mpz_struct const *)(__e_acsl_x_10), - (__mpz_struct const *)(__e_acsl_y_7)); - __gmpz_init_set_si(__e_acsl_17,(long)5); - __e_acsl_eq_19 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_add_3), - (__mpz_struct const *)(__e_acsl_17)); - __e_acsl_implies_3 = __e_acsl_eq_19 == 0; - __gmpz_clear(__e_acsl_x_10); - __gmpz_clear(__e_acsl_y_7); - __gmpz_clear(__e_acsl_add_3); - __gmpz_clear(__e_acsl_17); - } - e_acsl_assert(__e_acsl_implies_3,(char *)"Precondition",(char *)"main", - (char *)"x == 3 && y == 2 ==> x+y == 5",39); - __gmpz_clear(__e_acsl_x_7); - __gmpz_clear(__e_acsl_11); - __gmpz_clear(__e_acsl_13); - x += y; - } - /*@ requires x ≡ 5; */ - { - mpz_t __e_acsl_x_11; - mpz_t __e_acsl_18; - int __e_acsl_eq_20; - __gmpz_init_set_si(__e_acsl_x_11,(long)x); - __gmpz_init_set_si(__e_acsl_18,(long)5); - __e_acsl_eq_20 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_11), - (__mpz_struct const *)(__e_acsl_18)); - e_acsl_assert(__e_acsl_eq_20 == 0,(char *)"Precondition",(char *)"main", - (char *)"x == 5",42); - __gmpz_clear(__e_acsl_x_11); - __gmpz_clear(__e_acsl_18); - /*@ requires y ≡ 2; */ - { - mpz_t __e_acsl_y_8; - mpz_t __e_acsl_19; - int __e_acsl_eq_21; - __gmpz_init_set_si(__e_acsl_y_8,(long)y); - __gmpz_init_set_si(__e_acsl_19,(long)2); - __e_acsl_eq_21 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_y_8), - (__mpz_struct const *)(__e_acsl_19)); - e_acsl_assert(__e_acsl_eq_21 == 0,(char *)"Precondition", - (char *)"main",(char *)"y == 2",43); - __gmpz_clear(__e_acsl_y_8); - __gmpz_clear(__e_acsl_19); - x += y; - } - } - /*@ requires x ≡ 7; - ensures x ≡ 7; */ - { - mpz_t __e_acsl_x_13; - mpz_t __e_acsl_21; - int __e_acsl_eq_23; - { - mpz_t __e_acsl_x_12; - mpz_t __e_acsl_20; - int __e_acsl_eq_22; - __gmpz_init_set_si(__e_acsl_x_12,(long)x); - __gmpz_init_set_si(__e_acsl_20,(long)7); - __e_acsl_eq_22 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_12), - (__mpz_struct const *)(__e_acsl_20)); - e_acsl_assert(__e_acsl_eq_22 == 0,(char *)"Precondition", - (char *)"main",(char *)"x == 7",46); - __gmpz_clear(__e_acsl_x_12); - __gmpz_clear(__e_acsl_20); - __retres = 0; - } - __gmpz_init_set_si(__e_acsl_x_13,(long)x); - __gmpz_init_set_si(__e_acsl_21,(long)7); - __e_acsl_eq_23 = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x_13), - (__mpz_struct const *)(__e_acsl_21)); - e_acsl_assert(__e_acsl_eq_23 == 0,(char *)"Postcondition",(char *)"main", - (char *)"x == 7",47); - __gmpz_clear(__e_acsl_x_13); - __gmpz_clear(__e_acsl_21); - } - return __retres; -} - - 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 deleted file mode 100644 index c7f61875787..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_true2.c +++ /dev/null @@ -1,54 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ ghost extern int __e_acsl_internal_heap; */ - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int main(void) -{ - int __retres; - int x; - x = 0; - x ++; - /*@ assert \true; */ - e_acsl_assert(1,(char *)"Assertion",(char *)"main",(char *)"\\true",10); - __retres = 0; - return __retres; -} - - 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 deleted file mode 100644 index 09cb51fe38a..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_typedef2.c +++ /dev/null @@ -1,99 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -typedef unsigned char uint8; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, - unsigned long n); - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -int main(void) -{ - int __retres; - uint8 x; - x = (unsigned char)0; - /*@ assert x ≡ 0; */ - { - mpz_t __e_acsl_x; - mpz_t __e_acsl; - int __e_acsl_eq; - __gmpz_init_set_ui(__e_acsl_x,(unsigned long)x); - __gmpz_init_set_si(__e_acsl,(long)0); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_x), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Assertion",(char *)"main", - (char *)"x == 0",11); - __gmpz_clear(__e_acsl_x); - __gmpz_clear(__e_acsl); - } - __retres = 0; - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_valid2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_valid2.c deleted file mode 100644 index aeef2091f89..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_valid2.c +++ /dev/null @@ -1,614 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned long size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -void *__malloc(size_t size); - -void __free(void *p); - -/*@ ghost extern int __e_acsl_init; */ - -/*@ assigns \result; - assigns \result \from ptr; */ -extern __attribute__((__FC_BUILTIN__)) int __freeable(void *ptr); - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures \result ≡ 1 ⇒ \valid((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __valid(void *ptr, size_t size); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \valid_read((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __valid_read(void *ptr, - size_t size); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \initialized((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __initialized(void *ptr, - size_t size); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ assigns __fc_heap_status, \result; - assigns __fc_heap_status \from size, __fc_heap_status; - assigns \result \from size, __fc_heap_status; - allocates \result; - - behavior allocation: - assumes is_allocable(size); - ensures \fresh{Old, Here}(\result,\old(size)); - assigns __fc_heap_status, \result; - assigns __fc_heap_status \from size, __fc_heap_status; - assigns \result \from size, __fc_heap_status; - - behavior no_allocation: - assumes ¬is_allocable(size); - ensures \result ≡ \null; - assigns \result; - assigns \result \from \nothing; - allocates \nothing; - - complete behaviors no_allocation, allocation; - disjoint behaviors no_allocation, allocation; - */ -void *__e_acsl_malloc(size_t size) -{ - void *__retres; - __store_block((void *)(& __retres),8UL); - __retres = __malloc(size); - __delete_block((void *)(& __retres)); - return __retres; -} - -/*@ assigns __fc_heap_status; - assigns __fc_heap_status \from __fc_heap_status; - frees p; - - behavior deallocation: - assumes p ≢ \null; - requires freeable: \freeable(p); - ensures \allocable(\old(p)); - assigns __fc_heap_status; - assigns __fc_heap_status \from __fc_heap_status; - - behavior no_deallocation: - assumes p ≡ \null; - assigns \nothing; - allocates \nothing; - - complete behaviors no_deallocation, deallocation; - disjoint behaviors no_deallocation, deallocation; - */ -void __e_acsl_free(void *p) -{ - int __e_acsl_at; - { - int __e_acsl_implies; - __store_block((void *)(& p),8UL); - if (! (p != (void *)0)) __e_acsl_implies = 1; - else { - int __e_acsl_freeable; - __e_acsl_freeable = __freeable(p); - __e_acsl_implies = __e_acsl_freeable; - } - e_acsl_assert(__e_acsl_implies,(char *)"Precondition",(char *)"free", - (char *)"p != \\null ==> \\freeable(p)",178); - __store_block((void *)(& __e_acsl_at),4UL); - __e_acsl_at = p != (void *)0; - __free(p); - } - __delete_block((void *)(& p)); - return; -} - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - -*/ -int *X; -int Z; -/*@ requires \valid(x); - ensures \valid(\result); */ -int *f(int *x) -{ - int *y; - __store_block((void *)(& y),8UL); - /*@ assert ¬\valid(y); */ - { - int __e_acsl_initialized; - int __e_acsl_and; - __store_block((void *)(& x),8UL); - __e_acsl_initialized = __initialized((void *)(& y),sizeof(int *)); - if (__e_acsl_initialized) { - int __e_acsl_valid; - __e_acsl_valid = __valid((void *)y,sizeof(int)); - __e_acsl_and = __e_acsl_valid; - } - else __e_acsl_and = 0; - e_acsl_assert(! __e_acsl_and,(char *)"Assertion",(char *)"f", - (char *)"!\\valid(y)",19); - } - __full_init((void *)(& y)); - y = x; - /*@ assert \valid(x); */ - { - int __e_acsl_valid_2; - __e_acsl_valid_2 = __valid((void *)x,sizeof(int)); - e_acsl_assert(__e_acsl_valid_2,(char *)"Assertion",(char *)"f", - (char *)"\\valid(x)",21); - } - __delete_block((void *)(& x)); - __delete_block((void *)(& y)); - return y; -} - -/*@ requires \valid(x); - ensures \valid(\result); */ -int *__e_acsl_f(int *x) -{ - int *__retres; - __store_block((void *)(& __retres),8UL); - { - int __e_acsl_valid; - __store_block((void *)(& x),8UL); - __e_acsl_valid = __valid((void *)x,sizeof(int)); - e_acsl_assert(__e_acsl_valid,(char *)"Precondition",(char *)"f", - (char *)"\\valid(x)",15); - __retres = f(x); - } - { - int __e_acsl_valid_2; - __e_acsl_valid_2 = __valid((void *)__retres,sizeof(int)); - e_acsl_assert(__e_acsl_valid_2,(char *)"Postcondition",(char *)"f", - (char *)"\\valid(\\result)",16); - __delete_block((void *)(& x)); - __delete_block((void *)(& __retres)); - return __retres; - } -} - -void g(void) -{ - int m; - int *u; - int **p; - __store_block((void *)(& p),8UL); - __store_block((void *)(& u),8UL); - __store_block((void *)(& m),4UL); - __full_init((void *)(& p)); - p = & u; - __full_init((void *)(& u)); - u = & m; - __full_init((void *)(& m)); - m = 123; - /*@ assert \valid(*p); */ - { - int __e_acsl_initialized; - int __e_acsl_and_2; - __e_acsl_initialized = __initialized((void *)p,sizeof(int *)); - if (__e_acsl_initialized) { - int __e_acsl_initialized_2; - int __e_acsl_and; - int __e_acsl_valid; - __e_acsl_initialized_2 = __initialized((void *)(& p),sizeof(int **)); - if (__e_acsl_initialized_2) { - int __e_acsl_valid_read; - __e_acsl_valid_read = __valid_read((void *)p,sizeof(int *)); - __e_acsl_and = __e_acsl_valid_read; - } - else __e_acsl_and = 0; - e_acsl_assert(__e_acsl_and,(char *)"RTE",(char *)"g", - (char *)"mem_access: \\valid_read(p)",30); - __e_acsl_valid = __valid((void *)*p,sizeof(int)); - __e_acsl_and_2 = __e_acsl_valid; - } - else __e_acsl_and_2 = 0; - e_acsl_assert(__e_acsl_and_2,(char *)"Assertion",(char *)"g", - (char *)"\\valid(*p)",30); - } - __delete_block((void *)(& p)); - __delete_block((void *)(& u)); - __delete_block((void *)(& m)); - return; -} - -void __e_acsl_memory_init(void) -{ - __store_block((void *)(& Z),4UL); - __full_init((void *)(& Z)); - __store_block((void *)(& X),8UL); - __full_init((void *)(& X)); - return; -} - -int main(void) -{ - int __retres; - int *a; - int *b; - int **c; - int ***d; - int n; - __e_acsl_memory_init(); - __store_block((void *)(& n),4UL); - __store_block((void *)(& d),8UL); - __store_block((void *)(& c),8UL); - __store_block((void *)(& b),8UL); - __store_block((void *)(& a),8UL); - __full_init((void *)(& n)); - n = 0; - /*@ assert ¬\valid(a) ∧ ¬\valid(b) ∧ ¬\valid(X); */ - { - int __e_acsl_initialized; - int __e_acsl_and; - int __e_acsl_and_3; - int __e_acsl_and_4; - __e_acsl_initialized = __initialized((void *)(& a),sizeof(int *)); - if (__e_acsl_initialized) { - int __e_acsl_valid; - __e_acsl_valid = __valid((void *)a,sizeof(int)); - __e_acsl_and = __e_acsl_valid; - } - else __e_acsl_and = 0; - if (! __e_acsl_and) { - int __e_acsl_initialized_2; - int __e_acsl_and_2; - __e_acsl_initialized_2 = __initialized((void *)(& b),sizeof(int *)); - if (__e_acsl_initialized_2) { - int __e_acsl_valid_2; - __e_acsl_valid_2 = __valid((void *)b,sizeof(int)); - __e_acsl_and_2 = __e_acsl_valid_2; - } - else __e_acsl_and_2 = 0; - __e_acsl_and_3 = ! __e_acsl_and_2; - } - else __e_acsl_and_3 = 0; - if (__e_acsl_and_3) { - int __e_acsl_valid_3; - __e_acsl_valid_3 = __valid((void *)X,sizeof(int)); - __e_acsl_and_4 = ! __e_acsl_valid_3; - } - else __e_acsl_and_4 = 0; - e_acsl_assert(__e_acsl_and_4,(char *)"Assertion",(char *)"main", - (char *)"!\\valid(a) && !\\valid(b) && !\\valid(X)",35); - } - __full_init((void *)(& a)); - a = (int *)__e_acsl_malloc(sizeof(int)); - /*@ assert \valid(a) ∧ ¬\valid(b) ∧ ¬\valid(X); */ - { - int __e_acsl_initialized_3; - int __e_acsl_and_5; - int __e_acsl_and_7; - int __e_acsl_and_8; - __e_acsl_initialized_3 = __initialized((void *)(& a),sizeof(int *)); - if (__e_acsl_initialized_3) { - int __e_acsl_valid_4; - __e_acsl_valid_4 = __valid((void *)a,sizeof(int)); - __e_acsl_and_5 = __e_acsl_valid_4; - } - else __e_acsl_and_5 = 0; - if (__e_acsl_and_5) { - int __e_acsl_initialized_4; - int __e_acsl_and_6; - __e_acsl_initialized_4 = __initialized((void *)(& b),sizeof(int *)); - if (__e_acsl_initialized_4) { - int __e_acsl_valid_5; - __e_acsl_valid_5 = __valid((void *)b,sizeof(int)); - __e_acsl_and_6 = __e_acsl_valid_5; - } - else __e_acsl_and_6 = 0; - __e_acsl_and_7 = ! __e_acsl_and_6; - } - else __e_acsl_and_7 = 0; - if (__e_acsl_and_7) { - int __e_acsl_valid_6; - __e_acsl_valid_6 = __valid((void *)X,sizeof(int)); - __e_acsl_and_8 = ! __e_acsl_valid_6; - } - else __e_acsl_and_8 = 0; - e_acsl_assert(__e_acsl_and_8,(char *)"Assertion",(char *)"main", - (char *)"\\valid(a) && !\\valid(b) && !\\valid(X)",37); - } - X = a; - /*@ assert \valid(a) ∧ ¬\valid(b) ∧ \valid(X); */ - { - int __e_acsl_initialized_5; - int __e_acsl_and_9; - int __e_acsl_and_11; - int __e_acsl_and_12; - __e_acsl_initialized_5 = __initialized((void *)(& a),sizeof(int *)); - if (__e_acsl_initialized_5) { - int __e_acsl_valid_7; - __e_acsl_valid_7 = __valid((void *)a,sizeof(int)); - __e_acsl_and_9 = __e_acsl_valid_7; - } - else __e_acsl_and_9 = 0; - if (__e_acsl_and_9) { - int __e_acsl_initialized_6; - int __e_acsl_and_10; - __e_acsl_initialized_6 = __initialized((void *)(& b),sizeof(int *)); - if (__e_acsl_initialized_6) { - int __e_acsl_valid_8; - __e_acsl_valid_8 = __valid((void *)b,sizeof(int)); - __e_acsl_and_10 = __e_acsl_valid_8; - } - else __e_acsl_and_10 = 0; - __e_acsl_and_11 = ! __e_acsl_and_10; - } - else __e_acsl_and_11 = 0; - if (__e_acsl_and_11) { - int __e_acsl_valid_9; - __e_acsl_valid_9 = __valid((void *)X,sizeof(int)); - __e_acsl_and_12 = __e_acsl_valid_9; - } - else __e_acsl_and_12 = 0; - e_acsl_assert(__e_acsl_and_12,(char *)"Assertion",(char *)"main", - (char *)"\\valid(a) && !\\valid(b) && \\valid(X)",39); - } - __full_init((void *)(& b)); - b = __e_acsl_f(& n); - /*@ assert \valid(a) ∧ \valid(b) ∧ \valid(X); */ - { - int __e_acsl_initialized_7; - int __e_acsl_and_13; - int __e_acsl_and_15; - int __e_acsl_and_16; - __e_acsl_initialized_7 = __initialized((void *)(& a),sizeof(int *)); - if (__e_acsl_initialized_7) { - int __e_acsl_valid_10; - __e_acsl_valid_10 = __valid((void *)a,sizeof(int)); - __e_acsl_and_13 = __e_acsl_valid_10; - } - else __e_acsl_and_13 = 0; - if (__e_acsl_and_13) { - int __e_acsl_initialized_8; - int __e_acsl_and_14; - __e_acsl_initialized_8 = __initialized((void *)(& b),sizeof(int *)); - if (__e_acsl_initialized_8) { - int __e_acsl_valid_11; - __e_acsl_valid_11 = __valid((void *)b,sizeof(int)); - __e_acsl_and_14 = __e_acsl_valid_11; - } - else __e_acsl_and_14 = 0; - __e_acsl_and_15 = __e_acsl_and_14; - } - else __e_acsl_and_15 = 0; - if (__e_acsl_and_15) { - int __e_acsl_valid_12; - __e_acsl_valid_12 = __valid((void *)X,sizeof(int)); - __e_acsl_and_16 = __e_acsl_valid_12; - } - else __e_acsl_and_16 = 0; - e_acsl_assert(__e_acsl_and_16,(char *)"Assertion",(char *)"main", - (char *)"\\valid(a) && \\valid(b) && \\valid(X)",41); - } - X = b; - /*@ assert \valid(a) ∧ \valid(b) ∧ \valid(X); */ - { - int __e_acsl_initialized_9; - int __e_acsl_and_17; - int __e_acsl_and_19; - int __e_acsl_and_20; - __e_acsl_initialized_9 = __initialized((void *)(& a),sizeof(int *)); - if (__e_acsl_initialized_9) { - int __e_acsl_valid_13; - __e_acsl_valid_13 = __valid((void *)a,sizeof(int)); - __e_acsl_and_17 = __e_acsl_valid_13; - } - else __e_acsl_and_17 = 0; - if (__e_acsl_and_17) { - int __e_acsl_initialized_10; - int __e_acsl_and_18; - __e_acsl_initialized_10 = __initialized((void *)(& b),sizeof(int *)); - if (__e_acsl_initialized_10) { - int __e_acsl_valid_14; - __e_acsl_valid_14 = __valid((void *)b,sizeof(int)); - __e_acsl_and_18 = __e_acsl_valid_14; - } - else __e_acsl_and_18 = 0; - __e_acsl_and_19 = __e_acsl_and_18; - } - else __e_acsl_and_19 = 0; - if (__e_acsl_and_19) { - int __e_acsl_valid_15; - __e_acsl_valid_15 = __valid((void *)X,sizeof(int)); - __e_acsl_and_20 = __e_acsl_valid_15; - } - else __e_acsl_and_20 = 0; - e_acsl_assert(__e_acsl_and_20,(char *)"Assertion",(char *)"main", - (char *)"\\valid(a) && \\valid(b) && \\valid(X)",43); - } - __full_init((void *)(& c)); - c = & a; - __full_init((void *)(& d)); - d = & c; - /*@ assert \valid(*c); */ - { - int __e_acsl_initialized_11; - int __e_acsl_and_22; - __e_acsl_initialized_11 = __initialized((void *)c,sizeof(int *)); - if (__e_acsl_initialized_11) { - int __e_acsl_initialized_12; - int __e_acsl_and_21; - int __e_acsl_valid_16; - __e_acsl_initialized_12 = __initialized((void *)(& c),sizeof(int **)); - if (__e_acsl_initialized_12) { - int __e_acsl_valid_read; - __e_acsl_valid_read = __valid_read((void *)c,sizeof(int *)); - __e_acsl_and_21 = __e_acsl_valid_read; - } - else __e_acsl_and_21 = 0; - e_acsl_assert(__e_acsl_and_21,(char *)"RTE",(char *)"main", - (char *)"mem_access: \\valid_read(c)",46); - __e_acsl_valid_16 = __valid((void *)*c,sizeof(int)); - __e_acsl_and_22 = __e_acsl_valid_16; - } - else __e_acsl_and_22 = 0; - e_acsl_assert(__e_acsl_and_22,(char *)"Assertion",(char *)"main", - (char *)"\\valid(*c)",46); - } - /*@ assert \valid(*(*d)); */ - { - int __e_acsl_valid_read_2; - int __e_acsl_initialized_13; - int __e_acsl_and_26; - __e_acsl_valid_read_2 = __valid_read((void *)d,sizeof(int **)); - e_acsl_assert(__e_acsl_valid_read_2,(char *)"RTE",(char *)"main", - (char *)"mem_access: \\valid_read(d)",47); - __e_acsl_initialized_13 = __initialized((void *)*d,sizeof(int *)); - if (__e_acsl_initialized_13) { - int __e_acsl_initialized_14; - int __e_acsl_and_24; - int __e_acsl_initialized_16; - int __e_acsl_and_25; - int __e_acsl_valid_17; - __e_acsl_initialized_14 = __initialized((void *)d,sizeof(int **)); - if (__e_acsl_initialized_14) { - int __e_acsl_initialized_15; - int __e_acsl_and_23; - int __e_acsl_valid_read_4; - __e_acsl_initialized_15 = __initialized((void *)(& d), - sizeof(int ***)); - if (__e_acsl_initialized_15) { - int __e_acsl_valid_read_3; - __e_acsl_valid_read_3 = __valid_read((void *)d,sizeof(int **)); - __e_acsl_and_23 = __e_acsl_valid_read_3; - } - else __e_acsl_and_23 = 0; - e_acsl_assert(__e_acsl_and_23,(char *)"RTE",(char *)"main", - (char *)"mem_access: \\valid_read(d)",47); - __e_acsl_valid_read_4 = __valid_read((void *)*d,sizeof(int *)); - __e_acsl_and_24 = __e_acsl_valid_read_4; - } - else __e_acsl_and_24 = 0; - e_acsl_assert(__e_acsl_and_24,(char *)"RTE",(char *)"main", - (char *)"mem_access: \\valid_read(*d)",47); - __e_acsl_initialized_16 = __initialized((void *)(& d),sizeof(int ***)); - if (__e_acsl_initialized_16) { - int __e_acsl_valid_read_5; - __e_acsl_valid_read_5 = __valid_read((void *)d,sizeof(int **)); - __e_acsl_and_25 = __e_acsl_valid_read_5; - } - else __e_acsl_and_25 = 0; - e_acsl_assert(__e_acsl_and_25,(char *)"RTE",(char *)"main", - (char *)"mem_access: \\valid_read(d)",47); - __e_acsl_valid_17 = __valid((void *)*(*d),sizeof(int)); - __e_acsl_and_26 = __e_acsl_valid_17; - } - else __e_acsl_and_26 = 0; - e_acsl_assert(__e_acsl_and_26,(char *)"Assertion",(char *)"main", - (char *)"\\valid(*(*d))",47); - } - __e_acsl_free((void *)a); - /*@ assert ¬\valid(a) ∧ \valid(b) ∧ \valid(X); */ - { - int __e_acsl_initialized_17; - int __e_acsl_and_27; - int __e_acsl_and_29; - int __e_acsl_and_30; - __e_acsl_initialized_17 = __initialized((void *)(& a),sizeof(int *)); - if (__e_acsl_initialized_17) { - int __e_acsl_valid_18; - __e_acsl_valid_18 = __valid((void *)a,sizeof(int)); - __e_acsl_and_27 = __e_acsl_valid_18; - } - else __e_acsl_and_27 = 0; - if (! __e_acsl_and_27) { - int __e_acsl_initialized_18; - int __e_acsl_and_28; - __e_acsl_initialized_18 = __initialized((void *)(& b),sizeof(int *)); - if (__e_acsl_initialized_18) { - int __e_acsl_valid_19; - __e_acsl_valid_19 = __valid((void *)b,sizeof(int)); - __e_acsl_and_28 = __e_acsl_valid_19; - } - else __e_acsl_and_28 = 0; - __e_acsl_and_29 = __e_acsl_and_28; - } - else __e_acsl_and_29 = 0; - if (__e_acsl_and_29) { - int __e_acsl_valid_20; - __e_acsl_valid_20 = __valid((void *)X,sizeof(int)); - __e_acsl_and_30 = __e_acsl_valid_20; - } - else __e_acsl_and_30 = 0; - e_acsl_assert(__e_acsl_and_30,(char *)"Assertion",(char *)"main", - (char *)"!\\valid(a) && \\valid(b) && \\valid(X)",49); - } - /*@ assert \valid(&Z); */ - { - int __e_acsl_valid_21; - __e_acsl_valid_21 = __valid((void *)(& Z),sizeof(int)); - e_acsl_assert(__e_acsl_valid_21,(char *)"Assertion",(char *)"main", - (char *)"\\valid(&Z)",50); - } - g(); - __retres = 0; - __delete_block((void *)(& Z)); - __delete_block((void *)(& X)); - __delete_block((void *)(& n)); - __delete_block((void *)(& d)); - __delete_block((void *)(& c)); - __delete_block((void *)(& b)); - __delete_block((void *)(& a)); - __e_acsl_memory_clean(); - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_valid_alias2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_valid_alias2.c deleted file mode 100644 index 74650f013f2..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_valid_alias2.c +++ /dev/null @@ -1,303 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -void *__malloc(size_t size); - -void __free(void *p); - -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ assigns \result; - assigns \result \from ptr; */ -extern __attribute__((__FC_BUILTIN__)) int __freeable(void *ptr); - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __initialize(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures \result ≡ 1 ⇒ \valid((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __valid(void *ptr, size_t size); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \initialized((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __initialized(void *ptr, - size_t size); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ assigns __fc_heap_status, \result; - assigns __fc_heap_status \from size, __fc_heap_status; - assigns \result \from size, __fc_heap_status; - allocates \result; - - behavior allocation: - assumes is_allocable(size); - ensures \fresh{Old, Here}(\result,\old(size)); - assigns __fc_heap_status, \result; - assigns __fc_heap_status \from size, __fc_heap_status; - assigns \result \from size, __fc_heap_status; - - behavior no_allocation: - assumes ¬is_allocable(size); - ensures \result ≡ \null; - assigns \result; - assigns \result \from \nothing; - allocates \nothing; - - complete behaviors no_allocation, allocation; - disjoint behaviors no_allocation, allocation; - */ -void *__e_acsl_malloc(size_t size) -{ - void *__retres; - __store_block((void *)(& __retres),4U); - __retres = __malloc(size); - __delete_block((void *)(& __retres)); - return __retres; -} - -/*@ assigns __fc_heap_status; - assigns __fc_heap_status \from __fc_heap_status; - frees p; - - behavior deallocation: - assumes p ≢ \null; - requires freeable: \freeable(p); - ensures \allocable(\old(p)); - assigns __fc_heap_status; - assigns __fc_heap_status \from __fc_heap_status; - - behavior no_deallocation: - assumes p ≡ \null; - assigns \nothing; - allocates \nothing; - - complete behaviors no_deallocation, deallocation; - disjoint behaviors no_deallocation, deallocation; - */ -void __e_acsl_free(void *p) -{ - int __e_acsl_at; - { - int __e_acsl_implies; - __store_block((void *)(& p),4U); - if (! (p != (void *)0)) __e_acsl_implies = 1; - else { - int __e_acsl_freeable; - __e_acsl_freeable = __freeable(p); - __e_acsl_implies = __e_acsl_freeable; - } - e_acsl_assert(__e_acsl_implies,(char *)"Precondition",(char *)"free", - (char *)"p != \\null ==> \\freeable(p)",178); - __store_block((void *)(& __e_acsl_at),4U); - __e_acsl_at = p != (void *)0; - __free(p); - } - __delete_block((void *)(& p)); - return; -} - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - -*/ -int main(void) -{ - int __retres; - int *a; - int *b; - int n; - __store_block((void *)(& b),4U); - __store_block((void *)(& a),4U); - n = 0; - /*@ assert ¬\valid(a) ∧ ¬\valid(b); */ - { - int __e_acsl_initialized; - int __e_acsl_and; - int __e_acsl_and_3; - __e_acsl_initialized = __initialized((void *)(& a),sizeof(int *)); - if (__e_acsl_initialized) { - int __e_acsl_valid; - __e_acsl_valid = __valid((void *)a,sizeof(int)); - __e_acsl_and = __e_acsl_valid; - } - else __e_acsl_and = 0; - if (! __e_acsl_and) { - int __e_acsl_initialized_2; - int __e_acsl_and_2; - __e_acsl_initialized_2 = __initialized((void *)(& b),sizeof(int *)); - if (__e_acsl_initialized_2) { - int __e_acsl_valid_2; - __e_acsl_valid_2 = __valid((void *)b,sizeof(int)); - __e_acsl_and_2 = __e_acsl_valid_2; - } - else __e_acsl_and_2 = 0; - __e_acsl_and_3 = ! __e_acsl_and_2; - } - else __e_acsl_and_3 = 0; - e_acsl_assert(__e_acsl_and_3,(char *)"Assertion",(char *)"main", - (char *)"!\\valid(a) && !\\valid(b)",12); - } - __full_init((void *)(& a)); - a = (int *)__e_acsl_malloc(sizeof(int)); - __initialize((void *)a,sizeof(int)); - *a = n; - __full_init((void *)(& b)); - b = a; - /*@ assert \valid(a) ∧ \valid(b); */ - { - int __e_acsl_initialized_3; - int __e_acsl_and_4; - int __e_acsl_and_6; - __e_acsl_initialized_3 = __initialized((void *)(& a),sizeof(int *)); - if (__e_acsl_initialized_3) { - int __e_acsl_valid_3; - __e_acsl_valid_3 = __valid((void *)a,sizeof(int)); - __e_acsl_and_4 = __e_acsl_valid_3; - } - else __e_acsl_and_4 = 0; - if (__e_acsl_and_4) { - int __e_acsl_initialized_4; - int __e_acsl_and_5; - __e_acsl_initialized_4 = __initialized((void *)(& b),sizeof(int *)); - if (__e_acsl_initialized_4) { - int __e_acsl_valid_4; - __e_acsl_valid_4 = __valid((void *)b,sizeof(int)); - __e_acsl_and_5 = __e_acsl_valid_4; - } - else __e_acsl_and_5 = 0; - __e_acsl_and_6 = __e_acsl_and_5; - } - else __e_acsl_and_6 = 0; - e_acsl_assert(__e_acsl_and_6,(char *)"Assertion",(char *)"main", - (char *)"\\valid(a) && \\valid(b)",16); - } - /*@ assert *b ≡ n; */ - { - mpz_t __e_acsl; - mpz_t __e_acsl_n; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl,(long)*b); - __gmpz_init_set_si(__e_acsl_n,(long)n); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl), - (__mpz_struct const *)(__e_acsl_n)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Assertion",(char *)"main", - (char *)"*b == n",17); - __gmpz_clear(__e_acsl); - __gmpz_clear(__e_acsl_n); - } - __e_acsl_free((void *)b); - /*@ assert ¬\valid(a) ∧ ¬\valid(b); */ - { - int __e_acsl_initialized_5; - int __e_acsl_and_7; - int __e_acsl_and_9; - __e_acsl_initialized_5 = __initialized((void *)(& a),sizeof(int *)); - if (__e_acsl_initialized_5) { - int __e_acsl_valid_5; - __e_acsl_valid_5 = __valid((void *)a,sizeof(int)); - __e_acsl_and_7 = __e_acsl_valid_5; - } - else __e_acsl_and_7 = 0; - if (! __e_acsl_and_7) { - int __e_acsl_initialized_6; - int __e_acsl_and_8; - __e_acsl_initialized_6 = __initialized((void *)(& b),sizeof(int *)); - if (__e_acsl_initialized_6) { - int __e_acsl_valid_6; - __e_acsl_valid_6 = __valid((void *)b,sizeof(int)); - __e_acsl_and_8 = __e_acsl_valid_6; - } - else __e_acsl_and_8 = 0; - __e_acsl_and_9 = ! __e_acsl_and_8; - } - else __e_acsl_and_9 = 0; - e_acsl_assert(__e_acsl_and_9,(char *)"Assertion",(char *)"main", - (char *)"!\\valid(a) && !\\valid(b)",19); - } - __retres = 0; - __delete_block((void *)(& b)); - __delete_block((void *)(& a)); - __e_acsl_memory_clean(); - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_valid_in_contract2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_valid_in_contract2.c deleted file mode 100644 index 6b59fc96e3c..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_valid_in_contract2.c +++ /dev/null @@ -1,196 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -struct list { - int element ; - struct list *next ; -}; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -/*@ ghost extern int __e_acsl_init; */ - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures \result ≡ 1 ⇒ \valid((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __valid(void *ptr, size_t size); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \valid_read((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __valid_read(void *ptr, - size_t size); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \initialized((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __initialized(void *ptr, - size_t size); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - */ -/*@ behavior B1: - assumes l ≡ \null; - ensures \result ≡ \old(l); - - behavior B2: - assumes ¬\valid(l); - assumes ¬\valid(l->next); - ensures \result ≡ \old(l); - */ -struct list *f(struct list *l) -{ - struct list *__retres; - __store_block((void *)(& __retres),4U); - __store_block((void *)(& l),4U); - if (l == (struct list *)0) { - __full_init((void *)(& __retres)); - __retres = l; - goto return_label; - } - if (l->next == (struct list *)0) { - __full_init((void *)(& __retres)); - __retres = l; - goto return_label; - } - __full_init((void *)(& __retres)); - __retres = (struct list *)0; - return_label: - __delete_block((void *)(& l)); - __delete_block((void *)(& __retres)); - return __retres; -} - -/*@ behavior B1: - assumes l ≡ \null; - ensures \result ≡ \old(l); - - behavior B2: - assumes ¬\valid(l); - assumes ¬\valid(l->next); - ensures \result ≡ \old(l); - */ -struct list *__e_acsl_f(struct list *l) -{ - struct list *__e_acsl_at_4; - int __e_acsl_at_3; - struct list *__e_acsl_at_2; - int __e_acsl_at; - struct list *__retres; - __store_block((void *)(& __retres),4U); - __store_block((void *)(& l),4U); - __store_block((void *)(& __e_acsl_at_4),4U); - __e_acsl_at_4 = l; - { - int __e_acsl_valid; - int __e_acsl_and_2; - __e_acsl_valid = __valid((void *)l,sizeof(struct list)); - if (! __e_acsl_valid) { - int __e_acsl_initialized; - int __e_acsl_and; - __e_acsl_initialized = __initialized((void *)(& l->next), - sizeof(struct list *)); - if (__e_acsl_initialized) { - int __e_acsl_valid_read; - int __e_acsl_valid_2; - __e_acsl_valid_read = __valid_read((void *)(& l->next), - sizeof(struct list *)); - e_acsl_assert(__e_acsl_valid_read,(char *)"RTE",(char *)"f", - (char *)"mem_access: \\valid_read(&l->next)",21); - __e_acsl_valid_2 = __valid((void *)l->next,sizeof(struct list)); - __e_acsl_and = __e_acsl_valid_2; - } - else __e_acsl_and = 0; - __e_acsl_and_2 = ! __e_acsl_and; - } - else __e_acsl_and_2 = 0; - __e_acsl_at_3 = __e_acsl_and_2; - } - __store_block((void *)(& __e_acsl_at_2),4U); - __e_acsl_at_2 = l; - __store_block((void *)(& __e_acsl_at),4U); - __e_acsl_at = l == (void *)0; - __retres = f(l); - { - int __e_acsl_implies; - int __e_acsl_implies_2; - if (! __e_acsl_at) __e_acsl_implies = 1; - else __e_acsl_implies = __retres == __e_acsl_at_2; - e_acsl_assert(__e_acsl_implies,(char *)"Postcondition",(char *)"f", - (char *)"\\old(l == \\null) ==> \\result == \\old(l)",18); - if (! __e_acsl_at_3) __e_acsl_implies_2 = 1; - else __e_acsl_implies_2 = __retres == __e_acsl_at_4; - e_acsl_assert(__e_acsl_implies_2,(char *)"Postcondition",(char *)"f", - (char *)"\\old(!\\valid(l) && !\\valid(l->next)) ==> \\result == \\old(l)", - 22); - __delete_block((void *)(& l)); - __delete_block((void *)(& __retres)); - return __retres; - } -} - -int main(void) -{ - int __retres; - __e_acsl_f((struct list *)0); - __retres = 0; - __e_acsl_memory_clean(); - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_vector2.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_vector2.c deleted file mode 100644 index 43a45615da2..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_vector2.c +++ /dev/null @@ -1,249 +0,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 __mpz_struct ( __attribute__((__FC_BUILTIN__)) mpz_t)[1]; -typedef unsigned int size_t; -/*@ requires predicate ≢ 0; - assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void e_acsl_assert(int predicate, - char *kind, - char *fct, - char *pred_txt, - int line); - -/*@ -model __mpz_struct { ℤ n }; -*/ -int __fc_random_counter __attribute__((__unused__, __FRAMA_C_MODEL__)); -unsigned long const __fc_rand_max = (unsigned long)32767; -/*@ ghost extern int __fc_heap_status __attribute__((__FRAMA_C_MODEL__)); */ - -/*@ -axiomatic dynamic_allocation { - predicate is_allocable{L}(size_t n) - reads __fc_heap_status; - - } - */ -void *__malloc(size_t size); - -void __free(void *p); - -/*@ ghost extern int __e_acsl_init; */ - -/*@ requires ¬\initialized(z); - ensures \valid(\old(z)); - ensures \initialized(\old(z)); - assigns *z; - assigns *z \from n; - allocates \old(z); - */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, - long n); - -/*@ requires \valid(x); - assigns *x; - assigns *x \from *x; */ -extern __attribute__((__FC_BUILTIN__)) void __gmpz_clear(__mpz_struct * /*[1]*/ x); - -/*@ requires \valid_read(z1); - requires \valid_read(z2); - assigns \result; - assigns \result \from *z1, *z2; - */ -extern __attribute__((__FC_BUILTIN__)) int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); - -/*@ assigns \result; - assigns \result \from ptr; */ -extern __attribute__((__FC_BUILTIN__)) int __freeable(void *ptr); - -/*@ assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); */ -extern __attribute__((__FC_BUILTIN__)) void *__store_block(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __delete_block(void *ptr); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __initialize(void *ptr, - size_t size); - -/*@ assigns \nothing; */ -extern __attribute__((__FC_BUILTIN__)) void __full_init(void *ptr); - -/*@ ensures \result ≡ 0 ∨ \result ≡ 1; - ensures - \result ≡ 1 ⇒ \initialized((char *)\old(ptr)+(0 .. \old(size)-1)); - assigns \result; - assigns \result \from *((char *)ptr+(0 .. size-1)); - */ -extern __attribute__((__FC_BUILTIN__)) int __initialized(void *ptr, - size_t size); - -/*@ ghost extern int __e_acsl_internal_heap; */ - -/*@ assigns __e_acsl_internal_heap; - assigns __e_acsl_internal_heap \from __e_acsl_internal_heap; - */ -extern __attribute__((__FC_BUILTIN__)) void __e_acsl_memory_clean(void); - -extern size_t __memory_size; - -/*@ assigns __fc_heap_status, \result; - assigns __fc_heap_status \from size, __fc_heap_status; - assigns \result \from size, __fc_heap_status; - allocates \result; - - behavior allocation: - assumes is_allocable(size); - ensures \fresh{Old, Here}(\result,\old(size)); - assigns __fc_heap_status, \result; - assigns __fc_heap_status \from size, __fc_heap_status; - assigns \result \from size, __fc_heap_status; - - behavior no_allocation: - assumes ¬is_allocable(size); - ensures \result ≡ \null; - assigns \result; - assigns \result \from \nothing; - allocates \nothing; - - complete behaviors no_allocation, allocation; - disjoint behaviors no_allocation, allocation; - */ -void *__e_acsl_malloc(size_t size) -{ - void *__retres; - __store_block((void *)(& __retres),4U); - __retres = __malloc(size); - __delete_block((void *)(& __retres)); - return __retres; -} - -/*@ assigns __fc_heap_status; - assigns __fc_heap_status \from __fc_heap_status; - frees p; - - behavior deallocation: - assumes p ≢ \null; - requires freeable: \freeable(p); - ensures \allocable(\old(p)); - assigns __fc_heap_status; - assigns __fc_heap_status \from __fc_heap_status; - - behavior no_deallocation: - assumes p ≡ \null; - assigns \nothing; - allocates \nothing; - - complete behaviors no_deallocation, deallocation; - disjoint behaviors no_deallocation, deallocation; - */ -void __e_acsl_free(void *p) -{ - int __e_acsl_at; - { - int __e_acsl_implies; - __store_block((void *)(& p),4U); - if (! (p != (void *)0)) __e_acsl_implies = 1; - else { - int __e_acsl_freeable; - __e_acsl_freeable = __freeable(p); - __e_acsl_implies = __e_acsl_freeable; - } - e_acsl_assert(__e_acsl_implies,(char *)"Precondition",(char *)"free", - (char *)"p != \\null ==> \\freeable(p)",178); - __store_block((void *)(& __e_acsl_at),4U); - __e_acsl_at = p != (void *)0; - __free(p); - } - __delete_block((void *)(& p)); - return; -} - -/*@ -predicate diffSize{L1, L2}(ℤ i) = - \at(__memory_size,L1)-\at(__memory_size,L2) ≡ i; - -*/ -int LAST; -int *new_inversed(int len, int *v) -{ - int i; - int *p; - __store_block((void *)(& p),4U); - __full_init((void *)(& p)); - p = (int *)__e_acsl_malloc(sizeof(int) * (unsigned int)len); - i = 0; - while (i < len) { - __initialize((void *)(p + i),sizeof(int)); - *(p + i) = *(v + ((len - i) - 1)); - i ++; - } - __delete_block((void *)(& p)); - return p; -} - -int main(void) -{ - int __retres; - int x; - int v1[3]; - int *v2; - __store_block((void *)(& v2),4U); - __store_block((void *)(v1),12U); - x = 3; - __initialize((void *)(v1),sizeof(int)); - v1[0] = 1; - __initialize((void *)(& v1[1]),sizeof(int)); - v1[1] = 2; - __initialize((void *)(& v1[2]),sizeof(int)); - v1[2] = x; - LAST = v1[2]; - /*@ assert \initialized(&v1[2]); */ - { - int __e_acsl_initialized; - __e_acsl_initialized = __initialized((void *)(& v1[2]),sizeof(int)); - e_acsl_assert(__e_acsl_initialized,(char *)"Assertion",(char *)"main", - (char *)"\\initialized(&v1[2])",26); - } - __full_init((void *)(& v2)); - v2 = new_inversed(3,v1); - LAST = *(v2 + 2); - /*@ assert \initialized(v2+2); */ - { - int __e_acsl_initialized_2; - __e_acsl_initialized_2 = __initialized((void *)(v2 + (long)2), - sizeof(int)); - e_acsl_assert(__e_acsl_initialized_2,(char *)"Assertion",(char *)"main", - (char *)"\\initialized(v2+2)",29); - } - /*@ assert LAST ≡ 1; */ - { - mpz_t __e_acsl_LAST; - mpz_t __e_acsl; - int __e_acsl_eq; - __gmpz_init_set_si(__e_acsl_LAST,(long)LAST); - __gmpz_init_set_si(__e_acsl,(long)1); - __e_acsl_eq = __gmpz_cmp((__mpz_struct const *)(__e_acsl_LAST), - (__mpz_struct const *)(__e_acsl)); - e_acsl_assert(__e_acsl_eq == 0,(char *)"Assertion",(char *)"main", - (char *)"LAST == 1",30); - __gmpz_clear(__e_acsl_LAST); - __gmpz_clear(__e_acsl); - } - __e_acsl_free((void *)v2); - __retres = 0; - __delete_block((void *)(& v2)); - __delete_block((void *)(v1)); - __e_acsl_memory_clean(); - return __retres; -} - - diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ghost.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ghost.1.res.oracle deleted file mode 100644 index 91c132e3a5a..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ghost.1.res.oracle +++ /dev/null @@ -1,27 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] - G ∈ {0} - P ∈ {0} -[value] using specification for function __store_block -[value] using specification for function __full_init -[value] using specification for function __initialize -[value] using specification for function __valid_read -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __valid -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function __gmpz_clear -[value] using specification for function __delete_block -[value] using specification for function __e_acsl_memory_clean -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/empty.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ghost.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/empty.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ghost.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ghost.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ghost.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ghost.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ghost.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/init.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/init.1.res.oracle deleted file mode 100644 index d19125c9928..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/init.1.res.oracle +++ /dev/null @@ -1,22 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] - a ∈ {0} - b ∈ {0} -[value] using specification for function __store_block -[value] using specification for function __full_init -[value] using specification for function e_acsl_assert -[value] using specification for function __initialized -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __delete_block -[value] using specification for function __e_acsl_memory_clean -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/empty.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/init.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/empty.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/init.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/init.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/init.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/init.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/init.res.oracle 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 deleted file mode 100644 index 4b0e3fa2ff8..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.1.res.oracle +++ /dev/null @@ -1,21 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function __gmpz_clear -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status invalid. -tests/e-acsl-runtime/invariant.i:8:[value] entering loop for the first time -tests/e-acsl-runtime/invariant.i:10:[kernel] warning: signed overflow. assert x+i ≤ 2147483647; -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.res.oracle 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 deleted file mode 100644 index 1e90496d9c4..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.1.res.oracle +++ /dev/null @@ -1,19 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] - X ∈ {0} -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __gmpz_clear -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/false.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.res.oracle 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 deleted file mode 100644 index 9be75f5ecfa..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.1.res.oracle +++ /dev/null @@ -1,26 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function __gmpz_clear -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __gmpz_init -tests/e-acsl-runtime/lazy.i:12:[value] warning: assertion 'E_ACSL' got status invalid (stopping propagation). -tests/e-acsl-runtime/lazy.i:14:[value] warning: assertion 'E_ACSL' got status invalid (stopping propagation). -tests/e-acsl-runtime/lazy.i:16:[value] warning: assertion 'E_ACSL' got status invalid (stopping propagation). -tests/e-acsl-runtime/lazy.i:17:[value] warning: assertion got status unknown. -tests/e-acsl-runtime/lazy.i:18:[value] warning: assertion got status unknown. -tests/e-acsl-runtime/lazy.i:19:[value] warning: assertion got status unknown. -[value] using specification for function __gmpz_init_set -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/freeable.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/freeable.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.res.oracle 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 deleted file mode 100644 index 3fc3a773adc..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.1.res.oracle +++ /dev/null @@ -1,44 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] - A[0..9] ∈ {0} -tests/e-acsl-runtime/linear_search.i:30:[value] entering loop for the first time -tests/e-acsl-runtime/linear_search.i:9:[value] warning: function __e_acsl_search: precondition got status unknown. -[value] using specification for function __gmpz_init -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_set -[value] using specification for function __gmpz_clear -tests/e-acsl-runtime/linear_search.i:9:[value] entering loop for the first time -[value] using specification for function __gmpz_cmp -[value] using specification for function __gmpz_get_ui -tests/e-acsl-runtime/linear_search.i:9:[kernel] warning: accessing out of bounds index. assert __e_acsl_i_2 < 10; -[value] using specification for function __gmpz_add -tests/e-acsl-runtime/linear_search.i:9:[kernel] warning: accessing out of bounds index. assert __e_acsl_3 < 10; -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -tests/e-acsl-runtime/linear_search.i:14:[value] entering loop for the first time -tests/e-acsl-runtime/linear_search.i:14:[kernel] warning: accessing out of bounds index. assert __e_acsl_j_4 < 10; -tests/e-acsl-runtime/linear_search.i:11:[value] entering loop for the first time -tests/e-acsl-runtime/linear_search.i:11:[kernel] warning: accessing out of bounds index. assert __e_acsl_j_2 < 10; -tests/e-acsl-runtime/linear_search.i:9:[value] warning: function search: precondition got status unknown. -tests/e-acsl-runtime/linear_search.i:20:[value] entering loop for the first time -tests/e-acsl-runtime/linear_search.i:20:[kernel] warning: accessing out of bounds index. assert __e_acsl_i_2 < 10; -tests/e-acsl-runtime/linear_search.i:20:[value] warning: loop invariant got status unknown. -tests/e-acsl-runtime/linear_search.i:21:[value] entering loop for the first time -tests/e-acsl-runtime/linear_search.i:20:[kernel] warning: accessing out of bounds index. assert __e_acsl_i_4 < 10; -tests/e-acsl-runtime/linear_search.i:12:[value] warning: function search, behavior exists: postcondition got status invalid. (Behavior may be inactive, no reduction performed.) -tests/e-acsl-runtime/linear_search.i:15:[value] warning: function search, behavior not_exists: postcondition got status invalid. (Behavior may be inactive, no reduction performed.) -tests/e-acsl-runtime/linear_search.i:12:[value] warning: function __e_acsl_search, behavior exists: postcondition got status unknown. (Behavior may be inactive, no reduction performed.) -tests/e-acsl-runtime/linear_search.i:15:[value] warning: function __e_acsl_search, behavior not_exists: postcondition got status unknown. (Behavior may be inactive, no reduction performed.) -tests/e-acsl-runtime/linear_search.i:33:[value] warning: assertion got status unknown. -tests/e-acsl-runtime/linear_search.i:36:[value] warning: assertion got status unknown. -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/freeable.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/freeable.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/literal_string.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/literal_string.1.res.oracle deleted file mode 100644 index dcc82287939..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/literal_string.1.res.oracle +++ /dev/null @@ -1,37 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] - T ∈ {{ "bar" }} - G ∈ {0} - S ∈ {{ "foo" }} - S2 ∈ {{ "foo2" }} - IDX ∈ {1} - G2 ∈ {2} - U ∈ {{ "baz" }} - __e_acsl_literal_string ∈ {0} - __e_acsl_literal_string_2 ∈ {0} - __e_acsl_literal_string_3 ∈ {0} - __e_acsl_literal_string_4 ∈ {0} -[value] using specification for function __store_block -[value] using specification for function __full_init -[value] using specification for function __literal_string -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __gmpz_clear -[value] using specification for function __initialized -[value] using specification for function __valid_read -[value] using specification for function __valid -[value] using specification for function __delete_block -[value] using specification for function __e_acsl_memory_clean -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/literal_string.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/literal_string.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/literal_string.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/literal_string.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/literal_string.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/literal_string.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/localvar.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/localvar.1.res.oracle deleted file mode 100644 index 954b596c456..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/localvar.1.res.oracle +++ /dev/null @@ -1,35 +0,0 @@ -[e-acsl] beginning translation. -FRAMAC_SHARE/libc/stdlib.h:156:[e-acsl] warning: E-ACSL construct `\fresh' is not yet supported. Ignoring annotation. -tests/e-acsl-runtime/localvar.c:26:[e-acsl] warning: E-ACSL construct `complete behaviors' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/localvar.c:26:[e-acsl] warning: E-ACSL construct `disjoint behaviors' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/localvar.c:26:[e-acsl] warning: E-ACSL construct `assigns clause in behavior' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/localvar.c:26:[e-acsl] warning: E-ACSL construct `logic function application' is not yet supported. - Ignoring annotation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __store_block -[value] using specification for function __full_init -FRAMAC_SHARE/libc/stdlib.h:156:[value] allocating variable __malloc___e_acsl_malloc_l156 -[value] using specification for function __delete_block -FRAMAC_SHARE/libc/stdlib.h:163:[value] warning: function __e_acsl_malloc, behavior allocation: postcondition got status unknown. (Behavior may be inactive, no reduction performed.) -FRAMAC_SHARE/libc/stdlib.h:168:[value] warning: function __e_acsl_malloc, behavior no_allocation: postcondition got status invalid. (Behavior may be inactive, no reduction performed.) -[value] using specification for function __initialized -[value] using specification for function __valid -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __initialize -FRAMAC_SHARE/libc/stdlib.h:156:[value] allocating variable __malloc___e_acsl_malloc_l156_0 -[value] using specification for function __e_acsl_memory_clean -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/localvar.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/localvar.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/localvar.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/localvar.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/localvar.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/localvar.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/loop.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/loop.1.res.oracle deleted file mode 100644 index 2a9a74a05aa..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/loop.1.res.oracle +++ /dev/null @@ -1,37 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function __gmpz_clear -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status invalid. -[value] using specification for function __gmpz_init -[value] using specification for function __gmpz_set -[value] using specification for function __gmpz_get_ui -tests/e-acsl-runtime/loop.i:21:[value] completely invalid value in evaluation of - argument (long)t[__e_acsl_k_2][__e_acsl_l_2] -tests/e-acsl-runtime/loop.i:21:[kernel] warning: accessing out of bounds index. assert __e_acsl_k_2 < 10; -tests/e-acsl-runtime/loop.i:21:[kernel] warning: accessing out of bounds index. assert __e_acsl_l_2 < 15; -tests/e-acsl-runtime/loop.i:21:[kernel] warning: accessing uninitialized left-value. - assert \initialized(&t[__e_acsl_k_2][__e_acsl_l_2]); -[value] using specification for function __gmpz_add -tests/e-acsl-runtime/loop.i:21:[value] warning: loop invariant got status unknown. -tests/e-acsl-runtime/loop.i:21:[kernel] warning: accessing out of bounds index. assert __e_acsl_k_4 < 10; -tests/e-acsl-runtime/loop.i:21:[kernel] warning: accessing out of bounds index. assert __e_acsl_l_4 < 15; -tests/e-acsl-runtime/loop.i:21:[kernel] warning: accessing uninitialized left-value. - assert \initialized(&t[__e_acsl_k_4][__e_acsl_l_4]); -[value] using specification for function __gmpz_mul -[value] Semantic level unrolling superposing up to 100 states -tests/e-acsl-runtime/loop.i:21:[value] entering loop for the first time -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ghost.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/loop.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ghost.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/loop.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/loop.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/loop.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/loop.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/loop.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/mainargs.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/mainargs.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/mainargs.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/mainargs.1.res.oracle deleted file mode 100644 index 2a1ee9c62a4..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/mainargs.1.res.oracle +++ /dev/null @@ -1,57 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] warning: annotating undefined function `strlen': - the generated program may miss memory instrumentation - if there are memory-related annotations. -tests/e-acsl-runtime/mainargs.c:9:[e-acsl] warning: E-ACSL construct `logic function application' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/mainargs.c:9:[e-acsl] warning: E-ACSL construct `assigns clause in behavior' is not yet supported. - Ignoring annotation. -FRAMAC_SHARE/libc/string.h:93:[e-acsl] warning: E-ACSL construct `applying logic function' is not yet supported. - Ignoring annotation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __init_args -[value] using specification for function __store_block -[value] using specification for function __valid -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -tests/e-acsl-runtime/mainargs.c:14:[value] warning: assertion got status unknown. -[value] using specification for function __gmpz_init -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_set -[value] using specification for function __gmpz_clear -tests/e-acsl-runtime/mainargs.c:14:[value] entering loop for the first time -[value] using specification for function __gmpz_cmp -[value] using specification for function __gmpz_get_ui -[value] using specification for function __gmpz_add -tests/e-acsl-runtime/mainargs.c:15:[value] warning: assertion got status unknown. -[value] using specification for function __block_length -[value] using specification for function __gmpz_init_set_ui -[value] using specification for function __gmpz_mul -tests/e-acsl-runtime/mainargs.c:17:[value] warning: assertion got status unknown. -[value] using specification for function __valid_read -tests/e-acsl-runtime/mainargs.c:17:[kernel] warning: out of bounds read. assert \valid_read(argv+(long)argc); -tests/e-acsl-runtime/mainargs.c:18:[value] warning: assertion got status unknown. -[value] using specification for function __initialized -tests/e-acsl-runtime/mainargs.c:18:[kernel] warning: out of bounds read. assert \valid_read(argv+(long)argc); -tests/e-acsl-runtime/mainargs.c:19:[value] entering loop for the first time -FRAMAC_SHARE/libc/string.h:91:[value] warning: function __e_acsl_strlen: precondition 'valid_string_src' got status unknown. -[value] using specification for function strlen -FRAMAC_SHARE/libc/string.h:91:[value] warning: function strlen: precondition 'valid_string_src' got status unknown. -FRAMAC_SHARE/libc/string.h:91:[value] cannot evaluate ACSL term, unsupported ACSL construct: logic functions or predicates -[value] using specification for function __delete_block -FRAMAC_SHARE/libc/string.h:93:[value] warning: function __e_acsl_strlen: postcondition got status unknown. -tests/e-acsl-runtime/mainargs.c:21:[value] warning: assertion got status unknown. -tests/e-acsl-runtime/mainargs.c:22:[value] warning: assertion got status unknown. -tests/e-acsl-runtime/mainargs.c:22:[value] entering loop for the first time -[value] using specification for function __e_acsl_memory_clean -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ghost.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/mainargs.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ghost.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/mainargs.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/mainargs.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/mainargs.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/mainargs.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/mainargs.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/memsize.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/memsize.0.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/memsize.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/memsize.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/memsize.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/memsize.1.res.oracle deleted file mode 100644 index d832fd1ab14..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/memsize.1.res.oracle +++ /dev/null @@ -1,56 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] warning: annotating undefined function `realloc': - the generated program may miss memory instrumentation - if there are memory-related annotations. -FRAMAC_SHARE/libc/stdlib.h:156:[e-acsl] warning: E-ACSL construct `\fresh' is not yet supported. Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:200:[e-acsl] warning: E-ACSL construct `\fresh' is not yet supported. Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:200:[e-acsl] warning: E-ACSL construct `\allocable' is not yet supported. Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:174:[e-acsl] warning: E-ACSL construct `\allocable' is not yet supported. Ignoring annotation. -tests/e-acsl-runtime/memsize.c:21:[e-acsl] warning: E-ACSL construct `complete behaviors' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/memsize.c:21:[e-acsl] warning: E-ACSL construct `disjoint behaviors' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/memsize.c:21:[e-acsl] warning: E-ACSL construct `assigns clause in behavior' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/memsize.c:21:[e-acsl] warning: E-ACSL construct `logic function application' is not yet supported. - Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:177:[e-acsl] warning: E-ACSL construct `assigns clause in behavior' is not yet supported. - Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:177:[e-acsl] warning: E-ACSL construct `\allocate' is not yet supported. Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:177:[e-acsl] warning: E-ACSL construct `complete behaviors' is not yet supported. - Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:177:[e-acsl] warning: E-ACSL construct `disjoint behaviors' is not yet supported. - Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:214:[e-acsl] warning: E-ACSL construct `logic function application' is not yet supported. - Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:214:[e-acsl] warning: E-ACSL construct `assigns clause in behavior' is not yet supported. - Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:146:[kernel] warning: Neither code nor specification for function calloc, generating default assigns from the prototype -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] - __fc_fopen[0..511] ∈ {0} - __p_fc_fopen ∈ {{ &__fc_fopen[0] }} -[value] using specification for function __store_block -[value] using specification for function __full_init -[value] using specification for function __malloc -[value] using specification for function __delete_block -FRAMAC_SHARE/libc/stdlib.h:163:[value] warning: function __e_acsl_malloc, behavior allocation: postcondition got status unknown. (Behavior may be inactive, no reduction performed.) -FRAMAC_SHARE/libc/stdlib.h:168:[value] warning: function __e_acsl_malloc, behavior no_allocation: postcondition got status unknown. (Behavior may be inactive, no reduction performed.) -tests/e-acsl-runtime/memsize.c:24:[value] warning: assertion got status unknown. -[value] using specification for function __gmpz_init_set_ui -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __gmpz_clear -tests/e-acsl-runtime/memsize.c:26:[value] warning: assertion got status invalid (stopping propagation). -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/init.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/memsize.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/init.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/memsize.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/memsize.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/memsize.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/memsize.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/memsize.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.0.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 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 deleted file mode 100644 index af524ffc3d7..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.1.res.oracle +++ /dev/null @@ -1,18 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __gmpz_clear -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/init.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/init.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.0.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.0.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 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 deleted file mode 100644 index af524ffc3d7..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.1.res.oracle +++ /dev/null @@ -1,18 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __gmpz_clear -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.err.oracle 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/other_constants.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.1.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.0.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 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 deleted file mode 100644 index f70ee1b37e0..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.1.res.oracle +++ /dev/null @@ -1,35 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __store_block -[value] using specification for function __full_init -[value] using specification for function __initialize -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __gmpz_clear -[value] using specification for function __gmpz_init -[value] using specification for function __gmpz_mul -[value] using specification for function __gmpz_tdiv_q -[value] using specification for function __gmpz_get_ui -tests/e-acsl-runtime/ptr.i:16:[kernel] warning: accessing out of bounds index. assert __e_acsl_9 < 3; -tests/e-acsl-runtime/ptr.i:18:[value] entering loop for the first time -[value] using specification for function __gmpz_add -[value] using specification for function __gmpz_sub -tests/e-acsl-runtime/ptr.i:20:[kernel] warning: accessing out of bounds index. assert __e_acsl_15 < 3; -tests/e-acsl-runtime/ptr.i:19:[value] warning: assertion got status unknown. -tests/e-acsl-runtime/ptr.i:20:[value] warning: assertion got status unknown. -tests/e-acsl-runtime/ptr.i:21:[value] warning: assertion got status unknown. -[value] using specification for function __delete_block -[value] using specification for function __e_acsl_memory_clean -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr_init.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr_init.0.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr_init.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr_init.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr_init.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr_init.1.res.oracle deleted file mode 100644 index 2e95ba4b034..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr_init.1.res.oracle +++ /dev/null @@ -1,34 +0,0 @@ -[e-acsl] beginning translation. -FRAMAC_SHARE/libc/stdlib.h:156:[e-acsl] warning: E-ACSL construct `\fresh' is not yet supported. Ignoring annotation. -tests/e-acsl-runtime/ptr_init.c:22:[e-acsl] warning: E-ACSL construct `complete behaviors' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/ptr_init.c:22:[e-acsl] warning: E-ACSL construct `disjoint behaviors' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/ptr_init.c:22:[e-acsl] warning: E-ACSL construct `assigns clause in behavior' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/ptr_init.c:22:[e-acsl] warning: E-ACSL construct `logic function application' is not yet supported. - Ignoring annotation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] - A ∈ {0} - B ∈ {0} -[value] using specification for function __store_block -[value] using specification for function __full_init -[value] using specification for function __malloc -[value] using specification for function __delete_block -FRAMAC_SHARE/libc/stdlib.h:163:[value] warning: function __e_acsl_malloc, behavior allocation: postcondition got status unknown. (Behavior may be inactive, no reduction performed.) -FRAMAC_SHARE/libc/stdlib.h:168:[value] warning: function __e_acsl_malloc, behavior no_allocation: postcondition got status unknown. (Behavior may be inactive, no reduction performed.) -[value] using specification for function e_acsl_assert -[value] using specification for function __initialized -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __e_acsl_memory_clean -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr_init.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr_init.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr_init.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr_init.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr_init.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr_init.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.0.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 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 deleted file mode 100644 index f17905f024e..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.1.res.oracle +++ /dev/null @@ -1,22 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] - Y ∈ {1} -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_init -[value] using specification for function __gmpz_sub -[value] using specification for function __gmpz_get_ui -[value] using specification for function __gmpz_cmp -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __gmpz_clear -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.0.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 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 deleted file mode 100644 index af524ffc3d7..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.1.res.oracle +++ /dev/null @@ -1,18 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __gmpz_clear -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stdout.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stdout.0.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stdout.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stdout.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stdout.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stdout.1.res.oracle deleted file mode 100644 index 764e042f2f3..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stdout.1.res.oracle +++ /dev/null @@ -1,55 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] warning: annotating undefined function `fopen': - the generated program may miss memory instrumentation - if there are memory-related annotations. -tests/e-acsl-runtime/stdout.c:10:[e-acsl] warning: E-ACSL construct `assigns clause in behavior' is not yet supported. - Ignoring annotation. -FRAMAC_SHARE/libc/stdio.h:106:[e-acsl] warning: E-ACSL construct `logic function application' is not yet supported. - Ignoring annotation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] - stdout ∈ {{ NULL ; &S___fc_stdout[0] }} - __fc_fopen[0..511] ∈ {0} - __p_fc_fopen ∈ {{ &__fc_fopen[0] }} - __e_acsl_literal_string ∈ {0} - __e_acsl_literal_string_2 ∈ {0} - S___fc_stdout[0]{.__fc_stdio_id; .__fc_position; .__fc_error; .__fc_eof} ∈ - [--..--] - [0].[bits 80 to 95] ∈ UNINITIALIZED - [0].__fc_flags ∈ [--..--] - [0].__fc_inode ∈ - {{ NULL ; &S___fc_inode_0_S___fc_stdout[0] }} - [0].__fc_real_data ∈ - {{ NULL ; &S___fc_real_data_0_S___fc_stdout[0] }} - {[0].__fc_real_data_max_size; [1]{.__fc_stdio_id; .__fc_position; .__fc_error; .__fc_eof}} ∈ - [--..--] - [1].[bits 80 to 95] ∈ UNINITIALIZED - [1].__fc_flags ∈ [--..--] - [1].__fc_inode ∈ - {{ NULL ; &S___fc_inode_1_S___fc_stdout[0] }} - [1].__fc_real_data ∈ - {{ NULL ; &S___fc_real_data_1_S___fc_stdout[0] }} - [1].__fc_real_data_max_size ∈ [--..--] - S___fc_inode_0_S___fc_stdout[0..1] ∈ [--..--] - S___fc_real_data_0_S___fc_stdout[0..1] ∈ [--..--] - S___fc_inode_1_S___fc_stdout[0..1] ∈ [--..--] - S___fc_real_data_1_S___fc_stdout[0..1] ∈ [--..--] -[value] using specification for function __store_block -[value] using specification for function __full_init -[value] using specification for function __literal_string -[value] using specification for function fopen -tests/e-acsl-runtime/stdout.c:13:[value] warning: assertion got status unknown. -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __delete_block -[value] using specification for function __e_acsl_memory_clean -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stdout.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stdout.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stdout.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stdout.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stdout.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stdout.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.0.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 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 deleted file mode 100644 index ffdab4d2252..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.1.res.oracle +++ /dev/null @@ -1,20 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __gmpz_clear -[value] using specification for function __gmpz_init -[value] using specification for function __gmpz_add -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.0.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 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 deleted file mode 100644 index f0d9dbf6c71..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.1.res.oracle +++ /dev/null @@ -1,14 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function e_acsl_assert -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/literal_string.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/literal_string.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.0.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.0.res.oracle deleted file mode 100644 index f0d9dbf6c71..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.0.res.oracle +++ /dev/null @@ -1,14 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function e_acsl_assert -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 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 deleted file mode 100644 index b6b4bb04ed9..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.1.res.oracle +++ /dev/null @@ -1,19 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __gmpz_init_set_ui -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __gmpz_clear -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/literal_string.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/literal_string.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid.0.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid.1.res.oracle deleted file mode 100644 index 15bf91ef5f0..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid.1.res.oracle +++ /dev/null @@ -1,52 +0,0 @@ -[e-acsl] beginning translation. -FRAMAC_SHARE/libc/stdlib.h:174:[e-acsl] warning: E-ACSL construct `\allocable' is not yet supported. Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:156:[e-acsl] warning: E-ACSL construct `\fresh' is not yet supported. Ignoring annotation. -tests/e-acsl-runtime/valid.c:33:[e-acsl] warning: E-ACSL construct `complete behaviors' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/valid.c:33:[e-acsl] warning: E-ACSL construct `disjoint behaviors' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/valid.c:33:[e-acsl] warning: E-ACSL construct `assigns clause in behavior' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/valid.c:33:[e-acsl] warning: E-ACSL construct `logic function application' is not yet supported. - Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:177:[e-acsl] warning: E-ACSL construct `assigns clause in behavior' is not yet supported. - Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:177:[e-acsl] warning: E-ACSL construct `\allocate' is not yet supported. Ignoring annotation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] - X ∈ {0} - Z ∈ {0} -[value] using specification for function __store_block -[value] using specification for function __full_init -[value] using specification for function __initialized -[value] using specification for function __valid -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -FRAMAC_SHARE/libc/stdlib.h:156:[value] allocating variable __malloc___e_acsl_malloc_l156 -[value] using specification for function __delete_block -FRAMAC_SHARE/libc/stdlib.h:163:[value] warning: function __e_acsl_malloc, behavior allocation: postcondition got status unknown. (Behavior may be inactive, no reduction performed.) -FRAMAC_SHARE/libc/stdlib.h:168:[value] warning: function __e_acsl_malloc, behavior no_allocation: postcondition got status invalid. (Behavior may be inactive, no reduction performed.) -[value] using specification for function __valid_read -FRAMAC_SHARE/libc/stdlib.h:178:[value] warning: function __e_acsl_free, behavior deallocation: precondition 'freeable' got status unknown. -[value] using specification for function __freeable -:0:[value] Assigning imprecise value to __e_acsl_implies. - The imprecision originates from Arithmetic {FRAMAC_SHARE/libc/stdlib.h:178} -FRAMAC_SHARE/libc/stdlib.h:178:[value] Reading left-value __e_acsl_implies. - It contains a garbled mix of {__malloc___e_acsl_malloc_l156} because of - Arithmetic {FRAMAC_SHARE/libc/stdlib.h:178}. -FRAMAC_SHARE/libc/stdlib.h:180:[value] warning: function __e_acsl_free, behavior deallocation: postcondition got status unknown. -tests/e-acsl-runtime/valid.c:49:[value] completely invalid value in evaluation of - argument (void *)a -tests/e-acsl-runtime/valid.c:49:[kernel] warning: accessing left-value that contains escaping addresses. - assert ¬\dangling(&a); -[value] using specification for function __e_acsl_memory_clean -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/localvar.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/localvar.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_alias.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_alias.0.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_alias.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_alias.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_alias.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_alias.1.res.oracle deleted file mode 100644 index abe5975be18..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_alias.1.res.oracle +++ /dev/null @@ -1,57 +0,0 @@ -[e-acsl] beginning translation. -FRAMAC_SHARE/libc/stdlib.h:174:[e-acsl] warning: E-ACSL construct `\allocable' is not yet supported. Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:156:[e-acsl] warning: E-ACSL construct `\fresh' is not yet supported. Ignoring annotation. -tests/e-acsl-runtime/valid_alias.c:10:[e-acsl] warning: E-ACSL construct `complete behaviors' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/valid_alias.c:10:[e-acsl] warning: E-ACSL construct `disjoint behaviors' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/valid_alias.c:10:[e-acsl] warning: E-ACSL construct `assigns clause in behavior' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/valid_alias.c:10:[e-acsl] warning: E-ACSL construct `logic function application' is not yet supported. - Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:177:[e-acsl] warning: E-ACSL construct `assigns clause in behavior' is not yet supported. - Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:177:[e-acsl] warning: E-ACSL construct `\allocate' is not yet supported. Ignoring annotation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __store_block -[value] using specification for function __initialized -[value] using specification for function e_acsl_assert -[value] using specification for function __full_init -FRAMAC_SHARE/libc/stdlib.h:156:[value] allocating variable __malloc___e_acsl_malloc_l156 -[value] using specification for function __delete_block -FRAMAC_SHARE/libc/stdlib.h:163:[value] warning: function __e_acsl_malloc, behavior allocation: postcondition got status unknown. (Behavior may be inactive, no reduction performed.) -FRAMAC_SHARE/libc/stdlib.h:168:[value] warning: function __e_acsl_malloc, behavior no_allocation: postcondition got status invalid. (Behavior may be inactive, no reduction performed.) -[value] using specification for function __initialize -[value] using specification for function __valid -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function __gmpz_clear -FRAMAC_SHARE/libc/stdlib.h:178:[value] warning: function __e_acsl_free, behavior deallocation: precondition 'freeable' got status unknown. -[value] using specification for function __freeable -:0:[value] Assigning imprecise value to __e_acsl_implies. - The imprecision originates from Arithmetic {FRAMAC_SHARE/libc/stdlib.h:178} -FRAMAC_SHARE/libc/stdlib.h:178:[value] Reading left-value __e_acsl_implies. - It contains a garbled mix of {__malloc___e_acsl_malloc_l156} because of - Arithmetic {FRAMAC_SHARE/libc/stdlib.h:178}. -FRAMAC_SHARE/libc/stdlib.h:180:[value] warning: function __e_acsl_free, behavior deallocation: postcondition got status unknown. -tests/e-acsl-runtime/valid_alias.c:19:[value] completely invalid value in evaluation of - argument (void *)a -tests/e-acsl-runtime/valid_alias.c:19:[kernel] warning: accessing left-value that contains escaping addresses. - assert ¬\dangling(&a); -tests/e-acsl-runtime/valid_alias.c:19:[value] completely invalid value in evaluation of - argument (void *)b -tests/e-acsl-runtime/valid_alias.c:19:[kernel] warning: accessing left-value that contains escaping addresses. - assert ¬\dangling(&b); -[value] using specification for function __e_acsl_memory_clean -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/localvar.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_alias.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/localvar.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_alias.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_alias.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_alias.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_alias.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_alias.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_in_contract.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_in_contract.0.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_in_contract.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_in_contract.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_in_contract.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_in_contract.1.res.oracle deleted file mode 100644 index 3ae32e3ef4f..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_in_contract.1.res.oracle +++ /dev/null @@ -1,25 +0,0 @@ -[e-acsl] beginning translation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] -[value] using specification for function __store_block -[value] using specification for function __valid -[value] using specification for function __initialized -[value] using specification for function __valid_read -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -tests/e-acsl-runtime/valid_in_contract.c:21:[value] completely invalid value in evaluation of - argument (void *)l->next -tests/e-acsl-runtime/valid_in_contract.c:21:[kernel] warning: out of bounds read. assert \valid_read(&l->next); -[value] using specification for function __full_init -[value] using specification for function __delete_block -[value] using specification for function __e_acsl_memory_clean -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/loop.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_in_contract.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/loop.0.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_in_contract.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_in_contract.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_in_contract.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_in_contract.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/valid_in_contract.res.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/vector.0.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/vector.0.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/vector.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/vector.1.err.oracle deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/vector.1.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/vector.1.res.oracle deleted file mode 100644 index 0055ceb37e7..00000000000 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/vector.1.res.oracle +++ /dev/null @@ -1,53 +0,0 @@ -[e-acsl] beginning translation. -FRAMAC_SHARE/libc/stdlib.h:174:[e-acsl] warning: E-ACSL construct `\allocable' is not yet supported. Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:156:[e-acsl] warning: E-ACSL construct `\fresh' is not yet supported. Ignoring annotation. -tests/e-acsl-runtime/vector.c:21:[e-acsl] warning: E-ACSL construct `complete behaviors' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/vector.c:21:[e-acsl] warning: E-ACSL construct `disjoint behaviors' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/vector.c:21:[e-acsl] warning: E-ACSL construct `assigns clause in behavior' is not yet supported. - Ignoring annotation. -tests/e-acsl-runtime/vector.c:21:[e-acsl] warning: E-ACSL construct `logic function application' is not yet supported. - Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:177:[e-acsl] warning: E-ACSL construct `assigns clause in behavior' is not yet supported. - Ignoring annotation. -FRAMAC_SHARE/libc/stdlib.h:177:[e-acsl] warning: E-ACSL construct `\allocate' is not yet supported. Ignoring annotation. -[e-acsl] translation done in project "e-acsl". -[value] Analyzing a complete application starting at main -[value] Computing initial state -[value] Initial state computed -[value] Values of globals at initialization - __fc_random_counter ∈ {0} - __fc_rand_max ∈ {32767} - __fc_heap_status ∈ [--..--] - __e_acsl_init ∈ [--..--] - __e_acsl_internal_heap ∈ [--..--] - __memory_size ∈ [--..--] - LAST ∈ {0} -[value] using specification for function __store_block -[value] using specification for function __initialize -[value] using specification for function __initialized -[value] using specification for function e_acsl_assert -FRAMAC_SHARE/e-acsl/e_acsl.h:34:[value] warning: function e_acsl_assert: precondition got status unknown. -[value] using specification for function __full_init -FRAMAC_SHARE/libc/stdlib.h:156:[value] allocating variable __malloc___e_acsl_malloc_l156 -[value] using specification for function __delete_block -FRAMAC_SHARE/libc/stdlib.h:163:[value] warning: function __e_acsl_malloc, behavior allocation: postcondition got status unknown. (Behavior may be inactive, no reduction performed.) -FRAMAC_SHARE/libc/stdlib.h:168:[value] warning: function __e_acsl_malloc, behavior no_allocation: postcondition got status invalid. (Behavior may be inactive, no reduction performed.) -tests/e-acsl-runtime/vector.c:16:[value] entering loop for the first time -tests/e-acsl-runtime/vector.c:29:[value] warning: assertion got status unknown. -tests/e-acsl-runtime/vector.c:30:[value] warning: assertion got status unknown. -tests/e-acsl-runtime/vector.c:30:[kernel] warning: accessing uninitialized left-value. assert \initialized(&LAST); -[value] using specification for function __gmpz_init_set_si -[value] using specification for function __gmpz_cmp -[value] using specification for function __gmpz_clear -FRAMAC_SHARE/libc/stdlib.h:178:[value] warning: function __e_acsl_free, behavior deallocation: precondition 'freeable' got status unknown. -[value] using specification for function __freeable -:0:[value] Assigning imprecise value to __e_acsl_implies. - The imprecision originates from Arithmetic {FRAMAC_SHARE/libc/stdlib.h:178} -FRAMAC_SHARE/libc/stdlib.h:178:[value] Reading left-value __e_acsl_implies. - It contains a garbled mix of {__malloc___e_acsl_malloc_l156} because of - Arithmetic {FRAMAC_SHARE/libc/stdlib.h:178}. -FRAMAC_SHARE/libc/stdlib.h:180:[value] warning: function __e_acsl_free, behavior deallocation: postcondition got status unknown. -[value] using specification for function __e_acsl_memory_clean -[value] done for function main diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/loop.1.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/vector.err.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/loop.1.err.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/vector.err.oracle diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/vector.0.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/vector.res.oracle similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/vector.0.res.oracle rename to src/plugins/e-acsl/tests/e-acsl-runtime/oracle/vector.res.oracle 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 66a141526d3..759e45545ad 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 COMMENT: no diff - 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_runtime.sh other_constants2 + COMMENT: no diff */ 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 a3f8f5176cc..dae0a0473a7 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 COMMENT: no diff - 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_runtime.sh ptr2 + COMMENT: no diff */ int main(void) { diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/ptr_init.c b/src/plugins/e-acsl/tests/e-acsl-runtime/ptr_init.c index 50f2049cb0a..2a2cb4fbf7c 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/ptr_init.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/ptr_init.c @@ -2,7 +2,7 @@ COMMENT: initialized and function calls STDOPT: #"-cpp-extra-args=\"-I`@frama-c@ -print-share-path`/libc\"" COMMENT: no diff - EXECNOW: LOG gen_ptr_init2.c BIN gen_ptr_init2.out @frama-c@ -cpp-extra-args="-I`@frama-c@ -print-share-path`/libc" -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/ptr_init.c -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_ptr_init2.c > /dev/null && ./gcc_runtime.sh ptr_init2 + COMMENT: no diff */ #include "stdlib.h" 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 4f966951aea..b6c534d8225 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 COMMENT: no diff - 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_runtime.sh result2 -Wno-unused-but-set-variable + COMMENT: no diff */ /*@ 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 b114e3ed8b7..e2bff335794 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 COMMENT: no diff - 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_runtime.sh sizeof2 + COMMENT: no diff */ int main(void) { diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/stdout.c b/src/plugins/e-acsl/tests/e-acsl-runtime/stdout.c index 643f09508c1..a57d920d918 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/stdout.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/stdout.c @@ -2,7 +2,7 @@ COMMENT: __fc_stdout et __fc_fopen STDOPT: #"-pp-annot" COMMENT: no diff - EXECNOW: LOG gen_stdout2.c BIN gen_stdout2.out @frama-c@ -machdep x86_64 -pp-annot -cpp-extra-args="-I`@frama-c@ -print-share-path`/libc" -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/stdout.c -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_stdout2.c > /dev/null && ./gcc_runtime.sh stdout2 + COMMENT: no diff */ #include<stdio.h> 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 52c30df93b2..efcdc81a540 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 COMMENT: no diff - 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_runtime.sh stmt_contract2 + COMMENT: no diff */ int main(void) { int x = 0, y = 2; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/test_config b/src/plugins/e-acsl/tests/e-acsl-runtime/test_config index 117d15bfd42..d88b3d5e21f 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/test_config +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/test_config @@ -1,4 +1,3 @@ LOG: gen_@PTEST_NAME@.c OPT: -machdep gcc_x86_64 -check -e-acsl -then-last -load-script tests/print.cmxs -print -ocode tests/e-acsl-runtime/result/gen_@PTEST_NAME@.c -kernel-verbose 0 -val -no-val-print -no-val-show-progress -no-results EXECNOW: ./scripts/testrun.sh @PTEST_NAME@ e-acsl-runtime "" "--frama-c=@frama-c@" -OPT: -check -e-acsl -e-acsl-gmp-only -then-last -kernel-verbose 0 -val -no-val-print -no-val-show-progress -no-results 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 c63ff066adf..bd7ccf9fdd0 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 COMMENT: no diff - 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_runtime.sh true2 + COMMENT: no diff */ 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 dcd423e790b..df3baf48715 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) COMMENT: no diff - 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_runtime.sh typedef2 + COMMENT: no diff */ typedef unsigned char uint8; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/valid.c b/src/plugins/e-acsl/tests/e-acsl-runtime/valid.c index 37d2b9ec5c2..97105482022 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/valid.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/valid.c @@ -2,7 +2,7 @@ COMMENT: \valid STDOPT: +"-val-builtin __malloc:Frama_C_alloc_size -val-builtin __free:Frama_C_free" COMMENT: no diff - EXECNOW: LOG gen_valid2.c BIN gen_valid2.out @frama-c@ -machdep x86_64 -cpp-extra-args="-I`@frama-c@ -print-share-path`/libc" -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/valid.c -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_valid2.c > /dev/null && ./gcc_runtime.sh valid2 + COMMENT: no diff */ #include "stdlib.h" diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/valid_alias.c b/src/plugins/e-acsl/tests/e-acsl-runtime/valid_alias.c index d7aa926c112..c266a534e0b 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/valid_alias.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/valid_alias.c @@ -1,8 +1,8 @@ /* run.config COMMENT: \valid in presence of aliasing - STDOPT: #"-cpp-extra-args=\"-I`@frama-c@ -print-share-path`/libc\"" +"-val-builtin __malloc:Frama_C_alloc_size -val-builtin __free:Frama_C_free" + STDOPT: +"-val-builtin __malloc:Frama_C_alloc_size -val-builtin __free:Frama_C_free" + COMMENT: no diff COMMENT: no diff - EXECNOW: LOG gen_valid_alias2.c BIN gen_valid_alias2.out @frama-c@ -cpp-extra-args="-I`@frama-c@ -print-share-path`/libc" -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/valid_alias.c -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_valid_alias2.c > /dev/null && ./gcc_runtime.sh valid_alias2 */ #include "stdlib.h" diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/valid_in_contract.c b/src/plugins/e-acsl/tests/e-acsl-runtime/valid_in_contract.c index 304a03f10ea..d5a152e02d3 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/valid_in_contract.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/valid_in_contract.c @@ -1,8 +1,8 @@ /* run.config COMMENT: function contract involving \valid - STDOPT: #"-cpp-extra-args=\"-I`@frama-c@ -print-share-path`/libc\"" +"-val-builtin __malloc:Frama_C_alloc_size -val-builtin __free:Frama_C_free" + STDOPT: +"-val-builtin __malloc:Frama_C_alloc_size -val-builtin __free:Frama_C_free" + COMMENT: no diff COMMENT: no diff - EXECNOW: LOG gen_valid_in_contract2.c BIN gen_valid_in_contract2.out @frama-c@ -cpp-extra-args="-I`@frama-c@ -print-share-path`/libc" -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/valid_in_contract.c -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_valid_in_contract2.c > /dev/null && ./gcc_runtime.sh valid_in_contract2 */ #include <stdlib.h> diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/vector.c b/src/plugins/e-acsl/tests/e-acsl-runtime/vector.c index 370349e319b..20000389ba2 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/vector.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/vector.c @@ -1,8 +1,8 @@ /* run.config COMMENT: function call + initialized - STDOPT: #"-cpp-extra-args=\"-I`@frama-c@ -print-share-path`/libc\"" +"-val-builtin __malloc:Frama_C_alloc_size -val-builtin __free:Frama_C_free" + STDOPT: +"-val-builtin __malloc:Frama_C_alloc_size -val-builtin __free:Frama_C_free" + COMMENT: no diff COMMENT: no diff - EXECNOW: LOG gen_vector2.c BIN gen_vector2.out @frama-c@ -cpp-extra-args="-I`@frama-c@ -print-share-path`/libc" -e-acsl-share ./share/e-acsl ./tests/e-acsl-runtime/vector.c -e-acsl-gmp-only -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_vector2.c > /dev/null && ./gcc_runtime.sh vector2 */ #include<stdlib.h> diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/mainargs.0.err.oracle b/src/plugins/e-acsl/tests/gmp/result/.gitkeep similarity index 100% rename from src/plugins/e-acsl/tests/e-acsl-runtime/oracle/mainargs.0.err.oracle rename to src/plugins/e-acsl/tests/gmp/result/.gitkeep -- GitLab