From 76c70a336e02833645382fa2e9c47575b0ae5d65 Mon Sep 17 00:00:00 2001 From: Julien Signoles <julien.signoles@cea.fr> Date: Thu, 19 Jan 2012 14:42:49 +0000 Subject: [PATCH] [e-acsl] the type system is now working: no more GMP in practice :-D --- src/plugins/e-acsl/TODO | 5 - src/plugins/e-acsl/env.ml | 28 +- src/plugins/e-acsl/env.mli | 2 +- src/plugins/e-acsl/quantif.ml | 44 +- src/plugins/e-acsl/quantif.mli | 2 +- .../e-acsl/tests/e-acsl-runtime/addrOf.i | 1 + .../e-acsl/tests/e-acsl-runtime/arith.i | 2 +- src/plugins/e-acsl/tests/e-acsl-runtime/at.i | 2 +- .../e-acsl/tests/e-acsl-runtime/cast.i | 10 +- .../tests/e-acsl-runtime/function_contract.i | 2 +- .../tests/e-acsl-runtime/integer_constant.i | 2 +- .../e-acsl-runtime/oracle/addrOf.res.oracle | 2 +- .../e-acsl-runtime/oracle/arith.res.oracle | 1273 +-------------- .../tests/e-acsl-runtime/oracle/at.res.oracle | 604 +------ .../e-acsl-runtime/oracle/cast.res.oracle | 117 +- .../oracle/comparison.res.oracle | 455 +----- .../oracle/function_contract.res.oracle | 1168 ++------------ .../tests/e-acsl-runtime/oracle/gen_addrOf.c | 2 +- .../tests/e-acsl-runtime/oracle/gen_arith.c | 480 +----- .../tests/e-acsl-runtime/oracle/gen_at.c | 268 +--- .../tests/e-acsl-runtime/oracle/gen_cast.c | 58 +- .../e-acsl-runtime/oracle/gen_comparison.c | 169 +- .../oracle/gen_function_contract.c | 493 +----- .../oracle/gen_integer_constant.c | 33 +- .../e-acsl-runtime/oracle/gen_invariant.c | 48 +- .../e-acsl-runtime/oracle/gen_labeled_stmt.c | 82 +- .../tests/e-acsl-runtime/oracle/gen_lazy.c | 467 +----- .../e-acsl-runtime/oracle/gen_linear_search.c | 300 +--- .../oracle/gen_nested_code_annot.c | 140 +- .../oracle/gen_other_constants.c | 32 +- .../tests/e-acsl-runtime/oracle/gen_ptr.c | 246 +-- .../tests/e-acsl-runtime/oracle/gen_quantif.c | 696 ++------ .../tests/e-acsl-runtime/oracle/gen_result.c | 75 +- .../tests/e-acsl-runtime/oracle/gen_sizeof.c | 51 +- .../e-acsl-runtime/oracle/gen_stmt_contract.c | 364 +---- .../tests/e-acsl-runtime/oracle/gen_typedef.c | 38 +- .../oracle/integer_constant.res.oracle | 55 +- .../oracle/invariant.res.oracle | 770 +-------- .../oracle/labeled_stmt.res.oracle | 179 +-- .../e-acsl-runtime/oracle/lazy.res.oracle | 971 ++--------- .../oracle/linear_search.res.oracle | 793 +-------- .../oracle/nested_code_annot.res.oracle | 283 +--- .../oracle/other_constants.res.oracle | 58 +- .../e-acsl-runtime/oracle/ptr.res.oracle | 724 +-------- .../e-acsl-runtime/oracle/quantif.res.oracle | 1427 +++-------------- .../e-acsl-runtime/oracle/result.res.oracle | 149 +- .../e-acsl-runtime/oracle/sizeof.res.oracle | 104 +- .../oracle/stmt_contract.res.oracle | 866 +--------- .../e-acsl-runtime/oracle/typedef.res.oracle | 67 +- src/plugins/e-acsl/tests/e-acsl-runtime/ptr.i | 2 +- .../e-acsl/tests/e-acsl-runtime/result.i | 2 +- .../tests/e-acsl-runtime/stmt_contract.i | 2 +- src/plugins/e-acsl/typing.ml | 409 +++-- src/plugins/e-acsl/typing.mli | 25 +- src/plugins/e-acsl/visit.ml | 192 +-- 55 files changed, 1846 insertions(+), 12993 deletions(-) diff --git a/src/plugins/e-acsl/TODO b/src/plugins/e-acsl/TODO index fa3093d4668..b8588ba2c8f 100644 --- a/src/plugins/e-acsl/TODO +++ b/src/plugins/e-acsl/TODO @@ -15,13 +15,8 @@ - utiliser Rte pour tous les overflows potentiels (get_rte_annotations dans Oxygen) - [Yannick] Logic functions -- type system for generating C types whenever possible - (generalisation of current Visit.principal_type) - customization des noms de variable générés (par ex pour indiquer le nom de la variable d'origine, ou son rôle) -- vérifier le code de la division et du modulo - (div et modulo mathématiques différents des div et modulo de l'ANSI C99) -- NULL implemented as 0 ############## # KNOWN BUGS # diff --git a/src/plugins/e-acsl/env.ml b/src/plugins/e-acsl/env.ml index c441c34ef76..55258ef3450 100644 --- a/src/plugins/e-acsl/env.ml +++ b/src/plugins/e-acsl/env.ml @@ -162,8 +162,7 @@ let new_var ?(global=false) env t ty mk_stmts = try match t with | None -> raise No_term - | Some t -> - Term.Map.find t local_env.mpz_tbl.new_exps, env + | Some t -> Term.Map.find t local_env.mpz_tbl.new_exps, env with Not_found | No_term -> do_new_var ~global env t ty mk_stmts @@ -173,15 +172,22 @@ let new_var_and_mpz_init ?global env t mk_stmts = module Logic_binding = struct let add env logic_v = - let v_ref = ref Varinfo.dummy in - let mk v _ = v_ref := v; [] in - let ty = match logic_v.lv_type with - | Ctype ty -> ty - | Linteger -> Mpz.t - | Ltype _ | Lvar _ | Lreal | Larrow _ -> assert false - in - let _, env = new_var env None ty mk in - { env with var_mapping = Logic_var.Map.add logic_v !v_ref env.var_mapping } + let v_ref = ref Varinfo.dummy in + let mk v _ = v_ref := v; [] in + let ty = match logic_v.lv_type with + | Ctype ty -> ty + | Linteger -> Mpz.t + | Ltype _ | Lvar _ | Lreal | Larrow _ as lty -> + let msg = + Pretty_utils.sfprintf + "logic variable of type %a" Logic_type.pretty lty + in + Error.not_yet msg + in + let e, env = new_var env None ty mk in + !v_ref, + e, + { env with var_mapping = Logic_var.Map.add logic_v !v_ref env.var_mapping } let get env logic_v = try Logic_var.Map.find logic_v env.var_mapping diff --git a/src/plugins/e-acsl/env.mli b/src/plugins/e-acsl/env.mli index a812d74ada5..3fa909e4146 100644 --- a/src/plugins/e-acsl/env.mli +++ b/src/plugins/e-acsl/env.mli @@ -54,7 +54,7 @@ val new_var_and_mpz_init: {!Mpz.init}. *) module Logic_binding: sig - val add: t -> logic_var -> t + val add: t -> logic_var -> varinfo * exp * t val get: t -> logic_var -> varinfo val remove: t -> logic_var -> t end diff --git a/src/plugins/e-acsl/quantif.ml b/src/plugins/e-acsl/quantif.ml index 0f8764acea5..cb803b68491 100644 --- a/src/plugins/e-acsl/quantif.ml +++ b/src/plugins/e-acsl/quantif.ml @@ -29,7 +29,7 @@ let named_predicate_to_exp_ref = Extlib.mk_fun "named_predicate_to_exp_ref" let term_to_exp_ref - : (Env.t -> logic_type -> term -> exp * Env.t) ref + : (Env.t -> typ option -> term -> exp * Env.t) ref = Extlib.mk_fun "term_to_exp_ref" let compute_quantif_guards quantif bounded_vars hyps = @@ -100,7 +100,7 @@ let convert env loc is_forall p bounded_vars hyps goal = let term_to_exp = !term_to_exp_ref in (* universal quantification over integers (or a subtype of integer) *) let guards = compute_quantif_guards p bounded_vars hyps in - let env = List.fold_left Env.Logic_binding.add env bounded_vars in +(* let env = List.fold_left Env.Logic_binding.add env bounded_vars in*) let var_res = ref Varinfo.dummy in let res, env = (* variable storing the result of the \forall *) @@ -143,7 +143,10 @@ let convert env loc is_forall p bounded_vars hyps goal = Linteger in let t1 = match rel1 with - | Rlt -> t_plus_one t1 + | Rlt -> + let t = t_plus_one t1 in + Typing.type_term t; + t | Rle -> t1 | Rgt | Rge | Req | Rneq -> assert false in @@ -155,25 +158,18 @@ let convert env loc is_forall p bounded_vars hyps goal = (* we increment the loop counter one more time (at the end of the loop). Thus to prevent overflow, check the type of [t2 + 1] instead of [t2]. *) - let ty = Typing.principal_type_from_term t1 (t_plus_one t2) in - let ty = Typing.principal_type ty logic_x.lv_type in + let t2_one = t_plus_one t2 in + Typing.type_term t2_one; + let ty = Typing.principal_type t1 t2_one in (* loop counter corresponding to the quantified variable *) - let var_x = Env.Logic_binding.get env logic_x in + logic_x.lv_type <- if Mpz.is_t ty then Linteger else Ctype ty; + let var_x, x, env = Env.Logic_binding.add env logic_x in let lv_x = var var_x in - let x = new_exp ~loc (Lval lv_x) in - let env = match ty with - | Ctype ty when isIntegralType ty -> - var_x.vtype <- ty; - env - | Linteger -> - var_x.vtype <- Mpz.t; - Env.add_stmt env (Mpz.init x) - | Ctype _ | Ltype _ | Lvar _ | Lreal | Larrow _ -> assert false - in + let env = if Mpz.is_t ty then Env.add_stmt env (Mpz.init x) else env in (* build the inner loops and loop body *) let body, env = mk_for_loop env tl in (* initialize the loop counter to [t1] *) - let e1, env = term_to_exp (Env.push env) ty t1 in + let e1, env = term_to_exp (Env.push env) (Some ty) t1 in let init_blk, env = Env.pop_and_get env @@ -184,12 +180,9 @@ let convert env loc is_forall p bounded_vars hyps goal = (* generate the guard [x bop t2] *) let stmts_block b = [ mkStmt ~valid_sid:true (Block b) ] in let tlv = Logic_const.tvar ~loc (cvar_to_lvar var_x) in - let guard_exp, env = - term_to_exp - (Env.push env) - (Ctype intType) - (Logic_const.term (TBinOp(bop2, tlv, t2)) ty) - in + let guard = Logic_const.term (TBinOp(bop2, tlv, t2)) Linteger in + Typing.type_term guard; + let guard_exp, env = term_to_exp (Env.push env) (Some intType) guard in let break_stmt = mkStmt ~valid_sid:true (Break guard_exp.eloc) in let guard_blk, env = Env.pop_and_get @@ -204,7 +197,10 @@ let convert env loc is_forall p bounded_vars hyps goal = in let guard = stmts_block guard_blk in (* increment the loop counter [x++] *) - let incr, env = term_to_exp (Env.push env) ty (t_plus_one tlv) in + let tlv_one = t_plus_one tlv in + (* previous typing ensures that [x++] fits type [ty] *) + Typing.unsafe_set_term tlv_one ty; + let incr, env = term_to_exp (Env.push env) (Some ty) tlv_one in let next_blk, env = Env.pop_and_get env diff --git a/src/plugins/e-acsl/quantif.mli b/src/plugins/e-acsl/quantif.mli index 9145fc6262b..33f1a82496e 100644 --- a/src/plugins/e-acsl/quantif.mli +++ b/src/plugins/e-acsl/quantif.mli @@ -32,7 +32,7 @@ val quantif_to_exp: Env.t -> predicate named -> exp * Env.t (* ***********************************************************************) val named_predicate_to_exp_ref: (Env.t -> predicate named -> exp * Env.t) ref -val term_to_exp_ref: (Env.t -> logic_type -> term -> exp * Env.t) ref +val term_to_exp_ref: (Env.t -> typ option -> term -> exp * Env.t) ref (* Local Variables: 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 733255d7400..44feb9d3c17 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/addrOf.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/addrOf.i @@ -2,6 +2,7 @@ COMMENT: addrOf EXECNOW: LOG gen_addrOf.c BIN gen_addrOf.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/addrOf.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_addrOf.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_addrOf.out ./tests/e-acsl-runtime/result/gen_addrOf.c && ./tests/e-acsl-runtime/result/gen_addrOf.out */ + int main(void) { int x = 0; /*@ assert &x == &x; */ ; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/arith.i b/src/plugins/e-acsl/tests/e-acsl-runtime/arith.i index 733bb1d6c65..1c3fd20be2d 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/arith.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/arith.i @@ -1,7 +1,7 @@ /* run.config COMMENT: arithmetic operations COMMENT: add the last assertion when fixing BTS #751 - EXECNOW: LOG gen_arith.c BIN gen_arith.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/arith.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_arith.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_arith.out ./tests/e-acsl-runtime/result/gen_arith.c -lgmp && ./tests/e-acsl-runtime/result/gen_arith.out + EXECNOW: LOG gen_arith.c BIN gen_arith.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/arith.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_arith.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_arith.out ./tests/e-acsl-runtime/result/gen_arith.c -lgmp && ./tests/e-acsl-runtime/result/gen_arith.out */ int main(void) { diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/at.i b/src/plugins/e-acsl/tests/e-acsl-runtime/at.i index 15d1e7773bd..a9af7846621 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/at.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/at.i @@ -1,6 +1,6 @@ /* run.config COMMENT: \at - EXECNOW: LOG gen_at.c BIN gen_at.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/at.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_at.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_at.out ./tests/e-acsl-runtime/result/gen_at.c -lgmp && ./tests/e-acsl-runtime/result/gen_at.out + EXECNOW: LOG gen_at.c BIN gen_at.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/at.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_at.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_at.out ./tests/e-acsl-runtime/result/gen_at.c -lgmp && ./tests/e-acsl-runtime/result/gen_at.out */ int A = 0; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/cast.i b/src/plugins/e-acsl/tests/e-acsl-runtime/cast.i index 422b5c47097..ef8f59f65a6 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/cast.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/cast.i @@ -7,12 +7,12 @@ int main(void) { long x = 0; int y = 0; - /* /\*@ assert (int)x == y; *\/ ; */ - /* /\*@ assert x == (long)y; *\/ ; */ + /*@ assert (int)x == y; */ ; + /*@ assert x == (long)y; */ ; - /* /\*@ assert y == (int)0; *\/ ; // cast from integer to int */ - /* /\*@ assert (unsigned int) y == (unsigned int)0; *\/ ; /\* cast from integer */ - /* to unsigned int *\/ */ + /*@ assert y == (int)0; */ ; // cast from integer to int + /*@ assert (unsigned int) y == (unsigned int)0; */ ; /* cast from integer + to unsigned int */ /*@ assert y != (int)0xfffffffffffffff; */ ; // cast from integer to int /*@ assert (unsigned int) y != (unsigned int)0xfffffffffffffff; */ ; 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 95facef562c..03e26322e26 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,6 +1,6 @@ /* run.config COMMENT: function contract - EXECNOW: LOG gen_function_contract.c BIN gen_function_contract.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/function_contract.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_function_contract.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_function_contract.out ./tests/e-acsl-runtime/result/gen_function_contract.c -lgmp && ./tests/e-acsl-runtime/result/gen_function_contract.out + EXECNOW: LOG gen_function_contract.c BIN gen_function_contract.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/function_contract.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_function_contract.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_function_contract.out ./tests/e-acsl-runtime/result/gen_function_contract.c -lgmp && ./tests/e-acsl-runtime/result/gen_function_contract.out */ int X = 0, Y = 2; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/integer_constant.i b/src/plugins/e-acsl/tests/e-acsl-runtime/integer_constant.i index 6d10f4a73ba..ac356946d0f 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/integer_constant.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/integer_constant.i @@ -1,7 +1,7 @@ /* run.config COMMENT: integer constant + a stmt after the assertion COMMENT: waiting for fixing BTS #745 - EXECNOW: LOG gen_integer_constant.c BIN gen_integer_constant.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/integer_constant.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_integer_constant.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_integer_constant.out ./tests/e-acsl-runtime/result/gen_integer_constant.c -lgmp && ./tests/e-acsl-runtime/result/gen_integer_constant.out + EXECNOW: LOG gen_integer_constant.c BIN gen_integer_constant.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/integer_constant.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_integer_constant.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_integer_constant.out ./tests/e-acsl-runtime/result/gen_integer_constant.c -lgmp && ./tests/e-acsl-runtime/result/gen_integer_constant.out */ int main(void) { int x; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.res.oracle index 3f1f2266585..20718782b19 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/addrOf.res.oracle @@ -37,7 +37,7 @@ int main(void) int x; x = 0; /*@ assert &x ≡ &x; */ ; - e_acsl_assert(! (& x == & x),(char *)"Assertion",(char *)"(&x == &x)",7); + e_acsl_assert(! (& x == & x),(char *)"Assertion",(char *)"(&x == &x)",8); __retres = 0; return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/arith.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/arith.res.oracle index 94904a72926..08b89806eee 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/arith.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/arith.res.oracle @@ -1,820 +1,115 @@ -:0:[e-acsl] warning: missing guard for ensuring that the given integer is C-representable [value] Analyzing a complete application starting at main [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization PROJECT_FILE.i:232:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:238. -PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:239. -PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:240. -PROJECT_FILE.i:133:[value] Function __gmpz_neg: precondition got status valid. -PROJECT_FILE.i:134:[value] Function __gmpz_neg: precondition got status valid. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:241. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:242. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:243. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. -[value] Done for function exit + Called from PROJECT_FILE.i:233. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:244. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:245. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:246. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:250:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:256. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:257. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:260. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:235:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:261. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:236. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:262. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:263. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:264. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:268:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:273. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:274. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_com <- main. - Called from PROJECT_FILE.i:275. -[kernel] warning: No code for function __gmpz_com, default assigns generated -[value] Done for function __gmpz_com -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:276. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:238:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:277. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:239. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:278. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:279. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:283:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:291. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:292. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:293. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:294. -PROJECT_FILE.i:138:[value] Function __gmpz_add: precondition got status valid. -PROJECT_FILE.i:139:[value] Function __gmpz_add: precondition got status valid. -PROJECT_FILE.i:140:[value] Function __gmpz_add: precondition got status valid. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:295. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:296. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:297. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:298. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:241:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:299. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:242. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:300. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:301. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:302. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:303. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:304. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:308:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:316. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:317. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:318. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_sub <- main. - Called from PROJECT_FILE.i:319. -PROJECT_FILE.i:144:[value] Function __gmpz_sub: precondition got status valid. -PROJECT_FILE.i:145:[value] Function __gmpz_sub: precondition got status valid. -PROJECT_FILE.i:146:[value] Function __gmpz_sub: precondition got status valid. -[value] Done for function __gmpz_sub -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:320. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:321. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:322. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:323. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:245:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:324. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:246. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:325. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:326. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:327. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:328. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:329. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:333:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:341. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:342. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:343. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_mul <- main. - Called from PROJECT_FILE.i:344. -PROJECT_FILE.i:150:[value] Function __gmpz_mul: precondition got status valid. -PROJECT_FILE.i:151:[value] Function __gmpz_mul: precondition got status valid. -PROJECT_FILE.i:152:[value] Function __gmpz_mul: precondition got status valid. -[value] Done for function __gmpz_mul -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:345. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:346. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:347. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:348. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:249:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:349. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:250. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:350. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:351. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:352. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:353. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:354. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:358:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:367. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:368. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_get_si <- main. - Called from PROJECT_FILE.i:369. -PROJECT_FILE.i:172:[value] Function __gmpz_get_si: precondition got status valid. -[value] Done for function __gmpz_get_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:370. -[value] Done for function __gmpz_init -PROJECT_FILE.i:371:[value] Assertion got status valid. +PROJECT_FILE.i:253:[value] Assertion got status valid. +PROJECT_FILE.i:256:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:372. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:257. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_tdiv_q <- main. - Called from PROJECT_FILE.i:373. -PROJECT_FILE.i:156:[value] Function __gmpz_tdiv_q: precondition got status valid. -PROJECT_FILE.i:157:[value] Function __gmpz_tdiv_q: precondition got status valid. -PROJECT_FILE.i:158:[value] Function __gmpz_tdiv_q: precondition got status valid. -[value] Done for function __gmpz_tdiv_q -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:374. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:375. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:376. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:377. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:378. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:259. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:379. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:380. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:381. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:382. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:383. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:387:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_str <- main. - Called from PROJECT_FILE.i:395. -PROJECT_FILE.i:86:[value] Function __gmpz_init_set_str: postcondition got status valid. -[value] Done for function __gmpz_init_set_str -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:396. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:397. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:398. -[value] Done for function __gmpz_init -PROJECT_FILE.i:399:[value] Assertion got status valid. +PROJECT_FILE.i:263:[value] Assertion got status valid. +PROJECT_FILE.i:266:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:400. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:267. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_tdiv_q <- main. - Called from PROJECT_FILE.i:401. -[value] Done for function __gmpz_tdiv_q -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:402. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:403. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:404. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:269. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:406. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:407. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:408. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:409. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:413:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:422. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:423. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_get_si <- main. - Called from PROJECT_FILE.i:424. -[value] Done for function __gmpz_get_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:425. -[value] Done for function __gmpz_init -PROJECT_FILE.i:426:[value] Assertion got status valid. +PROJECT_FILE.i:274:[value] Assertion got status valid. +PROJECT_FILE.i:277:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:427. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:278. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_tdiv_r <- main. - Called from PROJECT_FILE.i:428. -PROJECT_FILE.i:162:[value] Function __gmpz_tdiv_r: precondition got status valid. -PROJECT_FILE.i:163:[value] Function __gmpz_tdiv_r: precondition got status valid. -PROJECT_FILE.i:164:[value] Function __gmpz_tdiv_r: precondition got status valid. -[value] Done for function __gmpz_tdiv_r -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:429. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:430. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:431. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:432. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:433. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:280. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:434. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:435. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:436. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:437. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:438. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:442:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:454. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:455. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:456. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:457. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:458. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:459. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:460. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:461. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:462. -[value] Done for function __gmpz_init -PROJECT_FILE.i:463:[value] Assertion got status valid. +PROJECT_FILE.i:284:[value] Assertion got status valid. +PROJECT_FILE.i:287:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:464. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:288. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_tdiv_r <- main. - Called from PROJECT_FILE.i:465. -[value] Done for function __gmpz_tdiv_r -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:466. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:467. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:468. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:469. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:470. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:290. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:471. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:472. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:473. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:474. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:475. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:476. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:477. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:478. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:482:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:492. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:493. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:494. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:495. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:496. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:497. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:498. -[value] Done for function __gmpz_init -PROJECT_FILE.i:499:[value] Assertion got status valid. +PROJECT_FILE.i:294:[value] Assertion got status valid. +PROJECT_FILE.i:297:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:500. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:298. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_tdiv_r <- main. - Called from PROJECT_FILE.i:501. -[value] Done for function __gmpz_tdiv_r -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:502. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:503. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:504. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:300. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:505. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:506. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:507. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:508. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:509. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:510. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:514:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:530. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:531. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:532. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_mul <- main. - Called from PROJECT_FILE.i:533. -[value] Done for function __gmpz_mul -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:534. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:535. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:536. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:537. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:538. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:539. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:540. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:541. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_sub <- main. - Called from PROJECT_FILE.i:542. -[value] Done for function __gmpz_sub -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:543. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_sub <- main. - Called from PROJECT_FILE.i:544. -[value] Done for function __gmpz_sub -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:545. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:546. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:547. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:548. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:549. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:550. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:304:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:551. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:305. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:553. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:554. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:555. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:556. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:557. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:558. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:559. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:560. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:561. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:562. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:563. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:564. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:565. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:569:[value] Assertion got status valid. +PROJECT_FILE.i:309:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:570. + Called from PROJECT_FILE.i:310. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -PROJECT_FILE.i:573:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:579. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:580. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:581. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:582. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:583. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:313:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:584. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:314. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:586. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:587. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:588. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:592:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:598. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:599. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:600. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:601. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:602. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:317:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:603. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:318. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:605. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:606. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:607. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:611:[value] Assertion got status valid. +PROJECT_FILE.i:321:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:612. + Called from PROJECT_FILE.i:322. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -PROJECT_FILE.i:615:[value] Assertion got status valid. +PROJECT_FILE.i:325:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:616. + Called from PROJECT_FILE.i:326. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert [value] Recording results for main @@ -826,80 +121,6 @@ PROJECT_FILE.i:615:[value] Assertion got status valid. x ∈ {-3} y ∈ {2} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ ensures \valid(\old(z)); - assigns *z; */ -extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, - int base); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - assigns *z1; */ -extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z); - assigns \nothing; */ -extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -916,9 +137,6 @@ void e_acsl_assert(int predicate, char *kind, char *pred_txt, int line) return; } -/*@ behavior generated: - assigns \at(\result,Post) \from \nothing; */ -extern int ( /* missing proto */ __gmpz_com)(); int main(void) { int __retres; @@ -927,416 +145,85 @@ int main(void) x = -3; y = 2; /*@ assert -3 ≡ x; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - mpz_t e_acsl_3; - int e_acsl_4; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)3); - __gmpz_init((__mpz_struct *)(e_acsl_2)); - __gmpz_neg((__mpz_struct *)(e_acsl_2),(__mpz_struct const *)(e_acsl_1)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_3),(long)x); - e_acsl_4 = __gmpz_cmp((__mpz_struct const *)(e_acsl_2), - (__mpz_struct const *)(e_acsl_3)); - e_acsl_assert(! (e_acsl_4 == 0),(char *)"Assertion",(char *)"(-3 == x)", - 11); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - __gmpz_clear((__mpz_struct *)(e_acsl_3)); - } - + e_acsl_assert(! (-3 == x),(char *)"Assertion",(char *)"(-3 == x)",11); /*@ assert x ≡ -3; */ ; - { - mpz_t e_acsl_5; - mpz_t e_acsl_6; - mpz_t e_acsl_7; - int e_acsl_8; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_6),(long)3); - __gmpz_init((__mpz_struct *)(e_acsl_7)); - __gmpz_neg((__mpz_struct *)(e_acsl_7),(__mpz_struct const *)(e_acsl_6)); - e_acsl_8 = __gmpz_cmp((__mpz_struct const *)(e_acsl_5), - (__mpz_struct const *)(e_acsl_7)); - e_acsl_assert(! (e_acsl_8 == 0),(char *)"Assertion",(char *)"(x == -3)", - 12); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - __gmpz_clear((__mpz_struct *)(e_acsl_6)); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); - } - + e_acsl_assert(! (x == -3),(char *)"Assertion",(char *)"(x == -3)",12); /*@ assert 0 ≢ ~0; */ ; - { - mpz_t e_acsl_9; - mpz_t e_acsl_10; - int e_acsl_11; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)0); - __gmpz_init((__mpz_struct *)(e_acsl_10)); - __gmpz_com(e_acsl_10,e_acsl_9); - e_acsl_11 = __gmpz_cmp((__mpz_struct const *)(e_acsl_9), - (__mpz_struct const *)(e_acsl_10)); - e_acsl_assert(! (e_acsl_11 != 0),(char *)"Assertion",(char *)"(0 != ~0)", - 13); - __gmpz_clear((__mpz_struct *)(e_acsl_9)); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - } - + e_acsl_assert(! (0 != ~ 0),(char *)"Assertion",(char *)"(0 != ~0)",13); /*@ assert x+1 ≡ -2; */ ; - { - mpz_t e_acsl_12; - mpz_t e_acsl_13; - mpz_t e_acsl_14; - mpz_t e_acsl_15; - mpz_t e_acsl_16; - int e_acsl_17; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_12),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_14)); - __gmpz_add((__mpz_struct *)(e_acsl_14),(__mpz_struct const *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_13)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_16)); - __gmpz_neg((__mpz_struct *)(e_acsl_16),(__mpz_struct const *)(e_acsl_15)); - e_acsl_17 = __gmpz_cmp((__mpz_struct const *)(e_acsl_14), - (__mpz_struct const *)(e_acsl_16)); - e_acsl_assert(! (e_acsl_17 == 0),(char *)"Assertion", - (char *)"(x+1 == -2)",15); - __gmpz_clear((__mpz_struct *)(e_acsl_12)); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); - __gmpz_clear((__mpz_struct *)(e_acsl_14)); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - } - + e_acsl_assert(! ((long long)x + (long long)1 == (long long)-2), + (char *)"Assertion",(char *)"(x+1 == -2)",15); /*@ assert x-1 ≡ -4; */ ; - { - mpz_t e_acsl_18; - mpz_t e_acsl_19; - mpz_t e_acsl_20; - mpz_t e_acsl_21; - mpz_t e_acsl_22; - int e_acsl_23; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_18),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_20)); - __gmpz_sub((__mpz_struct *)(e_acsl_20),(__mpz_struct const *)(e_acsl_18), - (__mpz_struct const *)(e_acsl_19)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_21),(long)4); - __gmpz_init((__mpz_struct *)(e_acsl_22)); - __gmpz_neg((__mpz_struct *)(e_acsl_22),(__mpz_struct const *)(e_acsl_21)); - e_acsl_23 = __gmpz_cmp((__mpz_struct const *)(e_acsl_20), - (__mpz_struct const *)(e_acsl_22)); - e_acsl_assert(! (e_acsl_23 == 0),(char *)"Assertion", - (char *)"(x-1 == -4)",16); - __gmpz_clear((__mpz_struct *)(e_acsl_18)); - __gmpz_clear((__mpz_struct *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_20)); - __gmpz_clear((__mpz_struct *)(e_acsl_21)); - __gmpz_clear((__mpz_struct *)(e_acsl_22)); - } - + e_acsl_assert(! ((long long)x - (long long)1 == (long long)-4), + (char *)"Assertion",(char *)"(x-1 == -4)",16); /*@ assert x*3 ≡ -9; */ ; - { - mpz_t e_acsl_24; - mpz_t e_acsl_25; - mpz_t e_acsl_26; - mpz_t e_acsl_27; - mpz_t e_acsl_28; - int e_acsl_29; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_24),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_25),(long)3); - __gmpz_init((__mpz_struct *)(e_acsl_26)); - __gmpz_mul((__mpz_struct *)(e_acsl_26),(__mpz_struct const *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_25)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)9); - __gmpz_init((__mpz_struct *)(e_acsl_28)); - __gmpz_neg((__mpz_struct *)(e_acsl_28),(__mpz_struct const *)(e_acsl_27)); - e_acsl_29 = __gmpz_cmp((__mpz_struct const *)(e_acsl_26), - (__mpz_struct const *)(e_acsl_28)); - e_acsl_assert(! (e_acsl_29 == 0),(char *)"Assertion", - (char *)"(x*3 == -9)",17); - __gmpz_clear((__mpz_struct *)(e_acsl_24)); - __gmpz_clear((__mpz_struct *)(e_acsl_25)); - __gmpz_clear((__mpz_struct *)(e_acsl_26)); - __gmpz_clear((__mpz_struct *)(e_acsl_27)); - __gmpz_clear((__mpz_struct *)(e_acsl_28)); - } - + e_acsl_assert(! ((long long)x * (long long)3 == (long long)-9), + (char *)"Assertion",(char *)"(x*3 == -9)",17); /*@ assert x/3 ≡ -1; */ ; { - mpz_t e_acsl_30; - mpz_t e_acsl_31; - int e_acsl_32; - mpz_t e_acsl_33; - mpz_t e_acsl_34; - mpz_t e_acsl_35; - int e_acsl_36; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_30),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)3); - e_acsl_32 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_31)); - __gmpz_init((__mpz_struct *)(e_acsl_33)); + int e_acsl_1; /*@ assert 3 ≢ 0; */ ; - e_acsl_assert(e_acsl_32 == 0,(char *)"Assertion",(char *)"(3 == 0)",18); - __gmpz_tdiv_q((__mpz_struct *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_30), - (__mpz_struct const *)(e_acsl_31)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_34),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_35)); - __gmpz_neg((__mpz_struct *)(e_acsl_35),(__mpz_struct const *)(e_acsl_34)); - e_acsl_36 = __gmpz_cmp((__mpz_struct const *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_35)); - e_acsl_assert(! (e_acsl_36 == 0),(char *)"Assertion", + e_acsl_assert(3 == 0,(char *)"Assertion",(char *)"(3 == 0)",18); + e_acsl_1 = x / 3; + e_acsl_assert(! (e_acsl_1 == -1),(char *)"Assertion", (char *)"(x/3 == -1)",18); - __gmpz_clear((__mpz_struct *)(e_acsl_30)); - __gmpz_clear((__mpz_struct *)(e_acsl_31)); - __gmpz_clear((__mpz_struct *)(e_acsl_33)); - __gmpz_clear((__mpz_struct *)(e_acsl_34)); - __gmpz_clear((__mpz_struct *)(e_acsl_35)); } /*@ assert 0xfffffffffff/0xfffffffffff ≡ 1; */ ; { - mpz_t e_acsl_37; - mpz_t e_acsl_38; - int e_acsl_39; - mpz_t e_acsl_40; - mpz_t e_acsl_41; - int e_acsl_42; - __gmpz_init_set_str((__mpz_struct *)(e_acsl_37),"17592186044415",10); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_38),(long)0); - e_acsl_39 = __gmpz_cmp((__mpz_struct const *)(e_acsl_37), - (__mpz_struct const *)(e_acsl_38)); - __gmpz_init((__mpz_struct *)(e_acsl_40)); + int e_acsl_2; /*@ assert 0xfffffffffff ≢ 0; */ ; - e_acsl_assert(e_acsl_39 == 0,(char *)"Assertion", + e_acsl_assert(0xfffffffffff == (long long)0,(char *)"Assertion", (char *)"(0xfffffffffff == 0)",19); - __gmpz_tdiv_q((__mpz_struct *)(e_acsl_40), - (__mpz_struct const *)(e_acsl_37), - (__mpz_struct const *)(e_acsl_37)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_41),(long)1); - e_acsl_42 = __gmpz_cmp((__mpz_struct const *)(e_acsl_40), - (__mpz_struct const *)(e_acsl_41)); - e_acsl_assert(! (e_acsl_42 == 0),(char *)"Assertion", + e_acsl_2 = (int)(0xfffffffffff / 0xfffffffffff); + e_acsl_assert(! (e_acsl_2 == 1),(char *)"Assertion", (char *)"(0xfffffffffff/0xfffffffffff == 1)",19); - __gmpz_clear((__mpz_struct *)(e_acsl_37)); - __gmpz_clear((__mpz_struct *)(e_acsl_38)); - __gmpz_clear((__mpz_struct *)(e_acsl_40)); - __gmpz_clear((__mpz_struct *)(e_acsl_41)); } /*@ assert x%2 ≡ -1; */ ; { - mpz_t e_acsl_43; - mpz_t e_acsl_44; - int e_acsl_45; - mpz_t e_acsl_46; - mpz_t e_acsl_47; - mpz_t e_acsl_48; - int e_acsl_49; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_43),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_44),(long)2); - e_acsl_45 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_44)); - __gmpz_init((__mpz_struct *)(e_acsl_46)); + int e_acsl_3; /*@ assert 2 ≢ 0; */ ; - e_acsl_assert(e_acsl_45 == 0,(char *)"Assertion",(char *)"(2 == 0)",20); - __gmpz_tdiv_r((__mpz_struct *)(e_acsl_46), - (__mpz_struct const *)(e_acsl_43), - (__mpz_struct const *)(e_acsl_44)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_47),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_48)); - __gmpz_neg((__mpz_struct *)(e_acsl_48),(__mpz_struct const *)(e_acsl_47)); - e_acsl_49 = __gmpz_cmp((__mpz_struct const *)(e_acsl_46), - (__mpz_struct const *)(e_acsl_48)); - e_acsl_assert(! (e_acsl_49 == 0),(char *)"Assertion", + e_acsl_assert(2 == 0,(char *)"Assertion",(char *)"(2 == 0)",20); + e_acsl_3 = x % 2; + e_acsl_assert(! (e_acsl_3 == -1),(char *)"Assertion", (char *)"(x%2 == -1)",20); - __gmpz_clear((__mpz_struct *)(e_acsl_43)); - __gmpz_clear((__mpz_struct *)(e_acsl_44)); - __gmpz_clear((__mpz_struct *)(e_acsl_46)); - __gmpz_clear((__mpz_struct *)(e_acsl_47)); - __gmpz_clear((__mpz_struct *)(e_acsl_48)); } /*@ assert -3%-2 ≡ -1; */ ; { - mpz_t e_acsl_50; - mpz_t e_acsl_51; - mpz_t e_acsl_52; - mpz_t e_acsl_53; - mpz_t e_acsl_54; - int e_acsl_55; - mpz_t e_acsl_56; - mpz_t e_acsl_57; - mpz_t e_acsl_58; - int e_acsl_59; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_50),(long)3); - __gmpz_init((__mpz_struct *)(e_acsl_51)); - __gmpz_neg((__mpz_struct *)(e_acsl_51),(__mpz_struct const *)(e_acsl_50)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_52),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_53)); - __gmpz_neg((__mpz_struct *)(e_acsl_53),(__mpz_struct const *)(e_acsl_52)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_54),(long)0); - e_acsl_55 = __gmpz_cmp((__mpz_struct const *)(e_acsl_53), - (__mpz_struct const *)(e_acsl_54)); - __gmpz_init((__mpz_struct *)(e_acsl_56)); + int e_acsl_4; /*@ assert -2 ≢ 0; */ ; - e_acsl_assert(e_acsl_55 == 0,(char *)"Assertion",(char *)"(-2 == 0)",21); - __gmpz_tdiv_r((__mpz_struct *)(e_acsl_56), - (__mpz_struct const *)(e_acsl_51), - (__mpz_struct const *)(e_acsl_53)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_57),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_58)); - __gmpz_neg((__mpz_struct *)(e_acsl_58),(__mpz_struct const *)(e_acsl_57)); - e_acsl_59 = __gmpz_cmp((__mpz_struct const *)(e_acsl_56), - (__mpz_struct const *)(e_acsl_58)); - e_acsl_assert(! (e_acsl_59 == 0),(char *)"Assertion", + e_acsl_assert(-2 == 0,(char *)"Assertion",(char *)"(-2 == 0)",21); + e_acsl_4 = -3 % -2; + e_acsl_assert(! (e_acsl_4 == -1),(char *)"Assertion", (char *)"(-3%-2 == -1)",21); - __gmpz_clear((__mpz_struct *)(e_acsl_50)); - __gmpz_clear((__mpz_struct *)(e_acsl_51)); - __gmpz_clear((__mpz_struct *)(e_acsl_52)); - __gmpz_clear((__mpz_struct *)(e_acsl_53)); - __gmpz_clear((__mpz_struct *)(e_acsl_54)); - __gmpz_clear((__mpz_struct *)(e_acsl_56)); - __gmpz_clear((__mpz_struct *)(e_acsl_57)); - __gmpz_clear((__mpz_struct *)(e_acsl_58)); } /*@ assert 3%-2 ≡ 1; */ ; { - mpz_t e_acsl_60; - mpz_t e_acsl_61; - mpz_t e_acsl_62; - mpz_t e_acsl_63; - int e_acsl_64; - mpz_t e_acsl_65; - mpz_t e_acsl_66; - int e_acsl_67; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_60),(long)3); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_61),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_62)); - __gmpz_neg((__mpz_struct *)(e_acsl_62),(__mpz_struct const *)(e_acsl_61)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_63),(long)0); - e_acsl_64 = __gmpz_cmp((__mpz_struct const *)(e_acsl_62), - (__mpz_struct const *)(e_acsl_63)); - __gmpz_init((__mpz_struct *)(e_acsl_65)); + int e_acsl_5; /*@ assert -2 ≢ 0; */ ; - e_acsl_assert(e_acsl_64 == 0,(char *)"Assertion",(char *)"(-2 == 0)",22); - __gmpz_tdiv_r((__mpz_struct *)(e_acsl_65), - (__mpz_struct const *)(e_acsl_60), - (__mpz_struct const *)(e_acsl_62)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_66),(long)1); - e_acsl_67 = __gmpz_cmp((__mpz_struct const *)(e_acsl_65), - (__mpz_struct const *)(e_acsl_66)); - e_acsl_assert(! (e_acsl_67 == 0),(char *)"Assertion", + e_acsl_assert(-2 == 0,(char *)"Assertion",(char *)"(-2 == 0)",22); + e_acsl_5 = 3 % -2; + e_acsl_assert(! (e_acsl_5 == 1),(char *)"Assertion", (char *)"(3%-2 == 1)",22); - __gmpz_clear((__mpz_struct *)(e_acsl_60)); - __gmpz_clear((__mpz_struct *)(e_acsl_61)); - __gmpz_clear((__mpz_struct *)(e_acsl_62)); - __gmpz_clear((__mpz_struct *)(e_acsl_63)); - __gmpz_clear((__mpz_struct *)(e_acsl_65)); - __gmpz_clear((__mpz_struct *)(e_acsl_66)); } /*@ assert ((x*2+(3+y))-4)+(x-y) ≡ -10; */ ; - { - mpz_t e_acsl_68; - mpz_t e_acsl_69; - mpz_t e_acsl_70; - mpz_t e_acsl_71; - mpz_t e_acsl_72; - mpz_t e_acsl_73; - mpz_t e_acsl_74; - mpz_t e_acsl_75; - mpz_t e_acsl_76; - mpz_t e_acsl_77; - mpz_t e_acsl_78; - mpz_t e_acsl_79; - mpz_t e_acsl_80; - int e_acsl_81; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_68),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_69),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_70)); - __gmpz_mul((__mpz_struct *)(e_acsl_70),(__mpz_struct const *)(e_acsl_68), - (__mpz_struct const *)(e_acsl_69)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_71),(long)3); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_72),(long)y); - __gmpz_init((__mpz_struct *)(e_acsl_73)); - __gmpz_add((__mpz_struct *)(e_acsl_73),(__mpz_struct const *)(e_acsl_71), - (__mpz_struct const *)(e_acsl_72)); - __gmpz_init((__mpz_struct *)(e_acsl_74)); - __gmpz_add((__mpz_struct *)(e_acsl_74),(__mpz_struct const *)(e_acsl_70), - (__mpz_struct const *)(e_acsl_73)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_75),(long)4); - __gmpz_init((__mpz_struct *)(e_acsl_76)); - __gmpz_sub((__mpz_struct *)(e_acsl_76),(__mpz_struct const *)(e_acsl_74), - (__mpz_struct const *)(e_acsl_75)); - __gmpz_init((__mpz_struct *)(e_acsl_77)); - __gmpz_sub((__mpz_struct *)(e_acsl_77),(__mpz_struct const *)(e_acsl_68), - (__mpz_struct const *)(e_acsl_72)); - __gmpz_init((__mpz_struct *)(e_acsl_78)); - __gmpz_add((__mpz_struct *)(e_acsl_78),(__mpz_struct const *)(e_acsl_76), - (__mpz_struct const *)(e_acsl_77)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_79),(long)10); - __gmpz_init((__mpz_struct *)(e_acsl_80)); - __gmpz_neg((__mpz_struct *)(e_acsl_80),(__mpz_struct const *)(e_acsl_79)); - e_acsl_81 = __gmpz_cmp((__mpz_struct const *)(e_acsl_78), - (__mpz_struct const *)(e_acsl_80)); - e_acsl_assert(! (e_acsl_81 == 0),(char *)"Assertion", - (char *)"(((x*2+(3+y))-4)+(x-y) == -10)",24); - __gmpz_clear((__mpz_struct *)(e_acsl_68)); - __gmpz_clear((__mpz_struct *)(e_acsl_69)); - __gmpz_clear((__mpz_struct *)(e_acsl_70)); - __gmpz_clear((__mpz_struct *)(e_acsl_71)); - __gmpz_clear((__mpz_struct *)(e_acsl_72)); - __gmpz_clear((__mpz_struct *)(e_acsl_73)); - __gmpz_clear((__mpz_struct *)(e_acsl_74)); - __gmpz_clear((__mpz_struct *)(e_acsl_75)); - __gmpz_clear((__mpz_struct *)(e_acsl_76)); - __gmpz_clear((__mpz_struct *)(e_acsl_77)); - __gmpz_clear((__mpz_struct *)(e_acsl_78)); - __gmpz_clear((__mpz_struct *)(e_acsl_79)); - __gmpz_clear((__mpz_struct *)(e_acsl_80)); - } - + e_acsl_assert(! ((((long long)x * (long long)2 + ((long long)3 + (long long)y)) - (long long)4) + ( + (long long)x - (long long)y) == (long long)-10), + (char *)"Assertion",(char *)"(((x*2+(3+y))-4)+(x-y) == -10)", + 24); /*@ assert (0≡1) ≡ !(0≡0); */ ; e_acsl_assert(! ((0 == 1) == ! (0 == 0)),(char *)"Assertion", (char *)"((0==1) == !(0==0))",26); /*@ assert (0≤-1) ≡ (0>0); */ ; - { - mpz_t e_acsl_82; - mpz_t e_acsl_83; - mpz_t e_acsl_84; - int e_acsl_85; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_82),(long)0); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_83),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_84)); - __gmpz_neg((__mpz_struct *)(e_acsl_84),(__mpz_struct const *)(e_acsl_83)); - e_acsl_85 = __gmpz_cmp((__mpz_struct const *)(e_acsl_82), - (__mpz_struct const *)(e_acsl_84)); - e_acsl_assert(! ((e_acsl_85 <= 0) == (0 > 0)),(char *)"Assertion", - (char *)"((0<=-1) == (0>0))",27); - __gmpz_clear((__mpz_struct *)(e_acsl_82)); - __gmpz_clear((__mpz_struct *)(e_acsl_83)); - __gmpz_clear((__mpz_struct *)(e_acsl_84)); - } - + e_acsl_assert(! ((0 <= -1) == (0 > 0)),(char *)"Assertion", + (char *)"((0<=-1) == (0>0))",27); /*@ assert (0≥-1) ≡ (0≤0); */ ; - { - mpz_t e_acsl_86; - mpz_t e_acsl_87; - mpz_t e_acsl_88; - int e_acsl_89; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_86),(long)0); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_87),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_88)); - __gmpz_neg((__mpz_struct *)(e_acsl_88),(__mpz_struct const *)(e_acsl_87)); - e_acsl_89 = __gmpz_cmp((__mpz_struct const *)(e_acsl_86), - (__mpz_struct const *)(e_acsl_88)); - e_acsl_assert(! ((e_acsl_89 >= 0) == (0 <= 0)),(char *)"Assertion", - (char *)"((0>=-1) == (0<=0))",28); - __gmpz_clear((__mpz_struct *)(e_acsl_86)); - __gmpz_clear((__mpz_struct *)(e_acsl_87)); - __gmpz_clear((__mpz_struct *)(e_acsl_88)); - } - + e_acsl_assert(! ((0 >= -1) == (0 <= 0)),(char *)"Assertion", + (char *)"((0>=-1) == (0<=0))",28); /*@ assert (0≢1) ≡ !(0≢0); */ ; e_acsl_assert(! ((0 != 1) == ! (0 != 0)),(char *)"Assertion", (char *)"((0!=1) == !(0!=0))",29); diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.res.oracle index 647312d9c4f..994bd214a8b 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.res.oracle @@ -9,341 +9,69 @@ tests/e-acsl-runtime/at.i:33:[e-acsl] warning: missing guard for ensuring that p [value] Initial state computed [value] Values of globals at initialization A ∈ {0} -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:385. -PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:386. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:387. -PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:388. -PROJECT_FILE.i:138:[value] Function __gmpz_add: precondition got status valid. -PROJECT_FILE.i:139:[value] Function __gmpz_add: precondition got status valid. -PROJECT_FILE.i:140:[value] Function __gmpz_add: precondition got status valid. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_init_set <- main. - Called from PROJECT_FILE.i:389. -PROJECT_FILE.i:73:[value] Function __gmpz_init_set: precondition got status valid. -PROJECT_FILE.i:74:[value] Function __gmpz_init_set: postcondition got status valid. -[value] Done for function __gmpz_init_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:390. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:391. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:392. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:396:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:401. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:402. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:403. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:306:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:404. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. -[value] Done for function exit + Called from PROJECT_FILE.i:307. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:405. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:406. -[value] Done for function __gmpz_clear [value] computing for function f <- main. - Called from PROJECT_FILE.i:412. + Called from PROJECT_FILE.i:311. PROJECT_FILE.i:242:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- f <- main. - Called from PROJECT_FILE.i:247. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- f <- main. - Called from PROJECT_FILE.i:248. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- f <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:250. -[value] computing for function printf <- e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:243. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- f <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- f <- main. - Called from PROJECT_FILE.i:252. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:256:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- f <- main. - Called from PROJECT_FILE.i:261. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- f <- main. - Called from PROJECT_FILE.i:262. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- f <- main. - Called from PROJECT_FILE.i:263. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:245:[value] Assertion got status unknown. [value] computing for function e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:264. -[value] computing for function printf <- e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:246. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- f <- main. - Called from PROJECT_FILE.i:265. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- f <- main. - Called from PROJECT_FILE.i:266. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:270:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- f <- main. - Called from PROJECT_FILE.i:276. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- f <- main. - Called from PROJECT_FILE.i:277. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- f <- main. - Called from PROJECT_FILE.i:278. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:248:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:279. -[value] computing for function printf <- e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:250. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- f <- main. - Called from PROJECT_FILE.i:280. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- f <- main. - Called from PROJECT_FILE.i:281. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:285:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- f <- main. - Called from PROJECT_FILE.i:290. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- f <- main. - Called from PROJECT_FILE.i:291. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- f <- main. - Called from PROJECT_FILE.i:292. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:252:[value] Assertion got status unknown. [value] computing for function e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:293. -[value] computing for function printf <- e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:253. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- f <- main. - Called from PROJECT_FILE.i:295. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- f <- main. - Called from PROJECT_FILE.i:296. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- f <- main. - Called from PROJECT_FILE.i:306. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- f <- main. - Called from PROJECT_FILE.i:307. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- f <- main. - Called from PROJECT_FILE.i:308. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:309. -[value] computing for function printf <- e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:258. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- f <- main. - Called from PROJECT_FILE.i:310. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- f <- main. - Called from PROJECT_FILE.i:311. -[value] Done for function __gmpz_clear PROJECT_FILE.i:226:[value] Function f: postcondition got status valid. [value] Recording results for f [value] Done for function f -PROJECT_FILE.i:413:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:418. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:419. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:420. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:312:[value] Assertion got status unknown. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:421. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:313. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:422. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:423. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:427:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:431. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:432. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:315:[value] Assertion got status unknown. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:433. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:316. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:434. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:438:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:444. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:445. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:446. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:447. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:448. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:319:[value] Assertion got status unknown. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:449. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:320. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:450. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:451. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:452. -[value] Done for function __gmpz_clear [value] computing for function g <- main. - Called from PROJECT_FILE.i:456. -PROJECT_FILE.i:335:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- g <- main. - Called from PROJECT_FILE.i:340. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- g <- main. - Called from PROJECT_FILE.i:341. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- g <- main. - Called from PROJECT_FILE.i:342. -[value] Done for function __gmpz_cmp + Called from PROJECT_FILE.i:323. +PROJECT_FILE.i:280:[value] Assertion got status unknown. [value] computing for function e_acsl_assert <- g <- main. - Called from PROJECT_FILE.i:343. -[value] computing for function printf <- e_acsl_assert <- g <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- g <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:281. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- g <- main. - Called from PROJECT_FILE.i:345. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- g <- main. - Called from PROJECT_FILE.i:346. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:351:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- g <- main. - Called from PROJECT_FILE.i:357. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- g <- main. - Called from PROJECT_FILE.i:358. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- g <- main. - Called from PROJECT_FILE.i:359. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:285:[value] Assertion got status unknown. [value] computing for function e_acsl_assert <- g <- main. - Called from PROJECT_FILE.i:360. -[value] computing for function printf <- e_acsl_assert <- g <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- g <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:287. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- g <- main. - Called from PROJECT_FILE.i:362. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- g <- main. - Called from PROJECT_FILE.i:363. -[value] Done for function __gmpz_clear [value] Recording results for g [value] Done for function g -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:458. -[value] Done for function __gmpz_clear [value] Recording results for main [value] done for function main [value] ====== VALUES COMPUTED ====== @@ -351,17 +79,17 @@ PROJECT_FILE.i:351:[value] Assertion got status unknown. [value] Values at end of function f: A ∈ {3} e_acsl_1 ∈ {0} - e_acsl_5 ∈ {1} - e_acsl_9 ∈ {2} - e_acsl_13 ∈ {0} - e_acsl_14 ∈ {0} - e_acsl_18 ∈ {3} + e_acsl_2 ∈ {1} + e_acsl_3 ∈ {2} + e_acsl_4 ∈ {0} + e_acsl_5 ∈ {0} + e_acsl_6 ∈ {3} [value] Values at end of function g: A ∈ {4} e_acsl_1 ∈ {0} e_acsl_2 ∈ {2} - e_acsl_6 ∈ {0} - e_acsl_7 ∈ {2} + e_acsl_3 ∈ {0} + e_acsl_4 ∈ {2} x ∈ {1} t[0] ∈ {2} [1] ∈ {3} @@ -371,45 +99,10 @@ PROJECT_FILE.i:351:[value] Assertion got status unknown. x ∈ {1} t[0] ∈ {2} [1] ∈ {3} - e_acsl_4 ∈ {0} - e_acsl_11[0] ∈ [--..--] or UNINITIALIZED - e_acsl_14 ∈ {0} + e_acsl_1 ∈ {0} + e_acsl_2 ∈ {1} + e_acsl_3 ∈ {0} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z_orig); - ensures \valid(\old(z)); - assigns *z; */ -extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, - __mpz_struct const * /*[1]*/ z_orig); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -431,107 +124,47 @@ int A = 0; void f(void) { int e_acsl_1; + int e_acsl_2; + int e_acsl_3; + int e_acsl_4; int e_acsl_5; - int e_acsl_9; - int e_acsl_13; - int e_acsl_14; - int e_acsl_18; - e_acsl_13 = A; + int e_acsl_6; + e_acsl_4 = A; e_acsl_1 = A; A = 1; - F: e_acsl_14 = e_acsl_13; - e_acsl_5 = A; + F: e_acsl_5 = e_acsl_4; + e_acsl_2 = A; A = 2; /*@ assert \at(A,Pre) ≡ 0; */ ; - { - mpz_t e_acsl_2; - mpz_t e_acsl_3; - int e_acsl_4; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)e_acsl_1); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_3),(long)0); - e_acsl_4 = __gmpz_cmp((__mpz_struct const *)(e_acsl_2), - (__mpz_struct const *)(e_acsl_3)); - e_acsl_assert(! (e_acsl_4 == 0),(char *)"Assertion", - (char *)"(\\at(A,Pre) == 0)",12); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - __gmpz_clear((__mpz_struct *)(e_acsl_3)); - } - + e_acsl_assert(! (e_acsl_1 == 0),(char *)"Assertion", + (char *)"(\\at(A,Pre) == 0)",12); /*@ assert \at(A,F) ≡ 1; */ ; - { - mpz_t e_acsl_6; - mpz_t e_acsl_7; - int e_acsl_8; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_6),(long)e_acsl_5); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)1); - e_acsl_8 = __gmpz_cmp((__mpz_struct const *)(e_acsl_6), - (__mpz_struct const *)(e_acsl_7)); - e_acsl_assert(! (e_acsl_8 == 0),(char *)"Assertion", - (char *)"(\\at(A,F) == 1)",13); - __gmpz_clear((__mpz_struct *)(e_acsl_6)); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); - } - + e_acsl_assert(! (e_acsl_2 == 1),(char *)"Assertion", + (char *)"(\\at(A,F) == 1)",13); /*@ assert \at(A,Here) ≡ 2; */ ; - { - mpz_t e_acsl_10; - mpz_t e_acsl_11; - int e_acsl_12; - e_acsl_9 = A; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)e_acsl_9); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)2); - e_acsl_12 = __gmpz_cmp((__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_11)); - e_acsl_assert(! (e_acsl_12 == 0),(char *)"Assertion", - (char *)"(\\at(A,Here) == 2)",14); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - } - + e_acsl_3 = A; + e_acsl_assert(! (e_acsl_3 == 2),(char *)"Assertion", + (char *)"(\\at(A,Here) == 2)",14); /*@ assert \at(\at(A,Pre),F) ≡ 0; */ ; - { - mpz_t e_acsl_15; - mpz_t e_acsl_16; - int e_acsl_17; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)e_acsl_14); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)0); - e_acsl_17 = __gmpz_cmp((__mpz_struct const *)(e_acsl_15), - (__mpz_struct const *)(e_acsl_16)); - e_acsl_assert(! (e_acsl_17 == 0),(char *)"Assertion", - (char *)"(\\at(\\at(A,Pre),F) == 0)",15); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - } - + e_acsl_assert(! (e_acsl_5 == 0),(char *)"Assertion", + (char *)"(\\at(\\at(A,Pre),F) == 0)",15); A = 3; - { - mpz_t e_acsl_19; - mpz_t e_acsl_20; - int e_acsl_21; - e_acsl_18 = A; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)e_acsl_18); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)3); - e_acsl_21 = __gmpz_cmp((__mpz_struct const *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_20)); - e_acsl_assert(! (e_acsl_21 == 0),(char *)"Postcondition", - (char *)"(\\at(A,Post) == 3)",8); - __gmpz_clear((__mpz_struct *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_20)); - return; - } - + e_acsl_6 = A; + e_acsl_assert(! (e_acsl_6 == 3),(char *)"Postcondition", + (char *)"(\\at(A,Post) == 3)",8); + return; } void g(int *p, int *q) { int e_acsl_1; int e_acsl_2; - int e_acsl_6; - int e_acsl_7; + int e_acsl_3; + int e_acsl_4; *p = 0; *(p + 1) = 1; *q = 0; - L1: e_acsl_6 = *q; + L1: e_acsl_3 = *q; e_acsl_1 = *q; *p = 2; *(p + 1) = 3; @@ -539,37 +172,13 @@ void g(int *p, int *q) L2: e_acsl_2 = *(p + e_acsl_1); A = 4; /*@ assert \at(*(p+\at(*q,L1)),L2) ≡ 2; */ ; - { - mpz_t e_acsl_3; - mpz_t e_acsl_4; - int e_acsl_5; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_3),(long)e_acsl_2); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)2); - e_acsl_5 = __gmpz_cmp((__mpz_struct const *)(e_acsl_3), - (__mpz_struct const *)(e_acsl_4)); - e_acsl_assert(! (e_acsl_5 == 0),(char *)"Assertion", - (char *)"(\\at(*(p+\\at(*q,L1)),L2) == 2)",31); - __gmpz_clear((__mpz_struct *)(e_acsl_3)); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - } - + e_acsl_assert(! (e_acsl_2 == 2),(char *)"Assertion", + (char *)"(\\at(*(p+\\at(*q,L1)),L2) == 2)",31); L3: /*@ assert \at(*(p+\at(*q,L1)),Here) ≡ 2; */ ; - { - mpz_t e_acsl_8; - mpz_t e_acsl_9; - int e_acsl_10; - e_acsl_7 = *(p + e_acsl_6); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)e_acsl_7); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)2); - e_acsl_10 = __gmpz_cmp((__mpz_struct const *)(e_acsl_8), - (__mpz_struct const *)(e_acsl_9)); - e_acsl_assert(! (e_acsl_10 == 0),(char *)"Assertion", - (char *)"(\\at(*(p+\\at(*q,L1)),Here) == 2)",33); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - __gmpz_clear((__mpz_struct *)(e_acsl_9)); - } - + e_acsl_4 = *(p + e_acsl_3); + e_acsl_assert(! (e_acsl_4 == 2),(char *)"Assertion", + (char *)"(\\at(*(p+\\at(*q,L1)),Here) == 2)",33); return; } @@ -578,96 +187,29 @@ int main(void) int __retres; int x; int t[2]; - int e_acsl_4; - mpz_t e_acsl_11; - int e_acsl_14; + int e_acsl_1; + long long e_acsl_2; + int e_acsl_3; x = 0; - L: e_acsl_14 = x; - { - mpz_t e_acsl_8; - mpz_t e_acsl_9; - mpz_t e_acsl_10; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_10)); - __gmpz_add((__mpz_struct *)(e_acsl_10),(__mpz_struct const *)(e_acsl_8), - (__mpz_struct const *)(e_acsl_9)); - __gmpz_init_set((__mpz_struct *)(e_acsl_11), - (__mpz_struct const *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - __gmpz_clear((__mpz_struct *)(e_acsl_9)); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - } - - e_acsl_4 = x; + L: e_acsl_3 = x; + e_acsl_2 = (long long)x + (long long)1; + e_acsl_1 = x; /*@ assert x ≡ 0; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)0); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Assertion",(char *)"(x == 0)", - 44); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - + e_acsl_assert(! (x == 0),(char *)"Assertion",(char *)"(x == 0)",44); x = 1; x = 2; f(); /*@ assert \at(x,L) ≡ 0; */ ; - { - mpz_t e_acsl_5; - mpz_t e_acsl_6; - int e_acsl_7; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)e_acsl_4); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_6),(long)0); - e_acsl_7 = __gmpz_cmp((__mpz_struct const *)(e_acsl_5), - (__mpz_struct const *)(e_acsl_6)); - e_acsl_assert(! (e_acsl_7 == 0),(char *)"Assertion", - (char *)"(\\at(x,L) == 0)",49); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - __gmpz_clear((__mpz_struct *)(e_acsl_6)); - } - + e_acsl_assert(! (e_acsl_1 == 0),(char *)"Assertion", + (char *)"(\\at(x,L) == 0)",49); /*@ assert \at(x+1,L) ≡ 1; */ ; - { - mpz_t e_acsl_12; - int e_acsl_13; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_12),(long)1); - e_acsl_13 = __gmpz_cmp((__mpz_struct const *)(e_acsl_11), - (__mpz_struct const *)(e_acsl_12)); - e_acsl_assert(! (e_acsl_13 == 0),(char *)"Assertion", - (char *)"(\\at(x+1,L) == 1)",50); - __gmpz_clear((__mpz_struct *)(e_acsl_12)); - } - + e_acsl_assert(! (e_acsl_2 == (long long)1),(char *)"Assertion", + (char *)"(\\at(x+1,L) == 1)",50); /*@ assert \at(x,L)+1 ≡ 1; */ ; - { - mpz_t e_acsl_15; - mpz_t e_acsl_16; - mpz_t e_acsl_17; - int e_acsl_18; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)e_acsl_14); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_17)); - __gmpz_add((__mpz_struct *)(e_acsl_17),(__mpz_struct const *)(e_acsl_15), - (__mpz_struct const *)(e_acsl_16)); - e_acsl_18 = __gmpz_cmp((__mpz_struct const *)(e_acsl_17), - (__mpz_struct const *)(e_acsl_16)); - e_acsl_assert(! (e_acsl_18 == 0),(char *)"Assertion", - (char *)"(\\at(x,L)+1 == 1)",51); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - __gmpz_clear((__mpz_struct *)(e_acsl_17)); - } - + e_acsl_assert(! ((long long)e_acsl_3 + (long long)1 == (long long)1), + (char *)"Assertion",(char *)"(\\at(x,L)+1 == 1)",51); g(t,& x); __retres = 0; - __gmpz_clear((__mpz_struct *)(e_acsl_11)); return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/cast.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/cast.res.oracle index d3916d0eff2..bdf7d65fb54 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/cast.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/cast.res.oracle @@ -1,54 +1,37 @@ -tests/e-acsl-runtime/cast.i:17:[e-acsl] warning: missing guard for ensuring that the given integer is C-representable -tests/e-acsl-runtime/cast.i:18:[e-acsl] warning: missing guard for ensuring that the given integer is C-representable [value] Analyzing a complete application starting at main [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization PROJECT_FILE.i:232:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_str <- main. +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:233. +[value] Recording results for e_acsl_assert +[value] Done for function e_acsl_assert +PROJECT_FILE.i:235:[value] Assertion got status valid. +[value] computing for function e_acsl_assert <- main. Called from PROJECT_FILE.i:236. -PROJECT_FILE.i:86:[value] Function __gmpz_init_set_str: postcondition got status valid. -[value] Done for function __gmpz_init_set_str -[value] computing for function __gmpz_get_si <- main. - Called from PROJECT_FILE.i:237. -PROJECT_FILE.i:172:[value] Function __gmpz_get_si: precondition got status valid. -[value] Done for function __gmpz_get_si +[value] Recording results for e_acsl_assert +[value] Done for function e_acsl_assert +PROJECT_FILE.i:238:[value] Assertion got status valid. +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:239. +[value] Recording results for e_acsl_assert +[value] Done for function e_acsl_assert +PROJECT_FILE.i:241:[value] Assertion got status valid. +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:242. +[value] Recording results for e_acsl_assert +[value] Done for function e_acsl_assert +PROJECT_FILE.i:245:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:238. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. -[value] Done for function exit + Called from PROJECT_FILE.i:246. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:240. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:244:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_str <- main. - Called from PROJECT_FILE.i:248. -[value] Done for function __gmpz_init_set_str -[value] computing for function __gmpz_get_ui <- main. - Called from PROJECT_FILE.i:249. -PROJECT_FILE.i:176:[value] Function __gmpz_get_ui: precondition got status valid. -[value] Done for function __gmpz_get_ui +PROJECT_FILE.i:249:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. Called from PROJECT_FILE.i:250. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:252. -[value] Done for function __gmpz_clear [value] Recording results for main [value] done for function main [value] ====== VALUES COMPUTED ====== @@ -58,26 +41,6 @@ PROJECT_FILE.i:176:[value] Function __gmpz_get_ui: precondition got status valid x ∈ {0} y ∈ {0} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; -/*@ ensures \valid(\old(z)); - assigns *z; */ -extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, - int base); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z); - assigns \nothing; */ -extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); -/*@ requires \valid(z); - assigns \nothing; */ -extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -101,29 +64,25 @@ int main(void) int y; x = (long)0; y = 0; + /*@ assert (int)x ≡ y; */ ; + e_acsl_assert(! ((int)x == y),(char *)"Assertion",(char *)"((int)x == y)", + 10); + /*@ assert x ≡ (long)y; */ ; + e_acsl_assert(! (x == (long)y),(char *)"Assertion", + (char *)"(x == (long)y)",11); + /*@ assert y ≡ (int)0; */ ; + e_acsl_assert(! (y == 0),(char *)"Assertion",(char *)"(y == (int)0)",13); + /*@ assert (unsigned int)y ≡ (unsigned int)0; */ ; + e_acsl_assert(! ((unsigned int)y == (unsigned int)0),(char *)"Assertion", + (char *)"((unsigned int)y == (unsigned int)0)",14); /*@ assert y ≢ (int)0xfffffffffffffff; */ ; - { - mpz_t e_acsl_1; - int e_acsl_2; - __gmpz_init_set_str((__mpz_struct *)(e_acsl_1),"1152921504606846975",10); - e_acsl_2 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_1)); - e_acsl_assert(! (y != e_acsl_2),(char *)"Assertion", - (char *)"(y != (int)0xfffffffffffffff)",17); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - } - + e_acsl_assert(! (y != (int)0xfffffffffffffff),(char *)"Assertion", + (char *)"(y != (int)0xfffffffffffffff)",17); /*@ assert (unsigned int)y ≢ (unsigned int)0xfffffffffffffff; */ ; - { - mpz_t e_acsl_3; - unsigned int e_acsl_4; - __gmpz_init_set_str((__mpz_struct *)(e_acsl_3),"1152921504606846975",10); - e_acsl_4 = (unsigned int)__gmpz_get_ui((__mpz_struct const *)(e_acsl_3)); - e_acsl_assert(! ((unsigned int)y != e_acsl_4),(char *)"Assertion", - (char *)"((unsigned int)y != (unsigned int)0xfffffffffffffff)", - 18); - __gmpz_clear((__mpz_struct *)(e_acsl_3)); - } - + e_acsl_assert(! ((unsigned int)y != (unsigned int)0xfffffffffffffff), + (char *)"Assertion", + (char *)"((unsigned int)y != (unsigned int)0xfffffffffffffff)", + 18); __retres = 0; return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/comparison.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/comparison.res.oracle index 8b5e523c1ec..a1afa6a7997 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/comparison.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/comparison.res.oracle @@ -13,309 +13,85 @@ PROJECT_FILE.i:236:[value] Assertion got status valid. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert PROJECT_FILE.i:239:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:244. -PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:245. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:246. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:247. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. -[value] Done for function exit + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:248. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:253:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:260. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:242:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:261. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:243. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:262. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:263. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:268:[value] Assertion got status valid. +PROJECT_FILE.i:246:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:269. + Called from PROJECT_FILE.i:247. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -PROJECT_FILE.i:271:[value] Assertion got status unknown. +PROJECT_FILE.i:249:[value] Assertion got status unknown. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:272. + Called from PROJECT_FILE.i:250. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -PROJECT_FILE.i:274:[value] Assertion got status valid. +PROJECT_FILE.i:252:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:275. + Called from PROJECT_FILE.i:253. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -PROJECT_FILE.i:277:[value] Assertion got status valid. +PROJECT_FILE.i:255:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:278. + Called from PROJECT_FILE.i:256. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -PROJECT_FILE.i:280:[value] Assertion got status valid. +PROJECT_FILE.i:258:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:281. + Called from PROJECT_FILE.i:259. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -PROJECT_FILE.i:283:[value] Assertion got status valid. +PROJECT_FILE.i:261:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:284. + Called from PROJECT_FILE.i:262. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -PROJECT_FILE.i:286:[value] Assertion got status valid. +PROJECT_FILE.i:264:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:287. + Called from PROJECT_FILE.i:265. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -PROJECT_FILE.i:289:[value] Assertion got status valid. +PROJECT_FILE.i:267:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:290. + Called from PROJECT_FILE.i:268. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -PROJECT_FILE.i:292:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:298. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:299. -PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:300. -PROJECT_FILE.i:133:[value] Function __gmpz_neg: precondition got status valid. -PROJECT_FILE.i:134:[value] Function __gmpz_neg: precondition got status valid. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:301. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:302. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:270:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:303. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:271. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:304. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:305. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:306. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:310:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:316. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:317. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:318. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:319. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:320. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:273:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:321. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:274. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:322. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:323. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:324. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:328:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:334. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:335. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:336. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:337. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:338. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:276:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:339. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:277. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:340. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:341. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:342. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:346:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:352. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:353. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:354. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:355. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:356. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:279:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:357. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:280. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:358. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:359. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:360. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:364:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:369. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:370. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:371. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:372. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:282:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:373. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:283. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:374. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:375. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:379:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:385. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:386. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:387. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_neg <- main. - Called from PROJECT_FILE.i:388. -[value] Done for function __gmpz_neg -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:389. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:285:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:390. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:286. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:391. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:392. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:393. -[value] Done for function __gmpz_clear [value] Recording results for main [value] done for function main [value] ====== VALUES COMPUTED ====== @@ -326,33 +102,6 @@ PROJECT_FILE.i:379:[value] Assertion got status valid. y ∈ {1} s ∈ {{ &"toto" }} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - assigns *z1; */ -extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -382,35 +131,9 @@ int main(void) /*@ assert y > x; */ ; e_acsl_assert(! (y > x),(char *)"Assertion",(char *)"(y > x)",9); /*@ assert x ≤ 0; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)0); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 <= 0),(char *)"Assertion",(char *)"(x <= 0)", - 10); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - + e_acsl_assert(! (x <= 0),(char *)"Assertion",(char *)"(x <= 0)",10); /*@ assert y ≥ 1; */ ; - { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)1); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 >= 0),(char *)"Assertion",(char *)"(y >= 1)", - 11); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - + e_acsl_assert(! (y >= 1),(char *)"Assertion",(char *)"(y >= 1)",11); s = (char *)"toto"; /*@ assert s ≡ s; */ ; e_acsl_assert(! (s == s),(char *)"Assertion",(char *)"(s == s)",13); @@ -431,116 +154,18 @@ int main(void) /*@ assert 1 ≢ 2; */ ; e_acsl_assert(! (1 != 2),(char *)"Assertion",(char *)"(1 != 2)",20); /*@ assert -5 < 18; */ ; - { - mpz_t e_acsl_7; - mpz_t e_acsl_8; - mpz_t e_acsl_9; - int e_acsl_10; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)5); - __gmpz_init((__mpz_struct *)(e_acsl_8)); - __gmpz_neg((__mpz_struct *)(e_acsl_8),(__mpz_struct const *)(e_acsl_7)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)18); - e_acsl_10 = __gmpz_cmp((__mpz_struct const *)(e_acsl_8), - (__mpz_struct const *)(e_acsl_9)); - e_acsl_assert(! (e_acsl_10 < 0),(char *)"Assertion",(char *)"(-5 < 18)", - 22); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - __gmpz_clear((__mpz_struct *)(e_acsl_9)); - } - + e_acsl_assert(! (-5 < 18),(char *)"Assertion",(char *)"(-5 < 18)",22); /*@ assert 32 > -3; */ ; - { - mpz_t e_acsl_11; - mpz_t e_acsl_12; - mpz_t e_acsl_13; - int e_acsl_14; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)32); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_12),(long)3); - __gmpz_init((__mpz_struct *)(e_acsl_13)); - __gmpz_neg((__mpz_struct *)(e_acsl_13),(__mpz_struct const *)(e_acsl_12)); - e_acsl_14 = __gmpz_cmp((__mpz_struct const *)(e_acsl_11), - (__mpz_struct const *)(e_acsl_13)); - e_acsl_assert(! (e_acsl_14 > 0),(char *)"Assertion",(char *)"(32 > -3)", - 23); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - __gmpz_clear((__mpz_struct *)(e_acsl_12)); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); - } - + e_acsl_assert(! (32 > -3),(char *)"Assertion",(char *)"(32 > -3)",23); /*@ assert -12 ≤ 13; */ ; - { - mpz_t e_acsl_15; - mpz_t e_acsl_16; - mpz_t e_acsl_17; - int e_acsl_18; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)12); - __gmpz_init((__mpz_struct *)(e_acsl_16)); - __gmpz_neg((__mpz_struct *)(e_acsl_16),(__mpz_struct const *)(e_acsl_15)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)13); - e_acsl_18 = __gmpz_cmp((__mpz_struct const *)(e_acsl_16), - (__mpz_struct const *)(e_acsl_17)); - e_acsl_assert(! (e_acsl_18 <= 0),(char *)"Assertion", - (char *)"(-12 <= 13)",24); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - __gmpz_clear((__mpz_struct *)(e_acsl_17)); - } - + e_acsl_assert(! (-12 <= 13),(char *)"Assertion",(char *)"(-12 <= 13)",24); /*@ assert 123 ≥ -12; */ ; - { - mpz_t e_acsl_19; - mpz_t e_acsl_20; - mpz_t e_acsl_21; - int e_acsl_22; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)123); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)12); - __gmpz_init((__mpz_struct *)(e_acsl_21)); - __gmpz_neg((__mpz_struct *)(e_acsl_21),(__mpz_struct const *)(e_acsl_20)); - e_acsl_22 = __gmpz_cmp((__mpz_struct const *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_21)); - e_acsl_assert(! (e_acsl_22 >= 0),(char *)"Assertion", - (char *)"(123 >= -12)",25); - __gmpz_clear((__mpz_struct *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_20)); - __gmpz_clear((__mpz_struct *)(e_acsl_21)); - } - + e_acsl_assert(! (123 >= -12),(char *)"Assertion",(char *)"(123 >= -12)",25); /*@ assert -0xff ≡ -0xff; */ ; - { - mpz_t e_acsl_23; - mpz_t e_acsl_24; - int e_acsl_25; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_23),(long)0xff); - __gmpz_init((__mpz_struct *)(e_acsl_24)); - __gmpz_neg((__mpz_struct *)(e_acsl_24),(__mpz_struct const *)(e_acsl_23)); - e_acsl_25 = __gmpz_cmp((__mpz_struct const *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_24)); - e_acsl_assert(! (e_acsl_25 == 0),(char *)"Assertion", - (char *)"(-0xff == -0xff)",26); - __gmpz_clear((__mpz_struct *)(e_acsl_23)); - __gmpz_clear((__mpz_struct *)(e_acsl_24)); - } - + e_acsl_assert(! (-0xff == -0xff),(char *)"Assertion", + (char *)"(-0xff == -0xff)",26); /*@ assert 1 ≢ -2; */ ; - { - mpz_t e_acsl_26; - mpz_t e_acsl_27; - mpz_t e_acsl_28; - int e_acsl_29; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)1); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_28)); - __gmpz_neg((__mpz_struct *)(e_acsl_28),(__mpz_struct const *)(e_acsl_27)); - e_acsl_29 = __gmpz_cmp((__mpz_struct const *)(e_acsl_26), - (__mpz_struct const *)(e_acsl_28)); - e_acsl_assert(! (e_acsl_29 != 0),(char *)"Assertion",(char *)"(1 != -2)", - 27); - __gmpz_clear((__mpz_struct *)(e_acsl_26)); - __gmpz_clear((__mpz_struct *)(e_acsl_27)); - __gmpz_clear((__mpz_struct *)(e_acsl_28)); - } - + e_acsl_assert(! (1 != -2),(char *)"Assertion",(char *)"(1 != -2)",27); __retres = 0; return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.res.oracle index d18b31cbb52..02eb0be12f3 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/function_contract.res.oracle @@ -5,707 +5,130 @@ X ∈ {0} Y ∈ {2} [value] computing for function f <- main. - Called from PROJECT_FILE.i:681. -[value] computing for function __gmpz_init_set_si <- f <- main. - Called from PROJECT_FILE.i:235. -PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- f <- main. - Called from PROJECT_FILE.i:236. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- f <- main. - Called from PROJECT_FILE.i:237. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp + Called from PROJECT_FILE.i:394. [value] computing for function e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:238. -[value] computing for function printf <- e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:221. -PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. -[value] Done for function exit + Called from PROJECT_FILE.i:231. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- f <- main. - Called from PROJECT_FILE.i:239. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- f <- main. - Called from PROJECT_FILE.i:240. -[value] Done for function __gmpz_clear PROJECT_FILE.i:227:[value] Function f: postcondition got status valid. [value] Recording results for f [value] Done for function f [value] computing for function g <- main. - Called from PROJECT_FILE.i:682. -[value] computing for function __gmpz_init_set_si <- g <- main. - Called from PROJECT_FILE.i:257. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- g <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- g <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_cmp + Called from PROJECT_FILE.i:395. [value] computing for function e_acsl_assert <- g <- main. - Called from PROJECT_FILE.i:260. -[value] computing for function printf <- e_acsl_assert <- g <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- g <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- g <- main. - Called from PROJECT_FILE.i:261. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- g <- main. - Called from PROJECT_FILE.i:262. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- g <- main. - Called from PROJECT_FILE.i:263. -[value] computing for function printf <- e_acsl_assert <- g <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- g <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:241. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- g <- main. - Called from PROJECT_FILE.i:264. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- g <- main. - Called from PROJECT_FILE.i:265. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- g <- main. - Called from PROJECT_FILE.i:266. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:246:[value] Function g: postcondition got status valid. -PROJECT_FILE.i:247:[value] Function g: postcondition got status valid. +PROJECT_FILE.i:235:[value] Function g: postcondition got status valid. +PROJECT_FILE.i:236:[value] Function g: postcondition got status valid. [value] Recording results for g [value] Done for function g [value] computing for function h <- main. - Called from PROJECT_FILE.i:683. -PROJECT_FILE.i:272:[value] Function h: precondition got status valid. -[value] computing for function __gmpz_init_set_si <- h <- main. - Called from PROJECT_FILE.i:279. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- h <- main. - Called from PROJECT_FILE.i:280. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- h <- main. - Called from PROJECT_FILE.i:281. -[value] Done for function __gmpz_cmp + Called from PROJECT_FILE.i:396. +PROJECT_FILE.i:245:[value] Function h: precondition got status valid. [value] computing for function e_acsl_assert <- h <- main. - Called from PROJECT_FILE.i:282. -[value] computing for function printf <- e_acsl_assert <- h <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- h <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:248. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- h <- main. - Called from PROJECT_FILE.i:283. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- h <- main. - Called from PROJECT_FILE.i:284. -[value] Done for function __gmpz_clear [value] Recording results for h [value] Done for function h [value] computing for function i <- main. - Called from PROJECT_FILE.i:684. -PROJECT_FILE.i:291:[value] Function i: precondition got status valid. -PROJECT_FILE.i:292:[value] Function i: precondition got status valid. -[value] computing for function __gmpz_init_set_si <- i <- main. - Called from PROJECT_FILE.i:302. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- i <- main. - Called from PROJECT_FILE.i:303. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- i <- main. - Called from PROJECT_FILE.i:304. -[value] Done for function __gmpz_cmp + Called from PROJECT_FILE.i:397. +PROJECT_FILE.i:253:[value] Function i: precondition got status valid. +PROJECT_FILE.i:254:[value] Function i: precondition got status valid. [value] computing for function e_acsl_assert <- i <- main. - Called from PROJECT_FILE.i:305. -[value] computing for function printf <- e_acsl_assert <- i <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- i <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:257. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- i <- main. - Called from PROJECT_FILE.i:306. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- i <- main. - Called from PROJECT_FILE.i:307. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- i <- main. - Called from PROJECT_FILE.i:308. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- i <- main. - Called from PROJECT_FILE.i:309. -[value] computing for function printf <- e_acsl_assert <- i <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- i <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:258. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- i <- main. - Called from PROJECT_FILE.i:310. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- i <- main. - Called from PROJECT_FILE.i:311. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- i <- main. - Called from PROJECT_FILE.i:312. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- i <- main. - Called from PROJECT_FILE.i:313. -[value] Done for function __gmpz_clear [value] Recording results for i [value] Done for function i [value] computing for function j <- main. - Called from PROJECT_FILE.i:685. -PROJECT_FILE.i:321:[value] Function j, behavior b1: precondition got status valid. -PROJECT_FILE.i:325:[value] Function j, behavior b2: precondition got status valid. -PROJECT_FILE.i:326:[value] Function j, behavior b2: precondition got status valid. -[value] computing for function __gmpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:343. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:344. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- j <- main. - Called from PROJECT_FILE.i:345. -[value] Done for function __gmpz_cmp + Called from PROJECT_FILE.i:398. +PROJECT_FILE.i:264:[value] Function j, behavior b1: precondition got status valid. +PROJECT_FILE.i:268:[value] Function j, behavior b2: precondition got status valid. +PROJECT_FILE.i:269:[value] Function j, behavior b2: precondition got status valid. [value] computing for function e_acsl_assert <- j <- main. - Called from PROJECT_FILE.i:346. -[value] computing for function printf <- e_acsl_assert <- j <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- j <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:276. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:347. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:348. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- j <- main. - Called from PROJECT_FILE.i:349. -PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- j <- main. - Called from PROJECT_FILE.i:350. -PROJECT_FILE.i:138:[value] Function __gmpz_add: precondition got status valid. -PROJECT_FILE.i:139:[value] Function __gmpz_add: precondition got status valid. -PROJECT_FILE.i:140:[value] Function __gmpz_add: precondition got status valid. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_cmp <- j <- main. - Called from PROJECT_FILE.i:351. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- j <- main. - Called from PROJECT_FILE.i:352. -[value] computing for function printf <- e_acsl_assert <- j <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- j <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:277. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:353. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- j <- main. - Called from PROJECT_FILE.i:354. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- j <- main. - Called from PROJECT_FILE.i:355. -[value] computing for function printf <- e_acsl_assert <- j <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- j <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:279. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- j <- main. - Called from PROJECT_FILE.i:356. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- j <- main. - Called from PROJECT_FILE.i:357. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- j <- main. - Called from PROJECT_FILE.i:358. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- j <- main. - Called from PROJECT_FILE.i:359. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- j <- main. - Called from PROJECT_FILE.i:360. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- j <- main. - Called from PROJECT_FILE.i:361. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:373. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:374. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- j <- main. - Called from PROJECT_FILE.i:375. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- j <- main. - Called from PROJECT_FILE.i:376. -[value] computing for function printf <- e_acsl_assert <- j <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- j <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:281. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:377. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:378. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- j <- main. - Called from PROJECT_FILE.i:379. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- j <- main. - Called from PROJECT_FILE.i:380. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_cmp <- j <- main. - Called from PROJECT_FILE.i:381. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- j <- main. - Called from PROJECT_FILE.i:382. -[value] computing for function printf <- e_acsl_assert <- j <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- j <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:282. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- j <- main. - Called from PROJECT_FILE.i:383. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- j <- main. - Called from PROJECT_FILE.i:384. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- j <- main. - Called from PROJECT_FILE.i:385. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- j <- main. - Called from PROJECT_FILE.i:386. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- j <- main. - Called from PROJECT_FILE.i:387. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:322:[value] Function j, behavior b1: postcondition got status valid. -PROJECT_FILE.i:327:[value] Function j, behavior b2: postcondition got status valid. +PROJECT_FILE.i:265:[value] Function j, behavior b1: postcondition got status valid. +PROJECT_FILE.i:270:[value] Function j, behavior b2: postcondition got status valid. [value] Recording results for j [value] Done for function j [value] computing for function k <- main. - Called from PROJECT_FILE.i:686. -PROJECT_FILE.i:395:[value] Function k, behavior b1: assumption got status invalid; precondition not evaluated. -PROJECT_FILE.i:400:[value] Function k, behavior b2: precondition got status valid. -PROJECT_FILE.i:401:[value] Function k, behavior b2: precondition got status valid. -[value] computing for function __gmpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:419. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:420. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- k <- main. - Called from PROJECT_FILE.i:421. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:427. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:428. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- k <- main. - Called from PROJECT_FILE.i:429. -[value] Done for function __gmpz_cmp -PROJECT_FILE.i:430:[value] assigning non deterministic value for the first time -[value] computing for function __gmpz_clear <- k <- main. - Called from PROJECT_FILE.i:431. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- k <- main. - Called from PROJECT_FILE.i:432. -[value] Done for function __gmpz_clear + Called from PROJECT_FILE.i:399. +PROJECT_FILE.i:289:[value] Function k, behavior b1: assumption got status invalid; precondition not evaluated. +PROJECT_FILE.i:294:[value] Function k, behavior b2: precondition got status valid. +PROJECT_FILE.i:295:[value] Function k, behavior b2: precondition got status valid. [value] computing for function e_acsl_assert <- k <- main. - Called from PROJECT_FILE.i:434. -[value] computing for function printf <- e_acsl_assert <- k <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- k <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:309. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:435. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- k <- main. - Called from PROJECT_FILE.i:436. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:441. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:442. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- k <- main. - Called from PROJECT_FILE.i:443. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- k <- main. - Called from PROJECT_FILE.i:445. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- k <- main. - Called from PROJECT_FILE.i:446. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:454. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:455. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- k <- main. - Called from PROJECT_FILE.i:456. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- k <- main. - Called from PROJECT_FILE.i:458. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- k <- main. - Called from PROJECT_FILE.i:459. -[value] Done for function __gmpz_clear [value] computing for function e_acsl_assert <- k <- main. - Called from PROJECT_FILE.i:461. -[value] computing for function printf <- e_acsl_assert <- k <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- k <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:314. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- k <- main. - Called from PROJECT_FILE.i:463. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:468. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:469. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- k <- main. - Called from PROJECT_FILE.i:470. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- k <- main. - Called from PROJECT_FILE.i:472. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- k <- main. - Called from PROJECT_FILE.i:473. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:483. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:484. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- k <- main. - Called from PROJECT_FILE.i:485. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- k <- main. - Called from PROJECT_FILE.i:486. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:487. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- k <- main. - Called from PROJECT_FILE.i:488. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- k <- main. - Called from PROJECT_FILE.i:490. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- k <- main. - Called from PROJECT_FILE.i:491. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- k <- main. - Called from PROJECT_FILE.i:492. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- k <- main. - Called from PROJECT_FILE.i:493. -[value] Done for function __gmpz_clear [value] computing for function e_acsl_assert <- k <- main. - Called from PROJECT_FILE.i:495. -[value] computing for function printf <- e_acsl_assert <- k <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- k <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:320. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- k <- main. - Called from PROJECT_FILE.i:497. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- k <- main. - Called from PROJECT_FILE.i:498. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- k <- main. - Called from PROJECT_FILE.i:499. -[value] Done for function __gmpz_clear [value] Recording results for k [value] Done for function k [value] computing for function l <- main. - Called from PROJECT_FILE.i:687. -PROJECT_FILE.i:509:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- l <- main. - Called from PROJECT_FILE.i:514. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- l <- main. - Called from PROJECT_FILE.i:515. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- l <- main. - Called from PROJECT_FILE.i:516. -[value] Done for function __gmpz_cmp + Called from PROJECT_FILE.i:400. +PROJECT_FILE.i:331:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- l <- main. - Called from PROJECT_FILE.i:517. -[value] computing for function printf <- e_acsl_assert <- l <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- l <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:332. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- l <- main. - Called from PROJECT_FILE.i:518. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- l <- main. - Called from PROJECT_FILE.i:519. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- l <- main. - Called from PROJECT_FILE.i:527. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- l <- main. - Called from PROJECT_FILE.i:528. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- l <- main. - Called from PROJECT_FILE.i:529. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- l <- main. - Called from PROJECT_FILE.i:530. -[value] computing for function printf <- e_acsl_assert <- l <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- l <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:334. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- l <- main. - Called from PROJECT_FILE.i:531. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- l <- main. - Called from PROJECT_FILE.i:532. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:506:[value] Function l: postcondition got status valid. +PROJECT_FILE.i:328:[value] Function l: postcondition got status valid. [value] Recording results for l [value] Done for function l [value] computing for function m <- main. - Called from PROJECT_FILE.i:688. -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:562. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:563. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- m <- main. - Called from PROJECT_FILE.i:564. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:569. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:570. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- m <- main. - Called from PROJECT_FILE.i:571. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:573. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:574. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:578. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:579. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:587. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:588. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- m <- main. - Called from PROJECT_FILE.i:589. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:594. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:595. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- m <- main. - Called from PROJECT_FILE.i:596. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:598. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:599. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:603. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:604. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:611. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:612. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- m <- main. - Called from PROJECT_FILE.i:613. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:615. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:616. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:629. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:630. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- m <- main. - Called from PROJECT_FILE.i:631. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:633. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:634. -[value] Done for function __gmpz_clear + Called from PROJECT_FILE.i:401. [value] computing for function e_acsl_assert <- m <- main. - Called from PROJECT_FILE.i:636. -[value] computing for function printf <- e_acsl_assert <- m <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- m <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:376. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:643. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:644. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- m <- main. - Called from PROJECT_FILE.i:645. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:647. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:648. -[value] Done for function __gmpz_clear [value] computing for function e_acsl_assert <- m <- main. - Called from PROJECT_FILE.i:650. -[value] computing for function printf <- e_acsl_assert <- m <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- m <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:380. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:659. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:660. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- m <- main. - Called from PROJECT_FILE.i:661. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- m <- main. - Called from PROJECT_FILE.i:662. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- m <- main. - Called from PROJECT_FILE.i:663. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_cmp <- m <- main. - Called from PROJECT_FILE.i:664. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:666. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:667. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:668. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- m <- main. - Called from PROJECT_FILE.i:669. -[value] Done for function __gmpz_clear [value] computing for function e_acsl_assert <- m <- main. - Called from PROJECT_FILE.i:671. -[value] computing for function printf <- e_acsl_assert <- m <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- m <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:384. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -PROJECT_FILE.i:540:[value] Function m, behavior b1: assumes got status invalid; post-condition not evaluated. -PROJECT_FILE.i:545:[value] Function m, behavior b2: postcondition got status valid. -PROJECT_FILE.i:546:[value] Function m, behavior b2: postcondition got status valid. +PROJECT_FILE.i:340:[value] Function m, behavior b1: assumes got status invalid; post-condition not evaluated. +PROJECT_FILE.i:345:[value] Function m, behavior b2: postcondition got status valid. +PROJECT_FILE.i:346:[value] Function m, behavior b2: postcondition got status valid. [value] Recording results for m [value] Done for function m [value] Recording results for main @@ -727,44 +150,14 @@ PROJECT_FILE.i:546:[value] Function m, behavior b2: postcondition got status val [value] Values at end of function l: [value] Values at end of function m: X ∈ {7} - e_acsl_4 ∈ {0; 1} - e_acsl_16 ∈ {0; 1} - e_acsl_28 ∈ {0; 1} - e_acsl_30 ∈ {5} + e_acsl_1 ∈ {0} + e_acsl_4 ∈ {1} + e_acsl_7 ∈ {1} + e_acsl_8 ∈ {5} [value] Values at end of function main: X ∈ {7} __retres ∈ {0} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -787,21 +180,8 @@ int Y = 2; void f(void) { X = 1; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)1); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Postcondition", - (char *)"(X == 1)",9); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - return; - } - + e_acsl_assert(! (X == 1),(char *)"Postcondition",(char *)"(X == 1)",9); + return; } /*@ ensures X ≡ 2; @@ -809,49 +189,16 @@ void f(void) void g(void) { X = 2; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - mpz_t e_acsl_4; - int e_acsl_5; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)2); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Postcondition", - (char *)"(X == 2)",13); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)Y); - e_acsl_5 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_5 == 0),(char *)"Postcondition", - (char *)"(Y == 2)",14); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - return; - } - + e_acsl_assert(! (X == 2),(char *)"Postcondition",(char *)"(X == 2)",13); + e_acsl_assert(! (Y == 2),(char *)"Postcondition",(char *)"(Y == 2)",14); + return; } /*@ requires X ≡ 2; */ void h(void) { - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)2); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Precondition", - (char *)"(X == 2)",18); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - X ++; - } - + e_acsl_assert(! (X == 2),(char *)"Precondition",(char *)"(X == 2)",18); + X ++; return; } @@ -859,32 +206,9 @@ void h(void) requires Y ≡ 2; */ void i(void) { - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)3); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Precondition", - (char *)"(X == 3)",22); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)2); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 == 0),(char *)"Precondition", - (char *)"(Y == 2)",23); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - X += Y; - } - + e_acsl_assert(! (X == 3),(char *)"Precondition",(char *)"(X == 3)",22); + e_acsl_assert(! (Y == 2),(char *)"Precondition",(char *)"(Y == 2)",23); + X += Y; return; } @@ -901,76 +225,15 @@ void i(void) */ void j(void) { - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - mpz_t e_acsl_4; - mpz_t e_acsl_5; - mpz_t e_acsl_6; - int e_acsl_7; - mpz_t e_acsl_8; - int e_acsl_9; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)5); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Precondition", - (char *)"(X == 5)",28); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)3); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)Y); - __gmpz_init((__mpz_struct *)(e_acsl_6)); - __gmpz_add((__mpz_struct *)(e_acsl_6),(__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_7 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_6)); - e_acsl_assert(! (e_acsl_7 == 0),(char *)"Precondition", - (char *)"(X == 3+Y)",31); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)2); - e_acsl_9 = __gmpz_cmp((__mpz_struct const *)(e_acsl_5), - (__mpz_struct const *)(e_acsl_8)); - e_acsl_assert(! (e_acsl_9 == 0),(char *)"Precondition", - (char *)"(Y == 2)",32); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - __gmpz_clear((__mpz_struct *)(e_acsl_6)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - X = 3; - } - - { - mpz_t e_acsl_10; - mpz_t e_acsl_11; - int e_acsl_12; - mpz_t e_acsl_13; - mpz_t e_acsl_14; - mpz_t e_acsl_15; - int e_acsl_16; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)3); - e_acsl_12 = __gmpz_cmp((__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_11)); - e_acsl_assert(! (e_acsl_12 == 0),(char *)"Postcondition", - (char *)"(X == 3)",29); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_14),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_15)); - __gmpz_add((__mpz_struct *)(e_acsl_15),(__mpz_struct const *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_14)); - e_acsl_16 = __gmpz_cmp((__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_15)); - e_acsl_assert(! (e_acsl_16 == 0),(char *)"Postcondition", - (char *)"(X == Y+1)",33); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); - __gmpz_clear((__mpz_struct *)(e_acsl_14)); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - return; - } - + e_acsl_assert(! (X == 5),(char *)"Precondition",(char *)"(X == 5)",28); + e_acsl_assert(! ((long long)X == (long long)3 + (long long)Y), + (char *)"Precondition",(char *)"(X == 3+Y)",31); + e_acsl_assert(! (Y == 2),(char *)"Precondition",(char *)"(Y == 2)",32); + X = 3; + e_acsl_assert(! (X == 3),(char *)"Postcondition",(char *)"(X == 3)",29); + e_acsl_assert(! ((long long)X == (long long)Y + (long long)1), + (char *)"Postcondition",(char *)"(X == Y+1)",33); + return; } /*@ behavior b1: @@ -988,109 +251,27 @@ void j(void) void k(void) { { - mpz_t e_acsl_1; - mpz_t e_acsl_2; + int e_acsl_1; + int e_acsl_2; int e_acsl_3; - int e_acsl_7; - mpz_t e_acsl_8; - int e_acsl_9; - int e_acsl_13; - int e_acsl_17; - int e_acsl_18; - int e_acsl_22; - int e_acsl_28; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)1); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - if (! (e_acsl_3 == 0)) { e_acsl_7 = 1; } - else { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)0); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_7 = e_acsl_6 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - e_acsl_assert(! e_acsl_7,(char *)"Precondition", + int e_acsl_4; + int e_acsl_5; + if (! (X == 1)) { e_acsl_1 = 1; } + else { e_acsl_1 = X == 0; } + e_acsl_assert(! e_acsl_1,(char *)"Precondition", (char *)"(X == 1 ==> X == 0)",39); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)3); - e_acsl_9 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_8)); - if (e_acsl_9 == 0) { - mpz_t e_acsl_10; - mpz_t e_acsl_11; - int e_acsl_12; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)2); - e_acsl_12 = __gmpz_cmp((__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_11)); - e_acsl_13 = e_acsl_12 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - } - else { e_acsl_13 = 0; } - if (! e_acsl_13) { e_acsl_17 = 1; } - else { - mpz_t e_acsl_14; - mpz_t e_acsl_15; - int e_acsl_16; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_14),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)3); - e_acsl_16 = __gmpz_cmp((__mpz_struct const *)(e_acsl_14), - (__mpz_struct const *)(e_acsl_15)); - e_acsl_17 = e_acsl_16 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_14)); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - } - e_acsl_assert(! e_acsl_17,(char *)"Precondition", + if (X == 3) { e_acsl_2 = Y == 2; } + else { e_acsl_2 = 0; } + if (! e_acsl_2) { e_acsl_3 = 1; } + else { e_acsl_3 = X == 3; } + e_acsl_assert(! e_acsl_3,(char *)"Precondition", (char *)"(X == 3 && Y == 2 ==> X == 3)",43); - e_acsl_18 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_8)); - if (e_acsl_18 == 0) { - mpz_t e_acsl_19; - mpz_t e_acsl_20; - int e_acsl_21; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)2); - e_acsl_21 = __gmpz_cmp((__mpz_struct const *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_20)); - e_acsl_22 = e_acsl_21 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_20)); - } - else { e_acsl_22 = 0; } - if (! e_acsl_22) { e_acsl_28 = 1; } - else { - mpz_t e_acsl_23; - mpz_t e_acsl_24; - mpz_t e_acsl_25; - mpz_t e_acsl_26; - int e_acsl_27; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_23),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_24),(long)Y); - __gmpz_init((__mpz_struct *)(e_acsl_25)); - __gmpz_add((__mpz_struct *)(e_acsl_25), - (__mpz_struct const *)(e_acsl_23), - (__mpz_struct const *)(e_acsl_24)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)5); - e_acsl_27 = __gmpz_cmp((__mpz_struct const *)(e_acsl_25), - (__mpz_struct const *)(e_acsl_26)); - e_acsl_28 = e_acsl_27 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_23)); - __gmpz_clear((__mpz_struct *)(e_acsl_24)); - __gmpz_clear((__mpz_struct *)(e_acsl_25)); - __gmpz_clear((__mpz_struct *)(e_acsl_26)); - } - e_acsl_assert(! e_acsl_28,(char *)"Precondition", + if (X == 3) { e_acsl_4 = Y == 2; } + else { e_acsl_4 = 0; } + if (! e_acsl_4) { e_acsl_5 = 1; } + else { e_acsl_5 = (long long)X + (long long)Y == (long long)5; } + e_acsl_assert(! e_acsl_5,(char *)"Precondition", (char *)"(X == 3 && Y == 2 ==> X+Y == 5)",44); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); X += Y; } @@ -1101,35 +282,9 @@ void k(void) int l(void) { /*@ assert Y ≡ 2; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)2); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Assertion",(char *)"(Y == 2)", - 50); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - - { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)5); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 == 0),(char *)"Postcondition", - (char *)"(X == 5)",48); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - return (X); - } - + e_acsl_assert(! (Y == 2),(char *)"Assertion",(char *)"(Y == 2)",50); + e_acsl_assert(! (X == 5),(char *)"Postcondition",(char *)"(X == 5)",48); + return (X); } /*@ behavior b1: @@ -1146,136 +301,39 @@ int l(void) */ void m(void) { + int e_acsl_1; int e_acsl_4; - int e_acsl_16; - int e_acsl_28; - int e_acsl_30; - e_acsl_30 = X; - { - mpz_t e_acsl_21; - mpz_t e_acsl_22; - int e_acsl_23; - int e_acsl_27; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_21),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_22),(long)5); - e_acsl_23 = __gmpz_cmp((__mpz_struct const *)(e_acsl_21), - (__mpz_struct const *)(e_acsl_22)); - if (e_acsl_23 == 0) { - mpz_t e_acsl_24; - mpz_t e_acsl_25; - int e_acsl_26; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_24),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_25),(long)2); - e_acsl_26 = __gmpz_cmp((__mpz_struct const *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_25)); - e_acsl_27 = e_acsl_26 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_24)); - __gmpz_clear((__mpz_struct *)(e_acsl_25)); - } - else { e_acsl_27 = 0; } - e_acsl_28 = e_acsl_27; - __gmpz_clear((__mpz_struct *)(e_acsl_21)); - __gmpz_clear((__mpz_struct *)(e_acsl_22)); + int e_acsl_7; + int e_acsl_8; + e_acsl_8 = X; + { int e_acsl_6; + if (X == 5) { e_acsl_6 = Y == 2; } + else { e_acsl_6 = 0; } + e_acsl_7 = e_acsl_6; } - { - mpz_t e_acsl_9; - mpz_t e_acsl_10; - int e_acsl_11; - int e_acsl_15; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)5); - e_acsl_11 = __gmpz_cmp((__mpz_struct const *)(e_acsl_9), - (__mpz_struct const *)(e_acsl_10)); - if (e_acsl_11 == 0) { - mpz_t e_acsl_12; - mpz_t e_acsl_13; - int e_acsl_14; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_12),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)2); - e_acsl_14 = __gmpz_cmp((__mpz_struct const *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_13)); - e_acsl_15 = e_acsl_14 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_12)); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); - } - else { e_acsl_15 = 0; } - e_acsl_16 = e_acsl_15; - __gmpz_clear((__mpz_struct *)(e_acsl_9)); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - } - - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)7); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_4 = e_acsl_3 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); + { int e_acsl_3; + if (X == 5) { e_acsl_3 = Y == 2; } + else { e_acsl_3 = 0; } + e_acsl_4 = e_acsl_3; } + e_acsl_1 = X == 7; X += Y; - { - int e_acsl_8; - int e_acsl_20; - int e_acsl_35; - if (! e_acsl_4) { e_acsl_8 = 1; } - else { - mpz_t e_acsl_5; - mpz_t e_acsl_6; - int e_acsl_7; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_6),(long)95); - e_acsl_7 = __gmpz_cmp((__mpz_struct const *)(e_acsl_5), - (__mpz_struct const *)(e_acsl_6)); - e_acsl_8 = e_acsl_7 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - __gmpz_clear((__mpz_struct *)(e_acsl_6)); - } - e_acsl_assert(! e_acsl_8,(char *)"Postcondition", + { int e_acsl_2; + int e_acsl_5; + int e_acsl_9; + if (! e_acsl_1) { e_acsl_2 = 1; } + else { e_acsl_2 = X == 95; } + e_acsl_assert(! e_acsl_2,(char *)"Postcondition", (char *)"(\\old(X == 7) ==> X == 95)",57); - if (! e_acsl_16) { e_acsl_20 = 1; } - else { - mpz_t e_acsl_17; - mpz_t e_acsl_18; - int e_acsl_19; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_18),(long)7); - e_acsl_19 = __gmpz_cmp((__mpz_struct const *)(e_acsl_17), - (__mpz_struct const *)(e_acsl_18)); - e_acsl_20 = e_acsl_19 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_17)); - __gmpz_clear((__mpz_struct *)(e_acsl_18)); - } - e_acsl_assert(! e_acsl_20,(char *)"Postcondition", + if (! e_acsl_4) { e_acsl_5 = 1; } + else { e_acsl_5 = X == 7; } + e_acsl_assert(! e_acsl_5,(char *)"Postcondition", (char *)"(\\old(X == 5 && Y == 2) ==> X == 7)",61); - if (! e_acsl_28) { e_acsl_35 = 1; } - else { - mpz_t e_acsl_29; - mpz_t e_acsl_31; - mpz_t e_acsl_32; - mpz_t e_acsl_33; - int e_acsl_34; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_29),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)e_acsl_30); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_32),(long)Y); - __gmpz_init((__mpz_struct *)(e_acsl_33)); - __gmpz_add((__mpz_struct *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_31), - (__mpz_struct const *)(e_acsl_32)); - e_acsl_34 = __gmpz_cmp((__mpz_struct const *)(e_acsl_29), - (__mpz_struct const *)(e_acsl_33)); - e_acsl_35 = e_acsl_34 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_29)); - __gmpz_clear((__mpz_struct *)(e_acsl_31)); - __gmpz_clear((__mpz_struct *)(e_acsl_32)); - __gmpz_clear((__mpz_struct *)(e_acsl_33)); - } - e_acsl_assert(! e_acsl_35,(char *)"Postcondition", + if (! e_acsl_7) { e_acsl_9 = 1; } + else { e_acsl_9 = (long long)X == (long long)e_acsl_8 + (long long)Y; } + e_acsl_assert(! e_acsl_9,(char *)"Postcondition", (char *)"(\\old(X == 5 && Y == 2) ==> X == \\old(X)+Y)",62); return; } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_addrOf.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_addrOf.c index bc5e7cf96a3..257dbd5e9b8 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_addrOf.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_addrOf.c @@ -21,7 +21,7 @@ int main(void) int x; x = 0; /*@ assert &x ≡ &x; */ ; - e_acsl_assert(! (& x == & x),(char *)"Assertion",(char *)"(&x == &x)",7); + e_acsl_assert(! (& x == & x),(char *)"Assertion",(char *)"(&x == &x)",8); __retres = 0; return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_arith.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_arith.c index efdd5a11cce..dfd8c185477 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_arith.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_arith.c @@ -1,78 +1,4 @@ /* 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 mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ ensures \valid(\old(z)); - assigns *z; */ -extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, - int base); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - assigns *z1; */ -extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z); - assigns \nothing; */ -extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -89,7 +15,6 @@ void e_acsl_assert(int predicate, char *kind, char *pred_txt, int line) return; } -extern int ( /* missing proto */ __gmpz_com)(); int main(void) { int __retres; @@ -98,416 +23,85 @@ int main(void) x = -3; y = 2; /*@ assert -3 ≡ x; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - mpz_t e_acsl_3; - int e_acsl_4; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)3); - __gmpz_init((__mpz_struct *)(e_acsl_2)); - __gmpz_neg((__mpz_struct *)(e_acsl_2),(__mpz_struct const *)(e_acsl_1)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_3),(long)x); - e_acsl_4 = __gmpz_cmp((__mpz_struct const *)(e_acsl_2), - (__mpz_struct const *)(e_acsl_3)); - e_acsl_assert(! (e_acsl_4 == 0),(char *)"Assertion",(char *)"(-3 == x)", - 11); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - __gmpz_clear((__mpz_struct *)(e_acsl_3)); - } - + e_acsl_assert(! (-3 == x),(char *)"Assertion",(char *)"(-3 == x)",11); /*@ assert x ≡ -3; */ ; - { - mpz_t e_acsl_5; - mpz_t e_acsl_6; - mpz_t e_acsl_7; - int e_acsl_8; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_6),(long)3); - __gmpz_init((__mpz_struct *)(e_acsl_7)); - __gmpz_neg((__mpz_struct *)(e_acsl_7),(__mpz_struct const *)(e_acsl_6)); - e_acsl_8 = __gmpz_cmp((__mpz_struct const *)(e_acsl_5), - (__mpz_struct const *)(e_acsl_7)); - e_acsl_assert(! (e_acsl_8 == 0),(char *)"Assertion",(char *)"(x == -3)", - 12); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - __gmpz_clear((__mpz_struct *)(e_acsl_6)); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); - } - + e_acsl_assert(! (x == -3),(char *)"Assertion",(char *)"(x == -3)",12); /*@ assert 0 ≢ ~0; */ ; - { - mpz_t e_acsl_9; - mpz_t e_acsl_10; - int e_acsl_11; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)0); - __gmpz_init((__mpz_struct *)(e_acsl_10)); - __gmpz_com(e_acsl_10,e_acsl_9); - e_acsl_11 = __gmpz_cmp((__mpz_struct const *)(e_acsl_9), - (__mpz_struct const *)(e_acsl_10)); - e_acsl_assert(! (e_acsl_11 != 0),(char *)"Assertion",(char *)"(0 != ~0)", - 13); - __gmpz_clear((__mpz_struct *)(e_acsl_9)); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - } - + e_acsl_assert(! (0 != ~ 0),(char *)"Assertion",(char *)"(0 != ~0)",13); /*@ assert x+1 ≡ -2; */ ; - { - mpz_t e_acsl_12; - mpz_t e_acsl_13; - mpz_t e_acsl_14; - mpz_t e_acsl_15; - mpz_t e_acsl_16; - int e_acsl_17; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_12),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_14)); - __gmpz_add((__mpz_struct *)(e_acsl_14),(__mpz_struct const *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_13)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_16)); - __gmpz_neg((__mpz_struct *)(e_acsl_16),(__mpz_struct const *)(e_acsl_15)); - e_acsl_17 = __gmpz_cmp((__mpz_struct const *)(e_acsl_14), - (__mpz_struct const *)(e_acsl_16)); - e_acsl_assert(! (e_acsl_17 == 0),(char *)"Assertion", - (char *)"(x+1 == -2)",15); - __gmpz_clear((__mpz_struct *)(e_acsl_12)); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); - __gmpz_clear((__mpz_struct *)(e_acsl_14)); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - } - + e_acsl_assert(! ((long long)x + (long long)1 == (long long)-2), + (char *)"Assertion",(char *)"(x+1 == -2)",15); /*@ assert x-1 ≡ -4; */ ; - { - mpz_t e_acsl_18; - mpz_t e_acsl_19; - mpz_t e_acsl_20; - mpz_t e_acsl_21; - mpz_t e_acsl_22; - int e_acsl_23; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_18),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_20)); - __gmpz_sub((__mpz_struct *)(e_acsl_20),(__mpz_struct const *)(e_acsl_18), - (__mpz_struct const *)(e_acsl_19)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_21),(long)4); - __gmpz_init((__mpz_struct *)(e_acsl_22)); - __gmpz_neg((__mpz_struct *)(e_acsl_22),(__mpz_struct const *)(e_acsl_21)); - e_acsl_23 = __gmpz_cmp((__mpz_struct const *)(e_acsl_20), - (__mpz_struct const *)(e_acsl_22)); - e_acsl_assert(! (e_acsl_23 == 0),(char *)"Assertion", - (char *)"(x-1 == -4)",16); - __gmpz_clear((__mpz_struct *)(e_acsl_18)); - __gmpz_clear((__mpz_struct *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_20)); - __gmpz_clear((__mpz_struct *)(e_acsl_21)); - __gmpz_clear((__mpz_struct *)(e_acsl_22)); - } - + e_acsl_assert(! ((long long)x - (long long)1 == (long long)-4), + (char *)"Assertion",(char *)"(x-1 == -4)",16); /*@ assert x*3 ≡ -9; */ ; - { - mpz_t e_acsl_24; - mpz_t e_acsl_25; - mpz_t e_acsl_26; - mpz_t e_acsl_27; - mpz_t e_acsl_28; - int e_acsl_29; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_24),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_25),(long)3); - __gmpz_init((__mpz_struct *)(e_acsl_26)); - __gmpz_mul((__mpz_struct *)(e_acsl_26),(__mpz_struct const *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_25)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)9); - __gmpz_init((__mpz_struct *)(e_acsl_28)); - __gmpz_neg((__mpz_struct *)(e_acsl_28),(__mpz_struct const *)(e_acsl_27)); - e_acsl_29 = __gmpz_cmp((__mpz_struct const *)(e_acsl_26), - (__mpz_struct const *)(e_acsl_28)); - e_acsl_assert(! (e_acsl_29 == 0),(char *)"Assertion", - (char *)"(x*3 == -9)",17); - __gmpz_clear((__mpz_struct *)(e_acsl_24)); - __gmpz_clear((__mpz_struct *)(e_acsl_25)); - __gmpz_clear((__mpz_struct *)(e_acsl_26)); - __gmpz_clear((__mpz_struct *)(e_acsl_27)); - __gmpz_clear((__mpz_struct *)(e_acsl_28)); - } - + e_acsl_assert(! ((long long)x * (long long)3 == (long long)-9), + (char *)"Assertion",(char *)"(x*3 == -9)",17); /*@ assert x/3 ≡ -1; */ ; { - mpz_t e_acsl_30; - mpz_t e_acsl_31; - int e_acsl_32; - mpz_t e_acsl_33; - mpz_t e_acsl_34; - mpz_t e_acsl_35; - int e_acsl_36; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_30),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)3); - e_acsl_32 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_31)); - __gmpz_init((__mpz_struct *)(e_acsl_33)); + int e_acsl_1; /*@ assert 3 ≢ 0; */ ; - e_acsl_assert(e_acsl_32 == 0,(char *)"Assertion",(char *)"(3 == 0)",18); - __gmpz_tdiv_q((__mpz_struct *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_30), - (__mpz_struct const *)(e_acsl_31)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_34),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_35)); - __gmpz_neg((__mpz_struct *)(e_acsl_35),(__mpz_struct const *)(e_acsl_34)); - e_acsl_36 = __gmpz_cmp((__mpz_struct const *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_35)); - e_acsl_assert(! (e_acsl_36 == 0),(char *)"Assertion", + e_acsl_assert(3 == 0,(char *)"Assertion",(char *)"(3 == 0)",18); + e_acsl_1 = x / 3; + e_acsl_assert(! (e_acsl_1 == -1),(char *)"Assertion", (char *)"(x/3 == -1)",18); - __gmpz_clear((__mpz_struct *)(e_acsl_30)); - __gmpz_clear((__mpz_struct *)(e_acsl_31)); - __gmpz_clear((__mpz_struct *)(e_acsl_33)); - __gmpz_clear((__mpz_struct *)(e_acsl_34)); - __gmpz_clear((__mpz_struct *)(e_acsl_35)); } /*@ assert 0xfffffffffff/0xfffffffffff ≡ 1; */ ; { - mpz_t e_acsl_37; - mpz_t e_acsl_38; - int e_acsl_39; - mpz_t e_acsl_40; - mpz_t e_acsl_41; - int e_acsl_42; - __gmpz_init_set_str((__mpz_struct *)(e_acsl_37),"17592186044415",10); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_38),(long)0); - e_acsl_39 = __gmpz_cmp((__mpz_struct const *)(e_acsl_37), - (__mpz_struct const *)(e_acsl_38)); - __gmpz_init((__mpz_struct *)(e_acsl_40)); + int e_acsl_2; /*@ assert 0xfffffffffff ≢ 0; */ ; - e_acsl_assert(e_acsl_39 == 0,(char *)"Assertion", + e_acsl_assert(0xfffffffffff == (long long)0,(char *)"Assertion", (char *)"(0xfffffffffff == 0)",19); - __gmpz_tdiv_q((__mpz_struct *)(e_acsl_40), - (__mpz_struct const *)(e_acsl_37), - (__mpz_struct const *)(e_acsl_37)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_41),(long)1); - e_acsl_42 = __gmpz_cmp((__mpz_struct const *)(e_acsl_40), - (__mpz_struct const *)(e_acsl_41)); - e_acsl_assert(! (e_acsl_42 == 0),(char *)"Assertion", + e_acsl_2 = (int)(0xfffffffffff / 0xfffffffffff); + e_acsl_assert(! (e_acsl_2 == 1),(char *)"Assertion", (char *)"(0xfffffffffff/0xfffffffffff == 1)",19); - __gmpz_clear((__mpz_struct *)(e_acsl_37)); - __gmpz_clear((__mpz_struct *)(e_acsl_38)); - __gmpz_clear((__mpz_struct *)(e_acsl_40)); - __gmpz_clear((__mpz_struct *)(e_acsl_41)); } /*@ assert x%2 ≡ -1; */ ; { - mpz_t e_acsl_43; - mpz_t e_acsl_44; - int e_acsl_45; - mpz_t e_acsl_46; - mpz_t e_acsl_47; - mpz_t e_acsl_48; - int e_acsl_49; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_43),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_44),(long)2); - e_acsl_45 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_44)); - __gmpz_init((__mpz_struct *)(e_acsl_46)); + int e_acsl_3; /*@ assert 2 ≢ 0; */ ; - e_acsl_assert(e_acsl_45 == 0,(char *)"Assertion",(char *)"(2 == 0)",20); - __gmpz_tdiv_r((__mpz_struct *)(e_acsl_46), - (__mpz_struct const *)(e_acsl_43), - (__mpz_struct const *)(e_acsl_44)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_47),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_48)); - __gmpz_neg((__mpz_struct *)(e_acsl_48),(__mpz_struct const *)(e_acsl_47)); - e_acsl_49 = __gmpz_cmp((__mpz_struct const *)(e_acsl_46), - (__mpz_struct const *)(e_acsl_48)); - e_acsl_assert(! (e_acsl_49 == 0),(char *)"Assertion", + e_acsl_assert(2 == 0,(char *)"Assertion",(char *)"(2 == 0)",20); + e_acsl_3 = x % 2; + e_acsl_assert(! (e_acsl_3 == -1),(char *)"Assertion", (char *)"(x%2 == -1)",20); - __gmpz_clear((__mpz_struct *)(e_acsl_43)); - __gmpz_clear((__mpz_struct *)(e_acsl_44)); - __gmpz_clear((__mpz_struct *)(e_acsl_46)); - __gmpz_clear((__mpz_struct *)(e_acsl_47)); - __gmpz_clear((__mpz_struct *)(e_acsl_48)); } /*@ assert -3%-2 ≡ -1; */ ; { - mpz_t e_acsl_50; - mpz_t e_acsl_51; - mpz_t e_acsl_52; - mpz_t e_acsl_53; - mpz_t e_acsl_54; - int e_acsl_55; - mpz_t e_acsl_56; - mpz_t e_acsl_57; - mpz_t e_acsl_58; - int e_acsl_59; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_50),(long)3); - __gmpz_init((__mpz_struct *)(e_acsl_51)); - __gmpz_neg((__mpz_struct *)(e_acsl_51),(__mpz_struct const *)(e_acsl_50)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_52),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_53)); - __gmpz_neg((__mpz_struct *)(e_acsl_53),(__mpz_struct const *)(e_acsl_52)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_54),(long)0); - e_acsl_55 = __gmpz_cmp((__mpz_struct const *)(e_acsl_53), - (__mpz_struct const *)(e_acsl_54)); - __gmpz_init((__mpz_struct *)(e_acsl_56)); + int e_acsl_4; /*@ assert -2 ≢ 0; */ ; - e_acsl_assert(e_acsl_55 == 0,(char *)"Assertion",(char *)"(-2 == 0)",21); - __gmpz_tdiv_r((__mpz_struct *)(e_acsl_56), - (__mpz_struct const *)(e_acsl_51), - (__mpz_struct const *)(e_acsl_53)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_57),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_58)); - __gmpz_neg((__mpz_struct *)(e_acsl_58),(__mpz_struct const *)(e_acsl_57)); - e_acsl_59 = __gmpz_cmp((__mpz_struct const *)(e_acsl_56), - (__mpz_struct const *)(e_acsl_58)); - e_acsl_assert(! (e_acsl_59 == 0),(char *)"Assertion", + e_acsl_assert(-2 == 0,(char *)"Assertion",(char *)"(-2 == 0)",21); + e_acsl_4 = -3 % -2; + e_acsl_assert(! (e_acsl_4 == -1),(char *)"Assertion", (char *)"(-3%-2 == -1)",21); - __gmpz_clear((__mpz_struct *)(e_acsl_50)); - __gmpz_clear((__mpz_struct *)(e_acsl_51)); - __gmpz_clear((__mpz_struct *)(e_acsl_52)); - __gmpz_clear((__mpz_struct *)(e_acsl_53)); - __gmpz_clear((__mpz_struct *)(e_acsl_54)); - __gmpz_clear((__mpz_struct *)(e_acsl_56)); - __gmpz_clear((__mpz_struct *)(e_acsl_57)); - __gmpz_clear((__mpz_struct *)(e_acsl_58)); } /*@ assert 3%-2 ≡ 1; */ ; { - mpz_t e_acsl_60; - mpz_t e_acsl_61; - mpz_t e_acsl_62; - mpz_t e_acsl_63; - int e_acsl_64; - mpz_t e_acsl_65; - mpz_t e_acsl_66; - int e_acsl_67; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_60),(long)3); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_61),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_62)); - __gmpz_neg((__mpz_struct *)(e_acsl_62),(__mpz_struct const *)(e_acsl_61)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_63),(long)0); - e_acsl_64 = __gmpz_cmp((__mpz_struct const *)(e_acsl_62), - (__mpz_struct const *)(e_acsl_63)); - __gmpz_init((__mpz_struct *)(e_acsl_65)); + int e_acsl_5; /*@ assert -2 ≢ 0; */ ; - e_acsl_assert(e_acsl_64 == 0,(char *)"Assertion",(char *)"(-2 == 0)",22); - __gmpz_tdiv_r((__mpz_struct *)(e_acsl_65), - (__mpz_struct const *)(e_acsl_60), - (__mpz_struct const *)(e_acsl_62)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_66),(long)1); - e_acsl_67 = __gmpz_cmp((__mpz_struct const *)(e_acsl_65), - (__mpz_struct const *)(e_acsl_66)); - e_acsl_assert(! (e_acsl_67 == 0),(char *)"Assertion", + e_acsl_assert(-2 == 0,(char *)"Assertion",(char *)"(-2 == 0)",22); + e_acsl_5 = 3 % -2; + e_acsl_assert(! (e_acsl_5 == 1),(char *)"Assertion", (char *)"(3%-2 == 1)",22); - __gmpz_clear((__mpz_struct *)(e_acsl_60)); - __gmpz_clear((__mpz_struct *)(e_acsl_61)); - __gmpz_clear((__mpz_struct *)(e_acsl_62)); - __gmpz_clear((__mpz_struct *)(e_acsl_63)); - __gmpz_clear((__mpz_struct *)(e_acsl_65)); - __gmpz_clear((__mpz_struct *)(e_acsl_66)); } /*@ assert ((x*2+(3+y))-4)+(x-y) ≡ -10; */ ; - { - mpz_t e_acsl_68; - mpz_t e_acsl_69; - mpz_t e_acsl_70; - mpz_t e_acsl_71; - mpz_t e_acsl_72; - mpz_t e_acsl_73; - mpz_t e_acsl_74; - mpz_t e_acsl_75; - mpz_t e_acsl_76; - mpz_t e_acsl_77; - mpz_t e_acsl_78; - mpz_t e_acsl_79; - mpz_t e_acsl_80; - int e_acsl_81; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_68),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_69),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_70)); - __gmpz_mul((__mpz_struct *)(e_acsl_70),(__mpz_struct const *)(e_acsl_68), - (__mpz_struct const *)(e_acsl_69)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_71),(long)3); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_72),(long)y); - __gmpz_init((__mpz_struct *)(e_acsl_73)); - __gmpz_add((__mpz_struct *)(e_acsl_73),(__mpz_struct const *)(e_acsl_71), - (__mpz_struct const *)(e_acsl_72)); - __gmpz_init((__mpz_struct *)(e_acsl_74)); - __gmpz_add((__mpz_struct *)(e_acsl_74),(__mpz_struct const *)(e_acsl_70), - (__mpz_struct const *)(e_acsl_73)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_75),(long)4); - __gmpz_init((__mpz_struct *)(e_acsl_76)); - __gmpz_sub((__mpz_struct *)(e_acsl_76),(__mpz_struct const *)(e_acsl_74), - (__mpz_struct const *)(e_acsl_75)); - __gmpz_init((__mpz_struct *)(e_acsl_77)); - __gmpz_sub((__mpz_struct *)(e_acsl_77),(__mpz_struct const *)(e_acsl_68), - (__mpz_struct const *)(e_acsl_72)); - __gmpz_init((__mpz_struct *)(e_acsl_78)); - __gmpz_add((__mpz_struct *)(e_acsl_78),(__mpz_struct const *)(e_acsl_76), - (__mpz_struct const *)(e_acsl_77)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_79),(long)10); - __gmpz_init((__mpz_struct *)(e_acsl_80)); - __gmpz_neg((__mpz_struct *)(e_acsl_80),(__mpz_struct const *)(e_acsl_79)); - e_acsl_81 = __gmpz_cmp((__mpz_struct const *)(e_acsl_78), - (__mpz_struct const *)(e_acsl_80)); - e_acsl_assert(! (e_acsl_81 == 0),(char *)"Assertion", - (char *)"(((x*2+(3+y))-4)+(x-y) == -10)",24); - __gmpz_clear((__mpz_struct *)(e_acsl_68)); - __gmpz_clear((__mpz_struct *)(e_acsl_69)); - __gmpz_clear((__mpz_struct *)(e_acsl_70)); - __gmpz_clear((__mpz_struct *)(e_acsl_71)); - __gmpz_clear((__mpz_struct *)(e_acsl_72)); - __gmpz_clear((__mpz_struct *)(e_acsl_73)); - __gmpz_clear((__mpz_struct *)(e_acsl_74)); - __gmpz_clear((__mpz_struct *)(e_acsl_75)); - __gmpz_clear((__mpz_struct *)(e_acsl_76)); - __gmpz_clear((__mpz_struct *)(e_acsl_77)); - __gmpz_clear((__mpz_struct *)(e_acsl_78)); - __gmpz_clear((__mpz_struct *)(e_acsl_79)); - __gmpz_clear((__mpz_struct *)(e_acsl_80)); - } - + e_acsl_assert(! ((((long long)x * (long long)2 + ((long long)3 + (long long)y)) - (long long)4) + ( + (long long)x - (long long)y) == (long long)-10), + (char *)"Assertion",(char *)"(((x*2+(3+y))-4)+(x-y) == -10)", + 24); /*@ assert (0≡1) ≡ !(0≡0); */ ; e_acsl_assert(! ((0 == 1) == ! (0 == 0)),(char *)"Assertion", (char *)"((0==1) == !(0==0))",26); /*@ assert (0≤-1) ≡ (0>0); */ ; - { - mpz_t e_acsl_82; - mpz_t e_acsl_83; - mpz_t e_acsl_84; - int e_acsl_85; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_82),(long)0); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_83),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_84)); - __gmpz_neg((__mpz_struct *)(e_acsl_84),(__mpz_struct const *)(e_acsl_83)); - e_acsl_85 = __gmpz_cmp((__mpz_struct const *)(e_acsl_82), - (__mpz_struct const *)(e_acsl_84)); - e_acsl_assert(! ((e_acsl_85 <= 0) == (0 > 0)),(char *)"Assertion", - (char *)"((0<=-1) == (0>0))",27); - __gmpz_clear((__mpz_struct *)(e_acsl_82)); - __gmpz_clear((__mpz_struct *)(e_acsl_83)); - __gmpz_clear((__mpz_struct *)(e_acsl_84)); - } - + e_acsl_assert(! ((0 <= -1) == (0 > 0)),(char *)"Assertion", + (char *)"((0<=-1) == (0>0))",27); /*@ assert (0≥-1) ≡ (0≤0); */ ; - { - mpz_t e_acsl_86; - mpz_t e_acsl_87; - mpz_t e_acsl_88; - int e_acsl_89; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_86),(long)0); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_87),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_88)); - __gmpz_neg((__mpz_struct *)(e_acsl_88),(__mpz_struct const *)(e_acsl_87)); - e_acsl_89 = __gmpz_cmp((__mpz_struct const *)(e_acsl_86), - (__mpz_struct const *)(e_acsl_88)); - e_acsl_assert(! ((e_acsl_89 >= 0) == (0 <= 0)),(char *)"Assertion", - (char *)"((0>=-1) == (0<=0))",28); - __gmpz_clear((__mpz_struct *)(e_acsl_86)); - __gmpz_clear((__mpz_struct *)(e_acsl_87)); - __gmpz_clear((__mpz_struct *)(e_acsl_88)); - } - + e_acsl_assert(! ((0 >= -1) == (0 <= 0)),(char *)"Assertion", + (char *)"((0>=-1) == (0<=0))",28); /*@ assert (0≢1) ≡ !(0≢0); */ ; e_acsl_assert(! ((0 != 1) == ! (0 != 0)),(char *)"Assertion", (char *)"((0!=1) == !(0!=0))",29); diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_at.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_at.c index e13447daf65..a0c49223d4d 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_at.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_at.c @@ -1,39 +1,4 @@ /* 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 mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z_orig); - ensures \valid(\old(z)); - assigns *z; */ -extern void __gmpz_init_set(__mpz_struct * /*[1]*/ z, - __mpz_struct const * /*[1]*/ z_orig); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -55,107 +20,47 @@ int A = 0; void f(void) { int e_acsl_1; + int e_acsl_2; + int e_acsl_3; + int e_acsl_4; int e_acsl_5; - int e_acsl_9; - int e_acsl_13; - int e_acsl_14; - int e_acsl_18; - e_acsl_13 = A; + int e_acsl_6; + e_acsl_4 = A; e_acsl_1 = A; A = 1; - F: e_acsl_14 = e_acsl_13; - e_acsl_5 = A; + F: e_acsl_5 = e_acsl_4; + e_acsl_2 = A; A = 2; /*@ assert \at(A,Pre) ≡ 0; */ ; - { - mpz_t e_acsl_2; - mpz_t e_acsl_3; - int e_acsl_4; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)e_acsl_1); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_3),(long)0); - e_acsl_4 = __gmpz_cmp((__mpz_struct const *)(e_acsl_2), - (__mpz_struct const *)(e_acsl_3)); - e_acsl_assert(! (e_acsl_4 == 0),(char *)"Assertion", - (char *)"(\\at(A,Pre) == 0)",12); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - __gmpz_clear((__mpz_struct *)(e_acsl_3)); - } - + e_acsl_assert(! (e_acsl_1 == 0),(char *)"Assertion", + (char *)"(\\at(A,Pre) == 0)",12); /*@ assert \at(A,F) ≡ 1; */ ; - { - mpz_t e_acsl_6; - mpz_t e_acsl_7; - int e_acsl_8; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_6),(long)e_acsl_5); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)1); - e_acsl_8 = __gmpz_cmp((__mpz_struct const *)(e_acsl_6), - (__mpz_struct const *)(e_acsl_7)); - e_acsl_assert(! (e_acsl_8 == 0),(char *)"Assertion", - (char *)"(\\at(A,F) == 1)",13); - __gmpz_clear((__mpz_struct *)(e_acsl_6)); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); - } - + e_acsl_assert(! (e_acsl_2 == 1),(char *)"Assertion", + (char *)"(\\at(A,F) == 1)",13); /*@ assert \at(A,Here) ≡ 2; */ ; - { - mpz_t e_acsl_10; - mpz_t e_acsl_11; - int e_acsl_12; - e_acsl_9 = A; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)e_acsl_9); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)2); - e_acsl_12 = __gmpz_cmp((__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_11)); - e_acsl_assert(! (e_acsl_12 == 0),(char *)"Assertion", - (char *)"(\\at(A,Here) == 2)",14); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - } - + e_acsl_3 = A; + e_acsl_assert(! (e_acsl_3 == 2),(char *)"Assertion", + (char *)"(\\at(A,Here) == 2)",14); /*@ assert \at(\at(A,Pre),F) ≡ 0; */ ; - { - mpz_t e_acsl_15; - mpz_t e_acsl_16; - int e_acsl_17; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)e_acsl_14); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)0); - e_acsl_17 = __gmpz_cmp((__mpz_struct const *)(e_acsl_15), - (__mpz_struct const *)(e_acsl_16)); - e_acsl_assert(! (e_acsl_17 == 0),(char *)"Assertion", - (char *)"(\\at(\\at(A,Pre),F) == 0)",15); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - } - + e_acsl_assert(! (e_acsl_5 == 0),(char *)"Assertion", + (char *)"(\\at(\\at(A,Pre),F) == 0)",15); A = 3; - { - mpz_t e_acsl_19; - mpz_t e_acsl_20; - int e_acsl_21; - e_acsl_18 = A; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)e_acsl_18); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)3); - e_acsl_21 = __gmpz_cmp((__mpz_struct const *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_20)); - e_acsl_assert(! (e_acsl_21 == 0),(char *)"Postcondition", - (char *)"(\\at(A,Post) == 3)",8); - __gmpz_clear((__mpz_struct *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_20)); - return; - } - + e_acsl_6 = A; + e_acsl_assert(! (e_acsl_6 == 3),(char *)"Postcondition", + (char *)"(\\at(A,Post) == 3)",8); + return; } void g(int *p, int *q) { int e_acsl_1; int e_acsl_2; - int e_acsl_6; - int e_acsl_7; + int e_acsl_3; + int e_acsl_4; *p = 0; *(p + 1) = 1; *q = 0; - L1: e_acsl_6 = *q; + L1: e_acsl_3 = *q; e_acsl_1 = *q; *p = 2; *(p + 1) = 3; @@ -163,37 +68,13 @@ void g(int *p, int *q) L2: e_acsl_2 = *(p + e_acsl_1); A = 4; /*@ assert \at(*(p+\at(*q,L1)),L2) ≡ 2; */ ; - { - mpz_t e_acsl_3; - mpz_t e_acsl_4; - int e_acsl_5; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_3),(long)e_acsl_2); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)2); - e_acsl_5 = __gmpz_cmp((__mpz_struct const *)(e_acsl_3), - (__mpz_struct const *)(e_acsl_4)); - e_acsl_assert(! (e_acsl_5 == 0),(char *)"Assertion", - (char *)"(\\at(*(p+\\at(*q,L1)),L2) == 2)",31); - __gmpz_clear((__mpz_struct *)(e_acsl_3)); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - } - + e_acsl_assert(! (e_acsl_2 == 2),(char *)"Assertion", + (char *)"(\\at(*(p+\\at(*q,L1)),L2) == 2)",31); L3: /*@ assert \at(*(p+\at(*q,L1)),Here) ≡ 2; */ ; - { - mpz_t e_acsl_8; - mpz_t e_acsl_9; - int e_acsl_10; - e_acsl_7 = *(p + e_acsl_6); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)e_acsl_7); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)2); - e_acsl_10 = __gmpz_cmp((__mpz_struct const *)(e_acsl_8), - (__mpz_struct const *)(e_acsl_9)); - e_acsl_assert(! (e_acsl_10 == 0),(char *)"Assertion", - (char *)"(\\at(*(p+\\at(*q,L1)),Here) == 2)",33); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - __gmpz_clear((__mpz_struct *)(e_acsl_9)); - } - + e_acsl_4 = *(p + e_acsl_3); + e_acsl_assert(! (e_acsl_4 == 2),(char *)"Assertion", + (char *)"(\\at(*(p+\\at(*q,L1)),Here) == 2)",33); return; } @@ -202,96 +83,29 @@ int main(void) int __retres; int x; int t[2]; - int e_acsl_4; - mpz_t e_acsl_11; - int e_acsl_14; + int e_acsl_1; + long long e_acsl_2; + int e_acsl_3; x = 0; - L: e_acsl_14 = x; - { - mpz_t e_acsl_8; - mpz_t e_acsl_9; - mpz_t e_acsl_10; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_10)); - __gmpz_add((__mpz_struct *)(e_acsl_10),(__mpz_struct const *)(e_acsl_8), - (__mpz_struct const *)(e_acsl_9)); - __gmpz_init_set((__mpz_struct *)(e_acsl_11), - (__mpz_struct const *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - __gmpz_clear((__mpz_struct *)(e_acsl_9)); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - } - - e_acsl_4 = x; + L: e_acsl_3 = x; + e_acsl_2 = (long long)x + (long long)1; + e_acsl_1 = x; /*@ assert x ≡ 0; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)0); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Assertion",(char *)"(x == 0)", - 44); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - + e_acsl_assert(! (x == 0),(char *)"Assertion",(char *)"(x == 0)",44); x = 1; x = 2; f(); /*@ assert \at(x,L) ≡ 0; */ ; - { - mpz_t e_acsl_5; - mpz_t e_acsl_6; - int e_acsl_7; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)e_acsl_4); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_6),(long)0); - e_acsl_7 = __gmpz_cmp((__mpz_struct const *)(e_acsl_5), - (__mpz_struct const *)(e_acsl_6)); - e_acsl_assert(! (e_acsl_7 == 0),(char *)"Assertion", - (char *)"(\\at(x,L) == 0)",49); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - __gmpz_clear((__mpz_struct *)(e_acsl_6)); - } - + e_acsl_assert(! (e_acsl_1 == 0),(char *)"Assertion", + (char *)"(\\at(x,L) == 0)",49); /*@ assert \at(x+1,L) ≡ 1; */ ; - { - mpz_t e_acsl_12; - int e_acsl_13; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_12),(long)1); - e_acsl_13 = __gmpz_cmp((__mpz_struct const *)(e_acsl_11), - (__mpz_struct const *)(e_acsl_12)); - e_acsl_assert(! (e_acsl_13 == 0),(char *)"Assertion", - (char *)"(\\at(x+1,L) == 1)",50); - __gmpz_clear((__mpz_struct *)(e_acsl_12)); - } - + e_acsl_assert(! (e_acsl_2 == (long long)1),(char *)"Assertion", + (char *)"(\\at(x+1,L) == 1)",50); /*@ assert \at(x,L)+1 ≡ 1; */ ; - { - mpz_t e_acsl_15; - mpz_t e_acsl_16; - mpz_t e_acsl_17; - int e_acsl_18; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)e_acsl_14); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_17)); - __gmpz_add((__mpz_struct *)(e_acsl_17),(__mpz_struct const *)(e_acsl_15), - (__mpz_struct const *)(e_acsl_16)); - e_acsl_18 = __gmpz_cmp((__mpz_struct const *)(e_acsl_17), - (__mpz_struct const *)(e_acsl_16)); - e_acsl_assert(! (e_acsl_18 == 0),(char *)"Assertion", - (char *)"(\\at(x,L)+1 == 1)",51); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - __gmpz_clear((__mpz_struct *)(e_acsl_17)); - } - + e_acsl_assert(! ((long long)e_acsl_3 + (long long)1 == (long long)1), + (char *)"Assertion",(char *)"(\\at(x,L)+1 == 1)",51); g(t,& x); __retres = 0; - __gmpz_clear((__mpz_struct *)(e_acsl_11)); return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_cast.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_cast.c index decd458f885..e8566378d37 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_cast.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_cast.c @@ -1,24 +1,4 @@ /* 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 mpz_t[1]; -/*@ ensures \valid(\old(z)); - assigns *z; */ -extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, - int base); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z); - assigns \nothing; */ -extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); -/*@ requires \valid(z); - assigns \nothing; */ -extern unsigned long __gmpz_get_ui(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -42,29 +22,25 @@ int main(void) int y; x = (long)0; y = 0; + /*@ assert (int)x ≡ y; */ ; + e_acsl_assert(! ((int)x == y),(char *)"Assertion",(char *)"((int)x == y)", + 10); + /*@ assert x ≡ (long)y; */ ; + e_acsl_assert(! (x == (long)y),(char *)"Assertion", + (char *)"(x == (long)y)",11); + /*@ assert y ≡ (int)0; */ ; + e_acsl_assert(! (y == 0),(char *)"Assertion",(char *)"(y == (int)0)",13); + /*@ assert (unsigned int)y ≡ (unsigned int)0; */ ; + e_acsl_assert(! ((unsigned int)y == (unsigned int)0),(char *)"Assertion", + (char *)"((unsigned int)y == (unsigned int)0)",14); /*@ assert y ≢ (int)0xfffffffffffffff; */ ; - { - mpz_t e_acsl_1; - int e_acsl_2; - __gmpz_init_set_str((__mpz_struct *)(e_acsl_1),"1152921504606846975",10); - e_acsl_2 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_1)); - e_acsl_assert(! (y != e_acsl_2),(char *)"Assertion", - (char *)"(y != (int)0xfffffffffffffff)",17); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - } - + e_acsl_assert(! (y != (int)0xfffffffffffffff),(char *)"Assertion", + (char *)"(y != (int)0xfffffffffffffff)",17); /*@ assert (unsigned int)y ≢ (unsigned int)0xfffffffffffffff; */ ; - { - mpz_t e_acsl_3; - unsigned int e_acsl_4; - __gmpz_init_set_str((__mpz_struct *)(e_acsl_3),"1152921504606846975",10); - e_acsl_4 = (unsigned int)__gmpz_get_ui((__mpz_struct const *)(e_acsl_3)); - e_acsl_assert(! ((unsigned int)y != e_acsl_4),(char *)"Assertion", - (char *)"((unsigned int)y != (unsigned int)0xfffffffffffffff)", - 18); - __gmpz_clear((__mpz_struct *)(e_acsl_3)); - } - + e_acsl_assert(! ((unsigned int)y != (unsigned int)0xfffffffffffffff), + (char *)"Assertion", + (char *)"((unsigned int)y != (unsigned int)0xfffffffffffffff)", + 18); __retres = 0; return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_comparison.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_comparison.c index cec63627c00..b5f3063d841 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_comparison.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_comparison.c @@ -1,31 +1,4 @@ /* 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 mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - assigns *z1; */ -extern void __gmpz_neg(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -55,35 +28,9 @@ int main(void) /*@ assert y > x; */ ; e_acsl_assert(! (y > x),(char *)"Assertion",(char *)"(y > x)",9); /*@ assert x ≤ 0; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)0); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 <= 0),(char *)"Assertion",(char *)"(x <= 0)", - 10); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - + e_acsl_assert(! (x <= 0),(char *)"Assertion",(char *)"(x <= 0)",10); /*@ assert y ≥ 1; */ ; - { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)1); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 >= 0),(char *)"Assertion",(char *)"(y >= 1)", - 11); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - + e_acsl_assert(! (y >= 1),(char *)"Assertion",(char *)"(y >= 1)",11); s = (char *)"toto"; /*@ assert s ≡ s; */ ; e_acsl_assert(! (s == s),(char *)"Assertion",(char *)"(s == s)",13); @@ -104,116 +51,18 @@ int main(void) /*@ assert 1 ≢ 2; */ ; e_acsl_assert(! (1 != 2),(char *)"Assertion",(char *)"(1 != 2)",20); /*@ assert -5 < 18; */ ; - { - mpz_t e_acsl_7; - mpz_t e_acsl_8; - mpz_t e_acsl_9; - int e_acsl_10; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)5); - __gmpz_init((__mpz_struct *)(e_acsl_8)); - __gmpz_neg((__mpz_struct *)(e_acsl_8),(__mpz_struct const *)(e_acsl_7)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)18); - e_acsl_10 = __gmpz_cmp((__mpz_struct const *)(e_acsl_8), - (__mpz_struct const *)(e_acsl_9)); - e_acsl_assert(! (e_acsl_10 < 0),(char *)"Assertion",(char *)"(-5 < 18)", - 22); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - __gmpz_clear((__mpz_struct *)(e_acsl_9)); - } - + e_acsl_assert(! (-5 < 18),(char *)"Assertion",(char *)"(-5 < 18)",22); /*@ assert 32 > -3; */ ; - { - mpz_t e_acsl_11; - mpz_t e_acsl_12; - mpz_t e_acsl_13; - int e_acsl_14; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)32); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_12),(long)3); - __gmpz_init((__mpz_struct *)(e_acsl_13)); - __gmpz_neg((__mpz_struct *)(e_acsl_13),(__mpz_struct const *)(e_acsl_12)); - e_acsl_14 = __gmpz_cmp((__mpz_struct const *)(e_acsl_11), - (__mpz_struct const *)(e_acsl_13)); - e_acsl_assert(! (e_acsl_14 > 0),(char *)"Assertion",(char *)"(32 > -3)", - 23); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - __gmpz_clear((__mpz_struct *)(e_acsl_12)); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); - } - + e_acsl_assert(! (32 > -3),(char *)"Assertion",(char *)"(32 > -3)",23); /*@ assert -12 ≤ 13; */ ; - { - mpz_t e_acsl_15; - mpz_t e_acsl_16; - mpz_t e_acsl_17; - int e_acsl_18; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)12); - __gmpz_init((__mpz_struct *)(e_acsl_16)); - __gmpz_neg((__mpz_struct *)(e_acsl_16),(__mpz_struct const *)(e_acsl_15)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)13); - e_acsl_18 = __gmpz_cmp((__mpz_struct const *)(e_acsl_16), - (__mpz_struct const *)(e_acsl_17)); - e_acsl_assert(! (e_acsl_18 <= 0),(char *)"Assertion", - (char *)"(-12 <= 13)",24); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - __gmpz_clear((__mpz_struct *)(e_acsl_17)); - } - + e_acsl_assert(! (-12 <= 13),(char *)"Assertion",(char *)"(-12 <= 13)",24); /*@ assert 123 ≥ -12; */ ; - { - mpz_t e_acsl_19; - mpz_t e_acsl_20; - mpz_t e_acsl_21; - int e_acsl_22; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)123); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)12); - __gmpz_init((__mpz_struct *)(e_acsl_21)); - __gmpz_neg((__mpz_struct *)(e_acsl_21),(__mpz_struct const *)(e_acsl_20)); - e_acsl_22 = __gmpz_cmp((__mpz_struct const *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_21)); - e_acsl_assert(! (e_acsl_22 >= 0),(char *)"Assertion", - (char *)"(123 >= -12)",25); - __gmpz_clear((__mpz_struct *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_20)); - __gmpz_clear((__mpz_struct *)(e_acsl_21)); - } - + e_acsl_assert(! (123 >= -12),(char *)"Assertion",(char *)"(123 >= -12)",25); /*@ assert -0xff ≡ -0xff; */ ; - { - mpz_t e_acsl_23; - mpz_t e_acsl_24; - int e_acsl_25; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_23),(long)0xff); - __gmpz_init((__mpz_struct *)(e_acsl_24)); - __gmpz_neg((__mpz_struct *)(e_acsl_24),(__mpz_struct const *)(e_acsl_23)); - e_acsl_25 = __gmpz_cmp((__mpz_struct const *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_24)); - e_acsl_assert(! (e_acsl_25 == 0),(char *)"Assertion", - (char *)"(-0xff == -0xff)",26); - __gmpz_clear((__mpz_struct *)(e_acsl_23)); - __gmpz_clear((__mpz_struct *)(e_acsl_24)); - } - + e_acsl_assert(! (-0xff == -0xff),(char *)"Assertion", + (char *)"(-0xff == -0xff)",26); /*@ assert 1 ≢ -2; */ ; - { - mpz_t e_acsl_26; - mpz_t e_acsl_27; - mpz_t e_acsl_28; - int e_acsl_29; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)1); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_28)); - __gmpz_neg((__mpz_struct *)(e_acsl_28),(__mpz_struct const *)(e_acsl_27)); - e_acsl_29 = __gmpz_cmp((__mpz_struct const *)(e_acsl_26), - (__mpz_struct const *)(e_acsl_28)); - e_acsl_assert(! (e_acsl_29 != 0),(char *)"Assertion",(char *)"(1 != -2)", - 27); - __gmpz_clear((__mpz_struct *)(e_acsl_26)); - __gmpz_clear((__mpz_struct *)(e_acsl_27)); - __gmpz_clear((__mpz_struct *)(e_acsl_28)); - } - + e_acsl_assert(! (1 != -2),(char *)"Assertion",(char *)"(1 != -2)",27); __retres = 0; return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_function_contract.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_function_contract.c index 87e9670420c..bb8cb7e621d 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_function_contract.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_function_contract.c @@ -1,34 +1,4 @@ /* 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 mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -51,21 +21,8 @@ int Y = 2; void f(void) { X = 1; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)1); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Postcondition", - (char *)"(X == 1)",9); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - return; - } - + e_acsl_assert(! (X == 1),(char *)"Postcondition",(char *)"(X == 1)",9); + return; } /*@ ensures X ≡ 2; @@ -73,49 +30,16 @@ void f(void) void g(void) { X = 2; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - mpz_t e_acsl_4; - int e_acsl_5; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)2); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Postcondition", - (char *)"(X == 2)",13); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)Y); - e_acsl_5 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_5 == 0),(char *)"Postcondition", - (char *)"(Y == 2)",14); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - return; - } - + e_acsl_assert(! (X == 2),(char *)"Postcondition",(char *)"(X == 2)",13); + e_acsl_assert(! (Y == 2),(char *)"Postcondition",(char *)"(Y == 2)",14); + return; } /*@ requires X ≡ 2; */ void h(void) { - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)2); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Precondition", - (char *)"(X == 2)",18); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - X ++; - } - + e_acsl_assert(! (X == 2),(char *)"Precondition",(char *)"(X == 2)",18); + X ++; return; } @@ -123,32 +47,9 @@ void h(void) requires Y ≡ 2; */ void i(void) { - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)3); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Precondition", - (char *)"(X == 3)",22); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)2); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 == 0),(char *)"Precondition", - (char *)"(Y == 2)",23); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - X += Y; - } - + e_acsl_assert(! (X == 3),(char *)"Precondition",(char *)"(X == 3)",22); + e_acsl_assert(! (Y == 2),(char *)"Precondition",(char *)"(Y == 2)",23); + X += Y; return; } @@ -165,76 +66,15 @@ void i(void) */ void j(void) { - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - mpz_t e_acsl_4; - mpz_t e_acsl_5; - mpz_t e_acsl_6; - int e_acsl_7; - mpz_t e_acsl_8; - int e_acsl_9; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)5); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Precondition", - (char *)"(X == 5)",28); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)3); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)Y); - __gmpz_init((__mpz_struct *)(e_acsl_6)); - __gmpz_add((__mpz_struct *)(e_acsl_6),(__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_7 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_6)); - e_acsl_assert(! (e_acsl_7 == 0),(char *)"Precondition", - (char *)"(X == 3+Y)",31); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)2); - e_acsl_9 = __gmpz_cmp((__mpz_struct const *)(e_acsl_5), - (__mpz_struct const *)(e_acsl_8)); - e_acsl_assert(! (e_acsl_9 == 0),(char *)"Precondition", - (char *)"(Y == 2)",32); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - __gmpz_clear((__mpz_struct *)(e_acsl_6)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - X = 3; - } - - { - mpz_t e_acsl_10; - mpz_t e_acsl_11; - int e_acsl_12; - mpz_t e_acsl_13; - mpz_t e_acsl_14; - mpz_t e_acsl_15; - int e_acsl_16; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)3); - e_acsl_12 = __gmpz_cmp((__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_11)); - e_acsl_assert(! (e_acsl_12 == 0),(char *)"Postcondition", - (char *)"(X == 3)",29); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_14),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_15)); - __gmpz_add((__mpz_struct *)(e_acsl_15),(__mpz_struct const *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_14)); - e_acsl_16 = __gmpz_cmp((__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_15)); - e_acsl_assert(! (e_acsl_16 == 0),(char *)"Postcondition", - (char *)"(X == Y+1)",33); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); - __gmpz_clear((__mpz_struct *)(e_acsl_14)); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - return; - } - + e_acsl_assert(! (X == 5),(char *)"Precondition",(char *)"(X == 5)",28); + e_acsl_assert(! ((long long)X == (long long)3 + (long long)Y), + (char *)"Precondition",(char *)"(X == 3+Y)",31); + e_acsl_assert(! (Y == 2),(char *)"Precondition",(char *)"(Y == 2)",32); + X = 3; + e_acsl_assert(! (X == 3),(char *)"Postcondition",(char *)"(X == 3)",29); + e_acsl_assert(! ((long long)X == (long long)Y + (long long)1), + (char *)"Postcondition",(char *)"(X == Y+1)",33); + return; } /*@ behavior b1: @@ -252,109 +92,27 @@ void j(void) void k(void) { { - mpz_t e_acsl_1; - mpz_t e_acsl_2; + int e_acsl_1; + int e_acsl_2; int e_acsl_3; - int e_acsl_7; - mpz_t e_acsl_8; - int e_acsl_9; - int e_acsl_13; - int e_acsl_17; - int e_acsl_18; - int e_acsl_22; - int e_acsl_28; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)1); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - if (! (e_acsl_3 == 0)) { e_acsl_7 = 1; } - else { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)0); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_7 = e_acsl_6 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - e_acsl_assert(! e_acsl_7,(char *)"Precondition", + int e_acsl_4; + int e_acsl_5; + if (! (X == 1)) { e_acsl_1 = 1; } + else { e_acsl_1 = X == 0; } + e_acsl_assert(! e_acsl_1,(char *)"Precondition", (char *)"(X == 1 ==> X == 0)",39); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)3); - e_acsl_9 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_8)); - if (e_acsl_9 == 0) { - mpz_t e_acsl_10; - mpz_t e_acsl_11; - int e_acsl_12; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)2); - e_acsl_12 = __gmpz_cmp((__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_11)); - e_acsl_13 = e_acsl_12 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - } - else { e_acsl_13 = 0; } - if (! e_acsl_13) { e_acsl_17 = 1; } - else { - mpz_t e_acsl_14; - mpz_t e_acsl_15; - int e_acsl_16; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_14),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)3); - e_acsl_16 = __gmpz_cmp((__mpz_struct const *)(e_acsl_14), - (__mpz_struct const *)(e_acsl_15)); - e_acsl_17 = e_acsl_16 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_14)); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - } - e_acsl_assert(! e_acsl_17,(char *)"Precondition", + if (X == 3) { e_acsl_2 = Y == 2; } + else { e_acsl_2 = 0; } + if (! e_acsl_2) { e_acsl_3 = 1; } + else { e_acsl_3 = X == 3; } + e_acsl_assert(! e_acsl_3,(char *)"Precondition", (char *)"(X == 3 && Y == 2 ==> X == 3)",43); - e_acsl_18 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_8)); - if (e_acsl_18 == 0) { - mpz_t e_acsl_19; - mpz_t e_acsl_20; - int e_acsl_21; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)2); - e_acsl_21 = __gmpz_cmp((__mpz_struct const *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_20)); - e_acsl_22 = e_acsl_21 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_20)); - } - else { e_acsl_22 = 0; } - if (! e_acsl_22) { e_acsl_28 = 1; } - else { - mpz_t e_acsl_23; - mpz_t e_acsl_24; - mpz_t e_acsl_25; - mpz_t e_acsl_26; - int e_acsl_27; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_23),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_24),(long)Y); - __gmpz_init((__mpz_struct *)(e_acsl_25)); - __gmpz_add((__mpz_struct *)(e_acsl_25), - (__mpz_struct const *)(e_acsl_23), - (__mpz_struct const *)(e_acsl_24)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)5); - e_acsl_27 = __gmpz_cmp((__mpz_struct const *)(e_acsl_25), - (__mpz_struct const *)(e_acsl_26)); - e_acsl_28 = e_acsl_27 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_23)); - __gmpz_clear((__mpz_struct *)(e_acsl_24)); - __gmpz_clear((__mpz_struct *)(e_acsl_25)); - __gmpz_clear((__mpz_struct *)(e_acsl_26)); - } - e_acsl_assert(! e_acsl_28,(char *)"Precondition", + if (X == 3) { e_acsl_4 = Y == 2; } + else { e_acsl_4 = 0; } + if (! e_acsl_4) { e_acsl_5 = 1; } + else { e_acsl_5 = (long long)X + (long long)Y == (long long)5; } + e_acsl_assert(! e_acsl_5,(char *)"Precondition", (char *)"(X == 3 && Y == 2 ==> X+Y == 5)",44); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); X += Y; } @@ -365,35 +123,9 @@ void k(void) int l(void) { /*@ assert Y ≡ 2; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)2); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Assertion",(char *)"(Y == 2)", - 50); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - - { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)5); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 == 0),(char *)"Postcondition", - (char *)"(X == 5)",48); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - return (X); - } - + e_acsl_assert(! (Y == 2),(char *)"Assertion",(char *)"(Y == 2)",50); + e_acsl_assert(! (X == 5),(char *)"Postcondition",(char *)"(X == 5)",48); + return (X); } /*@ behavior b1: @@ -410,136 +142,39 @@ int l(void) */ void m(void) { + int e_acsl_1; int e_acsl_4; - int e_acsl_16; - int e_acsl_28; - int e_acsl_30; - e_acsl_30 = X; - { - mpz_t e_acsl_21; - mpz_t e_acsl_22; - int e_acsl_23; - int e_acsl_27; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_21),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_22),(long)5); - e_acsl_23 = __gmpz_cmp((__mpz_struct const *)(e_acsl_21), - (__mpz_struct const *)(e_acsl_22)); - if (e_acsl_23 == 0) { - mpz_t e_acsl_24; - mpz_t e_acsl_25; - int e_acsl_26; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_24),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_25),(long)2); - e_acsl_26 = __gmpz_cmp((__mpz_struct const *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_25)); - e_acsl_27 = e_acsl_26 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_24)); - __gmpz_clear((__mpz_struct *)(e_acsl_25)); - } - else { e_acsl_27 = 0; } - e_acsl_28 = e_acsl_27; - __gmpz_clear((__mpz_struct *)(e_acsl_21)); - __gmpz_clear((__mpz_struct *)(e_acsl_22)); + int e_acsl_7; + int e_acsl_8; + e_acsl_8 = X; + { int e_acsl_6; + if (X == 5) { e_acsl_6 = Y == 2; } + else { e_acsl_6 = 0; } + e_acsl_7 = e_acsl_6; } - { - mpz_t e_acsl_9; - mpz_t e_acsl_10; - int e_acsl_11; - int e_acsl_15; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)5); - e_acsl_11 = __gmpz_cmp((__mpz_struct const *)(e_acsl_9), - (__mpz_struct const *)(e_acsl_10)); - if (e_acsl_11 == 0) { - mpz_t e_acsl_12; - mpz_t e_acsl_13; - int e_acsl_14; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_12),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)2); - e_acsl_14 = __gmpz_cmp((__mpz_struct const *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_13)); - e_acsl_15 = e_acsl_14 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_12)); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); - } - else { e_acsl_15 = 0; } - e_acsl_16 = e_acsl_15; - __gmpz_clear((__mpz_struct *)(e_acsl_9)); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - } - - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)7); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_4 = e_acsl_3 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); + { int e_acsl_3; + if (X == 5) { e_acsl_3 = Y == 2; } + else { e_acsl_3 = 0; } + e_acsl_4 = e_acsl_3; } + e_acsl_1 = X == 7; X += Y; - { - int e_acsl_8; - int e_acsl_20; - int e_acsl_35; - if (! e_acsl_4) { e_acsl_8 = 1; } - else { - mpz_t e_acsl_5; - mpz_t e_acsl_6; - int e_acsl_7; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_6),(long)95); - e_acsl_7 = __gmpz_cmp((__mpz_struct const *)(e_acsl_5), - (__mpz_struct const *)(e_acsl_6)); - e_acsl_8 = e_acsl_7 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - __gmpz_clear((__mpz_struct *)(e_acsl_6)); - } - e_acsl_assert(! e_acsl_8,(char *)"Postcondition", + { int e_acsl_2; + int e_acsl_5; + int e_acsl_9; + if (! e_acsl_1) { e_acsl_2 = 1; } + else { e_acsl_2 = X == 95; } + e_acsl_assert(! e_acsl_2,(char *)"Postcondition", (char *)"(\\old(X == 7) ==> X == 95)",57); - if (! e_acsl_16) { e_acsl_20 = 1; } - else { - mpz_t e_acsl_17; - mpz_t e_acsl_18; - int e_acsl_19; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_18),(long)7); - e_acsl_19 = __gmpz_cmp((__mpz_struct const *)(e_acsl_17), - (__mpz_struct const *)(e_acsl_18)); - e_acsl_20 = e_acsl_19 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_17)); - __gmpz_clear((__mpz_struct *)(e_acsl_18)); - } - e_acsl_assert(! e_acsl_20,(char *)"Postcondition", + if (! e_acsl_4) { e_acsl_5 = 1; } + else { e_acsl_5 = X == 7; } + e_acsl_assert(! e_acsl_5,(char *)"Postcondition", (char *)"(\\old(X == 5 && Y == 2) ==> X == 7)",61); - if (! e_acsl_28) { e_acsl_35 = 1; } - else { - mpz_t e_acsl_29; - mpz_t e_acsl_31; - mpz_t e_acsl_32; - mpz_t e_acsl_33; - int e_acsl_34; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_29),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)e_acsl_30); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_32),(long)Y); - __gmpz_init((__mpz_struct *)(e_acsl_33)); - __gmpz_add((__mpz_struct *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_31), - (__mpz_struct const *)(e_acsl_32)); - e_acsl_34 = __gmpz_cmp((__mpz_struct const *)(e_acsl_29), - (__mpz_struct const *)(e_acsl_33)); - e_acsl_35 = e_acsl_34 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_29)); - __gmpz_clear((__mpz_struct *)(e_acsl_31)); - __gmpz_clear((__mpz_struct *)(e_acsl_32)); - __gmpz_clear((__mpz_struct *)(e_acsl_33)); - } - e_acsl_assert(! e_acsl_35,(char *)"Postcondition", + if (! e_acsl_7) { e_acsl_9 = 1; } + else { e_acsl_9 = (long long)X == (long long)e_acsl_8 + (long long)Y; } + e_acsl_assert(! e_acsl_9,(char *)"Postcondition", (char *)"(\\old(X == 5 && Y == 2) ==> X == \\old(X)+Y)",62); return; } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_integer_constant.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_integer_constant.c index c1c9b8bff3b..3768f566326 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_integer_constant.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_integer_constant.c @@ -1,23 +1,4 @@ /* 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 mpz_t[1]; -/*@ ensures \valid(\old(z)); - assigns *z; */ -extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, - int base); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -44,17 +25,9 @@ int main(void) /*@ assert 0 ≢ 1; */ ; e_acsl_assert(! (0 != 1),(char *)"Assertion",(char *)"(0 != 1)",9); /*@ assert 1152921504606846975 ≡ 0xfffffffffffffff; */ ; - { - mpz_t e_acsl_1; - int e_acsl_2; - __gmpz_init_set_str((__mpz_struct *)(e_acsl_1),"1152921504606846975",10); - e_acsl_2 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_1)); - e_acsl_assert(! (e_acsl_2 == 0),(char *)"Assertion", - (char *)"(1152921504606846975 == 0xfffffffffffffff)",10); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - } - + e_acsl_assert(! ((unsigned long long)1152921504606846975 == (unsigned long long)0xfffffffffffffff), + (char *)"Assertion", + (char *)"(1152921504606846975 == 0xfffffffffffffff)",10); __retres = 0; return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_invariant.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_invariant.c index 4d155e54c5b..744b9718dfc 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_invariant.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_invariant.c @@ -1,23 +1,4 @@ /* 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 mpz_t[1]; -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -45,32 +26,11 @@ int main(void) while (1) { if (! (i < 10)) { break; } /*@ invariant 0 ≤ i ∧ i < 10; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - int e_acsl_7; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)0); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)i); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - if (e_acsl_3 <= 0) { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)i); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)10); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_7 = e_acsl_6 < 0; - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - else { e_acsl_7 = 0; } - e_acsl_assert(! e_acsl_7,(char *)"Invariant", + { int e_acsl_1; + if (0 <= i) { e_acsl_1 = i < 10; } + else { e_acsl_1 = 0; } + e_acsl_assert(! e_acsl_1,(char *)"Invariant", (char *)"(0 <= i && i < 10)",8); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); } x += i; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_labeled_stmt.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_labeled_stmt.c index 7032d842cfa..9b4ad945590 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_labeled_stmt.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_labeled_stmt.c @@ -1,23 +1,4 @@ /* 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 mpz_t[1]; -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -42,52 +23,16 @@ int main(void) goto L1; L1: /*@ assert X ≡ 0; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)0); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Assertion",(char *)"(X == 0)", - 11); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - + e_acsl_assert(! (X == 0),(char *)"Assertion",(char *)"(X == 0)",11); X = 1; goto L2; L2: /*@ requires X ≡ 1; ensures X ≡ 2; */ { - mpz_t e_acsl_7; - mpz_t e_acsl_8; - int e_acsl_9; - { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)1); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 == 0),(char *)"Precondition", - (char *)"(X == 1)",13); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - X = 2; - } - - __gmpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)2); - e_acsl_9 = __gmpz_cmp((__mpz_struct const *)(e_acsl_7), - (__mpz_struct const *)(e_acsl_8)); - e_acsl_assert(! (e_acsl_9 == 0),(char *)"Postcondition", - (char *)"(X == 2)",13); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); + e_acsl_assert(! (X == 1),(char *)"Precondition",(char *)"(X == 1)",13); + X = 2; + e_acsl_assert(! (X == 2),(char *)"Postcondition",(char *)"(X == 2)",13); } if (X) { @@ -95,22 +40,9 @@ int main(void) __retres = 0; goto return_label; } __retres = 0; - return_label: - { - mpz_t e_acsl_10; - mpz_t e_acsl_11; - int e_acsl_12; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)3); - e_acsl_12 = __gmpz_cmp((__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_11)); - e_acsl_assert(! (e_acsl_12 == 0),(char *)"Postcondition", - (char *)"(X == 3)",8); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - return (__retres); - } - + return_label: e_acsl_assert(! (X == 3),(char *)"Postcondition", + (char *)"(X == 3)",8); + return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_lazy.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_lazy.c index f35278396fd..435d79df3ff 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_lazy.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_lazy.c @@ -1,23 +1,4 @@ /* 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 mpz_t[1]; -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -42,439 +23,157 @@ int main(void) x = 0; y = 1; /*@ assert x ≡ 0 ∧ y ≡ 1; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - int e_acsl_7; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)0); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - if (e_acsl_3 == 0) { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)1); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_7 = e_acsl_6 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - else { e_acsl_7 = 0; } - e_acsl_assert(! e_acsl_7,(char *)"Assertion", + { int e_acsl_1; + if (x == 0) { e_acsl_1 = y == 1; } + else { e_acsl_1 = 0; } + e_acsl_assert(! e_acsl_1,(char *)"Assertion", (char *)"(x == 0 && y == 1)",10); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); } /*@ assert ¬(x ≢ 0 ∧ y ≡ 1/0); */ ; { - mpz_t e_acsl_8; - mpz_t e_acsl_9; - int e_acsl_10; - int e_acsl_15; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)0); - e_acsl_10 = __gmpz_cmp((__mpz_struct const *)(e_acsl_8), - (__mpz_struct const *)(e_acsl_9)); - if (e_acsl_10 != 0) { - mpz_t e_acsl_11; - int e_acsl_12; - mpz_t e_acsl_13; - int e_acsl_14; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)y); + int e_acsl_3; + if (x != 0) { + int e_acsl_2; /*@ assert 0 ≢ 0; */ ; e_acsl_assert(0 == 0,(char *)"Assertion",(char *)"(0 == 0)",11); - e_acsl_12 = 1 / 0; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)e_acsl_12); - e_acsl_14 = __gmpz_cmp((__mpz_struct const *)(e_acsl_11), - (__mpz_struct const *)(e_acsl_13)); - e_acsl_15 = e_acsl_14 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); + e_acsl_2 = 1 / 0; + e_acsl_3 = y == e_acsl_2; } - else { e_acsl_15 = 0; } - e_acsl_assert(! (! e_acsl_15),(char *)"Assertion", + else { e_acsl_3 = 0; } + e_acsl_assert(! (! e_acsl_3),(char *)"Assertion", (char *)"(!(x != 0 && y == 1/0))",11); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - __gmpz_clear((__mpz_struct *)(e_acsl_9)); } /*@ assert y ≡ 1 ∨ x ≡ 1; */ ; - { - mpz_t e_acsl_16; - mpz_t e_acsl_17; - int e_acsl_18; - int e_acsl_22; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)1); - e_acsl_18 = __gmpz_cmp((__mpz_struct const *)(e_acsl_16), - (__mpz_struct const *)(e_acsl_17)); - if (e_acsl_18 == 0) { e_acsl_22 = 1; } - else { - mpz_t e_acsl_19; - mpz_t e_acsl_20; - int e_acsl_21; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)1); - e_acsl_21 = __gmpz_cmp((__mpz_struct const *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_20)); - e_acsl_22 = e_acsl_21 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_20)); - } - e_acsl_assert(! e_acsl_22,(char *)"Assertion", + { int e_acsl_4; + if (y == 1) { e_acsl_4 = 1; } + else { e_acsl_4 = x == 1; } + e_acsl_assert(! e_acsl_4,(char *)"Assertion", (char *)"(y == 1 || x == 1)",12); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - __gmpz_clear((__mpz_struct *)(e_acsl_17)); } /*@ assert x ≡ 0 ∨ y ≡ 1/0; */ ; { - mpz_t e_acsl_23; - mpz_t e_acsl_24; - int e_acsl_25; - int e_acsl_30; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_23),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_24),(long)0); - e_acsl_25 = __gmpz_cmp((__mpz_struct const *)(e_acsl_23), - (__mpz_struct const *)(e_acsl_24)); - if (e_acsl_25 == 0) { e_acsl_30 = 1; } + int e_acsl_6; + if (x == 0) { e_acsl_6 = 1; } else { - mpz_t e_acsl_26; - int e_acsl_27; - mpz_t e_acsl_28; - int e_acsl_29; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)y); + int e_acsl_5; /*@ assert 0 ≢ 0; */ ; e_acsl_assert(0 == 0,(char *)"Assertion",(char *)"(0 == 0)",13); - e_acsl_27 = 1 / 0; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_28),(long)e_acsl_27); - e_acsl_29 = __gmpz_cmp((__mpz_struct const *)(e_acsl_26), - (__mpz_struct const *)(e_acsl_28)); - e_acsl_30 = e_acsl_29 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_26)); - __gmpz_clear((__mpz_struct *)(e_acsl_28)); + e_acsl_5 = 1 / 0; + e_acsl_6 = y == e_acsl_5; } - e_acsl_assert(! e_acsl_30,(char *)"Assertion", + e_acsl_assert(! e_acsl_6,(char *)"Assertion", (char *)"(x == 0 || y == 1/0)",13); - __gmpz_clear((__mpz_struct *)(e_acsl_23)); - __gmpz_clear((__mpz_struct *)(e_acsl_24)); } /*@ assert x ≡ 0 ⇒ y ≡ 1; */ ; - { - mpz_t e_acsl_31; - mpz_t e_acsl_32; - int e_acsl_33; - int e_acsl_37; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_32),(long)0); - e_acsl_33 = __gmpz_cmp((__mpz_struct const *)(e_acsl_31), - (__mpz_struct const *)(e_acsl_32)); - if (! (e_acsl_33 == 0)) { e_acsl_37 = 1; } - else { - mpz_t e_acsl_34; - mpz_t e_acsl_35; - int e_acsl_36; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_34),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)1); - e_acsl_36 = __gmpz_cmp((__mpz_struct const *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_35)); - e_acsl_37 = e_acsl_36 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_34)); - __gmpz_clear((__mpz_struct *)(e_acsl_35)); - } - e_acsl_assert(! e_acsl_37,(char *)"Assertion", + { int e_acsl_7; + if (! (x == 0)) { e_acsl_7 = 1; } + else { e_acsl_7 = y == 1; } + e_acsl_assert(! e_acsl_7,(char *)"Assertion", (char *)"(x == 0 ==> y == 1)",14); - __gmpz_clear((__mpz_struct *)(e_acsl_31)); - __gmpz_clear((__mpz_struct *)(e_acsl_32)); } /*@ assert x ≡ 1 ⇒ y ≡ 1/0; */ ; { - mpz_t e_acsl_38; - mpz_t e_acsl_39; - int e_acsl_40; - int e_acsl_45; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_38),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_39),(long)1); - e_acsl_40 = __gmpz_cmp((__mpz_struct const *)(e_acsl_38), - (__mpz_struct const *)(e_acsl_39)); - if (! (e_acsl_40 == 0)) { e_acsl_45 = 1; } + int e_acsl_9; + if (! (x == 1)) { e_acsl_9 = 1; } else { - mpz_t e_acsl_41; - int e_acsl_42; - mpz_t e_acsl_43; - int e_acsl_44; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_41),(long)y); + int e_acsl_8; /*@ assert 0 ≢ 0; */ ; e_acsl_assert(0 == 0,(char *)"Assertion",(char *)"(0 == 0)",15); - e_acsl_42 = 1 / 0; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_43),(long)e_acsl_42); - e_acsl_44 = __gmpz_cmp((__mpz_struct const *)(e_acsl_41), - (__mpz_struct const *)(e_acsl_43)); - e_acsl_45 = e_acsl_44 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_41)); - __gmpz_clear((__mpz_struct *)(e_acsl_43)); + e_acsl_8 = 1 / 0; + e_acsl_9 = y == e_acsl_8; } - e_acsl_assert(! e_acsl_45,(char *)"Assertion", + e_acsl_assert(! e_acsl_9,(char *)"Assertion", (char *)"(x == 1 ==> y == 1/0)",15); - __gmpz_clear((__mpz_struct *)(e_acsl_38)); - __gmpz_clear((__mpz_struct *)(e_acsl_39)); } /*@ assert x≢0? x ≢ 0: y ≢ 0; */ ; - { - mpz_t e_acsl_46; - mpz_t e_acsl_47; - int e_acsl_48; - int e_acsl_49; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_46),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_47),(long)0); - e_acsl_48 = __gmpz_cmp((__mpz_struct const *)(e_acsl_46), - (__mpz_struct const *)(e_acsl_47)); - if (e_acsl_48 != 0) { e_acsl_49 = x != 0; } - else { e_acsl_49 = y != 0; } - e_acsl_assert(! e_acsl_49,(char *)"Assertion", + { int e_acsl_10; + if (x != 0) { e_acsl_10 = x != 0; } + else { e_acsl_10 = y != 0; } + e_acsl_assert(! e_acsl_10,(char *)"Assertion", (char *)"(x!=0? x != 0: y != 0)",16); - __gmpz_clear((__mpz_struct *)(e_acsl_46)); - __gmpz_clear((__mpz_struct *)(e_acsl_47)); } /*@ assert y≢0? y ≢ 0: x ≢ 0; */ ; - { - mpz_t e_acsl_50; - mpz_t e_acsl_51; - int e_acsl_52; - int e_acsl_53; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_50),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_51),(long)0); - e_acsl_52 = __gmpz_cmp((__mpz_struct const *)(e_acsl_50), - (__mpz_struct const *)(e_acsl_51)); - if (e_acsl_52 != 0) { e_acsl_53 = y != 0; } - else { e_acsl_53 = x != 0; } - e_acsl_assert(! e_acsl_53,(char *)"Assertion", + { int e_acsl_11; + if (y != 0) { e_acsl_11 = y != 0; } + else { e_acsl_11 = x != 0; } + e_acsl_assert(! e_acsl_11,(char *)"Assertion", (char *)"(y!=0? y != 0: x != 0)",17); - __gmpz_clear((__mpz_struct *)(e_acsl_50)); - __gmpz_clear((__mpz_struct *)(e_acsl_51)); } /*@ assert x≡1? x ≡ 18: x ≡ 0; */ ; - { - mpz_t e_acsl_54; - mpz_t e_acsl_55; - int e_acsl_56; - int e_acsl_63; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_54),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_55),(long)1); - e_acsl_56 = __gmpz_cmp((__mpz_struct const *)(e_acsl_54), - (__mpz_struct const *)(e_acsl_55)); - if (e_acsl_56 == 0) { - mpz_t e_acsl_57; - mpz_t e_acsl_58; - int e_acsl_59; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_57),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_58),(long)18); - e_acsl_59 = __gmpz_cmp((__mpz_struct const *)(e_acsl_57), - (__mpz_struct const *)(e_acsl_58)); - e_acsl_63 = e_acsl_59 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_57)); - __gmpz_clear((__mpz_struct *)(e_acsl_58)); - } - else { - mpz_t e_acsl_60; - mpz_t e_acsl_61; - int e_acsl_62; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_60),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_61),(long)0); - e_acsl_62 = __gmpz_cmp((__mpz_struct const *)(e_acsl_60), - (__mpz_struct const *)(e_acsl_61)); - e_acsl_63 = e_acsl_62 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_60)); - __gmpz_clear((__mpz_struct *)(e_acsl_61)); - } - e_acsl_assert(! e_acsl_63,(char *)"Assertion", + { int e_acsl_12; + if (x == 1) { e_acsl_12 = x == 18; } + else { e_acsl_12 = x == 0; } + e_acsl_assert(! e_acsl_12,(char *)"Assertion", (char *)"(x==1? x == 18: x == 0)",18); - __gmpz_clear((__mpz_struct *)(e_acsl_54)); - __gmpz_clear((__mpz_struct *)(e_acsl_55)); } /*@ assert x ≡ 2 ⇔ y ≡ 3; */ ; - { - mpz_t e_acsl_64; - mpz_t e_acsl_65; - int e_acsl_66; - int e_acsl_70; - int e_acsl_78; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_64),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_65),(long)2); - e_acsl_66 = __gmpz_cmp((__mpz_struct const *)(e_acsl_64), - (__mpz_struct const *)(e_acsl_65)); - if (! (e_acsl_66 == 0)) { e_acsl_70 = 1; } - else { - mpz_t e_acsl_67; - mpz_t e_acsl_68; - int e_acsl_69; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_67),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_68),(long)3); - e_acsl_69 = __gmpz_cmp((__mpz_struct const *)(e_acsl_67), - (__mpz_struct const *)(e_acsl_68)); - e_acsl_70 = e_acsl_69 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_67)); - __gmpz_clear((__mpz_struct *)(e_acsl_68)); - } - if (e_acsl_70) { - mpz_t e_acsl_71; - mpz_t e_acsl_72; - int e_acsl_73; - int e_acsl_77; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_71),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_72),(long)3); - e_acsl_73 = __gmpz_cmp((__mpz_struct const *)(e_acsl_71), - (__mpz_struct const *)(e_acsl_72)); - if (! (e_acsl_73 == 0)) { e_acsl_77 = 1; } - else { - mpz_t e_acsl_74; - mpz_t e_acsl_75; - int e_acsl_76; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_74),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_75),(long)2); - e_acsl_76 = __gmpz_cmp((__mpz_struct const *)(e_acsl_74), - (__mpz_struct const *)(e_acsl_75)); - e_acsl_77 = e_acsl_76 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_74)); - __gmpz_clear((__mpz_struct *)(e_acsl_75)); - } - e_acsl_78 = e_acsl_77; - __gmpz_clear((__mpz_struct *)(e_acsl_71)); - __gmpz_clear((__mpz_struct *)(e_acsl_72)); + { int e_acsl_13; + int e_acsl_15; + if (! (x == 2)) { e_acsl_13 = 1; } + else { e_acsl_13 = y == 3; } + if (e_acsl_13) { + int e_acsl_14; + if (! (y == 3)) { e_acsl_14 = 1; } + else { e_acsl_14 = x == 2; } + e_acsl_15 = e_acsl_14; } - else { e_acsl_78 = 0; } - e_acsl_assert(! e_acsl_78,(char *)"Assertion", + else { e_acsl_15 = 0; } + e_acsl_assert(! e_acsl_15,(char *)"Assertion", (char *)"(x == 2 <==> y == 3)",21); - __gmpz_clear((__mpz_struct *)(e_acsl_64)); - __gmpz_clear((__mpz_struct *)(e_acsl_65)); } /*@ assert x ≡ 0 ⇔ y ≡ 1; */ ; - { - mpz_t e_acsl_79; - mpz_t e_acsl_80; - int e_acsl_81; - int e_acsl_85; - int e_acsl_93; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_79),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_80),(long)0); - e_acsl_81 = __gmpz_cmp((__mpz_struct const *)(e_acsl_79), - (__mpz_struct const *)(e_acsl_80)); - if (! (e_acsl_81 == 0)) { e_acsl_85 = 1; } - else { - mpz_t e_acsl_82; - mpz_t e_acsl_83; - int e_acsl_84; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_82),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_83),(long)1); - e_acsl_84 = __gmpz_cmp((__mpz_struct const *)(e_acsl_82), - (__mpz_struct const *)(e_acsl_83)); - e_acsl_85 = e_acsl_84 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_82)); - __gmpz_clear((__mpz_struct *)(e_acsl_83)); - } - if (e_acsl_85) { - mpz_t e_acsl_86; - mpz_t e_acsl_87; - int e_acsl_88; - int e_acsl_92; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_86),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_87),(long)1); - e_acsl_88 = __gmpz_cmp((__mpz_struct const *)(e_acsl_86), - (__mpz_struct const *)(e_acsl_87)); - if (! (e_acsl_88 == 0)) { e_acsl_92 = 1; } - else { - mpz_t e_acsl_89; - mpz_t e_acsl_90; - int e_acsl_91; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_89),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_90),(long)0); - e_acsl_91 = __gmpz_cmp((__mpz_struct const *)(e_acsl_89), - (__mpz_struct const *)(e_acsl_90)); - e_acsl_92 = e_acsl_91 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_89)); - __gmpz_clear((__mpz_struct *)(e_acsl_90)); - } - e_acsl_93 = e_acsl_92; - __gmpz_clear((__mpz_struct *)(e_acsl_86)); - __gmpz_clear((__mpz_struct *)(e_acsl_87)); + { int e_acsl_16; + int e_acsl_18; + if (! (x == 0)) { e_acsl_16 = 1; } + else { e_acsl_16 = y == 1; } + if (e_acsl_16) { + int e_acsl_17; + if (! (y == 1)) { e_acsl_17 = 1; } + else { e_acsl_17 = x == 0; } + e_acsl_18 = e_acsl_17; } - else { e_acsl_93 = 0; } - e_acsl_assert(! e_acsl_93,(char *)"Assertion", + else { e_acsl_18 = 0; } + e_acsl_assert(! e_acsl_18,(char *)"Assertion", (char *)"(x == 0 <==> y == 1)",22); - __gmpz_clear((__mpz_struct *)(e_acsl_79)); - __gmpz_clear((__mpz_struct *)(e_acsl_80)); } /*@ assert ((x≢0? x: y)≢0) ≡ (x≡0); */ ; - { - mpz_t e_acsl_94; - mpz_t e_acsl_95; - int e_acsl_96; - int e_acsl_97; - mpz_t e_acsl_98; - int e_acsl_99; - int e_acsl_100; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_94),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_95),(long)0); - e_acsl_96 = __gmpz_cmp((__mpz_struct const *)(e_acsl_94), - (__mpz_struct const *)(e_acsl_95)); - if (e_acsl_96 != 0) { e_acsl_97 = x; } - else { e_acsl_97 = y; } - __gmpz_init_set_si((__mpz_struct *)(e_acsl_98),(long)e_acsl_97); - e_acsl_99 = __gmpz_cmp((__mpz_struct const *)(e_acsl_98), - (__mpz_struct const *)(e_acsl_95)); - e_acsl_100 = __gmpz_cmp((__mpz_struct const *)(e_acsl_94), - (__mpz_struct const *)(e_acsl_95)); - e_acsl_assert(! ((e_acsl_99 != 0) == (e_acsl_100 == 0)), - (char *)"Assertion", + { int e_acsl_19; + if (x != 0) { e_acsl_19 = x; } + else { e_acsl_19 = y; } + e_acsl_assert(! ((e_acsl_19 != 0) == (x == 0)),(char *)"Assertion", (char *)"(((x!=0? x: y)!=0) == (x==0))",25); - __gmpz_clear((__mpz_struct *)(e_acsl_94)); - __gmpz_clear((__mpz_struct *)(e_acsl_95)); - __gmpz_clear((__mpz_struct *)(e_acsl_98)); } /*@ assert (x ≢ 0 ∧ y ≢ 0) ∨ y ≢ 0; */ ; - { int e_acsl_101; - int e_acsl_102; - if (x != 0) { e_acsl_101 = y != 0; } - else { e_acsl_101 = 0; } - if (e_acsl_101) { e_acsl_102 = 1; } - else { e_acsl_102 = y != 0; } - e_acsl_assert(! e_acsl_102,(char *)"Assertion", + { int e_acsl_20; + int e_acsl_21; + if (x != 0) { e_acsl_20 = y != 0; } + else { e_acsl_20 = 0; } + if (e_acsl_20) { e_acsl_21 = 1; } + else { e_acsl_21 = y != 0; } + e_acsl_assert(! e_acsl_21,(char *)"Assertion", (char *)"((x != 0 && y != 0) || y != 0)",26); } /*@ assert (x ≢ 0 ∨ y ≢ 0) ∧ y ≡ 1; */ ; - { int e_acsl_103; - int e_acsl_107; - if (x != 0) { e_acsl_103 = 1; } - else { e_acsl_103 = y != 0; } - if (e_acsl_103) { - mpz_t e_acsl_104; - mpz_t e_acsl_105; - int e_acsl_106; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_104),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_105),(long)1); - e_acsl_106 = __gmpz_cmp((__mpz_struct const *)(e_acsl_104), - (__mpz_struct const *)(e_acsl_105)); - e_acsl_107 = e_acsl_106 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_104)); - __gmpz_clear((__mpz_struct *)(e_acsl_105)); - } - else { e_acsl_107 = 0; } - e_acsl_assert(! e_acsl_107,(char *)"Assertion", + { int e_acsl_22; + int e_acsl_23; + if (x != 0) { e_acsl_22 = 1; } + else { e_acsl_22 = y != 0; } + if (e_acsl_22) { e_acsl_23 = y == 1; } + else { e_acsl_23 = 0; } + e_acsl_assert(! e_acsl_23,(char *)"Assertion", (char *)"((x != 0 || y != 0) && y == 1)",27); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_linear_search.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_linear_search.c index e467aa549cd..05f90d8b635 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_linear_search.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_linear_search.c @@ -1,42 +1,4 @@ /* 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 mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(z_orig); - requires \valid(z); - assigns *z; */ -extern void __gmpz_set(__mpz_struct * /*[1]*/ z, - __mpz_struct const * /*[1]*/ z_orig); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z); - assigns \nothing; */ -extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -54,13 +16,13 @@ void e_acsl_assert(int predicate, char *kind, char *pred_txt, int line) } int A[10]; -/*@ requires ∀ ℤ i; 0 ≤ i ∧ i < 9 ⇒ A[i] ≤ A[i+1]; +/*@ requires ∀ int i; 0 ≤ i ∧ i < 9 ⇒ A[i] ≤ A[i+1]; behavior exists: - assumes ∃ ℤ j; (0 ≤ j ∧ j < 10) ∧ A[j] ≡ elt; + assumes ∃ int j; (0 ≤ j ∧ j < 10) ∧ A[j] ≡ elt; ensures \result ≡ 1; behavior not_exists: - assumes ∀ ℤ j; 0 ≤ j ∧ j < 10 ⇒ A[j] ≢ elt; + assumes ∀ int j; 0 ≤ j ∧ j < 10 ⇒ A[j] ≢ elt; ensures \result ≡ 0; @@ -69,175 +31,56 @@ int search(int elt) { int __retres; int k; - int e_acsl_20; - int e_acsl_33; + int e_acsl_5; + int e_acsl_9; { - mpz_t e_acsl_1; + int e_acsl_1; int e_acsl_2; - e_acsl_2 = 1; - __gmpz_init((__mpz_struct *)(e_acsl_1)); - { - mpz_t e_acsl_7; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_1),(__mpz_struct const *)(e_acsl_7)); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); - } - + e_acsl_1 = 1; + e_acsl_2 = 0; while (1) { - { - mpz_t e_acsl_8; - int e_acsl_9; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)9); - e_acsl_9 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_8)); - if (! (e_acsl_9 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - } - - { - int e_acsl_3; - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - e_acsl_3 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_1)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_5)); - __gmpz_add((__mpz_struct *)(e_acsl_5), - (__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_4)); - e_acsl_6 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_5)); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - if (! (A[e_acsl_3] <= A[e_acsl_6])) { - e_acsl_2 = 0; - goto e_acsl_end_loop1; - } - } - - { - mpz_t e_acsl_10; - mpz_t e_acsl_11; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_11)); - __gmpz_add((__mpz_struct *)(e_acsl_11), - (__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_10)); - __gmpz_set((__mpz_struct *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_11)); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); + if (! (e_acsl_2 < 9)) { break; } + if (! (A[e_acsl_2] <= A[e_acsl_2 + 1])) { + e_acsl_1 = 0; + goto e_acsl_end_loop1; } - + e_acsl_2 ++; } e_acsl_end_loop1: ; - e_acsl_assert(! e_acsl_2,(char *)"Precondition", - (char *)"(\\forall integer i; 0 <= i && i < 9 ==> A[i] <= A[i+1])", + e_acsl_assert(! e_acsl_1,(char *)"Precondition", + (char *)"(\\forall int i; 0 <= i && i < 9 ==> A[i] <= A[i+1])", 8); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); { - mpz_t e_acsl_25; - int e_acsl_26; - e_acsl_26 = 1; - __gmpz_init((__mpz_struct *)(e_acsl_25)); - { - mpz_t e_acsl_28; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_28),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_25), - (__mpz_struct const *)(e_acsl_28)); - __gmpz_clear((__mpz_struct *)(e_acsl_28)); - } - + int e_acsl_7; + int e_acsl_8; + e_acsl_7 = 1; + e_acsl_8 = 0; while (1) { - { - mpz_t e_acsl_29; - int e_acsl_30; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_29),(long)10); - e_acsl_30 = __gmpz_cmp((__mpz_struct const *)(e_acsl_25), - (__mpz_struct const *)(e_acsl_29)); - if (! (e_acsl_30 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_29)); - } - - { - int e_acsl_27; - e_acsl_27 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_25)); - if (! (A[e_acsl_27] != elt)) { - e_acsl_26 = 0; - goto e_acsl_end_loop3; - } - } - - { - mpz_t e_acsl_31; - mpz_t e_acsl_32; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_32)); - __gmpz_add((__mpz_struct *)(e_acsl_32), - (__mpz_struct const *)(e_acsl_25), - (__mpz_struct const *)(e_acsl_31)); - __gmpz_set((__mpz_struct *)(e_acsl_25), - (__mpz_struct const *)(e_acsl_32)); - __gmpz_clear((__mpz_struct *)(e_acsl_31)); - __gmpz_clear((__mpz_struct *)(e_acsl_32)); - } - + if (! (e_acsl_8 < 10)) { break; } + if (! (A[e_acsl_8] != elt)) { + e_acsl_7 = 0; + goto e_acsl_end_loop3; } + e_acsl_8 ++; } e_acsl_end_loop3: ; - e_acsl_33 = e_acsl_26; - __gmpz_clear((__mpz_struct *)(e_acsl_25)); + e_acsl_9 = e_acsl_7; } { - mpz_t e_acsl_12; - int e_acsl_13; - e_acsl_13 = 0; - __gmpz_init((__mpz_struct *)(e_acsl_12)); - { - mpz_t e_acsl_15; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_15)); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - } - + int e_acsl_3; + int e_acsl_4; + e_acsl_3 = 0; + e_acsl_4 = 0; while (1) { - { - mpz_t e_acsl_16; - int e_acsl_17; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)10); - e_acsl_17 = __gmpz_cmp((__mpz_struct const *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_16)); - if (! (e_acsl_17 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - } - - { - int e_acsl_14; - e_acsl_14 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_12)); - if (! (! (A[e_acsl_14] == elt))) { - e_acsl_13 = 1; - goto e_acsl_end_loop2; - } + if (! (e_acsl_4 < 10)) { break; } + if (! (! (A[e_acsl_4] == elt))) { + e_acsl_3 = 1; + goto e_acsl_end_loop2; } - - { - mpz_t e_acsl_18; - mpz_t e_acsl_19; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_18),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_19)); - __gmpz_add((__mpz_struct *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_18)); - __gmpz_set((__mpz_struct *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_18)); - __gmpz_clear((__mpz_struct *)(e_acsl_19)); - } - + e_acsl_4 ++; } e_acsl_end_loop2: ; - e_acsl_20 = e_acsl_13; - __gmpz_clear((__mpz_struct *)(e_acsl_12)); + e_acsl_5 = e_acsl_3; } k = 0; @@ -256,40 +99,17 @@ int search(int elt) } __retres = 0; return_label: - { - int e_acsl_24; - int e_acsl_37; - if (! e_acsl_20) { e_acsl_24 = 1; } - else { - mpz_t e_acsl_21; - mpz_t e_acsl_22; - int e_acsl_23; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_21),(long)__retres); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_22),(long)1); - e_acsl_23 = __gmpz_cmp((__mpz_struct const *)(e_acsl_21), - (__mpz_struct const *)(e_acsl_22)); - e_acsl_24 = e_acsl_23 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_21)); - __gmpz_clear((__mpz_struct *)(e_acsl_22)); - } - e_acsl_assert(! e_acsl_24,(char *)"Postcondition", - (char *)"(\\old(\\exists integer j; (0 <= j && j < 10) && A[j] == elt) ==> \\result == 1)", + { int e_acsl_6; + int e_acsl_10; + if (! e_acsl_5) { e_acsl_6 = 1; } + else { e_acsl_6 = __retres == 1; } + e_acsl_assert(! e_acsl_6,(char *)"Postcondition", + (char *)"(\\old(\\exists int j; (0 <= j && j < 10) && A[j] == elt) ==> \\result == 1)", 11); - if (! e_acsl_33) { e_acsl_37 = 1; } - else { - mpz_t e_acsl_34; - mpz_t e_acsl_35; - int e_acsl_36; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_34),(long)__retres); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)0); - e_acsl_36 = __gmpz_cmp((__mpz_struct const *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_35)); - e_acsl_37 = e_acsl_36 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_34)); - __gmpz_clear((__mpz_struct *)(e_acsl_35)); - } - e_acsl_assert(! e_acsl_37,(char *)"Postcondition", - (char *)"(\\old(\\forall integer j; 0 <= j && j < 10 ==> A[j] != elt) ==> \\result == 0)", + if (! e_acsl_9) { e_acsl_10 = 1; } + else { e_acsl_10 = __retres == 0; } + e_acsl_assert(! e_acsl_10,(char *)"Postcondition", + (char *)"(\\old(\\forall int j; 0 <= j && j < 10 ==> A[j] != elt) ==> \\result == 0)", 14); return (__retres); } @@ -309,36 +129,10 @@ int main(void) found = search(36); /*@ assert found ≡ 1; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)found); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)1); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Assertion", - (char *)"(found == 1)",30); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - + e_acsl_assert(! (found == 1),(char *)"Assertion",(char *)"(found == 1)",30); found = search(5); /*@ assert found ≡ 0; */ ; - { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)found); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)0); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 == 0),(char *)"Assertion", - (char *)"(found == 0)",33); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - + e_acsl_assert(! (found == 0),(char *)"Assertion",(char *)"(found == 0)",33); __retres = 0; return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_nested_code_annot.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_nested_code_annot.c index c3b27fd4883..73582784dad 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_nested_code_annot.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_nested_code_annot.c @@ -1,23 +1,4 @@ /* 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 mpz_t[1]; -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -46,105 +27,40 @@ int main(void) /*@ requires x ≡ 0; ensures x ≥ 1; */ { - mpz_t e_acsl_16; - mpz_t e_acsl_17; - int e_acsl_18; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)0); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Precondition", - (char *)"(x == 0)",9); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - if (x) { - /*@ assert \false; */ ; - e_acsl_assert(1,(char *)"Assertion",(char *)"(\\false)",12); + e_acsl_assert(! (x == 0),(char *)"Precondition",(char *)"(x == 0)",9); + if (x) { + /*@ assert \false; */ ; + e_acsl_assert(1,(char *)"Assertion",(char *)"(\\false)",12); + } + else { + /*@ requires x ≡ 0; + ensures x ≡ 1; */ + { + e_acsl_assert(! (x == 0),(char *)"Precondition",(char *)"(x == 0)", + 14); + x ++; + e_acsl_assert(! (x == 1),(char *)"Postcondition",(char *)"(x == 1)", + 15); } - else { - /*@ requires x ≡ 0; - ensures x ≡ 1; */ + + if (x) { + /*@ requires x ≡ 1; + ensures x ≡ 2; */ { - mpz_t e_acsl_7; - mpz_t e_acsl_8; - int e_acsl_9; - { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)0); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 == 0),(char *)"Precondition", - (char *)"(x == 0)",14); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - x ++; - } - - __gmpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)1); - e_acsl_9 = __gmpz_cmp((__mpz_struct const *)(e_acsl_7), - (__mpz_struct const *)(e_acsl_8)); - e_acsl_assert(! (e_acsl_9 == 0),(char *)"Postcondition", - (char *)"(x == 1)",15); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); + e_acsl_assert(! (x == 1),(char *)"Precondition",(char *)"(x == 1)", + 18); + x ++; + e_acsl_assert(! (x == 2),(char *)"Postcondition", + (char *)"(x == 2)",19); } - if (x) { - /*@ requires x ≡ 1; - ensures x ≡ 2; */ - { - mpz_t e_acsl_13; - mpz_t e_acsl_14; - int e_acsl_15; - { - mpz_t e_acsl_10; - mpz_t e_acsl_11; - int e_acsl_12; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)1); - e_acsl_12 = __gmpz_cmp((__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_11)); - e_acsl_assert(! (e_acsl_12 == 0),(char *)"Precondition", - (char *)"(x == 1)",18); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - x ++; - } - - __gmpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_14),(long)2); - e_acsl_15 = __gmpz_cmp((__mpz_struct const *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_14)); - e_acsl_assert(! (e_acsl_15 == 0),(char *)"Postcondition", - (char *)"(x == 2)",19); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); - __gmpz_clear((__mpz_struct *)(e_acsl_14)); - } - - } - else { - /*@ assert \false; */ ; - e_acsl_assert(1,(char *)"Assertion",(char *)"(\\false)",22); - } + } + else { + /*@ assert \false; */ ; + e_acsl_assert(1,(char *)"Assertion",(char *)"(\\false)",22); } } - - __gmpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)1); - e_acsl_18 = __gmpz_cmp((__mpz_struct const *)(e_acsl_16), - (__mpz_struct const *)(e_acsl_17)); - e_acsl_assert(! (e_acsl_18 >= 0),(char *)"Postcondition", - (char *)"(x >= 1)",10); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - __gmpz_clear((__mpz_struct *)(e_acsl_17)); + e_acsl_assert(! (x >= 1),(char *)"Postcondition",(char *)"(x >= 1)",10); } __retres = 0; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_other_constants.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_other_constants.c index 8b09c20c339..86272a7ac9e 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_other_constants.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_other_constants.c @@ -1,27 +1,8 @@ /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; enum bool { false = 0, true = 1 }; -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -45,17 +26,8 @@ int main(void) e_acsl_assert(! ("toto" != "titi"),(char *)"Assertion", (char *)"(\"toto\" != \"titi\")",9); /*@ assert 'c' ≡ 'c'; */ ; - { - mpz_t e_acsl_1; - int e_acsl_2; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)'c'); - e_acsl_2 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_1)); - e_acsl_assert(! (e_acsl_2 == 0),(char *)"Assertion", - (char *)"(\'c\' == \'c\')",10); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - } - + e_acsl_assert(! ('c' == 'c'),(char *)"Assertion", + (char *)"(\'c\' == \'c\')",10); /*@ assert false ≢ true; */ ; e_acsl_assert(! (false != true),(char *)"Assertion", (char *)"(false != true)",11); diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr.c index a8a971d535f..63a0dee5a04 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_ptr.c @@ -1,61 +1,4 @@ /* 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 mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z); - assigns \nothing; */ -extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -84,94 +27,20 @@ int main(void) t[2] = 4; p = & x; /*@ assert *p ≡ 1; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)*p); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)1); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Assertion",(char *)"(*p == 1)", - 12); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - + e_acsl_assert(! (*p == 1),(char *)"Assertion",(char *)"(*p == 1)",12); /*@ assert t[0] ≡ 2; */ ; - { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)t[0]); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)2); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 == 0),(char *)"Assertion", - (char *)"(t[0] == 2)",13); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - + e_acsl_assert(! (t[0] == 2),(char *)"Assertion",(char *)"(t[0] == 2)",13); /*@ assert t[2] ≡ 4; */ ; - { - mpz_t e_acsl_7; - mpz_t e_acsl_8; - int e_acsl_9; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)t[2]); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)4); - e_acsl_9 = __gmpz_cmp((__mpz_struct const *)(e_acsl_7), - (__mpz_struct const *)(e_acsl_8)); - e_acsl_assert(! (e_acsl_9 == 0),(char *)"Assertion", - (char *)"(t[2] == 4)",14); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - } - + e_acsl_assert(! (t[2] == 4),(char *)"Assertion",(char *)"(t[2] == 4)",14); /*@ assert t[(2*sizeof(int))/sizeof((int)0x0)] ≡ 4; */ ; { - mpz_t e_acsl_10; - mpz_t e_acsl_11; - mpz_t e_acsl_12; - mpz_t e_acsl_13; - mpz_t e_acsl_14; - int e_acsl_15; - mpz_t e_acsl_16; - int e_acsl_17; - mpz_t e_acsl_18; - mpz_t e_acsl_19; - int e_acsl_20; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)2); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)4); - __gmpz_init((__mpz_struct *)(e_acsl_12)); - __gmpz_mul((__mpz_struct *)(e_acsl_12),(__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_11)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)4); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_14),(long)0); - e_acsl_15 = __gmpz_cmp((__mpz_struct const *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_14)); - __gmpz_init((__mpz_struct *)(e_acsl_16)); + int e_acsl_1; /*@ assert sizeof((int)0x0) ≢ 0; */ ; - e_acsl_assert(e_acsl_15 == 0,(char *)"Assertion", + e_acsl_assert(4 == 0,(char *)"Assertion", (char *)"(sizeof((int)0x0) == 0)",15); - __gmpz_tdiv_q((__mpz_struct *)(e_acsl_16), - (__mpz_struct const *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_13)); - e_acsl_17 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_16)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_18),(long)t[e_acsl_17]); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)4); - e_acsl_20 = __gmpz_cmp((__mpz_struct const *)(e_acsl_18), - (__mpz_struct const *)(e_acsl_19)); - e_acsl_assert(! (e_acsl_20 == 0),(char *)"Assertion", + e_acsl_1 = (2 * 4) / 4; + e_acsl_assert(! (t[e_acsl_1] == 4),(char *)"Assertion", (char *)"(t[(2*sizeof(int))/sizeof((int)0x0)] == 4)",15); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - __gmpz_clear((__mpz_struct *)(e_acsl_12)); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); - __gmpz_clear((__mpz_struct *)(e_acsl_14)); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - __gmpz_clear((__mpz_struct *)(e_acsl_18)); - __gmpz_clear((__mpz_struct *)(e_acsl_19)); } { @@ -180,88 +49,14 @@ int main(void) while (1) { if (! (i < 2)) { break; } /*@ assert t[i] ≡ i+2; */ ; - { - mpz_t e_acsl_21; - mpz_t e_acsl_22; - mpz_t e_acsl_23; - mpz_t e_acsl_24; - int e_acsl_25; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_21),(long)t[i]); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_22),(long)i); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_23),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_24)); - __gmpz_add((__mpz_struct *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_22), - (__mpz_struct const *)(e_acsl_23)); - e_acsl_25 = __gmpz_cmp((__mpz_struct const *)(e_acsl_21), - (__mpz_struct const *)(e_acsl_24)); - e_acsl_assert(! (e_acsl_25 == 0),(char *)"Assertion", - (char *)"(t[i] == i+2)",18); - __gmpz_clear((__mpz_struct *)(e_acsl_21)); - __gmpz_clear((__mpz_struct *)(e_acsl_22)); - __gmpz_clear((__mpz_struct *)(e_acsl_23)); - __gmpz_clear((__mpz_struct *)(e_acsl_24)); - } - + e_acsl_assert(! ((long long)t[i] == (long long)i + (long long)2), + (char *)"Assertion",(char *)"(t[i] == i+2)",18); /*@ assert t[2-i] ≡ 4-i; */ ; - { - mpz_t e_acsl_26; - mpz_t e_acsl_27; - mpz_t e_acsl_28; - int e_acsl_29; - mpz_t e_acsl_30; - mpz_t e_acsl_31; - mpz_t e_acsl_32; - int e_acsl_33; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)2); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)i); - __gmpz_init((__mpz_struct *)(e_acsl_28)); - __gmpz_sub((__mpz_struct *)(e_acsl_28), - (__mpz_struct const *)(e_acsl_26), - (__mpz_struct const *)(e_acsl_27)); - e_acsl_29 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_28)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_30),(long)t[e_acsl_29]); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)4); - __gmpz_init((__mpz_struct *)(e_acsl_32)); - __gmpz_sub((__mpz_struct *)(e_acsl_32), - (__mpz_struct const *)(e_acsl_31), - (__mpz_struct const *)(e_acsl_27)); - e_acsl_33 = __gmpz_cmp((__mpz_struct const *)(e_acsl_30), - (__mpz_struct const *)(e_acsl_32)); - e_acsl_assert(! (e_acsl_33 == 0),(char *)"Assertion", - (char *)"(t[2-i] == 4-i)",19); - __gmpz_clear((__mpz_struct *)(e_acsl_26)); - __gmpz_clear((__mpz_struct *)(e_acsl_27)); - __gmpz_clear((__mpz_struct *)(e_acsl_28)); - __gmpz_clear((__mpz_struct *)(e_acsl_30)); - __gmpz_clear((__mpz_struct *)(e_acsl_31)); - __gmpz_clear((__mpz_struct *)(e_acsl_32)); - } - + e_acsl_assert(! ((long long)t[(long long)2 - (long long)i] == (long long)4 - (long long)i), + (char *)"Assertion",(char *)"(t[2-i] == 4-i)",19); /*@ assert *(&t[2]-i) ≡ 4-i; */ ; - { - mpz_t e_acsl_34; - mpz_t e_acsl_35; - mpz_t e_acsl_36; - mpz_t e_acsl_37; - int e_acsl_38; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_34),(long)*(& t[2] - i)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)4); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_36),(long)i); - __gmpz_init((__mpz_struct *)(e_acsl_37)); - __gmpz_sub((__mpz_struct *)(e_acsl_37), - (__mpz_struct const *)(e_acsl_35), - (__mpz_struct const *)(e_acsl_36)); - e_acsl_38 = __gmpz_cmp((__mpz_struct const *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_37)); - e_acsl_assert(! (e_acsl_38 == 0),(char *)"Assertion", - (char *)"(*(&t[2]-i) == 4-i)",20); - __gmpz_clear((__mpz_struct *)(e_acsl_34)); - __gmpz_clear((__mpz_struct *)(e_acsl_35)); - __gmpz_clear((__mpz_struct *)(e_acsl_36)); - __gmpz_clear((__mpz_struct *)(e_acsl_37)); - } - + e_acsl_assert(! ((long long)*(& t[2] - i) == (long long)4 - (long long)i), + (char *)"Assertion",(char *)"(*(&t[2]-i) == 4-i)",20); i ++; } } @@ -269,20 +64,7 @@ int main(void) p = & t[2]; t[2] = 5; /*@ assert *p ≡ 5; */ ; - { - mpz_t e_acsl_39; - mpz_t e_acsl_40; - int e_acsl_41; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_39),(long)*p); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_40),(long)5); - e_acsl_41 = __gmpz_cmp((__mpz_struct const *)(e_acsl_39), - (__mpz_struct const *)(e_acsl_40)); - e_acsl_assert(! (e_acsl_41 == 0),(char *)"Assertion",(char *)"(*p == 5)", - 26); - __gmpz_clear((__mpz_struct *)(e_acsl_39)); - __gmpz_clear((__mpz_struct *)(e_acsl_40)); - } - + e_acsl_assert(! (*p == 5),(char *)"Assertion",(char *)"(*p == 5)",26); __retres = 0; return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_quantif.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_quantif.c index 82da5c054a4..51d4c954588 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_quantif.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_quantif.c @@ -1,66 +1,4 @@ /* 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 mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(z_orig); - requires \valid(z); - assigns *z; */ -extern void __gmpz_set(__mpz_struct * /*[1]*/ z, - __mpz_struct const * /*[1]*/ z_orig); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z); - assigns \nothing; */ -extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -80,609 +18,187 @@ void e_acsl_assert(int predicate, char *kind, char *pred_txt, int line) int main(void) { int __retres; - /*@ assert ∀ ℤ x; 0 ≤ x ∧ x ≤ 1 ⇒ x ≡ 0 ∨ x ≡ 1; */ ; + /*@ assert ∀ int x; 0 ≤ x ∧ x ≤ 1 ⇒ x ≡ 0 ∨ x ≡ 1; */ ; { - mpz_t e_acsl_1; + int e_acsl_1; int e_acsl_2; - e_acsl_2 = 1; - __gmpz_init((__mpz_struct *)(e_acsl_1)); - { - mpz_t e_acsl_8; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_1),(__mpz_struct const *)(e_acsl_8)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - } - + e_acsl_1 = 1; + e_acsl_2 = 0; while (1) { - { - mpz_t e_acsl_9; - int e_acsl_10; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)1); - e_acsl_10 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_9)); - if (! (e_acsl_10 <= 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_9)); - } - - { - mpz_t e_acsl_3; - int e_acsl_4; - int e_acsl_7; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_3),(long)0); - e_acsl_4 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_3)); - if (e_acsl_4 == 0) { e_acsl_7 = 1; } - else { - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)1); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_7 = e_acsl_6 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - __gmpz_clear((__mpz_struct *)(e_acsl_3)); - if (! e_acsl_7) { - e_acsl_2 = 0; + if (! (e_acsl_2 <= 1)) { break; } + { int e_acsl_3; + if (e_acsl_2 == 0) { e_acsl_3 = 1; } + else { e_acsl_3 = e_acsl_2 == 1; } + if (! e_acsl_3) { + e_acsl_1 = 0; goto e_acsl_end_loop1; } } - { - mpz_t e_acsl_11; - mpz_t e_acsl_12; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_12)); - __gmpz_add((__mpz_struct *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_11)); - __gmpz_set((__mpz_struct *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_12)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - __gmpz_clear((__mpz_struct *)(e_acsl_12)); - } - + e_acsl_2 ++; } e_acsl_end_loop1: ; - e_acsl_assert(! e_acsl_2,(char *)"Assertion", - (char *)"(\\forall integer x; 0 <= x && x <= 1 ==> x == 0 || x == 1)", + e_acsl_assert(! e_acsl_1,(char *)"Assertion", + (char *)"(\\forall int x; 0 <= x && x <= 1 ==> x == 0 || x == 1)", 10); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); } - /*@ assert ∀ ℤ x; 0 < x ∧ x ≤ 1 ⇒ x ≡ 1; */ ; + /*@ assert ∀ int x; 0 < x ∧ x ≤ 1 ⇒ x ≡ 1; */ ; { - mpz_t e_acsl_13; - int e_acsl_14; - e_acsl_14 = 1; - __gmpz_init((__mpz_struct *)(e_acsl_13)); - { - mpz_t e_acsl_17; - mpz_t e_acsl_18; - mpz_t e_acsl_19; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)0); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_18),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_19)); - __gmpz_add((__mpz_struct *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_17), - (__mpz_struct const *)(e_acsl_18)); - __gmpz_set((__mpz_struct *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_17)); - __gmpz_clear((__mpz_struct *)(e_acsl_18)); - __gmpz_clear((__mpz_struct *)(e_acsl_19)); - } - + int e_acsl_4; + int e_acsl_5; + e_acsl_4 = 1; + e_acsl_5 = 0 + 1; while (1) { - { - mpz_t e_acsl_20; - int e_acsl_21; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)1); - e_acsl_21 = __gmpz_cmp((__mpz_struct const *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_20)); - if (! (e_acsl_21 <= 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_20)); - } - - { - mpz_t e_acsl_15; - int e_acsl_16; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)1); - e_acsl_16 = __gmpz_cmp((__mpz_struct const *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_15)); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - if (! (e_acsl_16 == 0)) { - e_acsl_14 = 0; - goto e_acsl_end_loop2; } - } - - { - mpz_t e_acsl_22; - mpz_t e_acsl_23; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_22),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_23)); - __gmpz_add((__mpz_struct *)(e_acsl_23), - (__mpz_struct const *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_22)); - __gmpz_set((__mpz_struct *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_23)); - __gmpz_clear((__mpz_struct *)(e_acsl_22)); - __gmpz_clear((__mpz_struct *)(e_acsl_23)); - } - + if (! (e_acsl_5 <= 1)) { break; } + if (! (e_acsl_5 == 1)) { + e_acsl_4 = 0; + goto e_acsl_end_loop2; } + e_acsl_5 ++; } e_acsl_end_loop2: ; - e_acsl_assert(! e_acsl_14,(char *)"Assertion", - (char *)"(\\forall integer x; 0 < x && x <= 1 ==> x == 1)", - 11); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); + e_acsl_assert(! e_acsl_4,(char *)"Assertion", + (char *)"(\\forall int x; 0 < x && x <= 1 ==> x == 1)",11); } - /*@ assert ∀ ℤ x; 0 < x ∧ x < 1 ⇒ \false; */ ; + /*@ assert ∀ int x; 0 < x ∧ x < 1 ⇒ \false; */ ; { - mpz_t e_acsl_24; - int e_acsl_25; - e_acsl_25 = 1; - __gmpz_init((__mpz_struct *)(e_acsl_24)); - { - mpz_t e_acsl_26; - mpz_t e_acsl_27; - mpz_t e_acsl_28; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)0); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_28)); - __gmpz_add((__mpz_struct *)(e_acsl_28), - (__mpz_struct const *)(e_acsl_26), - (__mpz_struct const *)(e_acsl_27)); - __gmpz_set((__mpz_struct *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_28)); - __gmpz_clear((__mpz_struct *)(e_acsl_26)); - __gmpz_clear((__mpz_struct *)(e_acsl_27)); - __gmpz_clear((__mpz_struct *)(e_acsl_28)); - } - + int e_acsl_6; + int e_acsl_7; + e_acsl_6 = 1; + e_acsl_7 = 0 + 1; while (1) { - { - mpz_t e_acsl_29; - int e_acsl_30; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_29),(long)1); - e_acsl_30 = __gmpz_cmp((__mpz_struct const *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_29)); - if (! (e_acsl_30 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_29)); - } - - e_acsl_25 = 0; + if (! (e_acsl_7 < 1)) { break; } + e_acsl_6 = 0; goto e_acsl_end_loop3; - { - mpz_t e_acsl_31; - mpz_t e_acsl_32; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_32)); - __gmpz_add((__mpz_struct *)(e_acsl_32), - (__mpz_struct const *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_31)); - __gmpz_set((__mpz_struct *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_32)); - __gmpz_clear((__mpz_struct *)(e_acsl_31)); - __gmpz_clear((__mpz_struct *)(e_acsl_32)); - } - + e_acsl_7 ++; } e_acsl_end_loop3: ; - e_acsl_assert(! e_acsl_25,(char *)"Assertion", - (char *)"(\\forall integer x; 0 < x && x < 1 ==> \\false)", - 12); - __gmpz_clear((__mpz_struct *)(e_acsl_24)); + e_acsl_assert(! e_acsl_6,(char *)"Assertion", + (char *)"(\\forall int x; 0 < x && x < 1 ==> \\false)",12); } - /*@ assert ∀ ℤ x; 0 ≤ x ∧ x < 1 ⇒ x ≡ 0; */ ; + /*@ assert ∀ int x; 0 ≤ x ∧ x < 1 ⇒ x ≡ 0; */ ; { - mpz_t e_acsl_33; - int e_acsl_34; - e_acsl_34 = 1; - __gmpz_init((__mpz_struct *)(e_acsl_33)); - { - mpz_t e_acsl_37; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_37),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_37)); - __gmpz_clear((__mpz_struct *)(e_acsl_37)); - } - + int e_acsl_8; + int e_acsl_9; + e_acsl_8 = 1; + e_acsl_9 = 0; while (1) { - { - mpz_t e_acsl_38; - int e_acsl_39; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_38),(long)1); - e_acsl_39 = __gmpz_cmp((__mpz_struct const *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_38)); - if (! (e_acsl_39 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_38)); - } - - { - mpz_t e_acsl_35; - int e_acsl_36; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)0); - e_acsl_36 = __gmpz_cmp((__mpz_struct const *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_35)); - __gmpz_clear((__mpz_struct *)(e_acsl_35)); - if (! (e_acsl_36 == 0)) { - e_acsl_34 = 0; - goto e_acsl_end_loop4; } - } - - { - mpz_t e_acsl_40; - mpz_t e_acsl_41; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_40),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_41)); - __gmpz_add((__mpz_struct *)(e_acsl_41), - (__mpz_struct const *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_40)); - __gmpz_set((__mpz_struct *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_41)); - __gmpz_clear((__mpz_struct *)(e_acsl_40)); - __gmpz_clear((__mpz_struct *)(e_acsl_41)); - } - + if (! (e_acsl_9 < 1)) { break; } + if (! (e_acsl_9 == 0)) { + e_acsl_8 = 0; + goto e_acsl_end_loop4; } + e_acsl_9 ++; } e_acsl_end_loop4: ; - e_acsl_assert(! e_acsl_34,(char *)"Assertion", - (char *)"(\\forall integer x; 0 <= x && x < 1 ==> x == 0)", - 13); - __gmpz_clear((__mpz_struct *)(e_acsl_33)); + e_acsl_assert(! e_acsl_8,(char *)"Assertion", + (char *)"(\\forall int x; 0 <= x && x < 1 ==> x == 0)",13); } /*@ - assert ∀ ℤ x, ℤ y, ℤ z; + assert ∀ int x, int y, int z; ((0 ≤ x ∧ x < 2) ∧ (0 ≤ y ∧ y < 5)) ∧ (0 ≤ z ∧ z ≤ y) ⇒ x+z ≤ y+1; */ ; { - mpz_t e_acsl_42; - mpz_t e_acsl_43; - mpz_t e_acsl_44; - int e_acsl_45; - e_acsl_45 = 1; - __gmpz_init((__mpz_struct *)(e_acsl_42)); - __gmpz_init((__mpz_struct *)(e_acsl_43)); - __gmpz_init((__mpz_struct *)(e_acsl_44)); - { - mpz_t e_acsl_59; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_59),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_42), - (__mpz_struct const *)(e_acsl_59)); - __gmpz_clear((__mpz_struct *)(e_acsl_59)); - } - + int e_acsl_10; + int e_acsl_11; + int e_acsl_12; + int e_acsl_13; + e_acsl_10 = 1; + e_acsl_11 = 0; while (1) { - { - mpz_t e_acsl_60; - int e_acsl_61; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_60),(long)2); - e_acsl_61 = __gmpz_cmp((__mpz_struct const *)(e_acsl_42), - (__mpz_struct const *)(e_acsl_60)); - if (! (e_acsl_61 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_60)); - } - - { - mpz_t e_acsl_54; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_54),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_43), - (__mpz_struct const *)(e_acsl_54)); - __gmpz_clear((__mpz_struct *)(e_acsl_54)); - } - + if (! (e_acsl_11 < 2)) { break; } + e_acsl_12 = 0; while (1) { - { - mpz_t e_acsl_55; - int e_acsl_56; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_55),(long)5); - e_acsl_56 = __gmpz_cmp((__mpz_struct const *)(e_acsl_43), - (__mpz_struct const *)(e_acsl_55)); - if (! (e_acsl_56 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_55)); - } - - { - mpz_t e_acsl_50; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_50),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_44), - (__mpz_struct const *)(e_acsl_50)); - __gmpz_clear((__mpz_struct *)(e_acsl_50)); - } - + if (! (e_acsl_12 < 5)) { break; } + e_acsl_13 = 0; while (1) { - { - int e_acsl_51; - e_acsl_51 = __gmpz_cmp((__mpz_struct const *)(e_acsl_44), - (__mpz_struct const *)(e_acsl_43)); - if (! (e_acsl_51 <= 0)) { break; } - } - - { - mpz_t e_acsl_46; - mpz_t e_acsl_47; - mpz_t e_acsl_48; - int e_acsl_49; - __gmpz_init((__mpz_struct *)(e_acsl_46)); - __gmpz_add((__mpz_struct *)(e_acsl_46), - (__mpz_struct const *)(e_acsl_42), - (__mpz_struct const *)(e_acsl_44)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_47),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_48)); - __gmpz_add((__mpz_struct *)(e_acsl_48), - (__mpz_struct const *)(e_acsl_43), - (__mpz_struct const *)(e_acsl_47)); - e_acsl_49 = __gmpz_cmp((__mpz_struct const *)(e_acsl_46), - (__mpz_struct const *)(e_acsl_48)); - __gmpz_clear((__mpz_struct *)(e_acsl_46)); - __gmpz_clear((__mpz_struct *)(e_acsl_47)); - __gmpz_clear((__mpz_struct *)(e_acsl_48)); - if (! (e_acsl_49 <= 0)) { - e_acsl_45 = 0; - goto e_acsl_end_loop5; } + if (! (e_acsl_13 <= e_acsl_12)) { break; } + if (! (e_acsl_11 + e_acsl_13 <= e_acsl_12 + 1)) { + e_acsl_10 = 0; + goto e_acsl_end_loop5; } - - { - mpz_t e_acsl_52; - mpz_t e_acsl_53; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_52),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_53)); - __gmpz_add((__mpz_struct *)(e_acsl_53), - (__mpz_struct const *)(e_acsl_44), - (__mpz_struct const *)(e_acsl_52)); - __gmpz_set((__mpz_struct *)(e_acsl_44), - (__mpz_struct const *)(e_acsl_53)); - __gmpz_clear((__mpz_struct *)(e_acsl_52)); - __gmpz_clear((__mpz_struct *)(e_acsl_53)); - } - - } - { - mpz_t e_acsl_57; - mpz_t e_acsl_58; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_57),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_58)); - __gmpz_add((__mpz_struct *)(e_acsl_58), - (__mpz_struct const *)(e_acsl_43), - (__mpz_struct const *)(e_acsl_57)); - __gmpz_set((__mpz_struct *)(e_acsl_43), - (__mpz_struct const *)(e_acsl_58)); - __gmpz_clear((__mpz_struct *)(e_acsl_57)); - __gmpz_clear((__mpz_struct *)(e_acsl_58)); + e_acsl_13 ++; } - + e_acsl_12 ++; } - { - mpz_t e_acsl_62; - mpz_t e_acsl_63; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_62),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_63)); - __gmpz_add((__mpz_struct *)(e_acsl_63), - (__mpz_struct const *)(e_acsl_42), - (__mpz_struct const *)(e_acsl_62)); - __gmpz_set((__mpz_struct *)(e_acsl_42), - (__mpz_struct const *)(e_acsl_63)); - __gmpz_clear((__mpz_struct *)(e_acsl_62)); - __gmpz_clear((__mpz_struct *)(e_acsl_63)); - } - + e_acsl_11 ++; } e_acsl_end_loop5: ; - e_acsl_assert(! e_acsl_45,(char *)"Assertion", - (char *)"(\\forall integer x, integer y, integer z;\n ((0 <= x && x < 2) && (0 <= y && y < 5)) && (0 <= z && z <= y) ==>\n x+z <= y+1)", + e_acsl_assert(! e_acsl_10,(char *)"Assertion", + (char *)"(\\forall int x, int y, int z;\n ((0 <= x && x < 2) && (0 <= y && y < 5)) && (0 <= z && z <= y) ==>\n x+z <= y+1)", 17); - __gmpz_clear((__mpz_struct *)(e_acsl_42)); - __gmpz_clear((__mpz_struct *)(e_acsl_43)); - __gmpz_clear((__mpz_struct *)(e_acsl_44)); } /*@ assert ∃ int x; (0 ≤ x ∧ x < 10) ∧ x ≡ 5; */ ; { - mpz_t e_acsl_64; - int e_acsl_65; - e_acsl_65 = 0; - __gmpz_init((__mpz_struct *)(e_acsl_64)); - { - mpz_t e_acsl_68; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_68),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_64), - (__mpz_struct const *)(e_acsl_68)); - __gmpz_clear((__mpz_struct *)(e_acsl_68)); - } - + int e_acsl_14; + int e_acsl_15; + e_acsl_14 = 0; + e_acsl_15 = 0; while (1) { - { - mpz_t e_acsl_69; - int e_acsl_70; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_69),(long)10); - e_acsl_70 = __gmpz_cmp((__mpz_struct const *)(e_acsl_64), - (__mpz_struct const *)(e_acsl_69)); - if (! (e_acsl_70 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_69)); - } - - { - mpz_t e_acsl_66; - int e_acsl_67; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_66),(long)5); - e_acsl_67 = __gmpz_cmp((__mpz_struct const *)(e_acsl_64), - (__mpz_struct const *)(e_acsl_66)); - __gmpz_clear((__mpz_struct *)(e_acsl_66)); - if (! (! (e_acsl_67 == 0))) { - e_acsl_65 = 1; - goto e_acsl_end_loop6; } - } - - { - mpz_t e_acsl_71; - mpz_t e_acsl_72; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_71),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_72)); - __gmpz_add((__mpz_struct *)(e_acsl_72), - (__mpz_struct const *)(e_acsl_64), - (__mpz_struct const *)(e_acsl_71)); - __gmpz_set((__mpz_struct *)(e_acsl_64), - (__mpz_struct const *)(e_acsl_72)); - __gmpz_clear((__mpz_struct *)(e_acsl_71)); - __gmpz_clear((__mpz_struct *)(e_acsl_72)); - } - + if (! (e_acsl_15 < 10)) { break; } + if (! (! (e_acsl_15 == 5))) { + e_acsl_14 = 1; + goto e_acsl_end_loop6; } + e_acsl_15 ++; } e_acsl_end_loop6: ; - e_acsl_assert(! e_acsl_65,(char *)"Assertion", + e_acsl_assert(! e_acsl_14,(char *)"Assertion", (char *)"(\\exists int x; (0 <= x && x < 10) && x == 5)", 22); } /*@ assert ∀ int x; 0 ≤ x ∧ x < 10 ⇒ - (x%2 ≡ 0 ⇒ (∃ ℤ y; (0 ≤ y ∧ y ≤ x/2) ∧ x ≡ 2*y)); */ ; + (x%2 ≡ 0 ⇒ (∃ int y; (0 ≤ y ∧ y ≤ x/2) ∧ x ≡ 2*y)); */ ; { - mpz_t e_acsl_73; - int e_acsl_74; - e_acsl_74 = 1; - __gmpz_init((__mpz_struct *)(e_acsl_73)); - { - mpz_t e_acsl_93; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_93),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_73), - (__mpz_struct const *)(e_acsl_93)); - __gmpz_clear((__mpz_struct *)(e_acsl_93)); - } - + int e_acsl_16; + int e_acsl_17; + e_acsl_16 = 1; + e_acsl_17 = 0; while (1) { + if (! (e_acsl_17 < 10)) { break; } { - mpz_t e_acsl_94; - int e_acsl_95; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_94),(long)10); - e_acsl_95 = __gmpz_cmp((__mpz_struct const *)(e_acsl_73), - (__mpz_struct const *)(e_acsl_94)); - if (! (e_acsl_95 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_94)); - } - - { - mpz_t e_acsl_75; - int e_acsl_76; - mpz_t e_acsl_77; - mpz_t e_acsl_78; - int e_acsl_79; - int e_acsl_92; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_75),(long)2); - e_acsl_76 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_75)); - __gmpz_init((__mpz_struct *)(e_acsl_77)); + int e_acsl_18; + int e_acsl_22; /*@ assert 2 ≢ 0; */ ; - e_acsl_assert(e_acsl_76 == 0,(char *)"Assertion",(char *)"(2 == 0)", - 27); - __gmpz_tdiv_r((__mpz_struct *)(e_acsl_77), - (__mpz_struct const *)(e_acsl_73), - (__mpz_struct const *)(e_acsl_75)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_78),(long)0); - e_acsl_79 = __gmpz_cmp((__mpz_struct const *)(e_acsl_77), - (__mpz_struct const *)(e_acsl_78)); - if (! (e_acsl_79 == 0)) { e_acsl_92 = 1; } + e_acsl_assert(2 == 0,(char *)"Assertion",(char *)"(2 == 0)",27); + e_acsl_18 = e_acsl_17 % 2; + if (! (e_acsl_18 == 0)) { e_acsl_22 = 1; } else { - mpz_t e_acsl_80; - int e_acsl_81; - e_acsl_81 = 0; - __gmpz_init((__mpz_struct *)(e_acsl_80)); - { - mpz_t e_acsl_85; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_85),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_80), - (__mpz_struct const *)(e_acsl_85)); - __gmpz_clear((__mpz_struct *)(e_acsl_85)); - } - + int e_acsl_19; + int e_acsl_20; + e_acsl_19 = 0; + e_acsl_20 = 0; while (1) { { - mpz_t e_acsl_86; - int e_acsl_87; - mpz_t e_acsl_88; - int e_acsl_89; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_86),(long)2); - e_acsl_87 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_86)); - __gmpz_init((__mpz_struct *)(e_acsl_88)); + int e_acsl_21; /*@ assert 2 ≢ 0; */ ; - e_acsl_assert(e_acsl_87 == 0,(char *)"Assertion", - (char *)"(2 == 0)",27); - __gmpz_tdiv_q((__mpz_struct *)(e_acsl_88), - (__mpz_struct const *)(e_acsl_73), - (__mpz_struct const *)(e_acsl_86)); - e_acsl_89 = __gmpz_cmp((__mpz_struct const *)(e_acsl_80), - (__mpz_struct const *)(e_acsl_88)); - if (! (e_acsl_89 <= 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_86)); - __gmpz_clear((__mpz_struct *)(e_acsl_88)); - } - - { - mpz_t e_acsl_82; - mpz_t e_acsl_83; - int e_acsl_84; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_82),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_83)); - __gmpz_mul((__mpz_struct *)(e_acsl_83), - (__mpz_struct const *)(e_acsl_82), - (__mpz_struct const *)(e_acsl_80)); - e_acsl_84 = __gmpz_cmp((__mpz_struct const *)(e_acsl_73), - (__mpz_struct const *)(e_acsl_83)); - __gmpz_clear((__mpz_struct *)(e_acsl_82)); - __gmpz_clear((__mpz_struct *)(e_acsl_83)); - if (! (! (e_acsl_84 == 0))) { - e_acsl_81 = 1; - goto e_acsl_end_loop7; - } + e_acsl_assert(2 == 0,(char *)"Assertion",(char *)"(2 == 0)",27); + e_acsl_21 = e_acsl_17 / 2; + if (! (e_acsl_20 <= e_acsl_21)) { break; } } - { - mpz_t e_acsl_90; - mpz_t e_acsl_91; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_90),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_91)); - __gmpz_add((__mpz_struct *)(e_acsl_91), - (__mpz_struct const *)(e_acsl_80), - (__mpz_struct const *)(e_acsl_90)); - __gmpz_set((__mpz_struct *)(e_acsl_80), - (__mpz_struct const *)(e_acsl_91)); - __gmpz_clear((__mpz_struct *)(e_acsl_90)); - __gmpz_clear((__mpz_struct *)(e_acsl_91)); + if (! (! (e_acsl_17 == 2 * e_acsl_20))) { + e_acsl_19 = 1; + goto e_acsl_end_loop7; } - + e_acsl_20 ++; } e_acsl_end_loop7: ; - e_acsl_92 = e_acsl_81; - __gmpz_clear((__mpz_struct *)(e_acsl_80)); + e_acsl_22 = e_acsl_19; } - __gmpz_clear((__mpz_struct *)(e_acsl_75)); - __gmpz_clear((__mpz_struct *)(e_acsl_77)); - __gmpz_clear((__mpz_struct *)(e_acsl_78)); - if (! e_acsl_92) { - e_acsl_74 = 0; + if (! e_acsl_22) { + e_acsl_16 = 0; goto e_acsl_end_loop8; } } - { - mpz_t e_acsl_96; - mpz_t e_acsl_97; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_96),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_97)); - __gmpz_add((__mpz_struct *)(e_acsl_97), - (__mpz_struct const *)(e_acsl_73), - (__mpz_struct const *)(e_acsl_96)); - __gmpz_set((__mpz_struct *)(e_acsl_73), - (__mpz_struct const *)(e_acsl_97)); - __gmpz_clear((__mpz_struct *)(e_acsl_96)); - __gmpz_clear((__mpz_struct *)(e_acsl_97)); - } - + e_acsl_17 ++; } e_acsl_end_loop8: ; - e_acsl_assert(! e_acsl_74,(char *)"Assertion", - (char *)"(\\forall int x; 0 <= x && x < 10 ==>\n (x%2 == 0 ==> (\\exists integer y; (0 <= y && y <= x/2) && x == 2*y)))", + e_acsl_assert(! e_acsl_16,(char *)"Assertion", + (char *)"(\\forall int x; 0 <= x && x < 10 ==>\n (x%2 == 0 ==> (\\exists int y; (0 <= y && y <= x/2) && x == 2*y)))", 26); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_result.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_result.c index e619c835a3f..02edb2ae149 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_result.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_result.c @@ -1,37 +1,4 @@ /* 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 mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z); - assigns \nothing; */ -extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -52,26 +19,14 @@ void e_acsl_assert(int predicate, char *kind, char *pred_txt, int line) int f(int x) { int e_acsl_1; - int e_acsl_3; - e_acsl_3 = x; + int e_acsl_2; + e_acsl_2 = x; e_acsl_1 = x; x = 0; - { - mpz_t e_acsl_2; - mpz_t e_acsl_4; - int e_acsl_5; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)e_acsl_1); - __gmpz_init((__mpz_struct *)(e_acsl_4)); - __gmpz_sub((__mpz_struct *)(e_acsl_4),(__mpz_struct const *)(e_acsl_2), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_5 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_4)); - e_acsl_assert(! (x == e_acsl_5),(char *)"Postcondition", - (char *)"(\\result == (int)(\\old(x)-\\old(x)))",6); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - return (x); - } - + e_acsl_assert(! (x == (int)((long long)e_acsl_1 - (long long)e_acsl_2)), + (char *)"Postcondition", + (char *)"(\\result == (int)(\\old(x)-\\old(x)))",6); + return (x); } int Y = 1; @@ -88,21 +43,9 @@ int h(void) { int __retres; __retres = 0; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)__retres); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)0); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Postcondition", - (char *)"(\\result == 0)",22); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - return (__retres); - } - + e_acsl_assert(! (__retres == 0),(char *)"Postcondition", + (char *)"(\\result == 0)",22); + return (__retres); } int main(void) diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_sizeof.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_sizeof.c index d7d4076537a..7faad4e6e38 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_sizeof.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_sizeof.c @@ -1,23 +1,4 @@ /* 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 mpz_t[1]; -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -40,35 +21,11 @@ int main(void) int x; x = 0; /*@ assert sizeof(int) ≡ sizeof(x); */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)4); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)4); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Assertion", - (char *)"(sizeof(int) == sizeof(x))",8); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - + e_acsl_assert(! (4 == 4),(char *)"Assertion", + (char *)"(sizeof(int) == sizeof(x))",8); /*@ assert sizeof("totototototo") ≡ sizeof(char *); */ ; - { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)4); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)4); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 == 0),(char *)"Assertion", - (char *)"(sizeof(\"totototototo\") == sizeof(char *))",9); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - + e_acsl_assert(! (4 == 4),(char *)"Assertion", + (char *)"(sizeof(\"totototototo\") == sizeof(char *))",9); __retres = 0; return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stmt_contract.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stmt_contract.c index 4e33af4f98a..ed75ce9ea00 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stmt_contract.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_stmt_contract.c @@ -1,34 +1,4 @@ /* 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 mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -54,89 +24,26 @@ int main(void) y = 2; /*@ ensures x ≡ 1; */ { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; x = 1; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)1); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Postcondition", - (char *)"(x == 1)",8); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); + e_acsl_assert(! (x == 1),(char *)"Postcondition",(char *)"(x == 1)",8); } /*@ ensures x ≡ 2; ensures y ≡ 2; */ { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - mpz_t e_acsl_7; - int e_acsl_8; x = 2; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)2); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 == 0),(char *)"Postcondition", - (char *)"(x == 2)",11); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)y); - e_acsl_8 = __gmpz_cmp((__mpz_struct const *)(e_acsl_7), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_8 == 0),(char *)"Postcondition", - (char *)"(y == 2)",12); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); + e_acsl_assert(! (x == 2),(char *)"Postcondition",(char *)"(x == 2)",11); + e_acsl_assert(! (y == 2),(char *)"Postcondition",(char *)"(y == 2)",12); } /*@ requires x ≡ 2; */ - { - mpz_t e_acsl_9; - mpz_t e_acsl_10; - int e_acsl_11; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)2); - e_acsl_11 = __gmpz_cmp((__mpz_struct const *)(e_acsl_9), - (__mpz_struct const *)(e_acsl_10)); - e_acsl_assert(! (e_acsl_11 == 0),(char *)"Precondition", - (char *)"(x == 2)",15); - __gmpz_clear((__mpz_struct *)(e_acsl_9)); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - x ++; - } - + e_acsl_assert(! (x == 2),(char *)"Precondition",(char *)"(x == 2)",15); + x ++; /*@ requires x ≡ 3; requires y ≡ 2; */ - { - mpz_t e_acsl_12; - mpz_t e_acsl_13; - int e_acsl_14; - mpz_t e_acsl_15; - mpz_t e_acsl_16; - int e_acsl_17; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_12),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)3); - e_acsl_14 = __gmpz_cmp((__mpz_struct const *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_13)); - e_acsl_assert(! (e_acsl_14 == 0),(char *)"Precondition", - (char *)"(x == 3)",18); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)2); - e_acsl_17 = __gmpz_cmp((__mpz_struct const *)(e_acsl_15), - (__mpz_struct const *)(e_acsl_16)); - e_acsl_assert(! (e_acsl_17 == 0),(char *)"Precondition", - (char *)"(y == 2)",19); - __gmpz_clear((__mpz_struct *)(e_acsl_12)); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - x += y; - } - + e_acsl_assert(! (x == 3),(char *)"Precondition",(char *)"(x == 3)",18); + e_acsl_assert(! (y == 2),(char *)"Precondition",(char *)"(y == 2)",19); + x += y; /*@ behavior b1: requires x ≡ 5; ensures x ≡ 3; @@ -148,73 +55,14 @@ int main(void) */ { - mpz_t e_acsl_27; - mpz_t e_acsl_28; - int e_acsl_29; - mpz_t e_acsl_30; - mpz_t e_acsl_31; - mpz_t e_acsl_32; - int e_acsl_33; - { - mpz_t e_acsl_18; - mpz_t e_acsl_19; - int e_acsl_20; - mpz_t e_acsl_21; - mpz_t e_acsl_22; - mpz_t e_acsl_23; - int e_acsl_24; - mpz_t e_acsl_25; - int e_acsl_26; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_18),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)5); - e_acsl_20 = __gmpz_cmp((__mpz_struct const *)(e_acsl_18), - (__mpz_struct const *)(e_acsl_19)); - e_acsl_assert(! (e_acsl_20 == 0),(char *)"Precondition", - (char *)"(x == 5)",23); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_21),(long)3); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_22),(long)y); - __gmpz_init((__mpz_struct *)(e_acsl_23)); - __gmpz_add((__mpz_struct *)(e_acsl_23), - (__mpz_struct const *)(e_acsl_21), - (__mpz_struct const *)(e_acsl_22)); - e_acsl_24 = __gmpz_cmp((__mpz_struct const *)(e_acsl_18), - (__mpz_struct const *)(e_acsl_23)); - e_acsl_assert(! (e_acsl_24 == 0),(char *)"Precondition", - (char *)"(x == 3+y)",26); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_25),(long)2); - e_acsl_26 = __gmpz_cmp((__mpz_struct const *)(e_acsl_22), - (__mpz_struct const *)(e_acsl_25)); - e_acsl_assert(! (e_acsl_26 == 0),(char *)"Precondition", - (char *)"(y == 2)",27); - __gmpz_clear((__mpz_struct *)(e_acsl_18)); - __gmpz_clear((__mpz_struct *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_21)); - __gmpz_clear((__mpz_struct *)(e_acsl_22)); - __gmpz_clear((__mpz_struct *)(e_acsl_23)); - __gmpz_clear((__mpz_struct *)(e_acsl_25)); - x = 3; - } - - __gmpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_28),(long)3); - e_acsl_29 = __gmpz_cmp((__mpz_struct const *)(e_acsl_27), - (__mpz_struct const *)(e_acsl_28)); - e_acsl_assert(! (e_acsl_29 == 0),(char *)"Postcondition", - (char *)"(x == 3)",24); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_30),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_32)); - __gmpz_add((__mpz_struct *)(e_acsl_32),(__mpz_struct const *)(e_acsl_30), - (__mpz_struct const *)(e_acsl_31)); - e_acsl_33 = __gmpz_cmp((__mpz_struct const *)(e_acsl_27), - (__mpz_struct const *)(e_acsl_32)); - e_acsl_assert(! (e_acsl_33 == 0),(char *)"Postcondition", - (char *)"(x == y+1)",28); - __gmpz_clear((__mpz_struct *)(e_acsl_27)); - __gmpz_clear((__mpz_struct *)(e_acsl_28)); - __gmpz_clear((__mpz_struct *)(e_acsl_30)); - __gmpz_clear((__mpz_struct *)(e_acsl_31)); - __gmpz_clear((__mpz_struct *)(e_acsl_32)); + e_acsl_assert(! (x == 5),(char *)"Precondition",(char *)"(x == 5)",23); + e_acsl_assert(! ((long long)x == (long long)3 + (long long)y), + (char *)"Precondition",(char *)"(x == 3+y)",26); + e_acsl_assert(! (y == 2),(char *)"Precondition",(char *)"(y == 2)",27); + x = 3; + e_acsl_assert(! (x == 3),(char *)"Postcondition",(char *)"(x == 3)",24); + e_acsl_assert(! ((long long)x == (long long)y + (long long)1), + (char *)"Postcondition",(char *)"(x == y+1)",28); } /*@ behavior b1: @@ -229,171 +77,41 @@ int main(void) */ { - mpz_t e_acsl_34; - mpz_t e_acsl_35; - int e_acsl_36; - int e_acsl_40; - mpz_t e_acsl_41; - int e_acsl_42; - int e_acsl_46; - int e_acsl_50; - int e_acsl_51; - int e_acsl_55; - int e_acsl_61; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_34),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)1); - e_acsl_36 = __gmpz_cmp((__mpz_struct const *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_35)); - if (! (e_acsl_36 == 0)) { e_acsl_40 = 1; } - else { - mpz_t e_acsl_37; - mpz_t e_acsl_38; - int e_acsl_39; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_37),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_38),(long)0); - e_acsl_39 = __gmpz_cmp((__mpz_struct const *)(e_acsl_37), - (__mpz_struct const *)(e_acsl_38)); - e_acsl_40 = e_acsl_39 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_37)); - __gmpz_clear((__mpz_struct *)(e_acsl_38)); - } - e_acsl_assert(! e_acsl_40,(char *)"Precondition", + int e_acsl_1; + int e_acsl_2; + int e_acsl_3; + int e_acsl_4; + int e_acsl_5; + if (! (x == 1)) { e_acsl_1 = 1; } + else { e_acsl_1 = x == 0; } + e_acsl_assert(! e_acsl_1,(char *)"Precondition", (char *)"(x == 1 ==> x == 0)",33); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_41),(long)3); - e_acsl_42 = __gmpz_cmp((__mpz_struct const *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_41)); - if (e_acsl_42 == 0) { - mpz_t e_acsl_43; - mpz_t e_acsl_44; - int e_acsl_45; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_43),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_44),(long)2); - e_acsl_45 = __gmpz_cmp((__mpz_struct const *)(e_acsl_43), - (__mpz_struct const *)(e_acsl_44)); - e_acsl_46 = e_acsl_45 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_43)); - __gmpz_clear((__mpz_struct *)(e_acsl_44)); - } - else { e_acsl_46 = 0; } - if (! e_acsl_46) { e_acsl_50 = 1; } - else { - mpz_t e_acsl_47; - mpz_t e_acsl_48; - int e_acsl_49; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_47),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_48),(long)3); - e_acsl_49 = __gmpz_cmp((__mpz_struct const *)(e_acsl_47), - (__mpz_struct const *)(e_acsl_48)); - e_acsl_50 = e_acsl_49 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_47)); - __gmpz_clear((__mpz_struct *)(e_acsl_48)); - } - e_acsl_assert(! e_acsl_50,(char *)"Precondition", + if (x == 3) { e_acsl_2 = y == 2; } + else { e_acsl_2 = 0; } + if (! e_acsl_2) { e_acsl_3 = 1; } + else { e_acsl_3 = x == 3; } + e_acsl_assert(! e_acsl_3,(char *)"Precondition", (char *)"(x == 3 && y == 2 ==> x == 3)",37); - e_acsl_51 = __gmpz_cmp((__mpz_struct const *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_41)); - if (e_acsl_51 == 0) { - mpz_t e_acsl_52; - mpz_t e_acsl_53; - int e_acsl_54; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_52),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_53),(long)2); - e_acsl_54 = __gmpz_cmp((__mpz_struct const *)(e_acsl_52), - (__mpz_struct const *)(e_acsl_53)); - e_acsl_55 = e_acsl_54 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_52)); - __gmpz_clear((__mpz_struct *)(e_acsl_53)); - } - else { e_acsl_55 = 0; } - if (! e_acsl_55) { e_acsl_61 = 1; } - else { - mpz_t e_acsl_56; - mpz_t e_acsl_57; - mpz_t e_acsl_58; - mpz_t e_acsl_59; - int e_acsl_60; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_56),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_57),(long)y); - __gmpz_init((__mpz_struct *)(e_acsl_58)); - __gmpz_add((__mpz_struct *)(e_acsl_58), - (__mpz_struct const *)(e_acsl_56), - (__mpz_struct const *)(e_acsl_57)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_59),(long)5); - e_acsl_60 = __gmpz_cmp((__mpz_struct const *)(e_acsl_58), - (__mpz_struct const *)(e_acsl_59)); - e_acsl_61 = e_acsl_60 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_56)); - __gmpz_clear((__mpz_struct *)(e_acsl_57)); - __gmpz_clear((__mpz_struct *)(e_acsl_58)); - __gmpz_clear((__mpz_struct *)(e_acsl_59)); - } - e_acsl_assert(! e_acsl_61,(char *)"Precondition", + if (x == 3) { e_acsl_4 = y == 2; } + else { e_acsl_4 = 0; } + if (! e_acsl_4) { e_acsl_5 = 1; } + else { e_acsl_5 = (long long)x + (long long)y == (long long)5; } + e_acsl_assert(! e_acsl_5,(char *)"Precondition", (char *)"(x == 3 && y == 2 ==> x+y == 5)",38); - __gmpz_clear((__mpz_struct *)(e_acsl_34)); - __gmpz_clear((__mpz_struct *)(e_acsl_35)); - __gmpz_clear((__mpz_struct *)(e_acsl_41)); x += y; } /*@ requires x ≡ 5; */ - { - mpz_t e_acsl_62; - mpz_t e_acsl_63; - int e_acsl_64; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_62),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_63),(long)5); - e_acsl_64 = __gmpz_cmp((__mpz_struct const *)(e_acsl_62), - (__mpz_struct const *)(e_acsl_63)); - e_acsl_assert(! (e_acsl_64 == 0),(char *)"Precondition", - (char *)"(x == 5)",41); - __gmpz_clear((__mpz_struct *)(e_acsl_62)); - __gmpz_clear((__mpz_struct *)(e_acsl_63)); - /*@ requires y ≡ 2; */ - { - mpz_t e_acsl_65; - mpz_t e_acsl_66; - int e_acsl_67; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_65),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_66),(long)2); - e_acsl_67 = __gmpz_cmp((__mpz_struct const *)(e_acsl_65), - (__mpz_struct const *)(e_acsl_66)); - e_acsl_assert(! (e_acsl_67 == 0),(char *)"Precondition", - (char *)"(y == 2)",42); - __gmpz_clear((__mpz_struct *)(e_acsl_65)); - __gmpz_clear((__mpz_struct *)(e_acsl_66)); - x += y; - } - } - + e_acsl_assert(! (x == 5),(char *)"Precondition",(char *)"(x == 5)",41); + /*@ requires y ≡ 2; */ + e_acsl_assert(! (y == 2),(char *)"Precondition",(char *)"(y == 2)",42); + x += y; /*@ requires x ≡ 7; ensures x ≡ 7; */ { - mpz_t e_acsl_71; - mpz_t e_acsl_72; - int e_acsl_73; - { - mpz_t e_acsl_68; - mpz_t e_acsl_69; - int e_acsl_70; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_68),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_69),(long)7); - e_acsl_70 = __gmpz_cmp((__mpz_struct const *)(e_acsl_68), - (__mpz_struct const *)(e_acsl_69)); - e_acsl_assert(! (e_acsl_70 == 0),(char *)"Precondition", - (char *)"(x == 7)",45); - __gmpz_clear((__mpz_struct *)(e_acsl_68)); - __gmpz_clear((__mpz_struct *)(e_acsl_69)); - __retres = 0; - } - - __gmpz_init_set_si((__mpz_struct *)(e_acsl_71),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_72),(long)7); - e_acsl_73 = __gmpz_cmp((__mpz_struct const *)(e_acsl_71), - (__mpz_struct const *)(e_acsl_72)); - e_acsl_assert(! (e_acsl_73 == 0),(char *)"Postcondition", - (char *)"(x == 7)",46); - __gmpz_clear((__mpz_struct *)(e_acsl_71)); - __gmpz_clear((__mpz_struct *)(e_acsl_72)); + e_acsl_assert(! (x == 7),(char *)"Precondition",(char *)"(x == 7)",45); + __retres = 0; + e_acsl_assert(! (x == 7),(char *)"Postcondition",(char *)"(x == 7)",46); } return (__retres); diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_typedef.c b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_typedef.c index 54168dccf3e..a1f81555c19 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_typedef.c +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/gen_typedef.c @@ -1,28 +1,5 @@ /* 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 mpz_t[1]; typedef unsigned char uint8; -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -45,20 +22,7 @@ int main(void) uint8 x; x = (unsigned char)0; /*@ assert x ≡ 0; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_ui((__mpz_struct *)(e_acsl_1),(unsigned long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)0); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Assertion",(char *)"(x == 0)", - 10); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - + e_acsl_assert(! ((int)x == 0),(char *)"Assertion",(char *)"(x == 0)",10); __retres = 0; return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/integer_constant.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/integer_constant.res.oracle index 1fa8809880e..9dbd7d6e16a 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/integer_constant.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/integer_constant.res.oracle @@ -13,30 +13,10 @@ PROJECT_FILE.i:233:[value] Assertion got status valid. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert PROJECT_FILE.i:236:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_str <- main. - Called from PROJECT_FILE.i:240. -PROJECT_FILE.i:86:[value] Function __gmpz_init_set_str: postcondition got status valid. -[value] Done for function __gmpz_init_set_str -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:241. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:242. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. -[value] Done for function exit + Called from PROJECT_FILE.i:237. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:244. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear [value] Recording results for main [value] done for function main [value] ====== VALUES COMPUTED ====== @@ -45,25 +25,6 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. __retres ∈ {0} x ∈ {0} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; -/*@ ensures \valid(\old(z)); - assigns *z; */ -extern int __gmpz_init_set_str(__mpz_struct * /*[1]*/ z, char const *str, - int base); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -90,17 +51,9 @@ int main(void) /*@ assert 0 ≢ 1; */ ; e_acsl_assert(! (0 != 1),(char *)"Assertion",(char *)"(0 != 1)",9); /*@ assert 1152921504606846975 ≡ 0xfffffffffffffff; */ ; - { - mpz_t e_acsl_1; - int e_acsl_2; - __gmpz_init_set_str((__mpz_struct *)(e_acsl_1),"1152921504606846975",10); - e_acsl_2 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_1)); - e_acsl_assert(! (e_acsl_2 == 0),(char *)"Assertion", - (char *)"(1152921504606846975 == 0xfffffffffffffff)",10); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - } - + e_acsl_assert(! ((unsigned long long)1152921504606846975 == (unsigned long long)0xfffffffffffffff), + (char *)"Assertion", + (char *)"(1152921504606846975 == 0xfffffffffffffff)",10); __retres = 0; return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.res.oracle index 03d77a19029..1b2c432f853 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/invariant.res.oracle @@ -3,158 +3,36 @@ [value] Initial state computed [value] Values of globals at initialization PROJECT_FILE.i:233:[value] entering loop for the first time -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:244. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. -[value] Done for function exit +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_cmp -PROJECT_FILE.i:252:[value] assigning non deterministic value for the first time -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:253. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:246. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:265. -[value] Recording results for e_acsl_assert -[value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:244. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:253. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:265. +PROJECT_FILE.i:244:[value] assigning non deterministic value for the first time +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:246. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf [value] computing for function exit <- e_acsl_assert <- main. Called from PROJECT_FILE.i:221. +PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:244. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:253. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:265. +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:246. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -163,48 +41,12 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:244. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:253. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:265. +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:246. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -213,48 +55,12 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:244. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:253. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:265. +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:246. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -263,48 +69,12 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:244. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:253. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:265. +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:246. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -313,48 +83,12 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:244. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:253. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:265. +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:246. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -363,48 +97,12 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:244. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:253. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:265. +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:246. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -413,48 +111,12 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:244. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:253. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:265. +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:246. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -463,48 +125,12 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:244. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:253. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:265. +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:246. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -513,48 +139,12 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:244. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:253. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:265. +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:246. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -563,48 +153,12 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:244. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:253. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:265. +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:246. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -613,48 +167,12 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:244. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:253. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:265. +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:246. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -663,48 +181,12 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:244. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:253. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:265. +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:246. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -713,48 +195,12 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:244. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:253. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:265. +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:246. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -763,49 +209,13 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:244. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:257. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:258. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:253. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:263:[value] warning: 2's complement assumed for overflow -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear -[value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:265. +PROJECT_FILE.i:244:[value] warning: 2's complement assumed for overflow +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:246. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -822,25 +232,6 @@ PROJECT_FILE.i:263:[value] warning: 2's complement assumed for overflow __retres ∈ {0} x ∈ [--..--] /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -868,32 +259,11 @@ int main(void) while (1) { if (! (i < 10)) { break; } /*@ invariant 0 ≤ i ∧ i < 10; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - int e_acsl_7; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)0); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)i); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - if (e_acsl_3 <= 0) { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)i); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)10); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_7 = e_acsl_6 < 0; - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - else { e_acsl_7 = 0; } - e_acsl_assert(! e_acsl_7,(char *)"Invariant", + { int e_acsl_1; + if (0 <= i) { e_acsl_1 = i < 10; } + else { e_acsl_1 = 0; } + e_acsl_assert(! e_acsl_1,(char *)"Invariant", (char *)"(0 <= i && i < 10)",8); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); } x += i; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.res.oracle index 14c65ead652..a9ef5b44e1c 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/labeled_stmt.res.oracle @@ -4,111 +4,22 @@ [value] Values of globals at initialization X ∈ {0} PROJECT_FILE.i:232:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:237. -PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:238. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:239. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:240. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. -[value] Done for function exit + Called from PROJECT_FILE.i:233. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:241. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:260. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:261. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:262. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:241. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:263. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:264. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:268. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:269. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:270. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:271. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:243. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:272. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:273. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:286. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:287. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:288. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:289. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:252. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:290. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:291. -[value] Done for function __gmpz_clear PROJECT_FILE.i:226:[value] Function main: postcondition got status valid. [value] Recording results for main [value] done for function main @@ -118,25 +29,6 @@ PROJECT_FILE.i:226:[value] Function main: postcondition got status valid. X ∈ {3} __retres ∈ {0} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -161,52 +53,16 @@ int main(void) goto L1; L1: /*@ assert X ≡ 0; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)0); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Assertion",(char *)"(X == 0)", - 11); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - + e_acsl_assert(! (X == 0),(char *)"Assertion",(char *)"(X == 0)",11); X = 1; goto L2; L2: /*@ requires X ≡ 1; ensures X ≡ 2; */ { - mpz_t e_acsl_7; - mpz_t e_acsl_8; - int e_acsl_9; - { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)1); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 == 0),(char *)"Precondition", - (char *)"(X == 1)",13); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - X = 2; - } - - __gmpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)2); - e_acsl_9 = __gmpz_cmp((__mpz_struct const *)(e_acsl_7), - (__mpz_struct const *)(e_acsl_8)); - e_acsl_assert(! (e_acsl_9 == 0),(char *)"Postcondition", - (char *)"(X == 2)",13); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); + e_acsl_assert(! (X == 1),(char *)"Precondition",(char *)"(X == 1)",13); + X = 2; + e_acsl_assert(! (X == 2),(char *)"Postcondition",(char *)"(X == 2)",13); } if (X) { @@ -214,22 +70,9 @@ int main(void) __retres = 0; goto return_label; } __retres = 0; - return_label: - { - mpz_t e_acsl_10; - mpz_t e_acsl_11; - int e_acsl_12; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)3); - e_acsl_12 = __gmpz_cmp((__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_11)); - e_acsl_assert(! (e_acsl_12 == 0),(char *)"Postcondition", - (char *)"(X == 3)",8); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - return (__retres); - } - + return_label: e_acsl_assert(! (X == 3),(char *)"Postcondition", + (char *)"(X == 3)",8); + return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.res.oracle index 9e4b1bd3468..325f5cf3d15 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/lazy.res.oracle @@ -3,523 +3,73 @@ [value] Initial state computed [value] Values of globals at initialization PROJECT_FILE.i:232:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:238. -PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:239. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:240. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:245. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:246. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:247. -[value] Done for function __gmpz_cmp -PROJECT_FILE.i:248:[value] assigning non deterministic value for the first time -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:249. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_clear [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:253. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. -[value] Done for function exit + Called from PROJECT_FILE.i:236. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:254. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:255. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:259:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:265. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:266. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:267. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:273. -[value] Done for function __gmpz_init_set_si -PROJECT_FILE.i:274:[value] Assertion got status invalid (stopping propagation). +PROJECT_FILE.i:240:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:284. + Called from PROJECT_FILE.i:251. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:285. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:286. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:290:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:296. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:297. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:298. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:304. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:305. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:306. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:308. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:309. -[value] Done for function __gmpz_clear +PROJECT_FILE.i:255:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:311. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:259. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:312. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:313. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:317:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:323. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:324. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:325. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:332. -[value] Done for function __gmpz_init_set_si -PROJECT_FILE.i:333:[value] Assertion got status invalid (stopping propagation). +PROJECT_FILE.i:263:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:342. + Called from PROJECT_FILE.i:274. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:343. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:344. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:348:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:354. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:355. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:356. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:362. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:363. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:364. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:366. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:367. -[value] Done for function __gmpz_clear +PROJECT_FILE.i:278:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:369. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:282. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:370. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:371. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:375:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:381. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:382. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:383. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:390. -[value] Done for function __gmpz_init_set_si -PROJECT_FILE.i:391:[value] Assertion got status invalid (stopping propagation). +PROJECT_FILE.i:286:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:400. + Called from PROJECT_FILE.i:297. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:401. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:402. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:406:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:412. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:413. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:414. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:301:[value] Assertion got status unknown. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:417. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:305. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:418. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:419. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:423:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:429. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:430. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:431. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:309:[value] Assertion got status unknown. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:434. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:313. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:435. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:436. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:440:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:446. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:447. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:448. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:453. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:464. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:454. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:465. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:455. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:466. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:457. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:468. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:458. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:469. -[value] Done for function __gmpz_clear +PROJECT_FILE.i:317:[value] Assertion got status unknown. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:471. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:321. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:472. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:473. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:477:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:484. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:485. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:486. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:492. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:493. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:494. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:496. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:497. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:504. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:505. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:506. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:512. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:513. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:514. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:516. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:517. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:520. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:521. -[value] Done for function __gmpz_clear +PROJECT_FILE.i:325:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:524. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:337. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:525. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:526. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:530:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:537. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:538. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:539. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:545. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:546. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:547. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:549. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:550. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:557. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:558. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:559. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:565. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:566. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:567. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:569. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:570. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:573. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:574. -[value] Done for function __gmpz_clear +PROJECT_FILE.i:341:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:577. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:353. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:578. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:579. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:583:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:592. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:593. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:594. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:597. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:598. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:599. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:357:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:600. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:361. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:602. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:603. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:604. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:608:[value] Assertion got status valid. +PROJECT_FILE.i:366:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:615. + Called from PROJECT_FILE.i:373. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -PROJECT_FILE.i:620:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:629. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:630. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:631. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:633. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:634. -[value] Done for function __gmpz_clear +PROJECT_FILE.i:378:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:637. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:385. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert [value] Recording results for main @@ -531,25 +81,6 @@ PROJECT_FILE.i:620:[value] Assertion got status valid. x ∈ {0} y ∈ {1} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -574,439 +105,157 @@ int main(void) x = 0; y = 1; /*@ assert x ≡ 0 ∧ y ≡ 1; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - int e_acsl_7; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)0); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - if (e_acsl_3 == 0) { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)1); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_7 = e_acsl_6 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - else { e_acsl_7 = 0; } - e_acsl_assert(! e_acsl_7,(char *)"Assertion", + { int e_acsl_1; + if (x == 0) { e_acsl_1 = y == 1; } + else { e_acsl_1 = 0; } + e_acsl_assert(! e_acsl_1,(char *)"Assertion", (char *)"(x == 0 && y == 1)",10); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); } /*@ assert ¬(x ≢ 0 ∧ y ≡ 1/0); */ ; { - mpz_t e_acsl_8; - mpz_t e_acsl_9; - int e_acsl_10; - int e_acsl_15; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)0); - e_acsl_10 = __gmpz_cmp((__mpz_struct const *)(e_acsl_8), - (__mpz_struct const *)(e_acsl_9)); - if (e_acsl_10 != 0) { - mpz_t e_acsl_11; - int e_acsl_12; - mpz_t e_acsl_13; - int e_acsl_14; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)y); + int e_acsl_3; + if (x != 0) { + int e_acsl_2; /*@ assert 0 ≢ 0; */ ; e_acsl_assert(0 == 0,(char *)"Assertion",(char *)"(0 == 0)",11); - e_acsl_12 = 1 / 0; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)e_acsl_12); - e_acsl_14 = __gmpz_cmp((__mpz_struct const *)(e_acsl_11), - (__mpz_struct const *)(e_acsl_13)); - e_acsl_15 = e_acsl_14 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); + e_acsl_2 = 1 / 0; + e_acsl_3 = y == e_acsl_2; } - else { e_acsl_15 = 0; } - e_acsl_assert(! (! e_acsl_15),(char *)"Assertion", + else { e_acsl_3 = 0; } + e_acsl_assert(! (! e_acsl_3),(char *)"Assertion", (char *)"(!(x != 0 && y == 1/0))",11); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - __gmpz_clear((__mpz_struct *)(e_acsl_9)); } /*@ assert y ≡ 1 ∨ x ≡ 1; */ ; - { - mpz_t e_acsl_16; - mpz_t e_acsl_17; - int e_acsl_18; - int e_acsl_22; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)1); - e_acsl_18 = __gmpz_cmp((__mpz_struct const *)(e_acsl_16), - (__mpz_struct const *)(e_acsl_17)); - if (e_acsl_18 == 0) { e_acsl_22 = 1; } - else { - mpz_t e_acsl_19; - mpz_t e_acsl_20; - int e_acsl_21; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)1); - e_acsl_21 = __gmpz_cmp((__mpz_struct const *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_20)); - e_acsl_22 = e_acsl_21 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_20)); - } - e_acsl_assert(! e_acsl_22,(char *)"Assertion", + { int e_acsl_4; + if (y == 1) { e_acsl_4 = 1; } + else { e_acsl_4 = x == 1; } + e_acsl_assert(! e_acsl_4,(char *)"Assertion", (char *)"(y == 1 || x == 1)",12); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - __gmpz_clear((__mpz_struct *)(e_acsl_17)); } /*@ assert x ≡ 0 ∨ y ≡ 1/0; */ ; { - mpz_t e_acsl_23; - mpz_t e_acsl_24; - int e_acsl_25; - int e_acsl_30; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_23),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_24),(long)0); - e_acsl_25 = __gmpz_cmp((__mpz_struct const *)(e_acsl_23), - (__mpz_struct const *)(e_acsl_24)); - if (e_acsl_25 == 0) { e_acsl_30 = 1; } + int e_acsl_6; + if (x == 0) { e_acsl_6 = 1; } else { - mpz_t e_acsl_26; - int e_acsl_27; - mpz_t e_acsl_28; - int e_acsl_29; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)y); + int e_acsl_5; /*@ assert 0 ≢ 0; */ ; e_acsl_assert(0 == 0,(char *)"Assertion",(char *)"(0 == 0)",13); - e_acsl_27 = 1 / 0; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_28),(long)e_acsl_27); - e_acsl_29 = __gmpz_cmp((__mpz_struct const *)(e_acsl_26), - (__mpz_struct const *)(e_acsl_28)); - e_acsl_30 = e_acsl_29 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_26)); - __gmpz_clear((__mpz_struct *)(e_acsl_28)); + e_acsl_5 = 1 / 0; + e_acsl_6 = y == e_acsl_5; } - e_acsl_assert(! e_acsl_30,(char *)"Assertion", + e_acsl_assert(! e_acsl_6,(char *)"Assertion", (char *)"(x == 0 || y == 1/0)",13); - __gmpz_clear((__mpz_struct *)(e_acsl_23)); - __gmpz_clear((__mpz_struct *)(e_acsl_24)); } /*@ assert x ≡ 0 ⇒ y ≡ 1; */ ; - { - mpz_t e_acsl_31; - mpz_t e_acsl_32; - int e_acsl_33; - int e_acsl_37; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_32),(long)0); - e_acsl_33 = __gmpz_cmp((__mpz_struct const *)(e_acsl_31), - (__mpz_struct const *)(e_acsl_32)); - if (! (e_acsl_33 == 0)) { e_acsl_37 = 1; } - else { - mpz_t e_acsl_34; - mpz_t e_acsl_35; - int e_acsl_36; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_34),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)1); - e_acsl_36 = __gmpz_cmp((__mpz_struct const *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_35)); - e_acsl_37 = e_acsl_36 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_34)); - __gmpz_clear((__mpz_struct *)(e_acsl_35)); - } - e_acsl_assert(! e_acsl_37,(char *)"Assertion", + { int e_acsl_7; + if (! (x == 0)) { e_acsl_7 = 1; } + else { e_acsl_7 = y == 1; } + e_acsl_assert(! e_acsl_7,(char *)"Assertion", (char *)"(x == 0 ==> y == 1)",14); - __gmpz_clear((__mpz_struct *)(e_acsl_31)); - __gmpz_clear((__mpz_struct *)(e_acsl_32)); } /*@ assert x ≡ 1 ⇒ y ≡ 1/0; */ ; { - mpz_t e_acsl_38; - mpz_t e_acsl_39; - int e_acsl_40; - int e_acsl_45; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_38),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_39),(long)1); - e_acsl_40 = __gmpz_cmp((__mpz_struct const *)(e_acsl_38), - (__mpz_struct const *)(e_acsl_39)); - if (! (e_acsl_40 == 0)) { e_acsl_45 = 1; } + int e_acsl_9; + if (! (x == 1)) { e_acsl_9 = 1; } else { - mpz_t e_acsl_41; - int e_acsl_42; - mpz_t e_acsl_43; - int e_acsl_44; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_41),(long)y); + int e_acsl_8; /*@ assert 0 ≢ 0; */ ; e_acsl_assert(0 == 0,(char *)"Assertion",(char *)"(0 == 0)",15); - e_acsl_42 = 1 / 0; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_43),(long)e_acsl_42); - e_acsl_44 = __gmpz_cmp((__mpz_struct const *)(e_acsl_41), - (__mpz_struct const *)(e_acsl_43)); - e_acsl_45 = e_acsl_44 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_41)); - __gmpz_clear((__mpz_struct *)(e_acsl_43)); + e_acsl_8 = 1 / 0; + e_acsl_9 = y == e_acsl_8; } - e_acsl_assert(! e_acsl_45,(char *)"Assertion", + e_acsl_assert(! e_acsl_9,(char *)"Assertion", (char *)"(x == 1 ==> y == 1/0)",15); - __gmpz_clear((__mpz_struct *)(e_acsl_38)); - __gmpz_clear((__mpz_struct *)(e_acsl_39)); } /*@ assert x≢0? x ≢ 0: y ≢ 0; */ ; - { - mpz_t e_acsl_46; - mpz_t e_acsl_47; - int e_acsl_48; - int e_acsl_49; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_46),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_47),(long)0); - e_acsl_48 = __gmpz_cmp((__mpz_struct const *)(e_acsl_46), - (__mpz_struct const *)(e_acsl_47)); - if (e_acsl_48 != 0) { e_acsl_49 = x != 0; } - else { e_acsl_49 = y != 0; } - e_acsl_assert(! e_acsl_49,(char *)"Assertion", + { int e_acsl_10; + if (x != 0) { e_acsl_10 = x != 0; } + else { e_acsl_10 = y != 0; } + e_acsl_assert(! e_acsl_10,(char *)"Assertion", (char *)"(x!=0? x != 0: y != 0)",16); - __gmpz_clear((__mpz_struct *)(e_acsl_46)); - __gmpz_clear((__mpz_struct *)(e_acsl_47)); } /*@ assert y≢0? y ≢ 0: x ≢ 0; */ ; - { - mpz_t e_acsl_50; - mpz_t e_acsl_51; - int e_acsl_52; - int e_acsl_53; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_50),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_51),(long)0); - e_acsl_52 = __gmpz_cmp((__mpz_struct const *)(e_acsl_50), - (__mpz_struct const *)(e_acsl_51)); - if (e_acsl_52 != 0) { e_acsl_53 = y != 0; } - else { e_acsl_53 = x != 0; } - e_acsl_assert(! e_acsl_53,(char *)"Assertion", + { int e_acsl_11; + if (y != 0) { e_acsl_11 = y != 0; } + else { e_acsl_11 = x != 0; } + e_acsl_assert(! e_acsl_11,(char *)"Assertion", (char *)"(y!=0? y != 0: x != 0)",17); - __gmpz_clear((__mpz_struct *)(e_acsl_50)); - __gmpz_clear((__mpz_struct *)(e_acsl_51)); } /*@ assert x≡1? x ≡ 18: x ≡ 0; */ ; - { - mpz_t e_acsl_54; - mpz_t e_acsl_55; - int e_acsl_56; - int e_acsl_63; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_54),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_55),(long)1); - e_acsl_56 = __gmpz_cmp((__mpz_struct const *)(e_acsl_54), - (__mpz_struct const *)(e_acsl_55)); - if (e_acsl_56 == 0) { - mpz_t e_acsl_57; - mpz_t e_acsl_58; - int e_acsl_59; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_57),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_58),(long)18); - e_acsl_59 = __gmpz_cmp((__mpz_struct const *)(e_acsl_57), - (__mpz_struct const *)(e_acsl_58)); - e_acsl_63 = e_acsl_59 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_57)); - __gmpz_clear((__mpz_struct *)(e_acsl_58)); - } - else { - mpz_t e_acsl_60; - mpz_t e_acsl_61; - int e_acsl_62; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_60),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_61),(long)0); - e_acsl_62 = __gmpz_cmp((__mpz_struct const *)(e_acsl_60), - (__mpz_struct const *)(e_acsl_61)); - e_acsl_63 = e_acsl_62 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_60)); - __gmpz_clear((__mpz_struct *)(e_acsl_61)); - } - e_acsl_assert(! e_acsl_63,(char *)"Assertion", + { int e_acsl_12; + if (x == 1) { e_acsl_12 = x == 18; } + else { e_acsl_12 = x == 0; } + e_acsl_assert(! e_acsl_12,(char *)"Assertion", (char *)"(x==1? x == 18: x == 0)",18); - __gmpz_clear((__mpz_struct *)(e_acsl_54)); - __gmpz_clear((__mpz_struct *)(e_acsl_55)); } /*@ assert x ≡ 2 ⇔ y ≡ 3; */ ; - { - mpz_t e_acsl_64; - mpz_t e_acsl_65; - int e_acsl_66; - int e_acsl_70; - int e_acsl_78; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_64),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_65),(long)2); - e_acsl_66 = __gmpz_cmp((__mpz_struct const *)(e_acsl_64), - (__mpz_struct const *)(e_acsl_65)); - if (! (e_acsl_66 == 0)) { e_acsl_70 = 1; } - else { - mpz_t e_acsl_67; - mpz_t e_acsl_68; - int e_acsl_69; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_67),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_68),(long)3); - e_acsl_69 = __gmpz_cmp((__mpz_struct const *)(e_acsl_67), - (__mpz_struct const *)(e_acsl_68)); - e_acsl_70 = e_acsl_69 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_67)); - __gmpz_clear((__mpz_struct *)(e_acsl_68)); - } - if (e_acsl_70) { - mpz_t e_acsl_71; - mpz_t e_acsl_72; - int e_acsl_73; - int e_acsl_77; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_71),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_72),(long)3); - e_acsl_73 = __gmpz_cmp((__mpz_struct const *)(e_acsl_71), - (__mpz_struct const *)(e_acsl_72)); - if (! (e_acsl_73 == 0)) { e_acsl_77 = 1; } - else { - mpz_t e_acsl_74; - mpz_t e_acsl_75; - int e_acsl_76; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_74),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_75),(long)2); - e_acsl_76 = __gmpz_cmp((__mpz_struct const *)(e_acsl_74), - (__mpz_struct const *)(e_acsl_75)); - e_acsl_77 = e_acsl_76 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_74)); - __gmpz_clear((__mpz_struct *)(e_acsl_75)); - } - e_acsl_78 = e_acsl_77; - __gmpz_clear((__mpz_struct *)(e_acsl_71)); - __gmpz_clear((__mpz_struct *)(e_acsl_72)); + { int e_acsl_13; + int e_acsl_15; + if (! (x == 2)) { e_acsl_13 = 1; } + else { e_acsl_13 = y == 3; } + if (e_acsl_13) { + int e_acsl_14; + if (! (y == 3)) { e_acsl_14 = 1; } + else { e_acsl_14 = x == 2; } + e_acsl_15 = e_acsl_14; } - else { e_acsl_78 = 0; } - e_acsl_assert(! e_acsl_78,(char *)"Assertion", + else { e_acsl_15 = 0; } + e_acsl_assert(! e_acsl_15,(char *)"Assertion", (char *)"(x == 2 <==> y == 3)",21); - __gmpz_clear((__mpz_struct *)(e_acsl_64)); - __gmpz_clear((__mpz_struct *)(e_acsl_65)); } /*@ assert x ≡ 0 ⇔ y ≡ 1; */ ; - { - mpz_t e_acsl_79; - mpz_t e_acsl_80; - int e_acsl_81; - int e_acsl_85; - int e_acsl_93; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_79),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_80),(long)0); - e_acsl_81 = __gmpz_cmp((__mpz_struct const *)(e_acsl_79), - (__mpz_struct const *)(e_acsl_80)); - if (! (e_acsl_81 == 0)) { e_acsl_85 = 1; } - else { - mpz_t e_acsl_82; - mpz_t e_acsl_83; - int e_acsl_84; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_82),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_83),(long)1); - e_acsl_84 = __gmpz_cmp((__mpz_struct const *)(e_acsl_82), - (__mpz_struct const *)(e_acsl_83)); - e_acsl_85 = e_acsl_84 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_82)); - __gmpz_clear((__mpz_struct *)(e_acsl_83)); - } - if (e_acsl_85) { - mpz_t e_acsl_86; - mpz_t e_acsl_87; - int e_acsl_88; - int e_acsl_92; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_86),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_87),(long)1); - e_acsl_88 = __gmpz_cmp((__mpz_struct const *)(e_acsl_86), - (__mpz_struct const *)(e_acsl_87)); - if (! (e_acsl_88 == 0)) { e_acsl_92 = 1; } - else { - mpz_t e_acsl_89; - mpz_t e_acsl_90; - int e_acsl_91; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_89),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_90),(long)0); - e_acsl_91 = __gmpz_cmp((__mpz_struct const *)(e_acsl_89), - (__mpz_struct const *)(e_acsl_90)); - e_acsl_92 = e_acsl_91 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_89)); - __gmpz_clear((__mpz_struct *)(e_acsl_90)); - } - e_acsl_93 = e_acsl_92; - __gmpz_clear((__mpz_struct *)(e_acsl_86)); - __gmpz_clear((__mpz_struct *)(e_acsl_87)); + { int e_acsl_16; + int e_acsl_18; + if (! (x == 0)) { e_acsl_16 = 1; } + else { e_acsl_16 = y == 1; } + if (e_acsl_16) { + int e_acsl_17; + if (! (y == 1)) { e_acsl_17 = 1; } + else { e_acsl_17 = x == 0; } + e_acsl_18 = e_acsl_17; } - else { e_acsl_93 = 0; } - e_acsl_assert(! e_acsl_93,(char *)"Assertion", + else { e_acsl_18 = 0; } + e_acsl_assert(! e_acsl_18,(char *)"Assertion", (char *)"(x == 0 <==> y == 1)",22); - __gmpz_clear((__mpz_struct *)(e_acsl_79)); - __gmpz_clear((__mpz_struct *)(e_acsl_80)); } /*@ assert ((x≢0? x: y)≢0) ≡ (x≡0); */ ; - { - mpz_t e_acsl_94; - mpz_t e_acsl_95; - int e_acsl_96; - int e_acsl_97; - mpz_t e_acsl_98; - int e_acsl_99; - int e_acsl_100; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_94),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_95),(long)0); - e_acsl_96 = __gmpz_cmp((__mpz_struct const *)(e_acsl_94), - (__mpz_struct const *)(e_acsl_95)); - if (e_acsl_96 != 0) { e_acsl_97 = x; } - else { e_acsl_97 = y; } - __gmpz_init_set_si((__mpz_struct *)(e_acsl_98),(long)e_acsl_97); - e_acsl_99 = __gmpz_cmp((__mpz_struct const *)(e_acsl_98), - (__mpz_struct const *)(e_acsl_95)); - e_acsl_100 = __gmpz_cmp((__mpz_struct const *)(e_acsl_94), - (__mpz_struct const *)(e_acsl_95)); - e_acsl_assert(! ((e_acsl_99 != 0) == (e_acsl_100 == 0)), - (char *)"Assertion", + { int e_acsl_19; + if (x != 0) { e_acsl_19 = x; } + else { e_acsl_19 = y; } + e_acsl_assert(! ((e_acsl_19 != 0) == (x == 0)),(char *)"Assertion", (char *)"(((x!=0? x: y)!=0) == (x==0))",25); - __gmpz_clear((__mpz_struct *)(e_acsl_94)); - __gmpz_clear((__mpz_struct *)(e_acsl_95)); - __gmpz_clear((__mpz_struct *)(e_acsl_98)); } /*@ assert (x ≢ 0 ∧ y ≢ 0) ∨ y ≢ 0; */ ; - { int e_acsl_101; - int e_acsl_102; - if (x != 0) { e_acsl_101 = y != 0; } - else { e_acsl_101 = 0; } - if (e_acsl_101) { e_acsl_102 = 1; } - else { e_acsl_102 = y != 0; } - e_acsl_assert(! e_acsl_102,(char *)"Assertion", + { int e_acsl_20; + int e_acsl_21; + if (x != 0) { e_acsl_20 = y != 0; } + else { e_acsl_20 = 0; } + if (e_acsl_20) { e_acsl_21 = 1; } + else { e_acsl_21 = y != 0; } + e_acsl_assert(! e_acsl_21,(char *)"Assertion", (char *)"((x != 0 && y != 0) || y != 0)",26); } /*@ assert (x ≢ 0 ∨ y ≢ 0) ∧ y ≡ 1; */ ; - { int e_acsl_103; - int e_acsl_107; - if (x != 0) { e_acsl_103 = 1; } - else { e_acsl_103 = y != 0; } - if (e_acsl_103) { - mpz_t e_acsl_104; - mpz_t e_acsl_105; - int e_acsl_106; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_104),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_105),(long)1); - e_acsl_106 = __gmpz_cmp((__mpz_struct const *)(e_acsl_104), - (__mpz_struct const *)(e_acsl_105)); - e_acsl_107 = e_acsl_106 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_104)); - __gmpz_clear((__mpz_struct *)(e_acsl_105)); - } - else { e_acsl_107 = 0; } - e_acsl_assert(! e_acsl_107,(char *)"Assertion", + { int e_acsl_22; + int e_acsl_23; + if (x != 0) { e_acsl_22 = 1; } + else { e_acsl_22 = y != 0; } + if (e_acsl_22) { e_acsl_23 = y == 1; } + else { e_acsl_23 = 0; } + e_acsl_assert(! e_acsl_23,(char *)"Assertion", (char *)"((x != 0 || y != 0) && y == 1)",27); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.res.oracle index c91f6fcda29..41a1c8f6cc9 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/linear_search.res.oracle @@ -1,98 +1,20 @@ -tests/e-acsl-runtime/linear_search.i:8:[e-acsl] warning: missing guard for ensuring that the given integer is C-representable -:0:[e-acsl] warning: missing guard for ensuring that i is a valid array index -tests/e-acsl-runtime/linear_search.i:8:[e-acsl] warning: missing guard for ensuring that the given integer is C-representable -:0:[e-acsl] warning: missing guard for ensuring that i+1 is a valid array index -tests/e-acsl-runtime/linear_search.i:10:[e-acsl] warning: missing guard for ensuring that the given integer is C-representable -:0:[e-acsl] warning: missing guard for ensuring that j is a valid array index -tests/e-acsl-runtime/linear_search.i:13:[e-acsl] warning: missing guard for ensuring that the given integer is C-representable +tests/e-acsl-runtime/linear_search.i:8:[e-acsl] warning: missing guard for ensuring that i is a valid array index +tests/e-acsl-runtime/linear_search.i:8:[e-acsl] warning: missing guard for ensuring that i+1 is a valid array index +tests/e-acsl-runtime/linear_search.i:10:[e-acsl] warning: missing guard for ensuring that j is a valid array index +tests/e-acsl-runtime/linear_search.i:13:[e-acsl] warning: missing guard for ensuring that j is a valid array index [value] Analyzing a complete application starting at main [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization A[0..9] ∈ {0} -PROJECT_FILE.i:457:[value] entering loop for the first time -PROJECT_FILE.i:460:[value] assigning non deterministic value for the first time +PROJECT_FILE.i:336:[value] entering loop for the first time +PROJECT_FILE.i:339:[value] assigning non deterministic value for the first time [value] computing for function search <- main. - Called from PROJECT_FILE.i:463. + Called from PROJECT_FILE.i:342. PROJECT_FILE.i:226:[value] Function search: precondition got status unknown. -[value] computing for function __gmpz_init <- search <- main. - Called from PROJECT_FILE.i:247. -PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:250. -PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_set <- search <- main. - Called from PROJECT_FILE.i:251. -PROJECT_FILE.i:94:[value] Function __gmpz_set: precondition got status valid. -PROJECT_FILE.i:95:[value] Function __gmpz_set: precondition got status valid. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:252. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:255:[value] entering loop for the first time -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- search <- main. - Called from PROJECT_FILE.i:260. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:262. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_get_si <- search <- main. - Called from PROJECT_FILE.i:270. -PROJECT_FILE.i:172:[value] Function __gmpz_get_si: precondition got status valid. -[value] Done for function __gmpz_get_si -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:271. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- search <- main. - Called from PROJECT_FILE.i:272. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- search <- main. - Called from PROJECT_FILE.i:273. -PROJECT_FILE.i:138:[value] Function __gmpz_add: precondition got status valid. -PROJECT_FILE.i:139:[value] Function __gmpz_add: precondition got status valid. -PROJECT_FILE.i:140:[value] Function __gmpz_add: precondition got status valid. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_get_si <- search <- main. - Called from PROJECT_FILE.i:274. -[value] Done for function __gmpz_get_si -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:275. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:276. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:277:[kernel] warning: accessing out of bounds index [-2147483648..2147483647]. - assert 0 ≤ e_acsl_3 ∧ e_acsl_3 < 10; -PROJECT_FILE.i:277:[kernel] warning: accessing out of bounds index [-2147483648..2147483647]. - assert 0 ≤ e_acsl_6 ∧ e_acsl_6 < 10; -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:286. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- search <- main. - Called from PROJECT_FILE.i:287. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- search <- main. - Called from PROJECT_FILE.i:288. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_set <- search <- main. - Called from PROJECT_FILE.i:289. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:290. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:291. -[value] Done for function __gmpz_clear +PROJECT_FILE.i:248:[value] entering loop for the first time [value] computing for function e_acsl_assert <- search <- main. - Called from PROJECT_FILE.i:296. + Called from PROJECT_FILE.i:258. [value] computing for function printf <- e_acsl_assert <- search <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -102,123 +24,11 @@ PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:299. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init <- search <- main. - Called from PROJECT_FILE.i:304. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:307. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_set <- search <- main. - Called from PROJECT_FILE.i:308. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:309. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:312:[value] entering loop for the first time -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:316. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- search <- main. - Called from PROJECT_FILE.i:317. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:319. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_get_si <- search <- main. - Called from PROJECT_FILE.i:324. -[value] Done for function __gmpz_get_si -PROJECT_FILE.i:325:[kernel] warning: accessing out of bounds index [-2147483648..2147483647]. - assert 0 ≤ e_acsl_27 ∧ e_acsl_27 < 10; -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:334. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- search <- main. - Called from PROJECT_FILE.i:335. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- search <- main. - Called from PROJECT_FILE.i:336. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_set <- search <- main. - Called from PROJECT_FILE.i:337. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:338. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:339. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:345. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init <- search <- main. - Called from PROJECT_FILE.i:352. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:355. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_set <- search <- main. - Called from PROJECT_FILE.i:356. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:357. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:360:[value] entering loop for the first time -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:364. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- search <- main. - Called from PROJECT_FILE.i:365. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:367. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_get_si <- search <- main. - Called from PROJECT_FILE.i:372. -[value] Done for function __gmpz_get_si -PROJECT_FILE.i:373:[kernel] warning: accessing out of bounds index [-2147483648..2147483647]. - assert 0 ≤ e_acsl_14 ∧ e_acsl_14 < 10; -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:382. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- search <- main. - Called from PROJECT_FILE.i:383. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- search <- main. - Called from PROJECT_FILE.i:384. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_set <- search <- main. - Called from PROJECT_FILE.i:385. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:386. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:387. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:393. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:399:[value] entering loop for the first time -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:421. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:422. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- search <- main. - Called from PROJECT_FILE.i:423. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:425. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:426. -[value] Done for function __gmpz_clear +PROJECT_FILE.i:265:[value] entering loop for the first time +PROJECT_FILE.i:283:[value] entering loop for the first time +PROJECT_FILE.i:299:[value] entering loop for the first time [value] computing for function e_acsl_assert <- search <- main. - Called from PROJECT_FILE.i:428. + Called from PROJECT_FILE.i:317. [value] computing for function printf <- e_acsl_assert <- search <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -227,23 +37,8 @@ PROJECT_FILE.i:399:[value] entering loop for the first time [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:436. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:437. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- search <- main. - Called from PROJECT_FILE.i:438. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:440. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:441. -[value] Done for function __gmpz_clear [value] computing for function e_acsl_assert <- search <- main. - Called from PROJECT_FILE.i:443. + Called from PROJECT_FILE.i:322. [value] computing for function printf <- e_acsl_assert <- search <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -258,97 +53,15 @@ PROJECT_FILE.i:233:[value] Function search, behavior not_exists: postcondition g PROJECT_FILE.i:233:[value] Function search, behavior not_exists: postcondition got status unknown, but it is unknown if the behavior is active. [value] Recording results for search [value] Done for function search -PROJECT_FILE.i:464:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:469. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:470. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:471. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:343:[value] Assertion got status unknown. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:472. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:344. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:473. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:474. -[value] Done for function __gmpz_clear [value] computing for function search <- main. - Called from PROJECT_FILE.i:478. -[value] computing for function __gmpz_init <- search <- main. - Called from PROJECT_FILE.i:247. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_set <- search <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:252. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- search <- main. - Called from PROJECT_FILE.i:260. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:262. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_get_si <- search <- main. - Called from PROJECT_FILE.i:270. -[value] Done for function __gmpz_get_si -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:271. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- search <- main. - Called from PROJECT_FILE.i:272. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- search <- main. - Called from PROJECT_FILE.i:273. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_get_si <- search <- main. - Called from PROJECT_FILE.i:274. -[value] Done for function __gmpz_get_si -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:275. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:276. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:277:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:286. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- search <- main. - Called from PROJECT_FILE.i:287. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- search <- main. - Called from PROJECT_FILE.i:288. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_set <- search <- main. - Called from PROJECT_FILE.i:289. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:290. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:291. -[value] Done for function __gmpz_clear + Called from PROJECT_FILE.i:346. [value] computing for function e_acsl_assert <- search <- main. - Called from PROJECT_FILE.i:296. + Called from PROJECT_FILE.i:258. [value] computing for function printf <- e_acsl_assert <- search <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -357,118 +70,8 @@ PROJECT_FILE.i:277:[value] Assertion got status unknown. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:299. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init <- search <- main. - Called from PROJECT_FILE.i:304. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:307. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_set <- search <- main. - Called from PROJECT_FILE.i:308. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:309. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:316. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- search <- main. - Called from PROJECT_FILE.i:317. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:319. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_get_si <- search <- main. - Called from PROJECT_FILE.i:324. -[value] Done for function __gmpz_get_si -PROJECT_FILE.i:325:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:334. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- search <- main. - Called from PROJECT_FILE.i:335. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- search <- main. - Called from PROJECT_FILE.i:336. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_set <- search <- main. - Called from PROJECT_FILE.i:337. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:338. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:339. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:345. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init <- search <- main. - Called from PROJECT_FILE.i:352. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:355. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_set <- search <- main. - Called from PROJECT_FILE.i:356. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:357. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:364. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- search <- main. - Called from PROJECT_FILE.i:365. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:367. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_get_si <- search <- main. - Called from PROJECT_FILE.i:372. -[value] Done for function __gmpz_get_si -PROJECT_FILE.i:373:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:382. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- search <- main. - Called from PROJECT_FILE.i:383. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- search <- main. - Called from PROJECT_FILE.i:384. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_set <- search <- main. - Called from PROJECT_FILE.i:385. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:386. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:387. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:393. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:421. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:422. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- search <- main. - Called from PROJECT_FILE.i:423. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:425. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:426. -[value] Done for function __gmpz_clear [value] computing for function e_acsl_assert <- search <- main. - Called from PROJECT_FILE.i:428. + Called from PROJECT_FILE.i:317. [value] computing for function printf <- e_acsl_assert <- search <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -477,23 +80,8 @@ PROJECT_FILE.i:373:[value] Assertion got status unknown. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:436. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- search <- main. - Called from PROJECT_FILE.i:437. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- search <- main. - Called from PROJECT_FILE.i:438. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:440. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- search <- main. - Called from PROJECT_FILE.i:441. -[value] Done for function __gmpz_clear [value] computing for function e_acsl_assert <- search <- main. - Called from PROJECT_FILE.i:443. + Called from PROJECT_FILE.i:322. [value] computing for function printf <- e_acsl_assert <- search <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -504,32 +92,11 @@ PROJECT_FILE.i:373:[value] Assertion got status unknown. [value] Done for function e_acsl_assert [value] Recording results for search [value] Done for function search -PROJECT_FILE.i:479:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:484. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:485. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:486. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:347:[value] Assertion got status unknown. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:487. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:348. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:488. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:489. -[value] Done for function __gmpz_clear [value] Recording results for main [value] done for function main [value] ====== VALUES COMPUTED ====== @@ -537,51 +104,13 @@ PROJECT_FILE.i:479:[value] Assertion got status unknown. [value] Values at end of function search: __retres ∈ {0; 1} k ∈ [0..10] - e_acsl_20 ∈ {0; 1} - e_acsl_33 ∈ {0; 1} + e_acsl_5 ∈ {0; 1} + e_acsl_9 ∈ {0; 1} [value] Values at end of function main: A[0..9] ∈ [0..81] __retres ∈ {0} found ∈ {0} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(z_orig); - requires \valid(z); - assigns *z; */ -extern void __gmpz_set(__mpz_struct * /*[1]*/ z, - __mpz_struct const * /*[1]*/ z_orig); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z); - assigns \nothing; */ -extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -599,13 +128,13 @@ void e_acsl_assert(int predicate, char *kind, char *pred_txt, int line) } int A[10]; -/*@ requires ∀ ℤ i; 0 ≤ i ∧ i < 9 ⇒ A[i] ≤ A[i+1]; +/*@ requires ∀ int i; 0 ≤ i ∧ i < 9 ⇒ A[i] ≤ A[i+1]; behavior exists: - assumes ∃ ℤ j; (0 ≤ j ∧ j < 10) ∧ A[j] ≡ elt; + assumes ∃ int j; (0 ≤ j ∧ j < 10) ∧ A[j] ≡ elt; ensures \result ≡ 1; behavior not_exists: - assumes ∀ ℤ j; 0 ≤ j ∧ j < 10 ⇒ A[j] ≢ elt; + assumes ∀ int j; 0 ≤ j ∧ j < 10 ⇒ A[j] ≢ elt; ensures \result ≡ 0; @@ -614,187 +143,56 @@ int search(int elt) { int __retres; int k; - int e_acsl_20; - int e_acsl_33; + int e_acsl_5; + int e_acsl_9; { - mpz_t e_acsl_1; + int e_acsl_1; int e_acsl_2; - e_acsl_2 = 1; - __gmpz_init((__mpz_struct *)(e_acsl_1)); - { - mpz_t e_acsl_7; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_1),(__mpz_struct const *)(e_acsl_7)); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); - } - + e_acsl_1 = 1; + e_acsl_2 = 0; while (1) { - { - mpz_t e_acsl_8; - int e_acsl_9; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)9); - e_acsl_9 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_8)); - if (! (e_acsl_9 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - } - - { - int e_acsl_3; - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - e_acsl_3 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_1)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_5)); - __gmpz_add((__mpz_struct *)(e_acsl_5), - (__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_4)); - e_acsl_6 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_5)); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - /*@ assert 0 ≤ e_acsl_3 ∧ e_acsl_3 < 10; - // synthesized - */ - /*@ assert 0 ≤ e_acsl_6 ∧ e_acsl_6 < 10; - // synthesized - */ - if (! (A[e_acsl_3] <= A[e_acsl_6])) { - e_acsl_2 = 0; - goto e_acsl_end_loop1; - } - } - - { - mpz_t e_acsl_10; - mpz_t e_acsl_11; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_11)); - __gmpz_add((__mpz_struct *)(e_acsl_11), - (__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_10)); - __gmpz_set((__mpz_struct *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_11)); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); + if (! (e_acsl_2 < 9)) { break; } + if (! (A[e_acsl_2] <= A[e_acsl_2 + 1])) { + e_acsl_1 = 0; + goto e_acsl_end_loop1; } - + e_acsl_2 ++; } e_acsl_end_loop1: ; - e_acsl_assert(! e_acsl_2,(char *)"Precondition", - (char *)"(\\forall integer i; 0 <= i && i < 9 ==> A[i] <= A[i+1])", + e_acsl_assert(! e_acsl_1,(char *)"Precondition", + (char *)"(\\forall int i; 0 <= i && i < 9 ==> A[i] <= A[i+1])", 8); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); { - mpz_t e_acsl_25; - int e_acsl_26; - e_acsl_26 = 1; - __gmpz_init((__mpz_struct *)(e_acsl_25)); - { - mpz_t e_acsl_28; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_28),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_25), - (__mpz_struct const *)(e_acsl_28)); - __gmpz_clear((__mpz_struct *)(e_acsl_28)); - } - + int e_acsl_7; + int e_acsl_8; + e_acsl_7 = 1; + e_acsl_8 = 0; while (1) { - { - mpz_t e_acsl_29; - int e_acsl_30; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_29),(long)10); - e_acsl_30 = __gmpz_cmp((__mpz_struct const *)(e_acsl_25), - (__mpz_struct const *)(e_acsl_29)); - if (! (e_acsl_30 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_29)); - } - - { - int e_acsl_27; - e_acsl_27 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_25)); - /*@ assert 0 ≤ e_acsl_27 ∧ e_acsl_27 < 10; - // synthesized - */ - if (! (A[e_acsl_27] != elt)) { - e_acsl_26 = 0; - goto e_acsl_end_loop3; - } - } - - { - mpz_t e_acsl_31; - mpz_t e_acsl_32; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_32)); - __gmpz_add((__mpz_struct *)(e_acsl_32), - (__mpz_struct const *)(e_acsl_25), - (__mpz_struct const *)(e_acsl_31)); - __gmpz_set((__mpz_struct *)(e_acsl_25), - (__mpz_struct const *)(e_acsl_32)); - __gmpz_clear((__mpz_struct *)(e_acsl_31)); - __gmpz_clear((__mpz_struct *)(e_acsl_32)); - } - + if (! (e_acsl_8 < 10)) { break; } + if (! (A[e_acsl_8] != elt)) { + e_acsl_7 = 0; + goto e_acsl_end_loop3; } + e_acsl_8 ++; } e_acsl_end_loop3: ; - e_acsl_33 = e_acsl_26; - __gmpz_clear((__mpz_struct *)(e_acsl_25)); + e_acsl_9 = e_acsl_7; } { - mpz_t e_acsl_12; - int e_acsl_13; - e_acsl_13 = 0; - __gmpz_init((__mpz_struct *)(e_acsl_12)); - { - mpz_t e_acsl_15; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_15)); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - } - + int e_acsl_3; + int e_acsl_4; + e_acsl_3 = 0; + e_acsl_4 = 0; while (1) { - { - mpz_t e_acsl_16; - int e_acsl_17; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)10); - e_acsl_17 = __gmpz_cmp((__mpz_struct const *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_16)); - if (! (e_acsl_17 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - } - - { - int e_acsl_14; - e_acsl_14 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_12)); - /*@ assert 0 ≤ e_acsl_14 ∧ e_acsl_14 < 10; - // synthesized - */ - if (! (! (A[e_acsl_14] == elt))) { - e_acsl_13 = 1; - goto e_acsl_end_loop2; - } - } - - { - mpz_t e_acsl_18; - mpz_t e_acsl_19; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_18),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_19)); - __gmpz_add((__mpz_struct *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_18)); - __gmpz_set((__mpz_struct *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_18)); - __gmpz_clear((__mpz_struct *)(e_acsl_19)); + if (! (e_acsl_4 < 10)) { break; } + if (! (! (A[e_acsl_4] == elt))) { + e_acsl_3 = 1; + goto e_acsl_end_loop2; } - + e_acsl_4 ++; } e_acsl_end_loop2: ; - e_acsl_20 = e_acsl_13; - __gmpz_clear((__mpz_struct *)(e_acsl_12)); + e_acsl_5 = e_acsl_3; } k = 0; @@ -813,40 +211,17 @@ int search(int elt) } __retres = 0; return_label: - { - int e_acsl_24; - int e_acsl_37; - if (! e_acsl_20) { e_acsl_24 = 1; } - else { - mpz_t e_acsl_21; - mpz_t e_acsl_22; - int e_acsl_23; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_21),(long)__retres); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_22),(long)1); - e_acsl_23 = __gmpz_cmp((__mpz_struct const *)(e_acsl_21), - (__mpz_struct const *)(e_acsl_22)); - e_acsl_24 = e_acsl_23 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_21)); - __gmpz_clear((__mpz_struct *)(e_acsl_22)); - } - e_acsl_assert(! e_acsl_24,(char *)"Postcondition", - (char *)"(\\old(\\exists integer j; (0 <= j && j < 10) && A[j] == elt) ==> \\result == 1)", + { int e_acsl_6; + int e_acsl_10; + if (! e_acsl_5) { e_acsl_6 = 1; } + else { e_acsl_6 = __retres == 1; } + e_acsl_assert(! e_acsl_6,(char *)"Postcondition", + (char *)"(\\old(\\exists int j; (0 <= j && j < 10) && A[j] == elt) ==> \\result == 1)", 11); - if (! e_acsl_33) { e_acsl_37 = 1; } - else { - mpz_t e_acsl_34; - mpz_t e_acsl_35; - int e_acsl_36; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_34),(long)__retres); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)0); - e_acsl_36 = __gmpz_cmp((__mpz_struct const *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_35)); - e_acsl_37 = e_acsl_36 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_34)); - __gmpz_clear((__mpz_struct *)(e_acsl_35)); - } - e_acsl_assert(! e_acsl_37,(char *)"Postcondition", - (char *)"(\\old(\\forall integer j; 0 <= j && j < 10 ==> A[j] != elt) ==> \\result == 0)", + if (! e_acsl_9) { e_acsl_10 = 1; } + else { e_acsl_10 = __retres == 0; } + e_acsl_assert(! e_acsl_10,(char *)"Postcondition", + (char *)"(\\old(\\forall int j; 0 <= j && j < 10 ==> A[j] != elt) ==> \\result == 0)", 14); return (__retres); } @@ -866,36 +241,10 @@ int main(void) found = search(36); /*@ assert found ≡ 1; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)found); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)1); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Assertion", - (char *)"(found == 1)",30); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - + e_acsl_assert(! (found == 1),(char *)"Assertion",(char *)"(found == 1)",30); found = search(5); /*@ assert found ≡ 0; */ ; - { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)found); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)0); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 == 0),(char *)"Assertion", - (char *)"(found == 0)",33); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - + e_acsl_assert(! (found == 0),(char *)"Assertion",(char *)"(found == 0)",33); __retres = 0; return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.res.oracle index 20b0c204eda..c514c0e8536 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/nested_code_annot.res.oracle @@ -7,161 +7,30 @@ PROJECT_FILE.i:232:[value] Assertion got status valid. Called from PROJECT_FILE.i:233. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:245. -PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:246. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:247. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:248. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. -[value] Done for function exit + Called from PROJECT_FILE.i:238. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:249. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:267. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:268. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:269. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:270. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:248. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:271. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:272. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:276. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:277. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:278. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:279. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:250. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:280. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:281. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:295. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:296. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:297. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:298. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:257. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:299. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:300. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:304. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:305. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:306. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:307. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:259. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:308. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:309. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:321. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:322. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:323. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:324. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:269. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:325. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:326. -[value] Done for function __gmpz_clear [value] Recording results for main [value] done for function main [value] ====== VALUES COMPUTED ====== @@ -171,25 +40,6 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. x ∈ {2} y ∈ {1} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -218,105 +68,40 @@ int main(void) /*@ requires x ≡ 0; ensures x ≥ 1; */ { - mpz_t e_acsl_16; - mpz_t e_acsl_17; - int e_acsl_18; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)0); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Precondition", - (char *)"(x == 0)",9); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - if (x) { - /*@ assert \false; */ ; - e_acsl_assert(1,(char *)"Assertion",(char *)"(\\false)",12); + e_acsl_assert(! (x == 0),(char *)"Precondition",(char *)"(x == 0)",9); + if (x) { + /*@ assert \false; */ ; + e_acsl_assert(1,(char *)"Assertion",(char *)"(\\false)",12); + } + else { + /*@ requires x ≡ 0; + ensures x ≡ 1; */ + { + e_acsl_assert(! (x == 0),(char *)"Precondition",(char *)"(x == 0)", + 14); + x ++; + e_acsl_assert(! (x == 1),(char *)"Postcondition",(char *)"(x == 1)", + 15); } - else { - /*@ requires x ≡ 0; - ensures x ≡ 1; */ + + if (x) { + /*@ requires x ≡ 1; + ensures x ≡ 2; */ { - mpz_t e_acsl_7; - mpz_t e_acsl_8; - int e_acsl_9; - { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)0); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 == 0),(char *)"Precondition", - (char *)"(x == 0)",14); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - x ++; - } - - __gmpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)1); - e_acsl_9 = __gmpz_cmp((__mpz_struct const *)(e_acsl_7), - (__mpz_struct const *)(e_acsl_8)); - e_acsl_assert(! (e_acsl_9 == 0),(char *)"Postcondition", - (char *)"(x == 1)",15); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); + e_acsl_assert(! (x == 1),(char *)"Precondition",(char *)"(x == 1)", + 18); + x ++; + e_acsl_assert(! (x == 2),(char *)"Postcondition", + (char *)"(x == 2)",19); } - if (x) { - /*@ requires x ≡ 1; - ensures x ≡ 2; */ - { - mpz_t e_acsl_13; - mpz_t e_acsl_14; - int e_acsl_15; - { - mpz_t e_acsl_10; - mpz_t e_acsl_11; - int e_acsl_12; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)1); - e_acsl_12 = __gmpz_cmp((__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_11)); - e_acsl_assert(! (e_acsl_12 == 0),(char *)"Precondition", - (char *)"(x == 1)",18); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - x ++; - } - - __gmpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_14),(long)2); - e_acsl_15 = __gmpz_cmp((__mpz_struct const *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_14)); - e_acsl_assert(! (e_acsl_15 == 0),(char *)"Postcondition", - (char *)"(x == 2)",19); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); - __gmpz_clear((__mpz_struct *)(e_acsl_14)); - } - - } - else { - /*@ assert \false; */ ; - e_acsl_assert(1,(char *)"Assertion",(char *)"(\\false)",22); - } + } + else { + /*@ assert \false; */ ; + e_acsl_assert(1,(char *)"Assertion",(char *)"(\\false)",22); } } - - __gmpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)1); - e_acsl_18 = __gmpz_cmp((__mpz_struct const *)(e_acsl_16), - (__mpz_struct const *)(e_acsl_17)); - e_acsl_assert(! (e_acsl_18 >= 0),(char *)"Postcondition", - (char *)"(x >= 1)",10); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - __gmpz_clear((__mpz_struct *)(e_acsl_17)); + e_acsl_assert(! (x >= 1),(char *)"Postcondition",(char *)"(x >= 1)",10); } __retres = 0; diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.res.oracle index bb4a8ab3fcf..5d414937d5a 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/other_constants.res.oracle @@ -8,33 +8,13 @@ PROJECT_FILE.i:232:[value] Assertion got status unknown. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert PROJECT_FILE.i:235:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:239. -PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:240. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:241. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. -[value] Done for function exit + Called from PROJECT_FILE.i:236. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:242. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:246:[value] Assertion got status valid. +PROJECT_FILE.i:238:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:247. + Called from PROJECT_FILE.i:239. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert [value] Recording results for main @@ -44,29 +24,10 @@ PROJECT_FILE.i:246:[value] Assertion got status valid. [value] Values at end of function main: __retres ∈ {0} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; enum bool { false = 0, true = 1 }; -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -90,17 +51,8 @@ int main(void) e_acsl_assert(! ("toto" != "titi"),(char *)"Assertion", (char *)"(\"toto\" != \"titi\")",9); /*@ assert 'c' ≡ 'c'; */ ; - { - mpz_t e_acsl_1; - int e_acsl_2; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)'c'); - e_acsl_2 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_1)); - e_acsl_assert(! (e_acsl_2 == 0),(char *)"Assertion", - (char *)"(\'c\' == \'c\')",10); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - } - + e_acsl_assert(! ('c' == 'c'),(char *)"Assertion", + (char *)"(\'c\' == \'c\')",10); /*@ assert false ≢ true; */ ; e_acsl_assert(! (false != true),(char *)"Assertion", (char *)"(false != true)",11); diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.res.oracle index 49be1ebf3bc..4e9083aa159 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/ptr.res.oracle @@ -1,12 +1,10 @@ tests/e-acsl-runtime/ptr.i:12:[e-acsl] warning: missing guard for ensuring that p is a valid memory access :0:[e-acsl] warning: missing guard for ensuring that 0 is a valid array index tests/e-acsl-runtime/ptr.i:14:[e-acsl] warning: missing guard for ensuring that 2 is a valid array index -tests/e-acsl-runtime/ptr.i:15:[e-acsl] warning: missing guard for ensuring that the given integer is C-representable :0:[e-acsl] warning: missing guard for ensuring that (2*sizeof(int))/sizeof((int)0x0) is a valid array index tests/e-acsl-runtime/ptr.i:18:[e-acsl] warning: missing guard for ensuring that i is a valid array index -tests/e-acsl-runtime/ptr.i:19:[e-acsl] warning: missing guard for ensuring that the given integer is C-representable -:0:[e-acsl] warning: missing guard for ensuring that 2-i is a valid array index +tests/e-acsl-runtime/ptr.i:19:[e-acsl] warning: missing guard for ensuring that 2-i is a valid array index tests/e-acsl-runtime/ptr.i:20:[e-acsl] warning: missing guard for ensuring that 2 is a valid array index tests/e-acsl-runtime/ptr.i:20:[e-acsl] warning: missing guard for ensuring that &t[2]-i is a valid pointer tests/e-acsl-runtime/ptr.i:20:[e-acsl] warning: missing guard for ensuring that &t[2]-i is a valid memory access @@ -16,408 +14,61 @@ tests/e-acsl-runtime/ptr.i:26:[e-acsl] warning: missing guard for ensuring that [value] Initial state computed [value] Values of globals at initialization PROJECT_FILE.i:236:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:241. -PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:243. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:244. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. -[value] Done for function exit + Called from PROJECT_FILE.i:237. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:245. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:246. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:250:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:255. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:256. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:257. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:239:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:258. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:260. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:264:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:269. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:270. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:271. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:242:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:272. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:243. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:273. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:274. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:278:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:291. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:292. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:293. -PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_mul <- main. - Called from PROJECT_FILE.i:294. -PROJECT_FILE.i:150:[value] Function __gmpz_mul: precondition got status valid. -PROJECT_FILE.i:151:[value] Function __gmpz_mul: precondition got status valid. -PROJECT_FILE.i:152:[value] Function __gmpz_mul: precondition got status valid. -[value] Done for function __gmpz_mul -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:295. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:296. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:297. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:298. -[value] Done for function __gmpz_init -PROJECT_FILE.i:299:[value] Assertion got status valid. +PROJECT_FILE.i:245:[value] Assertion got status valid. +PROJECT_FILE.i:248:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:300. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:249. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_tdiv_q <- main. - Called from PROJECT_FILE.i:301. -PROJECT_FILE.i:156:[value] Function __gmpz_tdiv_q: precondition got status valid. -PROJECT_FILE.i:157:[value] Function __gmpz_tdiv_q: precondition got status valid. -PROJECT_FILE.i:158:[value] Function __gmpz_tdiv_q: precondition got status valid. -[value] Done for function __gmpz_tdiv_q -[value] computing for function __gmpz_get_si <- main. - Called from PROJECT_FILE.i:302. -PROJECT_FILE.i:172:[value] Function __gmpz_get_si: precondition got status valid. -[value] Done for function __gmpz_get_si -PROJECT_FILE.i:303:[kernel] warning: accessing out of bounds index [-2147483648..2147483647]. - assert 0 ≤ e_acsl_17 ∧ e_acsl_17 < 3; -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:303. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:304. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:305. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:306. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:251. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:308. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:309. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:310. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:311. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:312. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:313. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:314. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:315. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:322:[value] entering loop for the first time -PROJECT_FILE.i:325:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:332. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:333. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:334. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:335. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:336. -PROJECT_FILE.i:138:[value] Function __gmpz_add: precondition got status valid. -PROJECT_FILE.i:139:[value] Function __gmpz_add: precondition got status valid. -PROJECT_FILE.i:140:[value] Function __gmpz_add: precondition got status valid. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:337. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:259:[value] entering loop for the first time +PROJECT_FILE.i:262:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:338. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:263. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:339. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:340. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:341. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:342. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:346:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:356. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:357. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:358. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_sub <- main. - Called from PROJECT_FILE.i:359. -PROJECT_FILE.i:144:[value] Function __gmpz_sub: precondition got status valid. -PROJECT_FILE.i:145:[value] Function __gmpz_sub: precondition got status valid. -PROJECT_FILE.i:146:[value] Function __gmpz_sub: precondition got status valid. -[value] Done for function __gmpz_sub -[value] computing for function __gmpz_get_si <- main. - Called from PROJECT_FILE.i:360. -[value] Done for function __gmpz_get_si -PROJECT_FILE.i:361:[kernel] warning: accessing out of bounds index [-2147483648..2147483647]. - assert 0 ≤ e_acsl_29 ∧ e_acsl_29 < 3; -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:361. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:362. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:363. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_sub <- main. - Called from PROJECT_FILE.i:364. -[value] Done for function __gmpz_sub -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:365. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:266:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:366. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:267. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:367. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:368. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:369. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:370. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:371. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:372. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:376:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:383. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:384. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:385. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:386. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_sub <- main. - Called from PROJECT_FILE.i:387. -[value] Done for function __gmpz_sub -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:388. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:270:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:389. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:271. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:391. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:392. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:393. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:394. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:325:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:332. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:333. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:334. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:335. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:336. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:337. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:262:[value] Assertion got status unknown. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:338. + Called from PROJECT_FILE.i:263. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf [value] computing for function exit <- e_acsl_assert <- main. Called from PROJECT_FILE.i:221. +PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:339. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:340. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:341. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:342. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:346:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:356. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:357. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:358. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_sub <- main. - Called from PROJECT_FILE.i:359. -[value] Done for function __gmpz_sub -[value] computing for function __gmpz_get_si <- main. - Called from PROJECT_FILE.i:360. -[value] Done for function __gmpz_get_si -PROJECT_FILE.i:361:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:361. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:362. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:363. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_sub <- main. - Called from PROJECT_FILE.i:364. -[value] Done for function __gmpz_sub -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:365. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:266:[value] Assertion got status unknown. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:366. + Called from PROJECT_FILE.i:267. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -426,45 +77,9 @@ PROJECT_FILE.i:361:[value] Assertion got status unknown. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:367. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:368. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:369. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:370. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:371. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:372. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:376:[value] Assertion got status unknown. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:383. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:384. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:385. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:386. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_sub <- main. - Called from PROJECT_FILE.i:387. -[value] Done for function __gmpz_sub -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:388. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:270:[value] Assertion got status unknown. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:389. + Called from PROJECT_FILE.i:271. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -473,45 +88,12 @@ PROJECT_FILE.i:376:[value] Assertion got status unknown. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:391. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:392. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:393. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:394. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:398:[value] assigning non deterministic value for the first time -PROJECT_FILE.i:404:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:409. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:410. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:411. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:274:[value] assigning non deterministic value for the first time +PROJECT_FILE.i:280:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:412. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:281. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:413. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:414. -[value] Done for function __gmpz_clear [value] Recording results for main [value] done for function main [value] ====== VALUES COMPUTED ====== @@ -524,63 +106,6 @@ PROJECT_FILE.i:404:[value] Assertion got status valid. [2] ∈ {5} p ∈ {{ &t + {8} }} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z); - assigns \nothing; */ -extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -609,97 +134,20 @@ int main(void) t[2] = 4; p = & x; /*@ assert *p ≡ 1; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)*p); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)1); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Assertion",(char *)"(*p == 1)", - 12); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - + e_acsl_assert(! (*p == 1),(char *)"Assertion",(char *)"(*p == 1)",12); /*@ assert t[0] ≡ 2; */ ; - { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)t[0]); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)2); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 == 0),(char *)"Assertion", - (char *)"(t[0] == 2)",13); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - + e_acsl_assert(! (t[0] == 2),(char *)"Assertion",(char *)"(t[0] == 2)",13); /*@ assert t[2] ≡ 4; */ ; - { - mpz_t e_acsl_7; - mpz_t e_acsl_8; - int e_acsl_9; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)t[2]); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)4); - e_acsl_9 = __gmpz_cmp((__mpz_struct const *)(e_acsl_7), - (__mpz_struct const *)(e_acsl_8)); - e_acsl_assert(! (e_acsl_9 == 0),(char *)"Assertion", - (char *)"(t[2] == 4)",14); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - } - + e_acsl_assert(! (t[2] == 4),(char *)"Assertion",(char *)"(t[2] == 4)",14); /*@ assert t[(2*sizeof(int))/sizeof((int)0x0)] ≡ 4; */ ; { - mpz_t e_acsl_10; - mpz_t e_acsl_11; - mpz_t e_acsl_12; - mpz_t e_acsl_13; - mpz_t e_acsl_14; - int e_acsl_15; - mpz_t e_acsl_16; - int e_acsl_17; - mpz_t e_acsl_18; - mpz_t e_acsl_19; - int e_acsl_20; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)2); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)4); - __gmpz_init((__mpz_struct *)(e_acsl_12)); - __gmpz_mul((__mpz_struct *)(e_acsl_12),(__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_11)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)4); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_14),(long)0); - e_acsl_15 = __gmpz_cmp((__mpz_struct const *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_14)); - __gmpz_init((__mpz_struct *)(e_acsl_16)); + int e_acsl_1; /*@ assert sizeof((int)0x0) ≢ 0; */ ; - e_acsl_assert(e_acsl_15 == 0,(char *)"Assertion", + e_acsl_assert(4 == 0,(char *)"Assertion", (char *)"(sizeof((int)0x0) == 0)",15); - __gmpz_tdiv_q((__mpz_struct *)(e_acsl_16), - (__mpz_struct const *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_13)); - e_acsl_17 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_16)); - /*@ assert 0 ≤ e_acsl_17 ∧ e_acsl_17 < 3; - // synthesized - */ - __gmpz_init_set_si((__mpz_struct *)(e_acsl_18),(long)t[e_acsl_17]); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)4); - e_acsl_20 = __gmpz_cmp((__mpz_struct const *)(e_acsl_18), - (__mpz_struct const *)(e_acsl_19)); - e_acsl_assert(! (e_acsl_20 == 0),(char *)"Assertion", + e_acsl_1 = (2 * 4) / 4; + e_acsl_assert(! (t[e_acsl_1] == 4),(char *)"Assertion", (char *)"(t[(2*sizeof(int))/sizeof((int)0x0)] == 4)",15); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - __gmpz_clear((__mpz_struct *)(e_acsl_12)); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); - __gmpz_clear((__mpz_struct *)(e_acsl_14)); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - __gmpz_clear((__mpz_struct *)(e_acsl_18)); - __gmpz_clear((__mpz_struct *)(e_acsl_19)); } { @@ -708,91 +156,14 @@ int main(void) while (1) { if (! (i < 2)) { break; } /*@ assert t[i] ≡ i+2; */ ; - { - mpz_t e_acsl_21; - mpz_t e_acsl_22; - mpz_t e_acsl_23; - mpz_t e_acsl_24; - int e_acsl_25; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_21),(long)t[i]); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_22),(long)i); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_23),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_24)); - __gmpz_add((__mpz_struct *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_22), - (__mpz_struct const *)(e_acsl_23)); - e_acsl_25 = __gmpz_cmp((__mpz_struct const *)(e_acsl_21), - (__mpz_struct const *)(e_acsl_24)); - e_acsl_assert(! (e_acsl_25 == 0),(char *)"Assertion", - (char *)"(t[i] == i+2)",18); - __gmpz_clear((__mpz_struct *)(e_acsl_21)); - __gmpz_clear((__mpz_struct *)(e_acsl_22)); - __gmpz_clear((__mpz_struct *)(e_acsl_23)); - __gmpz_clear((__mpz_struct *)(e_acsl_24)); - } - + e_acsl_assert(! ((long long)t[i] == (long long)i + (long long)2), + (char *)"Assertion",(char *)"(t[i] == i+2)",18); /*@ assert t[2-i] ≡ 4-i; */ ; - { - mpz_t e_acsl_26; - mpz_t e_acsl_27; - mpz_t e_acsl_28; - int e_acsl_29; - mpz_t e_acsl_30; - mpz_t e_acsl_31; - mpz_t e_acsl_32; - int e_acsl_33; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)2); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)i); - __gmpz_init((__mpz_struct *)(e_acsl_28)); - __gmpz_sub((__mpz_struct *)(e_acsl_28), - (__mpz_struct const *)(e_acsl_26), - (__mpz_struct const *)(e_acsl_27)); - e_acsl_29 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_28)); - /*@ assert 0 ≤ e_acsl_29 ∧ e_acsl_29 < 3; - // synthesized - */ - __gmpz_init_set_si((__mpz_struct *)(e_acsl_30),(long)t[e_acsl_29]); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)4); - __gmpz_init((__mpz_struct *)(e_acsl_32)); - __gmpz_sub((__mpz_struct *)(e_acsl_32), - (__mpz_struct const *)(e_acsl_31), - (__mpz_struct const *)(e_acsl_27)); - e_acsl_33 = __gmpz_cmp((__mpz_struct const *)(e_acsl_30), - (__mpz_struct const *)(e_acsl_32)); - e_acsl_assert(! (e_acsl_33 == 0),(char *)"Assertion", - (char *)"(t[2-i] == 4-i)",19); - __gmpz_clear((__mpz_struct *)(e_acsl_26)); - __gmpz_clear((__mpz_struct *)(e_acsl_27)); - __gmpz_clear((__mpz_struct *)(e_acsl_28)); - __gmpz_clear((__mpz_struct *)(e_acsl_30)); - __gmpz_clear((__mpz_struct *)(e_acsl_31)); - __gmpz_clear((__mpz_struct *)(e_acsl_32)); - } - + e_acsl_assert(! ((long long)t[(long long)2 - (long long)i] == (long long)4 - (long long)i), + (char *)"Assertion",(char *)"(t[2-i] == 4-i)",19); /*@ assert *(&t[2]-i) ≡ 4-i; */ ; - { - mpz_t e_acsl_34; - mpz_t e_acsl_35; - mpz_t e_acsl_36; - mpz_t e_acsl_37; - int e_acsl_38; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_34),(long)*(& t[2] - i)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)4); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_36),(long)i); - __gmpz_init((__mpz_struct *)(e_acsl_37)); - __gmpz_sub((__mpz_struct *)(e_acsl_37), - (__mpz_struct const *)(e_acsl_35), - (__mpz_struct const *)(e_acsl_36)); - e_acsl_38 = __gmpz_cmp((__mpz_struct const *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_37)); - e_acsl_assert(! (e_acsl_38 == 0),(char *)"Assertion", - (char *)"(*(&t[2]-i) == 4-i)",20); - __gmpz_clear((__mpz_struct *)(e_acsl_34)); - __gmpz_clear((__mpz_struct *)(e_acsl_35)); - __gmpz_clear((__mpz_struct *)(e_acsl_36)); - __gmpz_clear((__mpz_struct *)(e_acsl_37)); - } - + e_acsl_assert(! ((long long)*(& t[2] - i) == (long long)4 - (long long)i), + (char *)"Assertion",(char *)"(*(&t[2]-i) == 4-i)",20); i ++; } } @@ -800,20 +171,7 @@ int main(void) p = & t[2]; t[2] = 5; /*@ assert *p ≡ 5; */ ; - { - mpz_t e_acsl_39; - mpz_t e_acsl_40; - int e_acsl_41; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_39),(long)*p); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_40),(long)5); - e_acsl_41 = __gmpz_cmp((__mpz_struct const *)(e_acsl_39), - (__mpz_struct const *)(e_acsl_40)); - e_acsl_assert(! (e_acsl_41 == 0),(char *)"Assertion",(char *)"(*p == 5)", - 26); - __gmpz_clear((__mpz_struct *)(e_acsl_39)); - __gmpz_clear((__mpz_struct *)(e_acsl_40)); - } - + e_acsl_assert(! (*p == 5),(char *)"Assertion",(char *)"(*p == 5)",26); __retres = 0; return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/quantif.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/quantif.res.oracle index 57c33d7d446..59c72ba6cf5 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/quantif.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/quantif.res.oracle @@ -1,83 +1,38 @@ -:0:[e-acsl] warning: missing guard for ensuring that the given integer is C-representable [value] Analyzing a complete application starting at main [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization PROJECT_FILE.i:228:[value] Assertion got status unknown. -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:233. -PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:236. -PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:237. -PROJECT_FILE.i:94:[value] Function __gmpz_set: precondition got status valid. -PROJECT_FILE.i:95:[value] Function __gmpz_set: precondition got status valid. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:238. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:241:[value] entering loop for the first time -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:245. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:246. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:248. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:255. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:256. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:261. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:266. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:262. -[value] Done for function __gmpz_cmp -PROJECT_FILE.i:263:[value] assigning non deterministic value for the first time -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:264. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:276. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:266. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:277. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:278. -PROJECT_FILE.i:138:[value] Function __gmpz_add: precondition got status valid. -PROJECT_FILE.i:139:[value] Function __gmpz_add: precondition got status valid. -PROJECT_FILE.i:140:[value] Function __gmpz_add: precondition got status valid. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:279. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:280. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:281. -[value] Done for function __gmpz_clear +PROJECT_FILE.i:234:[value] entering loop for the first time +PROJECT_FILE.i:246:[value] assigning non deterministic value for the first time [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:286. + Called from PROJECT_FILE.i:249. +[value] Recording results for e_acsl_assert +[value] Done for function e_acsl_assert +PROJECT_FILE.i:255:[value] Assertion got status unknown. +PROJECT_FILE.i:261:[value] entering loop for the first time +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:271. +[value] Recording results for e_acsl_assert +[value] Done for function e_acsl_assert +PROJECT_FILE.i:276:[value] Assertion got status unknown. +PROJECT_FILE.i:282:[value] entering loop for the first time +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:292. +[value] Recording results for e_acsl_assert +[value] Done for function e_acsl_assert +PROJECT_FILE.i:297:[value] Assertion got status unknown. +PROJECT_FILE.i:303:[value] entering loop for the first time +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:313. +[value] Recording results for e_acsl_assert +[value] Done for function e_acsl_assert +PROJECT_FILE.i:318:[value] Assertion got status unknown. +PROJECT_FILE.i:329:[value] entering loop for the first time +PROJECT_FILE.i:333:[value] entering loop for the first time +PROJECT_FILE.i:337:[value] entering loop for the first time +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:351. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -87,609 +42,75 @@ PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. [value] Done for function exit [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:289. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:293:[value] Assertion got status unknown. -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:298. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:303. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:304. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:305. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:306. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:307. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:308. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:309. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:310. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:313:[value] entering loop for the first time -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:317. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:318. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:320. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:326. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:327. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:328. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:338. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:339. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:340. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:341. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:342. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:343. -[value] Done for function __gmpz_clear +PROJECT_FILE.i:357:[value] Assertion got status unknown. +PROJECT_FILE.i:363:[value] entering loop for the first time [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:348. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:373. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:350. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:354:[value] Assertion got status unknown. -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:359. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:364. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:365. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:366. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:367. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:368. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:369. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:370. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:371. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:374:[value] entering loop for the first time -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:378. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:379. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:381. -[value] Done for function __gmpz_clear +PROJECT_FILE.i:378:[value] Assertion got status unknown. +PROJECT_FILE.i:386:[value] entering loop for the first time +PROJECT_FILE.i:392:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:401. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:393. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:403. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:407:[value] Assertion got status unknown. -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:412. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:415. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:416. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:417. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:420:[value] entering loop for the first time -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:424. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:425. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:427. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:433. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:434. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:435. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:445. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:446. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:447. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:448. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:449. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:450. -[value] Done for function __gmpz_clear +PROJECT_FILE.i:401:[value] entering loop for the first time +PROJECT_FILE.i:404:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:455. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:405. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:457. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:461:[value] Assertion got status unknown. -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:471. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:472. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:473. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:476. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:477. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:478. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:481:[value] entering loop for the first time -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:485. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:486. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:488. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:493. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:494. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:495. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:498:[value] entering loop for the first time -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:502. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:503. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:505. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:510. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:569. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:511. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:570. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:512. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:571. -[value] Done for function __gmpz_add -PROJECT_FILE.i:515:[value] entering loop for the first time -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:572. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:573. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:574. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:518. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:527. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:528. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:557. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:529. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:558. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:530. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:559. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:531. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:560. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:532. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:561. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:533. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:562. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:534. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:535. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:545. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:546. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:547. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:548. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:549. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:550. -[value] Done for function __gmpz_clear [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:579. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:393. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:582. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:583. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:584. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:588:[value] Assertion got status unknown. -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:593. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:596. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:597. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:598. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:601:[value] entering loop for the first time -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:605. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:606. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:608. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:614. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:615. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:616. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:626. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:627. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:628. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:629. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:630. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:631. -[value] Done for function __gmpz_clear [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:636. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:405. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -PROJECT_FILE.i:641:[value] Assertion got status unknown. -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:648. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:651. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:652. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:653. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:656:[value] entering loop for the first time -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:660. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:661. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:663. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:673. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_get_si <- main. - Called from PROJECT_FILE.i:674. -PROJECT_FILE.i:172:[value] Function __gmpz_get_si: precondition got status valid. -[value] Done for function __gmpz_get_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:675. -[value] Done for function __gmpz_init -PROJECT_FILE.i:676:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:677. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:393. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_tdiv_r <- main. - Called from PROJECT_FILE.i:678. -PROJECT_FILE.i:162:[value] Function __gmpz_tdiv_r: precondition got status valid. -PROJECT_FILE.i:163:[value] Function __gmpz_tdiv_r: precondition got status valid. -PROJECT_FILE.i:164:[value] Function __gmpz_tdiv_r: precondition got status valid. -[value] Done for function __gmpz_tdiv_r -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:679. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:680. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:745. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:686. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:746. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:747. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:689. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:690. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:691. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:757. -[value] Done for function __gmpz_init_set_si -PROJECT_FILE.i:694:[value] entering loop for the first time -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:758. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:759. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:760. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:700. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:761. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_get_si <- main. - Called from PROJECT_FILE.i:701. -[value] Done for function __gmpz_get_si -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:762. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:702. -[value] Done for function __gmpz_init -PROJECT_FILE.i:703:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:704. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:405. +[value] Recording results for e_acsl_assert +[value] Done for function e_acsl_assert +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:405. +[value] Recording results for e_acsl_assert +[value] Done for function e_acsl_assert +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:393. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_tdiv_q <- main. - Called from PROJECT_FILE.i:705. -PROJECT_FILE.i:156:[value] Function __gmpz_tdiv_q: precondition got status valid. -PROJECT_FILE.i:157:[value] Function __gmpz_tdiv_q: precondition got status valid. -PROJECT_FILE.i:158:[value] Function __gmpz_tdiv_q: precondition got status valid. -[value] Done for function __gmpz_tdiv_q -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:706. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:709. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:710. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:717. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:743. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:718. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:745. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_mul <- main. - Called from PROJECT_FILE.i:719. -PROJECT_FILE.i:150:[value] Function __gmpz_mul: precondition got status valid. -PROJECT_FILE.i:151:[value] Function __gmpz_mul: precondition got status valid. -PROJECT_FILE.i:152:[value] Function __gmpz_mul: precondition got status valid. -[value] Done for function __gmpz_mul -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:746. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:720. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:747. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:721. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:722. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:732. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:733. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:734. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_set <- main. - Called from PROJECT_FILE.i:735. -[value] Done for function __gmpz_set -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:743. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:736. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:737. -[value] Done for function __gmpz_clear [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:767. + Called from PROJECT_FILE.i:405. +[value] Recording results for e_acsl_assert +[value] Done for function e_acsl_assert +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:393. +[value] Recording results for e_acsl_assert +[value] Done for function e_acsl_assert +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:405. +[value] Recording results for e_acsl_assert +[value] Done for function e_acsl_assert +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:393. +[value] Recording results for e_acsl_assert +[value] Done for function e_acsl_assert +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:405. +[value] Recording results for e_acsl_assert +[value] Done for function e_acsl_assert +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:405. +[value] Recording results for e_acsl_assert +[value] Done for function e_acsl_assert +[value] computing for function e_acsl_assert <- main. + Called from PROJECT_FILE.i:428. [value] computing for function printf <- e_acsl_assert <- main. Called from PROJECT_FILE.i:219. [value] Done for function printf @@ -705,68 +126,6 @@ PROJECT_FILE.i:152:[value] Function __gmpz_mul: precondition got status valid. [value] Values at end of function main: __retres ∈ {0} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(z_orig); - requires \valid(z); - assigns *z; */ -extern void __gmpz_set(__mpz_struct * /*[1]*/ z, - __mpz_struct const * /*[1]*/ z_orig); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_mul(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_tdiv_q(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_tdiv_r(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z); - assigns \nothing; */ -extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -786,609 +145,187 @@ void e_acsl_assert(int predicate, char *kind, char *pred_txt, int line) int main(void) { int __retres; - /*@ assert ∀ ℤ x; 0 ≤ x ∧ x ≤ 1 ⇒ x ≡ 0 ∨ x ≡ 1; */ ; + /*@ assert ∀ int x; 0 ≤ x ∧ x ≤ 1 ⇒ x ≡ 0 ∨ x ≡ 1; */ ; { - mpz_t e_acsl_1; + int e_acsl_1; int e_acsl_2; - e_acsl_2 = 1; - __gmpz_init((__mpz_struct *)(e_acsl_1)); - { - mpz_t e_acsl_8; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_1),(__mpz_struct const *)(e_acsl_8)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - } - + e_acsl_1 = 1; + e_acsl_2 = 0; while (1) { - { - mpz_t e_acsl_9; - int e_acsl_10; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)1); - e_acsl_10 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_9)); - if (! (e_acsl_10 <= 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_9)); - } - - { - mpz_t e_acsl_3; - int e_acsl_4; - int e_acsl_7; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_3),(long)0); - e_acsl_4 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_3)); - if (e_acsl_4 == 0) { e_acsl_7 = 1; } - else { - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)1); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_7 = e_acsl_6 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - __gmpz_clear((__mpz_struct *)(e_acsl_3)); - if (! e_acsl_7) { - e_acsl_2 = 0; + if (! (e_acsl_2 <= 1)) { break; } + { int e_acsl_3; + if (e_acsl_2 == 0) { e_acsl_3 = 1; } + else { e_acsl_3 = e_acsl_2 == 1; } + if (! e_acsl_3) { + e_acsl_1 = 0; goto e_acsl_end_loop1; } } - { - mpz_t e_acsl_11; - mpz_t e_acsl_12; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_12)); - __gmpz_add((__mpz_struct *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_11)); - __gmpz_set((__mpz_struct *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_12)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - __gmpz_clear((__mpz_struct *)(e_acsl_12)); - } - + e_acsl_2 ++; } e_acsl_end_loop1: ; - e_acsl_assert(! e_acsl_2,(char *)"Assertion", - (char *)"(\\forall integer x; 0 <= x && x <= 1 ==> x == 0 || x == 1)", + e_acsl_assert(! e_acsl_1,(char *)"Assertion", + (char *)"(\\forall int x; 0 <= x && x <= 1 ==> x == 0 || x == 1)", 10); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); } - /*@ assert ∀ ℤ x; 0 < x ∧ x ≤ 1 ⇒ x ≡ 1; */ ; + /*@ assert ∀ int x; 0 < x ∧ x ≤ 1 ⇒ x ≡ 1; */ ; { - mpz_t e_acsl_13; - int e_acsl_14; - e_acsl_14 = 1; - __gmpz_init((__mpz_struct *)(e_acsl_13)); - { - mpz_t e_acsl_17; - mpz_t e_acsl_18; - mpz_t e_acsl_19; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)0); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_18),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_19)); - __gmpz_add((__mpz_struct *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_17), - (__mpz_struct const *)(e_acsl_18)); - __gmpz_set((__mpz_struct *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_17)); - __gmpz_clear((__mpz_struct *)(e_acsl_18)); - __gmpz_clear((__mpz_struct *)(e_acsl_19)); - } - + int e_acsl_4; + int e_acsl_5; + e_acsl_4 = 1; + e_acsl_5 = 0 + 1; while (1) { - { - mpz_t e_acsl_20; - int e_acsl_21; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)1); - e_acsl_21 = __gmpz_cmp((__mpz_struct const *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_20)); - if (! (e_acsl_21 <= 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_20)); - } - - { - mpz_t e_acsl_15; - int e_acsl_16; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)1); - e_acsl_16 = __gmpz_cmp((__mpz_struct const *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_15)); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - if (! (e_acsl_16 == 0)) { - e_acsl_14 = 0; - goto e_acsl_end_loop2; } - } - - { - mpz_t e_acsl_22; - mpz_t e_acsl_23; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_22),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_23)); - __gmpz_add((__mpz_struct *)(e_acsl_23), - (__mpz_struct const *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_22)); - __gmpz_set((__mpz_struct *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_23)); - __gmpz_clear((__mpz_struct *)(e_acsl_22)); - __gmpz_clear((__mpz_struct *)(e_acsl_23)); - } - + if (! (e_acsl_5 <= 1)) { break; } + if (! (e_acsl_5 == 1)) { + e_acsl_4 = 0; + goto e_acsl_end_loop2; } + e_acsl_5 ++; } e_acsl_end_loop2: ; - e_acsl_assert(! e_acsl_14,(char *)"Assertion", - (char *)"(\\forall integer x; 0 < x && x <= 1 ==> x == 1)", - 11); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); + e_acsl_assert(! e_acsl_4,(char *)"Assertion", + (char *)"(\\forall int x; 0 < x && x <= 1 ==> x == 1)",11); } - /*@ assert ∀ ℤ x; 0 < x ∧ x < 1 ⇒ \false; */ ; + /*@ assert ∀ int x; 0 < x ∧ x < 1 ⇒ \false; */ ; { - mpz_t e_acsl_24; - int e_acsl_25; - e_acsl_25 = 1; - __gmpz_init((__mpz_struct *)(e_acsl_24)); - { - mpz_t e_acsl_26; - mpz_t e_acsl_27; - mpz_t e_acsl_28; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)0); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_28)); - __gmpz_add((__mpz_struct *)(e_acsl_28), - (__mpz_struct const *)(e_acsl_26), - (__mpz_struct const *)(e_acsl_27)); - __gmpz_set((__mpz_struct *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_28)); - __gmpz_clear((__mpz_struct *)(e_acsl_26)); - __gmpz_clear((__mpz_struct *)(e_acsl_27)); - __gmpz_clear((__mpz_struct *)(e_acsl_28)); - } - + int e_acsl_6; + int e_acsl_7; + e_acsl_6 = 1; + e_acsl_7 = 0 + 1; while (1) { - { - mpz_t e_acsl_29; - int e_acsl_30; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_29),(long)1); - e_acsl_30 = __gmpz_cmp((__mpz_struct const *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_29)); - if (! (e_acsl_30 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_29)); - } - - e_acsl_25 = 0; + if (! (e_acsl_7 < 1)) { break; } + e_acsl_6 = 0; goto e_acsl_end_loop3; - { - mpz_t e_acsl_31; - mpz_t e_acsl_32; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_32)); - __gmpz_add((__mpz_struct *)(e_acsl_32), - (__mpz_struct const *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_31)); - __gmpz_set((__mpz_struct *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_32)); - __gmpz_clear((__mpz_struct *)(e_acsl_31)); - __gmpz_clear((__mpz_struct *)(e_acsl_32)); - } - + e_acsl_7 ++; } e_acsl_end_loop3: ; - e_acsl_assert(! e_acsl_25,(char *)"Assertion", - (char *)"(\\forall integer x; 0 < x && x < 1 ==> \\false)", - 12); - __gmpz_clear((__mpz_struct *)(e_acsl_24)); + e_acsl_assert(! e_acsl_6,(char *)"Assertion", + (char *)"(\\forall int x; 0 < x && x < 1 ==> \\false)",12); } - /*@ assert ∀ ℤ x; 0 ≤ x ∧ x < 1 ⇒ x ≡ 0; */ ; + /*@ assert ∀ int x; 0 ≤ x ∧ x < 1 ⇒ x ≡ 0; */ ; { - mpz_t e_acsl_33; - int e_acsl_34; - e_acsl_34 = 1; - __gmpz_init((__mpz_struct *)(e_acsl_33)); - { - mpz_t e_acsl_37; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_37),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_37)); - __gmpz_clear((__mpz_struct *)(e_acsl_37)); - } - + int e_acsl_8; + int e_acsl_9; + e_acsl_8 = 1; + e_acsl_9 = 0; while (1) { - { - mpz_t e_acsl_38; - int e_acsl_39; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_38),(long)1); - e_acsl_39 = __gmpz_cmp((__mpz_struct const *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_38)); - if (! (e_acsl_39 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_38)); - } - - { - mpz_t e_acsl_35; - int e_acsl_36; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)0); - e_acsl_36 = __gmpz_cmp((__mpz_struct const *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_35)); - __gmpz_clear((__mpz_struct *)(e_acsl_35)); - if (! (e_acsl_36 == 0)) { - e_acsl_34 = 0; - goto e_acsl_end_loop4; } - } - - { - mpz_t e_acsl_40; - mpz_t e_acsl_41; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_40),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_41)); - __gmpz_add((__mpz_struct *)(e_acsl_41), - (__mpz_struct const *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_40)); - __gmpz_set((__mpz_struct *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_41)); - __gmpz_clear((__mpz_struct *)(e_acsl_40)); - __gmpz_clear((__mpz_struct *)(e_acsl_41)); - } - + if (! (e_acsl_9 < 1)) { break; } + if (! (e_acsl_9 == 0)) { + e_acsl_8 = 0; + goto e_acsl_end_loop4; } + e_acsl_9 ++; } e_acsl_end_loop4: ; - e_acsl_assert(! e_acsl_34,(char *)"Assertion", - (char *)"(\\forall integer x; 0 <= x && x < 1 ==> x == 0)", - 13); - __gmpz_clear((__mpz_struct *)(e_acsl_33)); + e_acsl_assert(! e_acsl_8,(char *)"Assertion", + (char *)"(\\forall int x; 0 <= x && x < 1 ==> x == 0)",13); } /*@ - assert ∀ ℤ x, ℤ y, ℤ z; + assert ∀ int x, int y, int z; ((0 ≤ x ∧ x < 2) ∧ (0 ≤ y ∧ y < 5)) ∧ (0 ≤ z ∧ z ≤ y) ⇒ x+z ≤ y+1; */ ; { - mpz_t e_acsl_42; - mpz_t e_acsl_43; - mpz_t e_acsl_44; - int e_acsl_45; - e_acsl_45 = 1; - __gmpz_init((__mpz_struct *)(e_acsl_42)); - __gmpz_init((__mpz_struct *)(e_acsl_43)); - __gmpz_init((__mpz_struct *)(e_acsl_44)); - { - mpz_t e_acsl_59; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_59),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_42), - (__mpz_struct const *)(e_acsl_59)); - __gmpz_clear((__mpz_struct *)(e_acsl_59)); - } - + int e_acsl_10; + int e_acsl_11; + int e_acsl_12; + int e_acsl_13; + e_acsl_10 = 1; + e_acsl_11 = 0; while (1) { - { - mpz_t e_acsl_60; - int e_acsl_61; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_60),(long)2); - e_acsl_61 = __gmpz_cmp((__mpz_struct const *)(e_acsl_42), - (__mpz_struct const *)(e_acsl_60)); - if (! (e_acsl_61 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_60)); - } - - { - mpz_t e_acsl_54; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_54),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_43), - (__mpz_struct const *)(e_acsl_54)); - __gmpz_clear((__mpz_struct *)(e_acsl_54)); - } - + if (! (e_acsl_11 < 2)) { break; } + e_acsl_12 = 0; while (1) { - { - mpz_t e_acsl_55; - int e_acsl_56; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_55),(long)5); - e_acsl_56 = __gmpz_cmp((__mpz_struct const *)(e_acsl_43), - (__mpz_struct const *)(e_acsl_55)); - if (! (e_acsl_56 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_55)); - } - - { - mpz_t e_acsl_50; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_50),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_44), - (__mpz_struct const *)(e_acsl_50)); - __gmpz_clear((__mpz_struct *)(e_acsl_50)); - } - + if (! (e_acsl_12 < 5)) { break; } + e_acsl_13 = 0; while (1) { - { - int e_acsl_51; - e_acsl_51 = __gmpz_cmp((__mpz_struct const *)(e_acsl_44), - (__mpz_struct const *)(e_acsl_43)); - if (! (e_acsl_51 <= 0)) { break; } - } - - { - mpz_t e_acsl_46; - mpz_t e_acsl_47; - mpz_t e_acsl_48; - int e_acsl_49; - __gmpz_init((__mpz_struct *)(e_acsl_46)); - __gmpz_add((__mpz_struct *)(e_acsl_46), - (__mpz_struct const *)(e_acsl_42), - (__mpz_struct const *)(e_acsl_44)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_47),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_48)); - __gmpz_add((__mpz_struct *)(e_acsl_48), - (__mpz_struct const *)(e_acsl_43), - (__mpz_struct const *)(e_acsl_47)); - e_acsl_49 = __gmpz_cmp((__mpz_struct const *)(e_acsl_46), - (__mpz_struct const *)(e_acsl_48)); - __gmpz_clear((__mpz_struct *)(e_acsl_46)); - __gmpz_clear((__mpz_struct *)(e_acsl_47)); - __gmpz_clear((__mpz_struct *)(e_acsl_48)); - if (! (e_acsl_49 <= 0)) { - e_acsl_45 = 0; - goto e_acsl_end_loop5; } - } - - { - mpz_t e_acsl_52; - mpz_t e_acsl_53; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_52),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_53)); - __gmpz_add((__mpz_struct *)(e_acsl_53), - (__mpz_struct const *)(e_acsl_44), - (__mpz_struct const *)(e_acsl_52)); - __gmpz_set((__mpz_struct *)(e_acsl_44), - (__mpz_struct const *)(e_acsl_53)); - __gmpz_clear((__mpz_struct *)(e_acsl_52)); - __gmpz_clear((__mpz_struct *)(e_acsl_53)); + if (! (e_acsl_13 <= e_acsl_12)) { break; } + if (! (e_acsl_11 + e_acsl_13 <= e_acsl_12 + 1)) { + e_acsl_10 = 0; + goto e_acsl_end_loop5; } - + e_acsl_13 ++; } - { - mpz_t e_acsl_57; - mpz_t e_acsl_58; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_57),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_58)); - __gmpz_add((__mpz_struct *)(e_acsl_58), - (__mpz_struct const *)(e_acsl_43), - (__mpz_struct const *)(e_acsl_57)); - __gmpz_set((__mpz_struct *)(e_acsl_43), - (__mpz_struct const *)(e_acsl_58)); - __gmpz_clear((__mpz_struct *)(e_acsl_57)); - __gmpz_clear((__mpz_struct *)(e_acsl_58)); - } - - } - { - mpz_t e_acsl_62; - mpz_t e_acsl_63; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_62),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_63)); - __gmpz_add((__mpz_struct *)(e_acsl_63), - (__mpz_struct const *)(e_acsl_42), - (__mpz_struct const *)(e_acsl_62)); - __gmpz_set((__mpz_struct *)(e_acsl_42), - (__mpz_struct const *)(e_acsl_63)); - __gmpz_clear((__mpz_struct *)(e_acsl_62)); - __gmpz_clear((__mpz_struct *)(e_acsl_63)); + e_acsl_12 ++; } - + e_acsl_11 ++; } e_acsl_end_loop5: ; - e_acsl_assert(! e_acsl_45,(char *)"Assertion", - (char *)"(\\forall integer x, integer y, integer z;\n ((0 <= x && x < 2) && (0 <= y && y < 5)) && (0 <= z && z <= y) ==>\n x+z <= y+1)", + e_acsl_assert(! e_acsl_10,(char *)"Assertion", + (char *)"(\\forall int x, int y, int z;\n ((0 <= x && x < 2) && (0 <= y && y < 5)) && (0 <= z && z <= y) ==>\n x+z <= y+1)", 17); - __gmpz_clear((__mpz_struct *)(e_acsl_42)); - __gmpz_clear((__mpz_struct *)(e_acsl_43)); - __gmpz_clear((__mpz_struct *)(e_acsl_44)); } /*@ assert ∃ int x; (0 ≤ x ∧ x < 10) ∧ x ≡ 5; */ ; { - mpz_t e_acsl_64; - int e_acsl_65; - e_acsl_65 = 0; - __gmpz_init((__mpz_struct *)(e_acsl_64)); - { - mpz_t e_acsl_68; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_68),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_64), - (__mpz_struct const *)(e_acsl_68)); - __gmpz_clear((__mpz_struct *)(e_acsl_68)); - } - + int e_acsl_14; + int e_acsl_15; + e_acsl_14 = 0; + e_acsl_15 = 0; while (1) { - { - mpz_t e_acsl_69; - int e_acsl_70; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_69),(long)10); - e_acsl_70 = __gmpz_cmp((__mpz_struct const *)(e_acsl_64), - (__mpz_struct const *)(e_acsl_69)); - if (! (e_acsl_70 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_69)); - } - - { - mpz_t e_acsl_66; - int e_acsl_67; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_66),(long)5); - e_acsl_67 = __gmpz_cmp((__mpz_struct const *)(e_acsl_64), - (__mpz_struct const *)(e_acsl_66)); - __gmpz_clear((__mpz_struct *)(e_acsl_66)); - if (! (! (e_acsl_67 == 0))) { - e_acsl_65 = 1; - goto e_acsl_end_loop6; } - } - - { - mpz_t e_acsl_71; - mpz_t e_acsl_72; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_71),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_72)); - __gmpz_add((__mpz_struct *)(e_acsl_72), - (__mpz_struct const *)(e_acsl_64), - (__mpz_struct const *)(e_acsl_71)); - __gmpz_set((__mpz_struct *)(e_acsl_64), - (__mpz_struct const *)(e_acsl_72)); - __gmpz_clear((__mpz_struct *)(e_acsl_71)); - __gmpz_clear((__mpz_struct *)(e_acsl_72)); - } - + if (! (e_acsl_15 < 10)) { break; } + if (! (! (e_acsl_15 == 5))) { + e_acsl_14 = 1; + goto e_acsl_end_loop6; } + e_acsl_15 ++; } e_acsl_end_loop6: ; - e_acsl_assert(! e_acsl_65,(char *)"Assertion", + e_acsl_assert(! e_acsl_14,(char *)"Assertion", (char *)"(\\exists int x; (0 <= x && x < 10) && x == 5)", 22); } /*@ assert ∀ int x; 0 ≤ x ∧ x < 10 ⇒ - (x%2 ≡ 0 ⇒ (∃ ℤ y; (0 ≤ y ∧ y ≤ x/2) ∧ x ≡ 2*y)); */ ; + (x%2 ≡ 0 ⇒ (∃ int y; (0 ≤ y ∧ y ≤ x/2) ∧ x ≡ 2*y)); */ ; { - mpz_t e_acsl_73; - int e_acsl_74; - e_acsl_74 = 1; - __gmpz_init((__mpz_struct *)(e_acsl_73)); - { - mpz_t e_acsl_93; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_93),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_73), - (__mpz_struct const *)(e_acsl_93)); - __gmpz_clear((__mpz_struct *)(e_acsl_93)); - } - + int e_acsl_16; + int e_acsl_17; + e_acsl_16 = 1; + e_acsl_17 = 0; while (1) { + if (! (e_acsl_17 < 10)) { break; } { - mpz_t e_acsl_94; - int e_acsl_95; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_94),(long)10); - e_acsl_95 = __gmpz_cmp((__mpz_struct const *)(e_acsl_73), - (__mpz_struct const *)(e_acsl_94)); - if (! (e_acsl_95 < 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_94)); - } - - { - mpz_t e_acsl_75; - int e_acsl_76; - mpz_t e_acsl_77; - mpz_t e_acsl_78; - int e_acsl_79; - int e_acsl_92; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_75),(long)2); - e_acsl_76 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_75)); - __gmpz_init((__mpz_struct *)(e_acsl_77)); + int e_acsl_18; + int e_acsl_22; /*@ assert 2 ≢ 0; */ ; - e_acsl_assert(e_acsl_76 == 0,(char *)"Assertion",(char *)"(2 == 0)", - 27); - __gmpz_tdiv_r((__mpz_struct *)(e_acsl_77), - (__mpz_struct const *)(e_acsl_73), - (__mpz_struct const *)(e_acsl_75)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_78),(long)0); - e_acsl_79 = __gmpz_cmp((__mpz_struct const *)(e_acsl_77), - (__mpz_struct const *)(e_acsl_78)); - if (! (e_acsl_79 == 0)) { e_acsl_92 = 1; } + e_acsl_assert(2 == 0,(char *)"Assertion",(char *)"(2 == 0)",27); + e_acsl_18 = e_acsl_17 % 2; + if (! (e_acsl_18 == 0)) { e_acsl_22 = 1; } else { - mpz_t e_acsl_80; - int e_acsl_81; - e_acsl_81 = 0; - __gmpz_init((__mpz_struct *)(e_acsl_80)); - { - mpz_t e_acsl_85; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_85),(long)0); - __gmpz_set((__mpz_struct *)(e_acsl_80), - (__mpz_struct const *)(e_acsl_85)); - __gmpz_clear((__mpz_struct *)(e_acsl_85)); - } - + int e_acsl_19; + int e_acsl_20; + e_acsl_19 = 0; + e_acsl_20 = 0; while (1) { { - mpz_t e_acsl_86; - int e_acsl_87; - mpz_t e_acsl_88; - int e_acsl_89; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_86),(long)2); - e_acsl_87 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_86)); - __gmpz_init((__mpz_struct *)(e_acsl_88)); + int e_acsl_21; /*@ assert 2 ≢ 0; */ ; - e_acsl_assert(e_acsl_87 == 0,(char *)"Assertion", - (char *)"(2 == 0)",27); - __gmpz_tdiv_q((__mpz_struct *)(e_acsl_88), - (__mpz_struct const *)(e_acsl_73), - (__mpz_struct const *)(e_acsl_86)); - e_acsl_89 = __gmpz_cmp((__mpz_struct const *)(e_acsl_80), - (__mpz_struct const *)(e_acsl_88)); - if (! (e_acsl_89 <= 0)) { break; } - __gmpz_clear((__mpz_struct *)(e_acsl_86)); - __gmpz_clear((__mpz_struct *)(e_acsl_88)); + e_acsl_assert(2 == 0,(char *)"Assertion",(char *)"(2 == 0)",27); + e_acsl_21 = e_acsl_17 / 2; + if (! (e_acsl_20 <= e_acsl_21)) { break; } } - { - mpz_t e_acsl_82; - mpz_t e_acsl_83; - int e_acsl_84; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_82),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_83)); - __gmpz_mul((__mpz_struct *)(e_acsl_83), - (__mpz_struct const *)(e_acsl_82), - (__mpz_struct const *)(e_acsl_80)); - e_acsl_84 = __gmpz_cmp((__mpz_struct const *)(e_acsl_73), - (__mpz_struct const *)(e_acsl_83)); - __gmpz_clear((__mpz_struct *)(e_acsl_82)); - __gmpz_clear((__mpz_struct *)(e_acsl_83)); - if (! (! (e_acsl_84 == 0))) { - e_acsl_81 = 1; - goto e_acsl_end_loop7; - } - } - - { - mpz_t e_acsl_90; - mpz_t e_acsl_91; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_90),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_91)); - __gmpz_add((__mpz_struct *)(e_acsl_91), - (__mpz_struct const *)(e_acsl_80), - (__mpz_struct const *)(e_acsl_90)); - __gmpz_set((__mpz_struct *)(e_acsl_80), - (__mpz_struct const *)(e_acsl_91)); - __gmpz_clear((__mpz_struct *)(e_acsl_90)); - __gmpz_clear((__mpz_struct *)(e_acsl_91)); + if (! (! (e_acsl_17 == 2 * e_acsl_20))) { + e_acsl_19 = 1; + goto e_acsl_end_loop7; } - + e_acsl_20 ++; } e_acsl_end_loop7: ; - e_acsl_92 = e_acsl_81; - __gmpz_clear((__mpz_struct *)(e_acsl_80)); + e_acsl_22 = e_acsl_19; } - __gmpz_clear((__mpz_struct *)(e_acsl_75)); - __gmpz_clear((__mpz_struct *)(e_acsl_77)); - __gmpz_clear((__mpz_struct *)(e_acsl_78)); - if (! e_acsl_92) { - e_acsl_74 = 0; + if (! e_acsl_22) { + e_acsl_16 = 0; goto e_acsl_end_loop8; } } - { - mpz_t e_acsl_96; - mpz_t e_acsl_97; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_96),(long)((char)1)); - __gmpz_init((__mpz_struct *)(e_acsl_97)); - __gmpz_add((__mpz_struct *)(e_acsl_97), - (__mpz_struct const *)(e_acsl_73), - (__mpz_struct const *)(e_acsl_96)); - __gmpz_set((__mpz_struct *)(e_acsl_73), - (__mpz_struct const *)(e_acsl_97)); - __gmpz_clear((__mpz_struct *)(e_acsl_96)); - __gmpz_clear((__mpz_struct *)(e_acsl_97)); - } - + e_acsl_17 ++; } e_acsl_end_loop8: ; - e_acsl_assert(! e_acsl_74,(char *)"Assertion", - (char *)"(\\forall int x; 0 <= x && x < 10 ==>\n (x%2 == 0 ==> (\\exists integer y; (0 <= y && y <= x/2) && x == 2*y)))", + e_acsl_assert(! e_acsl_16,(char *)"Assertion", + (char *)"(\\forall int x; 0 <= x && x < 10 ==>\n (x%2 == 0 ==> (\\exists int y; (0 <= y && y <= x/2) && x == 2*y)))", 26); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.res.oracle index 40197acd721..7d2c6fe77fb 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/result.res.oracle @@ -1,89 +1,33 @@ -tests/e-acsl-runtime/result.i:6:[e-acsl] warning: missing guard for ensuring that the given integer is C-representable [value] Analyzing a complete application starting at main [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization Y ∈ {1} [value] computing for function f <- main. - Called from PROJECT_FILE.i:281. -[value] computing for function __gmpz_init_set_si <- f <- main. - Called from PROJECT_FILE.i:237. -PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- f <- main. - Called from PROJECT_FILE.i:238. -PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_sub <- f <- main. - Called from PROJECT_FILE.i:239. -PROJECT_FILE.i:144:[value] Function __gmpz_sub: precondition got status valid. -PROJECT_FILE.i:145:[value] Function __gmpz_sub: precondition got status valid. -PROJECT_FILE.i:146:[value] Function __gmpz_sub: precondition got status valid. -[value] Done for function __gmpz_sub -[value] computing for function __gmpz_get_si <- f <- main. - Called from PROJECT_FILE.i:240. -PROJECT_FILE.i:172:[value] Function __gmpz_get_si: precondition got status valid. -[value] Done for function __gmpz_get_si + Called from PROJECT_FILE.i:258. [value] computing for function e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:241. -[value] computing for function printf <- e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- f <- main. - Called from PROJECT_FILE.i:221. -PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. -[value] Done for function exit + Called from PROJECT_FILE.i:233. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- f <- main. - Called from PROJECT_FILE.i:243. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- f <- main. - Called from PROJECT_FILE.i:244. -[value] Done for function __gmpz_clear PROJECT_FILE.i:225:[value] Function f: postcondition got status valid. [value] Recording results for f [value] Done for function f [value] computing for function g <- main. - Called from PROJECT_FILE.i:282. + Called from PROJECT_FILE.i:259. [value] computing for function e_acsl_assert <- g <- main. - Called from PROJECT_FILE.i:254. + Called from PROJECT_FILE.i:242. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -PROJECT_FILE.i:251:[value] Function g: postcondition got status valid. +PROJECT_FILE.i:239:[value] Function g: postcondition got status valid. [value] Recording results for g [value] Done for function g [value] computing for function h <- main. - Called from PROJECT_FILE.i:283. -[value] computing for function __gmpz_init_set_si <- h <- main. - Called from PROJECT_FILE.i:267. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- h <- main. - Called from PROJECT_FILE.i:268. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- h <- main. - Called from PROJECT_FILE.i:269. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp + Called from PROJECT_FILE.i:260. [value] computing for function e_acsl_assert <- h <- main. - Called from PROJECT_FILE.i:270. -[value] computing for function printf <- e_acsl_assert <- h <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- h <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:251. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- h <- main. - Called from PROJECT_FILE.i:271. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- h <- main. - Called from PROJECT_FILE.i:272. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:258:[value] Function h: postcondition got status valid. +PROJECT_FILE.i:246:[value] Function h: postcondition got status valid. [value] Recording results for h [value] Done for function h [value] Recording results for main @@ -93,46 +37,13 @@ PROJECT_FILE.i:258:[value] Function h: postcondition got status valid. [value] Values at end of function f: x ∈ {0} e_acsl_1 ∈ {1} - e_acsl_3 ∈ {1} + e_acsl_2 ∈ {1} [value] Values at end of function g: [value] Values at end of function h: __retres ∈ {0} [value] Values at end of function main: __retres ∈ {0} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_sub(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); -/*@ requires \valid(z); - assigns \nothing; */ -extern long __gmpz_get_si(__mpz_struct const * /*[1]*/ z); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -153,26 +64,14 @@ void e_acsl_assert(int predicate, char *kind, char *pred_txt, int line) int f(int x) { int e_acsl_1; - int e_acsl_3; - e_acsl_3 = x; + int e_acsl_2; + e_acsl_2 = x; e_acsl_1 = x; x = 0; - { - mpz_t e_acsl_2; - mpz_t e_acsl_4; - int e_acsl_5; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)e_acsl_1); - __gmpz_init((__mpz_struct *)(e_acsl_4)); - __gmpz_sub((__mpz_struct *)(e_acsl_4),(__mpz_struct const *)(e_acsl_2), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_5 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_4)); - e_acsl_assert(! (x == e_acsl_5),(char *)"Postcondition", - (char *)"(\\result == (int)(\\old(x)-\\old(x)))",6); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - return (x); - } - + e_acsl_assert(! (x == (int)((long long)e_acsl_1 - (long long)e_acsl_2)), + (char *)"Postcondition", + (char *)"(\\result == (int)(\\old(x)-\\old(x)))",6); + return (x); } int Y = 1; @@ -189,21 +88,9 @@ int h(void) { int __retres; __retres = 0; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)__retres); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)0); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Postcondition", - (char *)"(\\result == 0)",22); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - return (__retres); - } - + e_acsl_assert(! (__retres == 0),(char *)"Postcondition", + (char *)"(\\result == 0)",22); + return (__retres); } int main(void) diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.res.oracle index edf627c0a51..6e7b881a951 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/sizeof.res.oracle @@ -3,62 +3,15 @@ [value] Initial state computed [value] Values of globals at initialization PROJECT_FILE.i:230:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:235. -PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:236. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:237. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:238. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. -[value] Done for function exit + Called from PROJECT_FILE.i:231. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:240. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:241. -[value] Done for function __gmpz_clear -PROJECT_FILE.i:245:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:251. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:252. -[value] Done for function __gmpz_cmp +PROJECT_FILE.i:233:[value] Assertion got status valid. [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:253. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:234. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:255. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:256. -[value] Done for function __gmpz_clear [value] Recording results for main [value] done for function main [value] ====== VALUES COMPUTED ====== @@ -67,25 +20,6 @@ PROJECT_FILE.i:245:[value] Assertion got status valid. __retres ∈ {0} x ∈ {0} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -108,35 +42,11 @@ int main(void) int x; x = 0; /*@ assert sizeof(int) ≡ sizeof(x); */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)4); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)4); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Assertion", - (char *)"(sizeof(int) == sizeof(x))",8); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - + e_acsl_assert(! (4 == 4),(char *)"Assertion", + (char *)"(sizeof(int) == sizeof(x))",8); /*@ assert sizeof("totototototo") ≡ sizeof(char *); */ ; - { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)4); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)4); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 == 0),(char *)"Assertion", - (char *)"(sizeof(\"totototototo\") == sizeof(char *))",9); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - + e_acsl_assert(! (4 == 4),(char *)"Assertion", + (char *)"(sizeof(\"totototototo\") == sizeof(char *))",9); __retres = 0; return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.res.oracle index a0be93df887..3b6b3ba44d0 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/stmt_contract.res.oracle @@ -2,544 +2,78 @@ [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:238. -PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:239. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:240. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:241. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. -[value] Done for function exit + Called from PROJECT_FILE.i:234. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:242. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:243. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:255. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:256. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:257. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:258. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:240. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:259. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:260. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:261. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:241. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:262. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:263. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:264. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:272. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:273. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:274. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:275. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:245. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:276. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:277. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:290. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:291. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:292. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:293. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:249. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:294. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:295. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:296. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:297. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:250. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:298. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:299. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:300. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:301. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:333. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:334. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:335. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:336. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:263. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:337. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:338. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:339. -PROJECT_FILE.i:69:[value] Function __gmpz_init: postcondition got status valid. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:340. -PROJECT_FILE.i:138:[value] Function __gmpz_add: precondition got status valid. -PROJECT_FILE.i:139:[value] Function __gmpz_add: precondition got status valid. -PROJECT_FILE.i:140:[value] Function __gmpz_add: precondition got status valid. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:341. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:342. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:264. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:343. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:344. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:345. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:266. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:346. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:347. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:348. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:349. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:350. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:351. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:355. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:356. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:357. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:358. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:268. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:359. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:360. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:361. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:362. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:363. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:364. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:269. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:365. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:366. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:367. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:368. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:369. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:395. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:396. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:397. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:403. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:404. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:405. -[value] Done for function __gmpz_cmp -PROJECT_FILE.i:406:[value] assigning non deterministic value for the first time -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:407. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:408. -[value] Done for function __gmpz_clear [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:410. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:292. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:411. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:412. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:417. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:418. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:419. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:421. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:422. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:430. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:431. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:432. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:434. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:435. -[value] Done for function __gmpz_clear [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:437. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:297. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:439. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:444. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:445. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:446. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:448. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:449. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:459. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:460. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init <- main. - Called from PROJECT_FILE.i:461. -[value] Done for function __gmpz_init -[value] computing for function __gmpz_add <- main. - Called from PROJECT_FILE.i:462. -[value] Done for function __gmpz_add -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:463. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:464. -[value] Done for function __gmpz_cmp -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:466. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:467. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:468. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:469. -[value] Done for function __gmpz_clear [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:471. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:303. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:473. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:474. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:475. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:484. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:485. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:486. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:487. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:309. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:488. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:489. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:495. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:496. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:497. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:498. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:311. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:499. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:500. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:515. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:516. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:517. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:518. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:316. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:519. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:520. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:524. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:525. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:526. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:527. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function exit + Called from PROJECT_FILE.i:318. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:528. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:529. -[value] Done for function __gmpz_clear [value] Recording results for main [value] done for function main [value] ====== VALUES COMPUTED ====== @@ -549,36 +83,6 @@ PROJECT_FILE.i:406:[value] assigning non deterministic value for the first time x ∈ {7} y ∈ {2} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; -/*@ ensures \valid(\old(x)); - assigns *x; */ -extern void __gmpz_init(__mpz_struct * /*[1]*/ x); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); -/*@ requires \valid(z1); - requires \valid(z2); - requires \valid(z3); - assigns *z1; -*/ -extern void __gmpz_add(__mpz_struct * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2, - __mpz_struct const * /*[1]*/ z3); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -604,89 +108,26 @@ int main(void) y = 2; /*@ ensures x ≡ 1; */ { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; x = 1; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)1); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Postcondition", - (char *)"(x == 1)",8); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); + e_acsl_assert(! (x == 1),(char *)"Postcondition",(char *)"(x == 1)",8); } /*@ ensures x ≡ 2; ensures y ≡ 2; */ { - mpz_t e_acsl_4; - mpz_t e_acsl_5; - int e_acsl_6; - mpz_t e_acsl_7; - int e_acsl_8; x = 2; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)2); - e_acsl_6 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_6 == 0),(char *)"Postcondition", - (char *)"(x == 2)",11); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)y); - e_acsl_8 = __gmpz_cmp((__mpz_struct const *)(e_acsl_7), - (__mpz_struct const *)(e_acsl_5)); - e_acsl_assert(! (e_acsl_8 == 0),(char *)"Postcondition", - (char *)"(y == 2)",12); - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); + e_acsl_assert(! (x == 2),(char *)"Postcondition",(char *)"(x == 2)",11); + e_acsl_assert(! (y == 2),(char *)"Postcondition",(char *)"(y == 2)",12); } /*@ requires x ≡ 2; */ - { - mpz_t e_acsl_9; - mpz_t e_acsl_10; - int e_acsl_11; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)2); - e_acsl_11 = __gmpz_cmp((__mpz_struct const *)(e_acsl_9), - (__mpz_struct const *)(e_acsl_10)); - e_acsl_assert(! (e_acsl_11 == 0),(char *)"Precondition", - (char *)"(x == 2)",15); - __gmpz_clear((__mpz_struct *)(e_acsl_9)); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - x ++; - } - + e_acsl_assert(! (x == 2),(char *)"Precondition",(char *)"(x == 2)",15); + x ++; /*@ requires x ≡ 3; requires y ≡ 2; */ - { - mpz_t e_acsl_12; - mpz_t e_acsl_13; - int e_acsl_14; - mpz_t e_acsl_15; - mpz_t e_acsl_16; - int e_acsl_17; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_12),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)3); - e_acsl_14 = __gmpz_cmp((__mpz_struct const *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_13)); - e_acsl_assert(! (e_acsl_14 == 0),(char *)"Precondition", - (char *)"(x == 3)",18); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)2); - e_acsl_17 = __gmpz_cmp((__mpz_struct const *)(e_acsl_15), - (__mpz_struct const *)(e_acsl_16)); - e_acsl_assert(! (e_acsl_17 == 0),(char *)"Precondition", - (char *)"(y == 2)",19); - __gmpz_clear((__mpz_struct *)(e_acsl_12)); - __gmpz_clear((__mpz_struct *)(e_acsl_13)); - __gmpz_clear((__mpz_struct *)(e_acsl_15)); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - x += y; - } - + e_acsl_assert(! (x == 3),(char *)"Precondition",(char *)"(x == 3)",18); + e_acsl_assert(! (y == 2),(char *)"Precondition",(char *)"(y == 2)",19); + x += y; /*@ behavior b1: requires x ≡ 5; ensures x ≡ 3; @@ -698,73 +139,14 @@ int main(void) */ { - mpz_t e_acsl_27; - mpz_t e_acsl_28; - int e_acsl_29; - mpz_t e_acsl_30; - mpz_t e_acsl_31; - mpz_t e_acsl_32; - int e_acsl_33; - { - mpz_t e_acsl_18; - mpz_t e_acsl_19; - int e_acsl_20; - mpz_t e_acsl_21; - mpz_t e_acsl_22; - mpz_t e_acsl_23; - int e_acsl_24; - mpz_t e_acsl_25; - int e_acsl_26; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_18),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)5); - e_acsl_20 = __gmpz_cmp((__mpz_struct const *)(e_acsl_18), - (__mpz_struct const *)(e_acsl_19)); - e_acsl_assert(! (e_acsl_20 == 0),(char *)"Precondition", - (char *)"(x == 5)",23); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_21),(long)3); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_22),(long)y); - __gmpz_init((__mpz_struct *)(e_acsl_23)); - __gmpz_add((__mpz_struct *)(e_acsl_23), - (__mpz_struct const *)(e_acsl_21), - (__mpz_struct const *)(e_acsl_22)); - e_acsl_24 = __gmpz_cmp((__mpz_struct const *)(e_acsl_18), - (__mpz_struct const *)(e_acsl_23)); - e_acsl_assert(! (e_acsl_24 == 0),(char *)"Precondition", - (char *)"(x == 3+y)",26); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_25),(long)2); - e_acsl_26 = __gmpz_cmp((__mpz_struct const *)(e_acsl_22), - (__mpz_struct const *)(e_acsl_25)); - e_acsl_assert(! (e_acsl_26 == 0),(char *)"Precondition", - (char *)"(y == 2)",27); - __gmpz_clear((__mpz_struct *)(e_acsl_18)); - __gmpz_clear((__mpz_struct *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_21)); - __gmpz_clear((__mpz_struct *)(e_acsl_22)); - __gmpz_clear((__mpz_struct *)(e_acsl_23)); - __gmpz_clear((__mpz_struct *)(e_acsl_25)); - x = 3; - } - - __gmpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_28),(long)3); - e_acsl_29 = __gmpz_cmp((__mpz_struct const *)(e_acsl_27), - (__mpz_struct const *)(e_acsl_28)); - e_acsl_assert(! (e_acsl_29 == 0),(char *)"Postcondition", - (char *)"(x == 3)",24); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_30),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_32)); - __gmpz_add((__mpz_struct *)(e_acsl_32),(__mpz_struct const *)(e_acsl_30), - (__mpz_struct const *)(e_acsl_31)); - e_acsl_33 = __gmpz_cmp((__mpz_struct const *)(e_acsl_27), - (__mpz_struct const *)(e_acsl_32)); - e_acsl_assert(! (e_acsl_33 == 0),(char *)"Postcondition", - (char *)"(x == y+1)",28); - __gmpz_clear((__mpz_struct *)(e_acsl_27)); - __gmpz_clear((__mpz_struct *)(e_acsl_28)); - __gmpz_clear((__mpz_struct *)(e_acsl_30)); - __gmpz_clear((__mpz_struct *)(e_acsl_31)); - __gmpz_clear((__mpz_struct *)(e_acsl_32)); + e_acsl_assert(! (x == 5),(char *)"Precondition",(char *)"(x == 5)",23); + e_acsl_assert(! ((long long)x == (long long)3 + (long long)y), + (char *)"Precondition",(char *)"(x == 3+y)",26); + e_acsl_assert(! (y == 2),(char *)"Precondition",(char *)"(y == 2)",27); + x = 3; + e_acsl_assert(! (x == 3),(char *)"Postcondition",(char *)"(x == 3)",24); + e_acsl_assert(! ((long long)x == (long long)y + (long long)1), + (char *)"Postcondition",(char *)"(x == y+1)",28); } /*@ behavior b1: @@ -779,171 +161,41 @@ int main(void) */ { - mpz_t e_acsl_34; - mpz_t e_acsl_35; - int e_acsl_36; - int e_acsl_40; - mpz_t e_acsl_41; - int e_acsl_42; - int e_acsl_46; - int e_acsl_50; - int e_acsl_51; - int e_acsl_55; - int e_acsl_61; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_34),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)1); - e_acsl_36 = __gmpz_cmp((__mpz_struct const *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_35)); - if (! (e_acsl_36 == 0)) { e_acsl_40 = 1; } - else { - mpz_t e_acsl_37; - mpz_t e_acsl_38; - int e_acsl_39; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_37),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_38),(long)0); - e_acsl_39 = __gmpz_cmp((__mpz_struct const *)(e_acsl_37), - (__mpz_struct const *)(e_acsl_38)); - e_acsl_40 = e_acsl_39 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_37)); - __gmpz_clear((__mpz_struct *)(e_acsl_38)); - } - e_acsl_assert(! e_acsl_40,(char *)"Precondition", + int e_acsl_1; + int e_acsl_2; + int e_acsl_3; + int e_acsl_4; + int e_acsl_5; + if (! (x == 1)) { e_acsl_1 = 1; } + else { e_acsl_1 = x == 0; } + e_acsl_assert(! e_acsl_1,(char *)"Precondition", (char *)"(x == 1 ==> x == 0)",33); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_41),(long)3); - e_acsl_42 = __gmpz_cmp((__mpz_struct const *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_41)); - if (e_acsl_42 == 0) { - mpz_t e_acsl_43; - mpz_t e_acsl_44; - int e_acsl_45; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_43),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_44),(long)2); - e_acsl_45 = __gmpz_cmp((__mpz_struct const *)(e_acsl_43), - (__mpz_struct const *)(e_acsl_44)); - e_acsl_46 = e_acsl_45 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_43)); - __gmpz_clear((__mpz_struct *)(e_acsl_44)); - } - else { e_acsl_46 = 0; } - if (! e_acsl_46) { e_acsl_50 = 1; } - else { - mpz_t e_acsl_47; - mpz_t e_acsl_48; - int e_acsl_49; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_47),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_48),(long)3); - e_acsl_49 = __gmpz_cmp((__mpz_struct const *)(e_acsl_47), - (__mpz_struct const *)(e_acsl_48)); - e_acsl_50 = e_acsl_49 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_47)); - __gmpz_clear((__mpz_struct *)(e_acsl_48)); - } - e_acsl_assert(! e_acsl_50,(char *)"Precondition", + if (x == 3) { e_acsl_2 = y == 2; } + else { e_acsl_2 = 0; } + if (! e_acsl_2) { e_acsl_3 = 1; } + else { e_acsl_3 = x == 3; } + e_acsl_assert(! e_acsl_3,(char *)"Precondition", (char *)"(x == 3 && y == 2 ==> x == 3)",37); - e_acsl_51 = __gmpz_cmp((__mpz_struct const *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_41)); - if (e_acsl_51 == 0) { - mpz_t e_acsl_52; - mpz_t e_acsl_53; - int e_acsl_54; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_52),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_53),(long)2); - e_acsl_54 = __gmpz_cmp((__mpz_struct const *)(e_acsl_52), - (__mpz_struct const *)(e_acsl_53)); - e_acsl_55 = e_acsl_54 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_52)); - __gmpz_clear((__mpz_struct *)(e_acsl_53)); - } - else { e_acsl_55 = 0; } - if (! e_acsl_55) { e_acsl_61 = 1; } - else { - mpz_t e_acsl_56; - mpz_t e_acsl_57; - mpz_t e_acsl_58; - mpz_t e_acsl_59; - int e_acsl_60; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_56),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_57),(long)y); - __gmpz_init((__mpz_struct *)(e_acsl_58)); - __gmpz_add((__mpz_struct *)(e_acsl_58), - (__mpz_struct const *)(e_acsl_56), - (__mpz_struct const *)(e_acsl_57)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_59),(long)5); - e_acsl_60 = __gmpz_cmp((__mpz_struct const *)(e_acsl_58), - (__mpz_struct const *)(e_acsl_59)); - e_acsl_61 = e_acsl_60 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_56)); - __gmpz_clear((__mpz_struct *)(e_acsl_57)); - __gmpz_clear((__mpz_struct *)(e_acsl_58)); - __gmpz_clear((__mpz_struct *)(e_acsl_59)); - } - e_acsl_assert(! e_acsl_61,(char *)"Precondition", + if (x == 3) { e_acsl_4 = y == 2; } + else { e_acsl_4 = 0; } + if (! e_acsl_4) { e_acsl_5 = 1; } + else { e_acsl_5 = (long long)x + (long long)y == (long long)5; } + e_acsl_assert(! e_acsl_5,(char *)"Precondition", (char *)"(x == 3 && y == 2 ==> x+y == 5)",38); - __gmpz_clear((__mpz_struct *)(e_acsl_34)); - __gmpz_clear((__mpz_struct *)(e_acsl_35)); - __gmpz_clear((__mpz_struct *)(e_acsl_41)); x += y; } /*@ requires x ≡ 5; */ - { - mpz_t e_acsl_62; - mpz_t e_acsl_63; - int e_acsl_64; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_62),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_63),(long)5); - e_acsl_64 = __gmpz_cmp((__mpz_struct const *)(e_acsl_62), - (__mpz_struct const *)(e_acsl_63)); - e_acsl_assert(! (e_acsl_64 == 0),(char *)"Precondition", - (char *)"(x == 5)",41); - __gmpz_clear((__mpz_struct *)(e_acsl_62)); - __gmpz_clear((__mpz_struct *)(e_acsl_63)); - /*@ requires y ≡ 2; */ - { - mpz_t e_acsl_65; - mpz_t e_acsl_66; - int e_acsl_67; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_65),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_66),(long)2); - e_acsl_67 = __gmpz_cmp((__mpz_struct const *)(e_acsl_65), - (__mpz_struct const *)(e_acsl_66)); - e_acsl_assert(! (e_acsl_67 == 0),(char *)"Precondition", - (char *)"(y == 2)",42); - __gmpz_clear((__mpz_struct *)(e_acsl_65)); - __gmpz_clear((__mpz_struct *)(e_acsl_66)); - x += y; - } - } - + e_acsl_assert(! (x == 5),(char *)"Precondition",(char *)"(x == 5)",41); + /*@ requires y ≡ 2; */ + e_acsl_assert(! (y == 2),(char *)"Precondition",(char *)"(y == 2)",42); + x += y; /*@ requires x ≡ 7; ensures x ≡ 7; */ { - mpz_t e_acsl_71; - mpz_t e_acsl_72; - int e_acsl_73; - { - mpz_t e_acsl_68; - mpz_t e_acsl_69; - int e_acsl_70; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_68),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_69),(long)7); - e_acsl_70 = __gmpz_cmp((__mpz_struct const *)(e_acsl_68), - (__mpz_struct const *)(e_acsl_69)); - e_acsl_assert(! (e_acsl_70 == 0),(char *)"Precondition", - (char *)"(x == 7)",45); - __gmpz_clear((__mpz_struct *)(e_acsl_68)); - __gmpz_clear((__mpz_struct *)(e_acsl_69)); - __retres = 0; - } - - __gmpz_init_set_si((__mpz_struct *)(e_acsl_71),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_72),(long)7); - e_acsl_73 = __gmpz_cmp((__mpz_struct const *)(e_acsl_71), - (__mpz_struct const *)(e_acsl_72)); - e_acsl_assert(! (e_acsl_73 == 0),(char *)"Postcondition", - (char *)"(x == 7)",46); - __gmpz_clear((__mpz_struct *)(e_acsl_71)); - __gmpz_clear((__mpz_struct *)(e_acsl_72)); + e_acsl_assert(! (x == 7),(char *)"Precondition",(char *)"(x == 7)",45); + __retres = 0; + e_acsl_assert(! (x == 7),(char *)"Postcondition",(char *)"(x == 7)",46); } return (__retres); diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.res.oracle index 835e1ce7225..cca67e6c4ea 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/typedef.res.oracle @@ -3,37 +3,10 @@ [value] Initial state computed [value] Values of globals at initialization PROJECT_FILE.i:231:[value] Assertion got status valid. -[value] computing for function __gmpz_init_set_ui <- main. - Called from PROJECT_FILE.i:236. -PROJECT_FILE.i:78:[value] Function __gmpz_init_set_ui: postcondition got status valid. -[value] Done for function __gmpz_init_set_ui -[value] computing for function __gmpz_init_set_si <- main. - Called from PROJECT_FILE.i:237. -PROJECT_FILE.i:82:[value] Function __gmpz_init_set_si: postcondition got status valid. -[value] Done for function __gmpz_init_set_si -[value] computing for function __gmpz_cmp <- main. - Called from PROJECT_FILE.i:238. -PROJECT_FILE.i:119:[value] Function __gmpz_cmp: precondition got status valid. -PROJECT_FILE.i:120:[value] Function __gmpz_cmp: precondition got status valid. -[value] Done for function __gmpz_cmp [value] computing for function e_acsl_assert <- main. - Called from PROJECT_FILE.i:239. -[value] computing for function printf <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function printf -[value] computing for function exit <- e_acsl_assert <- main. - Called from PROJECT_FILE.i:221. -PROJECT_FILE.i:207:[value] Function exit: postcondition got status invalid. -[value] Done for function exit + Called from PROJECT_FILE.i:232. [value] Recording results for e_acsl_assert [value] Done for function e_acsl_assert -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:240. -PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. -[value] Done for function __gmpz_clear -[value] computing for function __gmpz_clear <- main. - Called from PROJECT_FILE.i:241. -[value] Done for function __gmpz_clear [value] Recording results for main [value] done for function main [value] ====== VALUES COMPUTED ====== @@ -42,30 +15,7 @@ PROJECT_FILE.i:111:[value] Function __gmpz_clear: precondition got status valid. __retres ∈ {0} x ∈ {0} /* Generated by Frama-C */ -struct __anonstruct___mpz_struct_1 { - int _mp_alloc ; - int _mp_size ; - unsigned long *_mp_d ; -}; -typedef struct __anonstruct___mpz_struct_1 __mpz_struct; -typedef __mpz_struct mpz_t[1]; typedef unsigned char uint8; -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_ui(__mpz_struct * /*[1]*/ z, unsigned long n); -/*@ ensures \valid(\old(z)); - assigns *z; - assigns *z \from n; */ -extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); -/*@ requires \valid(x); - assigns *x; */ -extern void __gmpz_clear(__mpz_struct * /*[1]*/ x); -/*@ requires \valid(z1); - requires \valid(z2); - assigns \nothing; */ -extern int __gmpz_cmp(__mpz_struct const * /*[1]*/ z1, - __mpz_struct const * /*[1]*/ z2); /*@ terminates \false; ensures \false; assigns \nothing; */ @@ -88,20 +38,7 @@ int main(void) uint8 x; x = (unsigned char)0; /*@ assert x ≡ 0; */ ; - { - mpz_t e_acsl_1; - mpz_t e_acsl_2; - int e_acsl_3; - __gmpz_init_set_ui((__mpz_struct *)(e_acsl_1),(unsigned long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)0); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - e_acsl_assert(! (e_acsl_3 == 0),(char *)"Assertion",(char *)"(x == 0)", - 10); - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - + e_acsl_assert(! ((int)x == 0),(char *)"Assertion",(char *)"(x == 0)",10); __retres = 0; return (__retres); } 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 8edbfae858d..1a6cc97205d 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/ptr.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/ptr.i @@ -1,6 +1,6 @@ /* run.config COMMENT: pointers and pointer arithmetic - EXECNOW: LOG gen_ptr.c BIN gen_ptr.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/ptr.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_ptr.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_ptr.out ./tests/e-acsl-runtime/result/gen_ptr.c -lgmp && ./tests/e-acsl-runtime/result/gen_ptr.out + EXECNOW: LOG gen_ptr.c BIN gen_ptr.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/ptr.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_ptr.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_ptr.out ./tests/e-acsl-runtime/result/gen_ptr.c -lgmp && ./tests/e-acsl-runtime/result/gen_ptr.out */ int main(void) { diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/result.i b/src/plugins/e-acsl/tests/e-acsl-runtime/result.i index f7d5b60114a..7998cedb9d0 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/result.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/result.i @@ -1,6 +1,6 @@ /* run.config COMMENT: \result - EXECNOW: LOG gen_result.c BIN gen_result.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/result.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_result.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_result.out ./tests/e-acsl-runtime/result/gen_result.c -lgmp && ./tests/e-acsl-runtime/result/gen_result.out + EXECNOW: LOG gen_result.c BIN gen_result.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/result.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_result.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_result.out ./tests/e-acsl-runtime/result/gen_result.c -lgmp && ./tests/e-acsl-runtime/result/gen_result.out */ /*@ ensures \result == (int)(x - x); */ 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 50cfc48c22d..2ab3759592a 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,6 +1,6 @@ /* run.config COMMENT: stmt contract - EXECNOW: LOG gen_stmt_contract.c BIN gen_stmt_contract.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/stmt_contract.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_stmt_contract.c > /dev/null && gcc -pedantic -o ./tests/e-acsl-runtime/result/gen_stmt_contract.out ./tests/e-acsl-runtime/result/gen_stmt_contract.c -lgmp && ./tests/e-acsl-runtime/result/gen_stmt_contract.out + EXECNOW: LOG gen_stmt_contract.c BIN gen_stmt_contract.out FRAMAC_SHARE=./share @frama-c@ ./tests/e-acsl-runtime/stmt_contract.i -e-acsl -then-on e-acsl -print -ocode ./tests/e-acsl-runtime/result/gen_stmt_contract.c > /dev/null && gcc -pedantic -Wno-long-long -o ./tests/e-acsl-runtime/result/gen_stmt_contract.out ./tests/e-acsl-runtime/result/gen_stmt_contract.c -lgmp && ./tests/e-acsl-runtime/result/gen_stmt_contract.out */ int main(void) { int x = 0, y = 2; diff --git a/src/plugins/e-acsl/typing.ml b/src/plugins/e-acsl/typing.ml index 1ab46e59358..428c76dd7aa 100644 --- a/src/plugins/e-acsl/typing.ml +++ b/src/plugins/e-acsl/typing.ml @@ -22,123 +22,34 @@ open Cil_types open Cil +open Cil_datatype -let compatible_type ty ty' = - (* compatible if the two type has the same "integrality" *) - isIntegralType ty = isIntegralType ty' - -(* convert [e] corresponding to a term of type [ty] in a way that it is - compatible with the given context. *) -let context_sensitive ?loc env ctx is_mpz_string t_opt e = - let ty = typeOf e in - let mk_mpz env e = - Env.new_var env t_opt Mpz.t (fun lv v -> [ Mpz.init_set (var lv) v e ]) - in - let do_int_ctx ty' = - let e, env = if is_mpz_string then mk_mpz env e else e, env in - if Mpz.is_t ty || is_mpz_string then - (* cast the mpz into a C integer *) - let name = - if isSignedInteger ty' then "__gmpz_get_si" else "__gmpz_get_ui" - in - Options.warning - ?source:(Extlib.opt_map fst loc) - ~once:true - "@[missing guard for ensuring that the given integer is \ -C-representable@]"; - Env.new_var - env - None - ty' - (fun v _ -> [ Misc.mk_call ?loc ~result:(var v) name [ e ] ]) - else - e, env - in - match ctx with - | Ctype ty' -> do_int_ctx ty' - | Linteger -> - if Mpz.is_t ty then - e, env - else begin - (* Convert the C integer into a mpz. - Remember: very long integer constant has been temporary converted into - strings *) - assert (Options.verify - (isIntegralType ty || is_mpz_string) - "how to convert %a to an integer?" - d_type ty); - mk_mpz env e - end - | ty' when Logic_const.is_boolean_type ty' -> do_int_ctx intType - | Ltype _ | Lvar _ | Lreal | Larrow _ -> - (* not yet supported, thus cannot occur at this point *) - assert false - -let principal_type ty ty' = match ty, ty' with - | Ctype ty, Ctype ty' when isIntegralType ty -> - assert (isIntegralType ty'); - Ctype (arithmeticConversion ty ty') - | Ctype ty, Linteger | Linteger, Ctype ty when isIntegralType ty -> Linteger - (* not possible to unify cases below (see caml bts #5432) *) - | Ctype ty1, Ctype ty2 when Mpz.is_t ty1 && isIntegralType ty2 -> Linteger - | Ctype ty2, Ctype ty1 when Mpz.is_t ty1 && isIntegralType ty2 -> Linteger - | Ctype tty, Ctype tty' -> - assert (compatible_type tty tty'); - ty - | Ctype _, Linteger | Linteger, Ctype _ -> Linteger - | Linteger, Linteger -> Linteger - | (Ltype _ | Lvar _ | Lreal | Larrow _), _ - | _, (Ltype _ | Lvar _ | Lreal | Larrow _) -> - (* not yet supported, thus cannot occur at this point *) - Options.error "What is this %a here?" d_logic_type ty'; - assert false - -let principal_type_from_term t1 t2 = - let typ t = - let ty = t.term_type in - if Logic_const.is_boolean_type ty then Ctype intType - else match t.term_node, ty with - | TConst (CInt64(_, (ILongLong | IULongLong), _)), Linteger -> - (* constant potentially not representable in C *) - Linteger - | TConst (CInt64(_, k, _)), _ -> - (* C-representable constant *) - Ctype (TInt (k, [])) - | _, _ -> - (* for direct C terms, should be able to infer the corresponding C type *) - ty - in - principal_type (typ t1) (typ t2) +module BI = My_bigint -let is_representable _n k _s = match k with - | IBool | IChar | IUChar | IUInt | IUShort | IULong | ISChar | IShort | IInt - | ILong -> - true - | ILongLong | IULongLong -> - false +let is_representable n _k _s = BI.ge n BI.min_int64 && BI.le n BI.max_int64 (******************************************************************************) -(* NEW TYPE SYSTEM *) +(** Type Lattice *) (******************************************************************************) -open Cil_datatype - -module BI = My_bigint - type eacsl_typ = | Interv of BI.t * BI.t | Z | No_integral of logic_type +exception Not_representable let typ_of_eacsl_typ = function | Interv(l, u) -> let is_pos = BI.ge l BI.zero in (try - let mk k = TInt(k, []) in - let ty_l = mk (intKindForValue l is_pos) in - let ty_u = mk (intKindForValue u is_pos) in + let mk n k = + if true || is_representable n k false then TInt(k, []) + else raise Not_representable + in + let ty_l = mk l (intKindForValue l is_pos) in + let ty_u = mk u (intKindForValue u is_pos) in arithmeticConversion ty_l ty_u - with Not_found -> + with Not_found | Not_representable -> Mpz.t) | Z -> Mpz.t | No_integral (Ctype ty) -> ty @@ -148,7 +59,7 @@ let typ_of_eacsl_typ = function | No_integral Lreal -> Error.not_yet "real numbers" | No_integral (Larrow _) -> Error.not_yet "functional type" -let eacsl_typ_of_typ = function +let eacsl_typ_of_typ ty = match unrollType ty with | TInt(k, _) as ty -> let n = bitsSizeOf ty in let l, u = @@ -160,7 +71,11 @@ let eacsl_typ_of_typ = function exception Cannot_compare let meet ty1 ty2 = match ty1, ty2 with - | Interv(l1, u1), Interv(l2, u2) -> Interv(BI.max l1 l2, BI.min u1 u2) + | Interv(l1, u1), Interv(l2, u2) -> + let l = BI.max l1 l2 in + let u = BI.min u1 u2 in + if BI.gt l u then raise Cannot_compare; + Interv(l, u) | Interv _, Z -> ty1 | Z, Interv _ -> ty2 | Z, Z -> Z @@ -177,40 +92,50 @@ let join ty1 ty2 = match ty1, ty2 with | (Z | Interv _), No_integral _ | No_integral _, (Z | Interv _) -> raise Cannot_compare -module Global_env: sig - val get: term -> typ - val add: term -> eacsl_typ -> unit +let int_to_interv n = + let b = BI.of_int n in + Interv (b, b) + +(******************************************************************************) +(** Environments *) +(******************************************************************************) + +module Make_env(X: sig type t val hash: t -> int end): sig + val add: X.t -> eacsl_typ -> unit + val find: X.t -> eacsl_typ + val mem: X.t -> bool val clear: unit -> unit end = struct - module H = Hashtbl.Make - (struct - type t = term - let equal (t1:term) t2 = t1 == t2 - let hash = Term.hash - end) - + module H = Hashtbl.Make(struct include X let equal (t1:X.t) t2 = t1 == t2 end) let tbl = H.create 17 - + let add = H.replace tbl + let find = H.find tbl + let mem = H.mem tbl let clear () = H.clear tbl - let get t = try H.find tbl t with Not_found -> assert false - - let add t typ = - let ty = typ_of_eacsl_typ typ in - try - let old = H.find tbl t in - assert (Typ.equal old ty) - with Not_found -> - H.add tbl t ty end -let typ_of_term = Global_env.get -let clear = Global_env.clear +module Term_env = Make_env(Term) +module Logic_var_env = Make_env(Logic_var) -let int_to_interv n = - let b = BI.of_int n in - Interv (b, b) +let typ_of_term t = + try + let ty = Term_env.find t in + typ_of_eacsl_typ ty + with Not_found -> Options.fatal "untyped term %a" Term.pretty t + +let unsafe_set_term t ty = + assert (not (Term_env.mem t)); + Term_env.add t (eacsl_typ_of_typ ty) + +let clear () = + Term_env.clear (); + Logic_var_env.clear () + +(******************************************************************************) +(** Typing rules *) +(******************************************************************************) let rec type_constant ty = function | CInt64(n, _, _) -> Interv(n, n) @@ -223,46 +148,45 @@ let size_of ty = let align_of ty = int_to_interv (alignOf_int ty) -let rec type_term env t = +let rec type_term t = let lty = t.term_type in let get_cty t = match t.term_type with Ctype ty -> ty | _ -> assert false in let ty = match t.term_node with | TConst c -> type_constant lty c - | TLval lv -> type_term_lval env lty lv + | TLval lv -> type_term_lval lv | TSizeOf ty -> size_of ty | TSizeOfE t -> - ignore (type_term env t); + ignore (type_term t); size_of (get_cty t) | TSizeOfStr s -> int_to_interv (String.length s + 1 (* '\0' *)) | TAlignOf ty -> align_of ty | TAlignOfE t -> - ignore (type_term env t); + ignore (type_term t); align_of (get_cty t) | TUnOp(Neg, t) -> unary_arithmetic - (fun l u -> let opp = BI.sub BI.zero in opp u, opp l) env t + (fun l u -> let opp = BI.sub BI.zero in opp u, opp l) t | TUnOp(BNot, t) -> unary_arithmetic (fun l u -> let nl = BI.lognot l in let nu = BI.lognot u in BI.min nl nu, BI.max nl nu) - env t | TUnOp(LNot, t) -> - ignore (type_term env t); + ignore (type_term t); Interv(BI.zero, BI.one) | TBinOp(PlusA, t1, t2) -> let add l1 u1 l2 u2 = BI.add l1 l2, BI.add u1 u2 in - binary_arithmetic add env t1 t2 + binary_arithmetic add t1 t2 | TBinOp((PlusPI | IndexPI | MinusPI | MinusPP), t1, t2) -> - ignore (type_term env t1); - ignore (type_term env t2); + ignore (type_term t1); + ignore (type_term t2); No_integral lty | TBinOp(MinusA, t1, t2) -> let sub l1 u1 l2 u2 = BI.sub l1 u2, BI.sub u1 l2 in - binary_arithmetic sub env t1 t2 - | TBinOp(Mult, t1, t2) -> signed_rule BI.mul env t1 t2 + binary_arithmetic sub t1 t2 + | TBinOp(Mult, t1, t2) -> signed_rule BI.mul t1 t2 | TBinOp(Div, t1, t2) -> let div a b = try BI.c_div a b @@ -274,36 +198,36 @@ let rec type_term env t = in order to be as more precise as possible. *) BI.zero in - signed_rule div env t1 t2 + signed_rule div t1 t2 | TBinOp(Mod, t1, t2) -> let modu a b = try BI.c_rem a b with Division_by_zero -> BI.zero (* see Div *) in - signed_rule modu env t1 t2 + signed_rule modu t1 t2 | TBinOp(Shiftlt, _t1, _t2) | TBinOp(Shiftrt, _t1, _t2) -> Error.not_yet "left/right shift" | TBinOp((Lt | Gt | Le | Ge | Eq | Ne | LAnd | LOr), t1, t2) -> - ignore (type_term env t1); - ignore (type_term env t2); + ignore (type_term t1); + ignore (type_term t2); Interv(BI.zero, BI.one) | TBinOp((BAnd | BXor | BOr), _t1, _t2) -> Error.not_yet "missing binary bitwise operator" | TCastE(ty, t) -> - let ty_t = type_term env t in + let ty_t = type_term t in let ty_c = eacsl_typ_of_typ ty in (try meet ty_c ty_t with Cannot_compare -> ty_c) | TAddrOf lv | TStartOf lv -> - ignore (type_term_lval env lty lv); + ignore (type_term_lval lv); No_integral lty | Tapp _ -> Error.not_yet "applying logic function" | Tlambda _ -> Error.not_yet "functional" | TDataCons _ -> Error.not_yet "constructor" | Tif(t1, t2, t3) -> - ignore (type_term env t1); - let ty2 = type_term env t2 in - let ty3 = type_term env t3 in + ignore (type_term t1); + let ty2 = type_term t2 in + let ty3 = type_term t3 in (try join ty2 ty3 with Cannot_compare -> assert false) - | Tat(t, _) -> type_term env t + | Tat(t, _) -> type_term t | Tbase_addr _ -> Error.not_yet "\\base_addr" | Tblock_length _ -> Error.not_yet "\\block_length" | Tnull -> int_to_interv 0 @@ -319,16 +243,16 @@ let rec type_term env t = | Trange _ -> Error.not_yet "range" | Tlet _ -> Error.not_yet "let binding" in - Global_env.add t ty; + Term_env.add t ty; ty -and type_term_lval env ty (h, o) = - type_term_offset env o; - type_term_lhost env ty h +and type_term_lval (h, o) = + type_term_offset o; + type_term_lhost h -and type_term_lhost env lty = function +and type_term_lhost = function | TVar lv -> - (try Logic_var.Map.find lv env + (try Logic_var_env.find lv with Not_found -> (* C variable *) (* match lty with*) (* don't work yet: see bts #1064 *) @@ -339,21 +263,22 @@ and type_term_lhost env lty = function Logic_var.pretty lv Logic_type.pretty lv.lv_type) | TResult ty -> eacsl_typ_of_typ ty | TMem t -> - ignore (type_term env t); - match lty with - | Ctype ty -> eacsl_typ_of_typ ty - | Linteger -> Z - | Ltype _ | Lvar _ | Lreal | Larrow _ -> No_integral lty - -and type_term_offset env = function + let ty = type_term t in + (* got a pointer *) + match ty with + | No_integral (Ctype (TPtr(ty, _) | TArray(ty, _, _, _))) -> + eacsl_typ_of_typ ty + | No_integral _ | Z | Interv _ -> assert false + +and type_term_offset = function | TNoOffset -> () - | TField(_, o) -> type_term_offset env o + | TField(_, o) -> type_term_offset o | TIndex(t, o) -> - ignore (type_term env t); - type_term_offset env o + ignore (type_term t); + type_term_offset o -and unary_arithmetic op env t = - let ty = type_term env t in +and unary_arithmetic op t = + let ty = type_term t in match ty with | Interv(l, u) -> let l, u = op l u in @@ -361,9 +286,9 @@ and unary_arithmetic op env t = | Z -> Z | No_integral _ -> assert false -and binary_arithmetic op env t1 t2 = - let ty1 = type_term env t1 in - let ty2 = type_term env t2 in +and binary_arithmetic op t1 t2 = + let ty1 = type_term t1 in + let ty2 = type_term t2 in match ty1, ty2 with | Interv(l1, u1), Interv(l2, u2) -> let l, u = op l1 u1 l2 u2 in @@ -371,7 +296,7 @@ and binary_arithmetic op env t1 t2 = | No_integral _, _ | _, No_integral _ -> assert false | _, Z | Z, _ -> Z -and signed_rule op env t1 t2 = +and signed_rule op t1 t2 = (* probably not the most efficient way to compute the result, but the shortest *) let compute l1 u1 l2 u2 = @@ -381,60 +306,58 @@ and signed_rule op env t1 t2 = let d = op u1 u2 in BI.min a (BI.min b (BI.min c d)), BI.max a (BI.max b (BI.max c d)) in - binary_arithmetic compute env t1 t2 + binary_arithmetic compute t1 t2 let compute_quantif_guards_ref : (predicate named -> logic_var list -> predicate named -> (term * relation * logic_var * relation * term) list) ref = Extlib.mk_fun "compute_quantif_guards_ref" -let rec type_predicate_named env p = match p.content with +let rec type_predicate_named p = match p.content with | Pfalse | Ptrue -> () | Papp _ -> Error.not_yet "logic function application" | Pseparated _ -> Error.not_yet "separated" | Prel(_, t1, t2) -> - ignore (type_term env t1); - ignore (type_term env t2) + ignore (type_term t1); + ignore (type_term t2) | Pand(p1, p2) | Por(p1, p2) | Pxor(p1, p2) | Pimplies(p1, p2) | Piff(p1, p2) -> - type_predicate_named env p1; - type_predicate_named env p2 - | Pnot p -> type_predicate_named env p + type_predicate_named p1; + type_predicate_named p2 + | Pnot p -> type_predicate_named p | Pif(t, p1, p2) -> - ignore (type_term env t); - type_predicate_named env p1; - type_predicate_named env p2 + ignore (type_term t); + type_predicate_named p1; + type_predicate_named p2 | Plet _ -> Error.not_yet "let _ = _ in _" | Pforall(bounded_vars, { content = Pimplies(hyps, goal) }) | Pexists(bounded_vars, { content = Pand(hyps, goal) }) -> - let env = - List.fold_left - (fun env (t1, r1, x, r2, t2) -> - let ty1 = type_term env t1 in - let ty1 = match ty1, r1 with - | Interv(l, u), Rlt -> Interv(BI.add l BI.one, BI.add u BI.one) - | Interv(l, u), Rle -> Interv(l, u) - | Z, (Rlt | Rle) -> Z - | _, _ -> assert false - in - let ty2 = type_term env t2 in - (* add one here, since we increment the loop counter one more time - before going out the loop. *) - let ty2 = match ty2, r2 with - | Interv(l, u), Rlt -> Interv(l, u) - | Interv(l, u), Rle -> Interv(BI.add l BI.one, BI.add u BI.one) - | Z, (Rlt | Rle) -> Z - | _, _ -> assert false - in - Logic_var.Map.add x (join ty1 ty2) env) - env - (!compute_quantif_guards_ref p bounded_vars hyps) - in - type_predicate_named env hyps; - type_predicate_named env goal + let guards = !compute_quantif_guards_ref p bounded_vars hyps in + List.iter + (fun (t1, r1, x, r2, t2) -> + let ty1 = type_term t1 in + let ty1 = match ty1, r1 with + | Interv(l, u), Rlt -> Interv(BI.add l BI.one, BI.add u BI.one) + | Interv(l, u), Rle -> Interv(l, u) + | Z, (Rlt | Rle) -> Z + | _, _ -> assert false + in + let ty2 = type_term t2 in + (* add one here, since we increment the loop counter one more time + before going out the loop. *) + let ty2 = match ty2, r2 with + | Interv(l, u), Rlt -> Interv(l, u) + | Interv(l, u), Rle -> Interv(BI.add l BI.one, BI.add u BI.one) + | Z, (Rlt | Rle) -> Z + | _, _ -> assert false + in + Logic_var_env.add x (join ty1 ty2)) + guards; + type_predicate_named hyps; + type_predicate_named goal | Pforall _ -> Error.not_yet "unguarded \\forall quantification" | Pexists _ -> Error.not_yet "unguarded \\exists quantification" - | Pat(p, _) -> type_predicate_named env p + | Pat(p, _) -> type_predicate_named p | Pvalid _ -> Error.not_yet "\\valid" | Pvalid_index _ -> Error.not_yet "\\valid_index" | Pvalid_range _ -> Error.not_yet "\\valid_range" @@ -442,10 +365,78 @@ let rec type_predicate_named env p = match p.content with | Psubtype _ -> Error.not_yet "subtyping relation" (* Jessie specific *) | Pinitialized _ -> Error.not_yet "\\initialized" +let type_term t = ignore (type_term t) + let type_named_predicate p = Options.debug ~level:2 "typing predicate %a" d_predicate_named p; clear (); - type_predicate_named Logic_var.Map.empty p + type_predicate_named p + +(******************************************************************************) +(** Subtyping *) +(******************************************************************************) + +(* convert [e] in a way that it is compatible with the given typing context. *) +let context_sensitive ?loc env ctx is_mpz_string t_opt e = + let ty = typeOf e in + let mk_mpz e = + Env.new_var env t_opt Mpz.t (fun lv v -> [ Mpz.init_set (var lv) v e ]) + in + let do_int_ctx ty = + let e, env = if is_mpz_string then mk_mpz e else e, env in + if Mpz.is_t ty || is_mpz_string then + (* cast the mpz into a C integer *) + let name, new_ty = + if isSignedInteger ty then + "__gmpz_get_si", longType + else + "__gmpz_get_ui", ulongType + in + Options.warning + ?source:(Extlib.opt_map fst loc) + ~once:true + "@[missing guard for ensuring that the given integer is \ +C-representable@]"; + Env.new_var + env + None + new_ty + (fun v _ -> [ Misc.mk_call ?loc ~result:(var v) name [ e ] ]) + else + (if isIntegralType ctx && isIntegralType ty then + mkCast e (arithmeticConversion ctx ty) + else + e), + env + in + if Mpz.is_t ctx then + if Mpz.is_t ty then + e, env + else begin + (* Convert the C integer into a mpz. + Remember: very long integer constants have been temporary converted + into strings *) + assert (Options.verify + (isIntegralType ty || is_mpz_string) + "how to convert %a to an integer?" + d_type ty); + mk_mpz e + end + else if isIntegralType ctx then do_int_ctx ty + else e, env + +let principal_type t1 t2 = + let ty1 = typ_of_term t1 in + let ty2 = typ_of_term t2 in + (* possible to get an integralType (or Mpz.t) with a non-one in the case of + \null *) + if isIntegralType ty1 then + if isIntegralType ty2 then arithmeticConversion ty1 ty2 + else if Mpz.is_t ty2 then ty2 else ty1 + else if Mpz.is_t ty1 then + if isIntegralType ty2 || Mpz.is_t ty2 then ty1 else ty2 + else + ty2 (* Local Variables: diff --git a/src/plugins/e-acsl/typing.mli b/src/plugins/e-acsl/typing.mli index cc5bfe66062..d843afe3650 100644 --- a/src/plugins/e-acsl/typing.mli +++ b/src/plugins/e-acsl/typing.mli @@ -22,15 +22,24 @@ open Cil_types -(** Typing rules. *) +(******************************************************************************) +(** {2 Typing} *) +(******************************************************************************) + +val typ_of_term: term -> typ +val type_named_predicate: predicate named -> unit +val type_term: term -> unit +val unsafe_set_term: term -> typ -> unit +val clear: unit -> unit -(* TODO: to be improved *) +(******************************************************************************) +(** {2 Subtyping} *) +(******************************************************************************) -val principal_type: logic_type -> logic_type -> logic_type -val principal_type_from_term: term -> term -> logic_type +val principal_type: term -> term -> typ val context_sensitive: - ?loc:location -> Env.t -> logic_type -> bool -> term option -> exp -> + ?loc:location -> Env.t -> typ -> bool -> term option -> exp -> exp * Env.t val is_representable: My_bigint.t -> ikind -> string option -> bool @@ -38,13 +47,9 @@ val is_representable: My_bigint.t -> ikind -> string option -> bool (See [Cil_types.CInt64] for details about arguments *) (******************************************************************************) -(* NEW TYPE SYSTEM *) +(** {2 Internal stuff} *) (******************************************************************************) -val type_named_predicate: predicate named -> unit -val typ_of_term: term -> typ -val clear: unit -> unit - val compute_quantif_guards_ref : (predicate named -> logic_var list -> predicate named -> (term * relation * logic_var * relation * term) list) ref diff --git a/src/plugins/e-acsl/visit.ml b/src/plugins/e-acsl/visit.ml index 4ba2a4d59ea..b2f6c834827 100644 --- a/src/plugins/e-acsl/visit.ml +++ b/src/plugins/e-acsl/visit.ml @@ -57,7 +57,7 @@ let conditional_to_exp loc ctx e1 (e2, env2) (e3, env3) = Env.new_var env None - (match ctx with Linteger -> Mpz.t | Ctype ty -> ty | _ -> assert false) + ctx (fun v _ -> let lv = var v in let affect e = mkStmt ~valid_sid:true (Instr (Set(lv, e, loc))) in @@ -86,7 +86,7 @@ let rec thost_to_host env = function | Return(Some { enode = Lval (lhost, NoOffset) }, _) -> lhost, env | _ -> assert false) | TMem t -> - let e, env = term_to_exp env (Ctype intType) t in + let e, env = term_to_exp env None t in Options.warning ~source:(fst e.eloc) ~once:true "@[missing guard for ensuring that@ %a is a valid memory access@]" d_term t; @@ -99,7 +99,7 @@ and toffset_to_offset ?loc env = function let offset, env = toffset_to_offset ?loc env offset in Field(f, offset), env | TIndex(t, offset) -> - let e, env = term_to_exp env (Ctype intType) t in + let e, env = term_to_exp env (Some intType) t in Options.warning ~source:(fst e.eloc) ~once:true "@[missing guard for ensuring that@ %a is a valid array index@]" d_term t; @@ -123,57 +123,66 @@ and context_insensitive_term_to_exp env t = new_exp ~loc (Lval lv), env, false | TSizeOf ty -> sizeOf ~loc ty, env, false | TSizeOfE t -> - let ty = t.term_type in - assert (match ty with Ctype _ -> true | _ -> false); - let e, env = term_to_exp env ty t in + let ctx = match t.term_type with Ctype ty -> ty | _ -> assert false in + let e, env = term_to_exp env (Some ctx) t in sizeOf ~loc (typeOf e), env, false | TSizeOfStr s -> new_exp ~loc (SizeOfStr s), env, false | TAlignOf ty -> new_exp ~loc (AlignOf ty), env, false | TAlignOfE t -> - let ty = t.term_type in - assert (match ty with Ctype _ -> true | _ -> false); - let e, env = term_to_exp env ty t in + let ctx = match t.term_type with Ctype ty -> ty | _ -> assert false in + let e, env = term_to_exp env (Some ctx) t in new_exp ~loc (AlignOfE e), env, false | TUnOp(Neg | BNot as op, t') -> - let e, env = term_to_exp env Linteger t' in - let name = match op with - | Neg -> "__gmpz_neg" - | BNot -> "__gmpz_com" - | LNot -> assert false - in - let e, env = - Env.new_var_and_mpz_init - env - (Some t) - (fun _ ev -> [ Misc.mk_call ~loc name [ ev; e ] ]) - in - e, env, false + let ty = Typing.typ_of_term t in + let e, env = term_to_exp env (Some ty) t' in + if Mpz.is_t ty then + let name = match op with + | Neg -> "__gmpz_neg" + | BNot -> "__gmpz_com" + | LNot -> assert false + in + let e, env = + Env.new_var_and_mpz_init + env + (Some t) + (fun _ ev -> [ Misc.mk_call ~loc name [ ev; e ] ]) + in + e, env, false + else begin + assert (isIntegralType ty); + new_exp ~loc (UnOp(op, e, ty)), env, false + end | TUnOp(LNot, t) -> - let ty = t.term_type in - let e, env = term_to_exp env ty t in + let ty = Typing.typ_of_term t in (* TODO: preserve the old behavior. But that is incorrect if [t] is an integer since we have to implement a ! over mpz values. Such a case is actually possible. *) - assert (not (Mpz.is_t (typeOf e))); - new_exp ~loc (UnOp(LNot, e, intType)), env, false + assert (not (Mpz.is_t ty)); + let e, env = term_to_exp env (Some ty) t in + new_exp ~loc (UnOp(LNot, e, ty)), env, false | TBinOp(PlusA | MinusA | Mult as bop, t1, t2) -> - (* arithmetic binary operator not safely convertible into C *) - let e1, env = term_to_exp env Linteger t1 in - let e2, env = term_to_exp env Linteger t2 in - assert (Typ.equal (typeOf e1) (typeOf e2)); - let name = name_of_mpz_arith_bop bop in - let mk_stmts _ e = [ Misc.mk_call ~loc name [ e; e1; e2 ] ] in - let e, env = Env.new_var_and_mpz_init env (Some t) mk_stmts in - e, env, false + let ty = Typing.typ_of_term t in + let ctx = Some ty in + let e1, env = term_to_exp env ctx t1 in + let e2, env = term_to_exp env ctx t2 in + if Mpz.is_t ty then + let name = name_of_mpz_arith_bop bop in + let mk_stmts _ e = [ Misc.mk_call ~loc name [ e; e1; e2 ] ] in + let e, env = Env.new_var_and_mpz_init env (Some t) mk_stmts in + e, env, false + else + new_exp ~loc (BinOp(bop, e1, e2, ty)), env, false | TBinOp(Div | Mod as bop, t1, t2) -> - (* arithmetic binary operator potentially convertible into C *) - let ctx = Typing.principal_type_from_term t1 t2 in + let ty = Typing.typ_of_term t in + let ctx = Some ty in let e1, env = term_to_exp env ctx t1 in let e2, env = term_to_exp env ctx t2 in + (* [TODO] can now do better since the type system got some info about + possible values of [t2] *) (* guarding divisions and modulos *) let zero = Logic_const.tinteger ~ikind:IInt 0 in (* do not generate [e2] from [t2] twice *) - let guard, env = comparison_to_exp env ~e1:(e2, ctx) Eq t2 zero (Some t) in + let guard, env = comparison_to_exp env ~e1:(e2, ty) Eq t2 zero (Some t) in let mk_stmts v e = let name = name_of_mpz_arith_bop bop in let cond = @@ -183,20 +192,23 @@ and context_insensitive_term_to_exp env t = (Logic_const.prel ~loc (Req, t2, zero)) in Env.add_assert env cond (Logic_const.prel (Rneq, t2, zero)); - let instr = match ctx with - | Ctype ty when isIntegralType ty -> + let instr = + if Mpz.is_t ty then Misc.mk_call ~loc name [ e; e1; e2 ] + else begin + assert (isIntegralType ty); let e = new_exp ~loc (BinOp(bop, e1, e2, ty)) in mkStmtOneInstr ~valid_sid:true (Set((Var v, NoOffset), e, loc)) - | Linteger -> Misc.mk_call ~loc name [ e; e1; e2 ] - | _ -> assert false + end in [ cond; instr ] in let t = Some t in - let e, env = match ctx with - | Ctype ty when isIntegralType ty -> Env.new_var env t ty mk_stmts - | Linteger -> Env.new_var_and_mpz_init env t mk_stmts - | _ -> assert false + let e, env = + if Mpz.is_t ty then Env.new_var_and_mpz_init env t mk_stmts + else begin + assert (isIntegralType ty); + Env.new_var env t ty mk_stmts + end in e, env, false | TBinOp(Lt | Gt | Le | Ge | Eq | Ne as bop, t1, t2) -> @@ -208,17 +220,19 @@ and context_insensitive_term_to_exp env t = Error.not_yet "left/right shift" | TBinOp(LOr, t1, t2) -> (* t1 || t2 <==> if t1 then true else t2 *) - let ty = Typing.principal_type_from_term t1 t2 in - let e1, env1 = term_to_exp env ty t1 in + let ty = Typing.principal_type t1 t2 in + let ctx = Some ty in + let e1, env1 = term_to_exp env ctx t1 in let env' = Env.push env1 in - let res2 = term_to_exp (Env.push env') ty t2 in + let res2 = term_to_exp (Env.push env') ctx t2 in let e, env = conditional_to_exp loc ty e1 (one loc, env') res2 in e, env, false | TBinOp(LAnd, t1, t2) -> (* t1 && t2 <==> if t1 then t2 else false *) - let ty = Typing.principal_type_from_term t1 t2 in - let e1, env1 = term_to_exp env ty t1 in - let _, env2 as res2 = term_to_exp (Env.push env1) ty t2 in + let ty = Typing.principal_type t1 t2 in + let ctx = Some ty in + let e1, env1 = term_to_exp env ctx t1 in + let _, env2 as res2 = term_to_exp (Env.push env1) ctx t2 in let env3 = Env.push env2 in let e, env = conditional_to_exp loc ty e1 res2 (zero loc, env3) in e, env, false @@ -228,22 +242,23 @@ and context_insensitive_term_to_exp env t = | TBinOp(PlusPI | IndexPI | MinusPI | MinusPP as bop, t1, t2) -> (* binary operation over pointers *) (* [TODO] untested *) - let ctx_type t = match t.term_type with - | Linteger -> - (* convert integer to int type for pointer arith *) - Ctype intType - | ty -> ty + let ctx1, ctx2, ty = + (* ISO C, Section 6.5.6: either the first argument is a pointer and the + second is an integer type, or the reverse *) + let ty1 = Typing.typ_of_term t1 in + let ty2 = Typing.typ_of_term t2 in + if Mpz.is_t ty1 then Some longType, Some ty2, ty2 + else if Mpz.is_t ty2 then Some ty1, Some longType, ty1 + else Some ty1, Some ty2, if isIntegralType ty1 then ty2 else ty1 in - let e1, env = term_to_exp env (ctx_type t1) t1 in - let e2, env = term_to_exp env (ctx_type t2) t2 in + let e1, env = term_to_exp env ctx1 t1 in + let e2, env = term_to_exp env ctx2 t2 in Options.warning ~source:(fst loc) ~once:true "@[missing guard for ensuring that@ %a is a valid pointer@]" d_term t; - (* the type of the result is the same than type of the pointer [e1], - whatever is [e2] *) - new_exp ~loc (BinOp(bop, e1, e2, typeOf e1)), env, false + new_exp ~loc (BinOp(bop, e1, e2, ty)), env, false | TCastE(ty, t) -> - let e, env = term_to_exp env (Ctype ty) t in + let e, env = term_to_exp env (Some ty) t in mkCast e ty, env, false | TAddrOf lv -> let lv, env = tlval_to_lval env lv in @@ -255,15 +270,16 @@ and context_insensitive_term_to_exp env t = | Tlambda _ -> Error.not_yet "functional" | TDataCons _ -> Error.not_yet "constructor" | Tif(t1, t2, t3) -> - let e1, env1 = term_to_exp env (Ctype intType) t1 in - let ty = Typing.principal_type_from_term t2 t3 in - let (_, env2 as res2) = term_to_exp (Env.push env1) ty t2 in - let res3 = term_to_exp (Env.push env2) ty t3 in + let e1, env1 = term_to_exp env (Some intType) t1 in + let ty = Typing.principal_type t2 t3 in + let ctx = Some ty in + let (_, env2 as res2) = term_to_exp (Env.push env1) ctx t2 in + let res3 = term_to_exp (Env.push env2) ctx t3 in let e, env = conditional_to_exp loc ty e1 res2 res3 in e, env, false | Tat(t', label) -> (* convert [t'] to [e] in a separated local env *) - let e, env = term_to_exp (Env.push env) t'.term_type t' in + let e, env = term_to_exp (Env.push env) None t' in at_to_exp env (Some t) label e | Tbase_addr _ -> Error.not_yet "\\base_addr" | Tblock_length _ -> Error.not_yet "\\block_length" @@ -285,27 +301,23 @@ and context_insensitive_term_to_exp env t = constructs. *) and term_to_exp env ctx t = let e, env, is_mpz_string = context_insensitive_term_to_exp env t in - Typing.context_sensitive ~loc:t.term_loc env ctx is_mpz_string (Some t) e + match ctx with + | None -> e, env + | Some ty -> + Typing.context_sensitive ~loc:t.term_loc env ty is_mpz_string (Some t) e (* generate the C code equivalent to [t1 bop t2]. *) and comparison_to_exp ?(loc=Location.unknown) ?e1 env bop t1 t2 t_opt = - let ctx = match e1 with - | None -> Typing.principal_type_from_term t1 t2 - | Some(_, ctx) -> - (* Options.feedback "principality oriented by %a" d_logic_type ctx;*) - Typing.principal_type_from_term { t1 with term_type = ctx } t2 + let e1, env, ctx = match e1 with + | None -> + let ctx = Typing.principal_type t1 t2 in + let e1, env = term_to_exp env (Some ctx) t1 in + e1, env, ctx + | Some(e1, ctx) -> + e1, env, ctx in - (* Options.feedback "principal type of %a and %a is %a" - d_term t1 d_term t2 d_logic_type ctx;*) - let e1, env = match e1 with - | None -> term_to_exp env ctx t1 - | Some(e1, ctx1) when Cil_datatype.Logic_type.equal ctx ctx1 -> e1, env - | Some(e1, _) -> - Typing.context_sensitive ~loc:e1.eloc env ctx false (Some t1) e1 - in - let e2, env = term_to_exp env ctx t2 in - match ctx with - | Linteger -> + let e2, env = term_to_exp env (Some ctx) t2 in + if Mpz.is_t ctx then let e, env = Env.new_var env @@ -314,7 +326,7 @@ and comparison_to_exp ?(loc=Location.unknown) ?e1 env bop t1 t2 t_opt = (fun v _ -> [ Misc.mk_call ~result:(var v) "__gmpz_cmp" [ e1; e2 ] ]) in new_exp ?loc (BinOp(bop, e, zero ?loc, intType)), env - | _ -> + else new_exp ?loc (BinOp(bop, e1, e2, intType)), env and at_to_exp env t_opt label e = @@ -379,19 +391,19 @@ let rec named_predicate_to_exp env p = let e, env = comparison_to_exp ~loc env (relation_to_binop rel) t1 t2 None in - Typing.context_sensitive ~loc env (Ctype intType) false None e + Typing.context_sensitive ~loc env intType false None e | Pand(p1, p2) -> (* p1 && p2 <==> if p1 then p2 else false *) let e1, env1 = named_predicate_to_exp env p1 in let _, env2 as res2 = named_predicate_to_exp (Env.push env1) p2 in let env3 = Env.push env2 in - conditional_to_exp loc (Ctype intType) e1 res2 (zero loc, env3) + conditional_to_exp loc intType e1 res2 (zero loc, env3) | Por(p1, p2) -> (* p1 || p2 <==> if p1 then true else p2 *) let e1, env1 = named_predicate_to_exp env p1 in let env' = Env.push env1 in let res2 = named_predicate_to_exp (Env.push env') p2 in - conditional_to_exp loc (Ctype intType) e1 (one loc, env') res2 + conditional_to_exp loc intType e1 (one loc, env') res2 | Pxor _ -> Error.not_yet "xor" | Pimplies(p1, p2) -> (* (p1 ==> p2) <==> !p1 || p2 *) @@ -409,10 +421,10 @@ let rec named_predicate_to_exp env p = let e, env = named_predicate_to_exp env p in new_exp ~loc (UnOp(LNot, e, intType)), env | Pif(t, p2, p3) -> - let e1, env1 = term_to_exp env (Ctype intType) t in + let e1, env1 = term_to_exp env (Some intType) t in let (_, env2 as res2) = named_predicate_to_exp (Env.push env1) p2 in let res3 = named_predicate_to_exp (Env.push env2) p3 in - conditional_to_exp loc (Ctype intType) e1 res2 res3 + conditional_to_exp loc intType e1 res2 res3 | Plet _ -> Error.not_yet "let _ = _ in _" | Pforall _ | Pexists _ -> Quantif.quantif_to_exp env p | Pat(p, label) -> -- GitLab