From 87969dbc7236b643333dfd033a558af29f28cb1c Mon Sep 17 00:00:00 2001 From: Julien Signoles <julien.signoles@cea.fr> Date: Wed, 16 Nov 2011 09:16:10 +0000 Subject: [PATCH] [e-acsl] full reimplementation of environment [e-acsl] support of \at for stmt labels --- src/plugins/e-acsl/TODO | 1 - src/plugins/e-acsl/env.ml | 275 +++--- src/plugins/e-acsl/env.mli | 92 +- src/plugins/e-acsl/main.ml | 2 +- src/plugins/e-acsl/mpz.ml | 26 +- src/plugins/e-acsl/mpz.mli | 2 +- src/plugins/e-acsl/share/e-acsl/e_acsl_gmp.h | 6 +- src/plugins/e-acsl/tests/e-acsl-runtime/at.i | 18 + .../e-acsl/tests/e-acsl-runtime/lazy.i | 2 +- .../tests/e-acsl-runtime/nested_code_annot.i | 1 + .../e-acsl-runtime/oracle/addrOf.res.oracle | 2 +- .../e-acsl-runtime/oracle/arith.res.oracle | 795 ++++++++--------- .../e-acsl-runtime/oracle/array.res.oracle | 24 +- .../tests/e-acsl-runtime/oracle/at.err.oracle | 0 .../tests/e-acsl-runtime/oracle/at.res.oracle | 284 ++++++ .../e-acsl-runtime/oracle/cast.res.oracle | 38 +- .../oracle/comparison.res.oracle | 263 +++--- .../oracle/function_contract.res.oracle | 659 +++++++------- .../tests/e-acsl-runtime/oracle/gen_arith.c | 313 ++++--- .../e-acsl-runtime/oracle/gen_comparison.c | 37 +- .../oracle/gen_function_contract.c | 261 +++--- .../oracle/gen_integer_constant.c | 10 +- .../tests/e-acsl-runtime/oracle/gen_lazy.c | 223 ++--- .../oracle/gen_nested_code_annot.c | 91 +- .../oracle/gen_other_constants.c | 13 +- .../tests/e-acsl-runtime/oracle/gen_ptr.c | 62 +- .../tests/e-acsl-runtime/oracle/gen_sizeof.c | 3 +- .../e-acsl-runtime/oracle/gen_stmt_contract.c | 450 +++++----- .../oracle/integer_constant.res.oracle | 42 +- .../e-acsl-runtime/oracle/lazy.res.oracle | 367 ++++---- .../oracle/nested_code_annot.res.oracle | 200 ++--- .../e-acsl-runtime/oracle/not.res.oracle | 2 +- .../e-acsl-runtime/oracle/null.res.oracle | 2 +- .../oracle/other_constants.res.oracle | 47 +- .../e-acsl-runtime/oracle/ptr.res.oracle | 443 +++++---- .../e-acsl-runtime/oracle/sizeof.res.oracle | 49 +- .../oracle/stmt_contract.res.oracle | 838 ++++++++---------- .../e-acsl-runtime/oracle/true.res.oracle | 2 +- src/plugins/e-acsl/visit.ml | 418 +++++---- 39 files changed, 3240 insertions(+), 3123 deletions(-) create mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/at.i create mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.err.oracle create mode 100644 src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.res.oracle diff --git a/src/plugins/e-acsl/TODO b/src/plugins/e-acsl/TODO index af4ca2c13f3..4e5823c9269 100644 --- a/src/plugins/e-acsl/TODO +++ b/src/plugins/e-acsl/TODO @@ -25,7 +25,6 @@ # TESTS # ######### -- stmt_contracts et only_behaviors... pas sur que je fasse ce qu'il faut - tester plusieurs fonctions contenant des annotations - améliorer test "integer_constant.i" quand bug fixed #745 - test sizeof.i devraient être plus précis quand logic_typing plus précis diff --git a/src/plugins/e-acsl/env.ml b/src/plugins/e-acsl/env.ml index f162204e1a6..852fc4d3351 100644 --- a/src/plugins/e-acsl/env.ml +++ b/src/plugins/e-acsl/env.ml @@ -23,64 +23,63 @@ open Cil_types open Cil_datatype open Cil -let self = ref State.dummy +let global_state = ref State.dummy -let queue = ref (Queue.create ()) -let register_actions_queue q = queue := q +type mpz_tbl = { + new_exps: exp Term.Map.t; (* generated mpz variables as exp from terms *) + clear_stmts: stmt list; (* stmts freeing the memory before exiting the + block *) +} + +type block_info = { + new_block_vars: varinfo list; (* generated variables local to the block *) + new_stmts: stmt list; (* generated stmts to put at the beginning of the + block *) +} + +type local_env = { block_info: block_info; mpz_tbl: mpz_tbl } type t = - { var_cpt: int; (* counter used for generating variables in a function *) - fct_vars: Varinfo.Set.t; (* generated variables local to a function. - Use a set to prevent to add twice a variable - when merging. *) - block_vars: varinfo list; (* generated variables local to a block. - Subset of field [vars] *) - beginning_of_block: stmt list; (* list of stmts to be inserted before the - visiting node *) - end_of_block: stmt list (* list of stmts to be inserted after the visiting - node *) } - -let empty = - { var_cpt = 0; - fct_vars = Varinfo.Set.empty; - block_vars = []; - beginning_of_block = []; - end_of_block = [] } - -let no_overlap ~from env = - { env with var_cpt = Extlib.max_cpt from.var_cpt env.var_cpt } - -let merge_function_vars ~from env = - { env with - var_cpt = from.var_cpt; - fct_vars = Varinfo.Set.union env.fct_vars from.fct_vars } - -let merge_block_vars ~from env = - let env = merge_function_vars ~from env in - { env with block_vars = env.block_vars @ from.block_vars } - -let is_empty_block env = - if env.beginning_of_block = [] then begin - assert (env.end_of_block = [] && env.block_vars = []); - true - end else - false - -let is_empty env = env.var_cpt = 0 && is_empty_block env - -let add_stmt env s = - { env with beginning_of_block = s :: env.beginning_of_block } - -let add_assert kf s p = - Queue.add - (fun () -> - Annotations.add_assert kf s [ !self ] p) - !queue - -let new_var env ty mk_stmts = + { visitor: Visitor.frama_c_visitor; + new_global_vars: varinfo list; (* generated variables at function + level *) + global_mpz_tbl: mpz_tbl; + env_stack: local_env list; + cpt: int; (* counter used when generating variables *) } + +let empty_block = + { new_block_vars = []; + new_stmts = [] } + +let empty_mpz_tbl = + { new_exps = Term.Map.empty; + clear_stmts = [] } + +let dummy = + { visitor = new Visitor.frama_c_inplace; + new_global_vars = []; + global_mpz_tbl = empty_mpz_tbl; + env_stack = []; + cpt = 0 } + +let empty v = + { visitor = v; + new_global_vars = []; + global_mpz_tbl = empty_mpz_tbl; + env_stack = []; + cpt = 0 } + +let top env = match env.env_stack with [] -> assert false | hd :: tl -> hd, tl + +(* eta-expansion required for typing generalisation *) +let acc_list_rev acc l = List.fold_left (fun acc x -> x :: acc) acc l + +let do_new_var ?(global=false) env t ty mk_stmts = + let local_env, tl_env = top env in + let local_block = local_env.block_info in let is_t = Mpz.is_t ty in if is_t then Mpz.is_now_referenced (); - let n = succ env.var_cpt in + let n = succ env.cpt in let v = makeVarinfo ~logic:false @@ -90,62 +89,128 @@ let new_var env ty mk_stmts = ("e_acsl_" ^ string_of_int n) ty in +(* Options.feedback "new variable %a (global? %b)" Varinfo.pretty v global;*) let e = Misc.new_lval v in let stmts = mk_stmts v e in - e, - { var_cpt = n; - fct_vars = Varinfo.Set.add v env.fct_vars; - block_vars = v :: env.block_vars; - beginning_of_block = - List.fold_left (fun l s -> s :: l) env.beginning_of_block stmts; - end_of_block = - if is_t then Mpz.clear e :: env.end_of_block else env.end_of_block } - -let new_var_and_mpz_init env mk_stmts = - new_var env Mpz.t (fun v e -> Mpz.init e :: mk_stmts v e) - -let generated_function_variables env = - List.sort - (fun v1 v2 -> String.compare v1.vname v2.vname) - (Varinfo.Set.elements env.fct_vars) - -let generated_block_variables env = List.rev env.block_vars - -let block env s = + let new_stmts = acc_list_rev local_block.new_stmts stmts in + let new_block_vars = + if global then local_block.new_block_vars + else v :: local_block.new_block_vars + in + let new_block = { new_block_vars = new_block_vars; new_stmts = new_stmts } in + e, + if is_t then + let extend_tbl tbl = +(* Options.feedback "memoizing %a for term %a" + Varinfo.pretty v (fun fmt t -> match t with None -> Format.fprintf fmt + "NONE" | Some t -> Term.pretty fmt t) t;*) + { clear_stmts = Mpz.clear e :: tbl.clear_stmts; + new_exps = match t with + | None -> tbl.new_exps + | Some t -> Term.Map.add t e tbl.new_exps } + in + if global then + let local_env = { local_env with block_info = new_block } in + (* also memoise the new variable, but must never be used *) + { env with + cpt = n; + new_global_vars = v :: env.new_global_vars; + global_mpz_tbl = extend_tbl env.global_mpz_tbl; + env_stack = local_env :: tl_env } + else + let local_env = + { block_info = new_block; mpz_tbl = extend_tbl local_env.mpz_tbl } + in + { env with cpt = n; env_stack = local_env :: tl_env } + else + let new_global_vars = + if global then v :: env.new_global_vars + else env.new_global_vars + in + { env with + new_global_vars = new_global_vars; + cpt = n; + env_stack = { local_env with block_info = new_block } :: tl_env } + +exception No_term + +let new_var ?(global=false) env t ty mk_stmts = + let local_env, _ = top env in + if global then + (* do not use memoisation here: it is incorrect for terms corresponding to + impure expressions *) + do_new_var ~global env t ty mk_stmts + else + try + match t with + | None -> raise No_term + | 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 + +let new_var_and_mpz_init ?global env t mk_stmts = + new_var ?global env t Mpz.t (fun v e -> Mpz.init e :: mk_stmts v e) + +let current_kf env = + let v = env.visitor in + match v#current_kf with + | None -> None + | Some kf -> Some (Cil.get_kernel_function v#behavior kf) + +let get_visitor env = env.visitor + +let add_assert env stmt annot = + match current_kf env with + | None -> assert false (* TODO: ??? *) + | Some kf -> + Queue.add + (fun () -> Annotations.add_assert kf stmt [ !global_state ] annot) + env.visitor#get_filling_actions + +let add_stmt env stmt = + let local_env, tl = top env in + let block = local_env.block_info in + let block = { block with new_stmts = stmt :: block.new_stmts } in + { env with env_stack = { local_env with block_info = block } :: tl } + +let push env = + (* Options.feedback "push";*) + let local_env = { block_info = empty_block; mpz_tbl = empty_mpz_tbl } in + { env with env_stack = local_env :: env.env_stack } + +let pop env = +(* Options.feedback "pop";*) + let _, tl = top env in + { env with env_stack = tl } + +type where = Before | Middle | After +let pop_and_get env stmt ~global_clear where = +(* Options.feedback "pop_and_get";*) + let local_env, tl = top env in + let clear = + if global_clear then + env.global_mpz_tbl.clear_stmts @ local_env.mpz_tbl.clear_stmts + else + local_env.mpz_tbl.clear_stmts + in +(* Options.feedback "clearing %d mpz (must_clear: %b)" + (List.length clear) must_clear;*) + let block = local_env.block_info in let b = - mkBlock - (List.rev env.beginning_of_block @ [ s ] @ List.rev env.end_of_block) + let new_s = block.new_stmts in + let stmts = match where with + | Before -> stmt :: acc_list_rev (List.rev clear) new_s + | Middle -> acc_list_rev (stmt :: List.rev clear) new_s + | After -> acc_list_rev (acc_list_rev [ stmt ] clear) new_s + in + mkBlock stmts in - b.blocals <- b.blocals @ List.rev env.block_vars; - b - -let block_as_stmt env s = - if is_empty_block env then s else mkStmt ~valid_sid:true (Block (block env s)) - -let block_option env s = - if is_empty_block env then None else Some (block env s) - -let close_block_option env = - block_option env (mkStmt ~valid_sid:true (Instr (Skip Location.unknown))) - -let pretty fmt env = - Format.fprintf fmt "CPT = %d@\n" env.var_cpt; - Format.fprintf fmt "FCT_VARS = %t@\n" - (fun fmt -> - Varinfo.Set.iter (fun v -> Format.fprintf fmt "v%d " v.vid) env.fct_vars); - Format.fprintf fmt "BLOCK_VARS = %t@\n" - (fun fmt -> - List.iter (fun v -> Format.fprintf fmt "v%d " v.vid) env.block_vars); - Format.fprintf fmt "BEGIN BLOCK = %t@\n" - (fun fmt -> - List.iter - (fun s -> Format.fprintf fmt "%a@\n" d_stmt s) - env.beginning_of_block); - Format.fprintf fmt "EBD BLOCK = %t@." - (fun fmt -> - List.iter - (fun s -> Format.fprintf fmt "%a@\n" d_stmt s) - env.end_of_block) +(* List.iter (fun v -> Options.feedback "new_block_vars %a" Varinfo.pretty v) + block.new_block_vars;*) + b.blocals <- acc_list_rev b.blocals block.new_block_vars; + b, { env with env_stack = tl } + +let get_generated_variables env = List.rev env.new_global_vars (* Local Variables: diff --git a/src/plugins/e-acsl/env.mli b/src/plugins/e-acsl/env.mli index e67bdad8e3d..48372d074a3 100644 --- a/src/plugins/e-acsl/env.mli +++ b/src/plugins/e-acsl/env.mli @@ -26,77 +26,57 @@ open Cil_types Environments handle all the new C constructs (variables, statements and annotations. *) -val self: State.t ref +val global_state: State.t ref +(** reference to the E-ACSL global state. Not defined here, yet required *) type t -val empty: t +val dummy: t +val empty: Visitor.frama_c_visitor -> t -val new_var: - t -> typ -> (varinfo -> exp (* the var as exp *) -> stmt list) -> exp * t - (** [new_var env ty mk_stmts] extends [env] with a fresh variable of type - [ty]. - @return this variable as a C expression already initialized by applying it - to [mk_stmts]. *) +val new_var: + ?global:bool -> t -> term option -> typ -> + (varinfo -> exp (* the var as exp *) -> stmt list) + -> exp * t +(** [new_var env t ty mk_stmts] extends [env] with a fresh variable of type + [ty] corresponding to [t]. [global] indicates whether the new variable is + global to the current function or local to the local block (default is + [false], i.e. local). + @return this variable as a C expression already initialized by applying it + to [mk_stmts]. *) val new_var_and_mpz_init: - t -> (varinfo -> exp (* the var as exp *) -> stmt list) -> exp * t - (** Same as [new_var], but dedicated to mpz_t variables initialized by - {!Mpz.init}. *) - -val no_overlap: from:t -> t -> t - (** [no_overlap ~from env] returns env, but ensures that new generated - variables will not overlap with those of [from]. *) - -val merge_function_vars: from:t -> t -> t -(** [merge_function_vars ~from env] copies the generated variables local to the - visited function of [from] to [env]. Assume that there is no overlaping - between [from] and [env]. *) - -val merge_block_vars: from:t -> t -> t -(** Like [merge_function_vars] for generated variables local to the built - block. *) + ?global:bool -> t -> term option -> + (varinfo -> exp (* the var as exp *) -> stmt list) + -> exp * t +(** Same as [new_var], but dedicated to mpz_t variables initialized by + {!Mpz.init}. *) val add_stmt: t -> stmt -> t (** [add_stmt env s] extends [env] with the new statement [s] *) -val add_assert: kernel_function -> stmt -> predicate named -> unit - (** [add_assert kf s p] extends the global environment with an assertion [p] - associated to the statement [s] in function [kf]. *) +val add_assert: t -> stmt -> predicate named -> unit +(** [add_assert kf s p] extends the global environment with an assertion [p] + associated to the statement [s] in function [kf]. *) -val register_actions_queue: (unit -> unit) Queue.t -> unit - (** To be called once at initialization time: the queue of event of the - visitor required for generating annotations. *) +val push: t -> t +(** Push a new local context in the environment *) -val generated_function_variables: t -> varinfo list -(** All the new variables local to the visited function. *) - -val generated_block_variables: t -> varinfo list -(** All the new variables local to the block being built. *) - -val block: t -> stmt -> block - (** [block env s] returns the block of statements including [s] and the new - constructs of [env]. *) - -val block_as_stmt: t -> stmt -> stmt -(** Like [block], but generate the block as a stmt *) +type where = Before | Middle | After +val pop_and_get: t -> stmt -> global_clear:bool -> where -> block * t +(* Pop the last local context and get back the corresponding new block + containing the given [stmt] at the given place ([Before] is before the + code corresponding to annotations, [After] is after this code and [Middle] is + between the stmt corresponding to annotations and the ones for freeing the + memory. *) -val block_option: t -> stmt -> block option - (** [block_option env s] returns the block of statements including [s] and the - new constructs of [env], if any. *) +val pop: t -> t +(* Pop the last local context (ignore the corresponding new block if any *) -val close_block_option: t -> block option - (** like [block_option] but includes no additional statement: only include the - new constructs of [env], if any. *) - -val is_empty: t -> bool - (** Is the given environment empty? *) - -val is_empty_block: t -> bool - (** Does the given environment not contain new statements? *) +val get_generated_variables: t -> varinfo list +(** All the new variables local to the visited function. *) -val pretty: Format.formatter -> t -> unit -(** Debugging purpose *) +val get_visitor: t -> Visitor.generic_frama_c_visitor (* Local Variables: diff --git a/src/plugins/e-acsl/main.ml b/src/plugins/e-acsl/main.ml index 7c72728192e..1e0c8ed4ad1 100644 --- a/src/plugins/e-acsl/main.ml +++ b/src/plugins/e-acsl/main.ml @@ -59,7 +59,7 @@ module Resulting_projects = [ Ast.self; Options.Include_headers.self; Options.Use_assert.self ] end) -let () = Env.self := Resulting_projects.self +let () = Env.global_state := Resulting_projects.self let generate_code = Resulting_projects.memo diff --git a/src/plugins/e-acsl/mpz.ml b/src/plugins/e-acsl/mpz.ml index ddbf04f3432..6bb79500272 100644 --- a/src/plugins/e-acsl/mpz.ml +++ b/src/plugins/e-acsl/mpz.ml @@ -39,18 +39,22 @@ let init = apply_on_var "init" let clear = apply_on_var "clear" let init_set v e = - let fname, args = match typeOf e with - | TInt((IBool | IChar | IUChar | IUInt | IUShort | IULong), _) -> - "ui", [ e ] - | TInt((ISChar | IShort | IInt | ILong), _) -> "si", [ e ] - | TInt((ILongLong | IULongLong), _) -> assert false - | TPtr(TInt(IChar, _), _) -> - "str", + let ty = typeOf e in + if is_t ty then + Misc.mk_call "mpz_init_set" [ v; e ] + else + let fname, args = match ty with + | TInt((IBool | IChar | IUChar | IUInt | IUShort | IULong), _) -> + "ui", [ e ] + | TInt((ISChar | IShort | IInt | ILong), _) -> "si", [ e ] + | TInt((ILongLong | IULongLong), _) -> assert false + | TPtr(TInt(IChar, _), _) -> + "str", (* decimal base for the number given as string *) - [ e; integer ~loc:Location.unknown 10 ] - | _ -> assert false - in - Misc.mk_call ("mpz_init_set_" ^ fname) (v :: args) + [ e; integer ~loc:Location.unknown 10 ] + | _ -> assert false + in + Misc.mk_call ("mpz_init_set_" ^ fname) (v :: args) (* Local Variables: diff --git a/src/plugins/e-acsl/mpz.mli b/src/plugins/e-acsl/mpz.mli index 01d3a5955be..2c62c035385 100644 --- a/src/plugins/e-acsl/mpz.mli +++ b/src/plugins/e-acsl/mpz.mli @@ -36,7 +36,7 @@ val init: exp -> stmt (** build stmt "mpz_init(v)" *) val init_set: exp -> exp -> stmt - (** build stmt "mpz_init_set_*(v, e)" with the good function 'set' according + (** build stmt "mpz_init_set*(v, e)" with the good function 'set' according to the type of e *) val clear: exp -> stmt diff --git a/src/plugins/e-acsl/share/e-acsl/e_acsl_gmp.h b/src/plugins/e-acsl/share/e-acsl/e_acsl_gmp.h index 690706017bb..f9a3f179ca4 100644 --- a/src/plugins/e-acsl/share/e-acsl/e_acsl_gmp.h +++ b/src/plugins/e-acsl/share/e-acsl/e_acsl_gmp.h @@ -11,10 +11,14 @@ extern void mpz_init(mpz_t x); /*@ ensures \valid(z); @ assigns *z; */ +extern void mpz_init_set(mpz_t z, const mpz_t z_orig); + +/*@ ensures \valid(z); + @ assigns *z \from n; */ extern void mpz_init_set_ui(mpz_t z, unsigned long int n); /*@ ensures \valid(z); - @ assigns *z; */ + @ assigns *z \from n; */ extern void mpz_init_set_si(mpz_t z, signed long int n); /*@ ensures \valid(z); diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/at.i b/src/plugins/e-acsl/tests/e-acsl-runtime/at.i new file mode 100644 index 00000000000..acb467ed941 --- /dev/null +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/at.i @@ -0,0 +1,18 @@ +/* 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-project p -e-acsl-include-headers -then-on p -print -ocode ./tests/e-acsl-runtime/result/gen_at.c > /dev/null && gcc -o ./tests/e-acsl-runtime/result/gen_at.out -lgmp ./tests/e-acsl-runtime/result/gen_at.c && ./tests/e-acsl-runtime/result/gen_at.out +*/ + +int main(void) { + + int x; + + x = 0; + L: /*@ assert x == 0; */ x = 1; + x = 2; + /*@ assert \at(x,L) == 0; */ + /*@ assert \at(x+1,L) == 1; */ + /*@ assert \at(x,L)+1 == 1; */ + + return 0; +} diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/lazy.i b/src/plugins/e-acsl/tests/e-acsl-runtime/lazy.i index 4c8ebbd755e..8faa4e72823 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/lazy.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/lazy.i @@ -7,7 +7,7 @@ int main(void) { int x = 0, y = 1; /*@ assert x == 0 && y == 1; */ /*@ assert ! (x != 0 && y == 1/0); */ - /*@ assert x == 1 || y == 1; */ + /*@ assert y == 1 || x == 1; */ /*@ assert x == 0 || y == 1/0; */ /*@ assert x == 0 ==> y == 1; */ /*@ assert x == 1 ==> y == 1/0; */ diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/nested_code_annot.i b/src/plugins/e-acsl/tests/e-acsl-runtime/nested_code_annot.i index b2f9eddb638..3b524ce7828 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/nested_code_annot.i +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/nested_code_annot.i @@ -22,4 +22,5 @@ int main(void) { else /*@ assert \false; */ ; } } + return 0; } 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 706fb2340be..ba7dde236b7 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 @@ -2,7 +2,7 @@ [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization -PROJECT_FILE.i:132:[value] Assertion got status valid. +PROJECT_FILE.i:136:[value] Assertion got status valid. [value] Recording results for main [value] done for function main [value] ====== VALUES COMPUTED ====== 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 ccbd44262d0..781df5b3ebc 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 @@ -3,572 +3,536 @@ [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization -PROJECT_FILE.i:134:[value] Assertion got status valid. +PROJECT_FILE.i:138:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:136. -PROJECT_FILE.i:29:[value] Function mpz_init_set_si: postcondition got status valid. + Called from PROJECT_FILE.i:140. +PROJECT_FILE.i:33:[value] Function mpz_init_set_si: postcondition got status valid. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:136. + Called from PROJECT_FILE.i:140. PROJECT_FILE.i:21:[value] Function mpz_init: postcondition got status valid. [value] Done for function mpz_init [value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:137. -PROJECT_FILE.i:55:[value] Function mpz_neg: precondition got status valid. -PROJECT_FILE.i:56:[value] Function mpz_neg: precondition got status valid. + Called from PROJECT_FILE.i:141. +PROJECT_FILE.i:59:[value] Function mpz_neg: precondition got status valid. +PROJECT_FILE.i:60:[value] Function mpz_neg: precondition got status valid. [value] Done for function mpz_neg [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:137. + Called from PROJECT_FILE.i:141. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:138. -PROJECT_FILE.i:45:[value] Function mpz_cmp: precondition got status valid. -PROJECT_FILE.i:46:[value] Function mpz_cmp: precondition got status valid. + Called from PROJECT_FILE.i:142. +PROJECT_FILE.i:49:[value] Function mpz_cmp: precondition got status valid. +PROJECT_FILE.i:50:[value] Function mpz_cmp: precondition got status valid. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:139. + Called from PROJECT_FILE.i:143. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. -PROJECT_FILE.i:115:[value] Function exit: postcondition got status invalid. + Called from PROJECT_FILE.i:129. +PROJECT_FILE.i:119:[value] Function exit: postcondition got status invalid. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:140. -PROJECT_FILE.i:39:[value] Function mpz_clear: precondition got status valid. + Called from PROJECT_FILE.i:143. +PROJECT_FILE.i:43:[value] Function mpz_clear: precondition got status valid. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:140. + Called from PROJECT_FILE.i:144. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:140. + Called from PROJECT_FILE.i:144. [value] Done for function mpz_clear -PROJECT_FILE.i:143:[value] Assertion got status valid. +PROJECT_FILE.i:147:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:145. + Called from PROJECT_FILE.i:149. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:145. + Called from PROJECT_FILE.i:149. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:146. + Called from PROJECT_FILE.i:150. [value] Done for function mpz_init [value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:146. + Called from PROJECT_FILE.i:150. [value] Done for function mpz_neg [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:147. + Called from PROJECT_FILE.i:151. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:148. + Called from PROJECT_FILE.i:152. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:149. + Called from PROJECT_FILE.i:152. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:149. + Called from PROJECT_FILE.i:153. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:149. + Called from PROJECT_FILE.i:153. [value] Done for function mpz_clear -PROJECT_FILE.i:152:[value] Assertion got status valid. -[value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:154. -[value] Done for function mpz_init_set_si +PROJECT_FILE.i:156:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:154. + Called from PROJECT_FILE.i:158. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:155. + Called from PROJECT_FILE.i:158. [value] Done for function mpz_init [value] computing for function mpz_com <- main. - Called from PROJECT_FILE.i:155. + Called from PROJECT_FILE.i:159. [kernel] warning: No code for function mpz_com, default assigns generated [value] Done for function mpz_com [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:156. + Called from PROJECT_FILE.i:160. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:157. + Called from PROJECT_FILE.i:161. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:158. + Called from PROJECT_FILE.i:162. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:158. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:158. + Called from PROJECT_FILE.i:162. [value] Done for function mpz_clear -PROJECT_FILE.i:161:[value] Assertion got status valid. +PROJECT_FILE.i:165:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:163. + Called from PROJECT_FILE.i:167. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:164. + Called from PROJECT_FILE.i:168. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:164. + Called from PROJECT_FILE.i:168. [value] Done for function mpz_init [value] computing for function mpz_add <- main. - Called from PROJECT_FILE.i:165. -PROJECT_FILE.i:60:[value] Function mpz_add: precondition got status valid. -PROJECT_FILE.i:61:[value] Function mpz_add: precondition got status valid. -PROJECT_FILE.i:62:[value] Function mpz_add: precondition got status valid. + Called from PROJECT_FILE.i:169. +PROJECT_FILE.i:64:[value] Function mpz_add: precondition got status valid. +PROJECT_FILE.i:65:[value] Function mpz_add: precondition got status valid. +PROJECT_FILE.i:66:[value] Function mpz_add: precondition got status valid. [value] Done for function mpz_add [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:165. + Called from PROJECT_FILE.i:169. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:166. + Called from PROJECT_FILE.i:170. [value] Done for function mpz_init [value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:166. + Called from PROJECT_FILE.i:170. [value] Done for function mpz_neg [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:167. + Called from PROJECT_FILE.i:171. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:168. + Called from PROJECT_FILE.i:172. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:169. + Called from PROJECT_FILE.i:173. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:169. + Called from PROJECT_FILE.i:173. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:169. + Called from PROJECT_FILE.i:173. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:170. + Called from PROJECT_FILE.i:174. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:170. + Called from PROJECT_FILE.i:174. [value] Done for function mpz_clear -PROJECT_FILE.i:173:[value] Assertion got status valid. +PROJECT_FILE.i:177:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:175. + Called from PROJECT_FILE.i:179. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:176. + Called from PROJECT_FILE.i:180. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:176. + Called from PROJECT_FILE.i:180. [value] Done for function mpz_init [value] computing for function mpz_sub <- main. - Called from PROJECT_FILE.i:177. -PROJECT_FILE.i:66:[value] Function mpz_sub: precondition got status valid. -PROJECT_FILE.i:67:[value] Function mpz_sub: precondition got status valid. -PROJECT_FILE.i:68:[value] Function mpz_sub: precondition got status valid. + Called from PROJECT_FILE.i:181. +PROJECT_FILE.i:70:[value] Function mpz_sub: precondition got status valid. +PROJECT_FILE.i:71:[value] Function mpz_sub: precondition got status valid. +PROJECT_FILE.i:72:[value] Function mpz_sub: precondition got status valid. [value] Done for function mpz_sub [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:177. + Called from PROJECT_FILE.i:181. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:178. + Called from PROJECT_FILE.i:182. [value] Done for function mpz_init [value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:178. + Called from PROJECT_FILE.i:182. [value] Done for function mpz_neg [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:179. + Called from PROJECT_FILE.i:183. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:180. + Called from PROJECT_FILE.i:184. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:181. + Called from PROJECT_FILE.i:185. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:181. + Called from PROJECT_FILE.i:185. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:181. + Called from PROJECT_FILE.i:185. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:182. + Called from PROJECT_FILE.i:186. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:182. + Called from PROJECT_FILE.i:186. [value] Done for function mpz_clear -PROJECT_FILE.i:185:[value] Assertion got status valid. +PROJECT_FILE.i:189:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:187. + Called from PROJECT_FILE.i:191. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:188. + Called from PROJECT_FILE.i:192. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:188. + Called from PROJECT_FILE.i:192. [value] Done for function mpz_init [value] computing for function mpz_mul <- main. - Called from PROJECT_FILE.i:189. -PROJECT_FILE.i:72:[value] Function mpz_mul: precondition got status valid. -PROJECT_FILE.i:73:[value] Function mpz_mul: precondition got status valid. -PROJECT_FILE.i:74:[value] Function mpz_mul: precondition got status valid. + Called from PROJECT_FILE.i:193. +PROJECT_FILE.i:76:[value] Function mpz_mul: precondition got status valid. +PROJECT_FILE.i:77:[value] Function mpz_mul: precondition got status valid. +PROJECT_FILE.i:78:[value] Function mpz_mul: precondition got status valid. [value] Done for function mpz_mul [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:189. + Called from PROJECT_FILE.i:193. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:190. + Called from PROJECT_FILE.i:194. [value] Done for function mpz_init [value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:190. + Called from PROJECT_FILE.i:194. [value] Done for function mpz_neg [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:191. + Called from PROJECT_FILE.i:195. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:192. + Called from PROJECT_FILE.i:196. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:193. + Called from PROJECT_FILE.i:197. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:193. + Called from PROJECT_FILE.i:197. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:193. + Called from PROJECT_FILE.i:197. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:194. + Called from PROJECT_FILE.i:198. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:194. + Called from PROJECT_FILE.i:198. [value] Done for function mpz_clear -PROJECT_FILE.i:197:[value] Assertion got status valid. +PROJECT_FILE.i:201:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:200. + Called from PROJECT_FILE.i:204. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:200. + Called from PROJECT_FILE.i:204. [value] Done for function mpz_init_set_si [value] computing for function mpz_get_si <- main. - Called from PROJECT_FILE.i:201. -PROJECT_FILE.i:92:[value] Function mpz_get_si: precondition got status valid. + Called from PROJECT_FILE.i:205. +PROJECT_FILE.i:96:[value] Function mpz_get_si: precondition got status valid. [value] Done for function mpz_get_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:201. + Called from PROJECT_FILE.i:205. [value] Done for function mpz_init -PROJECT_FILE.i:202:[value] Assertion got status valid. +PROJECT_FILE.i:206:[value] Assertion got status valid. [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:203. + Called from PROJECT_FILE.i:207. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_cdiv_q <- main. - Called from PROJECT_FILE.i:204. -PROJECT_FILE.i:78:[value] Function mpz_cdiv_q: precondition got status valid. -PROJECT_FILE.i:79:[value] Function mpz_cdiv_q: precondition got status valid. -PROJECT_FILE.i:80:[value] Function mpz_cdiv_q: precondition got status valid. + Called from PROJECT_FILE.i:208. +PROJECT_FILE.i:82:[value] Function mpz_cdiv_q: precondition got status valid. +PROJECT_FILE.i:83:[value] Function mpz_cdiv_q: precondition got status valid. +PROJECT_FILE.i:84:[value] Function mpz_cdiv_q: precondition got status valid. [value] Done for function mpz_cdiv_q [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:204. + Called from PROJECT_FILE.i:208. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:205. + Called from PROJECT_FILE.i:209. [value] Done for function mpz_init [value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:205. + Called from PROJECT_FILE.i:209. [value] Done for function mpz_neg [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:206. + Called from PROJECT_FILE.i:210. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:207. + Called from PROJECT_FILE.i:211. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:208. + Called from PROJECT_FILE.i:212. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:208. + Called from PROJECT_FILE.i:212. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:208. + Called from PROJECT_FILE.i:212. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:209. + Called from PROJECT_FILE.i:213. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:209. + Called from PROJECT_FILE.i:213. [value] Done for function mpz_clear -PROJECT_FILE.i:212:[value] Assertion got status valid. +PROJECT_FILE.i:216:[value] Assertion got status valid. [value] computing for function mpz_init_set_str <- main. - Called from PROJECT_FILE.i:215. -PROJECT_FILE.i:33:[value] Function mpz_init_set_str: postcondition got status valid. -[value] Done for function mpz_init_set_str -[value] computing for function mpz_init_set_str <- main. - Called from PROJECT_FILE.i:216. + Called from PROJECT_FILE.i:219. +PROJECT_FILE.i:37:[value] Function mpz_init_set_str: postcondition got status valid. [value] Done for function mpz_init_set_str [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:217. + Called from PROJECT_FILE.i:220. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:217. + Called from PROJECT_FILE.i:221. [value] Done for function mpz_cmp [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:218. + Called from PROJECT_FILE.i:221. [value] Done for function mpz_init -PROJECT_FILE.i:219:[value] Assertion got status valid. +PROJECT_FILE.i:222:[value] Assertion got status valid. [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:220. + Called from PROJECT_FILE.i:223. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_cdiv_q <- main. - Called from PROJECT_FILE.i:221. + Called from PROJECT_FILE.i:224. [value] Done for function mpz_cdiv_q [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:221. + Called from PROJECT_FILE.i:224. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:222. + Called from PROJECT_FILE.i:225. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:224. + Called from PROJECT_FILE.i:227. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:225. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:225. + Called from PROJECT_FILE.i:228. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:225. + Called from PROJECT_FILE.i:228. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:226. + Called from PROJECT_FILE.i:228. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:226. + Called from PROJECT_FILE.i:229. [value] Done for function mpz_clear -PROJECT_FILE.i:229:[value] Assertion got status valid. +PROJECT_FILE.i:232:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:232. + Called from PROJECT_FILE.i:235. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:232. + Called from PROJECT_FILE.i:235. [value] Done for function mpz_init_set_si [value] computing for function mpz_get_si <- main. - Called from PROJECT_FILE.i:233. + Called from PROJECT_FILE.i:236. [value] Done for function mpz_get_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:233. + Called from PROJECT_FILE.i:236. [value] Done for function mpz_init -PROJECT_FILE.i:234:[value] Assertion got status valid. +PROJECT_FILE.i:237:[value] Assertion got status valid. [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:235. + Called from PROJECT_FILE.i:238. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_mod_ui <- main. - Called from PROJECT_FILE.i:236. + Called from PROJECT_FILE.i:239. [kernel] warning: No code for function mpz_mod_ui, default assigns generated [value] Done for function mpz_mod_ui [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:236. + Called from PROJECT_FILE.i:239. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:237. + Called from PROJECT_FILE.i:240. [value] Done for function mpz_init [value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:237. + Called from PROJECT_FILE.i:240. [value] Done for function mpz_neg [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:238. + Called from PROJECT_FILE.i:241. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:239. + Called from PROJECT_FILE.i:242. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:240. + Called from PROJECT_FILE.i:243. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:240. + Called from PROJECT_FILE.i:243. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:240. + Called from PROJECT_FILE.i:243. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:241. + Called from PROJECT_FILE.i:244. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:241. + Called from PROJECT_FILE.i:244. [value] Done for function mpz_clear -PROJECT_FILE.i:244:[value] Assertion got status valid. +PROJECT_FILE.i:247:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. + Called from PROJECT_FILE.i:251. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:249. + Called from PROJECT_FILE.i:252. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:250. + Called from PROJECT_FILE.i:252. [value] Done for function mpz_init [value] computing for function mpz_mul <- main. - Called from PROJECT_FILE.i:250. + Called from PROJECT_FILE.i:253. [value] Done for function mpz_mul [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:251. + Called from PROJECT_FILE.i:253. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:251. + Called from PROJECT_FILE.i:254. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:252. + Called from PROJECT_FILE.i:254. [value] Done for function mpz_init [value] computing for function mpz_add <- main. - Called from PROJECT_FILE.i:252. + Called from PROJECT_FILE.i:255. [value] Done for function mpz_add [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:253. + Called from PROJECT_FILE.i:255. [value] Done for function mpz_init [value] computing for function mpz_add <- main. - Called from PROJECT_FILE.i:253. + Called from PROJECT_FILE.i:256. [value] Done for function mpz_add [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:254. + Called from PROJECT_FILE.i:256. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:254. + Called from PROJECT_FILE.i:257. [value] Done for function mpz_init [value] computing for function mpz_sub <- main. - Called from PROJECT_FILE.i:255. + Called from PROJECT_FILE.i:257. [value] Done for function mpz_sub -[value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:255. -[value] Done for function mpz_init_set_si -[value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:256. -[value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:256. + Called from PROJECT_FILE.i:258. [value] Done for function mpz_init [value] computing for function mpz_sub <- main. - Called from PROJECT_FILE.i:257. + Called from PROJECT_FILE.i:258. [value] Done for function mpz_sub [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:257. + Called from PROJECT_FILE.i:259. [value] Done for function mpz_init [value] computing for function mpz_add <- main. - Called from PROJECT_FILE.i:258. + Called from PROJECT_FILE.i:259. [value] Done for function mpz_add [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:258. + Called from PROJECT_FILE.i:260. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:259. + Called from PROJECT_FILE.i:260. [value] Done for function mpz_init [value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:259. + Called from PROJECT_FILE.i:261. [value] Done for function mpz_neg [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:260. + Called from PROJECT_FILE.i:262. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:261. + Called from PROJECT_FILE.i:263. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:262. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:262. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:262. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:263. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:263. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:263. -[value] Done for function mpz_clear [value] computing for function mpz_clear <- main. Called from PROJECT_FILE.i:264. [value] Done for function mpz_clear @@ -596,79 +560,91 @@ PROJECT_FILE.i:244:[value] Assertion got status valid. [value] computing for function mpz_clear <- main. Called from PROJECT_FILE.i:266. [value] Done for function mpz_clear -PROJECT_FILE.i:269:[value] Assertion got status valid. -PROJECT_FILE.i:272:[value] Assertion got status valid. +[value] computing for function mpz_clear <- main. + Called from PROJECT_FILE.i:267. +[value] Done for function mpz_clear +[value] computing for function mpz_clear <- main. + Called from PROJECT_FILE.i:267. +[value] Done for function mpz_clear +[value] computing for function mpz_clear <- main. + Called from PROJECT_FILE.i:267. +[value] Done for function mpz_clear +[value] computing for function mpz_clear <- main. + Called from PROJECT_FILE.i:268. +[value] Done for function mpz_clear +PROJECT_FILE.i:271:[value] Assertion got status valid. +PROJECT_FILE.i:274:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:274. + Called from PROJECT_FILE.i:276. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:274. + Called from PROJECT_FILE.i:276. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:275. + Called from PROJECT_FILE.i:277. [value] Done for function mpz_init [value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:275. + Called from PROJECT_FILE.i:277. [value] Done for function mpz_neg [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:276. + Called from PROJECT_FILE.i:278. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:277. + Called from PROJECT_FILE.i:279. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:278. + Called from PROJECT_FILE.i:280. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:278. + Called from PROJECT_FILE.i:280. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:278. + Called from PROJECT_FILE.i:280. [value] Done for function mpz_clear -PROJECT_FILE.i:281:[value] Assertion got status valid. +PROJECT_FILE.i:283:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:283. + Called from PROJECT_FILE.i:285. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:283. + Called from PROJECT_FILE.i:285. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:284. + Called from PROJECT_FILE.i:286. [value] Done for function mpz_init [value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:284. + Called from PROJECT_FILE.i:286. [value] Done for function mpz_neg [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:285. + Called from PROJECT_FILE.i:287. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:287. + Called from PROJECT_FILE.i:289. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:288. + Called from PROJECT_FILE.i:290. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:288. + Called from PROJECT_FILE.i:290. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:288. + Called from PROJECT_FILE.i:290. [value] Done for function mpz_clear -PROJECT_FILE.i:291:[value] Assertion got status valid. -PROJECT_FILE.i:294:[value] Assertion got status valid. +PROJECT_FILE.i:293:[value] Assertion got status valid. +PROJECT_FILE.i:296:[value] Assertion got status valid. [value] Recording results for main [value] done for function main [value] ====== VALUES COMPUTED ====== @@ -690,7 +666,8 @@ typedef __mpz_struct mpz_t[1]; assigns *x; */ extern void mpz_init(__mpz_struct * /*[1]*/ x); /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void mpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ ensures \valid(\old(z)); assigns *z; */ @@ -799,189 +776,185 @@ int main(void) } /*@ assert 0 ≢ ~0; */ ; - { mpz_t e_acsl_9; mpz_t e_acsl_10; mpz_t e_acsl_11; int e_acsl_12; + { mpz_t e_acsl_9; mpz_t e_acsl_10; int e_acsl_11; mpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)0); - mpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)0); - mpz_init((__mpz_struct *)(e_acsl_11)); mpz_com(e_acsl_11,e_acsl_10); - e_acsl_12 = mpz_cmp((__mpz_struct const *)(e_acsl_9), - (__mpz_struct const *)(e_acsl_11)); - if (! (e_acsl_12 != 0)) { e_acsl_fail((char *)"(0 != ~0)"); } + mpz_init((__mpz_struct *)(e_acsl_10)); mpz_com(e_acsl_10,e_acsl_9); + e_acsl_11 = mpz_cmp((__mpz_struct const *)(e_acsl_9), + (__mpz_struct const *)(e_acsl_10)); + if (! (e_acsl_11 != 0)) { e_acsl_fail((char *)"(0 != ~0)"); } mpz_clear((__mpz_struct *)(e_acsl_9)); mpz_clear((__mpz_struct *)(e_acsl_10)); - mpz_clear((__mpz_struct *)(e_acsl_11)); } /*@ assert x+1 ≡ -2; */ ; - { mpz_t e_acsl_13; mpz_t e_acsl_14; mpz_t e_acsl_15; mpz_t e_acsl_16; - mpz_t e_acsl_17; int e_acsl_18; - mpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_14),(long)1); - mpz_init((__mpz_struct *)(e_acsl_15)); - mpz_add((__mpz_struct *)(e_acsl_15),(__mpz_struct const *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_14)); - mpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)2); - mpz_init((__mpz_struct *)(e_acsl_17)); - mpz_neg((__mpz_struct *)(e_acsl_17),(__mpz_struct const *)(e_acsl_16)); - e_acsl_18 = mpz_cmp((__mpz_struct const *)(e_acsl_15), - (__mpz_struct const *)(e_acsl_17)); - if (! (e_acsl_18 == 0)) { e_acsl_fail((char *)"(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; + mpz_init_set_si((__mpz_struct *)(e_acsl_12),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)1); + mpz_init((__mpz_struct *)(e_acsl_14)); + mpz_add((__mpz_struct *)(e_acsl_14),(__mpz_struct const *)(e_acsl_12), + (__mpz_struct const *)(e_acsl_13)); + mpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)2); + mpz_init((__mpz_struct *)(e_acsl_16)); + mpz_neg((__mpz_struct *)(e_acsl_16),(__mpz_struct const *)(e_acsl_15)); + e_acsl_17 = mpz_cmp((__mpz_struct const *)(e_acsl_14), + (__mpz_struct const *)(e_acsl_16)); + if (! (e_acsl_17 == 0)) { e_acsl_fail((char *)"(x+1 == -2)"); } + mpz_clear((__mpz_struct *)(e_acsl_12)); mpz_clear((__mpz_struct *)(e_acsl_13)); mpz_clear((__mpz_struct *)(e_acsl_14)); mpz_clear((__mpz_struct *)(e_acsl_15)); mpz_clear((__mpz_struct *)(e_acsl_16)); - mpz_clear((__mpz_struct *)(e_acsl_17)); } /*@ assert x-1 ≡ -4; */ ; - { mpz_t e_acsl_19; mpz_t e_acsl_20; mpz_t e_acsl_21; mpz_t e_acsl_22; - mpz_t e_acsl_23; int e_acsl_24; - mpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)1); - mpz_init((__mpz_struct *)(e_acsl_21)); - mpz_sub((__mpz_struct *)(e_acsl_21),(__mpz_struct const *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_20)); - mpz_init_set_si((__mpz_struct *)(e_acsl_22),(long)4); - mpz_init((__mpz_struct *)(e_acsl_23)); - mpz_neg((__mpz_struct *)(e_acsl_23),(__mpz_struct const *)(e_acsl_22)); - e_acsl_24 = mpz_cmp((__mpz_struct const *)(e_acsl_21), - (__mpz_struct const *)(e_acsl_23)); - if (! (e_acsl_24 == 0)) { e_acsl_fail((char *)"(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; + mpz_init_set_si((__mpz_struct *)(e_acsl_18),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)1); + mpz_init((__mpz_struct *)(e_acsl_20)); + mpz_sub((__mpz_struct *)(e_acsl_20),(__mpz_struct const *)(e_acsl_18), + (__mpz_struct const *)(e_acsl_19)); + mpz_init_set_si((__mpz_struct *)(e_acsl_21),(long)4); + mpz_init((__mpz_struct *)(e_acsl_22)); + mpz_neg((__mpz_struct *)(e_acsl_22),(__mpz_struct const *)(e_acsl_21)); + e_acsl_23 = mpz_cmp((__mpz_struct const *)(e_acsl_20), + (__mpz_struct const *)(e_acsl_22)); + if (! (e_acsl_23 == 0)) { e_acsl_fail((char *)"(x-1 == -4)"); } + mpz_clear((__mpz_struct *)(e_acsl_18)); mpz_clear((__mpz_struct *)(e_acsl_19)); mpz_clear((__mpz_struct *)(e_acsl_20)); mpz_clear((__mpz_struct *)(e_acsl_21)); mpz_clear((__mpz_struct *)(e_acsl_22)); - mpz_clear((__mpz_struct *)(e_acsl_23)); } /*@ assert x*3 ≡ -9; */ ; - { mpz_t e_acsl_25; mpz_t e_acsl_26; mpz_t e_acsl_27; mpz_t e_acsl_28; - mpz_t e_acsl_29; int e_acsl_30; - mpz_init_set_si((__mpz_struct *)(e_acsl_25),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)3); - mpz_init((__mpz_struct *)(e_acsl_27)); - mpz_mul((__mpz_struct *)(e_acsl_27),(__mpz_struct const *)(e_acsl_25), - (__mpz_struct const *)(e_acsl_26)); - mpz_init_set_si((__mpz_struct *)(e_acsl_28),(long)9); - mpz_init((__mpz_struct *)(e_acsl_29)); - mpz_neg((__mpz_struct *)(e_acsl_29),(__mpz_struct const *)(e_acsl_28)); - e_acsl_30 = mpz_cmp((__mpz_struct const *)(e_acsl_27), - (__mpz_struct const *)(e_acsl_29)); - if (! (e_acsl_30 == 0)) { e_acsl_fail((char *)"(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; + mpz_init_set_si((__mpz_struct *)(e_acsl_24),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_25),(long)3); + mpz_init((__mpz_struct *)(e_acsl_26)); + mpz_mul((__mpz_struct *)(e_acsl_26),(__mpz_struct const *)(e_acsl_24), + (__mpz_struct const *)(e_acsl_25)); + mpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)9); + mpz_init((__mpz_struct *)(e_acsl_28)); + mpz_neg((__mpz_struct *)(e_acsl_28),(__mpz_struct const *)(e_acsl_27)); + e_acsl_29 = mpz_cmp((__mpz_struct const *)(e_acsl_26), + (__mpz_struct const *)(e_acsl_28)); + if (! (e_acsl_29 == 0)) { e_acsl_fail((char *)"(x*3 == -9)"); } + mpz_clear((__mpz_struct *)(e_acsl_24)); mpz_clear((__mpz_struct *)(e_acsl_25)); mpz_clear((__mpz_struct *)(e_acsl_26)); mpz_clear((__mpz_struct *)(e_acsl_27)); mpz_clear((__mpz_struct *)(e_acsl_28)); - mpz_clear((__mpz_struct *)(e_acsl_29)); } /*@ assert x/3 ≡ -1; */ ; - { mpz_t e_acsl_31; mpz_t e_acsl_32; int e_acsl_33; mpz_t e_acsl_34; - mpz_t e_acsl_35; mpz_t e_acsl_36; int e_acsl_37; - mpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_32),(long)3); - e_acsl_33 = (int)mpz_get_si((__mpz_struct const *)(e_acsl_32)); - mpz_init((__mpz_struct *)(e_acsl_34)); /*@ assert 3 ≢ 0; */ ; - if (e_acsl_33 == 0) { e_acsl_fail((char *)"(3 == 0)"); } - mpz_cdiv_q((__mpz_struct *)(e_acsl_34),(__mpz_struct const *)(e_acsl_31), - (__mpz_struct const *)(e_acsl_32)); - mpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)1); - mpz_init((__mpz_struct *)(e_acsl_36)); - mpz_neg((__mpz_struct *)(e_acsl_36),(__mpz_struct const *)(e_acsl_35)); - e_acsl_37 = mpz_cmp((__mpz_struct const *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_36)); - if (! (e_acsl_37 == 0)) { e_acsl_fail((char *)"(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; + mpz_init_set_si((__mpz_struct *)(e_acsl_30),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)3); + e_acsl_32 = (int)mpz_get_si((__mpz_struct const *)(e_acsl_31)); + mpz_init((__mpz_struct *)(e_acsl_33)); /*@ assert 3 ≢ 0; */ ; + if (e_acsl_32 == 0) { e_acsl_fail((char *)"(3 == 0)"); } + mpz_cdiv_q((__mpz_struct *)(e_acsl_33),(__mpz_struct const *)(e_acsl_30), + (__mpz_struct const *)(e_acsl_31)); + mpz_init_set_si((__mpz_struct *)(e_acsl_34),(long)1); + mpz_init((__mpz_struct *)(e_acsl_35)); + mpz_neg((__mpz_struct *)(e_acsl_35),(__mpz_struct const *)(e_acsl_34)); + e_acsl_36 = mpz_cmp((__mpz_struct const *)(e_acsl_33), + (__mpz_struct const *)(e_acsl_35)); + if (! (e_acsl_36 == 0)) { e_acsl_fail((char *)"(x/3 == -1)"); } + mpz_clear((__mpz_struct *)(e_acsl_30)); mpz_clear((__mpz_struct *)(e_acsl_31)); - mpz_clear((__mpz_struct *)(e_acsl_32)); + mpz_clear((__mpz_struct *)(e_acsl_33)); mpz_clear((__mpz_struct *)(e_acsl_34)); mpz_clear((__mpz_struct *)(e_acsl_35)); - mpz_clear((__mpz_struct *)(e_acsl_36)); } /*@ assert 0xfffffffffff/0xfffffffffff ≡ 1; */ ; - { mpz_t e_acsl_38; mpz_t e_acsl_39; mpz_t e_acsl_40; int e_acsl_41; - mpz_t e_acsl_42; mpz_t e_acsl_43; int e_acsl_44; - mpz_init_set_str((__mpz_struct *)(e_acsl_38),"17592186044415",10); - mpz_init_set_str((__mpz_struct *)(e_acsl_39),"17592186044415",10); - mpz_init_set_si((__mpz_struct *)(e_acsl_40),(long)0); - e_acsl_41 = mpz_cmp((__mpz_struct const *)(e_acsl_39), - (__mpz_struct const *)(e_acsl_40)); - mpz_init((__mpz_struct *)(e_acsl_42)); + { 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; + mpz_init_set_str((__mpz_struct *)(e_acsl_37),"17592186044415",10); + mpz_init_set_si((__mpz_struct *)(e_acsl_38),(long)0); + e_acsl_39 = mpz_cmp((__mpz_struct const *)(e_acsl_37), + (__mpz_struct const *)(e_acsl_38)); + mpz_init((__mpz_struct *)(e_acsl_40)); /*@ assert 0xfffffffffff ≢ 0; */ ; - if (e_acsl_41 == 0) { e_acsl_fail((char *)"(0xfffffffffff == 0)"); } - mpz_cdiv_q((__mpz_struct *)(e_acsl_42),(__mpz_struct const *)(e_acsl_38), - (__mpz_struct const *)(e_acsl_39)); - mpz_init_set_si((__mpz_struct *)(e_acsl_43),(long)1); - e_acsl_44 = mpz_cmp((__mpz_struct const *)(e_acsl_42), - (__mpz_struct const *)(e_acsl_43)); - if (! (e_acsl_44 == 0)) { + if (e_acsl_39 == 0) { e_acsl_fail((char *)"(0xfffffffffff == 0)"); } + mpz_cdiv_q((__mpz_struct *)(e_acsl_40),(__mpz_struct const *)(e_acsl_37), + (__mpz_struct const *)(e_acsl_37)); + mpz_init_set_si((__mpz_struct *)(e_acsl_41),(long)1); + e_acsl_42 = mpz_cmp((__mpz_struct const *)(e_acsl_40), + (__mpz_struct const *)(e_acsl_41)); + if (! (e_acsl_42 == 0)) { e_acsl_fail((char *)"(0xfffffffffff/0xfffffffffff == 1)"); - } mpz_clear((__mpz_struct *)(e_acsl_38)); - mpz_clear((__mpz_struct *)(e_acsl_39)); + } mpz_clear((__mpz_struct *)(e_acsl_37)); + mpz_clear((__mpz_struct *)(e_acsl_38)); mpz_clear((__mpz_struct *)(e_acsl_40)); - mpz_clear((__mpz_struct *)(e_acsl_42)); - mpz_clear((__mpz_struct *)(e_acsl_43)); + mpz_clear((__mpz_struct *)(e_acsl_41)); } /*@ assert x%2 ≡ -1; */ ; - { mpz_t e_acsl_45; mpz_t e_acsl_46; int e_acsl_47; mpz_t e_acsl_48; - mpz_t e_acsl_49; mpz_t e_acsl_50; int e_acsl_51; - mpz_init_set_si((__mpz_struct *)(e_acsl_45),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_46),(long)2); - e_acsl_47 = (int)mpz_get_si((__mpz_struct const *)(e_acsl_46)); - mpz_init((__mpz_struct *)(e_acsl_48)); /*@ assert 2 ≢ 0; */ ; - if (e_acsl_47 == 0) { e_acsl_fail((char *)"(2 == 0)"); } - mpz_mod_ui(e_acsl_48,e_acsl_45,e_acsl_46); - mpz_init_set_si((__mpz_struct *)(e_acsl_49),(long)1); - mpz_init((__mpz_struct *)(e_acsl_50)); - mpz_neg((__mpz_struct *)(e_acsl_50),(__mpz_struct const *)(e_acsl_49)); - e_acsl_51 = mpz_cmp((__mpz_struct const *)(e_acsl_48), - (__mpz_struct const *)(e_acsl_50)); - if (! (e_acsl_51 == 0)) { e_acsl_fail((char *)"(x%2 == -1)"); } - mpz_clear((__mpz_struct *)(e_acsl_45)); + { 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; + mpz_init_set_si((__mpz_struct *)(e_acsl_43),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_44),(long)2); + e_acsl_45 = (int)mpz_get_si((__mpz_struct const *)(e_acsl_44)); + mpz_init((__mpz_struct *)(e_acsl_46)); /*@ assert 2 ≢ 0; */ ; + if (e_acsl_45 == 0) { e_acsl_fail((char *)"(2 == 0)"); } + mpz_mod_ui(e_acsl_46,e_acsl_43,e_acsl_44); + mpz_init_set_si((__mpz_struct *)(e_acsl_47),(long)1); + mpz_init((__mpz_struct *)(e_acsl_48)); + mpz_neg((__mpz_struct *)(e_acsl_48),(__mpz_struct const *)(e_acsl_47)); + e_acsl_49 = mpz_cmp((__mpz_struct const *)(e_acsl_46), + (__mpz_struct const *)(e_acsl_48)); + if (! (e_acsl_49 == 0)) { e_acsl_fail((char *)"(x%2 == -1)"); } + mpz_clear((__mpz_struct *)(e_acsl_43)); + mpz_clear((__mpz_struct *)(e_acsl_44)); mpz_clear((__mpz_struct *)(e_acsl_46)); + mpz_clear((__mpz_struct *)(e_acsl_47)); mpz_clear((__mpz_struct *)(e_acsl_48)); - mpz_clear((__mpz_struct *)(e_acsl_49)); - mpz_clear((__mpz_struct *)(e_acsl_50)); } /*@ assert ((x*2+(3+y))-4)+(x-y) ≡ -10; */ ; - { mpz_t e_acsl_52; mpz_t e_acsl_53; mpz_t e_acsl_54; mpz_t e_acsl_55; - mpz_t e_acsl_56; mpz_t e_acsl_57; mpz_t e_acsl_58; mpz_t e_acsl_59; - mpz_t e_acsl_60; mpz_t e_acsl_61; mpz_t e_acsl_62; mpz_t e_acsl_63; - mpz_t e_acsl_64; mpz_t e_acsl_65; mpz_t e_acsl_66; int e_acsl_67; - mpz_init_set_si((__mpz_struct *)(e_acsl_52),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_53),(long)2); - mpz_init((__mpz_struct *)(e_acsl_54)); - mpz_mul((__mpz_struct *)(e_acsl_54),(__mpz_struct const *)(e_acsl_52), - (__mpz_struct const *)(e_acsl_53)); - mpz_init_set_si((__mpz_struct *)(e_acsl_55),(long)3); - mpz_init_set_si((__mpz_struct *)(e_acsl_56),(long)y); - mpz_init((__mpz_struct *)(e_acsl_57)); - mpz_add((__mpz_struct *)(e_acsl_57),(__mpz_struct const *)(e_acsl_55), - (__mpz_struct const *)(e_acsl_56)); + { 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; mpz_t e_acsl_55; mpz_t e_acsl_56; mpz_t e_acsl_57; + mpz_t e_acsl_58; mpz_t e_acsl_59; mpz_t e_acsl_60; mpz_t e_acsl_61; + mpz_t e_acsl_62; int e_acsl_63; + mpz_init_set_si((__mpz_struct *)(e_acsl_50),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_51),(long)2); + mpz_init((__mpz_struct *)(e_acsl_52)); + mpz_mul((__mpz_struct *)(e_acsl_52),(__mpz_struct const *)(e_acsl_50), + (__mpz_struct const *)(e_acsl_51)); + mpz_init_set_si((__mpz_struct *)(e_acsl_53),(long)3); + mpz_init_set_si((__mpz_struct *)(e_acsl_54),(long)y); + mpz_init((__mpz_struct *)(e_acsl_55)); + mpz_add((__mpz_struct *)(e_acsl_55),(__mpz_struct const *)(e_acsl_53), + (__mpz_struct const *)(e_acsl_54)); + mpz_init((__mpz_struct *)(e_acsl_56)); + mpz_add((__mpz_struct *)(e_acsl_56),(__mpz_struct const *)(e_acsl_52), + (__mpz_struct const *)(e_acsl_55)); + mpz_init_set_si((__mpz_struct *)(e_acsl_57),(long)4); mpz_init((__mpz_struct *)(e_acsl_58)); - mpz_add((__mpz_struct *)(e_acsl_58),(__mpz_struct const *)(e_acsl_54), + mpz_sub((__mpz_struct *)(e_acsl_58),(__mpz_struct const *)(e_acsl_56), (__mpz_struct const *)(e_acsl_57)); - mpz_init_set_si((__mpz_struct *)(e_acsl_59),(long)4); + mpz_init((__mpz_struct *)(e_acsl_59)); + mpz_sub((__mpz_struct *)(e_acsl_59),(__mpz_struct const *)(e_acsl_50), + (__mpz_struct const *)(e_acsl_54)); mpz_init((__mpz_struct *)(e_acsl_60)); - mpz_sub((__mpz_struct *)(e_acsl_60),(__mpz_struct const *)(e_acsl_58), + mpz_add((__mpz_struct *)(e_acsl_60),(__mpz_struct const *)(e_acsl_58), (__mpz_struct const *)(e_acsl_59)); - mpz_init_set_si((__mpz_struct *)(e_acsl_61),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_62),(long)y); - mpz_init((__mpz_struct *)(e_acsl_63)); - mpz_sub((__mpz_struct *)(e_acsl_63),(__mpz_struct const *)(e_acsl_61), - (__mpz_struct const *)(e_acsl_62)); - mpz_init((__mpz_struct *)(e_acsl_64)); - mpz_add((__mpz_struct *)(e_acsl_64),(__mpz_struct const *)(e_acsl_60), - (__mpz_struct const *)(e_acsl_63)); - mpz_init_set_si((__mpz_struct *)(e_acsl_65),(long)10); - mpz_init((__mpz_struct *)(e_acsl_66)); - mpz_neg((__mpz_struct *)(e_acsl_66),(__mpz_struct const *)(e_acsl_65)); - e_acsl_67 = mpz_cmp((__mpz_struct const *)(e_acsl_64), - (__mpz_struct const *)(e_acsl_66)); - if (! (e_acsl_67 == 0)) { + mpz_init_set_si((__mpz_struct *)(e_acsl_61),(long)10); + mpz_init((__mpz_struct *)(e_acsl_62)); + mpz_neg((__mpz_struct *)(e_acsl_62),(__mpz_struct const *)(e_acsl_61)); + e_acsl_63 = mpz_cmp((__mpz_struct const *)(e_acsl_60), + (__mpz_struct const *)(e_acsl_62)); + if (! (e_acsl_63 == 0)) { e_acsl_fail((char *)"(((x*2+(3+y))-4)+(x-y) == -10)"); - } mpz_clear((__mpz_struct *)(e_acsl_52)); + } mpz_clear((__mpz_struct *)(e_acsl_50)); + mpz_clear((__mpz_struct *)(e_acsl_51)); + mpz_clear((__mpz_struct *)(e_acsl_52)); mpz_clear((__mpz_struct *)(e_acsl_53)); mpz_clear((__mpz_struct *)(e_acsl_54)); mpz_clear((__mpz_struct *)(e_acsl_55)); @@ -992,10 +965,6 @@ int main(void) mpz_clear((__mpz_struct *)(e_acsl_60)); mpz_clear((__mpz_struct *)(e_acsl_61)); mpz_clear((__mpz_struct *)(e_acsl_62)); - mpz_clear((__mpz_struct *)(e_acsl_63)); - mpz_clear((__mpz_struct *)(e_acsl_64)); - mpz_clear((__mpz_struct *)(e_acsl_65)); - mpz_clear((__mpz_struct *)(e_acsl_66)); } /*@ assert (0≡1) ≡ !(0≡0); */ ; @@ -1003,6 +972,21 @@ int main(void) e_acsl_fail((char *)"((0==1) == !(0==0))"); } /*@ assert (0≤-1) ≡ (0>0); */ ; + { mpz_t e_acsl_64; mpz_t e_acsl_65; mpz_t e_acsl_66; int e_acsl_67; + mpz_init_set_si((__mpz_struct *)(e_acsl_64),(long)0); + mpz_init_set_si((__mpz_struct *)(e_acsl_65),(long)1); + mpz_init((__mpz_struct *)(e_acsl_66)); + mpz_neg((__mpz_struct *)(e_acsl_66),(__mpz_struct const *)(e_acsl_65)); + e_acsl_67 = mpz_cmp((__mpz_struct const *)(e_acsl_64), + (__mpz_struct const *)(e_acsl_66)); + if (! ((e_acsl_67 <= 0) == (0 > 0))) { + e_acsl_fail((char *)"((0<=-1) == (0>0))"); + } mpz_clear((__mpz_struct *)(e_acsl_64)); + mpz_clear((__mpz_struct *)(e_acsl_65)); + mpz_clear((__mpz_struct *)(e_acsl_66)); + } + + /*@ assert (0≥-1) ≡ (0≤0); */ ; { mpz_t e_acsl_68; mpz_t e_acsl_69; mpz_t e_acsl_70; int e_acsl_71; mpz_init_set_si((__mpz_struct *)(e_acsl_68),(long)0); mpz_init_set_si((__mpz_struct *)(e_acsl_69),(long)1); @@ -1010,28 +994,13 @@ int main(void) mpz_neg((__mpz_struct *)(e_acsl_70),(__mpz_struct const *)(e_acsl_69)); e_acsl_71 = mpz_cmp((__mpz_struct const *)(e_acsl_68), (__mpz_struct const *)(e_acsl_70)); - if (! ((e_acsl_71 <= 0) == (0 > 0))) { - e_acsl_fail((char *)"((0<=-1) == (0>0))"); + if (! ((e_acsl_71 >= 0) == (0 <= 0))) { + e_acsl_fail((char *)"((0>=-1) == (0<=0))"); } mpz_clear((__mpz_struct *)(e_acsl_68)); mpz_clear((__mpz_struct *)(e_acsl_69)); mpz_clear((__mpz_struct *)(e_acsl_70)); } - /*@ assert (0≥-1) ≡ (0≤0); */ ; - { mpz_t e_acsl_72; mpz_t e_acsl_73; mpz_t e_acsl_74; int e_acsl_75; - mpz_init_set_si((__mpz_struct *)(e_acsl_72),(long)0); - mpz_init_set_si((__mpz_struct *)(e_acsl_73),(long)1); - mpz_init((__mpz_struct *)(e_acsl_74)); - mpz_neg((__mpz_struct *)(e_acsl_74),(__mpz_struct const *)(e_acsl_73)); - e_acsl_75 = mpz_cmp((__mpz_struct const *)(e_acsl_72), - (__mpz_struct const *)(e_acsl_74)); - if (! ((e_acsl_75 >= 0) == (0 <= 0))) { - e_acsl_fail((char *)"((0>=-1) == (0<=0))"); - } mpz_clear((__mpz_struct *)(e_acsl_72)); - mpz_clear((__mpz_struct *)(e_acsl_73)); - mpz_clear((__mpz_struct *)(e_acsl_74)); - } - /*@ assert (0≢1) ≡ !(0≢0); */ ; if (! ((0 != 1) == ! (0 != 0))) { e_acsl_fail((char *)"((0!=1) == !(0!=0))"); diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/array.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/array.res.oracle index 12014f01f2a..7966f0e2238 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/array.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/array.res.oracle @@ -8,29 +8,29 @@ tests/e-acsl-runtime/array.i:14:[e-acsl] warning: missing guard for ensuring tha [value] Values of globals at initialization T1[0..2] ∈ {0} T2[0..3] ∈ {0} -PROJECT_FILE.i:132:[value] entering loop for the first time -PROJECT_FILE.i:132:[value] assigning non deterministic value for the first time -PROJECT_FILE.i:135:[value] entering loop for the first time -PROJECT_FILE.i:138:[value] Assertion got status unknown. +PROJECT_FILE.i:136:[value] entering loop for the first time +PROJECT_FILE.i:136:[value] assigning non deterministic value for the first time +PROJECT_FILE.i:139:[value] entering loop for the first time +PROJECT_FILE.i:142:[value] Assertion got status unknown. [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:139. + Called from PROJECT_FILE.i:143. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. -PROJECT_FILE.i:115:[value] Function exit: postcondition got status invalid. + Called from PROJECT_FILE.i:129. +PROJECT_FILE.i:119:[value] Function exit: postcondition got status invalid. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail -PROJECT_FILE.i:141:[value] Assertion got status unknown. +PROJECT_FILE.i:145:[value] Assertion got status unknown. [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:142. + Called from PROJECT_FILE.i:146. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.err.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.err.oracle new file mode 100644 index 00000000000..e69de29bb2d 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 new file mode 100644 index 00000000000..46d637a5ee5 --- /dev/null +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/at.res.oracle @@ -0,0 +1,284 @@ +[value] Analyzing a complete application starting at main +[value] Computing initial state +[value] Initial state computed +[value] Values of globals at initialization +[value] computing for function mpz_init_set_si <- main. + Called from PROJECT_FILE.i:142. +PROJECT_FILE.i:33:[value] Function mpz_init_set_si: postcondition got status valid. +[value] Done for function mpz_init_set_si +[value] computing for function mpz_init_set_si <- main. + Called from PROJECT_FILE.i:142. +[value] Done for function mpz_init_set_si +[value] computing for function mpz_init <- main. + Called from PROJECT_FILE.i:143. +PROJECT_FILE.i:21:[value] Function mpz_init: postcondition got status valid. +[value] Done for function mpz_init +[value] computing for function mpz_add <- main. + Called from PROJECT_FILE.i:143. +PROJECT_FILE.i:64:[value] Function mpz_add: precondition got status valid. +PROJECT_FILE.i:65:[value] Function mpz_add: precondition got status valid. +PROJECT_FILE.i:66:[value] Function mpz_add: precondition got status valid. +[value] Done for function mpz_add +[value] computing for function mpz_init_set <- main. + Called from PROJECT_FILE.i:144. +PROJECT_FILE.i:25:[value] Function mpz_init_set: postcondition got status valid. +[value] Done for function mpz_init_set +[value] computing for function mpz_clear <- main. + Called from PROJECT_FILE.i:144. +PROJECT_FILE.i:43:[value] Function mpz_clear: precondition got status valid. +[value] Done for function mpz_clear +[value] computing for function mpz_clear <- main. + Called from PROJECT_FILE.i:145. +[value] Done for function mpz_clear +[value] computing for function mpz_clear <- main. + Called from PROJECT_FILE.i:145. +[value] Done for function mpz_clear +PROJECT_FILE.i:149:[value] Assertion got status valid. +[value] computing for function mpz_init_set_si <- main. + Called from PROJECT_FILE.i:151. +[value] Done for function mpz_init_set_si +[value] computing for function mpz_init_set_si <- main. + Called from PROJECT_FILE.i:151. +[value] Done for function mpz_init_set_si +[value] computing for function mpz_cmp <- main. + Called from PROJECT_FILE.i:152. +PROJECT_FILE.i:49:[value] Function mpz_cmp: precondition got status valid. +PROJECT_FILE.i:50:[value] Function mpz_cmp: precondition got status valid. +[value] Done for function mpz_cmp +[value] computing for function e_acsl_fail <- main. + Called from PROJECT_FILE.i:153. +[value] computing for function printf <- e_acsl_fail <- main. + Called from PROJECT_FILE.i:129. +[value] Done for function printf +[value] computing for function exit <- e_acsl_fail <- main. + Called from PROJECT_FILE.i:129. +PROJECT_FILE.i:119:[value] Function exit: postcondition got status invalid. +[value] Done for function exit +[value] Recording results for e_acsl_fail +[value] Done for function e_acsl_fail +[value] computing for function mpz_clear <- main. + Called from PROJECT_FILE.i:153. +[value] Done for function mpz_clear +[value] computing for function mpz_clear <- main. + Called from PROJECT_FILE.i:154. +[value] Done for function mpz_clear +PROJECT_FILE.i:159:[value] Assertion got status unknown. +[value] computing for function mpz_init_set_si <- main. + Called from PROJECT_FILE.i:161. +[value] Done for function mpz_init_set_si +[value] computing for function mpz_init_set_si <- main. + Called from PROJECT_FILE.i:161. +[value] Done for function mpz_init_set_si +[value] computing for function mpz_cmp <- main. + Called from PROJECT_FILE.i:162. +[value] Done for function mpz_cmp +[value] computing for function e_acsl_fail <- main. + Called from PROJECT_FILE.i:163. +[value] computing for function printf <- e_acsl_fail <- main. + Called from PROJECT_FILE.i:129. +[value] Done for function printf +[value] computing for function exit <- e_acsl_fail <- main. + Called from PROJECT_FILE.i:129. +[value] Done for function exit +[value] Recording results for e_acsl_fail +[value] Done for function e_acsl_fail +[value] computing for function mpz_clear <- main. + Called from PROJECT_FILE.i:164. +[value] Done for function mpz_clear +[value] computing for function mpz_clear <- main. + Called from PROJECT_FILE.i:164. +[value] Done for function mpz_clear +PROJECT_FILE.i:167:[value] Assertion got status unknown. +[value] computing for function mpz_init_set_si <- main. + Called from PROJECT_FILE.i:168. +[value] Done for function mpz_init_set_si +[value] computing for function mpz_cmp <- main. + Called from PROJECT_FILE.i:169. +[value] Done for function mpz_cmp +[value] computing for function e_acsl_fail <- main. + Called from PROJECT_FILE.i:170. +[value] computing for function printf <- e_acsl_fail <- main. + Called from PROJECT_FILE.i:129. +[value] Done for function printf +[value] computing for function exit <- e_acsl_fail <- main. + Called from PROJECT_FILE.i:129. +[value] Done for function exit +[value] Recording results for e_acsl_fail +[value] Done for function e_acsl_fail +[value] computing for function mpz_clear <- main. + Called from PROJECT_FILE.i:171. +[value] Done for function mpz_clear +PROJECT_FILE.i:174:[value] Assertion got status unknown. +[value] computing for function mpz_init_set_si <- main. + Called from PROJECT_FILE.i:176. +[value] Done for function mpz_init_set_si +[value] computing for function mpz_init_set_si <- main. + Called from PROJECT_FILE.i:176. +[value] Done for function mpz_init_set_si +[value] computing for function mpz_init <- main. + Called from PROJECT_FILE.i:177. +[value] Done for function mpz_init +[value] computing for function mpz_add <- main. + Called from PROJECT_FILE.i:177. +[value] Done for function mpz_add +[value] computing for function mpz_cmp <- main. + Called from PROJECT_FILE.i:178. +[value] Done for function mpz_cmp +[value] computing for function e_acsl_fail <- main. + Called from PROJECT_FILE.i:179. +[value] computing for function printf <- e_acsl_fail <- main. + Called from PROJECT_FILE.i:129. +[value] Done for function printf +[value] computing for function exit <- e_acsl_fail <- main. + Called from PROJECT_FILE.i:129. +[value] Done for function exit +[value] Recording results for e_acsl_fail +[value] Done for function e_acsl_fail +[value] computing for function mpz_clear <- main. + Called from PROJECT_FILE.i:180. +[value] Done for function mpz_clear +[value] computing for function mpz_clear <- main. + Called from PROJECT_FILE.i:180. +[value] Done for function mpz_clear +[value] computing for function mpz_clear <- main. + Called from PROJECT_FILE.i:180. +[value] Done for function mpz_clear +[value] computing for function mpz_clear <- main. + Called from PROJECT_FILE.i:184. +[value] Done for function mpz_clear +[value] Recording results for main +[value] done for function main +[value] ====== VALUES COMPUTED ====== +[value] Values for function e_acsl_fail: + NON TERMINATING FUNCTION +[value] Values for function main: + __retres ∈ {0} + x ∈ {2} + e_acsl_4 ∈ {0} + e_acsl_11[0] ∈ [--..--] or UNINITIALIZED + e_acsl_14 ∈ {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 mpz_init(__mpz_struct * /*[1]*/ x); +/*@ ensures \valid(\old(z)); + assigns *z; */ +extern void mpz_init_set(__mpz_struct * /*[1]*/ z, + __mpz_struct const * /*[1]*/ z_orig); +/*@ ensures \valid(\old(z)); + assigns *z; + assigns *z \from n; */ +extern void mpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); +/*@ requires \valid(x); + assigns *x; */ +extern void mpz_clear(__mpz_struct * /*[1]*/ x); +/*@ requires \valid(z1); + requires \valid(z2); + assigns \nothing; */ +extern int mpz_cmp(__mpz_struct const * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2); +/*@ requires \valid(z1); + requires \valid(z2); + requires \valid(z3); + assigns *z1; +*/ +extern void mpz_add(__mpz_struct * /*[1]*/ z1, + __mpz_struct const * /*[1]*/ z2, + __mpz_struct const * /*[1]*/ z3); +/*@ terminates \false; + ensures \false; + assigns \nothing; */ +extern void exit(int status); +/*@ assigns \nothing; */ +extern int printf(char const * , ...); +void e_acsl_fail(char *msg) +{ + printf("%s\n",msg); + exit(1); + return; +} + +int main(void) +{ + int __retres; + int x; + int e_acsl_4; + mpz_t e_acsl_11; + int e_acsl_14; + x = 0; + L: e_acsl_14 = x; + { mpz_t e_acsl_8; mpz_t e_acsl_9; mpz_t e_acsl_10; + mpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)1); + mpz_init((__mpz_struct *)(e_acsl_10)); + mpz_add((__mpz_struct *)(e_acsl_10),(__mpz_struct const *)(e_acsl_8), + (__mpz_struct const *)(e_acsl_9)); + mpz_init_set((__mpz_struct *)(e_acsl_11), + (__mpz_struct const *)(e_acsl_10)); + mpz_clear((__mpz_struct *)(e_acsl_8)); + mpz_clear((__mpz_struct *)(e_acsl_9)); + mpz_clear((__mpz_struct *)(e_acsl_10)); + } + + e_acsl_4 = x; + /*@ assert x ≡ 0; */ ; + { mpz_t e_acsl_1; mpz_t e_acsl_2; int e_acsl_3; + mpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)0); + e_acsl_3 = mpz_cmp((__mpz_struct const *)(e_acsl_1), + (__mpz_struct const *)(e_acsl_2)); + if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(x == 0)"); } + mpz_clear((__mpz_struct *)(e_acsl_1)); + mpz_clear((__mpz_struct *)(e_acsl_2)); + } + + x = 1; + x = 2; + /*@ assert \at(x,L) ≡ 0; */ ; + { mpz_t e_acsl_5; mpz_t e_acsl_6; int e_acsl_7; + mpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)e_acsl_4); + mpz_init_set_si((__mpz_struct *)(e_acsl_6),(long)0); + e_acsl_7 = mpz_cmp((__mpz_struct const *)(e_acsl_5), + (__mpz_struct const *)(e_acsl_6)); + if (! (e_acsl_7 == 0)) { e_acsl_fail((char *)"(\\at(x,L) == 0)"); } + mpz_clear((__mpz_struct *)(e_acsl_5)); + mpz_clear((__mpz_struct *)(e_acsl_6)); + } + + /*@ assert \at(x+1,L) ≡ 1; */ ; + { mpz_t e_acsl_12; int e_acsl_13; + mpz_init_set_si((__mpz_struct *)(e_acsl_12),(long)1); + e_acsl_13 = mpz_cmp((__mpz_struct const *)(e_acsl_11), + (__mpz_struct const *)(e_acsl_12)); + if (! (e_acsl_13 == 0)) { e_acsl_fail((char *)"(\\at(x+1,L) == 1)"); } + mpz_clear((__mpz_struct *)(e_acsl_12)); + } + + /*@ 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; + mpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)e_acsl_14); + mpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)1); + mpz_init((__mpz_struct *)(e_acsl_17)); + mpz_add((__mpz_struct *)(e_acsl_17),(__mpz_struct const *)(e_acsl_15), + (__mpz_struct const *)(e_acsl_16)); + e_acsl_18 = mpz_cmp((__mpz_struct const *)(e_acsl_17), + (__mpz_struct const *)(e_acsl_16)); + if (! (e_acsl_18 == 0)) { e_acsl_fail((char *)"(\\at(x,L)+1 == 1)"); } + mpz_clear((__mpz_struct *)(e_acsl_15)); + mpz_clear((__mpz_struct *)(e_acsl_16)); + mpz_clear((__mpz_struct *)(e_acsl_17)); + } + + __retres = 0; + mpz_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 e972922f1d3..37c29a46fae 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 @@ -4,50 +4,50 @@ tests/e-acsl-runtime/cast.i:18:[e-acsl] warning: missing guard for ensuring that [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization -PROJECT_FILE.i:134:[value] Assertion got status valid. +PROJECT_FILE.i:138:[value] Assertion got status valid. [value] computing for function mpz_init_set_str <- main. - Called from PROJECT_FILE.i:136. -PROJECT_FILE.i:33:[value] Function mpz_init_set_str: postcondition got status valid. + Called from PROJECT_FILE.i:140. +PROJECT_FILE.i:37:[value] Function mpz_init_set_str: postcondition got status valid. [value] Done for function mpz_init_set_str [value] computing for function mpz_get_si <- main. - Called from PROJECT_FILE.i:137. -PROJECT_FILE.i:92:[value] Function mpz_get_si: precondition got status valid. + Called from PROJECT_FILE.i:141. +PROJECT_FILE.i:96:[value] Function mpz_get_si: precondition got status valid. [value] Done for function mpz_get_si [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:138. + Called from PROJECT_FILE.i:142. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. -PROJECT_FILE.i:115:[value] Function exit: postcondition got status invalid. + Called from PROJECT_FILE.i:129. +PROJECT_FILE.i:119:[value] Function exit: postcondition got status invalid. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:139. -PROJECT_FILE.i:39:[value] Function mpz_clear: precondition got status valid. + Called from PROJECT_FILE.i:143. +PROJECT_FILE.i:43:[value] Function mpz_clear: precondition got status valid. [value] Done for function mpz_clear -PROJECT_FILE.i:142:[value] Assertion got status valid. +PROJECT_FILE.i:146:[value] Assertion got status valid. [value] computing for function mpz_init_set_str <- main. - Called from PROJECT_FILE.i:144. + Called from PROJECT_FILE.i:148. [value] Done for function mpz_init_set_str [value] computing for function mpz_get_ui <- main. - Called from PROJECT_FILE.i:145. -PROJECT_FILE.i:96:[value] Function mpz_get_ui: precondition got status valid. + Called from PROJECT_FILE.i:149. +PROJECT_FILE.i:100:[value] Function mpz_get_ui: precondition got status valid. [value] Done for function mpz_get_ui [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:147. + Called from PROJECT_FILE.i:151. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:148. + Called from PROJECT_FILE.i:152. [value] Done for function mpz_clear [value] Recording results for main [value] done for function main 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 e1913f4de86..9870f828ee1 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 @@ -2,294 +2,279 @@ [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization -PROJECT_FILE.i:135:[value] Assertion got status valid. -PROJECT_FILE.i:138:[value] Assertion got status valid. -PROJECT_FILE.i:141:[value] Assertion got status valid. +PROJECT_FILE.i:139:[value] Assertion got status valid. +PROJECT_FILE.i:142:[value] Assertion got status valid. +PROJECT_FILE.i:145:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:143. -PROJECT_FILE.i:29:[value] Function mpz_init_set_si: postcondition got status valid. + Called from PROJECT_FILE.i:147. +PROJECT_FILE.i:33:[value] Function mpz_init_set_si: postcondition got status valid. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:143. + Called from PROJECT_FILE.i:147. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:144. -PROJECT_FILE.i:45:[value] Function mpz_cmp: precondition got status valid. -PROJECT_FILE.i:46:[value] Function mpz_cmp: precondition got status valid. + Called from PROJECT_FILE.i:148. +PROJECT_FILE.i:49:[value] Function mpz_cmp: precondition got status valid. +PROJECT_FILE.i:50:[value] Function mpz_cmp: precondition got status valid. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:145. + Called from PROJECT_FILE.i:149. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. -PROJECT_FILE.i:115:[value] Function exit: postcondition got status invalid. + Called from PROJECT_FILE.i:129. +PROJECT_FILE.i:119:[value] Function exit: postcondition got status invalid. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:146. -PROJECT_FILE.i:39:[value] Function mpz_clear: precondition got status valid. + Called from PROJECT_FILE.i:149. +PROJECT_FILE.i:43:[value] Function mpz_clear: precondition got status valid. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:146. + Called from PROJECT_FILE.i:150. [value] Done for function mpz_clear -PROJECT_FILE.i:149:[value] Assertion got status valid. +PROJECT_FILE.i:153:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:151. + Called from PROJECT_FILE.i:155. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:151. + Called from PROJECT_FILE.i:155. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:152. + Called from PROJECT_FILE.i:156. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:153. + Called from PROJECT_FILE.i:157. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:154. + Called from PROJECT_FILE.i:157. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:154. + Called from PROJECT_FILE.i:158. [value] Done for function mpz_clear -PROJECT_FILE.i:158:[value] Assertion got status valid. -PROJECT_FILE.i:161:[value] Assertion got status unknown. -PROJECT_FILE.i:164:[value] Assertion got status valid. -PROJECT_FILE.i:167:[value] Assertion got status valid. -PROJECT_FILE.i:170:[value] Assertion got status valid. -PROJECT_FILE.i:173:[value] Assertion got status valid. -PROJECT_FILE.i:176:[value] Assertion got status valid. -PROJECT_FILE.i:179:[value] Assertion got status valid. -PROJECT_FILE.i:182:[value] Assertion got status valid. +PROJECT_FILE.i:162:[value] Assertion got status valid. +PROJECT_FILE.i:165:[value] Assertion got status unknown. +PROJECT_FILE.i:168:[value] Assertion got status valid. +PROJECT_FILE.i:171:[value] Assertion got status valid. +PROJECT_FILE.i:174:[value] Assertion got status valid. +PROJECT_FILE.i:177:[value] Assertion got status valid. +PROJECT_FILE.i:180:[value] Assertion got status valid. +PROJECT_FILE.i:183:[value] Assertion got status valid. +PROJECT_FILE.i:186:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:184. + Called from PROJECT_FILE.i:188. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:184. + Called from PROJECT_FILE.i:188. PROJECT_FILE.i:21:[value] Function mpz_init: postcondition got status valid. [value] Done for function mpz_init [value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:185. -PROJECT_FILE.i:55:[value] Function mpz_neg: precondition got status valid. -PROJECT_FILE.i:56:[value] Function mpz_neg: precondition got status valid. + Called from PROJECT_FILE.i:189. +PROJECT_FILE.i:59:[value] Function mpz_neg: precondition got status valid. +PROJECT_FILE.i:60:[value] Function mpz_neg: precondition got status valid. [value] Done for function mpz_neg [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:185. + Called from PROJECT_FILE.i:189. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:186. + Called from PROJECT_FILE.i:190. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:187. + Called from PROJECT_FILE.i:191. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:188. + Called from PROJECT_FILE.i:191. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:188. + Called from PROJECT_FILE.i:192. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:188. + Called from PROJECT_FILE.i:192. [value] Done for function mpz_clear -PROJECT_FILE.i:191:[value] Assertion got status valid. +PROJECT_FILE.i:195:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:193. + Called from PROJECT_FILE.i:197. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:193. + Called from PROJECT_FILE.i:197. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:194. + Called from PROJECT_FILE.i:198. [value] Done for function mpz_init [value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:194. + Called from PROJECT_FILE.i:198. [value] Done for function mpz_neg [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:195. + Called from PROJECT_FILE.i:199. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:196. + Called from PROJECT_FILE.i:200. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:197. + Called from PROJECT_FILE.i:201. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:197. + Called from PROJECT_FILE.i:201. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:197. + Called from PROJECT_FILE.i:201. [value] Done for function mpz_clear -PROJECT_FILE.i:200:[value] Assertion got status valid. +PROJECT_FILE.i:204:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:202. + Called from PROJECT_FILE.i:206. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:202. + Called from PROJECT_FILE.i:206. [value] Done for function mpz_init [value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:203. + Called from PROJECT_FILE.i:207. [value] Done for function mpz_neg [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:203. + Called from PROJECT_FILE.i:207. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:204. + Called from PROJECT_FILE.i:208. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:205. + Called from PROJECT_FILE.i:209. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:206. + Called from PROJECT_FILE.i:210. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:206. + Called from PROJECT_FILE.i:210. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:206. + Called from PROJECT_FILE.i:210. [value] Done for function mpz_clear -PROJECT_FILE.i:209:[value] Assertion got status valid. +PROJECT_FILE.i:213:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:211. + Called from PROJECT_FILE.i:215. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:211. + Called from PROJECT_FILE.i:215. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:212. + Called from PROJECT_FILE.i:216. [value] Done for function mpz_init [value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:212. + Called from PROJECT_FILE.i:216. [value] Done for function mpz_neg [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:213. + Called from PROJECT_FILE.i:217. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:214. + Called from PROJECT_FILE.i:218. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:215. + Called from PROJECT_FILE.i:219. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:215. + Called from PROJECT_FILE.i:219. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:215. + Called from PROJECT_FILE.i:219. [value] Done for function mpz_clear -PROJECT_FILE.i:218:[value] Assertion got status valid. -[value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:220. -[value] Done for function mpz_init_set_si -[value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:220. -[value] Done for function mpz_init -[value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:221. -[value] Done for function mpz_neg +PROJECT_FILE.i:222:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:221. + Called from PROJECT_FILE.i:224. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:222. + Called from PROJECT_FILE.i:224. [value] Done for function mpz_init [value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:222. + Called from PROJECT_FILE.i:225. [value] Done for function mpz_neg [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:223. + Called from PROJECT_FILE.i:226. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:224. + Called from PROJECT_FILE.i:227. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:225. + Called from PROJECT_FILE.i:228. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:225. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:225. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:226. + Called from PROJECT_FILE.i:228. [value] Done for function mpz_clear -PROJECT_FILE.i:229:[value] Assertion got status valid. +PROJECT_FILE.i:231:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:231. + Called from PROJECT_FILE.i:233. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:231. + Called from PROJECT_FILE.i:233. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:232. + Called from PROJECT_FILE.i:234. [value] Done for function mpz_init [value] computing for function mpz_neg <- main. - Called from PROJECT_FILE.i:232. + Called from PROJECT_FILE.i:234. [value] Done for function mpz_neg [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:233. + Called from PROJECT_FILE.i:235. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:234. + Called from PROJECT_FILE.i:236. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:235. + Called from PROJECT_FILE.i:237. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:235. + Called from PROJECT_FILE.i:237. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:235. + Called from PROJECT_FILE.i:237. [value] Done for function mpz_clear [value] Recording results for main [value] done for function main @@ -313,7 +298,8 @@ typedef __mpz_struct mpz_t[1]; assigns *x; */ extern void mpz_init(__mpz_struct * /*[1]*/ x); /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void mpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ @@ -450,34 +436,29 @@ int main(void) } /*@ assert -0xff ≡ -0xff; */ ; - { mpz_t e_acsl_23; mpz_t e_acsl_24; mpz_t e_acsl_25; mpz_t e_acsl_26; - int e_acsl_27; mpz_init_set_si((__mpz_struct *)(e_acsl_23),(long)0xff); + { mpz_t e_acsl_23; mpz_t e_acsl_24; int e_acsl_25; + mpz_init_set_si((__mpz_struct *)(e_acsl_23),(long)0xff); mpz_init((__mpz_struct *)(e_acsl_24)); mpz_neg((__mpz_struct *)(e_acsl_24),(__mpz_struct const *)(e_acsl_23)); - mpz_init_set_si((__mpz_struct *)(e_acsl_25),(long)0xff); - mpz_init((__mpz_struct *)(e_acsl_26)); - mpz_neg((__mpz_struct *)(e_acsl_26),(__mpz_struct const *)(e_acsl_25)); - e_acsl_27 = mpz_cmp((__mpz_struct const *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_26)); - if (! (e_acsl_27 == 0)) { e_acsl_fail((char *)"(-0xff == -0xff)"); } + e_acsl_25 = mpz_cmp((__mpz_struct const *)(e_acsl_24), + (__mpz_struct const *)(e_acsl_24)); + if (! (e_acsl_25 == 0)) { e_acsl_fail((char *)"(-0xff == -0xff)"); } mpz_clear((__mpz_struct *)(e_acsl_23)); mpz_clear((__mpz_struct *)(e_acsl_24)); - mpz_clear((__mpz_struct *)(e_acsl_25)); - mpz_clear((__mpz_struct *)(e_acsl_26)); } /*@ assert 1 ≢ -2; */ ; - { mpz_t e_acsl_28; mpz_t e_acsl_29; mpz_t e_acsl_30; int e_acsl_31; - mpz_init_set_si((__mpz_struct *)(e_acsl_28),(long)1); - mpz_init_set_si((__mpz_struct *)(e_acsl_29),(long)2); - mpz_init((__mpz_struct *)(e_acsl_30)); - mpz_neg((__mpz_struct *)(e_acsl_30),(__mpz_struct const *)(e_acsl_29)); - e_acsl_31 = mpz_cmp((__mpz_struct const *)(e_acsl_28), - (__mpz_struct const *)(e_acsl_30)); - if (! (e_acsl_31 != 0)) { e_acsl_fail((char *)"(1 != -2)"); } + { mpz_t e_acsl_26; mpz_t e_acsl_27; mpz_t e_acsl_28; int e_acsl_29; + mpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)1); + mpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)2); + mpz_init((__mpz_struct *)(e_acsl_28)); + mpz_neg((__mpz_struct *)(e_acsl_28),(__mpz_struct const *)(e_acsl_27)); + e_acsl_29 = mpz_cmp((__mpz_struct const *)(e_acsl_26), + (__mpz_struct const *)(e_acsl_28)); + if (! (e_acsl_29 != 0)) { e_acsl_fail((char *)"(1 != -2)"); } + mpz_clear((__mpz_struct *)(e_acsl_26)); + mpz_clear((__mpz_struct *)(e_acsl_27)); mpz_clear((__mpz_struct *)(e_acsl_28)); - mpz_clear((__mpz_struct *)(e_acsl_29)); - mpz_clear((__mpz_struct *)(e_acsl_30)); } __retres = 0; 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 6c2e35a302d..0b7f470c704 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,98 +5,92 @@ X ∈ {0} Y ∈ {2} [value] computing for function f <- main. - Called from PROJECT_FILE.i:367. + Called from PROJECT_FILE.i:347. [value] computing for function mpz_init_set_si <- f <- main. - Called from PROJECT_FILE.i:134. -PROJECT_FILE.i:29:[value] Function mpz_init_set_si: postcondition got status valid. + Called from PROJECT_FILE.i:138. +PROJECT_FILE.i:33:[value] Function mpz_init_set_si: postcondition got status valid. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- f <- main. - Called from PROJECT_FILE.i:134. + Called from PROJECT_FILE.i:138. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- f <- main. - Called from PROJECT_FILE.i:135. -PROJECT_FILE.i:45:[value] Function mpz_cmp: precondition got status valid. -PROJECT_FILE.i:46:[value] Function mpz_cmp: precondition got status valid. + Called from PROJECT_FILE.i:139. +PROJECT_FILE.i:49:[value] Function mpz_cmp: precondition got status valid. +PROJECT_FILE.i:50:[value] Function mpz_cmp: precondition got status valid. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- f <- main. - Called from PROJECT_FILE.i:136. + Called from PROJECT_FILE.i:140. [value] computing for function printf <- e_acsl_fail <- f <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- f <- main. - Called from PROJECT_FILE.i:125. -PROJECT_FILE.i:115:[value] Function exit: postcondition got status invalid. + Called from PROJECT_FILE.i:129. +PROJECT_FILE.i:119:[value] Function exit: postcondition got status invalid. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- f <- main. - Called from PROJECT_FILE.i:137. -PROJECT_FILE.i:39:[value] Function mpz_clear: precondition got status valid. + Called from PROJECT_FILE.i:140. +PROJECT_FILE.i:43:[value] Function mpz_clear: precondition got status valid. [value] Done for function mpz_clear [value] computing for function mpz_clear <- f <- main. - Called from PROJECT_FILE.i:137. + Called from PROJECT_FILE.i:141. [value] Done for function mpz_clear -PROJECT_FILE.i:129:[value] Function f: postcondition got status valid. +PROJECT_FILE.i:133:[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:368. + Called from PROJECT_FILE.i:348. [value] computing for function mpz_init_set_si <- g <- main. - Called from PROJECT_FILE.i:149. + Called from PROJECT_FILE.i:152. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- g <- main. - Called from PROJECT_FILE.i:150. + Called from PROJECT_FILE.i:152. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- g <- main. - Called from PROJECT_FILE.i:150. + Called from PROJECT_FILE.i:153. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- g <- main. - Called from PROJECT_FILE.i:151. + Called from PROJECT_FILE.i:154. [value] computing for function printf <- e_acsl_fail <- g <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- g <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_init_set_si <- g <- main. - Called from PROJECT_FILE.i:152. -[value] Done for function mpz_init_set_si -[value] computing for function mpz_init_set_si <- g <- main. - Called from PROJECT_FILE.i:152. + Called from PROJECT_FILE.i:155. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- g <- main. - Called from PROJECT_FILE.i:153. + Called from PROJECT_FILE.i:155. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- g <- main. - Called from PROJECT_FILE.i:154. + Called from PROJECT_FILE.i:156. [value] computing for function printf <- e_acsl_fail <- g <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- g <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- g <- main. - Called from PROJECT_FILE.i:155. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- g <- main. - Called from PROJECT_FILE.i:155. + Called from PROJECT_FILE.i:156. [value] Done for function mpz_clear [value] computing for function mpz_clear <- g <- main. - Called from PROJECT_FILE.i:155. + Called from PROJECT_FILE.i:157. [value] Done for function mpz_clear [value] computing for function mpz_clear <- g <- main. - Called from PROJECT_FILE.i:156. + Called from PROJECT_FILE.i:157. [value] Done for function mpz_clear -PROJECT_FILE.i:143:[value] Function g: postcondition got status valid. -PROJECT_FILE.i:144:[value] Function g: postcondition got status valid. +PROJECT_FILE.i:146:[value] Function g: postcondition got status valid. +PROJECT_FILE.i:147:[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:369. + Called from PROJECT_FILE.i:349. PROJECT_FILE.i:162:[value] Function h: precondition got status valid. [value] computing for function mpz_init_set_si <- h <- main. Called from PROJECT_FILE.i:166. @@ -110,15 +104,15 @@ PROJECT_FILE.i:162:[value] Function h: precondition got status valid. [value] computing for function e_acsl_fail <- h <- main. Called from PROJECT_FILE.i:168. [value] computing for function printf <- e_acsl_fail <- h <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- h <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- h <- main. - Called from PROJECT_FILE.i:169. + Called from PROJECT_FILE.i:168. [value] Done for function mpz_clear [value] computing for function mpz_clear <- h <- main. Called from PROJECT_FILE.i:169. @@ -126,456 +120,420 @@ PROJECT_FILE.i:162:[value] Function h: precondition got status valid. [value] Recording results for h [value] Done for function h [value] computing for function i <- main. - Called from PROJECT_FILE.i:370. + Called from PROJECT_FILE.i:350. +PROJECT_FILE.i:175:[value] Function i: precondition got status valid. PROJECT_FILE.i:176:[value] Function i: precondition got status valid. -PROJECT_FILE.i:177:[value] Function i: precondition got status valid. [value] computing for function mpz_init_set_si <- i <- main. - Called from PROJECT_FILE.i:181. + Called from PROJECT_FILE.i:180. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- i <- main. - Called from PROJECT_FILE.i:182. + Called from PROJECT_FILE.i:181. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- i <- main. - Called from PROJECT_FILE.i:182. + Called from PROJECT_FILE.i:181. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- i <- main. - Called from PROJECT_FILE.i:183. + Called from PROJECT_FILE.i:182. [value] computing for function printf <- e_acsl_fail <- i <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- i <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_init_set_si <- i <- main. - Called from PROJECT_FILE.i:184. + Called from PROJECT_FILE.i:183. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- i <- main. - Called from PROJECT_FILE.i:184. + Called from PROJECT_FILE.i:183. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- i <- main. - Called from PROJECT_FILE.i:185. + Called from PROJECT_FILE.i:184. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- i <- main. - Called from PROJECT_FILE.i:186. + Called from PROJECT_FILE.i:185. [value] computing for function printf <- e_acsl_fail <- i <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- i <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- i <- main. - Called from PROJECT_FILE.i:187. + Called from PROJECT_FILE.i:185. [value] Done for function mpz_clear [value] computing for function mpz_clear <- i <- main. - Called from PROJECT_FILE.i:187. + Called from PROJECT_FILE.i:186. [value] Done for function mpz_clear [value] computing for function mpz_clear <- i <- main. - Called from PROJECT_FILE.i:187. + Called from PROJECT_FILE.i:186. [value] Done for function mpz_clear [value] computing for function mpz_clear <- i <- main. - Called from PROJECT_FILE.i:188. + Called from PROJECT_FILE.i:186. [value] Done for function mpz_clear [value] Recording results for i [value] Done for function i [value] computing for function j <- main. - Called from PROJECT_FILE.i:371. -PROJECT_FILE.i:196:[value] Function j, behavior b1: precondition got status valid. -PROJECT_FILE.i:200:[value] Function j, behavior b2: precondition got status valid. -PROJECT_FILE.i:201:[value] Function j, behavior b2: precondition got status valid. + Called from PROJECT_FILE.i:351. +PROJECT_FILE.i:193:[value] Function j, behavior b1: precondition got status valid. +PROJECT_FILE.i:197:[value] Function j, behavior b2: precondition got status valid. +PROJECT_FILE.i:198:[value] Function j, behavior b2: precondition got status valid. [value] computing for function mpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:211. + Called from PROJECT_FILE.i:207. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:211. + Called from PROJECT_FILE.i:207. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- j <- main. - Called from PROJECT_FILE.i:212. + Called from PROJECT_FILE.i:208. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- j <- main. - Called from PROJECT_FILE.i:213. + Called from PROJECT_FILE.i:209. [value] computing for function printf <- e_acsl_fail <- j <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- j <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:214. + Called from PROJECT_FILE.i:210. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:214. -[value] Done for function mpz_init_set_si -[value] computing for function mpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:215. + Called from PROJECT_FILE.i:210. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- j <- main. - Called from PROJECT_FILE.i:215. + Called from PROJECT_FILE.i:211. PROJECT_FILE.i:21:[value] Function mpz_init: postcondition got status valid. [value] Done for function mpz_init [value] computing for function mpz_add <- j <- main. - Called from PROJECT_FILE.i:216. -PROJECT_FILE.i:60:[value] Function mpz_add: precondition got status valid. -PROJECT_FILE.i:61:[value] Function mpz_add: precondition got status valid. -PROJECT_FILE.i:62:[value] Function mpz_add: precondition got status valid. + Called from PROJECT_FILE.i:211. +PROJECT_FILE.i:64:[value] Function mpz_add: precondition got status valid. +PROJECT_FILE.i:65:[value] Function mpz_add: precondition got status valid. +PROJECT_FILE.i:66:[value] Function mpz_add: precondition got status valid. [value] Done for function mpz_add [value] computing for function mpz_cmp <- j <- main. - Called from PROJECT_FILE.i:217. + Called from PROJECT_FILE.i:212. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- j <- main. - Called from PROJECT_FILE.i:218. + Called from PROJECT_FILE.i:213. [value] computing for function printf <- e_acsl_fail <- j <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- j <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:219. -[value] Done for function mpz_init_set_si -[value] computing for function mpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:219. + Called from PROJECT_FILE.i:214. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- j <- main. - Called from PROJECT_FILE.i:220. + Called from PROJECT_FILE.i:214. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- j <- main. - Called from PROJECT_FILE.i:221. + Called from PROJECT_FILE.i:215. [value] computing for function printf <- e_acsl_fail <- j <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- j <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- j <- main. - Called from PROJECT_FILE.i:222. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- j <- main. - Called from PROJECT_FILE.i:222. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- j <- main. - Called from PROJECT_FILE.i:222. + Called from PROJECT_FILE.i:215. [value] Done for function mpz_clear [value] computing for function mpz_clear <- j <- main. - Called from PROJECT_FILE.i:223. + Called from PROJECT_FILE.i:216. [value] Done for function mpz_clear [value] computing for function mpz_clear <- j <- main. - Called from PROJECT_FILE.i:223. + Called from PROJECT_FILE.i:216. [value] Done for function mpz_clear [value] computing for function mpz_clear <- j <- main. - Called from PROJECT_FILE.i:223. + Called from PROJECT_FILE.i:216. [value] Done for function mpz_clear [value] computing for function mpz_clear <- j <- main. - Called from PROJECT_FILE.i:224. + Called from PROJECT_FILE.i:217. [value] Done for function mpz_clear [value] computing for function mpz_clear <- j <- main. - Called from PROJECT_FILE.i:224. + Called from PROJECT_FILE.i:217. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:230. + Called from PROJECT_FILE.i:222. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:230. + Called from PROJECT_FILE.i:222. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- j <- main. - Called from PROJECT_FILE.i:231. + Called from PROJECT_FILE.i:223. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- j <- main. - Called from PROJECT_FILE.i:232. + Called from PROJECT_FILE.i:224. [value] computing for function printf <- e_acsl_fail <- j <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- j <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:233. -[value] Done for function mpz_init_set_si -[value] computing for function mpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:233. + Called from PROJECT_FILE.i:225. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- j <- main. - Called from PROJECT_FILE.i:234. + Called from PROJECT_FILE.i:225. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- j <- main. - Called from PROJECT_FILE.i:234. + Called from PROJECT_FILE.i:226. [value] Done for function mpz_init [value] computing for function mpz_add <- j <- main. - Called from PROJECT_FILE.i:235. + Called from PROJECT_FILE.i:226. [value] Done for function mpz_add [value] computing for function mpz_cmp <- j <- main. - Called from PROJECT_FILE.i:236. + Called from PROJECT_FILE.i:227. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- j <- main. - Called from PROJECT_FILE.i:237. + Called from PROJECT_FILE.i:228. [value] computing for function printf <- e_acsl_fail <- j <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- j <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- j <- main. - Called from PROJECT_FILE.i:238. + Called from PROJECT_FILE.i:229. [value] Done for function mpz_clear [value] computing for function mpz_clear <- j <- main. - Called from PROJECT_FILE.i:238. + Called from PROJECT_FILE.i:229. [value] Done for function mpz_clear [value] computing for function mpz_clear <- j <- main. - Called from PROJECT_FILE.i:238. + Called from PROJECT_FILE.i:229. [value] Done for function mpz_clear [value] computing for function mpz_clear <- j <- main. - Called from PROJECT_FILE.i:239. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- j <- main. - Called from PROJECT_FILE.i:239. + Called from PROJECT_FILE.i:230. [value] Done for function mpz_clear [value] computing for function mpz_clear <- j <- main. - Called from PROJECT_FILE.i:239. + Called from PROJECT_FILE.i:230. [value] Done for function mpz_clear -PROJECT_FILE.i:197:[value] Function j, behavior b1: postcondition got status valid. -PROJECT_FILE.i:202:[value] Function j, behavior b2: postcondition got status valid. +PROJECT_FILE.i:194:[value] Function j, behavior b1: postcondition got status valid. +PROJECT_FILE.i:199:[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:372. -PROJECT_FILE.i:247:[value] Function k, behavior b1: assumption got status invalid; precondition not evaluated. -PROJECT_FILE.i:252:[value] Function k, behavior b2: precondition got status valid. -PROJECT_FILE.i:253:[value] Function k, behavior b2: precondition got status valid. + Called from PROJECT_FILE.i:352. +PROJECT_FILE.i:237:[value] Function k, behavior b1: assumption got status invalid; precondition not evaluated. +PROJECT_FILE.i:242:[value] Function k, behavior b2: precondition got status valid. +PROJECT_FILE.i:243:[value] Function k, behavior b2: precondition got status valid. [value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:266. + Called from PROJECT_FILE.i:251. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:267. + Called from PROJECT_FILE.i:252. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- k <- main. - Called from PROJECT_FILE.i:267. + Called from PROJECT_FILE.i:252. [value] Done for function mpz_cmp [value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:273. + Called from PROJECT_FILE.i:258. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:274. + Called from PROJECT_FILE.i:259. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- k <- main. - Called from PROJECT_FILE.i:275. + Called from PROJECT_FILE.i:260. [value] Done for function mpz_cmp -PROJECT_FILE.i:276:[value] assigning non deterministic value for the first time +PROJECT_FILE.i:261:[value] assigning non deterministic value for the first time [value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:277. + Called from PROJECT_FILE.i:262. [value] Done for function mpz_clear [value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:278. + Called from PROJECT_FILE.i:263. [value] Done for function mpz_clear [value] computing for function e_acsl_fail <- k <- main. - Called from PROJECT_FILE.i:279. + Called from PROJECT_FILE.i:264. [value] computing for function printf <- e_acsl_fail <- k <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- k <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:280. -[value] Done for function mpz_init_set_si -[value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:280. + Called from PROJECT_FILE.i:265. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- k <- main. - Called from PROJECT_FILE.i:281. + Called from PROJECT_FILE.i:265. [value] Done for function mpz_cmp [value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:286. + Called from PROJECT_FILE.i:270. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:287. + Called from PROJECT_FILE.i:271. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- k <- main. - Called from PROJECT_FILE.i:288. + Called from PROJECT_FILE.i:272. [value] Done for function mpz_cmp [value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:290. + Called from PROJECT_FILE.i:274. [value] Done for function mpz_clear [value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:291. + Called from PROJECT_FILE.i:275. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:297. + Called from PROJECT_FILE.i:281. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:298. + Called from PROJECT_FILE.i:282. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- k <- main. - Called from PROJECT_FILE.i:299. + Called from PROJECT_FILE.i:283. [value] Done for function mpz_cmp [value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:301. + Called from PROJECT_FILE.i:285. [value] Done for function mpz_clear [value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:302. + Called from PROJECT_FILE.i:286. [value] Done for function mpz_clear [value] computing for function e_acsl_fail <- k <- main. - Called from PROJECT_FILE.i:303. + Called from PROJECT_FILE.i:287. [value] computing for function printf <- e_acsl_fail <- k <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- k <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail -[value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:304. -[value] Done for function mpz_init_set_si -[value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:304. -[value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- k <- main. - Called from PROJECT_FILE.i:305. + Called from PROJECT_FILE.i:288. [value] Done for function mpz_cmp [value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:310. + Called from PROJECT_FILE.i:293. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:311. + Called from PROJECT_FILE.i:294. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- k <- main. - Called from PROJECT_FILE.i:312. + Called from PROJECT_FILE.i:295. [value] Done for function mpz_cmp [value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:314. + Called from PROJECT_FILE.i:297. [value] Done for function mpz_clear [value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:315. + Called from PROJECT_FILE.i:298. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:323. + Called from PROJECT_FILE.i:306. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:324. + Called from PROJECT_FILE.i:307. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- k <- main. - Called from PROJECT_FILE.i:325. + Called from PROJECT_FILE.i:308. [value] Done for function mpz_init [value] computing for function mpz_add <- k <- main. - Called from PROJECT_FILE.i:326. + Called from PROJECT_FILE.i:309. [value] Done for function mpz_add [value] computing for function mpz_init_set_si <- k <- main. - Called from PROJECT_FILE.i:327. + Called from PROJECT_FILE.i:310. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- k <- main. - Called from PROJECT_FILE.i:328. + Called from PROJECT_FILE.i:311. [value] Done for function mpz_cmp [value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:330. + Called from PROJECT_FILE.i:313. [value] Done for function mpz_clear [value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:331. + Called from PROJECT_FILE.i:314. [value] Done for function mpz_clear [value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:332. + Called from PROJECT_FILE.i:315. [value] Done for function mpz_clear [value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:333. + Called from PROJECT_FILE.i:316. [value] Done for function mpz_clear [value] computing for function e_acsl_fail <- k <- main. - Called from PROJECT_FILE.i:334. + Called from PROJECT_FILE.i:317. [value] computing for function printf <- e_acsl_fail <- k <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- k <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:335. + Called from PROJECT_FILE.i:318. [value] Done for function mpz_clear [value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:335. + Called from PROJECT_FILE.i:318. [value] Done for function mpz_clear [value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:335. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:336. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:336. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- k <- main. - Called from PROJECT_FILE.i:336. + Called from PROJECT_FILE.i:318. [value] Done for function mpz_clear [value] Recording results for k [value] Done for function k [value] computing for function l <- main. - Called from PROJECT_FILE.i:373. -PROJECT_FILE.i:346:[value] Assertion got status valid. + Called from PROJECT_FILE.i:353. +PROJECT_FILE.i:327:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- l <- main. - Called from PROJECT_FILE.i:348. + Called from PROJECT_FILE.i:329. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- l <- main. - Called from PROJECT_FILE.i:348. + Called from PROJECT_FILE.i:329. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- l <- main. - Called from PROJECT_FILE.i:349. + Called from PROJECT_FILE.i:330. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- l <- main. - Called from PROJECT_FILE.i:350. + Called from PROJECT_FILE.i:331. [value] computing for function printf <- e_acsl_fail <- l <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- l <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- l <- main. - Called from PROJECT_FILE.i:351. + Called from PROJECT_FILE.i:331. [value] Done for function mpz_clear [value] computing for function mpz_clear <- l <- main. - Called from PROJECT_FILE.i:351. + Called from PROJECT_FILE.i:332. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- l <- main. - Called from PROJECT_FILE.i:355. + Called from PROJECT_FILE.i:336. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- l <- main. - Called from PROJECT_FILE.i:355. + Called from PROJECT_FILE.i:336. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- l <- main. - Called from PROJECT_FILE.i:356. + Called from PROJECT_FILE.i:337. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- l <- main. - Called from PROJECT_FILE.i:357. + Called from PROJECT_FILE.i:338. [value] computing for function printf <- e_acsl_fail <- l <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- l <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- l <- main. - Called from PROJECT_FILE.i:358. + Called from PROJECT_FILE.i:338. [value] Done for function mpz_clear [value] computing for function mpz_clear <- l <- main. - Called from PROJECT_FILE.i:358. + Called from PROJECT_FILE.i:339. [value] Done for function mpz_clear -PROJECT_FILE.i:343:[value] Function l: postcondition got status valid. +PROJECT_FILE.i:324:[value] Function l: postcondition got status valid. [value] Recording results for l [value] Done for function l [value] Recording results for main @@ -611,7 +569,8 @@ typedef __mpz_struct mpz_t[1]; assigns *x; */ extern void mpz_init(__mpz_struct * /*[1]*/ x); /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void mpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ @@ -655,10 +614,9 @@ void f(void) (__mpz_struct const *)(e_acsl_2)); if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(X == 1)"); } mpz_clear((__mpz_struct *)(e_acsl_1)); - mpz_clear((__mpz_struct *)(e_acsl_2)); + mpz_clear((__mpz_struct *)(e_acsl_2)); return; } - return; } /*@ ensures X ≡ 2; @@ -667,24 +625,20 @@ void g(void) { X = 2; { 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; - mpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); + int e_acsl_5; mpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); mpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)2); e_acsl_3 = mpz_cmp((__mpz_struct const *)(e_acsl_1), (__mpz_struct const *)(e_acsl_2)); if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(X == 2)"); } mpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)Y); - mpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)2); - e_acsl_6 = mpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - if (! (e_acsl_6 == 0)) { e_acsl_fail((char *)"(Y == 2)"); } + e_acsl_5 = mpz_cmp((__mpz_struct const *)(e_acsl_4), + (__mpz_struct const *)(e_acsl_2)); + if (! (e_acsl_5 == 0)) { e_acsl_fail((char *)"(Y == 2)"); } mpz_clear((__mpz_struct *)(e_acsl_1)); mpz_clear((__mpz_struct *)(e_acsl_2)); - mpz_clear((__mpz_struct *)(e_acsl_4)); - mpz_clear((__mpz_struct *)(e_acsl_5)); + mpz_clear((__mpz_struct *)(e_acsl_4)); return; } - return; } /*@ requires X ≡ 2; */ @@ -697,10 +651,9 @@ void h(void) (__mpz_struct const *)(e_acsl_2)); if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(X == 2)"); } mpz_clear((__mpz_struct *)(e_acsl_1)); - mpz_clear((__mpz_struct *)(e_acsl_2)); + mpz_clear((__mpz_struct *)(e_acsl_2)); X ++; } - X ++; return; } @@ -723,10 +676,9 @@ void i(void) mpz_clear((__mpz_struct *)(e_acsl_1)); mpz_clear((__mpz_struct *)(e_acsl_2)); mpz_clear((__mpz_struct *)(e_acsl_4)); - mpz_clear((__mpz_struct *)(e_acsl_5)); + mpz_clear((__mpz_struct *)(e_acsl_5)); X += Y; } - X += Y; return; } @@ -744,63 +696,54 @@ 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; mpz_t e_acsl_7; int e_acsl_8; - mpz_t e_acsl_9; mpz_t e_acsl_10; int e_acsl_11; - mpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); + mpz_t e_acsl_5; mpz_t e_acsl_6; int e_acsl_7; mpz_t e_acsl_8; + int e_acsl_9; mpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); mpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)5); e_acsl_3 = mpz_cmp((__mpz_struct const *)(e_acsl_1), (__mpz_struct const *)(e_acsl_2)); if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(X == 5)"); } - mpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)X); - mpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)3); - mpz_init_set_si((__mpz_struct *)(e_acsl_6),(long)Y); - mpz_init((__mpz_struct *)(e_acsl_7)); - mpz_add((__mpz_struct *)(e_acsl_7),(__mpz_struct const *)(e_acsl_5), - (__mpz_struct const *)(e_acsl_6)); - e_acsl_8 = mpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_7)); - if (! (e_acsl_8 == 0)) { e_acsl_fail((char *)"(X == 3+Y)"); } - mpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)Y); - mpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)2); - e_acsl_11 = mpz_cmp((__mpz_struct const *)(e_acsl_9), - (__mpz_struct const *)(e_acsl_10)); - if (! (e_acsl_11 == 0)) { e_acsl_fail((char *)"(Y == 2)"); } + mpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)3); + mpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)Y); + mpz_init((__mpz_struct *)(e_acsl_6)); + mpz_add((__mpz_struct *)(e_acsl_6),(__mpz_struct const *)(e_acsl_4), + (__mpz_struct const *)(e_acsl_5)); + e_acsl_7 = mpz_cmp((__mpz_struct const *)(e_acsl_1), + (__mpz_struct const *)(e_acsl_6)); + if (! (e_acsl_7 == 0)) { e_acsl_fail((char *)"(X == 3+Y)"); } + mpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)2); + e_acsl_9 = mpz_cmp((__mpz_struct const *)(e_acsl_5), + (__mpz_struct const *)(e_acsl_8)); + if (! (e_acsl_9 == 0)) { e_acsl_fail((char *)"(Y == 2)"); } mpz_clear((__mpz_struct *)(e_acsl_1)); mpz_clear((__mpz_struct *)(e_acsl_2)); mpz_clear((__mpz_struct *)(e_acsl_4)); mpz_clear((__mpz_struct *)(e_acsl_5)); mpz_clear((__mpz_struct *)(e_acsl_6)); - mpz_clear((__mpz_struct *)(e_acsl_7)); - mpz_clear((__mpz_struct *)(e_acsl_9)); - mpz_clear((__mpz_struct *)(e_acsl_10)); + mpz_clear((__mpz_struct *)(e_acsl_8)); X = 3; } - X = 3; - { mpz_t e_acsl_12; mpz_t e_acsl_13; int e_acsl_14; mpz_t e_acsl_15; - mpz_t e_acsl_16; mpz_t e_acsl_17; mpz_t e_acsl_18; int e_acsl_19; - mpz_init_set_si((__mpz_struct *)(e_acsl_12),(long)X); - mpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)3); - e_acsl_14 = mpz_cmp((__mpz_struct const *)(e_acsl_12), - (__mpz_struct const *)(e_acsl_13)); - if (! (e_acsl_14 == 0)) { e_acsl_fail((char *)"(X == 3)"); } - mpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)X); - mpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)Y); - mpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)1); - mpz_init((__mpz_struct *)(e_acsl_18)); - mpz_add((__mpz_struct *)(e_acsl_18),(__mpz_struct const *)(e_acsl_16), - (__mpz_struct const *)(e_acsl_17)); - e_acsl_19 = mpz_cmp((__mpz_struct const *)(e_acsl_15), - (__mpz_struct const *)(e_acsl_18)); - if (! (e_acsl_19 == 0)) { e_acsl_fail((char *)"(X == Y+1)"); } - mpz_clear((__mpz_struct *)(e_acsl_12)); + { 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; + mpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)X); + mpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)3); + e_acsl_12 = mpz_cmp((__mpz_struct const *)(e_acsl_10), + (__mpz_struct const *)(e_acsl_11)); + if (! (e_acsl_12 == 0)) { e_acsl_fail((char *)"(X == 3)"); } + mpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)Y); + mpz_init_set_si((__mpz_struct *)(e_acsl_14),(long)1); + mpz_init((__mpz_struct *)(e_acsl_15)); + mpz_add((__mpz_struct *)(e_acsl_15),(__mpz_struct const *)(e_acsl_13), + (__mpz_struct const *)(e_acsl_14)); + e_acsl_16 = mpz_cmp((__mpz_struct const *)(e_acsl_10), + (__mpz_struct const *)(e_acsl_15)); + if (! (e_acsl_16 == 0)) { e_acsl_fail((char *)"(X == Y+1)"); } + mpz_clear((__mpz_struct *)(e_acsl_10)); + mpz_clear((__mpz_struct *)(e_acsl_11)); mpz_clear((__mpz_struct *)(e_acsl_13)); - mpz_clear((__mpz_struct *)(e_acsl_15)); - mpz_clear((__mpz_struct *)(e_acsl_16)); - mpz_clear((__mpz_struct *)(e_acsl_17)); - mpz_clear((__mpz_struct *)(e_acsl_18)); + mpz_clear((__mpz_struct *)(e_acsl_14)); + mpz_clear((__mpz_struct *)(e_acsl_15)); return; } - return; } /*@ behavior b1: @@ -818,102 +761,95 @@ void j(void) void k(void) { { mpz_t e_acsl_1; mpz_t e_acsl_2; int e_acsl_3; int e_acsl_7; - mpz_t e_acsl_8; mpz_t e_acsl_9; int e_acsl_10; int e_acsl_14; - int e_acsl_18; mpz_t e_acsl_19; mpz_t e_acsl_20; int e_acsl_21; - int e_acsl_25; int e_acsl_31; + 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; mpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); mpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)1); e_acsl_3 = mpz_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_32; - mpz_t e_acsl_33; - int e_acsl_34; - mpz_init_set_si((__mpz_struct *)(e_acsl_32),(long)X); - mpz_init_set_si((__mpz_struct *)(e_acsl_33),(long)0); - e_acsl_34 = mpz_cmp((__mpz_struct const *)(e_acsl_32), - (__mpz_struct const *)(e_acsl_33)); - e_acsl_7 = e_acsl_34 == 0; - mpz_clear((__mpz_struct *)(e_acsl_32)); - mpz_clear((__mpz_struct *)(e_acsl_33)); + mpz_t e_acsl_4; + mpz_t e_acsl_5; + int e_acsl_6; + mpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)X); + mpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)0); + e_acsl_6 = mpz_cmp((__mpz_struct const *)(e_acsl_4), + (__mpz_struct const *)(e_acsl_5)); + e_acsl_7 = e_acsl_6 == 0; + mpz_clear((__mpz_struct *)(e_acsl_4)); + mpz_clear((__mpz_struct *)(e_acsl_5)); } if (! e_acsl_7) { e_acsl_fail((char *)"(X == 1 ==> X == 0)"); } - mpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)X); - mpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)3); - e_acsl_10 = mpz_cmp((__mpz_struct const *)(e_acsl_8), - (__mpz_struct const *)(e_acsl_9)); - if (e_acsl_10 == 0) { - mpz_t e_acsl_35; - mpz_t e_acsl_36; - int e_acsl_37; - mpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)Y); - mpz_init_set_si((__mpz_struct *)(e_acsl_36),(long)2); - e_acsl_37 = mpz_cmp((__mpz_struct const *)(e_acsl_35), - (__mpz_struct const *)(e_acsl_36)); - e_acsl_14 = e_acsl_37 == 0; - mpz_clear((__mpz_struct *)(e_acsl_35)); - mpz_clear((__mpz_struct *)(e_acsl_36)); - } else { e_acsl_14 = 0; } if (! e_acsl_14) { e_acsl_18 = 1; } + mpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)3); + e_acsl_9 = mpz_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; + mpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)Y); + mpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)2); + e_acsl_12 = mpz_cmp((__mpz_struct const *)(e_acsl_10), + (__mpz_struct const *)(e_acsl_11)); + e_acsl_13 = e_acsl_12 == 0; + mpz_clear((__mpz_struct *)(e_acsl_10)); + mpz_clear((__mpz_struct *)(e_acsl_11)); + } else { e_acsl_13 = 0; } if (! e_acsl_13) { e_acsl_17 = 1; } else { - mpz_t e_acsl_38; - mpz_t e_acsl_39; - int e_acsl_40; - mpz_init_set_si((__mpz_struct *)(e_acsl_38),(long)X); - mpz_init_set_si((__mpz_struct *)(e_acsl_39),(long)3); - e_acsl_40 = mpz_cmp((__mpz_struct const *)(e_acsl_38), - (__mpz_struct const *)(e_acsl_39)); - e_acsl_18 = e_acsl_40 == 0; - mpz_clear((__mpz_struct *)(e_acsl_38)); - mpz_clear((__mpz_struct *)(e_acsl_39)); + mpz_t e_acsl_14; + mpz_t e_acsl_15; + int e_acsl_16; + mpz_init_set_si((__mpz_struct *)(e_acsl_14),(long)X); + mpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)3); + e_acsl_16 = mpz_cmp((__mpz_struct const *)(e_acsl_14), + (__mpz_struct const *)(e_acsl_15)); + e_acsl_17 = e_acsl_16 == 0; + mpz_clear((__mpz_struct *)(e_acsl_14)); + mpz_clear((__mpz_struct *)(e_acsl_15)); } - if (! e_acsl_18) { e_acsl_fail((char *)"(X == 3 && Y == 2 ==> X == 3)"); - } mpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)X); - mpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)3); - e_acsl_21 = mpz_cmp((__mpz_struct const *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_20)); - if (e_acsl_21 == 0) { - mpz_t e_acsl_41; - mpz_t e_acsl_42; - int e_acsl_43; - mpz_init_set_si((__mpz_struct *)(e_acsl_41),(long)Y); - mpz_init_set_si((__mpz_struct *)(e_acsl_42),(long)2); - e_acsl_43 = mpz_cmp((__mpz_struct const *)(e_acsl_41), - (__mpz_struct const *)(e_acsl_42)); - e_acsl_25 = e_acsl_43 == 0; - mpz_clear((__mpz_struct *)(e_acsl_41)); - mpz_clear((__mpz_struct *)(e_acsl_42)); - } else { e_acsl_25 = 0; } if (! e_acsl_25) { e_acsl_31 = 1; } + if (! e_acsl_17) { e_acsl_fail((char *)"(X == 3 && Y == 2 ==> X == 3)"); + } + e_acsl_18 = mpz_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; + mpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)Y); + mpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)2); + e_acsl_21 = mpz_cmp((__mpz_struct const *)(e_acsl_19), + (__mpz_struct const *)(e_acsl_20)); + e_acsl_22 = e_acsl_21 == 0; + mpz_clear((__mpz_struct *)(e_acsl_19)); + mpz_clear((__mpz_struct *)(e_acsl_20)); + } else { e_acsl_22 = 0; } if (! e_acsl_22) { e_acsl_28 = 1; } else { - mpz_t e_acsl_44; - mpz_t e_acsl_45; - mpz_t e_acsl_46; - mpz_t e_acsl_47; - int e_acsl_48; - mpz_init_set_si((__mpz_struct *)(e_acsl_44),(long)X); - mpz_init_set_si((__mpz_struct *)(e_acsl_45),(long)Y); - mpz_init((__mpz_struct *)(e_acsl_46)); - mpz_add((__mpz_struct *)(e_acsl_46),(__mpz_struct const *)(e_acsl_44), - (__mpz_struct const *)(e_acsl_45)); - mpz_init_set_si((__mpz_struct *)(e_acsl_47),(long)5); - e_acsl_48 = mpz_cmp((__mpz_struct const *)(e_acsl_46), - (__mpz_struct const *)(e_acsl_47)); - e_acsl_31 = e_acsl_48 == 0; - mpz_clear((__mpz_struct *)(e_acsl_44)); - mpz_clear((__mpz_struct *)(e_acsl_45)); - mpz_clear((__mpz_struct *)(e_acsl_46)); - mpz_clear((__mpz_struct *)(e_acsl_47)); + mpz_t e_acsl_23; + mpz_t e_acsl_24; + mpz_t e_acsl_25; + mpz_t e_acsl_26; + int e_acsl_27; + mpz_init_set_si((__mpz_struct *)(e_acsl_23),(long)X); + mpz_init_set_si((__mpz_struct *)(e_acsl_24),(long)Y); + mpz_init((__mpz_struct *)(e_acsl_25)); + mpz_add((__mpz_struct *)(e_acsl_25),(__mpz_struct const *)(e_acsl_23), + (__mpz_struct const *)(e_acsl_24)); + mpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)5); + e_acsl_27 = mpz_cmp((__mpz_struct const *)(e_acsl_25), + (__mpz_struct const *)(e_acsl_26)); + e_acsl_28 = e_acsl_27 == 0; + mpz_clear((__mpz_struct *)(e_acsl_23)); + mpz_clear((__mpz_struct *)(e_acsl_24)); + mpz_clear((__mpz_struct *)(e_acsl_25)); + mpz_clear((__mpz_struct *)(e_acsl_26)); } - if (! e_acsl_31) { + if (! e_acsl_28) { e_acsl_fail((char *)"(X == 3 && Y == 2 ==> X+Y == 5)"); } mpz_clear((__mpz_struct *)(e_acsl_1)); mpz_clear((__mpz_struct *)(e_acsl_2)); - mpz_clear((__mpz_struct *)(e_acsl_8)); - mpz_clear((__mpz_struct *)(e_acsl_9)); - mpz_clear((__mpz_struct *)(e_acsl_19)); - mpz_clear((__mpz_struct *)(e_acsl_20)); + mpz_clear((__mpz_struct *)(e_acsl_8)); X += Y; } - X += Y; return; } @@ -938,10 +874,9 @@ int l(void) (__mpz_struct const *)(e_acsl_5)); if (! (e_acsl_6 == 0)) { e_acsl_fail((char *)"(X == 5)"); } mpz_clear((__mpz_struct *)(e_acsl_4)); - mpz_clear((__mpz_struct *)(e_acsl_5)); + mpz_clear((__mpz_struct *)(e_acsl_5)); return (X); } - return (X); } int main(void) 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 f9a3f1a52e3..401f3dbd3d6 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 @@ -71,7 +71,8 @@ __pure__)); assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); /*@ ensures \valid(\old(z)); - assigns *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; */ @@ -645,193 +646,189 @@ int main(void) } /*@ assert 0 ≢ ~0; */ ; - { mpz_t e_acsl_9; mpz_t e_acsl_10; mpz_t e_acsl_11; int e_acsl_12; + { 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_set_si((__mpz_struct *)(e_acsl_10),(long)0); - __gmpz_init((__mpz_struct *)(e_acsl_11)); - __gmpz_com(e_acsl_11,(__mpz_struct const *)(e_acsl_10)); - e_acsl_12 = __gmpz_cmp((__mpz_struct const *)(e_acsl_9), - (__mpz_struct const *)(e_acsl_11)); - if (! (e_acsl_12 != 0)) { e_acsl_fail((char *)"(0 != ~0)"); } + __gmpz_init((__mpz_struct *)(e_acsl_10)); + __gmpz_com(e_acsl_10,(__mpz_struct const *)(e_acsl_9)); + e_acsl_11 = __gmpz_cmp((__mpz_struct const *)(e_acsl_9), + (__mpz_struct const *)(e_acsl_10)); + if (! (e_acsl_11 != 0)) { e_acsl_fail((char *)"(0 != ~0)"); } __gmpz_clear((__mpz_struct *)(e_acsl_9)); __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); } /*@ assert x+1 ≡ -2; */ ; - { mpz_t e_acsl_13; mpz_t e_acsl_14; 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_13),(long)x); - __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)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_17)); - __gmpz_neg((__mpz_struct *)(e_acsl_17),(__mpz_struct const *)(e_acsl_16)); - e_acsl_18 = __gmpz_cmp((__mpz_struct const *)(e_acsl_15), - (__mpz_struct const *)(e_acsl_17)); - if (! (e_acsl_18 == 0)) { e_acsl_fail((char *)"(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)); + if (! (e_acsl_17 == 0)) { e_acsl_fail((char *)"(x+1 == -2)"); } + __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)); - __gmpz_clear((__mpz_struct *)(e_acsl_17)); } /*@ assert x-1 ≡ -4; */ ; - { mpz_t e_acsl_19; mpz_t e_acsl_20; mpz_t e_acsl_21; mpz_t e_acsl_22; - mpz_t e_acsl_23; int e_acsl_24; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_21)); - __gmpz_sub((__mpz_struct *)(e_acsl_21),(__mpz_struct const *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_20)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_22),(long)4); - __gmpz_init((__mpz_struct *)(e_acsl_23)); - __gmpz_neg((__mpz_struct *)(e_acsl_23),(__mpz_struct const *)(e_acsl_22)); - e_acsl_24 = __gmpz_cmp((__mpz_struct const *)(e_acsl_21), - (__mpz_struct const *)(e_acsl_23)); - if (! (e_acsl_24 == 0)) { e_acsl_fail((char *)"(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)); + if (! (e_acsl_23 == 0)) { e_acsl_fail((char *)"(x-1 == -4)"); } + __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)); - __gmpz_clear((__mpz_struct *)(e_acsl_23)); } /*@ assert x*3 ≡ -9; */ ; - { mpz_t e_acsl_25; mpz_t e_acsl_26; mpz_t e_acsl_27; mpz_t e_acsl_28; - mpz_t e_acsl_29; int e_acsl_30; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_25),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)3); - __gmpz_init((__mpz_struct *)(e_acsl_27)); - __gmpz_mul((__mpz_struct *)(e_acsl_27),(__mpz_struct const *)(e_acsl_25), - (__mpz_struct const *)(e_acsl_26)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_28),(long)9); - __gmpz_init((__mpz_struct *)(e_acsl_29)); - __gmpz_neg((__mpz_struct *)(e_acsl_29),(__mpz_struct const *)(e_acsl_28)); - e_acsl_30 = __gmpz_cmp((__mpz_struct const *)(e_acsl_27), - (__mpz_struct const *)(e_acsl_29)); - if (! (e_acsl_30 == 0)) { e_acsl_fail((char *)"(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)); + if (! (e_acsl_29 == 0)) { e_acsl_fail((char *)"(x*3 == -9)"); } + __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)); - __gmpz_clear((__mpz_struct *)(e_acsl_29)); } /*@ assert x/3 ≡ -1; */ ; - { mpz_t e_acsl_31; mpz_t e_acsl_32; int e_acsl_33; mpz_t e_acsl_34; - mpz_t e_acsl_35; mpz_t e_acsl_36; 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)3); - e_acsl_33 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_32)); - __gmpz_init((__mpz_struct *)(e_acsl_34)); /*@ assert 3 ≢ 0; */ ; - if (e_acsl_33 == 0) { e_acsl_fail((char *)"(3 == 0)"); } - __gmpz_cdiv_q((__mpz_struct *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_31), - (__mpz_struct const *)(e_acsl_32)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_36)); - __gmpz_neg((__mpz_struct *)(e_acsl_36),(__mpz_struct const *)(e_acsl_35)); - e_acsl_37 = __gmpz_cmp((__mpz_struct const *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_36)); - if (! (e_acsl_37 == 0)) { e_acsl_fail((char *)"(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)); /*@ assert 3 ≢ 0; */ ; + if (e_acsl_32 == 0) { e_acsl_fail((char *)"(3 == 0)"); } + __gmpz_cdiv_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)); + if (! (e_acsl_36 == 0)) { e_acsl_fail((char *)"(x/3 == -1)"); } + __gmpz_clear((__mpz_struct *)(e_acsl_30)); __gmpz_clear((__mpz_struct *)(e_acsl_31)); - __gmpz_clear((__mpz_struct *)(e_acsl_32)); + __gmpz_clear((__mpz_struct *)(e_acsl_33)); __gmpz_clear((__mpz_struct *)(e_acsl_34)); __gmpz_clear((__mpz_struct *)(e_acsl_35)); - __gmpz_clear((__mpz_struct *)(e_acsl_36)); } /*@ assert 0xfffffffffff/0xfffffffffff ≡ 1; */ ; - { mpz_t e_acsl_38; mpz_t e_acsl_39; mpz_t e_acsl_40; int e_acsl_41; - mpz_t e_acsl_42; mpz_t e_acsl_43; int e_acsl_44; - __gmpz_init_set_str((__mpz_struct *)(e_acsl_38),"17592186044415",10); - __gmpz_init_set_str((__mpz_struct *)(e_acsl_39),"17592186044415",10); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_40),(long)0); - e_acsl_41 = __gmpz_cmp((__mpz_struct const *)(e_acsl_39), - (__mpz_struct const *)(e_acsl_40)); - __gmpz_init((__mpz_struct *)(e_acsl_42)); + { 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)); /*@ assert 0xfffffffffff ≢ 0; */ ; - if (e_acsl_41 == 0) { e_acsl_fail((char *)"(0xfffffffffff == 0)"); } - __gmpz_cdiv_q((__mpz_struct *)(e_acsl_42), - (__mpz_struct const *)(e_acsl_38), - (__mpz_struct const *)(e_acsl_39)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_43),(long)1); - e_acsl_44 = __gmpz_cmp((__mpz_struct const *)(e_acsl_42), - (__mpz_struct const *)(e_acsl_43)); - if (! (e_acsl_44 == 0)) { + if (e_acsl_39 == 0) { e_acsl_fail((char *)"(0xfffffffffff == 0)"); } + __gmpz_cdiv_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)); + if (! (e_acsl_42 == 0)) { e_acsl_fail((char *)"(0xfffffffffff/0xfffffffffff == 1)"); - } __gmpz_clear((__mpz_struct *)(e_acsl_38)); - __gmpz_clear((__mpz_struct *)(e_acsl_39)); + } __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_42)); - __gmpz_clear((__mpz_struct *)(e_acsl_43)); + __gmpz_clear((__mpz_struct *)(e_acsl_41)); } /*@ assert x%2 ≡ -1; */ ; - { mpz_t e_acsl_45; mpz_t e_acsl_46; int e_acsl_47; mpz_t e_acsl_48; - mpz_t e_acsl_49; mpz_t e_acsl_50; int e_acsl_51; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_45),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_46),(long)2); - e_acsl_47 = (int)__gmpz_get_si((__mpz_struct const *)(e_acsl_46)); - __gmpz_init((__mpz_struct *)(e_acsl_48)); /*@ assert 2 ≢ 0; */ ; - if (e_acsl_47 == 0) { e_acsl_fail((char *)"(2 == 0)"); } - __gmpz_fdiv_r_ui(e_acsl_48,(__mpz_struct const *)(e_acsl_45), - (unsigned long)(e_acsl_46)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_49),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_50)); - __gmpz_neg((__mpz_struct *)(e_acsl_50),(__mpz_struct const *)(e_acsl_49)); - e_acsl_51 = __gmpz_cmp((__mpz_struct const *)(e_acsl_48), - (__mpz_struct const *)(e_acsl_50)); - if (! (e_acsl_51 == 0)) { e_acsl_fail((char *)"(x%2 == -1)"); } - __gmpz_clear((__mpz_struct *)(e_acsl_45)); + { 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)); /*@ assert 2 ≢ 0; */ ; + if (e_acsl_45 == 0) { e_acsl_fail((char *)"(2 == 0)"); } + __gmpz_fdiv_r_ui(e_acsl_46,(__mpz_struct const *)(e_acsl_43), + (unsigned long)(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)); + if (! (e_acsl_49 == 0)) { e_acsl_fail((char *)"(x%2 == -1)"); } + __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)); - __gmpz_clear((__mpz_struct *)(e_acsl_49)); - __gmpz_clear((__mpz_struct *)(e_acsl_50)); } /*@ assert ((x*2+(3+y))-4)+(x-y) ≡ -10; */ ; - { mpz_t e_acsl_52; mpz_t e_acsl_53; mpz_t e_acsl_54; mpz_t e_acsl_55; - mpz_t e_acsl_56; mpz_t e_acsl_57; mpz_t e_acsl_58; mpz_t e_acsl_59; - mpz_t e_acsl_60; mpz_t e_acsl_61; mpz_t e_acsl_62; mpz_t e_acsl_63; - mpz_t 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_52),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_53),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_54)); - __gmpz_mul((__mpz_struct *)(e_acsl_54),(__mpz_struct const *)(e_acsl_52), - (__mpz_struct const *)(e_acsl_53)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_55),(long)3); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_56),(long)y); - __gmpz_init((__mpz_struct *)(e_acsl_57)); - __gmpz_add((__mpz_struct *)(e_acsl_57),(__mpz_struct const *)(e_acsl_55), - (__mpz_struct const *)(e_acsl_56)); + { 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; mpz_t e_acsl_55; mpz_t e_acsl_56; mpz_t e_acsl_57; + mpz_t e_acsl_58; mpz_t e_acsl_59; mpz_t e_acsl_60; mpz_t e_acsl_61; + mpz_t e_acsl_62; int e_acsl_63; + __gmpz_init_set_si((__mpz_struct *)(e_acsl_50),(long)x); + __gmpz_init_set_si((__mpz_struct *)(e_acsl_51),(long)2); + __gmpz_init((__mpz_struct *)(e_acsl_52)); + __gmpz_mul((__mpz_struct *)(e_acsl_52),(__mpz_struct const *)(e_acsl_50), + (__mpz_struct const *)(e_acsl_51)); + __gmpz_init_set_si((__mpz_struct *)(e_acsl_53),(long)3); + __gmpz_init_set_si((__mpz_struct *)(e_acsl_54),(long)y); + __gmpz_init((__mpz_struct *)(e_acsl_55)); + __gmpz_add((__mpz_struct *)(e_acsl_55),(__mpz_struct const *)(e_acsl_53), + (__mpz_struct const *)(e_acsl_54)); + __gmpz_init((__mpz_struct *)(e_acsl_56)); + __gmpz_add((__mpz_struct *)(e_acsl_56),(__mpz_struct const *)(e_acsl_52), + (__mpz_struct const *)(e_acsl_55)); + __gmpz_init_set_si((__mpz_struct *)(e_acsl_57),(long)4); __gmpz_init((__mpz_struct *)(e_acsl_58)); - __gmpz_add((__mpz_struct *)(e_acsl_58),(__mpz_struct const *)(e_acsl_54), + __gmpz_sub((__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)4); + __gmpz_init((__mpz_struct *)(e_acsl_59)); + __gmpz_sub((__mpz_struct *)(e_acsl_59),(__mpz_struct const *)(e_acsl_50), + (__mpz_struct const *)(e_acsl_54)); __gmpz_init((__mpz_struct *)(e_acsl_60)); - __gmpz_sub((__mpz_struct *)(e_acsl_60),(__mpz_struct const *)(e_acsl_58), + __gmpz_add((__mpz_struct *)(e_acsl_60),(__mpz_struct const *)(e_acsl_58), (__mpz_struct const *)(e_acsl_59)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_61),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_62),(long)y); - __gmpz_init((__mpz_struct *)(e_acsl_63)); - __gmpz_sub((__mpz_struct *)(e_acsl_63),(__mpz_struct const *)(e_acsl_61), - (__mpz_struct const *)(e_acsl_62)); - __gmpz_init((__mpz_struct *)(e_acsl_64)); - __gmpz_add((__mpz_struct *)(e_acsl_64),(__mpz_struct const *)(e_acsl_60), - (__mpz_struct const *)(e_acsl_63)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_65),(long)10); - __gmpz_init((__mpz_struct *)(e_acsl_66)); - __gmpz_neg((__mpz_struct *)(e_acsl_66),(__mpz_struct const *)(e_acsl_65)); - e_acsl_67 = __gmpz_cmp((__mpz_struct const *)(e_acsl_64), - (__mpz_struct const *)(e_acsl_66)); - if (! (e_acsl_67 == 0)) { + __gmpz_init_set_si((__mpz_struct *)(e_acsl_61),(long)10); + __gmpz_init((__mpz_struct *)(e_acsl_62)); + __gmpz_neg((__mpz_struct *)(e_acsl_62),(__mpz_struct const *)(e_acsl_61)); + e_acsl_63 = __gmpz_cmp((__mpz_struct const *)(e_acsl_60), + (__mpz_struct const *)(e_acsl_62)); + if (! (e_acsl_63 == 0)) { e_acsl_fail((char *)"(((x*2+(3+y))-4)+(x-y) == -10)"); - } __gmpz_clear((__mpz_struct *)(e_acsl_52)); + } __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_55)); @@ -842,10 +839,6 @@ int main(void) __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_64)); - __gmpz_clear((__mpz_struct *)(e_acsl_65)); - __gmpz_clear((__mpz_struct *)(e_acsl_66)); } /*@ assert (0≡1) ≡ !(0≡0); */ ; @@ -853,6 +846,21 @@ int main(void) e_acsl_fail((char *)"((0==1) == !(0==0))"); } /*@ assert (0≤-1) ≡ (0>0); */ ; + { mpz_t 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_64),(long)0); + __gmpz_init_set_si((__mpz_struct *)(e_acsl_65),(long)1); + __gmpz_init((__mpz_struct *)(e_acsl_66)); + __gmpz_neg((__mpz_struct *)(e_acsl_66),(__mpz_struct const *)(e_acsl_65)); + e_acsl_67 = __gmpz_cmp((__mpz_struct const *)(e_acsl_64), + (__mpz_struct const *)(e_acsl_66)); + if (! ((e_acsl_67 <= 0) == (0 > 0))) { + e_acsl_fail((char *)"((0<=-1) == (0>0))"); + } __gmpz_clear((__mpz_struct *)(e_acsl_64)); + __gmpz_clear((__mpz_struct *)(e_acsl_65)); + __gmpz_clear((__mpz_struct *)(e_acsl_66)); + } + + /*@ assert (0≥-1) ≡ (0≤0); */ ; { mpz_t e_acsl_68; mpz_t e_acsl_69; mpz_t e_acsl_70; int e_acsl_71; __gmpz_init_set_si((__mpz_struct *)(e_acsl_68),(long)0); __gmpz_init_set_si((__mpz_struct *)(e_acsl_69),(long)1); @@ -860,28 +868,13 @@ int main(void) __gmpz_neg((__mpz_struct *)(e_acsl_70),(__mpz_struct const *)(e_acsl_69)); e_acsl_71 = __gmpz_cmp((__mpz_struct const *)(e_acsl_68), (__mpz_struct const *)(e_acsl_70)); - if (! ((e_acsl_71 <= 0) == (0 > 0))) { - e_acsl_fail((char *)"((0<=-1) == (0>0))"); + if (! ((e_acsl_71 >= 0) == (0 <= 0))) { + e_acsl_fail((char *)"((0>=-1) == (0<=0))"); } __gmpz_clear((__mpz_struct *)(e_acsl_68)); __gmpz_clear((__mpz_struct *)(e_acsl_69)); __gmpz_clear((__mpz_struct *)(e_acsl_70)); } - /*@ assert (0≥-1) ≡ (0≤0); */ ; - { mpz_t e_acsl_72; mpz_t e_acsl_73; mpz_t e_acsl_74; int e_acsl_75; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_72),(long)0); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_73),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_74)); - __gmpz_neg((__mpz_struct *)(e_acsl_74),(__mpz_struct const *)(e_acsl_73)); - e_acsl_75 = __gmpz_cmp((__mpz_struct const *)(e_acsl_72), - (__mpz_struct const *)(e_acsl_74)); - if (! ((e_acsl_75 >= 0) == (0 <= 0))) { - e_acsl_fail((char *)"((0>=-1) == (0<=0))"); - } __gmpz_clear((__mpz_struct *)(e_acsl_72)); - __gmpz_clear((__mpz_struct *)(e_acsl_73)); - __gmpz_clear((__mpz_struct *)(e_acsl_74)); - } - /*@ assert (0≢1) ≡ !(0≢0); */ ; if (! ((0 != 1) == ! (0 != 0))) { e_acsl_fail((char *)"((0!=1) == !(0!=0))"); 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 9a49a5b9bac..b2245178ecb 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 @@ -49,7 +49,8 @@ __pure__)); assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); __inline static void __gmpz_neg(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); @@ -676,35 +677,29 @@ int main(void) } /*@ assert -0xff ≡ -0xff; */ ; - { mpz_t e_acsl_23; mpz_t e_acsl_24; mpz_t e_acsl_25; mpz_t e_acsl_26; - int e_acsl_27; + { 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)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_25),(long)0xff); - __gmpz_init((__mpz_struct *)(e_acsl_26)); - __gmpz_neg((__mpz_struct *)(e_acsl_26),(__mpz_struct const *)(e_acsl_25)); - e_acsl_27 = __gmpz_cmp((__mpz_struct const *)(e_acsl_24), - (__mpz_struct const *)(e_acsl_26)); - if (! (e_acsl_27 == 0)) { e_acsl_fail((char *)"(-0xff == -0xff)"); } + e_acsl_25 = __gmpz_cmp((__mpz_struct const *)(e_acsl_24), + (__mpz_struct const *)(e_acsl_24)); + if (! (e_acsl_25 == 0)) { e_acsl_fail((char *)"(-0xff == -0xff)"); } __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)); } /*@ assert 1 ≢ -2; */ ; - { mpz_t e_acsl_28; mpz_t e_acsl_29; mpz_t e_acsl_30; int e_acsl_31; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_28),(long)1); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_29),(long)2); - __gmpz_init((__mpz_struct *)(e_acsl_30)); - __gmpz_neg((__mpz_struct *)(e_acsl_30),(__mpz_struct const *)(e_acsl_29)); - e_acsl_31 = __gmpz_cmp((__mpz_struct const *)(e_acsl_28), - (__mpz_struct const *)(e_acsl_30)); - if (! (e_acsl_31 != 0)) { e_acsl_fail((char *)"(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)); + if (! (e_acsl_29 != 0)) { e_acsl_fail((char *)"(1 != -2)"); } + __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_29)); - __gmpz_clear((__mpz_struct *)(e_acsl_30)); } __retres = 0; 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 8bb2d6e4778..174fb3acbe0 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 @@ -57,7 +57,8 @@ __pure__)); assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); __inline static void __gmpz_neg(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); @@ -588,10 +589,9 @@ void f(void) (__mpz_struct const *)(e_acsl_2)); if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(X == 1)"); } __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); + __gmpz_clear((__mpz_struct *)(e_acsl_2)); return; } - return; } /*@ ensures X ≡ 2; @@ -600,24 +600,20 @@ void g(void) { X = 2; { 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); + 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)); if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(X == 2)"); } __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)); - if (! (e_acsl_6 == 0)) { e_acsl_fail((char *)"(Y == 2)"); } + e_acsl_5 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), + (__mpz_struct const *)(e_acsl_2)); + if (! (e_acsl_5 == 0)) { e_acsl_fail((char *)"(Y == 2)"); } __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_4)); return; } - return; } /*@ requires X ≡ 2; */ @@ -630,10 +626,9 @@ void h(void) (__mpz_struct const *)(e_acsl_2)); if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(X == 2)"); } __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); + __gmpz_clear((__mpz_struct *)(e_acsl_2)); X ++; } - X ++; return; } @@ -656,10 +651,9 @@ void i(void) __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_5)); X += Y; } - X += Y; return; } @@ -677,63 +671,54 @@ 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; mpz_t e_acsl_7; int e_acsl_8; - mpz_t e_acsl_9; mpz_t e_acsl_10; int e_acsl_11; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)X); + 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)); if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(X == 5)"); } - __gmpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)3); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_6),(long)Y); - __gmpz_init((__mpz_struct *)(e_acsl_7)); - __gmpz_add((__mpz_struct *)(e_acsl_7),(__mpz_struct const *)(e_acsl_5), - (__mpz_struct const *)(e_acsl_6)); - e_acsl_8 = __gmpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_7)); - if (! (e_acsl_8 == 0)) { e_acsl_fail((char *)"(X == 3+Y)"); } - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)Y); - __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)); - if (! (e_acsl_11 == 0)) { e_acsl_fail((char *)"(Y == 2)"); } + __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)); + if (! (e_acsl_7 == 0)) { e_acsl_fail((char *)"(X == 3+Y)"); } + __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)); + if (! (e_acsl_9 == 0)) { e_acsl_fail((char *)"(Y == 2)"); } __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_7)); - __gmpz_clear((__mpz_struct *)(e_acsl_9)); - __gmpz_clear((__mpz_struct *)(e_acsl_10)); + __gmpz_clear((__mpz_struct *)(e_acsl_8)); X = 3; } - X = 3; - { mpz_t e_acsl_12; mpz_t e_acsl_13; int e_acsl_14; mpz_t e_acsl_15; - mpz_t e_acsl_16; mpz_t e_acsl_17; mpz_t e_acsl_18; int e_acsl_19; - __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)); - if (! (e_acsl_14 == 0)) { e_acsl_fail((char *)"(X == 3)"); } - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_18)); - __gmpz_add((__mpz_struct *)(e_acsl_18),(__mpz_struct const *)(e_acsl_16), - (__mpz_struct const *)(e_acsl_17)); - e_acsl_19 = __gmpz_cmp((__mpz_struct const *)(e_acsl_15), - (__mpz_struct const *)(e_acsl_18)); - if (! (e_acsl_19 == 0)) { e_acsl_fail((char *)"(X == Y+1)"); } - __gmpz_clear((__mpz_struct *)(e_acsl_12)); + { 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)); + if (! (e_acsl_12 == 0)) { e_acsl_fail((char *)"(X == 3)"); } + __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)); + if (! (e_acsl_16 == 0)) { e_acsl_fail((char *)"(X == Y+1)"); } + __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_15)); - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - __gmpz_clear((__mpz_struct *)(e_acsl_17)); - __gmpz_clear((__mpz_struct *)(e_acsl_18)); + __gmpz_clear((__mpz_struct *)(e_acsl_14)); + __gmpz_clear((__mpz_struct *)(e_acsl_15)); return; } - return; } /*@ behavior b1: @@ -751,103 +736,96 @@ void j(void) void k(void) { { mpz_t e_acsl_1; mpz_t e_acsl_2; int e_acsl_3; int e_acsl_7; - mpz_t e_acsl_8; mpz_t e_acsl_9; int e_acsl_10; int e_acsl_14; - int e_acsl_18; mpz_t e_acsl_19; mpz_t e_acsl_20; int e_acsl_21; - int e_acsl_25; int e_acsl_31; + 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_32; - mpz_t e_acsl_33; - int e_acsl_34; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_32),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_33),(long)0); - e_acsl_34 = __gmpz_cmp((__mpz_struct const *)(e_acsl_32), - (__mpz_struct const *)(e_acsl_33)); - e_acsl_7 = e_acsl_34 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_32)); - __gmpz_clear((__mpz_struct *)(e_acsl_33)); + 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)); } if (! e_acsl_7) { e_acsl_fail((char *)"(X == 1 ==> X == 0)"); } - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)3); - 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_35; - mpz_t e_acsl_36; - int e_acsl_37; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_36),(long)2); - e_acsl_37 = __gmpz_cmp((__mpz_struct const *)(e_acsl_35), - (__mpz_struct const *)(e_acsl_36)); - e_acsl_14 = e_acsl_37 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_35)); - __gmpz_clear((__mpz_struct *)(e_acsl_36)); - } else { e_acsl_14 = 0; } if (! e_acsl_14) { e_acsl_18 = 1; } + __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_38; - mpz_t e_acsl_39; - int e_acsl_40; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_38),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_39),(long)3); - e_acsl_40 = __gmpz_cmp((__mpz_struct const *)(e_acsl_38), - (__mpz_struct const *)(e_acsl_39)); - e_acsl_18 = e_acsl_40 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_38)); - __gmpz_clear((__mpz_struct *)(e_acsl_39)); + 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)); } - if (! e_acsl_18) { e_acsl_fail((char *)"(X == 3 && Y == 2 ==> X == 3)"); - } __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)X); - __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)); - if (e_acsl_21 == 0) { - mpz_t e_acsl_41; - mpz_t e_acsl_42; - int e_acsl_43; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_41),(long)Y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_42),(long)2); - e_acsl_43 = __gmpz_cmp((__mpz_struct const *)(e_acsl_41), - (__mpz_struct const *)(e_acsl_42)); - e_acsl_25 = e_acsl_43 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_41)); - __gmpz_clear((__mpz_struct *)(e_acsl_42)); - } else { e_acsl_25 = 0; } if (! e_acsl_25) { e_acsl_31 = 1; } + if (! e_acsl_17) { e_acsl_fail((char *)"(X == 3 && Y == 2 ==> X == 3)"); + } + 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_44; - mpz_t e_acsl_45; - mpz_t e_acsl_46; - mpz_t e_acsl_47; - int e_acsl_48; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_44),(long)X); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_45),(long)Y); - __gmpz_init((__mpz_struct *)(e_acsl_46)); - __gmpz_add((__mpz_struct *)(e_acsl_46), - (__mpz_struct const *)(e_acsl_44), - (__mpz_struct const *)(e_acsl_45)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_47),(long)5); - e_acsl_48 = __gmpz_cmp((__mpz_struct const *)(e_acsl_46), - (__mpz_struct const *)(e_acsl_47)); - e_acsl_31 = e_acsl_48 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_44)); - __gmpz_clear((__mpz_struct *)(e_acsl_45)); - __gmpz_clear((__mpz_struct *)(e_acsl_46)); - __gmpz_clear((__mpz_struct *)(e_acsl_47)); + 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)); } - if (! e_acsl_31) { + if (! e_acsl_28) { e_acsl_fail((char *)"(X == 3 && Y == 2 ==> X+Y == 5)"); } __gmpz_clear((__mpz_struct *)(e_acsl_1)); __gmpz_clear((__mpz_struct *)(e_acsl_2)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - __gmpz_clear((__mpz_struct *)(e_acsl_9)); - __gmpz_clear((__mpz_struct *)(e_acsl_19)); - __gmpz_clear((__mpz_struct *)(e_acsl_20)); + __gmpz_clear((__mpz_struct *)(e_acsl_8)); X += Y; } - X += Y; return; } @@ -872,10 +850,9 @@ int l(void) (__mpz_struct const *)(e_acsl_5)); if (! (e_acsl_6 == 0)) { e_acsl_fail((char *)"(X == 5)"); } __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); + __gmpz_clear((__mpz_struct *)(e_acsl_5)); return (X); } - return (X); } int main(void) 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 ff9270e09b6..c316f444231 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 @@ -575,15 +575,13 @@ int main(void) /*@ assert 0 ≢ 1; */ ; if (! (0 != 1)) { e_acsl_fail((char *)"(0 != 1)"); } /*@ assert 1152921504606846975 ≡ 0xfffffffffffffff; */ ; - { mpz_t e_acsl_1; mpz_t e_acsl_2; int e_acsl_3; + { mpz_t e_acsl_1; int e_acsl_2; __gmpz_init_set_str((__mpz_struct *)(e_acsl_1),"1152921504606846975",10); - __gmpz_init_set_str((__mpz_struct *)(e_acsl_2),"1152921504606846975",10); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - if (! (e_acsl_3 == 0)) { + e_acsl_2 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), + (__mpz_struct const *)(e_acsl_1)); + if (! (e_acsl_2 == 0)) { e_acsl_fail((char *)"(1152921504606846975 == 0xfffffffffffffff)"); } __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); } __retres = 0; 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 8a2ae8bb12d..c074c5a330d 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 @@ -46,7 +46,8 @@ __inline static mp_limb_t __gmpz_getlimbn(mpz_srcptr __gmp_z, mp_size_t __gmp_n) __attribute__(( __pure__)); /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); __inline static void __gmpz_neg(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); @@ -578,16 +579,16 @@ int main(void) 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_8; - mpz_t e_acsl_9; - int e_acsl_10; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)1); - e_acsl_10 = __gmpz_cmp((__mpz_struct const *)(e_acsl_8), - (__mpz_struct const *)(e_acsl_9)); - e_acsl_7 = e_acsl_10 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - __gmpz_clear((__mpz_struct *)(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)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; } if (! e_acsl_7) { e_acsl_fail((char *)"(x == 0 && y == 1)"); } __gmpz_clear((__mpz_struct *)(e_acsl_1)); @@ -595,62 +596,112 @@ int main(void) } /*@ assert ¬(x ≢ 0 ∧ y ≡ 1/0); */ ; - { mpz_t e_acsl_15; mpz_t e_acsl_16; int e_acsl_17; int e_acsl_18; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)x); - __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)); - if (e_acsl_17 != 0) { - mpz_t e_acsl_19; - int e_acsl_20; - mpz_t e_acsl_21; - int e_acsl_22; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)y); + { 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); /*@ assert 0 ≢ 0; */ ; if (0 == 0) { e_acsl_fail((char *)"(0 == 0)"); } - e_acsl_20 = 1 / 0; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_21),(long)e_acsl_20); - e_acsl_22 = __gmpz_cmp((__mpz_struct const *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_21)); - e_acsl_18 = e_acsl_22 == 0; + 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)); + } else { e_acsl_15 = 0; } + if (! (! e_acsl_15)) { e_acsl_fail((char *)"(!(x != 0 && y == 1/0))"); } + __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_21)); - } else { e_acsl_18 = 0; } - if (! (! e_acsl_18)) { e_acsl_fail((char *)"(!(x != 0 && y == 1/0))"); } - __gmpz_clear((__mpz_struct *)(e_acsl_15)); + __gmpz_clear((__mpz_struct *)(e_acsl_20)); + } if (! e_acsl_22) { e_acsl_fail((char *)"(y == 1 || x == 1)"); } __gmpz_clear((__mpz_struct *)(e_acsl_16)); + __gmpz_clear((__mpz_struct *)(e_acsl_17)); } - /*@ assert x ≡ 1 ∨ y ≡ 1; */ ; - { mpz_t e_acsl_26; mpz_t e_acsl_27; int e_acsl_28; int e_acsl_29; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)1); - e_acsl_28 = __gmpz_cmp((__mpz_struct const *)(e_acsl_26), - (__mpz_struct const *)(e_acsl_27)); - if (e_acsl_28 == 0) { e_acsl_29 = 1; } + /*@ 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; } else { - mpz_t e_acsl_30; - mpz_t e_acsl_31; - int e_acsl_32; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_30),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)1); - e_acsl_32 = __gmpz_cmp((__mpz_struct const *)(e_acsl_30), - (__mpz_struct const *)(e_acsl_31)); - e_acsl_29 = e_acsl_32 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_30)); - __gmpz_clear((__mpz_struct *)(e_acsl_31)); - } if (! e_acsl_29) { e_acsl_fail((char *)"(x == 1 || y == 1)"); } - __gmpz_clear((__mpz_struct *)(e_acsl_26)); - __gmpz_clear((__mpz_struct *)(e_acsl_27)); + 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); + /*@ assert 0 ≢ 0; */ ; + if (0 == 0) { e_acsl_fail((char *)"(0 == 0)"); } + 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)); + } if (! e_acsl_30) { e_acsl_fail((char *)"(x == 0 || y == 1/0)"); } + __gmpz_clear((__mpz_struct *)(e_acsl_23)); + __gmpz_clear((__mpz_struct *)(e_acsl_24)); } - /*@ assert x ≡ 0 ∨ y ≡ 1/0; */ ; - { mpz_t e_acsl_37; mpz_t e_acsl_38; int e_acsl_39; int e_acsl_40; - __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)); - if (e_acsl_39 == 0) { e_acsl_40 = 1; } + /*@ 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)); + } if (! e_acsl_37) { e_acsl_fail((char *)"(x == 0 ==> y == 1)"); } + __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; } else { mpz_t e_acsl_41; int e_acsl_42; @@ -663,62 +714,12 @@ int main(void) __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_40 = e_acsl_44 == 0; + e_acsl_45 = e_acsl_44 == 0; __gmpz_clear((__mpz_struct *)(e_acsl_41)); __gmpz_clear((__mpz_struct *)(e_acsl_43)); - } if (! e_acsl_40) { e_acsl_fail((char *)"(x == 0 || y == 1/0)"); } - __gmpz_clear((__mpz_struct *)(e_acsl_37)); + } if (! e_acsl_45) { e_acsl_fail((char *)"(x == 1 ==> y == 1/0)"); } __gmpz_clear((__mpz_struct *)(e_acsl_38)); - } - - /*@ assert x ≡ 0 ⇒ y ≡ 1; */ ; - { mpz_t e_acsl_48; mpz_t e_acsl_49; int e_acsl_50; int e_acsl_51; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_48),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_49),(long)0); - e_acsl_50 = __gmpz_cmp((__mpz_struct const *)(e_acsl_48), - (__mpz_struct const *)(e_acsl_49)); - if (! (e_acsl_50 == 0)) { e_acsl_51 = 1; } - else { - 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)1); - e_acsl_54 = __gmpz_cmp((__mpz_struct const *)(e_acsl_52), - (__mpz_struct const *)(e_acsl_53)); - e_acsl_51 = e_acsl_54 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_52)); - __gmpz_clear((__mpz_struct *)(e_acsl_53)); - } if (! e_acsl_51) { e_acsl_fail((char *)"(x == 0 ==> y == 1)"); } - __gmpz_clear((__mpz_struct *)(e_acsl_48)); - __gmpz_clear((__mpz_struct *)(e_acsl_49)); - } - - /*@ assert x ≡ 1 ⇒ y ≡ 1/0; */ ; - { mpz_t e_acsl_59; mpz_t e_acsl_60; int e_acsl_61; int e_acsl_62; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_59),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_60),(long)1); - e_acsl_61 = __gmpz_cmp((__mpz_struct const *)(e_acsl_59), - (__mpz_struct const *)(e_acsl_60)); - if (! (e_acsl_61 == 0)) { e_acsl_62 = 1; } - else { - mpz_t e_acsl_63; - int e_acsl_64; - mpz_t e_acsl_65; - int e_acsl_66; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_63),(long)y); - /*@ assert 0 ≢ 0; */ ; - if (0 == 0) { e_acsl_fail((char *)"(0 == 0)"); } - e_acsl_64 = 1 / 0; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_65),(long)e_acsl_64); - e_acsl_66 = __gmpz_cmp((__mpz_struct const *)(e_acsl_63), - (__mpz_struct const *)(e_acsl_65)); - e_acsl_62 = e_acsl_66 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_63)); - __gmpz_clear((__mpz_struct *)(e_acsl_65)); - } if (! e_acsl_62) { e_acsl_fail((char *)"(x == 1 ==> y == 1/0)"); } - __gmpz_clear((__mpz_struct *)(e_acsl_59)); - __gmpz_clear((__mpz_struct *)(e_acsl_60)); + __gmpz_clear((__mpz_struct *)(e_acsl_39)); } __retres = 0; 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 c1cf5dd3276..1b21e2c911f 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 @@ -46,7 +46,8 @@ __inline static mp_limb_t __gmpz_getlimbn(mpz_srcptr __gmp_z, mp_size_t __gmp_n) __attribute__(( __pure__)); /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); __inline static void __gmpz_neg(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); @@ -575,7 +576,7 @@ int main(void) if (! (x < y)) { e_acsl_fail((char *)"(x < y)"); } /*@ 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); @@ -584,24 +585,21 @@ int main(void) if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(x == 0)"); } __gmpz_clear((__mpz_struct *)(e_acsl_1)); __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - if (x) { /*@ assert \false; */ ; e_acsl_fail((char *)"(\\false)"); } - else { - /*@ requires x ≡ 0; - ensures x ≡ 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)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)); - if (! (e_acsl_6 == 0)) { e_acsl_fail((char *)"(x == 0)"); } - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - } - x ++; + if (x) { /*@ assert \false; */ ; e_acsl_fail((char *)"(\\false)"); } + else { + /*@ requires x ≡ 0; + ensures x ≡ 1; */ { mpz_t e_acsl_7; mpz_t e_acsl_8; int e_acsl_9; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)x); + { 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)); + if (! (e_acsl_6 == 0)) { e_acsl_fail((char *)"(x == 0)"); } + __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)); @@ -609,24 +607,21 @@ int main(void) __gmpz_clear((__mpz_struct *)(e_acsl_7)); __gmpz_clear((__mpz_struct *)(e_acsl_8)); } - } - - if (x) { - /*@ requires x ≡ 1; - ensures x ≡ 2; */ - { - { 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)); - if (! (e_acsl_12 == 0)) { e_acsl_fail((char *)"(x == 1)"); } - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); - } - x ++; + + if (x) { + /*@ requires x ≡ 1; + ensures x ≡ 2; */ { mpz_t e_acsl_13; mpz_t e_acsl_14; int e_acsl_15; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)x); + { 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)); + if (! (e_acsl_12 == 0)) { e_acsl_fail((char *)"(x == 1)"); } + __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)); @@ -634,21 +629,19 @@ int main(void) __gmpz_clear((__mpz_struct *)(e_acsl_13)); __gmpz_clear((__mpz_struct *)(e_acsl_14)); } - } - + + } + else { /*@ assert \false; */ ; e_acsl_fail((char *)"(\\false)"); } } - else { /*@ assert \false; */ ; e_acsl_fail((char *)"(\\false)"); } - } - { mpz_t e_acsl_16; mpz_t e_acsl_17; int e_acsl_18; - __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)); - if (! (e_acsl_18 >= 0)) { e_acsl_fail((char *)"(x >= 1)"); } - __gmpz_clear((__mpz_struct *)(e_acsl_16)); - __gmpz_clear((__mpz_struct *)(e_acsl_17)); } - } + __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)); + if (! (e_acsl_18 >= 0)) { e_acsl_fail((char *)"(x >= 1)"); } + __gmpz_clear((__mpz_struct *)(e_acsl_16)); + __gmpz_clear((__mpz_struct *)(e_acsl_17)); + } __retres = 0; return (__retres); 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 dc09d603692..8273cbfd8f7 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 @@ -50,7 +50,8 @@ __inline static mp_limb_t __gmpz_getlimbn(mpz_srcptr __gmp_z, mp_size_t __gmp_n) __attribute__(( __pure__)); /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); __inline static void __gmpz_neg(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); @@ -575,14 +576,12 @@ int main(void) if (! ("toto" != "titi")) { e_acsl_fail((char *)"(\"toto\" != \"titi\")"); } /*@ assert 'c' ≡ 'c'; */ ; - { mpz_t e_acsl_1; mpz_t e_acsl_2; int e_acsl_3; + { mpz_t e_acsl_1; int e_acsl_2; __gmpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)'c'); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)'c'); - e_acsl_3 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(\'c\' == \'c\')"); } + e_acsl_2 = __gmpz_cmp((__mpz_struct const *)(e_acsl_1), + (__mpz_struct const *)(e_acsl_1)); + if (! (e_acsl_2 == 0)) { e_acsl_fail((char *)"(\'c\' == \'c\')"); } __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); } /*@ assert false ≢ true; */ ; 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 53a8b0b13bf..efbe0beb80d 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 @@ -69,7 +69,8 @@ __pure__)); assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(z1); requires \valid(z2); @@ -707,8 +708,7 @@ int main(void) /*@ 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; mpz_t e_acsl_33; - int e_acsl_34; + 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)); @@ -718,40 +718,38 @@ int main(void) 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_set_si((__mpz_struct *)(e_acsl_32),(long)i); - __gmpz_init((__mpz_struct *)(e_acsl_33)); - __gmpz_sub((__mpz_struct *)(e_acsl_33), + __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_32)); - e_acsl_34 = __gmpz_cmp((__mpz_struct const *)(e_acsl_30), - (__mpz_struct const *)(e_acsl_33)); - if (! (e_acsl_34 == 0)) { e_acsl_fail((char *)"(t[2-i] == 4-i)"); } + (__mpz_struct const *)(e_acsl_27)); + e_acsl_33 = __gmpz_cmp((__mpz_struct const *)(e_acsl_30), + (__mpz_struct const *)(e_acsl_32)); + if (! (e_acsl_33 == 0)) { e_acsl_fail((char *)"(t[2-i] == 4-i)"); } __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)); - __gmpz_clear((__mpz_struct *)(e_acsl_33)); } /*@ assert *(&t[2]-i) ≡ 4-i; */ ; - { mpz_t e_acsl_35; mpz_t e_acsl_36; mpz_t e_acsl_37; mpz_t e_acsl_38; - int e_acsl_39; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)*(& t[2] - i)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_36),(long)4); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_37),(long)i); - __gmpz_init((__mpz_struct *)(e_acsl_38)); - __gmpz_sub((__mpz_struct *)(e_acsl_38), - (__mpz_struct const *)(e_acsl_36), - (__mpz_struct const *)(e_acsl_37)); - e_acsl_39 = __gmpz_cmp((__mpz_struct const *)(e_acsl_35), - (__mpz_struct const *)(e_acsl_38)); - if (! (e_acsl_39 == 0)) { e_acsl_fail((char *)"(*(&t[2]-i) == 4-i)"); - } __gmpz_clear((__mpz_struct *)(e_acsl_35)); + { 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)); + if (! (e_acsl_38 == 0)) { e_acsl_fail((char *)"(*(&t[2]-i) == 4-i)"); + } __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)); - __gmpz_clear((__mpz_struct *)(e_acsl_38)); } i ++; @@ -761,14 +759,14 @@ int main(void) p = & t[2]; t[2] = 5; /*@ assert *p ≡ 5; */ ; - { mpz_t e_acsl_40; mpz_t e_acsl_41; int e_acsl_42; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_40),(long)*p); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_41),(long)5); - e_acsl_42 = __gmpz_cmp((__mpz_struct const *)(e_acsl_40), - (__mpz_struct const *)(e_acsl_41)); - if (! (e_acsl_42 == 0)) { e_acsl_fail((char *)"(*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)); + if (! (e_acsl_41 == 0)) { e_acsl_fail((char *)"(*p == 5)"); } + __gmpz_clear((__mpz_struct *)(e_acsl_39)); __gmpz_clear((__mpz_struct *)(e_acsl_40)); - __gmpz_clear((__mpz_struct *)(e_acsl_41)); } __retres = 0; 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 247ab01e0ab..34656d1f40b 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 @@ -46,7 +46,8 @@ __inline static mp_limb_t __gmpz_getlimbn(mpz_srcptr __gmp_z, mp_size_t __gmp_n) __attribute__(( __pure__)); /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); __inline static void __gmpz_neg(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); 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 1386c2973e1..543035273c4 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 @@ -57,7 +57,8 @@ __pure__)); assigns *x; */ extern void __gmpz_init(__mpz_struct * /*[1]*/ x); /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void __gmpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); __inline static void __gmpz_neg(__mpz_struct * /*[1]*/ z1, __mpz_struct const * /*[1]*/ z2); @@ -583,73 +584,65 @@ int main(void) x = 0; y = 2; /*@ ensures x ≡ 1; */ - { 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)); - if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(x == 1)"); } - __gmpz_clear((__mpz_struct *)(e_acsl_1)); - __gmpz_clear((__mpz_struct *)(e_acsl_2)); - } - } + { 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)); + if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(x == 1)"); } + __gmpz_clear((__mpz_struct *)(e_acsl_1)); + __gmpz_clear((__mpz_struct *)(e_acsl_2)); + } /*@ ensures x ≡ 2; ensures y ≡ 2; */ - { x = 2; - { mpz_t e_acsl_4; mpz_t e_acsl_5; int e_acsl_6; mpz_t e_acsl_7; - mpz_t e_acsl_8; int e_acsl_9; - __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)); - if (! (e_acsl_6 == 0)) { e_acsl_fail((char *)"(x == 2)"); } - __gmpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)y); - __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)); - if (! (e_acsl_9 == 0)) { e_acsl_fail((char *)"(y == 2)"); } - __gmpz_clear((__mpz_struct *)(e_acsl_4)); - __gmpz_clear((__mpz_struct *)(e_acsl_5)); - __gmpz_clear((__mpz_struct *)(e_acsl_7)); - __gmpz_clear((__mpz_struct *)(e_acsl_8)); - } - } + { 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)); + if (! (e_acsl_6 == 0)) { e_acsl_fail((char *)"(x == 2)"); } + __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)); + if (! (e_acsl_8 == 0)) { e_acsl_fail((char *)"(y == 2)"); } + __gmpz_clear((__mpz_struct *)(e_acsl_4)); + __gmpz_clear((__mpz_struct *)(e_acsl_5)); + __gmpz_clear((__mpz_struct *)(e_acsl_7)); + } /*@ requires x ≡ 2; */ - { 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)2); - e_acsl_12 = __gmpz_cmp((__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_11)); - if (! (e_acsl_12 == 0)) { e_acsl_fail((char *)"(x == 2)"); } - __gmpz_clear((__mpz_struct *)(e_acsl_10)); - __gmpz_clear((__mpz_struct *)(e_acsl_11)); + { 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)); + if (! (e_acsl_11 == 0)) { e_acsl_fail((char *)"(x == 2)"); } + __gmpz_clear((__mpz_struct *)(e_acsl_9)); + __gmpz_clear((__mpz_struct *)(e_acsl_10)); x ++; } - x ++; /*@ requires x ≡ 3; requires y ≡ 2; */ - { mpz_t e_acsl_13; mpz_t e_acsl_14; int 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_13),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_14),(long)3); - e_acsl_15 = __gmpz_cmp((__mpz_struct const *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_14)); - if (! (e_acsl_15 == 0)) { e_acsl_fail((char *)"(x == 3)"); } - __gmpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)2); - e_acsl_18 = __gmpz_cmp((__mpz_struct const *)(e_acsl_16), - (__mpz_struct const *)(e_acsl_17)); - if (! (e_acsl_18 == 0)) { e_acsl_fail((char *)"(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)); + if (! (e_acsl_14 == 0)) { e_acsl_fail((char *)"(x == 3)"); } + __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)); + if (! (e_acsl_17 == 0)) { e_acsl_fail((char *)"(y == 2)"); } + __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_17)); + __gmpz_clear((__mpz_struct *)(e_acsl_15)); + __gmpz_clear((__mpz_struct *)(e_acsl_16)); x += y; } - x += y; /*@ behavior b1: requires x ≡ 5; ensures x ≡ 3; @@ -660,65 +653,54 @@ int main(void) ensures x ≡ y+1; */ - { - { mpz_t e_acsl_19; mpz_t e_acsl_20; int e_acsl_21; mpz_t e_acsl_22; - mpz_t e_acsl_23; mpz_t e_acsl_24; mpz_t e_acsl_25; int 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_19),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)5); - e_acsl_21 = __gmpz_cmp((__mpz_struct const *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_20)); - if (! (e_acsl_21 == 0)) { e_acsl_fail((char *)"(x == 5)"); } - __gmpz_init_set_si((__mpz_struct *)(e_acsl_22),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_23),(long)3); - __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)); + { 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)); + if (! (e_acsl_20 == 0)) { e_acsl_fail((char *)"(x == 5)"); } + __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)); + if (! (e_acsl_24 == 0)) { e_acsl_fail((char *)"(x == 3+y)"); } + __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)); - if (! (e_acsl_26 == 0)) { e_acsl_fail((char *)"(x == 3+y)"); } - __gmpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_28),(long)2); - e_acsl_29 = __gmpz_cmp((__mpz_struct const *)(e_acsl_27), - (__mpz_struct const *)(e_acsl_28)); - if (! (e_acsl_29 == 0)) { e_acsl_fail((char *)"(y == 2)"); } + if (! (e_acsl_26 == 0)) { e_acsl_fail((char *)"(y == 2)"); } + __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)); __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_27)); - __gmpz_clear((__mpz_struct *)(e_acsl_28)); - } - x = 3; - { 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; mpz_t e_acsl_36; int e_acsl_37; - __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 = __gmpz_cmp((__mpz_struct const *)(e_acsl_30), - (__mpz_struct const *)(e_acsl_31)); - if (! (e_acsl_32 == 0)) { e_acsl_fail((char *)"(x == 3)"); } - __gmpz_init_set_si((__mpz_struct *)(e_acsl_33),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_34),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)1); - __gmpz_init((__mpz_struct *)(e_acsl_36)); - __gmpz_add((__mpz_struct *)(e_acsl_36), - (__mpz_struct const *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_35)); - e_acsl_37 = __gmpz_cmp((__mpz_struct const *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_36)); - if (! (e_acsl_37 == 0)) { e_acsl_fail((char *)"(x == y+1)"); } - __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)); - __gmpz_clear((__mpz_struct *)(e_acsl_36)); + __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)); + if (! (e_acsl_29 == 0)) { e_acsl_fail((char *)"(x == 3)"); } + __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)); + if (! (e_acsl_33 == 0)) { e_acsl_fail((char *)"(x == y+1)"); } + __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)); + } /*@ behavior b1: assumes x ≡ 1; @@ -731,150 +713,138 @@ int main(void) requires x+y ≡ 5; */ - { mpz_t e_acsl_55; mpz_t e_acsl_56; int e_acsl_57; int e_acsl_58; - mpz_t e_acsl_59; mpz_t e_acsl_60; int e_acsl_61; int e_acsl_62; - int e_acsl_63; mpz_t e_acsl_64; mpz_t e_acsl_65; int e_acsl_66; - int e_acsl_67; int e_acsl_68; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_55),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_56),(long)1); - e_acsl_57 = __gmpz_cmp((__mpz_struct const *)(e_acsl_55), - (__mpz_struct const *)(e_acsl_56)); - if (! (e_acsl_57 == 0)) { e_acsl_58 = 1; } + { 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_69; - mpz_t e_acsl_70; - int e_acsl_71; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_69),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_70),(long)0); - e_acsl_71 = __gmpz_cmp((__mpz_struct const *)(e_acsl_69), - (__mpz_struct const *)(e_acsl_70)); - e_acsl_58 = e_acsl_71 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_69)); - __gmpz_clear((__mpz_struct *)(e_acsl_70)); - } if (! e_acsl_58) { e_acsl_fail((char *)"(x == 1 ==> x == 0)"); } - __gmpz_init_set_si((__mpz_struct *)(e_acsl_59),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_60),(long)3); - e_acsl_61 = __gmpz_cmp((__mpz_struct const *)(e_acsl_59), - (__mpz_struct const *)(e_acsl_60)); - if (e_acsl_61 == 0) { - mpz_t e_acsl_72; - mpz_t e_acsl_73; - int e_acsl_74; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_72),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_73),(long)2); - e_acsl_74 = __gmpz_cmp((__mpz_struct const *)(e_acsl_72), - (__mpz_struct const *)(e_acsl_73)); - e_acsl_62 = e_acsl_74 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_72)); - __gmpz_clear((__mpz_struct *)(e_acsl_73)); - } else { e_acsl_62 = 0; } if (! e_acsl_62) { e_acsl_63 = 1; } + 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)); + } if (! e_acsl_40) { e_acsl_fail((char *)"(x == 1 ==> x == 0)"); } + __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_75; - mpz_t e_acsl_76; - int e_acsl_77; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_75),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_76),(long)3); - e_acsl_77 = __gmpz_cmp((__mpz_struct const *)(e_acsl_75), - (__mpz_struct const *)(e_acsl_76)); - e_acsl_63 = e_acsl_77 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_75)); - __gmpz_clear((__mpz_struct *)(e_acsl_76)); + 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)); } - if (! e_acsl_63) { e_acsl_fail((char *)"(x == 3 && y == 2 ==> x == 3)"); - } __gmpz_init_set_si((__mpz_struct *)(e_acsl_64),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_65),(long)3); - e_acsl_66 = __gmpz_cmp((__mpz_struct const *)(e_acsl_64), - (__mpz_struct const *)(e_acsl_65)); - if (e_acsl_66 == 0) { - mpz_t e_acsl_78; - mpz_t e_acsl_79; - int e_acsl_80; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_78),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_79),(long)2); - e_acsl_80 = __gmpz_cmp((__mpz_struct const *)(e_acsl_78), - (__mpz_struct const *)(e_acsl_79)); - e_acsl_67 = e_acsl_80 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_78)); - __gmpz_clear((__mpz_struct *)(e_acsl_79)); - } else { e_acsl_67 = 0; } if (! e_acsl_67) { e_acsl_68 = 1; } + if (! e_acsl_50) { e_acsl_fail((char *)"(x == 3 && y == 2 ==> x == 3)"); + } + 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_81; - 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_81),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_82),(long)y); - __gmpz_init((__mpz_struct *)(e_acsl_83)); - __gmpz_add((__mpz_struct *)(e_acsl_83), - (__mpz_struct const *)(e_acsl_81), - (__mpz_struct const *)(e_acsl_82)); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_84),(long)5); - e_acsl_85 = __gmpz_cmp((__mpz_struct const *)(e_acsl_83), - (__mpz_struct const *)(e_acsl_84)); - e_acsl_68 = e_acsl_85 == 0; - __gmpz_clear((__mpz_struct *)(e_acsl_81)); - __gmpz_clear((__mpz_struct *)(e_acsl_82)); - __gmpz_clear((__mpz_struct *)(e_acsl_83)); - __gmpz_clear((__mpz_struct *)(e_acsl_84)); + 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)); } - if (! e_acsl_68) { + if (! e_acsl_61) { e_acsl_fail((char *)"(x == 3 && y == 2 ==> x+y == 5)"); - } __gmpz_clear((__mpz_struct *)(e_acsl_55)); - __gmpz_clear((__mpz_struct *)(e_acsl_56)); - __gmpz_clear((__mpz_struct *)(e_acsl_59)); - __gmpz_clear((__mpz_struct *)(e_acsl_60)); - __gmpz_clear((__mpz_struct *)(e_acsl_64)); - __gmpz_clear((__mpz_struct *)(e_acsl_65)); + } __gmpz_clear((__mpz_struct *)(e_acsl_34)); + __gmpz_clear((__mpz_struct *)(e_acsl_35)); + __gmpz_clear((__mpz_struct *)(e_acsl_41)); x += y; } - x += y; /*@ requires x ≡ 5; */ - { mpz_t e_acsl_86; mpz_t e_acsl_87; int e_acsl_88; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_86),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_87),(long)5); - e_acsl_88 = __gmpz_cmp((__mpz_struct const *)(e_acsl_86), - (__mpz_struct const *)(e_acsl_87)); - if (! (e_acsl_88 == 0)) { e_acsl_fail((char *)"(x == 5)"); } - __gmpz_clear((__mpz_struct *)(e_acsl_86)); - __gmpz_clear((__mpz_struct *)(e_acsl_87)); - } - - /*@ requires y ≡ 2; */ - { mpz_t e_acsl_89; mpz_t e_acsl_90; int e_acsl_91; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_89),(long)y); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_90),(long)2); - e_acsl_91 = __gmpz_cmp((__mpz_struct const *)(e_acsl_89), - (__mpz_struct const *)(e_acsl_90)); - if (! (e_acsl_91 == 0)) { e_acsl_fail((char *)"(y == 2)"); } - __gmpz_clear((__mpz_struct *)(e_acsl_89)); - __gmpz_clear((__mpz_struct *)(e_acsl_90)); - } + { 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)); + if (! (e_acsl_64 == 0)) { e_acsl_fail((char *)"(x == 5)"); } + __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)); + if (! (e_acsl_67 == 0)) { e_acsl_fail((char *)"(y == 2)"); } + __gmpz_clear((__mpz_struct *)(e_acsl_65)); + __gmpz_clear((__mpz_struct *)(e_acsl_66)); x += y; + } + } - x += y; /*@ requires x ≡ 7; ensures x ≡ 7; */ - { - { mpz_t e_acsl_92; mpz_t e_acsl_93; int e_acsl_94; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_92),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_93),(long)7); - e_acsl_94 = __gmpz_cmp((__mpz_struct const *)(e_acsl_92), - (__mpz_struct const *)(e_acsl_93)); - if (! (e_acsl_94 == 0)) { e_acsl_fail((char *)"(x == 7)"); } - __gmpz_clear((__mpz_struct *)(e_acsl_92)); - __gmpz_clear((__mpz_struct *)(e_acsl_93)); - } - __retres = 0; - { mpz_t e_acsl_95; mpz_t e_acsl_96; int e_acsl_97; - __gmpz_init_set_si((__mpz_struct *)(e_acsl_95),(long)x); - __gmpz_init_set_si((__mpz_struct *)(e_acsl_96),(long)7); - e_acsl_97 = __gmpz_cmp((__mpz_struct const *)(e_acsl_95), - (__mpz_struct const *)(e_acsl_96)); - if (! (e_acsl_97 == 0)) { e_acsl_fail((char *)"(x == 7)"); } - __gmpz_clear((__mpz_struct *)(e_acsl_95)); - __gmpz_clear((__mpz_struct *)(e_acsl_96)); + { 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)); + if (! (e_acsl_70 == 0)) { e_acsl_fail((char *)"(x == 7)"); } + __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)); + if (! (e_acsl_73 == 0)) { e_acsl_fail((char *)"(x == 7)"); } + __gmpz_clear((__mpz_struct *)(e_acsl_71)); + __gmpz_clear((__mpz_struct *)(e_acsl_72)); + } 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 47ba90c5082..0386082a1df 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 @@ -2,38 +2,32 @@ [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization -PROJECT_FILE.i:131:[value] Assertion got status valid. PROJECT_FILE.i:135:[value] Assertion got status valid. -PROJECT_FILE.i:138:[value] Assertion got status valid. +PROJECT_FILE.i:139:[value] Assertion got status valid. +PROJECT_FILE.i:142:[value] Assertion got status valid. [value] computing for function mpz_init_set_str <- main. - Called from PROJECT_FILE.i:140. -PROJECT_FILE.i:33:[value] Function mpz_init_set_str: postcondition got status valid. -[value] Done for function mpz_init_set_str -[value] computing for function mpz_init_set_str <- main. - Called from PROJECT_FILE.i:141. + Called from PROJECT_FILE.i:144. +PROJECT_FILE.i:37:[value] Function mpz_init_set_str: postcondition got status valid. [value] Done for function mpz_init_set_str [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:142. -PROJECT_FILE.i:45:[value] Function mpz_cmp: precondition got status valid. -PROJECT_FILE.i:46:[value] Function mpz_cmp: precondition got status valid. + Called from PROJECT_FILE.i:145. +PROJECT_FILE.i:49:[value] Function mpz_cmp: precondition got status valid. +PROJECT_FILE.i:50:[value] Function mpz_cmp: precondition got status valid. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:144. + Called from PROJECT_FILE.i:147. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. -PROJECT_FILE.i:115:[value] Function exit: postcondition got status invalid. + Called from PROJECT_FILE.i:129. +PROJECT_FILE.i:119:[value] Function exit: postcondition got status invalid. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:145. -PROJECT_FILE.i:39:[value] Function mpz_clear: precondition got status valid. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:145. + Called from PROJECT_FILE.i:148. +PROJECT_FILE.i:43:[value] Function mpz_clear: precondition got status valid. [value] Done for function mpz_clear [value] Recording results for main [value] done for function main @@ -86,15 +80,13 @@ int main(void) /*@ assert 0 ≢ 1; */ ; if (! (0 != 1)) { e_acsl_fail((char *)"(0 != 1)"); } /*@ assert 1152921504606846975 ≡ 0xfffffffffffffff; */ ; - { mpz_t e_acsl_1; mpz_t e_acsl_2; int e_acsl_3; + { mpz_t e_acsl_1; int e_acsl_2; mpz_init_set_str((__mpz_struct *)(e_acsl_1),"1152921504606846975",10); - mpz_init_set_str((__mpz_struct *)(e_acsl_2),"1152921504606846975",10); - e_acsl_3 = mpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - if (! (e_acsl_3 == 0)) { + e_acsl_2 = mpz_cmp((__mpz_struct const *)(e_acsl_1), + (__mpz_struct const *)(e_acsl_1)); + if (! (e_acsl_2 == 0)) { e_acsl_fail((char *)"(1152921504606846975 == 0xfffffffffffffff)"); } mpz_clear((__mpz_struct *)(e_acsl_1)); - mpz_clear((__mpz_struct *)(e_acsl_2)); } __retres = 0; 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 87c7511db3b..3f60a357129 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 @@ -2,194 +2,194 @@ [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization -PROJECT_FILE.i:134:[value] Assertion got status valid. +PROJECT_FILE.i:138:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:136. -PROJECT_FILE.i:29:[value] Function mpz_init_set_si: postcondition got status valid. + Called from PROJECT_FILE.i:140. +PROJECT_FILE.i:33:[value] Function mpz_init_set_si: postcondition got status valid. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:137. + Called from PROJECT_FILE.i:140. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:137. -PROJECT_FILE.i:45:[value] Function mpz_cmp: precondition got status valid. -PROJECT_FILE.i:46:[value] Function mpz_cmp: precondition got status valid. + Called from PROJECT_FILE.i:141. +PROJECT_FILE.i:49:[value] Function mpz_cmp: precondition got status valid. +PROJECT_FILE.i:50:[value] Function mpz_cmp: precondition got status valid. [value] Done for function mpz_cmp [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:142. + Called from PROJECT_FILE.i:146. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:143. + Called from PROJECT_FILE.i:147. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:144. + Called from PROJECT_FILE.i:148. [value] Done for function mpz_cmp -PROJECT_FILE.i:145:[value] assigning non deterministic value for the first time +PROJECT_FILE.i:149:[value] assigning non deterministic value for the first time [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:146. -PROJECT_FILE.i:39:[value] Function mpz_clear: precondition got status valid. + Called from PROJECT_FILE.i:150. +PROJECT_FILE.i:43:[value] Function mpz_clear: precondition got status valid. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:147. + Called from PROJECT_FILE.i:151. [value] Done for function mpz_clear [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:149. + Called from PROJECT_FILE.i:153. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. -PROJECT_FILE.i:115:[value] Function exit: postcondition got status invalid. + Called from PROJECT_FILE.i:129. +PROJECT_FILE.i:119:[value] Function exit: postcondition got status invalid. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:150. + Called from PROJECT_FILE.i:154. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:150. + Called from PROJECT_FILE.i:154. [value] Done for function mpz_clear -PROJECT_FILE.i:153:[value] Assertion got status valid. +PROJECT_FILE.i:157:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:156. + Called from PROJECT_FILE.i:159. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:156. + Called from PROJECT_FILE.i:159. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:157. + Called from PROJECT_FILE.i:160. [value] Done for function mpz_cmp [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:163. + Called from PROJECT_FILE.i:166. [value] Done for function mpz_init_set_si -PROJECT_FILE.i:164:[value] Assertion got status invalid (stopping propagation). +PROJECT_FILE.i:167:[value] Assertion got status invalid (stopping propagation). [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:174. + Called from PROJECT_FILE.i:177. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:174. + Called from PROJECT_FILE.i:177. [value] Done for function mpz_clear -PROJECT_FILE.i:177:[value] Assertion got status valid. +PROJECT_FILE.i:180:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:179. + Called from PROJECT_FILE.i:182. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:180. + Called from PROJECT_FILE.i:182. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:180. + Called from PROJECT_FILE.i:183. [value] Done for function mpz_cmp [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:186. + Called from PROJECT_FILE.i:189. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:187. + Called from PROJECT_FILE.i:190. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:188. + Called from PROJECT_FILE.i:191. [value] Done for function mpz_cmp [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:190. + Called from PROJECT_FILE.i:193. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:191. + Called from PROJECT_FILE.i:194. [value] Done for function mpz_clear [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:192. + Called from PROJECT_FILE.i:195. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:193. + Called from PROJECT_FILE.i:196. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:193. + Called from PROJECT_FILE.i:196. [value] Done for function mpz_clear -PROJECT_FILE.i:196:[value] Assertion got status valid. +PROJECT_FILE.i:199:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:199. + Called from PROJECT_FILE.i:201. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:199. + Called from PROJECT_FILE.i:201. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:200. + Called from PROJECT_FILE.i:202. [value] Done for function mpz_cmp [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:207. + Called from PROJECT_FILE.i:209. [value] Done for function mpz_init_set_si -PROJECT_FILE.i:208:[value] Assertion got status invalid (stopping propagation). +PROJECT_FILE.i:210:[value] Assertion got status invalid (stopping propagation). [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:217. + Called from PROJECT_FILE.i:219. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:217. + Called from PROJECT_FILE.i:219. [value] Done for function mpz_clear -PROJECT_FILE.i:220:[value] Assertion got status valid. +PROJECT_FILE.i:222:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:222. + Called from PROJECT_FILE.i:224. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:223. + Called from PROJECT_FILE.i:224. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:223. + Called from PROJECT_FILE.i:225. [value] Done for function mpz_cmp [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:229. + Called from PROJECT_FILE.i:231. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:230. + Called from PROJECT_FILE.i:232. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:231. + Called from PROJECT_FILE.i:233. [value] Done for function mpz_cmp [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:233. + Called from PROJECT_FILE.i:235. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:234. + Called from PROJECT_FILE.i:236. [value] Done for function mpz_clear [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:235. + Called from PROJECT_FILE.i:237. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:236. + Called from PROJECT_FILE.i:238. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:236. + Called from PROJECT_FILE.i:238. [value] Done for function mpz_clear -PROJECT_FILE.i:239:[value] Assertion got status valid. +PROJECT_FILE.i:241:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. + Called from PROJECT_FILE.i:243. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:242. + Called from PROJECT_FILE.i:243. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:243. + Called from PROJECT_FILE.i:244. [value] Done for function mpz_cmp [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:250. + Called from PROJECT_FILE.i:251. [value] Done for function mpz_init_set_si -PROJECT_FILE.i:251:[value] Assertion got status invalid (stopping propagation). +PROJECT_FILE.i:252:[value] Assertion got status invalid (stopping propagation). [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:260. + Called from PROJECT_FILE.i:261. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:260. + Called from PROJECT_FILE.i:261. [value] Done for function mpz_clear [value] Recording results for main [value] done for function main @@ -209,7 +209,8 @@ struct __anonstruct___mpz_struct_1 { typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void mpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ @@ -246,16 +247,16 @@ int main(void) e_acsl_3 = mpz_cmp((__mpz_struct const *)(e_acsl_1), (__mpz_struct const *)(e_acsl_2)); if (e_acsl_3 == 0) { - mpz_t e_acsl_8; - mpz_t e_acsl_9; - int e_acsl_10; - mpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)y); - mpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)1); - e_acsl_10 = mpz_cmp((__mpz_struct const *)(e_acsl_8), - (__mpz_struct const *)(e_acsl_9)); - e_acsl_7 = e_acsl_10 == 0; - mpz_clear((__mpz_struct *)(e_acsl_8)); - mpz_clear((__mpz_struct *)(e_acsl_9)); + mpz_t e_acsl_4; + mpz_t e_acsl_5; + int e_acsl_6; + mpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)y); + mpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)1); + e_acsl_6 = mpz_cmp((__mpz_struct const *)(e_acsl_4), + (__mpz_struct const *)(e_acsl_5)); + e_acsl_7 = e_acsl_6 == 0; + mpz_clear((__mpz_struct *)(e_acsl_4)); + mpz_clear((__mpz_struct *)(e_acsl_5)); } else { e_acsl_7 = 0; } if (! e_acsl_7) { e_acsl_fail((char *)"(x == 0 && y == 1)"); } mpz_clear((__mpz_struct *)(e_acsl_1)); @@ -263,62 +264,112 @@ int main(void) } /*@ assert ¬(x ≢ 0 ∧ y ≡ 1/0); */ ; - { mpz_t e_acsl_15; mpz_t e_acsl_16; int e_acsl_17; int e_acsl_18; - mpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)0); - e_acsl_17 = mpz_cmp((__mpz_struct const *)(e_acsl_15), - (__mpz_struct const *)(e_acsl_16)); - if (e_acsl_17 != 0) { - mpz_t e_acsl_19; - int e_acsl_20; - mpz_t e_acsl_21; - int e_acsl_22; - mpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)y); + { mpz_t e_acsl_8; mpz_t e_acsl_9; int e_acsl_10; int e_acsl_15; + mpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)0); + e_acsl_10 = mpz_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; + mpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)y); /*@ assert 0 ≢ 0; */ ; if (0 == 0) { e_acsl_fail((char *)"(0 == 0)"); } - e_acsl_20 = 1 / 0; - mpz_init_set_si((__mpz_struct *)(e_acsl_21),(long)e_acsl_20); - e_acsl_22 = mpz_cmp((__mpz_struct const *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_21)); - e_acsl_18 = e_acsl_22 == 0; + e_acsl_12 = 1 / 0; + mpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)e_acsl_12); + e_acsl_14 = mpz_cmp((__mpz_struct const *)(e_acsl_11), + (__mpz_struct const *)(e_acsl_13)); + e_acsl_15 = e_acsl_14 == 0; + mpz_clear((__mpz_struct *)(e_acsl_11)); + mpz_clear((__mpz_struct *)(e_acsl_13)); + } else { e_acsl_15 = 0; } + if (! (! e_acsl_15)) { e_acsl_fail((char *)"(!(x != 0 && y == 1/0))"); } + mpz_clear((__mpz_struct *)(e_acsl_8)); + mpz_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; + mpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)y); + mpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)1); + e_acsl_18 = mpz_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; + mpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)1); + e_acsl_21 = mpz_cmp((__mpz_struct const *)(e_acsl_19), + (__mpz_struct const *)(e_acsl_20)); + e_acsl_22 = e_acsl_21 == 0; mpz_clear((__mpz_struct *)(e_acsl_19)); - mpz_clear((__mpz_struct *)(e_acsl_21)); - } else { e_acsl_18 = 0; } - if (! (! e_acsl_18)) { e_acsl_fail((char *)"(!(x != 0 && y == 1/0))"); } - mpz_clear((__mpz_struct *)(e_acsl_15)); + mpz_clear((__mpz_struct *)(e_acsl_20)); + } if (! e_acsl_22) { e_acsl_fail((char *)"(y == 1 || x == 1)"); } mpz_clear((__mpz_struct *)(e_acsl_16)); + mpz_clear((__mpz_struct *)(e_acsl_17)); } - /*@ assert x ≡ 1 ∨ y ≡ 1; */ ; - { mpz_t e_acsl_26; mpz_t e_acsl_27; int e_acsl_28; int e_acsl_29; - mpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)1); - e_acsl_28 = mpz_cmp((__mpz_struct const *)(e_acsl_26), - (__mpz_struct const *)(e_acsl_27)); - if (e_acsl_28 == 0) { e_acsl_29 = 1; } + /*@ assert x ≡ 0 ∨ y ≡ 1/0; */ ; + { mpz_t e_acsl_23; mpz_t e_acsl_24; int e_acsl_25; int e_acsl_30; + mpz_init_set_si((__mpz_struct *)(e_acsl_23),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_24),(long)0); + e_acsl_25 = mpz_cmp((__mpz_struct const *)(e_acsl_23), + (__mpz_struct const *)(e_acsl_24)); + if (e_acsl_25 == 0) { e_acsl_30 = 1; } else { - mpz_t e_acsl_30; - mpz_t e_acsl_31; - int e_acsl_32; - mpz_init_set_si((__mpz_struct *)(e_acsl_30),(long)y); - mpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)1); - e_acsl_32 = mpz_cmp((__mpz_struct const *)(e_acsl_30), - (__mpz_struct const *)(e_acsl_31)); - e_acsl_29 = e_acsl_32 == 0; - mpz_clear((__mpz_struct *)(e_acsl_30)); - mpz_clear((__mpz_struct *)(e_acsl_31)); - } if (! e_acsl_29) { e_acsl_fail((char *)"(x == 1 || y == 1)"); } - mpz_clear((__mpz_struct *)(e_acsl_26)); - mpz_clear((__mpz_struct *)(e_acsl_27)); + mpz_t e_acsl_26; + int e_acsl_27; + mpz_t e_acsl_28; + int e_acsl_29; + mpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)y); + /*@ assert 0 ≢ 0; */ ; + if (0 == 0) { e_acsl_fail((char *)"(0 == 0)"); } + e_acsl_27 = 1 / 0; + mpz_init_set_si((__mpz_struct *)(e_acsl_28),(long)e_acsl_27); + e_acsl_29 = mpz_cmp((__mpz_struct const *)(e_acsl_26), + (__mpz_struct const *)(e_acsl_28)); + e_acsl_30 = e_acsl_29 == 0; + mpz_clear((__mpz_struct *)(e_acsl_26)); + mpz_clear((__mpz_struct *)(e_acsl_28)); + } if (! e_acsl_30) { e_acsl_fail((char *)"(x == 0 || y == 1/0)"); } + mpz_clear((__mpz_struct *)(e_acsl_23)); + mpz_clear((__mpz_struct *)(e_acsl_24)); } - /*@ assert x ≡ 0 ∨ y ≡ 1/0; */ ; - { mpz_t e_acsl_37; mpz_t e_acsl_38; int e_acsl_39; int e_acsl_40; - mpz_init_set_si((__mpz_struct *)(e_acsl_37),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_38),(long)0); - e_acsl_39 = mpz_cmp((__mpz_struct const *)(e_acsl_37), - (__mpz_struct const *)(e_acsl_38)); - if (e_acsl_39 == 0) { e_acsl_40 = 1; } + /*@ assert x ≡ 0 ⇒ y ≡ 1; */ ; + { mpz_t e_acsl_31; mpz_t e_acsl_32; int e_acsl_33; int e_acsl_37; + mpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_32),(long)0); + e_acsl_33 = mpz_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; + mpz_init_set_si((__mpz_struct *)(e_acsl_34),(long)y); + mpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)1); + e_acsl_36 = mpz_cmp((__mpz_struct const *)(e_acsl_34), + (__mpz_struct const *)(e_acsl_35)); + e_acsl_37 = e_acsl_36 == 0; + mpz_clear((__mpz_struct *)(e_acsl_34)); + mpz_clear((__mpz_struct *)(e_acsl_35)); + } if (! e_acsl_37) { e_acsl_fail((char *)"(x == 0 ==> y == 1)"); } + mpz_clear((__mpz_struct *)(e_acsl_31)); + mpz_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; + mpz_init_set_si((__mpz_struct *)(e_acsl_38),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_39),(long)1); + e_acsl_40 = mpz_cmp((__mpz_struct const *)(e_acsl_38), + (__mpz_struct const *)(e_acsl_39)); + if (! (e_acsl_40 == 0)) { e_acsl_45 = 1; } else { mpz_t e_acsl_41; int e_acsl_42; @@ -331,62 +382,12 @@ int main(void) mpz_init_set_si((__mpz_struct *)(e_acsl_43),(long)e_acsl_42); e_acsl_44 = mpz_cmp((__mpz_struct const *)(e_acsl_41), (__mpz_struct const *)(e_acsl_43)); - e_acsl_40 = e_acsl_44 == 0; + e_acsl_45 = e_acsl_44 == 0; mpz_clear((__mpz_struct *)(e_acsl_41)); mpz_clear((__mpz_struct *)(e_acsl_43)); - } if (! e_acsl_40) { e_acsl_fail((char *)"(x == 0 || y == 1/0)"); } - mpz_clear((__mpz_struct *)(e_acsl_37)); + } if (! e_acsl_45) { e_acsl_fail((char *)"(x == 1 ==> y == 1/0)"); } mpz_clear((__mpz_struct *)(e_acsl_38)); - } - - /*@ assert x ≡ 0 ⇒ y ≡ 1; */ ; - { mpz_t e_acsl_48; mpz_t e_acsl_49; int e_acsl_50; int e_acsl_51; - mpz_init_set_si((__mpz_struct *)(e_acsl_48),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_49),(long)0); - e_acsl_50 = mpz_cmp((__mpz_struct const *)(e_acsl_48), - (__mpz_struct const *)(e_acsl_49)); - if (! (e_acsl_50 == 0)) { e_acsl_51 = 1; } - else { - mpz_t e_acsl_52; - mpz_t e_acsl_53; - int e_acsl_54; - mpz_init_set_si((__mpz_struct *)(e_acsl_52),(long)y); - mpz_init_set_si((__mpz_struct *)(e_acsl_53),(long)1); - e_acsl_54 = mpz_cmp((__mpz_struct const *)(e_acsl_52), - (__mpz_struct const *)(e_acsl_53)); - e_acsl_51 = e_acsl_54 == 0; - mpz_clear((__mpz_struct *)(e_acsl_52)); - mpz_clear((__mpz_struct *)(e_acsl_53)); - } if (! e_acsl_51) { e_acsl_fail((char *)"(x == 0 ==> y == 1)"); } - mpz_clear((__mpz_struct *)(e_acsl_48)); - mpz_clear((__mpz_struct *)(e_acsl_49)); - } - - /*@ assert x ≡ 1 ⇒ y ≡ 1/0; */ ; - { mpz_t e_acsl_59; mpz_t e_acsl_60; int e_acsl_61; int e_acsl_62; - mpz_init_set_si((__mpz_struct *)(e_acsl_59),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_60),(long)1); - e_acsl_61 = mpz_cmp((__mpz_struct const *)(e_acsl_59), - (__mpz_struct const *)(e_acsl_60)); - if (! (e_acsl_61 == 0)) { e_acsl_62 = 1; } - else { - mpz_t e_acsl_63; - int e_acsl_64; - mpz_t e_acsl_65; - int e_acsl_66; - mpz_init_set_si((__mpz_struct *)(e_acsl_63),(long)y); - /*@ assert 0 ≢ 0; */ ; - if (0 == 0) { e_acsl_fail((char *)"(0 == 0)"); } - e_acsl_64 = 1 / 0; - mpz_init_set_si((__mpz_struct *)(e_acsl_65),(long)e_acsl_64); - e_acsl_66 = mpz_cmp((__mpz_struct const *)(e_acsl_63), - (__mpz_struct const *)(e_acsl_65)); - e_acsl_62 = e_acsl_66 == 0; - mpz_clear((__mpz_struct *)(e_acsl_63)); - mpz_clear((__mpz_struct *)(e_acsl_65)); - } if (! e_acsl_62) { e_acsl_fail((char *)"(x == 1 ==> y == 1/0)"); } - mpz_clear((__mpz_struct *)(e_acsl_59)); - mpz_clear((__mpz_struct *)(e_acsl_60)); + mpz_clear((__mpz_struct *)(e_acsl_39)); } __retres = 0; 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 e5886051f79..605d62c12fb 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 @@ -1,163 +1,162 @@ -tests/e-acsl-runtime/nested_code_annot.i:12:[kernel] warning: Body of function main falls-through. Adding a return statement [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:134:[value] Assertion got status valid. +PROJECT_FILE.i:138:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:141. -PROJECT_FILE.i:29:[value] Function mpz_init_set_si: postcondition got status valid. + Called from PROJECT_FILE.i:145. +PROJECT_FILE.i:33:[value] Function mpz_init_set_si: postcondition got status valid. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:141. + Called from PROJECT_FILE.i:145. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:142. -PROJECT_FILE.i:45:[value] Function mpz_cmp: precondition got status valid. -PROJECT_FILE.i:46:[value] Function mpz_cmp: precondition got status valid. + Called from PROJECT_FILE.i:146. +PROJECT_FILE.i:49:[value] Function mpz_cmp: precondition got status valid. +PROJECT_FILE.i:50:[value] Function mpz_cmp: precondition got status valid. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:143. + Called from PROJECT_FILE.i:147. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. -PROJECT_FILE.i:115:[value] Function exit: postcondition got status invalid. + Called from PROJECT_FILE.i:129. +PROJECT_FILE.i:119:[value] Function exit: postcondition got status invalid. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:144. -PROJECT_FILE.i:39:[value] Function mpz_clear: precondition got status valid. + Called from PROJECT_FILE.i:148. +PROJECT_FILE.i:43:[value] Function mpz_clear: precondition got status valid. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:144. + Called from PROJECT_FILE.i:148. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:153. + Called from PROJECT_FILE.i:157. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:153. + Called from PROJECT_FILE.i:157. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:154. + Called from PROJECT_FILE.i:158. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:155. + Called from PROJECT_FILE.i:159. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:156. + Called from PROJECT_FILE.i:160. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:156. + Called from PROJECT_FILE.i:160. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:160. + Called from PROJECT_FILE.i:162. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:160. + Called from PROJECT_FILE.i:162. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:161. + Called from PROJECT_FILE.i:163. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:162. + Called from PROJECT_FILE.i:164. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:163. + Called from PROJECT_FILE.i:165. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:163. + Called from PROJECT_FILE.i:165. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:172. + Called from PROJECT_FILE.i:173. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:172. + Called from PROJECT_FILE.i:173. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:173. + Called from PROJECT_FILE.i:174. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:174. + Called from PROJECT_FILE.i:175. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:175. + Called from PROJECT_FILE.i:176. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:175. + Called from PROJECT_FILE.i:176. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:179. + Called from PROJECT_FILE.i:178. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:179. + Called from PROJECT_FILE.i:178. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:180. + Called from PROJECT_FILE.i:179. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:181. + Called from PROJECT_FILE.i:180. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:182. + Called from PROJECT_FILE.i:181. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:182. + Called from PROJECT_FILE.i:181. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:191. + Called from PROJECT_FILE.i:190. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:191. + Called from PROJECT_FILE.i:190. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:192. + Called from PROJECT_FILE.i:191. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:193. + Called from PROJECT_FILE.i:192. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:194. + Called from PROJECT_FILE.i:193. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:194. + Called from PROJECT_FILE.i:193. [value] Done for function mpz_clear [value] Recording results for main [value] done for function main @@ -177,7 +176,8 @@ struct __anonstruct___mpz_struct_1 { typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void mpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ @@ -211,7 +211,7 @@ int main(void) if (! (x < y)) { e_acsl_fail((char *)"(x < y)"); } /*@ 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; mpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)x); mpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)0); @@ -220,24 +220,21 @@ int main(void) if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(x == 0)"); } mpz_clear((__mpz_struct *)(e_acsl_1)); mpz_clear((__mpz_struct *)(e_acsl_2)); - } - if (x) { /*@ assert \false; */ ; e_acsl_fail((char *)"(\\false)"); } - else { - /*@ requires x ≡ 0; - ensures x ≡ 1; */ - { - { mpz_t e_acsl_4; mpz_t e_acsl_5; int e_acsl_6; - mpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)0); - e_acsl_6 = mpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - if (! (e_acsl_6 == 0)) { e_acsl_fail((char *)"(x == 0)"); } - mpz_clear((__mpz_struct *)(e_acsl_4)); - mpz_clear((__mpz_struct *)(e_acsl_5)); - } - x ++; + if (x) { /*@ assert \false; */ ; e_acsl_fail((char *)"(\\false)"); } + else { + /*@ requires x ≡ 0; + ensures x ≡ 1; */ { mpz_t e_acsl_7; mpz_t e_acsl_8; int e_acsl_9; - mpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)x); + { mpz_t e_acsl_4; mpz_t e_acsl_5; int e_acsl_6; + mpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)0); + e_acsl_6 = mpz_cmp((__mpz_struct const *)(e_acsl_4), + (__mpz_struct const *)(e_acsl_5)); + if (! (e_acsl_6 == 0)) { e_acsl_fail((char *)"(x == 0)"); } + mpz_clear((__mpz_struct *)(e_acsl_4)); + mpz_clear((__mpz_struct *)(e_acsl_5)); x ++; + } + mpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)x); mpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)1); e_acsl_9 = mpz_cmp((__mpz_struct const *)(e_acsl_7), (__mpz_struct const *)(e_acsl_8)); @@ -245,24 +242,21 @@ int main(void) mpz_clear((__mpz_struct *)(e_acsl_7)); mpz_clear((__mpz_struct *)(e_acsl_8)); } - } - - if (x) { - /*@ requires x ≡ 1; - ensures x ≡ 2; */ - { - { mpz_t e_acsl_10; mpz_t e_acsl_11; int e_acsl_12; - mpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)1); - e_acsl_12 = mpz_cmp((__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_11)); - if (! (e_acsl_12 == 0)) { e_acsl_fail((char *)"(x == 1)"); } - mpz_clear((__mpz_struct *)(e_acsl_10)); - mpz_clear((__mpz_struct *)(e_acsl_11)); - } - x ++; + + if (x) { + /*@ requires x ≡ 1; + ensures x ≡ 2; */ { mpz_t e_acsl_13; mpz_t e_acsl_14; int e_acsl_15; - mpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)x); + { mpz_t e_acsl_10; mpz_t e_acsl_11; int e_acsl_12; + mpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)1); + e_acsl_12 = mpz_cmp((__mpz_struct const *)(e_acsl_10), + (__mpz_struct const *)(e_acsl_11)); + if (! (e_acsl_12 == 0)) { e_acsl_fail((char *)"(x == 1)"); } + mpz_clear((__mpz_struct *)(e_acsl_10)); + mpz_clear((__mpz_struct *)(e_acsl_11)); x ++; + } + mpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)x); mpz_init_set_si((__mpz_struct *)(e_acsl_14),(long)2); e_acsl_15 = mpz_cmp((__mpz_struct const *)(e_acsl_13), (__mpz_struct const *)(e_acsl_14)); @@ -270,21 +264,19 @@ int main(void) mpz_clear((__mpz_struct *)(e_acsl_13)); mpz_clear((__mpz_struct *)(e_acsl_14)); } - } - + + } + else { /*@ assert \false; */ ; e_acsl_fail((char *)"(\\false)"); } } - else { /*@ assert \false; */ ; e_acsl_fail((char *)"(\\false)"); } - } - { mpz_t e_acsl_16; mpz_t e_acsl_17; int e_acsl_18; - mpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)1); - e_acsl_18 = mpz_cmp((__mpz_struct const *)(e_acsl_16), - (__mpz_struct const *)(e_acsl_17)); - if (! (e_acsl_18 >= 0)) { e_acsl_fail((char *)"(x >= 1)"); } - mpz_clear((__mpz_struct *)(e_acsl_16)); - mpz_clear((__mpz_struct *)(e_acsl_17)); } - } + mpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)1); + e_acsl_18 = mpz_cmp((__mpz_struct const *)(e_acsl_16), + (__mpz_struct const *)(e_acsl_17)); + if (! (e_acsl_18 >= 0)) { e_acsl_fail((char *)"(x >= 1)"); } + mpz_clear((__mpz_struct *)(e_acsl_16)); + mpz_clear((__mpz_struct *)(e_acsl_17)); + } __retres = 0; return (__retres); diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/not.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/not.res.oracle index 7aa2ea581ca..b31bf420596 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/not.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/not.res.oracle @@ -2,7 +2,7 @@ [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization -PROJECT_FILE.i:132:[value] Assertion got status valid. +PROJECT_FILE.i:136:[value] Assertion got status valid. [value] Recording results for main [value] done for function main [value] ====== VALUES COMPUTED ====== diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.res.oracle index 054bde7defe..a7721d393d5 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/null.res.oracle @@ -2,7 +2,7 @@ [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization -PROJECT_FILE.i:130:[value] Assertion got status unknown. +PROJECT_FILE.i:134:[value] Assertion got status unknown. [value] Recording results for main [value] done for function main [value] ====== VALUES COMPUTED ====== 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 669a693e29f..18d92acc275 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 @@ -2,39 +2,33 @@ [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization -PROJECT_FILE.i:134:[value] Assertion got status unknown. -PROJECT_FILE.i:137:[value] Assertion got status valid. +PROJECT_FILE.i:138:[value] Assertion got status unknown. +PROJECT_FILE.i:141:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:139. -PROJECT_FILE.i:29:[value] Function mpz_init_set_si: postcondition got status valid. -[value] Done for function mpz_init_set_si -[value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:139. + Called from PROJECT_FILE.i:142. +PROJECT_FILE.i:33:[value] Function mpz_init_set_si: postcondition got status valid. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:140. -PROJECT_FILE.i:45:[value] Function mpz_cmp: precondition got status valid. -PROJECT_FILE.i:46:[value] Function mpz_cmp: precondition got status valid. + Called from PROJECT_FILE.i:143. +PROJECT_FILE.i:49:[value] Function mpz_cmp: precondition got status valid. +PROJECT_FILE.i:50:[value] Function mpz_cmp: precondition got status valid. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:141. + Called from PROJECT_FILE.i:144. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. -PROJECT_FILE.i:115:[value] Function exit: postcondition got status invalid. + Called from PROJECT_FILE.i:129. +PROJECT_FILE.i:119:[value] Function exit: postcondition got status invalid. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:142. -PROJECT_FILE.i:39:[value] Function mpz_clear: precondition got status valid. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:142. + Called from PROJECT_FILE.i:145. +PROJECT_FILE.i:43:[value] Function mpz_clear: precondition got status valid. [value] Done for function mpz_clear -PROJECT_FILE.i:145:[value] Assertion got status valid. +PROJECT_FILE.i:148:[value] Assertion got status valid. [value] Recording results for main [value] done for function main [value] ====== VALUES COMPUTED ====== @@ -55,7 +49,8 @@ enum bool { true = 1 }; /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void mpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ @@ -85,14 +80,12 @@ int main(void) if (! ("toto" != "titi")) { e_acsl_fail((char *)"(\"toto\" != \"titi\")"); } /*@ assert 'c' ≡ 'c'; */ ; - { mpz_t e_acsl_1; mpz_t e_acsl_2; int e_acsl_3; + { mpz_t e_acsl_1; int e_acsl_2; mpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)'c'); - mpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)'c'); - e_acsl_3 = mpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(\'c\' == \'c\')"); } + e_acsl_2 = mpz_cmp((__mpz_struct const *)(e_acsl_1), + (__mpz_struct const *)(e_acsl_1)); + if (! (e_acsl_2 == 0)) { e_acsl_fail((char *)"(\'c\' == \'c\')"); } mpz_clear((__mpz_struct *)(e_acsl_1)); - mpz_clear((__mpz_struct *)(e_acsl_2)); } /*@ assert false ≢ true; */ ; 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 cfb7ac64d98..24f4c27dc2a 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 @@ -14,514 +14,502 @@ tests/e-acsl-runtime/ptr.i:26:[e-acsl] warning: missing guard for ensuring that [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization -PROJECT_FILE.i:138:[value] Assertion got status valid. +PROJECT_FILE.i:142:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:140. -PROJECT_FILE.i:29:[value] Function mpz_init_set_si: postcondition got status valid. + Called from PROJECT_FILE.i:144. +PROJECT_FILE.i:33:[value] Function mpz_init_set_si: postcondition got status valid. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:140. + Called from PROJECT_FILE.i:144. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:141. -PROJECT_FILE.i:45:[value] Function mpz_cmp: precondition got status valid. -PROJECT_FILE.i:46:[value] Function mpz_cmp: precondition got status valid. + Called from PROJECT_FILE.i:145. +PROJECT_FILE.i:49:[value] Function mpz_cmp: precondition got status valid. +PROJECT_FILE.i:50:[value] Function mpz_cmp: precondition got status valid. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:142. + Called from PROJECT_FILE.i:146. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. -PROJECT_FILE.i:115:[value] Function exit: postcondition got status invalid. + Called from PROJECT_FILE.i:129. +PROJECT_FILE.i:119:[value] Function exit: postcondition got status invalid. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:143. -PROJECT_FILE.i:39:[value] Function mpz_clear: precondition got status valid. + Called from PROJECT_FILE.i:146. +PROJECT_FILE.i:43:[value] Function mpz_clear: precondition got status valid. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:143. + Called from PROJECT_FILE.i:147. [value] Done for function mpz_clear -PROJECT_FILE.i:146:[value] Assertion got status valid. +PROJECT_FILE.i:150:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:148. + Called from PROJECT_FILE.i:152. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:148. + Called from PROJECT_FILE.i:152. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:149. + Called from PROJECT_FILE.i:153. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:150. + Called from PROJECT_FILE.i:154. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:151. + Called from PROJECT_FILE.i:155. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:151. + Called from PROJECT_FILE.i:155. [value] Done for function mpz_clear -PROJECT_FILE.i:154:[value] Assertion got status valid. +PROJECT_FILE.i:158:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:156. + Called from PROJECT_FILE.i:160. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:156. + Called from PROJECT_FILE.i:160. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:157. + Called from PROJECT_FILE.i:161. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:158. + Called from PROJECT_FILE.i:162. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:159. + Called from PROJECT_FILE.i:163. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:159. + Called from PROJECT_FILE.i:163. [value] Done for function mpz_clear -PROJECT_FILE.i:162:[value] Assertion got status valid. +PROJECT_FILE.i:166:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:166. + Called from PROJECT_FILE.i:170. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:166. + Called from PROJECT_FILE.i:170. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:167. + Called from PROJECT_FILE.i:171. PROJECT_FILE.i:21:[value] Function mpz_init: postcondition got status valid. [value] Done for function mpz_init [value] computing for function mpz_mul <- main. - Called from PROJECT_FILE.i:167. -PROJECT_FILE.i:72:[value] Function mpz_mul: precondition got status valid. -PROJECT_FILE.i:73:[value] Function mpz_mul: precondition got status valid. -PROJECT_FILE.i:74:[value] Function mpz_mul: precondition got status valid. + Called from PROJECT_FILE.i:171. +PROJECT_FILE.i:76:[value] Function mpz_mul: precondition got status valid. +PROJECT_FILE.i:77:[value] Function mpz_mul: precondition got status valid. +PROJECT_FILE.i:78:[value] Function mpz_mul: precondition got status valid. [value] Done for function mpz_mul [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:168. + Called from PROJECT_FILE.i:172. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:168. + Called from PROJECT_FILE.i:172. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:169. + Called from PROJECT_FILE.i:173. [value] Done for function mpz_cmp [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:169. + Called from PROJECT_FILE.i:173. [value] Done for function mpz_init -PROJECT_FILE.i:170:[value] Assertion got status valid. +PROJECT_FILE.i:174:[value] Assertion got status valid. [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:171. + Called from PROJECT_FILE.i:175. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_cdiv_q <- main. - Called from PROJECT_FILE.i:172. -PROJECT_FILE.i:78:[value] Function mpz_cdiv_q: precondition got status valid. -PROJECT_FILE.i:79:[value] Function mpz_cdiv_q: precondition got status valid. -PROJECT_FILE.i:80:[value] Function mpz_cdiv_q: precondition got status valid. + Called from PROJECT_FILE.i:176. +PROJECT_FILE.i:82:[value] Function mpz_cdiv_q: precondition got status valid. +PROJECT_FILE.i:83:[value] Function mpz_cdiv_q: precondition got status valid. +PROJECT_FILE.i:84:[value] Function mpz_cdiv_q: precondition got status valid. [value] Done for function mpz_cdiv_q [value] computing for function mpz_get_si <- main. - Called from PROJECT_FILE.i:173. -PROJECT_FILE.i:92:[value] Function mpz_get_si: precondition got status valid. + Called from PROJECT_FILE.i:177. +PROJECT_FILE.i:96:[value] Function mpz_get_si: precondition got status valid. [value] Done for function mpz_get_si -PROJECT_FILE.i:174:[kernel] warning: accessing out of bounds index [-2147483648..2147483647]. +PROJECT_FILE.i:178:[kernel] warning: accessing out of bounds index [-2147483648..2147483647]. assert 0 ≤ e_acsl_17 ∧ e_acsl_17 < 3; [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:174. + Called from PROJECT_FILE.i:178. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:174. + Called from PROJECT_FILE.i:178. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:175. + Called from PROJECT_FILE.i:179. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:177. + Called from PROJECT_FILE.i:181. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:178. + Called from PROJECT_FILE.i:182. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:178. + Called from PROJECT_FILE.i:182. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:178. + Called from PROJECT_FILE.i:182. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:179. + Called from PROJECT_FILE.i:183. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:179. + Called from PROJECT_FILE.i:183. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:179. + Called from PROJECT_FILE.i:183. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:180. + Called from PROJECT_FILE.i:184. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:180. + Called from PROJECT_FILE.i:184. [value] Done for function mpz_clear -PROJECT_FILE.i:184:[value] entering loop for the first time -PROJECT_FILE.i:186:[value] Assertion got status valid. +PROJECT_FILE.i:188:[value] entering loop for the first time +PROJECT_FILE.i:190:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:188. + Called from PROJECT_FILE.i:192. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:189. + Called from PROJECT_FILE.i:193. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:189. + Called from PROJECT_FILE.i:193. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:190. + Called from PROJECT_FILE.i:194. [value] Done for function mpz_init [value] computing for function mpz_add <- main. - Called from PROJECT_FILE.i:190. -PROJECT_FILE.i:60:[value] Function mpz_add: precondition got status valid. -PROJECT_FILE.i:61:[value] Function mpz_add: precondition got status valid. -PROJECT_FILE.i:62:[value] Function mpz_add: precondition got status valid. + Called from PROJECT_FILE.i:194. +PROJECT_FILE.i:64:[value] Function mpz_add: precondition got status valid. +PROJECT_FILE.i:65:[value] Function mpz_add: precondition got status valid. +PROJECT_FILE.i:66:[value] Function mpz_add: precondition got status valid. [value] Done for function mpz_add [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:191. + Called from PROJECT_FILE.i:195. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:192. + Called from PROJECT_FILE.i:196. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:193. + Called from PROJECT_FILE.i:197. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:193. + Called from PROJECT_FILE.i:197. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:193. + Called from PROJECT_FILE.i:197. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:194. + Called from PROJECT_FILE.i:198. [value] Done for function mpz_clear -PROJECT_FILE.i:197:[value] Assertion got status valid. +PROJECT_FILE.i:201:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:200. + Called from PROJECT_FILE.i:204. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:201. + Called from PROJECT_FILE.i:204. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:201. + Called from PROJECT_FILE.i:205. [value] Done for function mpz_init [value] computing for function mpz_sub <- main. - Called from PROJECT_FILE.i:202. -PROJECT_FILE.i:66:[value] Function mpz_sub: precondition got status valid. -PROJECT_FILE.i:67:[value] Function mpz_sub: precondition got status valid. -PROJECT_FILE.i:68:[value] Function mpz_sub: precondition got status valid. + Called from PROJECT_FILE.i:205. +PROJECT_FILE.i:70:[value] Function mpz_sub: precondition got status valid. +PROJECT_FILE.i:71:[value] Function mpz_sub: precondition got status valid. +PROJECT_FILE.i:72:[value] Function mpz_sub: precondition got status valid. [value] Done for function mpz_sub [value] computing for function mpz_get_si <- main. - Called from PROJECT_FILE.i:203. + Called from PROJECT_FILE.i:206. [value] Done for function mpz_get_si -PROJECT_FILE.i:204:[kernel] warning: accessing out of bounds index [-2147483648..2147483647]. +PROJECT_FILE.i:207:[kernel] warning: accessing out of bounds index [-2147483648..2147483647]. assert 0 ≤ e_acsl_29 ∧ e_acsl_29 < 3; [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:204. -[value] Done for function mpz_init_set_si -[value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:204. + Called from PROJECT_FILE.i:207. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:205. + Called from PROJECT_FILE.i:208. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:205. + Called from PROJECT_FILE.i:208. [value] Done for function mpz_init [value] computing for function mpz_sub <- main. - Called from PROJECT_FILE.i:206. + Called from PROJECT_FILE.i:209. [value] Done for function mpz_sub [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:207. + Called from PROJECT_FILE.i:210. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:208. + Called from PROJECT_FILE.i:211. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:209. + Called from PROJECT_FILE.i:212. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:209. + Called from PROJECT_FILE.i:212. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:209. + Called from PROJECT_FILE.i:212. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:210. + Called from PROJECT_FILE.i:213. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:210. + Called from PROJECT_FILE.i:213. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:210. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:211. + Called from PROJECT_FILE.i:213. [value] Done for function mpz_clear -PROJECT_FILE.i:214:[value] Assertion got status valid. +PROJECT_FILE.i:216:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:216. + Called from PROJECT_FILE.i:218. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:217. + Called from PROJECT_FILE.i:219. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:217. + Called from PROJECT_FILE.i:219. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:218. + Called from PROJECT_FILE.i:220. [value] Done for function mpz_init [value] computing for function mpz_sub <- main. - Called from PROJECT_FILE.i:218. + Called from PROJECT_FILE.i:220. [value] Done for function mpz_sub [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:219. + Called from PROJECT_FILE.i:221. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:220. + Called from PROJECT_FILE.i:222. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:221. + Called from PROJECT_FILE.i:223. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:221. + Called from PROJECT_FILE.i:223. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:221. + Called from PROJECT_FILE.i:223. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:222. + Called from PROJECT_FILE.i:224. [value] Done for function mpz_clear -PROJECT_FILE.i:186:[value] Assertion got status unknown. +PROJECT_FILE.i:190:[value] Assertion got status unknown. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:188. + Called from PROJECT_FILE.i:192. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:189. + Called from PROJECT_FILE.i:193. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:189. + Called from PROJECT_FILE.i:193. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:190. + Called from PROJECT_FILE.i:194. [value] Done for function mpz_init [value] computing for function mpz_add <- main. - Called from PROJECT_FILE.i:190. + Called from PROJECT_FILE.i:194. [value] Done for function mpz_add [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:191. + Called from PROJECT_FILE.i:195. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:192. + Called from PROJECT_FILE.i:196. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:193. + Called from PROJECT_FILE.i:197. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:193. + Called from PROJECT_FILE.i:197. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:193. + Called from PROJECT_FILE.i:197. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:194. + Called from PROJECT_FILE.i:198. [value] Done for function mpz_clear -PROJECT_FILE.i:197:[value] Assertion got status unknown. +PROJECT_FILE.i:201:[value] Assertion got status unknown. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:200. + Called from PROJECT_FILE.i:204. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:201. + Called from PROJECT_FILE.i:204. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:201. + Called from PROJECT_FILE.i:205. [value] Done for function mpz_init [value] computing for function mpz_sub <- main. - Called from PROJECT_FILE.i:202. + Called from PROJECT_FILE.i:205. [value] Done for function mpz_sub [value] computing for function mpz_get_si <- main. - Called from PROJECT_FILE.i:203. + Called from PROJECT_FILE.i:206. [value] Done for function mpz_get_si -PROJECT_FILE.i:204:[value] Assertion got status unknown. +PROJECT_FILE.i:207:[value] Assertion got status unknown. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:204. -[value] Done for function mpz_init_set_si -[value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:204. + Called from PROJECT_FILE.i:207. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:205. + Called from PROJECT_FILE.i:208. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:205. + Called from PROJECT_FILE.i:208. [value] Done for function mpz_init [value] computing for function mpz_sub <- main. - Called from PROJECT_FILE.i:206. + Called from PROJECT_FILE.i:209. [value] Done for function mpz_sub [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:207. + Called from PROJECT_FILE.i:210. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:208. + Called from PROJECT_FILE.i:211. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:209. + Called from PROJECT_FILE.i:212. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:209. + Called from PROJECT_FILE.i:212. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:209. + Called from PROJECT_FILE.i:212. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:210. + Called from PROJECT_FILE.i:213. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:210. + Called from PROJECT_FILE.i:213. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:210. + Called from PROJECT_FILE.i:213. [value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:211. -[value] Done for function mpz_clear -PROJECT_FILE.i:214:[value] Assertion got status unknown. +PROJECT_FILE.i:216:[value] Assertion got status unknown. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:216. + Called from PROJECT_FILE.i:218. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:217. + Called from PROJECT_FILE.i:219. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:217. + Called from PROJECT_FILE.i:219. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:218. + Called from PROJECT_FILE.i:220. [value] Done for function mpz_init [value] computing for function mpz_sub <- main. - Called from PROJECT_FILE.i:218. + Called from PROJECT_FILE.i:220. [value] Done for function mpz_sub [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:219. + Called from PROJECT_FILE.i:221. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:220. + Called from PROJECT_FILE.i:222. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:221. + Called from PROJECT_FILE.i:223. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:221. + Called from PROJECT_FILE.i:223. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:221. + Called from PROJECT_FILE.i:223. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:222. + Called from PROJECT_FILE.i:224. [value] Done for function mpz_clear -PROJECT_FILE.i:225:[value] assigning non deterministic value for the first time -PROJECT_FILE.i:231:[value] Assertion got status valid. +PROJECT_FILE.i:227:[value] assigning non deterministic value for the first time +PROJECT_FILE.i:233:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:233. + Called from PROJECT_FILE.i:235. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:233. + Called from PROJECT_FILE.i:235. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:234. + Called from PROJECT_FILE.i:236. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:235. + Called from PROJECT_FILE.i:237. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:236. + Called from PROJECT_FILE.i:238. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:236. + Called from PROJECT_FILE.i:238. [value] Done for function mpz_clear [value] Recording results for main [value] done for function main @@ -547,7 +535,8 @@ typedef __mpz_struct mpz_t[1]; assigns *x; */ extern void mpz_init(__mpz_struct * /*[1]*/ x); /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void mpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ @@ -711,8 +700,8 @@ int main(void) /*@ 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; mpz_t e_acsl_33; - int e_acsl_34; mpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)2); + mpz_t e_acsl_30; mpz_t e_acsl_31; mpz_t e_acsl_32; int e_acsl_33; + mpz_init_set_si((__mpz_struct *)(e_acsl_26),(long)2); mpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)i); mpz_init((__mpz_struct *)(e_acsl_28)); mpz_sub((__mpz_struct *)(e_acsl_28), @@ -724,40 +713,38 @@ int main(void) */ mpz_init_set_si((__mpz_struct *)(e_acsl_30),(long)t[e_acsl_29]); mpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)4); - mpz_init_set_si((__mpz_struct *)(e_acsl_32),(long)i); - mpz_init((__mpz_struct *)(e_acsl_33)); - mpz_sub((__mpz_struct *)(e_acsl_33), + mpz_init((__mpz_struct *)(e_acsl_32)); + mpz_sub((__mpz_struct *)(e_acsl_32), (__mpz_struct const *)(e_acsl_31), - (__mpz_struct const *)(e_acsl_32)); - e_acsl_34 = mpz_cmp((__mpz_struct const *)(e_acsl_30), - (__mpz_struct const *)(e_acsl_33)); - if (! (e_acsl_34 == 0)) { e_acsl_fail((char *)"(t[2-i] == 4-i)"); } + (__mpz_struct const *)(e_acsl_27)); + e_acsl_33 = mpz_cmp((__mpz_struct const *)(e_acsl_30), + (__mpz_struct const *)(e_acsl_32)); + if (! (e_acsl_33 == 0)) { e_acsl_fail((char *)"(t[2-i] == 4-i)"); } mpz_clear((__mpz_struct *)(e_acsl_26)); mpz_clear((__mpz_struct *)(e_acsl_27)); mpz_clear((__mpz_struct *)(e_acsl_28)); mpz_clear((__mpz_struct *)(e_acsl_30)); mpz_clear((__mpz_struct *)(e_acsl_31)); mpz_clear((__mpz_struct *)(e_acsl_32)); - mpz_clear((__mpz_struct *)(e_acsl_33)); } /*@ assert *(&t[2]-i) ≡ 4-i; */ ; - { mpz_t e_acsl_35; mpz_t e_acsl_36; mpz_t e_acsl_37; mpz_t e_acsl_38; - int e_acsl_39; - mpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)*(& t[2] - i)); - mpz_init_set_si((__mpz_struct *)(e_acsl_36),(long)4); - mpz_init_set_si((__mpz_struct *)(e_acsl_37),(long)i); - mpz_init((__mpz_struct *)(e_acsl_38)); - mpz_sub((__mpz_struct *)(e_acsl_38), - (__mpz_struct const *)(e_acsl_36), - (__mpz_struct const *)(e_acsl_37)); - e_acsl_39 = mpz_cmp((__mpz_struct const *)(e_acsl_35), - (__mpz_struct const *)(e_acsl_38)); - if (! (e_acsl_39 == 0)) { e_acsl_fail((char *)"(*(&t[2]-i) == 4-i)"); - } mpz_clear((__mpz_struct *)(e_acsl_35)); + { mpz_t e_acsl_34; mpz_t e_acsl_35; mpz_t e_acsl_36; mpz_t e_acsl_37; + int e_acsl_38; + mpz_init_set_si((__mpz_struct *)(e_acsl_34),(long)*(& t[2] - i)); + mpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)4); + mpz_init_set_si((__mpz_struct *)(e_acsl_36),(long)i); + mpz_init((__mpz_struct *)(e_acsl_37)); + mpz_sub((__mpz_struct *)(e_acsl_37), + (__mpz_struct const *)(e_acsl_35), + (__mpz_struct const *)(e_acsl_36)); + e_acsl_38 = mpz_cmp((__mpz_struct const *)(e_acsl_34), + (__mpz_struct const *)(e_acsl_37)); + if (! (e_acsl_38 == 0)) { e_acsl_fail((char *)"(*(&t[2]-i) == 4-i)"); + } mpz_clear((__mpz_struct *)(e_acsl_34)); + mpz_clear((__mpz_struct *)(e_acsl_35)); mpz_clear((__mpz_struct *)(e_acsl_36)); mpz_clear((__mpz_struct *)(e_acsl_37)); - mpz_clear((__mpz_struct *)(e_acsl_38)); } i ++; @@ -767,14 +754,14 @@ int main(void) p = & t[2]; t[2] = 5; /*@ assert *p ≡ 5; */ ; - { mpz_t e_acsl_40; mpz_t e_acsl_41; int e_acsl_42; - mpz_init_set_si((__mpz_struct *)(e_acsl_40),(long)*p); - mpz_init_set_si((__mpz_struct *)(e_acsl_41),(long)5); - e_acsl_42 = mpz_cmp((__mpz_struct const *)(e_acsl_40), - (__mpz_struct const *)(e_acsl_41)); - if (! (e_acsl_42 == 0)) { e_acsl_fail((char *)"(*p == 5)"); } + { mpz_t e_acsl_39; mpz_t e_acsl_40; int e_acsl_41; + mpz_init_set_si((__mpz_struct *)(e_acsl_39),(long)*p); + mpz_init_set_si((__mpz_struct *)(e_acsl_40),(long)5); + e_acsl_41 = mpz_cmp((__mpz_struct const *)(e_acsl_39), + (__mpz_struct const *)(e_acsl_40)); + if (! (e_acsl_41 == 0)) { e_acsl_fail((char *)"(*p == 5)"); } + mpz_clear((__mpz_struct *)(e_acsl_39)); mpz_clear((__mpz_struct *)(e_acsl_40)); - mpz_clear((__mpz_struct *)(e_acsl_41)); } __retres = 0; 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 1d2785ee447..52bb002c5e5 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 @@ -2,62 +2,62 @@ [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization -PROJECT_FILE.i:131:[value] Assertion got status valid. +PROJECT_FILE.i:135:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:133. -PROJECT_FILE.i:29:[value] Function mpz_init_set_si: postcondition got status valid. + Called from PROJECT_FILE.i:137. +PROJECT_FILE.i:33:[value] Function mpz_init_set_si: postcondition got status valid. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:133. + Called from PROJECT_FILE.i:137. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:134. -PROJECT_FILE.i:45:[value] Function mpz_cmp: precondition got status valid. -PROJECT_FILE.i:46:[value] Function mpz_cmp: precondition got status valid. + Called from PROJECT_FILE.i:138. +PROJECT_FILE.i:49:[value] Function mpz_cmp: precondition got status valid. +PROJECT_FILE.i:50:[value] Function mpz_cmp: precondition got status valid. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:135. + Called from PROJECT_FILE.i:139. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. -PROJECT_FILE.i:115:[value] Function exit: postcondition got status invalid. + Called from PROJECT_FILE.i:129. +PROJECT_FILE.i:119:[value] Function exit: postcondition got status invalid. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:136. -PROJECT_FILE.i:39:[value] Function mpz_clear: precondition got status valid. + Called from PROJECT_FILE.i:140. +PROJECT_FILE.i:43:[value] Function mpz_clear: precondition got status valid. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:136. + Called from PROJECT_FILE.i:140. [value] Done for function mpz_clear -PROJECT_FILE.i:139:[value] Assertion got status valid. +PROJECT_FILE.i:143:[value] Assertion got status valid. [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:141. + Called from PROJECT_FILE.i:145. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:141. + Called from PROJECT_FILE.i:145. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:142. + Called from PROJECT_FILE.i:146. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:144. + Called from PROJECT_FILE.i:148. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:145. + Called from PROJECT_FILE.i:149. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:145. + Called from PROJECT_FILE.i:149. [value] Done for function mpz_clear [value] Recording results for main [value] done for function main @@ -75,7 +75,8 @@ struct __anonstruct___mpz_struct_1 { typedef struct __anonstruct___mpz_struct_1 __mpz_struct; typedef __mpz_struct mpz_t[1]; /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void mpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ 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 de4c8e14948..21e10170516 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 @@ -3,40 +3,40 @@ [value] Initial state computed [value] Values of globals at initialization [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:137. -PROJECT_FILE.i:29:[value] Function mpz_init_set_si: postcondition got status valid. + Called from PROJECT_FILE.i:140. +PROJECT_FILE.i:33:[value] Function mpz_init_set_si: postcondition got status valid. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:137. + Called from PROJECT_FILE.i:140. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:138. -PROJECT_FILE.i:45:[value] Function mpz_cmp: precondition got status valid. -PROJECT_FILE.i:46:[value] Function mpz_cmp: precondition got status valid. + Called from PROJECT_FILE.i:141. +PROJECT_FILE.i:49:[value] Function mpz_cmp: precondition got status valid. +PROJECT_FILE.i:50:[value] Function mpz_cmp: precondition got status valid. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:139. + Called from PROJECT_FILE.i:142. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. -PROJECT_FILE.i:115:[value] Function exit: postcondition got status invalid. + Called from PROJECT_FILE.i:129. +PROJECT_FILE.i:119:[value] Function exit: postcondition got status invalid. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:140. -PROJECT_FILE.i:39:[value] Function mpz_clear: precondition got status valid. + Called from PROJECT_FILE.i:142. +PROJECT_FILE.i:43:[value] Function mpz_clear: precondition got status valid. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:140. + Called from PROJECT_FILE.i:143. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:148. + Called from PROJECT_FILE.i:149. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:149. + Called from PROJECT_FILE.i:150. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. Called from PROJECT_FILE.i:150. @@ -44,543 +44,501 @@ PROJECT_FILE.i:39:[value] Function mpz_clear: precondition got status valid. [value] computing for function e_acsl_fail <- main. Called from PROJECT_FILE.i:151. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_init_set_si <- main. Called from PROJECT_FILE.i:152. [value] Done for function mpz_init_set_si -[value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:152. -[value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:153. + Called from PROJECT_FILE.i:152. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:154. + Called from PROJECT_FILE.i:153. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:155. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:155. + Called from PROJECT_FILE.i:153. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:155. + Called from PROJECT_FILE.i:154. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:156. + Called from PROJECT_FILE.i:154. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:162. + Called from PROJECT_FILE.i:159. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:162. + Called from PROJECT_FILE.i:159. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:163. + Called from PROJECT_FILE.i:160. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:164. + Called from PROJECT_FILE.i:161. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:165. + Called from PROJECT_FILE.i:161. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:165. + Called from PROJECT_FILE.i:162. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:172. + Called from PROJECT_FILE.i:168. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:173. + Called from PROJECT_FILE.i:169. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:173. + Called from PROJECT_FILE.i:170. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:174. + Called from PROJECT_FILE.i:171. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:175. + Called from PROJECT_FILE.i:172. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:175. + Called from PROJECT_FILE.i:172. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:176. + Called from PROJECT_FILE.i:173. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:177. + Called from PROJECT_FILE.i:174. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:178. + Called from PROJECT_FILE.i:175. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:178. + Called from PROJECT_FILE.i:175. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:178. + Called from PROJECT_FILE.i:175. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:179. + Called from PROJECT_FILE.i:176. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:197. + Called from PROJECT_FILE.i:193. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:197. + Called from PROJECT_FILE.i:194. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:198. + Called from PROJECT_FILE.i:195. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:199. + Called from PROJECT_FILE.i:196. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:200. -[value] Done for function mpz_init_set_si -[value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:200. + Called from PROJECT_FILE.i:197. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:201. + Called from PROJECT_FILE.i:197. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:201. + Called from PROJECT_FILE.i:198. PROJECT_FILE.i:21:[value] Function mpz_init: postcondition got status valid. [value] Done for function mpz_init [value] computing for function mpz_add <- main. - Called from PROJECT_FILE.i:202. -PROJECT_FILE.i:60:[value] Function mpz_add: precondition got status valid. -PROJECT_FILE.i:61:[value] Function mpz_add: precondition got status valid. -PROJECT_FILE.i:62:[value] Function mpz_add: precondition got status valid. + Called from PROJECT_FILE.i:198. +PROJECT_FILE.i:64:[value] Function mpz_add: precondition got status valid. +PROJECT_FILE.i:65:[value] Function mpz_add: precondition got status valid. +PROJECT_FILE.i:66:[value] Function mpz_add: precondition got status valid. [value] Done for function mpz_add [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:203. + Called from PROJECT_FILE.i:199. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:204. + Called from PROJECT_FILE.i:200. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:205. -[value] Done for function mpz_init_set_si -[value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:205. + Called from PROJECT_FILE.i:201. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:206. + Called from PROJECT_FILE.i:202. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:207. + Called from PROJECT_FILE.i:203. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:208. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:208. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:208. + Called from PROJECT_FILE.i:204. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:209. + Called from PROJECT_FILE.i:204. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:209. + Called from PROJECT_FILE.i:204. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:209. + Called from PROJECT_FILE.i:205. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:210. + Called from PROJECT_FILE.i:205. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:210. + Called from PROJECT_FILE.i:205. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:215. + Called from PROJECT_FILE.i:208. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:215. + Called from PROJECT_FILE.i:208. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:216. + Called from PROJECT_FILE.i:209. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:217. + Called from PROJECT_FILE.i:210. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:218. -[value] Done for function mpz_init_set_si -[value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:218. + Called from PROJECT_FILE.i:211. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:219. + Called from PROJECT_FILE.i:211. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:219. + Called from PROJECT_FILE.i:212. [value] Done for function mpz_init [value] computing for function mpz_add <- main. - Called from PROJECT_FILE.i:220. + Called from PROJECT_FILE.i:212. [value] Done for function mpz_add [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:221. + Called from PROJECT_FILE.i:213. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:222. + Called from PROJECT_FILE.i:214. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:223. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:223. + Called from PROJECT_FILE.i:215. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:223. + Called from PROJECT_FILE.i:215. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:224. + Called from PROJECT_FILE.i:215. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:224. + Called from PROJECT_FILE.i:216. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:224. + Called from PROJECT_FILE.i:216. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:246. + Called from PROJECT_FILE.i:233. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:247. + Called from PROJECT_FILE.i:233. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:247. + Called from PROJECT_FILE.i:234. [value] Done for function mpz_cmp [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:253. + Called from PROJECT_FILE.i:240. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:254. + Called from PROJECT_FILE.i:241. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:255. + Called from PROJECT_FILE.i:242. [value] Done for function mpz_cmp -PROJECT_FILE.i:256:[value] assigning non deterministic value for the first time +PROJECT_FILE.i:243:[value] assigning non deterministic value for the first time [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:257. + Called from PROJECT_FILE.i:244. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:258. + Called from PROJECT_FILE.i:245. [value] Done for function mpz_clear [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:259. + Called from PROJECT_FILE.i:246. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:260. -[value] Done for function mpz_init_set_si -[value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:260. + Called from PROJECT_FILE.i:247. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:261. + Called from PROJECT_FILE.i:248. [value] Done for function mpz_cmp [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:266. + Called from PROJECT_FILE.i:253. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:267. + Called from PROJECT_FILE.i:254. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:268. + Called from PROJECT_FILE.i:255. [value] Done for function mpz_cmp [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:270. + Called from PROJECT_FILE.i:257. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:271. + Called from PROJECT_FILE.i:258. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:277. + Called from PROJECT_FILE.i:264. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:278. + Called from PROJECT_FILE.i:265. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:279. + Called from PROJECT_FILE.i:266. [value] Done for function mpz_cmp [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:281. + Called from PROJECT_FILE.i:268. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:282. + Called from PROJECT_FILE.i:269. [value] Done for function mpz_clear [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:283. + Called from PROJECT_FILE.i:270. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail -[value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:284. -[value] Done for function mpz_init_set_si -[value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:284. -[value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:285. + Called from PROJECT_FILE.i:271. [value] Done for function mpz_cmp [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:290. + Called from PROJECT_FILE.i:276. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:291. + Called from PROJECT_FILE.i:277. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:292. + Called from PROJECT_FILE.i:278. [value] Done for function mpz_cmp [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:294. + Called from PROJECT_FILE.i:280. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:295. + Called from PROJECT_FILE.i:281. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:303. + Called from PROJECT_FILE.i:289. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:304. + Called from PROJECT_FILE.i:290. [value] Done for function mpz_init_set_si [value] computing for function mpz_init <- main. - Called from PROJECT_FILE.i:305. + Called from PROJECT_FILE.i:291. [value] Done for function mpz_init [value] computing for function mpz_add <- main. - Called from PROJECT_FILE.i:306. + Called from PROJECT_FILE.i:292. [value] Done for function mpz_add [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:307. + Called from PROJECT_FILE.i:293. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:308. + Called from PROJECT_FILE.i:294. [value] Done for function mpz_cmp [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:310. + Called from PROJECT_FILE.i:296. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:311. + Called from PROJECT_FILE.i:297. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:312. + Called from PROJECT_FILE.i:298. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:313. + Called from PROJECT_FILE.i:299. [value] Done for function mpz_clear [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:314. + Called from PROJECT_FILE.i:300. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:315. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:315. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:315. -[value] Done for function mpz_clear -[value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:316. + Called from PROJECT_FILE.i:301. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:316. + Called from PROJECT_FILE.i:301. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:316. + Called from PROJECT_FILE.i:301. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:322. + Called from PROJECT_FILE.i:306. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:322. + Called from PROJECT_FILE.i:306. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:323. + Called from PROJECT_FILE.i:307. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:324. + Called from PROJECT_FILE.i:308. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:325. + Called from PROJECT_FILE.i:309. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:325. + Called from PROJECT_FILE.i:309. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:330. + Called from PROJECT_FILE.i:312. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:330. + Called from PROJECT_FILE.i:312. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:331. + Called from PROJECT_FILE.i:313. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:332. + Called from PROJECT_FILE.i:314. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:333. + Called from PROJECT_FILE.i:315. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:333. + Called from PROJECT_FILE.i:315. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:341. + Called from PROJECT_FILE.i:323. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:341. + Called from PROJECT_FILE.i:323. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:342. + Called from PROJECT_FILE.i:324. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:343. + Called from PROJECT_FILE.i:325. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:344. + Called from PROJECT_FILE.i:326. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:344. + Called from PROJECT_FILE.i:326. [value] Done for function mpz_clear [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:348. + Called from PROJECT_FILE.i:328. [value] Done for function mpz_init_set_si [value] computing for function mpz_init_set_si <- main. - Called from PROJECT_FILE.i:348. + Called from PROJECT_FILE.i:328. [value] Done for function mpz_init_set_si [value] computing for function mpz_cmp <- main. - Called from PROJECT_FILE.i:349. + Called from PROJECT_FILE.i:329. [value] Done for function mpz_cmp [value] computing for function e_acsl_fail <- main. - Called from PROJECT_FILE.i:350. + Called from PROJECT_FILE.i:330. [value] computing for function printf <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function printf [value] computing for function exit <- e_acsl_fail <- main. - Called from PROJECT_FILE.i:125. + Called from PROJECT_FILE.i:129. [value] Done for function exit [value] Recording results for e_acsl_fail [value] Done for function e_acsl_fail [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:351. + Called from PROJECT_FILE.i:331. [value] Done for function mpz_clear [value] computing for function mpz_clear <- main. - Called from PROJECT_FILE.i:351. + Called from PROJECT_FILE.i:331. [value] Done for function mpz_clear [value] Recording results for main [value] done for function main @@ -603,7 +561,8 @@ typedef __mpz_struct mpz_t[1]; assigns *x; */ extern void mpz_init(__mpz_struct * /*[1]*/ x); /*@ ensures \valid(\old(z)); - assigns *z; */ + assigns *z; + assigns *z \from n; */ extern void mpz_init_set_si(__mpz_struct * /*[1]*/ z, long n); /*@ requires \valid(x); assigns *x; */ @@ -642,73 +601,64 @@ int main(void) x = 0; y = 2; /*@ ensures x ≡ 1; */ - { x = 1; - { mpz_t e_acsl_1; mpz_t e_acsl_2; int e_acsl_3; - mpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)1); - e_acsl_3 = mpz_cmp((__mpz_struct const *)(e_acsl_1), - (__mpz_struct const *)(e_acsl_2)); - if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(x == 1)"); } - mpz_clear((__mpz_struct *)(e_acsl_1)); - mpz_clear((__mpz_struct *)(e_acsl_2)); - } - } + { mpz_t e_acsl_1; mpz_t e_acsl_2; int e_acsl_3; x = 1; + mpz_init_set_si((__mpz_struct *)(e_acsl_1),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_2),(long)1); + e_acsl_3 = mpz_cmp((__mpz_struct const *)(e_acsl_1), + (__mpz_struct const *)(e_acsl_2)); + if (! (e_acsl_3 == 0)) { e_acsl_fail((char *)"(x == 1)"); } + mpz_clear((__mpz_struct *)(e_acsl_1)); + mpz_clear((__mpz_struct *)(e_acsl_2)); + } /*@ ensures x ≡ 2; ensures y ≡ 2; */ - { x = 2; - { mpz_t e_acsl_4; mpz_t e_acsl_5; int e_acsl_6; mpz_t e_acsl_7; - mpz_t e_acsl_8; int e_acsl_9; - mpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)2); - e_acsl_6 = mpz_cmp((__mpz_struct const *)(e_acsl_4), - (__mpz_struct const *)(e_acsl_5)); - if (! (e_acsl_6 == 0)) { e_acsl_fail((char *)"(x == 2)"); } - mpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)y); - mpz_init_set_si((__mpz_struct *)(e_acsl_8),(long)2); - e_acsl_9 = mpz_cmp((__mpz_struct const *)(e_acsl_7), - (__mpz_struct const *)(e_acsl_8)); - if (! (e_acsl_9 == 0)) { e_acsl_fail((char *)"(y == 2)"); } - mpz_clear((__mpz_struct *)(e_acsl_4)); - mpz_clear((__mpz_struct *)(e_acsl_5)); - mpz_clear((__mpz_struct *)(e_acsl_7)); - mpz_clear((__mpz_struct *)(e_acsl_8)); - } - } + { 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; mpz_init_set_si((__mpz_struct *)(e_acsl_4),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_5),(long)2); + e_acsl_6 = mpz_cmp((__mpz_struct const *)(e_acsl_4), + (__mpz_struct const *)(e_acsl_5)); + if (! (e_acsl_6 == 0)) { e_acsl_fail((char *)"(x == 2)"); } + mpz_init_set_si((__mpz_struct *)(e_acsl_7),(long)y); + e_acsl_8 = mpz_cmp((__mpz_struct const *)(e_acsl_7), + (__mpz_struct const *)(e_acsl_5)); + if (! (e_acsl_8 == 0)) { e_acsl_fail((char *)"(y == 2)"); } + mpz_clear((__mpz_struct *)(e_acsl_4)); + mpz_clear((__mpz_struct *)(e_acsl_5)); + mpz_clear((__mpz_struct *)(e_acsl_7)); + } /*@ requires x ≡ 2; */ - { mpz_t e_acsl_10; mpz_t e_acsl_11; int e_acsl_12; - mpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_11),(long)2); - e_acsl_12 = mpz_cmp((__mpz_struct const *)(e_acsl_10), - (__mpz_struct const *)(e_acsl_11)); - if (! (e_acsl_12 == 0)) { e_acsl_fail((char *)"(x == 2)"); } - mpz_clear((__mpz_struct *)(e_acsl_10)); - mpz_clear((__mpz_struct *)(e_acsl_11)); + { mpz_t e_acsl_9; mpz_t e_acsl_10; int e_acsl_11; + mpz_init_set_si((__mpz_struct *)(e_acsl_9),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_10),(long)2); + e_acsl_11 = mpz_cmp((__mpz_struct const *)(e_acsl_9), + (__mpz_struct const *)(e_acsl_10)); + if (! (e_acsl_11 == 0)) { e_acsl_fail((char *)"(x == 2)"); } + mpz_clear((__mpz_struct *)(e_acsl_9)); + mpz_clear((__mpz_struct *)(e_acsl_10)); x ++; } - x ++; /*@ requires x ≡ 3; requires y ≡ 2; */ - { mpz_t e_acsl_13; mpz_t e_acsl_14; int e_acsl_15; mpz_t e_acsl_16; - mpz_t e_acsl_17; int e_acsl_18; - mpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_14),(long)3); - e_acsl_15 = mpz_cmp((__mpz_struct const *)(e_acsl_13), - (__mpz_struct const *)(e_acsl_14)); - if (! (e_acsl_15 == 0)) { e_acsl_fail((char *)"(x == 3)"); } - mpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)y); - mpz_init_set_si((__mpz_struct *)(e_acsl_17),(long)2); - e_acsl_18 = mpz_cmp((__mpz_struct const *)(e_acsl_16), - (__mpz_struct const *)(e_acsl_17)); - if (! (e_acsl_18 == 0)) { e_acsl_fail((char *)"(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; + mpz_init_set_si((__mpz_struct *)(e_acsl_12),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_13),(long)3); + e_acsl_14 = mpz_cmp((__mpz_struct const *)(e_acsl_12), + (__mpz_struct const *)(e_acsl_13)); + if (! (e_acsl_14 == 0)) { e_acsl_fail((char *)"(x == 3)"); } + mpz_init_set_si((__mpz_struct *)(e_acsl_15),(long)y); + mpz_init_set_si((__mpz_struct *)(e_acsl_16),(long)2); + e_acsl_17 = mpz_cmp((__mpz_struct const *)(e_acsl_15), + (__mpz_struct const *)(e_acsl_16)); + if (! (e_acsl_17 == 0)) { e_acsl_fail((char *)"(y == 2)"); } + mpz_clear((__mpz_struct *)(e_acsl_12)); mpz_clear((__mpz_struct *)(e_acsl_13)); - mpz_clear((__mpz_struct *)(e_acsl_14)); - mpz_clear((__mpz_struct *)(e_acsl_16)); - mpz_clear((__mpz_struct *)(e_acsl_17)); + mpz_clear((__mpz_struct *)(e_acsl_15)); + mpz_clear((__mpz_struct *)(e_acsl_16)); x += y; } - x += y; /*@ behavior b1: requires x ≡ 5; ensures x ≡ 3; @@ -719,63 +669,53 @@ int main(void) ensures x ≡ y+1; */ - { - { mpz_t e_acsl_19; mpz_t e_acsl_20; int e_acsl_21; mpz_t e_acsl_22; - mpz_t e_acsl_23; mpz_t e_acsl_24; mpz_t e_acsl_25; int e_acsl_26; - mpz_t e_acsl_27; mpz_t e_acsl_28; int e_acsl_29; - mpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_20),(long)5); - e_acsl_21 = mpz_cmp((__mpz_struct const *)(e_acsl_19), - (__mpz_struct const *)(e_acsl_20)); - if (! (e_acsl_21 == 0)) { e_acsl_fail((char *)"(x == 5)"); } - mpz_init_set_si((__mpz_struct *)(e_acsl_22),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_23),(long)3); - mpz_init_set_si((__mpz_struct *)(e_acsl_24),(long)y); - mpz_init((__mpz_struct *)(e_acsl_25)); - mpz_add((__mpz_struct *)(e_acsl_25),(__mpz_struct const *)(e_acsl_23), - (__mpz_struct const *)(e_acsl_24)); + { 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; mpz_init_set_si((__mpz_struct *)(e_acsl_18),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_19),(long)5); + e_acsl_20 = mpz_cmp((__mpz_struct const *)(e_acsl_18), + (__mpz_struct const *)(e_acsl_19)); + if (! (e_acsl_20 == 0)) { e_acsl_fail((char *)"(x == 5)"); } + mpz_init_set_si((__mpz_struct *)(e_acsl_21),(long)3); + mpz_init_set_si((__mpz_struct *)(e_acsl_22),(long)y); + mpz_init((__mpz_struct *)(e_acsl_23)); + mpz_add((__mpz_struct *)(e_acsl_23),(__mpz_struct const *)(e_acsl_21), + (__mpz_struct const *)(e_acsl_22)); + e_acsl_24 = mpz_cmp((__mpz_struct const *)(e_acsl_18), + (__mpz_struct const *)(e_acsl_23)); + if (! (e_acsl_24 == 0)) { e_acsl_fail((char *)"(x == 3+y)"); } + mpz_init_set_si((__mpz_struct *)(e_acsl_25),(long)2); e_acsl_26 = mpz_cmp((__mpz_struct const *)(e_acsl_22), (__mpz_struct const *)(e_acsl_25)); - if (! (e_acsl_26 == 0)) { e_acsl_fail((char *)"(x == 3+y)"); } - mpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)y); - mpz_init_set_si((__mpz_struct *)(e_acsl_28),(long)2); - e_acsl_29 = mpz_cmp((__mpz_struct const *)(e_acsl_27), - (__mpz_struct const *)(e_acsl_28)); - if (! (e_acsl_29 == 0)) { e_acsl_fail((char *)"(y == 2)"); } + if (! (e_acsl_26 == 0)) { e_acsl_fail((char *)"(y == 2)"); } + mpz_clear((__mpz_struct *)(e_acsl_18)); mpz_clear((__mpz_struct *)(e_acsl_19)); - mpz_clear((__mpz_struct *)(e_acsl_20)); + mpz_clear((__mpz_struct *)(e_acsl_21)); mpz_clear((__mpz_struct *)(e_acsl_22)); mpz_clear((__mpz_struct *)(e_acsl_23)); - mpz_clear((__mpz_struct *)(e_acsl_24)); - mpz_clear((__mpz_struct *)(e_acsl_25)); - mpz_clear((__mpz_struct *)(e_acsl_27)); - mpz_clear((__mpz_struct *)(e_acsl_28)); + mpz_clear((__mpz_struct *)(e_acsl_25)); x = 3; } - x = 3; - { 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; mpz_t e_acsl_36; int e_acsl_37; - mpz_init_set_si((__mpz_struct *)(e_acsl_30),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)3); - e_acsl_32 = mpz_cmp((__mpz_struct const *)(e_acsl_30), - (__mpz_struct const *)(e_acsl_31)); - if (! (e_acsl_32 == 0)) { e_acsl_fail((char *)"(x == 3)"); } - mpz_init_set_si((__mpz_struct *)(e_acsl_33),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_34),(long)y); - mpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)1); - mpz_init((__mpz_struct *)(e_acsl_36)); - mpz_add((__mpz_struct *)(e_acsl_36),(__mpz_struct const *)(e_acsl_34), - (__mpz_struct const *)(e_acsl_35)); - e_acsl_37 = mpz_cmp((__mpz_struct const *)(e_acsl_33), - (__mpz_struct const *)(e_acsl_36)); - if (! (e_acsl_37 == 0)) { e_acsl_fail((char *)"(x == y+1)"); } - mpz_clear((__mpz_struct *)(e_acsl_30)); - mpz_clear((__mpz_struct *)(e_acsl_31)); - mpz_clear((__mpz_struct *)(e_acsl_33)); - mpz_clear((__mpz_struct *)(e_acsl_34)); - mpz_clear((__mpz_struct *)(e_acsl_35)); - mpz_clear((__mpz_struct *)(e_acsl_36)); - } - } + mpz_init_set_si((__mpz_struct *)(e_acsl_27),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_28),(long)3); + e_acsl_29 = mpz_cmp((__mpz_struct const *)(e_acsl_27), + (__mpz_struct const *)(e_acsl_28)); + if (! (e_acsl_29 == 0)) { e_acsl_fail((char *)"(x == 3)"); } + mpz_init_set_si((__mpz_struct *)(e_acsl_30),(long)y); + mpz_init_set_si((__mpz_struct *)(e_acsl_31),(long)1); + mpz_init((__mpz_struct *)(e_acsl_32)); + mpz_add((__mpz_struct *)(e_acsl_32),(__mpz_struct const *)(e_acsl_30), + (__mpz_struct const *)(e_acsl_31)); + e_acsl_33 = mpz_cmp((__mpz_struct const *)(e_acsl_27), + (__mpz_struct const *)(e_acsl_32)); + if (! (e_acsl_33 == 0)) { e_acsl_fail((char *)"(x == y+1)"); } + mpz_clear((__mpz_struct *)(e_acsl_27)); + mpz_clear((__mpz_struct *)(e_acsl_28)); + mpz_clear((__mpz_struct *)(e_acsl_30)); + mpz_clear((__mpz_struct *)(e_acsl_31)); + mpz_clear((__mpz_struct *)(e_acsl_32)); + } /*@ behavior b1: assumes x ≡ 1; @@ -788,149 +728,137 @@ int main(void) requires x+y ≡ 5; */ - { mpz_t e_acsl_55; mpz_t e_acsl_56; int e_acsl_57; int e_acsl_58; - mpz_t e_acsl_59; mpz_t e_acsl_60; int e_acsl_61; int e_acsl_62; - int e_acsl_63; mpz_t e_acsl_64; mpz_t e_acsl_65; int e_acsl_66; - int e_acsl_67; int e_acsl_68; - mpz_init_set_si((__mpz_struct *)(e_acsl_55),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_56),(long)1); - e_acsl_57 = mpz_cmp((__mpz_struct const *)(e_acsl_55), - (__mpz_struct const *)(e_acsl_56)); - if (! (e_acsl_57 == 0)) { e_acsl_58 = 1; } + { 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; + mpz_init_set_si((__mpz_struct *)(e_acsl_34),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_35),(long)1); + e_acsl_36 = mpz_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_69; - mpz_t e_acsl_70; - int e_acsl_71; - mpz_init_set_si((__mpz_struct *)(e_acsl_69),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_70),(long)0); - e_acsl_71 = mpz_cmp((__mpz_struct const *)(e_acsl_69), - (__mpz_struct const *)(e_acsl_70)); - e_acsl_58 = e_acsl_71 == 0; - mpz_clear((__mpz_struct *)(e_acsl_69)); - mpz_clear((__mpz_struct *)(e_acsl_70)); - } if (! e_acsl_58) { e_acsl_fail((char *)"(x == 1 ==> x == 0)"); } - mpz_init_set_si((__mpz_struct *)(e_acsl_59),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_60),(long)3); - e_acsl_61 = mpz_cmp((__mpz_struct const *)(e_acsl_59), - (__mpz_struct const *)(e_acsl_60)); - if (e_acsl_61 == 0) { - mpz_t e_acsl_72; - mpz_t e_acsl_73; - int e_acsl_74; - mpz_init_set_si((__mpz_struct *)(e_acsl_72),(long)y); - mpz_init_set_si((__mpz_struct *)(e_acsl_73),(long)2); - e_acsl_74 = mpz_cmp((__mpz_struct const *)(e_acsl_72), - (__mpz_struct const *)(e_acsl_73)); - e_acsl_62 = e_acsl_74 == 0; - mpz_clear((__mpz_struct *)(e_acsl_72)); - mpz_clear((__mpz_struct *)(e_acsl_73)); - } else { e_acsl_62 = 0; } if (! e_acsl_62) { e_acsl_63 = 1; } + mpz_t e_acsl_37; + mpz_t e_acsl_38; + int e_acsl_39; + mpz_init_set_si((__mpz_struct *)(e_acsl_37),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_38),(long)0); + e_acsl_39 = mpz_cmp((__mpz_struct const *)(e_acsl_37), + (__mpz_struct const *)(e_acsl_38)); + e_acsl_40 = e_acsl_39 == 0; + mpz_clear((__mpz_struct *)(e_acsl_37)); + mpz_clear((__mpz_struct *)(e_acsl_38)); + } if (! e_acsl_40) { e_acsl_fail((char *)"(x == 1 ==> x == 0)"); } + mpz_init_set_si((__mpz_struct *)(e_acsl_41),(long)3); + e_acsl_42 = mpz_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; + mpz_init_set_si((__mpz_struct *)(e_acsl_43),(long)y); + mpz_init_set_si((__mpz_struct *)(e_acsl_44),(long)2); + e_acsl_45 = mpz_cmp((__mpz_struct const *)(e_acsl_43), + (__mpz_struct const *)(e_acsl_44)); + e_acsl_46 = e_acsl_45 == 0; + mpz_clear((__mpz_struct *)(e_acsl_43)); + mpz_clear((__mpz_struct *)(e_acsl_44)); + } else { e_acsl_46 = 0; } if (! e_acsl_46) { e_acsl_50 = 1; } else { - mpz_t e_acsl_75; - mpz_t e_acsl_76; - int e_acsl_77; - mpz_init_set_si((__mpz_struct *)(e_acsl_75),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_76),(long)3); - e_acsl_77 = mpz_cmp((__mpz_struct const *)(e_acsl_75), - (__mpz_struct const *)(e_acsl_76)); - e_acsl_63 = e_acsl_77 == 0; - mpz_clear((__mpz_struct *)(e_acsl_75)); - mpz_clear((__mpz_struct *)(e_acsl_76)); + mpz_t e_acsl_47; + mpz_t e_acsl_48; + int e_acsl_49; + mpz_init_set_si((__mpz_struct *)(e_acsl_47),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_48),(long)3); + e_acsl_49 = mpz_cmp((__mpz_struct const *)(e_acsl_47), + (__mpz_struct const *)(e_acsl_48)); + e_acsl_50 = e_acsl_49 == 0; + mpz_clear((__mpz_struct *)(e_acsl_47)); + mpz_clear((__mpz_struct *)(e_acsl_48)); } - if (! e_acsl_63) { e_acsl_fail((char *)"(x == 3 && y == 2 ==> x == 3)"); - } mpz_init_set_si((__mpz_struct *)(e_acsl_64),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_65),(long)3); - e_acsl_66 = mpz_cmp((__mpz_struct const *)(e_acsl_64), - (__mpz_struct const *)(e_acsl_65)); - if (e_acsl_66 == 0) { - mpz_t e_acsl_78; - mpz_t e_acsl_79; - int e_acsl_80; - mpz_init_set_si((__mpz_struct *)(e_acsl_78),(long)y); - mpz_init_set_si((__mpz_struct *)(e_acsl_79),(long)2); - e_acsl_80 = mpz_cmp((__mpz_struct const *)(e_acsl_78), - (__mpz_struct const *)(e_acsl_79)); - e_acsl_67 = e_acsl_80 == 0; - mpz_clear((__mpz_struct *)(e_acsl_78)); - mpz_clear((__mpz_struct *)(e_acsl_79)); - } else { e_acsl_67 = 0; } if (! e_acsl_67) { e_acsl_68 = 1; } + if (! e_acsl_50) { e_acsl_fail((char *)"(x == 3 && y == 2 ==> x == 3)"); + } + e_acsl_51 = mpz_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; + mpz_init_set_si((__mpz_struct *)(e_acsl_52),(long)y); + mpz_init_set_si((__mpz_struct *)(e_acsl_53),(long)2); + e_acsl_54 = mpz_cmp((__mpz_struct const *)(e_acsl_52), + (__mpz_struct const *)(e_acsl_53)); + e_acsl_55 = e_acsl_54 == 0; + mpz_clear((__mpz_struct *)(e_acsl_52)); + mpz_clear((__mpz_struct *)(e_acsl_53)); + } else { e_acsl_55 = 0; } if (! e_acsl_55) { e_acsl_61 = 1; } else { - mpz_t e_acsl_81; - mpz_t e_acsl_82; - mpz_t e_acsl_83; - mpz_t e_acsl_84; - int e_acsl_85; - mpz_init_set_si((__mpz_struct *)(e_acsl_81),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_82),(long)y); - mpz_init((__mpz_struct *)(e_acsl_83)); - mpz_add((__mpz_struct *)(e_acsl_83),(__mpz_struct const *)(e_acsl_81), - (__mpz_struct const *)(e_acsl_82)); - mpz_init_set_si((__mpz_struct *)(e_acsl_84),(long)5); - e_acsl_85 = mpz_cmp((__mpz_struct const *)(e_acsl_83), - (__mpz_struct const *)(e_acsl_84)); - e_acsl_68 = e_acsl_85 == 0; - mpz_clear((__mpz_struct *)(e_acsl_81)); - mpz_clear((__mpz_struct *)(e_acsl_82)); - mpz_clear((__mpz_struct *)(e_acsl_83)); - mpz_clear((__mpz_struct *)(e_acsl_84)); + mpz_t e_acsl_56; + mpz_t e_acsl_57; + mpz_t e_acsl_58; + mpz_t e_acsl_59; + int e_acsl_60; + mpz_init_set_si((__mpz_struct *)(e_acsl_56),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_57),(long)y); + mpz_init((__mpz_struct *)(e_acsl_58)); + mpz_add((__mpz_struct *)(e_acsl_58),(__mpz_struct const *)(e_acsl_56), + (__mpz_struct const *)(e_acsl_57)); + mpz_init_set_si((__mpz_struct *)(e_acsl_59),(long)5); + e_acsl_60 = mpz_cmp((__mpz_struct const *)(e_acsl_58), + (__mpz_struct const *)(e_acsl_59)); + e_acsl_61 = e_acsl_60 == 0; + mpz_clear((__mpz_struct *)(e_acsl_56)); + mpz_clear((__mpz_struct *)(e_acsl_57)); + mpz_clear((__mpz_struct *)(e_acsl_58)); + mpz_clear((__mpz_struct *)(e_acsl_59)); } - if (! e_acsl_68) { + if (! e_acsl_61) { e_acsl_fail((char *)"(x == 3 && y == 2 ==> x+y == 5)"); - } mpz_clear((__mpz_struct *)(e_acsl_55)); - mpz_clear((__mpz_struct *)(e_acsl_56)); - mpz_clear((__mpz_struct *)(e_acsl_59)); - mpz_clear((__mpz_struct *)(e_acsl_60)); - mpz_clear((__mpz_struct *)(e_acsl_64)); - mpz_clear((__mpz_struct *)(e_acsl_65)); + } mpz_clear((__mpz_struct *)(e_acsl_34)); + mpz_clear((__mpz_struct *)(e_acsl_35)); + mpz_clear((__mpz_struct *)(e_acsl_41)); x += y; } - x += y; /*@ requires x ≡ 5; */ - { mpz_t e_acsl_86; mpz_t e_acsl_87; int e_acsl_88; - mpz_init_set_si((__mpz_struct *)(e_acsl_86),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_87),(long)5); - e_acsl_88 = mpz_cmp((__mpz_struct const *)(e_acsl_86), - (__mpz_struct const *)(e_acsl_87)); - if (! (e_acsl_88 == 0)) { e_acsl_fail((char *)"(x == 5)"); } - mpz_clear((__mpz_struct *)(e_acsl_86)); - mpz_clear((__mpz_struct *)(e_acsl_87)); - } - - /*@ requires y ≡ 2; */ - { mpz_t e_acsl_89; mpz_t e_acsl_90; int e_acsl_91; - mpz_init_set_si((__mpz_struct *)(e_acsl_89),(long)y); - mpz_init_set_si((__mpz_struct *)(e_acsl_90),(long)2); - e_acsl_91 = mpz_cmp((__mpz_struct const *)(e_acsl_89), - (__mpz_struct const *)(e_acsl_90)); - if (! (e_acsl_91 == 0)) { e_acsl_fail((char *)"(y == 2)"); } - mpz_clear((__mpz_struct *)(e_acsl_89)); - mpz_clear((__mpz_struct *)(e_acsl_90)); - } + { mpz_t e_acsl_62; mpz_t e_acsl_63; int e_acsl_64; + mpz_init_set_si((__mpz_struct *)(e_acsl_62),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_63),(long)5); + e_acsl_64 = mpz_cmp((__mpz_struct const *)(e_acsl_62), + (__mpz_struct const *)(e_acsl_63)); + if (! (e_acsl_64 == 0)) { e_acsl_fail((char *)"(x == 5)"); } + mpz_clear((__mpz_struct *)(e_acsl_62)); + mpz_clear((__mpz_struct *)(e_acsl_63)); + /*@ requires y ≡ 2; */ + { mpz_t e_acsl_65; mpz_t e_acsl_66; int e_acsl_67; + mpz_init_set_si((__mpz_struct *)(e_acsl_65),(long)y); + mpz_init_set_si((__mpz_struct *)(e_acsl_66),(long)2); + e_acsl_67 = mpz_cmp((__mpz_struct const *)(e_acsl_65), + (__mpz_struct const *)(e_acsl_66)); + if (! (e_acsl_67 == 0)) { e_acsl_fail((char *)"(y == 2)"); } + mpz_clear((__mpz_struct *)(e_acsl_65)); + mpz_clear((__mpz_struct *)(e_acsl_66)); x += y; + } + } - x += y; /*@ requires x ≡ 7; ensures x ≡ 7; */ - { - { mpz_t e_acsl_92; mpz_t e_acsl_93; int e_acsl_94; - mpz_init_set_si((__mpz_struct *)(e_acsl_92),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_93),(long)7); - e_acsl_94 = mpz_cmp((__mpz_struct const *)(e_acsl_92), - (__mpz_struct const *)(e_acsl_93)); - if (! (e_acsl_94 == 0)) { e_acsl_fail((char *)"(x == 7)"); } - mpz_clear((__mpz_struct *)(e_acsl_92)); - mpz_clear((__mpz_struct *)(e_acsl_93)); + { 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; + mpz_init_set_si((__mpz_struct *)(e_acsl_68),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_69),(long)7); + e_acsl_70 = mpz_cmp((__mpz_struct const *)(e_acsl_68), + (__mpz_struct const *)(e_acsl_69)); + if (! (e_acsl_70 == 0)) { e_acsl_fail((char *)"(x == 7)"); } + mpz_clear((__mpz_struct *)(e_acsl_68)); + mpz_clear((__mpz_struct *)(e_acsl_69)); __retres = 0; } - __retres = 0; - { mpz_t e_acsl_95; mpz_t e_acsl_96; int e_acsl_97; - mpz_init_set_si((__mpz_struct *)(e_acsl_95),(long)x); - mpz_init_set_si((__mpz_struct *)(e_acsl_96),(long)7); - e_acsl_97 = mpz_cmp((__mpz_struct const *)(e_acsl_95), - (__mpz_struct const *)(e_acsl_96)); - if (! (e_acsl_97 == 0)) { e_acsl_fail((char *)"(x == 7)"); } - mpz_clear((__mpz_struct *)(e_acsl_95)); - mpz_clear((__mpz_struct *)(e_acsl_96)); - } - } + mpz_init_set_si((__mpz_struct *)(e_acsl_71),(long)x); + mpz_init_set_si((__mpz_struct *)(e_acsl_72),(long)7); + e_acsl_73 = mpz_cmp((__mpz_struct const *)(e_acsl_71), + (__mpz_struct const *)(e_acsl_72)); + if (! (e_acsl_73 == 0)) { e_acsl_fail((char *)"(x == 7)"); } + mpz_clear((__mpz_struct *)(e_acsl_71)); + mpz_clear((__mpz_struct *)(e_acsl_72)); + } return (__retres); } diff --git a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.res.oracle b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.res.oracle index cc46d0611d8..540c8f0d059 100644 --- a/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.res.oracle +++ b/src/plugins/e-acsl/tests/e-acsl-runtime/oracle/true.res.oracle @@ -2,7 +2,7 @@ [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization -PROJECT_FILE.i:132:[value] Assertion got status valid. +PROJECT_FILE.i:136:[value] Assertion got status valid. [value] Recording results for main [value] done for function main [value] ====== VALUES COMPUTED ====== diff --git a/src/plugins/e-acsl/visit.ml b/src/plugins/e-acsl/visit.ml index 5f93279bf31..b791937f817 100644 --- a/src/plugins/e-acsl/visit.ml +++ b/src/plugins/e-acsl/visit.ml @@ -29,15 +29,15 @@ open Cil let compatible_type ty ty' = (* compatible if the two type has the same "integrality" *) - (* not (ty xor ty') *) - (isIntegralType ty && isIntegralType ty') - || (not (isIntegralType ty || isIntegralType ty')) + 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 e = +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 Mpz.t (fun _ v -> [ Mpz.init_set v e ]) in + let mk_mpz env e = + Env.new_var env t_opt Mpz.t (fun _ v -> [ Mpz.init_set 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 @@ -49,6 +49,7 @@ let context_sensitive ?loc env ctx is_mpz_string e = "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 @@ -61,7 +62,7 @@ let context_sensitive ?loc env ctx is_mpz_string e = e, env else begin (* Convert the C integer into a mpz. - Remember: very long integer constant has bee, temporary converted into + Remember: very long integer constant has been temporary converted into strings *) assert (Options.verify (isIntegralType ty || is_mpz_string) @@ -141,74 +142,76 @@ let constant_to_exp ?(loc=Location.unknown) = function | CStr _ | CWStr _ | CChr _ | CReal _ | CEnum _ as c -> new_exp ?loc (Const c), false -let rec thost_to_host kf env = function +let rec thost_to_host env = function | TVar { lv_origin = Some v } -> Var v, env | TVar { lv_origin = None } -> Misc.not_yet "logic variable" | TResult _typ -> Misc.not_yet "\\result" | TMem t -> - let e, env = term_to_exp kf env (Ctype intType) t in + let e, env = term_to_exp env (Ctype intType) t in Options.warning ~source:(fst e.eloc) ~once:true "missing guard for ensuring that %a is a valid memory access" d_term t; Mem e, env -and toffset_to_offset ?loc kf env = function +and toffset_to_offset ?loc env = function | TNoOffset -> NoOffset, env | TField(f, offset) -> (* TODO: still untested *) - let offset, env = toffset_to_offset ?loc kf env offset in + let offset, env = toffset_to_offset ?loc env offset in Field(f, offset), env | TIndex(t, offset) -> - let e, env = term_to_exp kf env (Ctype intType) t in + let e, env = term_to_exp env (Ctype 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; - let offset, env = toffset_to_offset kf env offset in + let offset, env = toffset_to_offset env offset in Index(e, offset), env -and tlval_to_lval kf env (host, offset) = - let host, env = thost_to_host kf env host in - let offset, env = toffset_to_offset kf env offset in +and tlval_to_lval env (host, offset) = + let host, env = thost_to_host env host in + let offset, env = toffset_to_offset env offset in (host, offset), env -and context_insensitive_term_to_exp kf env t = +(* the returned boolean says is the expression is an mpz_string *) +and context_insensitive_term_to_exp env t = let loc = t.term_loc in match t.term_node with | TConst c -> let c, is_mpz_string = constant_to_exp ~loc c in c, env, is_mpz_string | TLval lv -> - let lv, env = tlval_to_lval kf env lv in + let lv, env = tlval_to_lval env lv in 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 kf env ty t in + let e, env = term_to_exp env ty 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 kf env ty t in + let e, env = term_to_exp env ty t in new_exp ~loc (AlignOfE e), env, false - | TUnOp(Neg | BNot as op, t) -> - let e, env = term_to_exp kf env Linteger t in + | TUnOp(Neg | BNot as op, t') -> + let e, env = term_to_exp env Linteger t' in let name = match op with | Neg -> "mpz_neg" | BNot -> "mpz_com" | LNot -> assert false in let e, env = - Env.new_var_and_mpz_init + Env.new_var_and_mpz_init env + (Some t) (fun _ ev -> [ Misc.mk_call ~loc name [ ev; e ] ]) in e, env, false | TUnOp(LNot, t) -> let ty = t.term_type in - let e, env = term_to_exp kf env ty t in + let e, env = term_to_exp env ty 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. *) @@ -216,28 +219,28 @@ and context_insensitive_term_to_exp kf env t = new_exp ~loc (UnOp(LNot, e, intType)), env, false | TBinOp(PlusA | MinusA | Mult as bop, t1, t2) -> (* arithmetic binary operator not safely convertible into C *) - let e1, env = term_to_exp kf env Linteger t1 in - let e2, env = term_to_exp kf env Linteger t2 in + 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 mk_stmts in + let e, env = Env.new_var_and_mpz_init env (Some t) mk_stmts in e, env, false | TBinOp(Div | Mod as bop, t1, t2) -> (* arithmetic binary operator potentially convertible into C *) let ctx = principal_type_from_term t1 t2 in - let e1, env = term_to_exp kf env ctx t1 in - let e2, env = term_to_exp kf env ctx t2 in + let e1, env = term_to_exp env ctx t1 in + let e2, env = term_to_exp env ctx t2 in (* 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 kf env ~e1:(e2, ctx) Eq t2 zero in + let guard, env = comparison_to_exp env ~e1:(e2, ctx) Eq t2 zero (Some t) in let mk_stmts v e = let name = name_of_mpz_arith_bop bop in let cond = Misc.mk_e_acsl_guard guard (Logic_const.prel (Req, t2, zero)) in - Env.add_assert kf cond (Logic_const.prel (Rneq, t2, zero)); + Env.add_assert env cond (Logic_const.prel (Rneq, t2, zero)); let instr = match ctx with | Ctype ty when isIntegralType ty -> let e = new_exp ~loc (BinOp(bop, e1, e2, ty)) in @@ -247,15 +250,16 @@ and context_insensitive_term_to_exp kf env t = in [ cond; instr ] in + let t = Some t in let e, env = match ctx with - | Ctype ty when isIntegralType ty -> Env.new_var env ty mk_stmts - | Linteger -> Env.new_var_and_mpz_init env mk_stmts + | 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 in e, env, false | TBinOp(Lt | Gt | Le | Ge | Eq | Ne as bop, t1, t2) -> (* comparison operators *) - let e, env = comparison_to_exp ~loc kf env bop t1 t2 in + let e, env = comparison_to_exp ~loc env bop t1 t2 (Some t) in e, env, false | TBinOp((Shiftlt | Shiftrt), _, _) -> (* left/right shift *) @@ -272,8 +276,8 @@ and context_insensitive_term_to_exp kf env t = Ctype intType | ty -> ty in - let e1, env = term_to_exp kf env (ctx_type t1) t1 in - let e2, env = term_to_exp kf env (ctx_type t2) t2 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 Options.warning ~source:(fst loc) ~once:true "missing guard for ensuring that %a is a valid pointer" d_term t; @@ -281,19 +285,65 @@ and context_insensitive_term_to_exp kf env t = whatever is [e2] *) new_exp ~loc (BinOp(bop, e1, e2, typeOf e1)), env, false | TCastE(ty, t) -> - let e, env = term_to_exp kf env (Ctype ty) t in + let e, env = term_to_exp env (Ctype ty) t in mkCast e ty, env, false | TAddrOf lv -> - let lv, env = tlval_to_lval kf env lv in + let lv, env = tlval_to_lval env lv in mkAddrOf ~loc lv, env, false | TStartOf lv -> - let lv, env = tlval_to_lval kf env lv in + let lv, env = tlval_to_lval env lv in mkAddrOrStartOf ~loc lv, env, false | Tapp _ -> Misc.not_yet "applying logic function" | Tlambda _ -> Misc.not_yet "functional" | TDataCons _ -> Misc.not_yet "constructor" | Tif _ -> Misc.not_yet "conditional" - | Tat _ -> Misc.not_yet "\\at" + | Tat(t', StmtLabel { contents = stmt } (*_label*)) -> +(* Options.feedback "proceeding term %a" Term.pretty t;*) + let ty = t'.term_type in + let e, env = term_to_exp (Env.push env) ty t' in + let new_v = ref None in + let res, env = + Env.new_var ~global:true env + (Some t) (typeOf e) + (fun lv' e' -> new_v := Some (lv', e'); []) + in + let env_ref = ref env in + let o = object + inherit Visitor.frama_c_inplace + method vstmt_aux stmt = +(* Options.feedback "labeled stmt sid %d (%a) = %a" + stmt.sid Project.pretty (Project.current ()) Stmt.pretty stmt;*) + let new_lv, new_e = Extlib.the !new_v in + let new_stmt = + if Mpz.is_t (typeOf new_e) then + Mpz.init_set new_e e + else + mkStmtOneInstr ~valid_sid:true + (Set((Var new_lv, NoOffset), e, Location.unknown)) + in + assert (!env_ref == env); + let block, env = + Env.pop_and_get env new_stmt ~global_clear:false Env.Middle + in + env_ref := env; + let new_stmt = mkStmt ~valid_sid:true (Block block) in + +(* let stmt = + mkStmt ~valid_sid:true (Block (mkBlock [ new_stmt; stmt ])) + in + let stmt = Env.block_as_stmt lenv stmt in*) + let sk = stmt.skind in + stmt.skind <- Block (mkBlock [ new_stmt; mkStmt ~valid_sid:true sk ]); +(* Options.feedback "the new stmt is (sid %d): %a" stmt.sid + Stmt.pretty stmt;*) + ChangeTo stmt + end + in + let bhv = (Env.get_visitor env)#behavior in + let new_stmt = Visitor.visitFramacStmt o (get_stmt bhv stmt) in + set_stmt bhv stmt new_stmt; + res, !env_ref, false + | Tat(_t, LogicLabel(_, _label)) -> Misc.not_yet "builtin logic label in \\at" | Tbase_addr _ -> Misc.not_yet "\\base_addr" | Tblock_length _ -> Misc.not_yet "\\block_length" | Tnull -> mkCast (zero ~loc) (TPtr(TVoid [], [])), env, false @@ -310,14 +360,14 @@ and context_insensitive_term_to_exp kf env t = | Tlet _ -> Misc.not_yet "let binding" (* Convert an ACSL term into a corresponding C expression (if any) in the given - environment. Also extend this environment which includes the generating + environment. Also extend this environment in order to include the generating constructs. *) -and term_to_exp kf env ctx t = - let e, env, is_mpz_string = context_insensitive_term_to_exp kf env t in - context_sensitive ~loc:t.term_loc env ctx is_mpz_string e +and term_to_exp env ctx t = + let e, env, is_mpz_string = context_insensitive_term_to_exp env t in + context_sensitive ~loc:t.term_loc env ctx is_mpz_string (Some t) e (* generate the C code equivalent to [t1 bop t2]. *) -and comparison_to_exp ?(loc=Location.unknown) kf ?e1 env bop t1 t2 = +and comparison_to_exp ?(loc=Location.unknown) ?e1 env bop t1 t2 t_opt = let ctx = match e1 with | None -> principal_type_from_term t1 t2 | Some(_, ctx) -> @@ -327,16 +377,17 @@ and comparison_to_exp ?(loc=Location.unknown) kf ?e1 env bop t1 t2 = (* 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 kf env ctx t1 + | None -> term_to_exp env ctx t1 | Some(e1, ctx1) when Cil_datatype.Logic_type.equal ctx ctx1 -> e1, env - | Some(e1, _) -> context_sensitive ~loc:e1.eloc env ctx false e1 + | Some(e1, _) -> context_sensitive ~loc:e1.eloc env ctx false (Some t1) e1 in - let e2, env = term_to_exp kf env ctx t2 in + let e2, env = term_to_exp env ctx t2 in match ctx with | Linteger -> let e, env = Env.new_var env + t_opt intType (fun v _ -> [ Misc.mk_call ~result:(var v) "mpz_cmp" [ e1; e2 ] ]) in @@ -347,7 +398,7 @@ and comparison_to_exp ?(loc=Location.unknown) kf ?e1 env bop t1 t2 = (* Convert an ACSL named predicate into a corresponding C expression (if any) in the given environment. Also extend this environment which includes the generating constructs. *) -let rec named_predicate_to_exp kf env p = +let rec named_predicate_to_exp env p = let loc = p.loc in match p.content with | Pfalse -> zero ~loc, env @@ -355,23 +406,24 @@ let rec named_predicate_to_exp kf env p = | Papp _ -> Misc.not_yet "logic function application" | Pseparated _ -> Misc.not_yet "separated" | Prel(rel, t1, t2) -> - let e, env = comparison_to_exp ~loc kf env (relation_to_binop rel) t1 t2 in - context_sensitive ~loc env (Ctype intType) false e + let e, env = + comparison_to_exp ~loc env (relation_to_binop rel) t1 t2 None + in + context_sensitive ~loc env (Ctype intType) false None e | Pand(p1, p2) -> (* p1 && p2 <==> if p1 then p2 else false *) - let e1, env1 = named_predicate_to_exp kf env p1 in - let e2, env2 = - named_predicate_to_exp kf (Env.no_overlap ~from:env1 Env.empty) p2 - in - let env = Env.merge_block_vars ~from:env2 env1 in + let e1, env1 = named_predicate_to_exp env p1 in + let e2, env2 = named_predicate_to_exp (Env.push env1) p2 in + let env = Env.pop env2 in Env.new_var env + None intType (fun v _ -> let lv = var v in - let then_block = + let then_block, _ = let s = mkStmt ~valid_sid:true (Instr (Set(lv, e2, loc))) in - Env.block env2 s + Env.pop_and_get env2 s ~global_clear:false Env.Middle in let else_block = mkBlock [ mkStmt ~valid_sid:true (Instr (Set(lv, zero loc, loc))) ] @@ -379,30 +431,29 @@ let rec named_predicate_to_exp kf env p = [ mkStmt ~valid_sid:true (If(e1, then_block, else_block, loc)) ]) | Por(p1, p2) -> (* p1 || p2 <==> if p1 then true else p2 *) - let e1, env1 = named_predicate_to_exp kf env p1 in - let e2, env2 = - named_predicate_to_exp kf (Env.no_overlap ~from:env1 Env.empty) p2 - in - let env = Env.merge_block_vars ~from:env2 env1 in + let e1, env1 = named_predicate_to_exp env p1 in + let e2, env2 = named_predicate_to_exp (Env.push env1) p2 in + let env = Env.pop env2 in Env.new_var env + None intType (fun v _ -> let lv = var v in let then_block = mkBlock [ mkStmt ~valid_sid:true (Instr (Set(lv, one loc, loc))) ] in - let else_block = + let else_block, _ = let s = mkStmt ~valid_sid:true (Instr (Set(lv, e2, loc))) in - Env.block env2 s + Env.pop_and_get env2 s ~global_clear:false Env.Middle in [ mkStmt ~valid_sid:true (If(e1, then_block, else_block, loc)) ]) | Pxor _ -> Misc.not_yet "xor" | Pimplies(p1, p2) -> - named_predicate_to_exp kf env (Logic_const.por ((Logic_const.pnot p1), p2)) + named_predicate_to_exp env (Logic_const.por ((Logic_const.pnot p1), p2)) | Piff _ -> Misc.not_yet "<==>" | Pnot p -> - let e, env = named_predicate_to_exp kf env p in + let e, env = named_predicate_to_exp env p in new_exp ~loc (UnOp(LNot, e, TInt(IInt, []))), env | Pif _ -> Misc.not_yet "_ ? _ : _" | Plet _ -> Misc.not_yet "let _ = _ in _" @@ -421,7 +472,7 @@ let rec named_predicate_to_exp kf env p = statement (if any) for runtime assertion checking *) (* ************************************************************************** *) -let convert_preconditions kf env behaviors = +let convert_preconditions env behaviors = let do_behavior env b = let assumes_pred = List.fold_left @@ -434,25 +485,29 @@ let convert_preconditions kf env behaviors = let p = Logic_const.pimplies (assumes_pred, Logic_const.unamed p.ip_content) in - let e, env = named_predicate_to_exp kf env p in + let e, env = named_predicate_to_exp env p in Env.add_stmt env (Misc.mk_e_acsl_guard ~reverse:true e p)) env b.b_requires in List.fold_left do_behavior env behaviors -let convert_postconditions kf env behaviors = +let convert_postconditions env behaviors = (* generate one guard by postcondition of each behavior *) let do_behavior env b = List.fold_left (fun env (t, p) -> + if b.b_assigns <> WritesAny then + Misc.not_yet "assigns clause in behavior"; + if b.b_extended <> [] then + Misc.not_yet "grammar extensions in behavior"; match t with | Normal -> let p = p.ip_content in if p <> Ptrue && b.b_assumes <> [] then Misc.not_yet "assumes in conjunction with ensures in behaviors"; let p = Logic_const.unamed p in - let e, env = named_predicate_to_exp kf env p in + let e, env = named_predicate_to_exp env p in Env.add_stmt env (Misc.mk_e_acsl_guard ~reverse:true e p) | Exits | Breaks | Continues | Returns -> Misc.not_yet "abnormal termination case in behavior") @@ -461,56 +516,30 @@ let convert_postconditions kf env behaviors = in List.fold_left do_behavior env behaviors -let convert_behaviors kf env behaviors = - List.iter - (fun b -> - if b.b_assigns <> WritesAny then - Misc.not_yet "assigns clause in behavior"; - if b.b_extended <> [] then Misc.not_yet "grammar extensions in behavior") - behaviors; - let pre_env = - convert_preconditions kf (Env.no_overlap ~from:env Env.empty) behaviors - in - let post_env = - convert_postconditions kf - (Env.no_overlap ~from:pre_env Env.empty) behaviors - in - let env = Env.merge_function_vars ~from:pre_env env in - let env = Env.merge_function_vars ~from:post_env env in - Env.close_block_option pre_env, - Env.close_block_option post_env, - env - -let convert_spec kf env spec = +let convert_pre_spec env spec = if spec.spec_variant <> None then Misc.not_yet "variant clause"; if spec.spec_terminates <> None then Misc.not_yet "terminates clause"; if spec.spec_complete_behaviors <> [] then Misc.not_yet "complete behaviors"; if spec.spec_disjoint_behaviors <> [] then Misc.not_yet "disjoint behaviors"; - convert_behaviors kf env spec.spec_behavior + convert_preconditions env spec.spec_behavior -let convert_named_predicate kf env p = - let e, env = named_predicate_to_exp kf env p in +let convert_post_spec env spec = convert_postconditions env spec.spec_behavior + +let convert_named_predicate env p = + let e, env = named_predicate_to_exp env p in assert (Typ.equal (typeOf e) intType); Env.add_stmt env (Misc.mk_e_acsl_guard ~reverse:true e p) -let convert_code_annotation kf env annot = +let convert_pre_code_annotation env annot = try match annot.annot_content with | AAssert(l, p) -> if l <> [] then Misc.not_yet "assertions applied only on some behaviors"; - convert_named_predicate kf env p, None + convert_named_predicate env p | AStmtSpec(l, spec) -> if l <> [] then Misc.not_yet "statement contract applied only on some behaviors"; - let pre_block, post_block, new_env = - convert_spec kf env spec - in - let env = Env.merge_function_vars ~from:new_env env in - let env = match pre_block with - | None -> env - | Some b -> Env.add_stmt env (mkStmt ~valid_sid:true (Block b)) - in - env, post_block + convert_pre_spec env spec ; | AInvariant _ -> Misc.not_yet "invariant" | AVariant _ -> Misc.not_yet "variant" | AAssigns _ -> Misc.not_yet "assigns" @@ -519,7 +548,19 @@ let convert_code_annotation kf env annot = let msg = Format.sprintf "invalid E-ACSL construct %s." s in if Options.Check.get () then Misc.type_error msg else Options.warning ~current:true "%s@\nignoring annotation." msg; - env, None + env + +let convert_post_code_annotation env annot = + try + match annot.annot_content with + | AStmtSpec(_, spec) -> convert_post_spec env spec + | AAssert _ + | AInvariant _ + | AVariant _ + | AAssigns _ + | APragma _ -> env + with Misc.Typing_error _ -> + env (* ************************************************************************** *) (* Visitor *) @@ -527,17 +568,18 @@ let convert_code_annotation kf env annot = (* local reference to the below visitor and to [do_visit] *) let first_global = ref true +let function_env = ref Env.dummy +let funspec = ref (Cil.empty_funspec ()) (* the main visitor performing e-acsl checking and C code generator *) class e_acsl_visitor prj generate = object (self) - inherit Visitor.generic_frama_c_visitor - prj + inherit Visitor.generic_frama_c_visitor + prj ((if generate then copy_visit else inplace_visit) ()) - val mutable gen_vars = [] - val mutable pre_block = None - val mutable post_block = None + method private reset_env () = + function_env := Env.empty (self :> Visitor.frama_c_visitor) method vglob_aux g = if !first_global then begin @@ -555,101 +597,117 @@ class e_acsl_visitor prj generate = object (self) try let old_vi = get_original_varinfo self#behavior vi in let old_kf = Globals.Functions.get old_vi in - let spec = - Visitor.visitFramacFunspec - (self :> Visitor.frama_c_visitor) - (Kernel_function.get_spec old_kf) - in - (* We definitely are inside a function here. *) - let kf = - Cil.get_kernel_function self#behavior (Extlib.the self#current_kf) - in - let pre_b, post_b, env = - Project.on prj (convert_spec kf Env.empty) spec - in - pre_block <- pre_b; - post_block <- post_b; - gen_vars <- Env.generated_function_variables env; + funspec := + Cil.visitCilFunspec + (self :> Cil.cilVisitor) + (Kernel_function.get_spec old_kf); DoChildren with Not_found -> + (* function without code *) DoChildren method vfunc f = - let contract_vars = gen_vars in - gen_vars <- []; let add_gen_vars f = - f.slocals <- contract_vars @ gen_vars @ f.slocals; - gen_vars <- []; + let vars = Env.get_generated_variables !function_env in + self#reset_env (); + f.slocals <- f.slocals @ vars; + let body = f.sbody in + body.blocals <- body.blocals @ vars; f in ChangeDoChildrenPost(f, add_gen_vars) + method private is_return stmt = match self#current_kf with + | None -> assert false + | Some old_kf -> + let old_ret = + try Kernel_function.find_return old_kf + with Kernel_function.No_Statement -> assert false + in + Stmt.equal stmt (get_stmt self#behavior old_ret) + + method private is_first_stmt stmt = + try + Stmt.equal + (get_original_stmt self#behavior stmt) + (Kernel_function.find_first_stmt (Extlib.the self#current_kf)) + with Kernel_function.No_Statement -> + assert false + method vstmt_aux stmt = -(* Options.debug ~level:2 "proceeding stmt %d@." stmt.sid;*) - (* [TODO] BUG HERE since the annotations tbl is the one of the old + Options.debug ~level:2 "proceeding stmt (sid %d) %a@." + stmt.sid Stmt.pretty stmt; + let env = Env.push !function_env in + let env = + if self#is_first_stmt stmt then + (* convert the precondition of the function *) + Project.on prj (convert_pre_spec env) !funspec + else + env + in + (* [TODO] potential BUG HERE since the annotations tbl is the one of the old project. *) - let env, post_stmts = + let env, new_annots = Annotations.single_fold_stmt - (fun (User old_a | AI(_, old_a)) (env, post_stmts) -> + (fun (User old_a | AI(_, old_a)) (env, new_annots) -> let a = (* [VP] Don't use Visitor here, as it will fill the queue in the middle of the computation... *) Cil.visitCilCodeAnnotation (self :> Cil.cilVisitor) old_a in - let kf = - Cil.get_kernel_function self#behavior (Extlib.the self#current_kf) - in - let env, post_block = - Project.on prj (convert_code_annotation kf env) a - in - let post_stmts = match post_block with - | None -> post_stmts - | Some b -> mkStmt ~valid_sid:true (Block b) :: post_stmts - in - env, post_stmts) + let env = Project.on prj (convert_pre_code_annotation env) a in + env, a :: new_annots) (get_original_stmt self#behavior stmt) - (Env.empty, []) + (env, []) in - (* verify internal invariants *) - assert ((Env.is_empty env && post_stmts = []) - || (not (Env.is_empty env) && generate)); + function_env := env; let mk_block stmt = -(* Options.feedback "stmt %a: %a" d_stmt stmt Env.pretty env;*) - gen_vars <- Env.generated_function_variables env @ gen_vars; - let s = Env.block_as_stmt env stmt in - let post_stmts = s :: post_stmts in - let post_stmts = - let is_return s = match self#current_kf with - | None -> false - | Some old_kf -> - let old_ret = - try Kernel_function.find_return old_kf - with Kernel_function.No_Statement -> assert false - in - Stmt.equal s (get_stmt self#behavior old_ret) - in - if is_return stmt then - match post_block with - | None -> post_stmts - | Some b -> - (* that is the return stmt of a function with a postcondition *) - post_block <- None; - mkStmt ~valid_sid:true (Block b) :: post_stmts - else - post_stmts + (* be careful: as this function is called in a post action, [env] has + been modified since pre actions have been executed. + Use [function_env] to store it. *) + let env = !function_env in + let mk_block b = mkStmt ~valid_sid:true (Block b) in + let mk_post_env env = + (* [fold_right] to preserve order of generation of pre_conditions *) + Project.on + prj + (List.fold_right + (fun a env -> convert_post_code_annotation env a) + new_annots) + env in - let stmts = match pre_block with - | None -> post_stmts - | Some b -> - (* that is the first stmt of a function with a precondition *) - pre_block <- None; - mkStmt ~valid_sid:true (Block b) :: post_stmts + let new_stmt, env = + if self#is_return stmt then + (* must generate the post_block before including [stmt] (the 'return') + since no code is executed after it. However, since this statement + is pure (Cil invariant), that is semantically correct. *) + let env = mk_post_env env in + (* also handle the postcondition of the function and clear the env *) + let env = Project.on prj (convert_post_spec env) !funspec in + let b, env = Env.pop_and_get env stmt ~global_clear:true Env.After in + mk_block b, env + else + (* must generate [pre_block] which includes [stmt] before generating + [post_block] *) + let pre_block, env = + Env.pop_and_get env stmt ~global_clear:false Env.After + in + let env = mk_post_env (Env.push env) in + let post_block, env = + Env.pop_and_get + env (mk_block pre_block) ~global_clear:false Env.Before + in + (* TODO: must clear the local block anytime (?) *) + mk_block post_block, env in - mkStmt ~valid_sid:true (Block (mkBlock stmts)) + function_env := env; + Options.debug ~level:3 + "new stmt (from sid %d): %a" stmt.sid d_stmt new_stmt; + new_stmt in ChangeDoChildrenPost(stmt, mk_block) - initializer Env.register_actions_queue self#get_filling_actions + initializer self#reset_env () end -- GitLab