diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7e14dfd7ff3072248ca5b9b640d5a926663f0df3..b86b0826b80d70a8319d3501b2ee27e4aaea8c5c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -57,6 +57,14 @@ wp-qualif: - nix allow_failure: true +aorai-prove: + stage: tests + script: + - nix/frama-ci.sh build -A frama-c.aorai-prove + tags: + - nix + allow_failure: true + genassigns: stage: tests script: diff --git a/nix/default.nix b/nix/default.nix index b3e6929a292d9f526fabea47f1ded55b933450e4..7a4cc5ffedbd16e8cc5fd638ca7131c6d5ffe7ee 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -187,6 +187,36 @@ rec { ''; }; + aorai-prove = mk_deriv { + name = "frama-c-aorai-prove"; + buildInputs = mk_buildInputs { opamPackages = [ + { name = "alt-ergo"; constraint = "=2.0.0"; } + ]; }; + build_dir = main.build_dir; + src = main.build_dir + "/dir.tar"; + sourceRoot = "."; + postUnpack = '' + find . \( -name "Makefile*" -or -name ".depend" -o -name "ptests_config" -o -name "test_config*" -o -name "config.status" \) -exec bash -c "t=\$(stat -c %y \"\$0\"); sed -i -e \"s&$(cat $build_dir/old_pwd)&$(pwd)&g\" \"\$0\"; touch -d \"\$t\" \"\$0\"" {} \; + ''; + configurePhase = '' + true + ''; + + buildPhase = '' + make clean_share_link + make create_share_link + mkdir home + HOME=$(pwd)/home + why3 config --full-config + make src/plugins/aorai/tests/ptests_config + make PTESTS_OPTS="-config prove -error-code" Aorai_TESTS + ''; + + installPhase = '' + true + ''; + }; + e-acsl-tests-dev = mk_deriv { name = "frama-c-e-acsl-tests-dev"; buildInputs = mk_buildInputs { nixPackages = [ pkgs.gmp pkgs.getopt ]; }; diff --git a/src/kernel_services/ast_queries/filecheck.ml b/src/kernel_services/ast_queries/filecheck.ml index 2eb9c7560b2bd1dd8164cb4cffc039614fca390a..18ad6e32241cc8410cdefaaa9c94e4724dcff09b 100644 --- a/src/kernel_services/ast_queries/filecheck.ml +++ b/src/kernel_services/ast_queries/filecheck.ml @@ -509,15 +509,19 @@ module Base_checker = struct | _ -> Cil.ChangeDoChildrenPost (s,post_action)); method private check_local_var v = + let prefix fmt = + Format.fprintf fmt "Local variable %a(%d) in function %a" + Printer.pp_varinfo v v.vid + Printer.pp_varinfo (Extlib.the self#current_func).svar + in + if v.vglob then check_abort "%t is marked as global" prefix; + if v.vformal then check_abort "%t is marked as formal" prefix; if Varinfo.Set.mem v local_vars then begin local_vars <- Varinfo.Set.remove v local_vars; end else begin check_abort - "In function %a, variable %a(%d) is supposed to be local to a block \ - but not mentioned in the function's locals." - Printer.pp_varinfo - (Extlib.the self#current_func).svar - Printer.pp_varinfo v v.vid + "%t is present in a block's blocals but in the function's slocals" + prefix end method private check_local_static v = diff --git a/src/kernel_services/ast_transformations/inline.ml b/src/kernel_services/ast_transformations/inline.ml index 2c815da3e976eb9279ec522af5bb930e4f6ec7e9..6c5bbf9293e348132b99047bd4dd3ab23efc70e8 100644 --- a/src/kernel_services/ast_transformations/inline.ml +++ b/src/kernel_services/ast_transformations/inline.ml @@ -109,6 +109,7 @@ let inline_call loc caller callee return args = self#set_current_kf caller; Cil.DoChildrenPost (fun fd -> + List.iter (fun v -> v.vformal <- false) fd.sformals; caller_fd.slocals <- caller_fd.slocals @ fd.sformals @ fd.slocals; let add_init vi arg = diff --git a/src/plugins/aorai/Makefile.in b/src/plugins/aorai/Makefile.in index 7f987274ff75671e112bfbfde51b100792e74bef..a816d71fcd56a6f5ab7c3250b2f94e79d66c06b3 100644 --- a/src/plugins/aorai/Makefile.in +++ b/src/plugins/aorai/Makefile.in @@ -73,14 +73,14 @@ PLUGIN_DISTRIB_EXTERNAL:= Makefile.in configure.ac configure PLUGIN_HAS_EXT_DOC:=no # [JS 2010/07/28] was 'yes' # but prevent 'make src-distrib to work -# if ltltoba is not present, do not attempt to run any test. -ifneq (@HAS_LTLTOBA@,yes) -PLUGIN_NO_TEST:=yes -PLUGIN_NO_DEFAULT_TEST:=yes +# aorai_ya can always be run +PLUGIN_TESTS_DIRS:=ya + +ifeq (@HAS_LTLTOBA@,yes) +PLUGIN_TESTS_DIRS+=ltl endif -PLUGIN_TESTS_DIRS:=aorai -PLUGIN_TESTS_LIB:=$(PLUGIN_DIR)/tests/aorai/Aorai_test.ml $(PLUGIN_DIR)/tests/aorai/name_projects.ml +PLUGIN_TESTS_LIB:=$(PLUGIN_DIR)/tests/Aorai_test.ml $(PLUGIN_DIR)/tests/ya/name_projects.ml include $(FRAMAC_SHARE)/Makefile.dynamic @@ -101,7 +101,7 @@ $(Aorai_DIR)/tests/test_config_prove: \ $(SED) -e 's!@AORAI_WP_SHARE@!$(AORAI_WP_SHARE)!' $< > $@ $(CHMOD_RO) $@ -Aorai_DEFAULT_TESTS: $(Aorai_DIR)/tests/aorai/Aorai_test.cmxs $(Aorai_DIR)/tests/aorai/Aorai_test.cmo $(Aorai_DIR)/tests/aorai/name_projects.cmxs $(Aorai_DIR)/tests/aorai/name_projects.cmo +Aorai_DEFAULT_TESTS: $(Aorai_DIR)/tests/Aorai_test.cmxs $(Aorai_DIR)/tests/Aorai_test.cmo $(Aorai_DIR)/tests/ya/name_projects.cmxs $(Aorai_DIR)/tests/ya/name_projects.cmo # Regenerating the Makefile on need diff --git a/src/plugins/aorai/aorai_utils.ml b/src/plugins/aorai/aorai_utils.ml index 8ace0513ae632217120f86caaa07cee32e0dd722..453d6c4381e193fd796a073b4493ed9c8d83c45a 100644 --- a/src/plugins/aorai/aorai_utils.ml +++ b/src/plugins/aorai/aorai_utils.ml @@ -453,14 +453,113 @@ and tlval_to_lval (tlhost, toffset) res = should not see \result. *) | None -> Aorai_option.fatal "Unexpected \\result") -(* Translate the cross condition of an automaton edge to an expression. - Used in mk_stmt. *) -let crosscond_to_exp curr_f curr_status loc (cond,_) res = +module Kf_bhv_cache = + Datatype.Pair_with_collections(Cil_datatype.Kf)(Datatype.String) + (struct let module_name = "Aorai_utils.Kf_bhv_cache" end) + +let bhv_aux_functions_table = Kf_bhv_cache.Hashtbl.create 7 + +let get_bhv_aux_fct kf bhv = + match + Kf_bhv_cache.Hashtbl.find_opt bhv_aux_functions_table (kf,bhv.b_name) + with + | Some vi -> vi, false + | None -> + let loc = Cil_datatype.Location.unknown in + let ovi = Kernel_function.get_vi kf in + let vi = Cil_const.copy_with_new_vid ovi in + vi.vname <- Data_for_aorai.get_fresh (ovi.vname ^ "_bhv_" ^ bhv.b_name); + vi.vdefined <- false; + vi.vghost <- true; + let (_,args,varargs,_) = Cil.splitFunctionTypeVI ovi in + let typ = TFun(Cil.intType, args, varargs,[]) in + Cil.update_var_type vi typ; + Cil.setFormalsDecl vi typ; + vi.vattr <- []; + let assoc = + List.combine (Kernel_function.get_formals kf) (Cil.getFormalsDecl vi) + in + let vis = object + inherit Visitor.frama_c_copy (Project.current()) + method! vlogic_var_use lv = + match lv.lv_origin with + | None -> JustCopy + | Some vi -> + (match + List.find_opt (fun (x,_) -> Cil_datatype.Varinfo.equal vi x) assoc + with + | None -> JustCopy + | Some (_,nvi) -> ChangeTo (Cil.cvar_to_lvar nvi)) + end + in + let assumes = Visitor.visitFramacPredicates vis bhv.b_assumes in + let assumes = List.map Logic_const.refresh_predicate assumes in + let assigns = Writes [] in + let post_cond = + [Normal, + Logic_const.( + new_predicate + (prel (Req,tlogic_coerce (tresult Cil.intType) Linteger,lone())))] + in + let bhv_in = + Cil.mk_behavior ~name:bhv.b_name ~assumes ~assigns ~post_cond () + in + let name = bhv.b_name ^ "_out" in + let assumes = + [ Logic_const.( + new_predicate (pnot (pands (List.map pred_of_id_pred assumes))))] + in + let assigns = Writes [] in + let post_cond = + [ Normal, + Logic_const.( + new_predicate + (prel + (Req, tlogic_coerce (tresult Cil.intType) Linteger, lzero())))] + in + let bhv_out = Cil.mk_behavior ~name ~assumes ~assigns ~post_cond () in + Globals.Functions.replace_by_declaration (Cil.empty_funspec()) vi loc; + let my_kf = Globals.Functions.get vi in + Annotations.add_behaviors + ~register_children:true Aorai_option.emitter my_kf [bhv_in; bhv_out]; + Annotations.add_assigns + ~keep_empty:false Aorai_option.emitter my_kf (Writes []); + Annotations.add_complete Aorai_option.emitter my_kf + [bhv_in.b_name; bhv_out.b_name]; + Annotations.add_disjoint Aorai_option.emitter my_kf + [bhv_in.b_name; bhv_out.b_name]; + vi, true + +(** create a new abstract function call to decide whether we are in the + corresponding behavior or not. *) +let mk_behavior_call generated_kf kf bhv = + let aux,generated = get_bhv_aux_fct kf bhv in + let res = + Cil.makeLocalVar + (Kernel_function.get_definition generated_kf) + ~ghost:true ~referenced:true ~insert:false + (get_fresh "bhv_aux") Cil.intType + in + let stmt = + Cil.mkStmtOneInstr + ~ghost:true + ~valid_sid:true + (Cil_types.Call ( + Some (Var res, NoOffset), + Cil.evar aux, + List.map (fun x -> Cil.evar x) (Kernel_function.get_formals kf), + Cil_datatype.Location.unknown)) + in + (res, stmt, + if generated then Cil_datatype.Varinfo.Set.singleton aux + else Cil_datatype.Varinfo.Set.empty) +(* Translate the cross condition of an automaton edge to an expression. + Used in mk_stmt. This might generate calls to auxiliary functions, to + take into account a guard that uses a function behavior. *) +let crosscond_to_exp generated_kf curr_f curr_status loc (cond,_) res = let check_current_event f status = - if Kernel_function.equal curr_f f && curr_status = status then - Cil.one loc - else Cil.zero loc + Kernel_function.equal curr_f f && curr_status = status in let rel_convert = function | Rlt -> Lt @@ -473,28 +572,54 @@ let crosscond_to_exp curr_f curr_status loc (cond,_) res = let rec expnode_convert = function | TOr (c1, c2) -> - let e1 = expnode_convert c1 in + let stmts1, vars1, defs1, e1 = expnode_convert c1 in (match Cil.isInteger e1 with - | None -> Cil.mkBinOp loc LOr e1 (expnode_convert c2) + | None -> + let stmts2, vars2, defs2, e2 = expnode_convert c2 in + stmts1 @ stmts2, vars1 @ vars2, + Cil_datatype.Varinfo.Set.union defs1 defs2, + Cil.mkBinOp loc LOr e1 e2 | Some i when Integer.is_zero i -> expnode_convert c2 - | Some _ -> e1) + | Some _ -> [], [], Cil_datatype.Varinfo.Set.empty,e1) | TAnd (c1, c2) -> - let e1 = expnode_convert c1 in + let stmts1, vars1, defs1, e1 = expnode_convert c1 in (match Cil.isInteger e1 with - | None -> Cil.mkBinOp loc LAnd e1 (expnode_convert c2) - | Some i when Integer.is_zero i -> e1 + | None -> + let stmts2, vars2, defs2, e2 = expnode_convert c2 in + stmts1 @ stmts2, vars1 @vars2, + Cil_datatype.Varinfo.Set.union defs1 defs2, + Cil.mkBinOp loc LAnd e1 e2 + | Some i when Integer.is_zero i -> + [], [], Cil_datatype.Varinfo.Set.empty, e1 | Some _ -> expnode_convert c2) | TNot (c1) -> - let e1 = expnode_convert c1 in + let stmts1, vars1, defs1, e1 = expnode_convert c1 in (match Cil.isInteger e1 with - | None -> Cil.new_exp loc (UnOp(LNot, e1,Cil.intType)) - | Some i when Integer.is_zero i -> Cil.one loc - | Some _ -> Cil.zero loc) - | TCall (f,_) -> check_current_event f Promelaast.Call - | TReturn f -> check_current_event f Promelaast.Return - | TTrue -> (Cil.one loc) - | TFalse -> (Cil.zero loc) + | None -> + stmts1, vars1, defs1, Cil.new_exp loc (UnOp(LNot, e1,Cil.intType)) + | Some i when Integer.is_zero i -> + [], [], Cil_datatype.Varinfo.Set.empty, Cil.one loc + | Some _ -> [], [], Cil_datatype.Varinfo.Set.empty, Cil.zero loc) + | TCall (f,None) -> + if check_current_event f Promelaast.Call then + [], [], Cil_datatype.Varinfo.Set.empty, Cil.one loc + else + [], [], Cil_datatype.Varinfo.Set.empty, Cil.zero loc + | TCall (f, Some bhv) -> + if check_current_event f Promelaast.Call then begin + let res, stmt, new_kf = mk_behavior_call generated_kf f bhv in + [ stmt ], [res], new_kf, Cil.evar res + end else + [], [], Cil_datatype.Varinfo.Set.empty, Cil.zero loc + | TReturn f -> + if check_current_event f Promelaast.Return then + [], [], Cil_datatype.Varinfo.Set.empty, Cil.one loc + else + [], [], Cil_datatype.Varinfo.Set.empty, Cil.zero loc + | TTrue -> [], [], Cil_datatype.Varinfo.Set.empty, Cil.one loc + | TFalse -> [], [], Cil_datatype.Varinfo.Set.empty, Cil.zero loc | TRel(rel,t1,t2) -> + [], [], Cil_datatype.Varinfo.Set.empty, Cil.mkBinOp loc (rel_convert rel) (term_to_exp t1 res) (term_to_exp t2 res) in @@ -1704,10 +1829,7 @@ let auto_func_behaviors loc f st state = Aorai_option.debug "func behavior for %a (%s)" Kernel_function.pretty f call_or_ret; let (states, _) as auto = Data_for_aorai.getAutomata() in - (* requires is not needed for pre_func, as it is enforced by the - requires of the original C function itself (and the call to pre_func - by definition the first instruction of the function). - *) + let requires = auto_func_preconditions loc f st state in let post_cond = let called_pre = Logic_const.new_predicate @@ -1735,9 +1857,6 @@ let auto_func_behaviors loc f st state = (* let old_pred = Aorai_utils.mk_old_state_pred loc in *) [(Normal, called_pre); (Normal, called_pre_2)] in - let requires = - if st = Promelaast.Call then [] else auto_func_preconditions loc f st state - in let mk_behavior (assigns, behaviors) status = let new_assigns, new_behaviors = mk_behavior ~loc auto f st state status @@ -1788,22 +1907,24 @@ let copy_stmt s = If state is reachable, generates a "If then else" statement, else it is just an assignment. Used in auto_func_block. *) -let mk_stmt loc (states, tr) f fst status ((st,_) as state) res = +let mk_stmt generated_kf loc (states, tr) f fst status ((st,_) as state) res = if is_reachable st status then begin let useful_trans = get_accessible_transitions (states,tr) st status in - let exp_from_trans,stmt_from_action = - List.split - (List.map - (function trans -> - (Cil.mkBinOp - loc - LAnd - (is_state_exp trans.start loc) - (crosscond_to_exp f fst loc trans.cross res)), - (act_convert loc trans.cross res) - ) - useful_trans - ) + let aux_stmts, new_vars, new_funcs, exp_from_trans,stmt_from_action = + List.fold_right + (fun trans + (aux_stmts, aux_vars, new_funcs, exp_from_trans, stmt_from_action) -> + let (tr_stmts, tr_vars, tr_funcs, exp) = + crosscond_to_exp generated_kf f fst loc trans.cross res + in + (tr_stmts @ aux_stmts, + tr_vars @ aux_vars, + Cil_datatype.Varinfo.Set.union tr_funcs new_funcs, + Cil.mkBinOp loc LAnd (is_state_exp trans.start loc) exp + ::exp_from_trans, + act_convert loc trans.cross res :: stmt_from_action)) + useful_trans + ([],[],Cil_datatype.Varinfo.Set.empty, [], []) in let mkIfStmt exp1 block1 block2 = Cil.mkStmt ~ghost:true (If (exp1, block1, block2, loc)) @@ -1819,28 +1940,35 @@ let mk_stmt loc (states, tr) f fst status ((st,_) as state) res = if Aorai_option.Deterministic.get () then [] else [is_out_of_state_stmt state loc] in - if Aorai_option.Deterministic.get () then - List.fold_left2 - (fun acc cond stmt_act -> - [mkIfStmt cond - (mkBlock (copy_stmt then_stmt :: stmt_act)) (mkBlock acc)]) - else_stmt - (List.rev exp_from_trans) - (List.rev stmt_from_action) - else - List.fold_left2 - (fun acc cond stmt_act -> - if stmt_act = [] then acc - else - (mkIfStmt cond (mkBlock stmt_act) (mkBlock []))::acc) - [mkIfStmt if_cond (mkBlock [then_stmt]) (mkBlock else_stmt)] - (List.rev exp_from_trans) - (List.rev stmt_from_action) + let trans_stmts = + if Aorai_option.Deterministic.get () then + List.fold_left2 + (fun acc cond stmt_act -> + [mkIfStmt cond + (mkBlock (copy_stmt then_stmt :: stmt_act)) (mkBlock acc)]) + else_stmt + (List.rev exp_from_trans) + (List.rev stmt_from_action) + else + let actions = + List.fold_left2 + (fun acc cond stmt_act -> + if stmt_act = [] then acc + else + (mkIfStmt cond (mkBlock stmt_act) (mkBlock []))::acc) + [] + (List.rev exp_from_trans) + (List.rev stmt_from_action) + in + mkIfStmt if_cond (mkBlock [then_stmt]) (mkBlock else_stmt) :: actions + in + new_funcs, new_vars, aux_stmts @ trans_stmts end else - if Aorai_option.Deterministic.get () then [] - else [is_out_of_state_stmt state loc] + if Aorai_option.Deterministic.get () then + Cil_datatype.Varinfo.Set.empty, [], [] + else Cil_datatype.Varinfo.Set.empty, [], [is_out_of_state_stmt state loc] -let auto_func_block loc f st status res = +let auto_func_block generated_kf loc f st status res = let dkey = func_body_dkey in let call_or_ret = match st with @@ -1857,13 +1985,16 @@ let auto_func_block loc f st status res = if Aorai_option.Deterministic.get () then begin let orig = Data_for_aorai.get_varinfo curState in let copy = Cil.copyVarinfo orig (orig.vname ^ "_tmp") in + copy.vglob <- false; List.map (fun st -> (st, copy)) states, [copy] end else begin let bindings = List.map (fun st -> let state_var = Data_for_aorai.get_state_var st in - (st,Cil.copyVarinfo state_var (state_var.vname ^ "_tmp") )) + let copy = Cil.copyVarinfo state_var (state_var.vname ^ "_tmp") in + copy.vglob <- false; + (st,copy)) states in bindings, snd (List.split bindings) end @@ -1901,11 +2032,17 @@ let auto_func_block loc f st status res = copies in (* For each state, we have to generate the statement that will update its copy. *) - let main_stmt = + let new_funcs, local_var, main_stmt = List.fold_left - (fun acc state -> (mk_stmt loc auto f st status state res)@acc ) - [] + (fun (new_funcs, aux_vars, stmts) state -> + let my_funcs, my_vars, my_stmts = + mk_stmt generated_kf loc auto f st status state res + in + Cil_datatype.Varinfo.Set.union my_funcs new_funcs, + my_vars @ aux_vars, + my_stmts@stmts ) + (Cil_datatype.Varinfo.Set.empty, local_var, []) copies in @@ -1931,7 +2068,7 @@ let auto_func_block loc f st status res = res_block.blocals <- local_var; Aorai_option.debug ~dkey "Generated body is:@\n%a" Printer.pp_block res_block; - res_block,local_var + new_funcs,res_block,local_var let get_preds_wrt_params_reachable_states state f status = let auto = Data_for_aorai.getAutomata () in diff --git a/src/plugins/aorai/aorai_utils.mli b/src/plugins/aorai/aorai_utils.mli index 7ea1ff1b0a7917185b727521275ab0c720c433d7..47d4bb47275c2334d1afee6bc16bf632a8c57a0f 100644 --- a/src/plugins/aorai/aorai_utils.mli +++ b/src/plugins/aorai/aorai_utils.mli @@ -126,16 +126,24 @@ val auto_func_behaviors: Cil_types.location -> kernel_function -> Promelaast.funcStatus -> Data_for_aorai.state -> Cil_types.funbehavior list -(** [auto_func_block loc f status st res] +(** [auto_func_block current_kf loc f status st res] generates the body of pre & post functions. - res must be [None] for a pre-function and [Some v] for a post-func where - [v] is the formal corresponding to the value returned by the original - function. If the original function returns [Void], [res] must be [None]. - It also returns the local variables list declared in the body. *) + - [current_kf] is the auxiliary function currently being defined. + - [res] must be [None] for a pre-function and [Some v] for a post-func where + [v] is the formal corresponding to the value returned by the original + function. If the original function returns [Void], [res] must be [None]. + + @returns [funcs, block, locals], where + - funcs is the set of auxiliary functions that are used to determine + whether a particular behavior of original callee is taken + - block is the sequence of instructions that perform the transition + - locals is the list of local variables. +*) val auto_func_block: + Kernel_function.t -> Cil_types.location -> kernel_function -> Promelaast.funcStatus -> Data_for_aorai.state -> Cil_types.varinfo option -> - Cil_types.block * Cil_types.varinfo list + Cil_datatype.Varinfo.Set.t * Cil_types.block * Cil_types.varinfo list val get_preds_pre_wrt_params : kernel_function -> predicate diff --git a/src/plugins/aorai/aorai_visitors.ml b/src/plugins/aorai/aorai_visitors.ml index 2b7c52b53ecfa135f351fee114293ad84e50b706..a0d12c2dc3e0d065997f9da436a1133bfefce998 100644 --- a/src/plugins/aorai/aorai_visitors.ml +++ b/src/plugins/aorai/aorai_visitors.ml @@ -62,15 +62,21 @@ let get_call_name exp = match exp.enode with (* the various kinds of auxiliary functions. *) type func_auto_mode = - Not_auto_func (* original C function. *) - | Pre_func of kernel_function (* Pre_func f denotes a function updating - the automaton when f is called. *) - | Post_func of kernel_function (* Post_func f denotes a function updating - the automaton when returning from f. *) + | Not_auto_func (* original C function. *) + | Aux_func of kernel_function + (* Checks whether we are in the corresponding behavior of the function. *) + | Pre_func of kernel_function + (* Pre_func f denotes a function updating the automaton when f is called. *) + | Post_func of kernel_function + (* Post_func f denotes a function updating the automaton + when returning from f. *) (* table from auxiliary functions to the corresponding original one. *) let func_orig_table = Cil_datatype.Varinfo.Hashtbl.create 17 +let add_aux_bhv orig_kf vi = + Cil_datatype.Varinfo.Hashtbl.add func_orig_table vi (Aux_func orig_kf) + let kind_of_func vi = try Cil_datatype.Varinfo.Hashtbl.find func_orig_table vi with Not_found -> Not_auto_func @@ -78,19 +84,21 @@ let kind_of_func vi = (* The following functions will be used to generate C code for pre & post functions. *) -let mk_auto_fct_block kf status auto_state res = +let mk_auto_fct_block kf_aux kf status auto_state res = let loc = Kernel_function.get_location kf in - Aorai_utils.auto_func_block loc kf status auto_state res + Aorai_utils.auto_func_block kf_aux loc kf status auto_state res -let mk_pre_fct_block kf = +let mk_pre_fct_block kf_pre kf = mk_auto_fct_block + kf_pre kf Promelaast.Call (Data_for_aorai.get_kf_init_state kf) None -let mk_post_fct_block kf res = +let mk_post_fct_block kf_post kf res = mk_auto_fct_block + kf_post kf Promelaast.Return (Data_for_aorai.get_kf_return_state kf) @@ -153,9 +161,16 @@ class visit_adding_code_for_synchronisation = fun_dec_post (TFun(voidType,Some arg,false,[])); (* We will now fill the function with the result of the automaton's analysis. *) - let pre_block,pre_locals = mk_pre_fct_block kf in - let post_block,post_locals = - mk_post_fct_block kf (Extlib.opt_of_list fun_dec_post.sformals) + Globals.Functions.replace_by_definition + (Cil.empty_funspec()) fun_dec_pre loc; + Globals.Functions.replace_by_definition + (Cil.empty_funspec()) fun_dec_post loc; + let kf_pre = Globals.Functions.get vi_pre in + let kf_post = Globals.Functions.get vi_post in + let aux_func_pre, pre_block,pre_locals = mk_pre_fct_block kf_pre kf in + let aux_func_post, post_block,post_locals = + mk_post_fct_block + kf_post kf (Extlib.opt_of_list fun_dec_post.sformals) in fun_dec_pre.slocals <- pre_locals; fun_dec_pre.sbody <- pre_block; @@ -163,7 +178,16 @@ class visit_adding_code_for_synchronisation = fun_dec_post.slocals <- post_locals; fun_dec_post.sbody <- post_block; fun_dec_post.svar.vdefined <- true; - let globs = [ GFun(fun_dec_pre,loc); GFun(fun_dec_post,loc);] in + let aux_funcs = + Cil_datatype.Varinfo.Set.union aux_func_pre aux_func_post + in + let globs = + Cil_datatype.Varinfo.Set.fold + (fun x acc -> + GFunDecl(Cil.empty_funspec(),x,loc) :: acc) aux_funcs + [ GFun(fun_dec_pre,loc); GFun(fun_dec_post,loc)] + in + Cil_datatype.Varinfo.Set.iter (add_aux_bhv kf) aux_funcs; fundec.sbody.bstmts <- Cil.mkStmtOneInstr ~ghost:true (Call(None,Cil.evar ~loc vi_pre, @@ -171,10 +195,6 @@ class visit_adding_code_for_synchronisation = (Kernel_function.get_formals kf), loc)) :: fundec.sbody.bstmts; - Globals.Functions.replace_by_definition - (Cil.empty_funspec()) fun_dec_pre loc; - Globals.Functions.replace_by_definition - (Cil.empty_funspec()) fun_dec_post loc; (* Finally, we update the CFG for the new fundec *) let keepSwitch = Kernel.KeepSwitch.get() in Cfg.prepareCFG ~keepSwitch fun_dec_pre; @@ -891,7 +911,7 @@ class visit_adding_pre_post_from_buch treatloops = let spec = Annotations.funspec my_kf in let loc = Kernel_function.get_location my_kf in (match kind_of_func vi with - | Pre_func _ | Post_func _ -> () + | Pre_func _ | Post_func _ | Aux_func _ -> () | Not_auto_func -> (* Normal C function *) let bhvs = mk_post my_kf in let my_state = Data_for_aorai.get_kf_init_state my_kf in @@ -954,7 +974,8 @@ class visit_adding_pre_post_from_buch treatloops = in Annotations.add_behaviors Aorai_option.emitter my_kf bhvs; SkipChildren - | Not_auto_func -> DoChildren (* they are not considered here. *)) + | Aux_func _ | Not_auto_func -> + DoChildren (* they are not considered here. *)) | _ -> DoChildren; diff --git a/src/plugins/aorai/tests/aorai/Aorai_test.ml b/src/plugins/aorai/tests/Aorai_test.ml similarity index 77% rename from src/plugins/aorai/tests/aorai/Aorai_test.ml rename to src/plugins/aorai/tests/Aorai_test.ml index 837291ac960239e3d33ebac29c730ace35a73cbb..b559eeb411ce69b62129d8bf7ba5beb05415ec3d 100644 --- a/src/plugins/aorai/tests/aorai/Aorai_test.ml +++ b/src/plugins/aorai/tests/Aorai_test.ml @@ -20,11 +20,13 @@ module TestNumber = end) module InternalWpShare = - P.Empty_string( + P.Filepath( struct let option_name = "-aorai-test-wp-share" let help = "use custom wp share dir (when in internal plugin mode)" let arg_name = "dir" + let existence = Filepath.Must_exist + let file_kind = "wp share directory" end) module ProveAuxSpec = @@ -50,17 +52,23 @@ let extend () = let run = !Db.Toplevel.run in fun f -> let my_project = Project.create "Reparsing" in - let wp_compute_kf = - Dynamic.get ~plugin:"Wp" "wp_compute_kf" - Datatype.( - func3 (option Kernel_function.ty) (list string) (list string) unit) + let wp_compute_kf kf = + let vcs = Wp.VC.generate_kf kf in + Wp.VC.command vcs; + Bag.iter + (fun vc -> + if not (Wp.VC.is_proved vc) then + P.warning "Could not prove %a in automaton function %a" + Property.pretty (Wp.VC.get_property vc) + Kernel_function.pretty kf) + vcs in let check_auto_func kf = let name = Kernel_function.get_name kf in if Kernel_function.is_definition kf && (is_suffix "_pre_func" name || is_suffix "_post_func" name) then - wp_compute_kf (Some kf) [] [] + wp_compute_kf kf in run f; let tmpfile = @@ -85,21 +93,20 @@ let extend () = in Project.copy ~selection my_project; Project.set_current my_project; + Kernel.SymbolicPath.add ("TMPDIR:"^Filename.get_temp_dir_name()); Files.append_after [ Filepath.Normalized.of_string tmpfile ]; Constfold.off (); Ast.compute(); if ProveAuxSpec.get () then begin - let wp_share = InternalWpShare.get() in - if wp_share <> "" then - Dynamic.Parameter.String.set "-wp-share" wp_share; - Dynamic.Parameter.Int.set "-wp-verbose" 0; + if InternalWpShare.is_set() then + Wp.Wp_parameters.Share.set (InternalWpShare.get()); + Wp.Wp_parameters.Verbose.set 0; Globals.Functions.iter check_auto_func; + end else begin + File.pretty_ast (); end; - File.pretty_ast (); ok:=true (* no error, we can erase the file *) in Db.Toplevel.run := myrun let () = extend () - - diff --git a/src/plugins/aorai/tests/aorai/assigns.c b/src/plugins/aorai/tests/aorai/assigns.c deleted file mode 100644 index 843e5dd51192b344faa975e2e7cf0ffc85e39ae2..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/assigns.c +++ /dev/null @@ -1,22 +0,0 @@ -/* run.config* - OPT: -aorai-automata tests/aorai/assigns.ya -aorai-test 1 -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ - OPT: -aorai-automata tests/aorai/assigns_det.ya -aorai-test 1 -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ - MODULE: @PTEST_DIR@/name_projects.cmxs - OPT: -aorai-automata tests/aorai/assigns.ya -aorai-test 1 -then -print -*/ - -int X; - -void f(void) { X++; } - -/*@ assigns X; - behavior foo: - assigns X; -*/ -int main () { - //@ assigns X; - X++; - //@ assigns X; - f(); - return X; -} diff --git a/src/plugins/aorai/tests/aorai/bts1289.i b/src/plugins/aorai/tests/aorai/bts1289.i deleted file mode 100644 index beafc74f4712c83fe810481b67563f9f8e87f196..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/bts1289.i +++ /dev/null @@ -1,14 +0,0 @@ -/* run.config* - OPT: -aorai-automata tests/aorai/bts1289.ya -load-module tests/aorai/Aorai_test.cmxs -aorai-test 1 -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ - OPT: -aorai-automata tests/aorai/bts1289-2.ya -load-module tests/aorai/Aorai_test.cmxs -aorai-test 1 -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ - */ - -void a(void) {} - -void main(void) -{ - //@ loop assigns i; - for (int i=0; i<10; ++i) - a(); -} - diff --git a/src/plugins/aorai/tests/aorai/formals.i b/src/plugins/aorai/tests/aorai/formals.i deleted file mode 100644 index 86dbcd263267e5fc490a325b0da4252e49e982cf..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/formals.i +++ /dev/null @@ -1,9 +0,0 @@ -/* run.config* -OPT: -aorai-automata tests/aorai/formals.ya -aorai-test 1 -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ -*/ - -int f(int x) { return x; } - -int g(int y) { return y; } - -int main() { f(1); g(2); } diff --git a/src/plugins/aorai/tests/aorai/generate_assigns_bts1290.i b/src/plugins/aorai/tests/aorai/generate_assigns_bts1290.i deleted file mode 100644 index abc221ef7488071f3a8d4ea04c7704639257648a..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/generate_assigns_bts1290.i +++ /dev/null @@ -1,9 +0,0 @@ -/* run.config* - OPT: -aorai-automata tests/aorai/generate_assigns_bts1290.ya -load-module tests/aorai/Aorai_test.cmxs -aorai-test 1 -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ - */ -void main(void) -{ - //@ loop assigns i; - for (int i=0; i<10; ++i) - ; -} diff --git a/src/plugins/aorai/tests/aorai/hoare_seq.i b/src/plugins/aorai/tests/aorai/hoare_seq.i deleted file mode 100644 index 895b16404003c6f1aeb676d86e1082dd2112ad11..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/hoare_seq.i +++ /dev/null @@ -1,14 +0,0 @@ -/* run.config* -OPT: -aorai-automata tests/aorai/hoare_seq.ya -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ -*/ - -void f(void) { } - -/*@ behavior bhv: - assumes c > 0; - ensures \result == 0; -*/ -int main(int c) { - if (c <= 0) { f (); } - return 0; -} diff --git a/src/plugins/aorai/tests/aorai/not_prm.i b/src/plugins/aorai/tests/aorai/not_prm.i deleted file mode 100644 index d7a42c3935bbd672a32151a4a39cb7c8033c2180..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/not_prm.i +++ /dev/null @@ -1,7 +0,0 @@ -/* run.config* - OPT: -aorai-automata tests/aorai/not_prm.ya -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test -main f -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ -*/ - -int f(int x) { - return x; -} diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/assigns.0.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/assigns.0.res.oracle deleted file mode 100644 index 0df1f87a75a68d878c491ed2b6f6d445365d6caf..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/assigns.0.res.oracle +++ /dev/null @@ -1,354 +0,0 @@ -[kernel] Parsing tests/aorai/assigns.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_assigns0.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_f_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_f_post_func_post_2 : Valid -[wp] [Qed] Goal typed_f_post_func_post : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_in_main_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_in_main_in_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_S_in_f_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_f_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_S_in_f_in_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_in_main_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_S_in_f_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S2_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_in_main_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S_in_f_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S_in_f_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_in_main_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_Sf_in_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_f = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -int X; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int S1 = 1; */ -/*@ ghost int S2 = 0; */ -/*@ ghost int S_in_f = 0; */ -/*@ ghost int Sf = 0; */ -/*@ ghost int in_main = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S_in_f, Sf, - in_main; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_S_in_f_in: - assumes 1 ≡ Sf; - ensures 1 ≡ S_in_f; - - behavior buch_state_S_in_f_out: - assumes 0 ≡ Sf; - ensures 0 ≡ S_in_f; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_in_main_out: - ensures 0 ≡ in_main; - */ -void f_pre_func(void) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S_in_f_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int in_main_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_f; - S1_tmp = S1; - S2_tmp = S2; - S_in_f_tmp = S_in_f; - Sf_tmp = Sf; - in_main_tmp = in_main; - in_main_tmp = 0; - Sf_tmp = 0; - if (Sf == 1) S_in_f_tmp = 1; else S_in_f_tmp = 0; - S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S_in_f = S_in_f_tmp; - Sf = Sf_tmp; - in_main = in_main_tmp; - return; -} - -/*@ requires - 1 ≡ S_in_f ∧ 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ Sf ∧ 0 ≡ in_main; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S_in_f, Sf, - in_main; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_S_in_f_out: - ensures 0 ≡ S_in_f; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_in_main_in: - assumes 1 ≡ S_in_f; - ensures 1 ≡ in_main; - - behavior buch_state_in_main_out: - assumes 0 ≡ S_in_f; - ensures 0 ≡ in_main; - */ -void f_post_func(void) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S_in_f_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int in_main_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_f; - S1_tmp = S1; - S2_tmp = S2; - S_in_f_tmp = S_in_f; - Sf_tmp = Sf; - in_main_tmp = in_main; - if (S_in_f == 1) in_main_tmp = 1; else in_main_tmp = 0; - Sf_tmp = 0; - S_in_f_tmp = 0; - S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S_in_f = S_in_f_tmp; - Sf = Sf_tmp; - in_main = in_main_tmp; - return; -} - -/*@ requires - 1 ≡ Sf ∧ 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S_in_f ∧ 0 ≡ in_main; - - behavior Buchi_property_behavior: - ensures 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S_in_f ∧ 0 ≡ Sf; - ensures 1 ≡ in_main; - */ -void f(void) -{ - f_pre_func(); - X ++; - f_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S_in_f, Sf, - in_main; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_S_in_f_out: - ensures 0 ≡ S_in_f; - - behavior buch_state_Sf_in: - assumes 1 ≡ S1; - ensures 1 ≡ Sf; - - behavior buch_state_Sf_out: - assumes 0 ≡ S1; - ensures 0 ≡ Sf; - - behavior buch_state_in_main_out: - ensures 0 ≡ in_main; - */ -void main_pre_func(void) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S_in_f_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int in_main_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - S1_tmp = S1; - S2_tmp = S2; - S_in_f_tmp = S_in_f; - Sf_tmp = Sf; - in_main_tmp = in_main; - in_main_tmp = 0; - if (S1 == 1) Sf_tmp = 1; else Sf_tmp = 0; - S_in_f_tmp = 0; - S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S_in_f = S_in_f_tmp; - Sf = Sf_tmp; - in_main = in_main_tmp; - return; -} - -/*@ requires - 1 ≡ in_main ∧ 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S_in_f ∧ 0 ≡ Sf; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S_in_f, Sf, - in_main; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_in: - assumes 1 ≡ in_main; - ensures 1 ≡ S2; - - behavior buch_state_S2_out: - assumes 0 ≡ in_main; - ensures 0 ≡ S2; - - behavior buch_state_S_in_f_out: - ensures 0 ≡ S_in_f; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_in_main_out: - ensures 0 ≡ in_main; - */ -void main_post_func(int res) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S_in_f_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int in_main_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - S1_tmp = S1; - S2_tmp = S2; - S_in_f_tmp = S_in_f; - Sf_tmp = Sf; - in_main_tmp = in_main; - in_main_tmp = 0; - Sf_tmp = 0; - S_in_f_tmp = 0; - if (in_main == 1) S2_tmp = 1; else S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S_in_f = S_in_f_tmp; - Sf = Sf_tmp; - in_main = in_main_tmp; - return; -} - -/*@ requires - 1 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S_in_f ∧ 0 ≡ Sf ∧ 0 ≡ in_main; - assigns X, aorai_CurOpStatus, aorai_CurOperation, S1, S2, S_in_f, Sf, - in_main; - - behavior foo: - assigns X, aorai_CurOpStatus, aorai_CurOperation, S1, S2, S_in_f, Sf, - in_main; - - behavior Buchi_property_behavior: - ensures 0 ≡ S1 ∧ 0 ≡ S_in_f ∧ 0 ≡ Sf ∧ 0 ≡ in_main; - ensures 1 ≡ S2; - */ -int main(void) -{ - main_pre_func(); - /*@ assigns X; */ - X ++; - /*@ assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S_in_f, Sf, - in_main, X; - */ - f(); - main_post_func(X); - return X; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/assigns.1.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/assigns.1.res.oracle deleted file mode 100644 index 41e6f16bbda7da4b391df70936a88a0c36a6d7aa..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/assigns.1.res.oracle +++ /dev/null @@ -1,242 +0,0 @@ -[kernel] Parsing tests/aorai/assigns.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_assigns1.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_f_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_f_post_func_post_2 : Valid -[wp] [Qed] Goal typed_f_post_func_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_in_main_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_f_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S_in_f_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -/* Generated by Frama-C */ -enum aorai_States { - aorai_reject_state = -2, - S1 = 0, - S2 = 1, - S_in_f = 2, - Sf = 3, - in_main = 4 -}; -enum aorai_ListOper { - op_f = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ lemma in_main_deterministic_trans{L}: \true; - */ -/*@ lemma Sf_deterministic_trans{L}: \true; - */ -/*@ lemma S_in_f_deterministic_trans{L}: \true; - */ -/*@ lemma S2_deterministic_trans{L}: \true; - */ -/*@ lemma S1_deterministic_trans{L}: \true; - */ -int X; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int aorai_CurStates = S1; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_S1_out: - ensures aorai_CurStates ≢ S1; - - behavior buch_state_S2_out: - ensures aorai_CurStates ≢ S2; - - behavior buch_state_S_in_f_in: - assumes aorai_CurStates ≡ Sf; - ensures aorai_CurStates ≡ S_in_f; - - behavior buch_state_S_in_f_out: - assumes aorai_CurStates ≢ Sf; - ensures aorai_CurStates ≢ S_in_f; - - behavior buch_state_Sf_out: - ensures aorai_CurStates ≢ Sf; - - behavior buch_state_in_main_out: - ensures aorai_CurStates ≢ in_main; - */ -void f_pre_func(void) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_f; - aorai_CurStates_tmp = aorai_CurStates; - if (3 == aorai_CurStates) aorai_CurStates_tmp = S_in_f; - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires aorai_CurStates ≡ S_in_f; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_S1_out: - ensures aorai_CurStates ≢ S1; - - behavior buch_state_S2_out: - ensures aorai_CurStates ≢ S2; - - behavior buch_state_S_in_f_out: - ensures aorai_CurStates ≢ S_in_f; - - behavior buch_state_Sf_out: - ensures aorai_CurStates ≢ Sf; - - behavior buch_state_in_main_in: - assumes aorai_CurStates ≡ S_in_f; - ensures aorai_CurStates ≡ in_main; - - behavior buch_state_in_main_out: - assumes aorai_CurStates ≢ S_in_f; - ensures aorai_CurStates ≢ in_main; - */ -void f_post_func(void) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_f; - aorai_CurStates_tmp = aorai_CurStates; - if (2 == aorai_CurStates) aorai_CurStates_tmp = in_main; - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires aorai_CurStates ≡ Sf; - - behavior Buchi_property_behavior: - ensures aorai_CurStates ≡ in_main; - */ -void f(void) -{ - f_pre_func(); - X ++; - f_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_S1_out: - ensures aorai_CurStates ≢ S1; - - behavior buch_state_S2_out: - ensures aorai_CurStates ≢ S2; - - behavior buch_state_S_in_f_out: - ensures aorai_CurStates ≢ S_in_f; - - behavior buch_state_Sf_in: - assumes aorai_CurStates ≡ S1; - ensures aorai_CurStates ≡ Sf; - - behavior buch_state_Sf_out: - assumes aorai_CurStates ≢ S1; - ensures aorai_CurStates ≢ Sf; - - behavior buch_state_in_main_out: - ensures aorai_CurStates ≢ in_main; - */ -void main_pre_func(void) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - aorai_CurStates_tmp = aorai_CurStates; - if (0 == aorai_CurStates) aorai_CurStates_tmp = Sf; - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires aorai_CurStates ≡ in_main; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_S1_out: - ensures aorai_CurStates ≢ S1; - - behavior buch_state_S2_in: - assumes aorai_CurStates ≡ in_main; - ensures aorai_CurStates ≡ S2; - - behavior buch_state_S2_out: - assumes aorai_CurStates ≢ in_main; - ensures aorai_CurStates ≢ S2; - - behavior buch_state_S_in_f_out: - ensures aorai_CurStates ≢ S_in_f; - - behavior buch_state_Sf_out: - ensures aorai_CurStates ≢ Sf; - - behavior buch_state_in_main_out: - ensures aorai_CurStates ≢ in_main; - */ -void main_post_func(int res) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - aorai_CurStates_tmp = aorai_CurStates; - if (4 == aorai_CurStates) aorai_CurStates_tmp = S2; - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires aorai_CurStates ≡ S1; - assigns X, aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior foo: - assigns X, aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior Buchi_property_behavior: - ensures aorai_CurStates ≡ S2; - */ -int main(void) -{ - main_pre_func(); - /*@ assigns X; */ - X ++; - /*@ assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates, X; */ - f(); - main_post_func(X); - return X; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/bts1289.0.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/bts1289.0.res.oracle deleted file mode 100644 index 726f606bd8df59676839c74e39ef89ab6853eec4..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/bts1289.0.res.oracle +++ /dev/null @@ -1,108 +0,0 @@ -[kernel] Parsing tests/aorai/bts1289.i (no preprocessing) -[aorai] Welcome to the Aorai plugin -[aorai] warning: Call to main does not follow automaton's specification. This path is assumed to be dead -[kernel] Parsing /tmp/aorai_bts12890.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_a_post_func_assign : Valid -[wp] [Qed] Goal typed_a_post_func_post_2 : Valid -[wp] [Qed] Goal typed_a_post_func_post : Valid -[wp] [Qed] Goal typed_a_pre_func_assign : Valid -[wp] [Qed] Goal typed_a_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_a_pre_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_a = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_a; - assigns aorai_CurOpStatus, aorai_CurOperation; - */ -void a_pre_func(void) -{ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_a; - return; -} - -/*@ requires \false; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_a; - assigns aorai_CurOpStatus, aorai_CurOperation; - */ -void a_post_func(void) -{ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_a; - return; -} - -/*@ requires \false; */ -void a(void) -{ - a_pre_func(); - a_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation; - */ -void main_pre_func(void) -{ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - return; -} - -/*@ requires \false; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation; - */ -void main_post_func(void) -{ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - return; -} - -/*@ requires \false; */ -void main(void) -{ - int aorai_Loop_Init_16; - int i; - main_pre_func(); - i = 0; - /*@ ghost aorai_Loop_Init_16 = 1; */ - aorai_loop_16: - /*@ loop assigns i, aorai_Loop_Init_16, aorai_CurOpStatus, - aorai_CurOperation; - loop assigns aorai_Loop_Init_16 \from \nothing; - */ - while (1) { - if (! (i < 10)) goto while_0_break; - /*@ ghost aorai_Loop_Init_16 = 0; */ - a(); - i ++; - } - while_0_break: ; - main_post_func(); - return; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/bts1289.1.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/bts1289.1.res.oracle deleted file mode 100644 index fa9585a7fef59bf3913169f46ec40af9d92912ec..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/bts1289.1.res.oracle +++ /dev/null @@ -1,410 +0,0 @@ -[kernel] Parsing tests/aorai/bts1289.i (no preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_bts12891.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_a_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_a_post_func_post_2 : Valid -[wp] [Qed] Goal typed_a_post_func_post : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_a_post_func_buch_state_S_in_post : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_a_post_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_a_post_func_buch_state_T_out_post : Valid -[wp] [Qed] Goal typed_a_post_func_buch_state_T_in_post : Valid -[wp] [Qed] Goal typed_a_post_func_buch_state_S_out_post : Valid -[wp] [Qed] Goal typed_a_post_func_buch_state_init_out_post : Valid -[wp] [Qed] Goal typed_a_post_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_a_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_a_pre_func_post : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_a_pre_func_buch_state_T_out_post : Valid -[wp] [Qed] Goal typed_a_pre_func_buch_state_S_out_post : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_a_pre_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_a_pre_func_buch_state_aorai_intermediate_state_0_in_post : Valid -[wp] [Qed] Goal typed_a_pre_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_a_pre_func_buch_state_aorai_intermediate_state_in_post : Valid -[wp] [Qed] Goal typed_a_pre_func_buch_state_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_0_out____ : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_init_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_a = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int S = 0; */ -/*@ ghost int T = 0; */ -/*@ ghost int aorai_intermediate_state = 0; */ -/*@ ghost int aorai_intermediate_state_0 = 0; */ -/*@ ghost int init = 1; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_a; - assigns aorai_CurOpStatus, aorai_CurOperation, S, T, - aorai_intermediate_state, aorai_intermediate_state_0, init; - - behavior buch_state_S_out: - ensures 0 ≡ S; - - behavior buch_state_T_out: - ensures 0 ≡ T; - - behavior buch_state_aorai_intermediate_state_in: - assumes 1 ≡ S; - ensures 1 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_out: - assumes 0 ≡ S; - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_in: - assumes 1 ≡ T; - ensures 1 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_0_out: - assumes 0 ≡ T; - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_init_out: - ensures 0 ≡ init; - */ -void a_pre_func(void) -{ - /*@ ghost int S_tmp; */ - /*@ ghost int T_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int init_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_a; - S_tmp = S; - T_tmp = T; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - init_tmp = init; - init_tmp = 0; - if (T == 1) aorai_intermediate_state_0_tmp = 1; - else aorai_intermediate_state_0_tmp = 0; - if (S == 1) aorai_intermediate_state_tmp = 1; - else aorai_intermediate_state_tmp = 0; - T_tmp = 0; - S_tmp = 0; - S = S_tmp; - T = T_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - init = init_tmp; - return; -} - -/*@ requires - (1 ≡ aorai_intermediate_state ∨ 1 ≡ aorai_intermediate_state_0) ∧ - 0 ≡ S ∧ 0 ≡ T ∧ 0 ≡ init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_a; - assigns aorai_CurOpStatus, aorai_CurOperation, S, T, - aorai_intermediate_state, aorai_intermediate_state_0, init; - - behavior buch_state_S_in: - assumes 1 ≡ aorai_intermediate_state_0; - ensures 1 ≡ S; - - behavior buch_state_S_out: - assumes 0 ≡ aorai_intermediate_state_0; - ensures 0 ≡ S; - - behavior buch_state_T_in: - assumes 1 ≡ aorai_intermediate_state; - ensures 1 ≡ T; - - behavior buch_state_T_out: - assumes 0 ≡ aorai_intermediate_state; - ensures 0 ≡ T; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_init_out: - ensures 0 ≡ init; - */ -void a_post_func(void) -{ - /*@ ghost int S_tmp; */ - /*@ ghost int T_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int init_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_a; - S_tmp = S; - T_tmp = T; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - init_tmp = init; - init_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - if (aorai_intermediate_state == 1) T_tmp = 1; else T_tmp = 0; - if (aorai_intermediate_state_0 == 1) S_tmp = 1; else S_tmp = 0; - S = S_tmp; - T = T_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - init = init_tmp; - return; -} - -/*@ requires - (1 ≡ S ∨ 1 ≡ T) ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_0 ∧ 0 ≡ init; - requires 1 ≡ T ∨ 0 ≡ T; - requires 1 ≡ S ∨ 0 ≡ S; - - behavior Buchi_behavior_in_0: - assumes 1 ≡ S; - ensures 1 ≡ T; - - behavior Buchi_behavior_in_1: - assumes 1 ≡ T; - ensures 1 ≡ S; - - behavior Buchi_behavior_out_0: - assumes 0 ≡ T; - ensures 0 ≡ S; - - behavior Buchi_behavior_out_1: - assumes 0 ≡ S; - ensures 0 ≡ T; - - behavior Buchi_behavior_out_2: - ensures 0 ≡ aorai_intermediate_state; - - behavior Buchi_behavior_out_3: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior Buchi_behavior_out_4: - ensures 0 ≡ init; - */ -void a(void) -{ - a_pre_func(); - a_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S, T, - aorai_intermediate_state, aorai_intermediate_state_0, init; - - behavior buch_state_S_in: - assumes 1 ≡ init; - ensures 1 ≡ S; - - behavior buch_state_S_out: - assumes 0 ≡ init; - ensures 0 ≡ S; - - behavior buch_state_T_out: - ensures 0 ≡ T; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_init_out: - ensures 0 ≡ init; - */ -void main_pre_func(void) -{ - /*@ ghost int S_tmp; */ - /*@ ghost int T_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int init_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - S_tmp = S; - T_tmp = T; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - init_tmp = init; - init_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - T_tmp = 0; - if (init == 1) S_tmp = 1; else S_tmp = 0; - S = S_tmp; - T = T_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - init = init_tmp; - return; -} - -/*@ requires - 1 ≡ S ∧ 0 ≡ T ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_0 ∧ 0 ≡ init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S, T, - aorai_intermediate_state, aorai_intermediate_state_0, init; - - behavior buch_state_S_in: - assumes 1 ≡ S; - ensures 1 ≡ S; - - behavior buch_state_S_out: - assumes 0 ≡ S; - ensures 0 ≡ S; - - behavior buch_state_T_out: - ensures 0 ≡ T; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_init_out: - ensures 0 ≡ init; - */ -void main_post_func(void) -{ - /*@ ghost int S_tmp; */ - /*@ ghost int T_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int init_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - S_tmp = S; - T_tmp = T; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - init_tmp = init; - init_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - T_tmp = 0; - if (S == 1) S_tmp = 1; else S_tmp = 0; - S = S_tmp; - T = T_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - init = init_tmp; - return; -} - -/*@ requires - 1 ≡ init ∧ 0 ≡ S ∧ 0 ≡ T ∧ - 0 ≡ aorai_intermediate_state ∧ 0 ≡ aorai_intermediate_state_0; - - behavior Buchi_property_behavior: - ensures - 0 ≡ T ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_0 ∧ 0 ≡ init; - ensures 1 ≡ S; - */ -void main(void) -{ - int aorai_Loop_Init_16; - int i; - main_pre_func(); - i = 0; - /*@ ghost aorai_Loop_Init_16 = 1; */ - aorai_loop_16: - /*@ loop invariant Aorai: 1 ≡ S ∨ 0 ≡ S; - loop invariant Aorai: 1 ≡ T ∨ 0 ≡ T; - loop invariant Aorai: 0 ≡ aorai_intermediate_state; - loop invariant Aorai: 0 ≡ aorai_intermediate_state_0; - loop invariant Aorai: 0 ≡ init; - loop invariant Aorai: 1 ≡ S ∨ 1 ≡ T; - loop invariant - Aorai: aorai_Loop_Init_16 ≢ 0 ⇒ \at(1 ≡ init,Pre) ⇒ 0 ≡ T; - loop assigns i, aorai_Loop_Init_16, aorai_CurOpStatus, - aorai_CurOperation, S, T, aorai_intermediate_state, - aorai_intermediate_state_0, init; - loop assigns aorai_Loop_Init_16 \from \nothing; - */ - while (1) { - if (! (i < 10)) goto while_0_break; - /*@ ghost aorai_Loop_Init_16 = 0; */ - a(); - i ++; - } - while_0_break: ; - main_post_func(); - return; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/deterministic.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/deterministic.res.oracle deleted file mode 100644 index 336773a611b568b032e0f02be9029489b9ab720a..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/deterministic.res.oracle +++ /dev/null @@ -1,595 +0,0 @@ -[kernel] Parsing tests/aorai/deterministic.i (no preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_deterministic0.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_f_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_f_post_func_post_2 : Valid -[wp] [Qed] Goal typed_f_post_func_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_S5_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_S4_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_Si_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_f_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_g_post_func_post_2 : Valid -[wp] [Qed] Goal typed_g_post_func_post : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part3 : Valid -[wp] [Alt-Ergo] Goal typed_g_post_func_buch_state_S0_out_post : Valid -[wp] [Alt-Ergo] Goal typed_g_post_func_buch_state_S2_out_post : Valid -[wp] [Alt-Ergo] Goal typed_g_post_func_buch_state_S1_out_post : Valid -[wp] [Alt-Ergo] Goal typed_g_post_func_buch_state_S3_out_post : Valid -[wp] [Alt-Ergo] Goal typed_g_post_func_buch_state_Sf_out_post : Valid -[wp] [Alt-Ergo] Goal typed_g_post_func_buch_state_Si_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_g_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_g_pre_func_post : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S5_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S4_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Si_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Sf_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_real_main_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_real_main_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_real_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_real_main_post_func_post : Valid -[wp] [Qed] Goal typed_real_main_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_real_main_post_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_real_main_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_real_main_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_real_main_post_func_buch_state_S5_out_post : Valid -[wp] [Qed] Goal typed_real_main_post_func_buch_state_S4_out_post : Valid -[wp] [Qed] Goal typed_real_main_post_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_real_main_post_func_buch_state_Si_out_post : Valid -[wp] [Qed] Goal typed_real_main_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_real_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_real_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_real_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_real_main_pre_func_post : Valid -[wp] [Qed] Goal typed_real_main_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_real_main_pre_func_assign_part3 : Valid -/* Generated by Frama-C */ -enum aorai_States { - aorai_reject_state = -2, - S0 = 0, - S1 = 1, - S2 = 2, - S3 = 3, - S4 = 4, - S5 = 5, - Sf = 6, - Si = 7 -}; -enum aorai_ListOper { - op_f = 3, - op_g = 2, - op_main = 1, - op_real_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ lemma Si_deterministic_trans{L}: \true; - */ -/*@ lemma Sf_deterministic_trans{L}: \true; - */ -/*@ lemma S5_deterministic_trans{L}: \true; - */ -/*@ lemma S4_deterministic_trans{L}: \true; - */ -/*@ lemma S2_deterministic_trans{L}: \true; - */ -int X; -int Y; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ -lemma S3_deterministic_trans{L}: - ∀ int x; - ¬(\at(aorai_CurOperation,L) ≡ op_g ∧ - \at(aorai_CurOpStatus,L) ≡ aorai_Called ∧ x ≡ 5 ∧ - \at(aorai_CurOperation,L) ≡ op_g ∧ - \at(aorai_CurOpStatus,L) ≡ aorai_Called ∧ x ≡ 4); - */ -/*@ -lemma S1_deterministic_trans{L}: - ∀ int __retres_f, int x; - ¬(\at(X,L) ≡ 5 ∧ \at(aorai_CurOperation,L) ≡ op_f ∧ - \at(aorai_CurOpStatus,L) ≡ aorai_Terminated ∧ __retres_f ≡ 0 ∧ - \at(aorai_CurOperation,L) ≡ op_f ∧ - \at(aorai_CurOpStatus,L) ≡ aorai_Called ∧ x ≡ 4); - */ -/*@ -lemma S0_deterministic_trans{L}: - ∀ int c; - ¬(\at(aorai_CurOperation,L) ≡ op_real_main ∧ - \at(aorai_CurOpStatus,L) ≡ aorai_Called ∧ c ≢ 0 ∧ - \at(aorai_CurOperation,L) ≡ op_real_main ∧ - \at(aorai_CurOpStatus,L) ≡ aorai_Called ∧ c ≡ 0); - */ -/*@ ghost int aorai_CurStates = Si; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_g; - assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_S0_out: - ensures aorai_CurStates ≢ S0; - - behavior buch_state_S1_out: - ensures aorai_CurStates ≢ S1; - - behavior buch_state_S2_out: - ensures aorai_CurStates ≢ S2; - - behavior buch_state_S3_out: - ensures aorai_CurStates ≢ S3; - - behavior buch_state_S4_in: - assumes aorai_CurStates ≡ S3 ∧ x ≡ 4; - ensures aorai_CurStates ≡ S4; - - behavior buch_state_S4_out: - assumes aorai_CurStates ≢ S3 ∨ ¬(x ≡ 4); - ensures aorai_CurStates ≢ S4; - - behavior buch_state_S5_in: - assumes aorai_CurStates ≡ S3 ∧ x ≡ 5; - ensures aorai_CurStates ≡ S5; - - behavior buch_state_S5_out: - assumes aorai_CurStates ≢ S3 ∨ ¬(x ≡ 5); - ensures aorai_CurStates ≢ S5; - - behavior buch_state_Sf_out: - ensures aorai_CurStates ≢ Sf; - - behavior buch_state_Si_out: - ensures aorai_CurStates ≢ Si; - */ -void g_pre_func(int x) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_g; - aorai_CurStates_tmp = aorai_CurStates; - if (3 == aorai_CurStates) - if (x == 5) aorai_CurStates_tmp = S5; - if (3 == aorai_CurStates) - if (x == 4) aorai_CurStates_tmp = S4; - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires aorai_CurStates ≡ S4 ∨ aorai_CurStates ≡ S5; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_g; - assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_S0_out: - ensures aorai_CurStates ≢ S0; - - behavior buch_state_S1_in: - assumes aorai_CurStates ≡ S5; - ensures aorai_CurStates ≡ S1; - - behavior buch_state_S1_out: - assumes aorai_CurStates ≢ S5; - ensures aorai_CurStates ≢ S1; - - behavior buch_state_S2_out: - ensures aorai_CurStates ≢ S2; - - behavior buch_state_S3_in: - assumes aorai_CurStates ≡ S4; - ensures aorai_CurStates ≡ S3; - - behavior buch_state_S3_out: - assumes aorai_CurStates ≢ S4; - ensures aorai_CurStates ≢ S3; - - behavior buch_state_S4_out: - ensures aorai_CurStates ≢ S4; - - behavior buch_state_S5_out: - ensures aorai_CurStates ≢ S5; - - behavior buch_state_Sf_out: - ensures aorai_CurStates ≢ Sf; - - behavior buch_state_Si_out: - ensures aorai_CurStates ≢ Si; - */ -void g_post_func(void) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_g; - aorai_CurStates_tmp = aorai_CurStates; - if (4 == aorai_CurStates) aorai_CurStates_tmp = S3; - if (5 == aorai_CurStates) aorai_CurStates_tmp = S1; - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires aorai_CurStates ≡ S3; - requires aorai_CurStates ≡ S3 ⇒ x ≡ 4 ∨ x ≡ 5; - - behavior Buchi_behavior_in_1: - assumes aorai_CurStates ≡ S3 ∧ x ≡ 5; - ensures aorai_CurStates ≡ S1; - - behavior Buchi_behavior_in_0: - assumes aorai_CurStates ≡ S3 ∧ x ≡ 4; - ensures aorai_CurStates ≡ S3; - */ -void g(int x) -{ - g_pre_func(x); - Y = x; - g_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_S0_out: - ensures aorai_CurStates ≢ S0; - - behavior buch_state_S1_out: - ensures aorai_CurStates ≢ S1; - - behavior buch_state_S2_out: - ensures aorai_CurStates ≢ S2; - - behavior buch_state_S3_in: - assumes aorai_CurStates ≡ S1 ∧ x ≡ 4; - ensures aorai_CurStates ≡ S3; - - behavior buch_state_S3_out: - assumes aorai_CurStates ≢ S1 ∨ ¬(x ≡ 4); - ensures aorai_CurStates ≢ S3; - - behavior buch_state_S4_out: - ensures aorai_CurStates ≢ S4; - - behavior buch_state_S5_out: - ensures aorai_CurStates ≢ S5; - - behavior buch_state_Sf_out: - ensures aorai_CurStates ≢ Sf; - - behavior buch_state_Si_out: - ensures aorai_CurStates ≢ Si; - */ -void f_pre_func(int x) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_f; - aorai_CurStates_tmp = aorai_CurStates; - if (1 == aorai_CurStates) - if (x == 4) aorai_CurStates_tmp = S3; - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires aorai_CurStates ≡ S1; - requires aorai_CurStates ≡ S1 ⇒ res ≡ 0 ∧ X ≡ 5; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_S0_out: - ensures aorai_CurStates ≢ S0; - - behavior buch_state_S1_out: - ensures aorai_CurStates ≢ S1; - - behavior buch_state_S2_in: - assumes aorai_CurStates ≡ S1 ∧ X ≡ 5 ∧ res ≡ 0; - ensures aorai_CurStates ≡ S2; - - behavior buch_state_S2_out: - assumes aorai_CurStates ≢ S1 ∨ ¬(X ≡ 5 ∧ res ≡ 0); - ensures aorai_CurStates ≢ S2; - - behavior buch_state_S3_out: - ensures aorai_CurStates ≢ S3; - - behavior buch_state_S4_out: - ensures aorai_CurStates ≢ S4; - - behavior buch_state_S5_out: - ensures aorai_CurStates ≢ S5; - - behavior buch_state_Sf_out: - ensures aorai_CurStates ≢ Sf; - - behavior buch_state_Si_out: - ensures aorai_CurStates ≢ Si; - */ -void f_post_func(int res) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_f; - aorai_CurStates_tmp = aorai_CurStates; - if (1 == aorai_CurStates) - if (X == 5) - if (res == 0) aorai_CurStates_tmp = S2; - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires aorai_CurStates ≡ S1; - requires aorai_CurStates ≡ S1 ⇒ x ≡ 4; - - behavior Buchi_property_behavior: - ensures aorai_CurStates ≡ S2 ⇒ \result ≡ 0 ∧ X ≡ 5; - ensures aorai_CurStates ≡ S2; - */ -int f(int x) -{ - int __retres; - f_pre_func(x); - X = x; - g(X); - X ++; - g(X); - __retres = 0; - f_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_real_main; - assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_S0_out: - ensures aorai_CurStates ≢ S0; - - behavior buch_state_S1_in: - assumes aorai_CurStates ≡ S0 ∧ c ≢ 0; - ensures aorai_CurStates ≡ S1; - - behavior buch_state_S1_out: - assumes aorai_CurStates ≢ S0 ∨ c ≡ 0; - ensures aorai_CurStates ≢ S1; - - behavior buch_state_S2_in: - assumes aorai_CurStates ≡ S0 ∧ c ≡ 0; - ensures aorai_CurStates ≡ S2; - - behavior buch_state_S2_out: - assumes aorai_CurStates ≢ S0 ∨ ¬(c ≡ 0); - ensures aorai_CurStates ≢ S2; - - behavior buch_state_S3_out: - ensures aorai_CurStates ≢ S3; - - behavior buch_state_S4_out: - ensures aorai_CurStates ≢ S4; - - behavior buch_state_S5_out: - ensures aorai_CurStates ≢ S5; - - behavior buch_state_Sf_out: - ensures aorai_CurStates ≢ Sf; - - behavior buch_state_Si_out: - ensures aorai_CurStates ≢ Si; - */ -void real_main_pre_func(int c) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_real_main; - aorai_CurStates_tmp = aorai_CurStates; - if (0 == aorai_CurStates) - if (c == 0) aorai_CurStates_tmp = S2; - if (0 == aorai_CurStates) - if (c != 0) aorai_CurStates_tmp = S1; - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires aorai_CurStates ≡ S2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_real_main; - assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_S0_out: - ensures aorai_CurStates ≢ S0; - - behavior buch_state_S1_out: - ensures aorai_CurStates ≢ S1; - - behavior buch_state_S2_out: - ensures aorai_CurStates ≢ S2; - - behavior buch_state_S3_out: - ensures aorai_CurStates ≢ S3; - - behavior buch_state_S4_out: - ensures aorai_CurStates ≢ S4; - - behavior buch_state_S5_out: - ensures aorai_CurStates ≢ S5; - - behavior buch_state_Sf_in: - assumes aorai_CurStates ≡ S2; - ensures aorai_CurStates ≡ Sf; - - behavior buch_state_Sf_out: - assumes aorai_CurStates ≢ S2; - ensures aorai_CurStates ≢ Sf; - - behavior buch_state_Si_out: - ensures aorai_CurStates ≢ Si; - */ -void real_main_post_func(int res) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_real_main; - aorai_CurStates_tmp = aorai_CurStates; - if (2 == aorai_CurStates) aorai_CurStates_tmp = Sf; - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires aorai_CurStates ≡ S0; - requires aorai_CurStates ≡ S0 ⇒ c ≢ 0 ∨ c ≡ 0; - - behavior Buchi_property_behavior: - ensures aorai_CurStates ≡ Sf; - */ -int real_main(int c) -{ - int __retres; - real_main_pre_func(c); - if (c) f(4); - __retres = 0; - real_main_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_S0_in: - assumes aorai_CurStates ≡ Si; - ensures aorai_CurStates ≡ S0; - - behavior buch_state_S0_out: - assumes aorai_CurStates ≢ Si; - ensures aorai_CurStates ≢ S0; - - behavior buch_state_S1_out: - ensures aorai_CurStates ≢ S1; - - behavior buch_state_S2_out: - ensures aorai_CurStates ≢ S2; - - behavior buch_state_S3_out: - ensures aorai_CurStates ≢ S3; - - behavior buch_state_S4_out: - ensures aorai_CurStates ≢ S4; - - behavior buch_state_S5_out: - ensures aorai_CurStates ≢ S5; - - behavior buch_state_Sf_out: - ensures aorai_CurStates ≢ Sf; - - behavior buch_state_Si_out: - ensures aorai_CurStates ≢ Si; - */ -void main_pre_func(int c) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - aorai_CurStates_tmp = aorai_CurStates; - if (7 == aorai_CurStates) aorai_CurStates_tmp = S0; - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires aorai_CurStates ≡ Sf; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_S0_out: - ensures aorai_CurStates ≢ S0; - - behavior buch_state_S1_out: - ensures aorai_CurStates ≢ S1; - - behavior buch_state_S2_out: - ensures aorai_CurStates ≢ S2; - - behavior buch_state_S3_out: - ensures aorai_CurStates ≢ S3; - - behavior buch_state_S4_out: - ensures aorai_CurStates ≢ S4; - - behavior buch_state_S5_out: - ensures aorai_CurStates ≢ S5; - - behavior buch_state_Sf_in: - assumes aorai_CurStates ≡ Sf; - ensures aorai_CurStates ≡ Sf; - - behavior buch_state_Sf_out: - assumes aorai_CurStates ≢ Sf; - ensures aorai_CurStates ≢ Sf; - - behavior buch_state_Si_out: - ensures aorai_CurStates ≢ Si; - */ -void main_post_func(int res) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - aorai_CurStates_tmp = aorai_CurStates; - if (6 == aorai_CurStates) aorai_CurStates_tmp = Sf; - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires aorai_CurStates ≡ Si; - - behavior Buchi_property_behavior: - ensures aorai_CurStates ≡ Sf; - */ -int main(int c) -{ - int tmp; - main_pre_func(c); - tmp = real_main(c); - main_post_func(tmp); - return tmp; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/formals.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/formals.res.oracle deleted file mode 100644 index fbf2d361e5a6b10b8bc6709fa7e04a969f591a82..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/formals.res.oracle +++ /dev/null @@ -1,670 +0,0 @@ -[kernel] Parsing tests/aorai/formals.i (no preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_formals0.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_f_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_f_post_func_post_2 : Valid -[wp] [Qed] Goal typed_f_post_func_post : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part7 : Valid -[wp] [Alt-Ergo] Goal typed_f_post_func_buch_state_OK_out_post : Valid -[wp] [Alt-Ergo] Goal typed_f_post_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Alt-Ergo] Goal typed_f_post_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Alt-Ergo] Goal typed_f_post_func_buch_state_main_0_out_post : Valid -[wp] [Alt-Ergo] Goal typed_f_post_func_buch_state_init_out_post : Valid -[wp] [Alt-Ergo] Goal typed_f_post_func_buch_state_aorai_reject_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_f_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_in_0_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_out_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_2_in_0_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_2_out_post_2 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_g_post_func_post_2 : Valid -[wp] [Qed] Goal typed_g_post_func_post : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_OK_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part7 : Valid -[wp] [Alt-Ergo] Goal typed_g_post_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Alt-Ergo] Goal typed_g_post_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_reject_out_post : Valid -[wp] [Alt-Ergo] Goal typed_g_post_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] [Alt-Ergo] Goal typed_g_post_func_buch_state_init_out_post : Valid -[wp] [Alt-Ergo] Goal typed_g_post_func_buch_state_main_0_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_g_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_g_pre_func_post : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_OK_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_OK_in_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_1_in_0_post_2 : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_1_out_post_2 : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_reject_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_reject_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_OK_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_1_out____ : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_0_out____ : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_OK_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_reject_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_reject_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_2_out____ : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_main_0_out_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -/* Generated by Frama-C */ -enum aorai_States { - aorai_reject_state = -2, - OK = 0, - aorai_intermediate_state = 1, - aorai_intermediate_state_0 = 2, - aorai_intermediate_state_1 = 3, - aorai_intermediate_state_2 = 4, - aorai_reject = 5, - init = 6, - main_0 = 7 -}; -enum aorai_ListOper { - op_f = 2, - op_g = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ lemma init_deterministic_trans{L}: \true; - */ -/*@ lemma aorai_reject_deterministic_trans{L}: \true; - */ -/*@ lemma OK_deterministic_trans{L}: \true; - */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ -lemma main_0_deterministic_trans{L}: - ∀ int x; - ¬(x ≡ 3 ∧ \at(aorai_CurOperation,L) ≡ op_f ∧ - \at(aorai_CurOpStatus,L) ≡ aorai_Called ∧ x ≡ 1 ∧ - \at(aorai_CurOperation,L) ≡ op_f ∧ - \at(aorai_CurOpStatus,L) ≡ aorai_Called); - */ -/*@ -lemma aorai_intermediate_state_0_deterministic_trans{L}: - ¬(\at(aorai_CurOperation,L) ≡ op_g ∧ - \at(aorai_CurOpStatus,L) ≡ aorai_Called ∧ - ¬(\at(aorai_CurOperation,L) ≡ op_g ∧ - \at(aorai_CurOpStatus,L) ≡ aorai_Called)); - */ -/*@ ghost int aorai_CurStates = init; */ -/*@ ghost int aorai_x_0 = 0; */ -/*@ -lemma aorai_intermediate_state_2_deterministic_trans{L}: - ¬(\at(aorai_x_0,L) ≡ 3 ∧ \at(aorai_CurOperation,L) ≡ op_f ∧ - \at(aorai_CurOpStatus,L) ≡ aorai_Terminated ∧ - (¬(\at(aorai_CurOperation,L) ≡ op_f ∧ - \at(aorai_CurOpStatus,L) ≡ aorai_Terminated) ∨ - \at(aorai_x_0,L) ≢ 3)); - */ -/*@ ghost int aorai_y = 0; */ -/*@ -lemma aorai_intermediate_state_1_deterministic_trans{L}: - ¬(\at(aorai_y,L) ≡ 2 ∧ \at(aorai_CurOperation,L) ≡ op_g ∧ - \at(aorai_CurOpStatus,L) ≡ aorai_Terminated ∧ - (¬(\at(aorai_CurOperation,L) ≡ op_g ∧ - \at(aorai_CurOpStatus,L) ≡ aorai_Terminated) ∨ - \at(aorai_y,L) ≢ 2)); - */ -/*@ ghost int aorai_x = 0; */ -/*@ -lemma aorai_intermediate_state_deterministic_trans{L}: - ¬(\at(aorai_x,L) ≡ 1 ∧ \at(aorai_CurOperation,L) ≡ op_f ∧ - \at(aorai_CurOpStatus,L) ≡ aorai_Terminated ∧ - (¬(\at(aorai_CurOperation,L) ≡ op_f ∧ - \at(aorai_CurOpStatus,L) ≡ aorai_Terminated) ∨ - \at(aorai_x,L) ≢ 1)); - */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_x_0, aorai_x, aorai_CurOpStatus, aorai_CurOperation, - aorai_CurStates; - - behavior buch_state_OK_out: - ensures aorai_CurStates ≢ OK; - - behavior buch_state_aorai_intermediate_state_in_0: - assumes aorai_CurStates ≡ main_0 ∧ x ≡ 1; - ensures aorai_CurStates ≡ aorai_intermediate_state; - ensures aorai_x ≡ \old(x); - - behavior buch_state_aorai_intermediate_state_out: - assumes aorai_CurStates ≢ main_0 ∨ ¬(x ≡ 1); - ensures aorai_CurStates ≢ aorai_intermediate_state; - ensures aorai_x ≡ \old(aorai_x); - - behavior buch_state_aorai_intermediate_state_0_out: - ensures aorai_CurStates ≢ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures aorai_CurStates ≢ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_in_0: - assumes aorai_CurStates ≡ main_0 ∧ x ≡ 3; - ensures aorai_CurStates ≡ aorai_intermediate_state_2; - ensures aorai_x_0 ≡ \old(x); - - behavior buch_state_aorai_intermediate_state_2_out: - assumes aorai_CurStates ≢ main_0 ∨ ¬(x ≡ 3); - ensures aorai_CurStates ≢ aorai_intermediate_state_2; - ensures aorai_x_0 ≡ \old(aorai_x_0); - - behavior buch_state_aorai_reject_out: - ensures aorai_CurStates ≢ aorai_reject; - - behavior buch_state_init_out: - ensures aorai_CurStates ≢ init; - - behavior buch_state_main_0_out: - ensures aorai_CurStates ≢ main_0; - */ -void f_pre_func(int x) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_f; - aorai_CurStates_tmp = aorai_CurStates; - if (7 == aorai_CurStates) - if (x == 3) { - aorai_CurStates_tmp = aorai_intermediate_state_2; - aorai_x_0 = x; - } - if (7 == aorai_CurStates) - if (x == 1) { - aorai_CurStates_tmp = aorai_intermediate_state; - aorai_x = x; - } - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires - aorai_CurStates ≡ aorai_intermediate_state ∨ - aorai_CurStates ≡ aorai_intermediate_state_2; - requires - aorai_CurStates ≡ aorai_intermediate_state ⇒ - aorai_x ≡ 1 ∨ aorai_x ≢ 1; - requires - aorai_CurStates ≡ aorai_intermediate_state_2 ⇒ - aorai_x_0 ≡ 3 ∨ aorai_x_0 ≢ 3; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_OK_in: - assumes - aorai_CurStates ≡ aorai_intermediate_state_2 ∧ aorai_x_0 ≡ 3; - ensures aorai_CurStates ≡ OK; - - behavior buch_state_OK_out: - assumes - aorai_CurStates ≢ aorai_intermediate_state_2 ∨ - ¬(aorai_x_0 ≡ 3); - ensures aorai_CurStates ≢ OK; - - behavior buch_state_aorai_intermediate_state_out: - ensures aorai_CurStates ≢ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_in: - assumes aorai_CurStates ≡ aorai_intermediate_state ∧ aorai_x ≡ 1; - ensures aorai_CurStates ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_0_out: - assumes - aorai_CurStates ≢ aorai_intermediate_state ∨ ¬(aorai_x ≡ 1); - ensures aorai_CurStates ≢ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures aorai_CurStates ≢ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures aorai_CurStates ≢ aorai_intermediate_state_2; - - behavior buch_state_aorai_reject_in: - assumes - (aorai_CurStates ≡ aorai_intermediate_state_2 ∧ aorai_x_0 ≢ 3) ∨ - (aorai_CurStates ≡ aorai_intermediate_state ∧ aorai_x ≢ 1); - ensures aorai_CurStates ≡ aorai_reject; - - behavior buch_state_aorai_reject_out: - assumes - (aorai_CurStates ≢ aorai_intermediate_state_2 ∨ - ¬(aorai_x_0 ≢ 3)) ∧ - (aorai_CurStates ≢ aorai_intermediate_state ∨ ¬(aorai_x ≢ 1)); - ensures aorai_CurStates ≢ aorai_reject; - - behavior buch_state_init_out: - ensures aorai_CurStates ≢ init; - - behavior buch_state_main_0_out: - ensures aorai_CurStates ≢ main_0; - */ -void f_post_func(int res) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_f; - aorai_CurStates_tmp = aorai_CurStates; - if (4 == aorai_CurStates) { - if (aorai_x_0 != 3) aorai_CurStates_tmp = aorai_reject; else goto _LAND; - } - else { - _LAND: ; - if (1 == aorai_CurStates) - if (aorai_x != 1) aorai_CurStates_tmp = aorai_reject; - } - if (1 == aorai_CurStates) - if (aorai_x == 1) aorai_CurStates_tmp = aorai_intermediate_state_0; - if (4 == aorai_CurStates) - if (aorai_x_0 == 3) aorai_CurStates_tmp = OK; - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires aorai_CurStates ≡ main_0; - requires aorai_CurStates ≡ main_0 ⇒ x ≡ 1 ∨ x ≡ 3; - ensures - aorai_CurStates ≡ aorai_intermediate_state_0 ∨ - aorai_CurStates ≡ OK; - ensures - \old(aorai_CurStates ≡ main_0) ⇒ - aorai_CurStates ≢ OK ∧ aorai_CurStates ≢ aorai_reject ⇒ - aorai_x_0 ≡ \old(aorai_x_0); - ensures - \old(aorai_CurStates ≡ main_0) ⇒ - aorai_CurStates ≢ aorai_intermediate_state_0 ∧ - aorai_CurStates ≢ aorai_reject ⇒ aorai_x ≡ \old(aorai_x); - - behavior Buchi_behavior_in_1: - assumes aorai_CurStates ≡ main_0 ∧ x ≡ 3; - ensures - (aorai_CurStates ≡ OK ⇒ aorai_x_0 ≡ 3) ∧ - (aorai_CurStates ≡ aorai_intermediate_state_0 ⇒ aorai_x ≡ 1) ∧ - (aorai_CurStates ≡ aorai_reject ⇒ - aorai_x ≢ 1 ∨ aorai_x_0 ≢ 3); - ensures aorai_CurStates ≡ OK ∨ aorai_CurStates ≡ aorai_reject; - ensures - \at(aorai_CurStates ≡ main_0,Pre) ∧ - aorai_CurStates ≡ aorai_reject ⇒ - aorai_x_0 ≡ \at(x,Pre)+0 ∨ aorai_x_0 ≡ \at(aorai_x_0,Pre)+0; - ensures - \at(aorai_CurStates ≡ main_0,Pre) ∧ - aorai_CurStates ≡ aorai_reject ⇒ - aorai_x ≡ \at(x,Pre)+0 ∨ aorai_x ≡ \at(aorai_x,Pre)+0; - ensures - \at(aorai_CurStates ≡ main_0,Pre) ∧ aorai_CurStates ≡ OK ⇒ - aorai_x_0 ≡ \at(x,Pre)+0; - - behavior Buchi_behavior_in_0: - assumes aorai_CurStates ≡ main_0 ∧ x ≡ 1; - ensures - (aorai_CurStates ≡ OK ⇒ aorai_x_0 ≡ 3) ∧ - (aorai_CurStates ≡ aorai_intermediate_state_0 ⇒ aorai_x ≡ 1) ∧ - (aorai_CurStates ≡ aorai_reject ⇒ - aorai_x ≢ 1 ∨ aorai_x_0 ≢ 3); - ensures - aorai_CurStates ≡ aorai_intermediate_state_0 ∨ - aorai_CurStates ≡ aorai_reject; - ensures - \at(aorai_CurStates ≡ main_0,Pre) ∧ - aorai_CurStates ≡ aorai_reject ⇒ - aorai_x_0 ≡ \at(x,Pre)+0 ∨ aorai_x_0 ≡ \at(aorai_x_0,Pre)+0; - ensures - \at(aorai_CurStates ≡ main_0,Pre) ∧ - aorai_CurStates ≡ aorai_reject ⇒ - aorai_x ≡ \at(x,Pre)+0 ∨ aorai_x ≡ \at(aorai_x,Pre)+0; - ensures - \at(aorai_CurStates ≡ main_0,Pre) ∧ - aorai_CurStates ≡ aorai_intermediate_state_0 ⇒ - aorai_x ≡ \at(x,Pre)+0; - */ -int f(int x) -{ - f_pre_func(x); - f_post_func(x); - return x; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_g; - assigns aorai_y, aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_OK_in: - assumes aorai_CurStates ≡ OK; - ensures aorai_CurStates ≡ OK; - - behavior buch_state_OK_out: - assumes aorai_CurStates ≢ OK; - ensures aorai_CurStates ≢ OK; - - behavior buch_state_aorai_intermediate_state_out: - ensures aorai_CurStates ≢ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures aorai_CurStates ≢ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_in_0: - assumes aorai_CurStates ≡ aorai_intermediate_state_0; - ensures aorai_CurStates ≡ aorai_intermediate_state_1; - ensures aorai_y ≡ \old(y); - - behavior buch_state_aorai_intermediate_state_1_out: - assumes aorai_CurStates ≢ aorai_intermediate_state_0; - ensures aorai_CurStates ≢ aorai_intermediate_state_1; - ensures aorai_y ≡ \old(aorai_y); - - behavior buch_state_aorai_intermediate_state_2_out: - ensures aorai_CurStates ≢ aorai_intermediate_state_2; - - behavior buch_state_aorai_reject_in: - assumes aorai_CurStates ≡ aorai_reject; - ensures aorai_CurStates ≡ aorai_reject; - - behavior buch_state_aorai_reject_out: - assumes aorai_CurStates ≢ aorai_reject; - ensures aorai_CurStates ≢ aorai_reject; - - behavior buch_state_init_out: - ensures aorai_CurStates ≢ init; - - behavior buch_state_main_0_out: - ensures aorai_CurStates ≢ main_0; - */ -void g_pre_func(int y) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_g; - aorai_CurStates_tmp = aorai_CurStates; - if (5 == aorai_CurStates) aorai_CurStates_tmp = aorai_reject; - if (2 == aorai_CurStates) { - aorai_CurStates_tmp = aorai_intermediate_state_1; - aorai_y = y; - } - if (0 == aorai_CurStates) aorai_CurStates_tmp = OK; - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires - aorai_CurStates ≡ OK ∨ - aorai_CurStates ≡ aorai_intermediate_state_1; - requires - aorai_CurStates ≡ aorai_intermediate_state_1 ⇒ - aorai_y ≡ 2 ∨ aorai_y ≢ 2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_g; - assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_OK_in: - assumes - (aorai_CurStates ≡ aorai_intermediate_state_1 ∧ aorai_y ≡ 2) ∨ - aorai_CurStates ≡ OK; - ensures aorai_CurStates ≡ OK; - - behavior buch_state_OK_out: - assumes - (aorai_CurStates ≢ aorai_intermediate_state_1 ∨ ¬(aorai_y ≡ 2)) ∧ - aorai_CurStates ≢ OK; - ensures aorai_CurStates ≢ OK; - - behavior buch_state_aorai_intermediate_state_out: - ensures aorai_CurStates ≢ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures aorai_CurStates ≢ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures aorai_CurStates ≢ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures aorai_CurStates ≢ aorai_intermediate_state_2; - - behavior buch_state_aorai_reject_in: - assumes - aorai_CurStates ≡ aorai_reject ∨ - (aorai_CurStates ≡ aorai_intermediate_state_1 ∧ aorai_y ≢ 2); - ensures aorai_CurStates ≡ aorai_reject; - - behavior buch_state_aorai_reject_out: - assumes - aorai_CurStates ≢ aorai_reject ∧ - (aorai_CurStates ≢ aorai_intermediate_state_1 ∨ ¬(aorai_y ≢ 2)); - ensures aorai_CurStates ≢ aorai_reject; - - behavior buch_state_init_out: - ensures aorai_CurStates ≢ init; - - behavior buch_state_main_0_out: - ensures aorai_CurStates ≢ main_0; - */ -void g_post_func(int res) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_g; - aorai_CurStates_tmp = aorai_CurStates; - if (5 == aorai_CurStates) aorai_CurStates_tmp = aorai_reject; - else - if (3 == aorai_CurStates) - if (aorai_y != 2) aorai_CurStates_tmp = aorai_reject; - if (3 == aorai_CurStates) { - if (aorai_y == 2) aorai_CurStates_tmp = OK; else goto _LAND; - } - else { - _LAND: ; - if (0 == aorai_CurStates) aorai_CurStates_tmp = OK; - } - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires - aorai_CurStates ≡ OK ∨ - aorai_CurStates ≡ aorai_intermediate_state_0; - requires - aorai_CurStates ≡ aorai_reject ∨ aorai_CurStates ≢ aorai_reject; - requires - aorai_CurStates ≡ aorai_intermediate_state_0 ∨ - aorai_CurStates ≢ aorai_intermediate_state_0; - requires aorai_CurStates ≡ OK ∨ aorai_CurStates ≢ OK; - ensures aorai_CurStates ≡ OK; - - behavior Buchi_behavior_in_2: - assumes aorai_CurStates ≡ aorai_reject; - ensures aorai_CurStates ≡ aorai_reject; - - behavior Buchi_behavior_in_1: - assumes aorai_CurStates ≡ aorai_intermediate_state_0; - ensures aorai_CurStates ≡ OK ∨ aorai_CurStates ≡ aorai_reject; - ensures - \at(aorai_CurStates ≡ aorai_intermediate_state_0,Pre) ∧ - aorai_CurStates ≡ aorai_reject ⇒ aorai_y ≡ \at(y,Pre)+0; - ensures - \at(aorai_CurStates ≡ aorai_intermediate_state_0,Pre) ∧ - aorai_CurStates ≡ OK ⇒ aorai_y ≡ \at(y,Pre)+0; - - behavior Buchi_behavior_in_0: - assumes aorai_CurStates ≡ OK; - ensures aorai_CurStates ≡ OK; - */ -int g(int y) -{ - g_pre_func(y); - g_post_func(y); - return y; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_OK_out: - ensures aorai_CurStates ≢ OK; - - behavior buch_state_aorai_intermediate_state_out: - ensures aorai_CurStates ≢ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures aorai_CurStates ≢ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures aorai_CurStates ≢ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures aorai_CurStates ≢ aorai_intermediate_state_2; - - behavior buch_state_aorai_reject_out: - ensures aorai_CurStates ≢ aorai_reject; - - behavior buch_state_init_out: - ensures aorai_CurStates ≢ init; - - behavior buch_state_main_0_in: - assumes aorai_CurStates ≡ init; - ensures aorai_CurStates ≡ main_0; - - behavior buch_state_main_0_out: - assumes aorai_CurStates ≢ init; - ensures aorai_CurStates ≢ main_0; - */ -void main_pre_func(void) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - aorai_CurStates_tmp = aorai_CurStates; - if (6 == aorai_CurStates) aorai_CurStates_tmp = main_0; - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires aorai_CurStates ≡ OK; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; - - behavior buch_state_OK_in: - assumes aorai_CurStates ≡ OK; - ensures aorai_CurStates ≡ OK; - - behavior buch_state_OK_out: - assumes aorai_CurStates ≢ OK; - ensures aorai_CurStates ≢ OK; - - behavior buch_state_aorai_intermediate_state_out: - ensures aorai_CurStates ≢ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures aorai_CurStates ≢ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures aorai_CurStates ≢ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures aorai_CurStates ≢ aorai_intermediate_state_2; - - behavior buch_state_aorai_reject_in: - assumes aorai_CurStates ≡ aorai_reject; - ensures aorai_CurStates ≡ aorai_reject; - - behavior buch_state_aorai_reject_out: - assumes aorai_CurStates ≢ aorai_reject; - ensures aorai_CurStates ≢ aorai_reject; - - behavior buch_state_init_out: - ensures aorai_CurStates ≢ init; - - behavior buch_state_main_0_out: - ensures aorai_CurStates ≢ main_0; - */ -void main_post_func(int res) -{ - /*@ ghost int aorai_CurStates_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - aorai_CurStates_tmp = aorai_CurStates; - if (5 == aorai_CurStates) aorai_CurStates_tmp = aorai_reject; - if (0 == aorai_CurStates) aorai_CurStates_tmp = OK; - aorai_CurStates_tmp = aorai_CurStates; - return; -} - -/*@ requires aorai_CurStates ≡ init; - ensures aorai_CurStates ≡ OK; - - behavior Buchi_property_behavior: - ensures aorai_CurStates ≡ OK ∨ aorai_CurStates ≡ aorai_reject; - ensures - \at(aorai_CurStates ≡ init,Pre) ∧ - aorai_CurStates ≡ aorai_reject ⇒ - aorai_x_0 ≡ \at(1,Pre)+0 ∨ aorai_x_0 ≡ \at(aorai_x_0,Pre)+0; - ensures - \at(aorai_CurStates ≡ init,Pre) ∧ - aorai_CurStates ≡ aorai_reject ⇒ - aorai_y ≡ \at(2,Pre)+0 ∨ aorai_y ≡ \at(aorai_y,Pre)+0; - ensures - \at(aorai_CurStates ≡ init,Pre) ∧ - aorai_CurStates ≡ aorai_reject ⇒ - aorai_x ≡ \at(1,Pre)+0 ∨ aorai_x ≡ \at(aorai_x,Pre)+0; - ensures - \at(aorai_CurStates ≡ init,Pre) ∧ aorai_CurStates ≡ OK ⇒ - aorai_x_0 ≡ \at(1,Pre)+0 ∨ aorai_x_0 ≡ \at(aorai_x_0,Pre)+0; - ensures - \at(aorai_CurStates ≡ init,Pre) ∧ aorai_CurStates ≡ OK ⇒ - aorai_y ≡ \at(2,Pre)+0 ∨ aorai_y ≡ \at(aorai_y,Pre)+0; - ensures - \at(aorai_CurStates ≡ init,Pre) ∧ aorai_CurStates ≡ OK ⇒ - aorai_x ≡ \at(1,Pre)+0 ∨ aorai_x ≡ \at(aorai_x,Pre)+0; - */ -int main(void) -{ - int __retres; - main_pre_func(); - f(1); - g(2); - __retres = 0; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/generate_assigns_bts1290.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/generate_assigns_bts1290.res.oracle deleted file mode 100644 index 74dfe092ace0323030b97467e8acbf682d42de8b..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/generate_assigns_bts1290.res.oracle +++ /dev/null @@ -1,108 +0,0 @@ -[kernel] Parsing tests/aorai/generate_assigns_bts1290.i (no preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_generate_assigns_bts12900.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_main_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int S = 1; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S; - - behavior buch_state_S_in: - assumes 1 ≡ S; - ensures 1 ≡ S; - - behavior buch_state_S_out: - assumes 0 ≡ S; - ensures 0 ≡ S; - */ -void main_pre_func(void) -{ - /*@ ghost int S_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - S_tmp = S; - if (S == 1) S_tmp = 1; else S_tmp = 0; - S = S_tmp; - return; -} - -/*@ requires 1 ≡ S; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S; - - behavior buch_state_S_in: - assumes 1 ≡ S; - ensures 1 ≡ S; - - behavior buch_state_S_out: - assumes 0 ≡ S; - ensures 0 ≡ S; - */ -void main_post_func(void) -{ - /*@ ghost int S_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - S_tmp = S; - if (S == 1) S_tmp = 1; else S_tmp = 0; - S = S_tmp; - return; -} - -/*@ requires 1 ≡ S; - - behavior Buchi_property_behavior: - ensures \true; - ensures 1 ≡ S; - */ -void main(void) -{ - int aorai_Loop_Init_11; - int i; - main_pre_func(); - i = 0; - /*@ ghost aorai_Loop_Init_11 = 1; */ - aorai_loop_11: - /*@ loop invariant Aorai: 1 ≡ S; - loop assigns i, aorai_Loop_Init_11, aorai_CurOpStatus, - aorai_CurOperation, S; - loop assigns aorai_Loop_Init_11 \from \nothing; - */ - while (1) { - if (! (i < 10)) goto while_0_break; - /*@ ghost aorai_Loop_Init_11 = 0; */ - i ++; - } - while_0_break: ; - main_post_func(); - return; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/goto.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/goto.res.oracle deleted file mode 100644 index f29a5c02b36d7de375ae4ce96a1cc627fb3133df..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/goto.res.oracle +++ /dev/null @@ -1,877 +0,0 @@ -[kernel] Parsing tests/aorai/goto.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -tests/aorai/goto.c:28:[aorai] warning: Call to opc does not follow automaton's specification. This path is assumed to be dead -[kernel] Parsing /tmp/aorai_goto0.i (no preprocessing) -/tmp/aorai_goto0.i:4:[wp] warning: Global invariant not handled yet ('inv' ignored) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_all_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S6_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S6_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opa_post_func_post_2 : Valid -[wp] [Qed] Goal typed_opa_post_func_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S6_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S4_in_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_all_out_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_opa_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opa_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_opa_pre_func_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_S3_in_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_S6_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opb_post_func_post_2 : Valid -[wp] [Qed] Goal typed_opb_post_func_post : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S6_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S6_in_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opb_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_opb_pre_func_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S6_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S5_in_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opc_post_func_post_2 : Valid -[wp] [Qed] Goal typed_opc_post_func_post : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_accept_S6_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_accept_S5_out_post : Valid -[wp] Computing [200 goals...] -[wp] [Qed] Goal typed_opc_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opc_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_opc_pre_func_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_accept_S6_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_main = 3, - op_opa = 2, - op_opb = 1, - op_opc = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -int status = 0; -int rr = 1; -/*@ global invariant inv: 0 ≤ rr ≤ 5000; - */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int accept_S2 = 0; */ -/*@ ghost int accept_S3 = 0; */ -/*@ ghost int accept_S4 = 0; */ -/*@ ghost int accept_S5 = 0; */ -/*@ ghost int accept_S6 = 0; */ -/*@ ghost int accept_all = 0; */ -/*@ ghost int accept_init = 1; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_opa; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, - accept_S4, accept_S5, accept_S6, accept_all, accept_init; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_in: - assumes 1 ≡ accept_S2; - ensures 1 ≡ accept_S3; - - behavior buch_state_accept_S3_out: - assumes 0 ≡ accept_S2; - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_S6_out: - ensures 0 ≡ accept_S6; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void opa_pre_func(void) -{ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_S6_tmp; */ - /*@ ghost int accept_all_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_opa; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_S6_tmp = accept_S6; - accept_all_tmp = accept_all; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_all_tmp = 0; - accept_S6_tmp = 0; - accept_S5_tmp = 0; - accept_S4_tmp = 0; - if (accept_S2 == 1) accept_S3_tmp = 1; else accept_S3_tmp = 0; - accept_S2_tmp = 0; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_S6 = accept_S6_tmp; - accept_all = accept_all_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S3 ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_S4 ∧ - 0 ≡ accept_S5 ∧ 0 ≡ accept_S6 ∧ 0 ≡ accept_all ∧ - 0 ≡ accept_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_opa; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, - accept_S4, accept_S5, accept_S6, accept_all, accept_init; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_in: - assumes 1 ≡ accept_S3; - ensures 1 ≡ accept_S4; - - behavior buch_state_accept_S4_out: - assumes 0 ≡ accept_S3; - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_S6_out: - ensures 0 ≡ accept_S6; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void opa_post_func(void) -{ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_S6_tmp; */ - /*@ ghost int accept_all_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_opa; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_S6_tmp = accept_S6; - accept_all_tmp = accept_all; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_all_tmp = 0; - accept_S6_tmp = 0; - accept_S5_tmp = 0; - if (accept_S3 == 1) accept_S4_tmp = 1; else accept_S4_tmp = 0; - accept_S3_tmp = 0; - accept_S2_tmp = 0; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_S6 = accept_S6_tmp; - accept_all = accept_all_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ 0 ≡ accept_S4 ∧ - 0 ≡ accept_S5 ∧ 0 ≡ accept_S6 ∧ 0 ≡ accept_all ∧ - 0 ≡ accept_init; - requires rr < 5000; - - behavior j: - ensures rr < 5001; - - behavior Buchi_property_behavior: - ensures - 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ 0 ≡ accept_S5 ∧ - 0 ≡ accept_S6 ∧ 0 ≡ accept_all ∧ 0 ≡ accept_init; - ensures 1 ≡ accept_S4; - */ -void opa(void) -{ - opa_pre_func(); - rr ++; - opa_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_opb; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, - accept_S4, accept_S5, accept_S6, accept_all, accept_init; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_in: - assumes 1 ≡ accept_S4; - ensures 1 ≡ accept_S5; - - behavior buch_state_accept_S5_out: - assumes 0 ≡ accept_S4; - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_S6_out: - ensures 0 ≡ accept_S6; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void opb_pre_func(void) -{ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_S6_tmp; */ - /*@ ghost int accept_all_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_opb; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_S6_tmp = accept_S6; - accept_all_tmp = accept_all; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_all_tmp = 0; - accept_S6_tmp = 0; - if (accept_S4 == 1) accept_S5_tmp = 1; else accept_S5_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - accept_S2_tmp = 0; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_S6 = accept_S6_tmp; - accept_all = accept_all_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S5 ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S4 ∧ 0 ≡ accept_S6 ∧ 0 ≡ accept_all ∧ - 0 ≡ accept_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_opb; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, - accept_S4, accept_S5, accept_S6, accept_all, accept_init; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_S6_in: - assumes 1 ≡ accept_S5; - ensures 1 ≡ accept_S6; - - behavior buch_state_accept_S6_out: - assumes 0 ≡ accept_S5; - ensures 0 ≡ accept_S6; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void opb_post_func(void) -{ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_S6_tmp; */ - /*@ ghost int accept_all_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_opb; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_S6_tmp = accept_S6; - accept_all_tmp = accept_all; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_all_tmp = 0; - if (accept_S5 == 1) accept_S6_tmp = 1; else accept_S6_tmp = 0; - accept_S5_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - accept_S2_tmp = 0; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_S6 = accept_S6_tmp; - accept_all = accept_all_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S4 ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S5 ∧ 0 ≡ accept_S6 ∧ 0 ≡ accept_all ∧ - 0 ≡ accept_init; - - behavior Buchi_property_behavior: - ensures - 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ 0 ≡ accept_S4 ∧ - 0 ≡ accept_S5 ∧ 0 ≡ accept_all ∧ 0 ≡ accept_init; - ensures 1 ≡ accept_S6; - */ -void opb(void) -{ - opb_pre_func(); - status = 1; - opb_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_opc; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, - accept_S4, accept_S5, accept_S6, accept_all, accept_init; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_S6_out: - ensures 0 ≡ accept_S6; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void opc_pre_func(void) -{ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_S6_tmp; */ - /*@ ghost int accept_all_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_opc; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_S6_tmp = accept_S6; - accept_all_tmp = accept_all; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_all_tmp = 0; - accept_S6_tmp = 0; - accept_S5_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - accept_S2_tmp = 0; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_S6 = accept_S6_tmp; - accept_all = accept_all_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires \false; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_opc; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, - accept_S4, accept_S5, accept_S6, accept_all, accept_init; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_S6_out: - ensures 0 ≡ accept_S6; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void opc_post_func(void) -{ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_S6_tmp; */ - /*@ ghost int accept_all_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_opc; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_S6_tmp = accept_S6; - accept_all_tmp = accept_all; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_all_tmp = 0; - accept_S6_tmp = 0; - accept_S5_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - accept_S2_tmp = 0; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_S6 = accept_S6_tmp; - accept_all = accept_all_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires \false; - - behavior Buchi_behavior_out_0: - ensures 0 ≡ accept_S2; - - behavior Buchi_behavior_out_1: - ensures 0 ≡ accept_S3; - - behavior Buchi_behavior_out_2: - ensures 0 ≡ accept_S4; - - behavior Buchi_behavior_out_3: - ensures 0 ≡ accept_S5; - - behavior Buchi_behavior_out_4: - ensures 0 ≡ accept_S6; - - behavior Buchi_behavior_out_5: - ensures 0 ≡ accept_all; - - behavior Buchi_behavior_out_6: - ensures 0 ≡ accept_init; - */ -void opc(void) -{ - opc_pre_func(); - rr = 60000; - opc_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, - accept_S4, accept_S5, accept_S6, accept_all, accept_init; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ accept_init; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ accept_init; - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_S6_out: - ensures 0 ≡ accept_S6; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void main_pre_func(void) -{ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_S6_tmp; */ - /*@ ghost int accept_all_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_S6_tmp = accept_S6; - accept_all_tmp = accept_all; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_all_tmp = 0; - accept_S6_tmp = 0; - accept_S5_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - if (accept_init == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_S6 = accept_S6_tmp; - accept_all = accept_all_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S6 ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S4 ∧ 0 ≡ accept_S5 ∧ 0 ≡ accept_all ∧ - 0 ≡ accept_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, - accept_S4, accept_S5, accept_S6, accept_all, accept_init; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_S6_out: - ensures 0 ≡ accept_S6; - - behavior buch_state_accept_all_in: - assumes 1 ≡ accept_S6; - ensures 1 ≡ accept_all; - - behavior buch_state_accept_all_out: - assumes 0 ≡ accept_S6; - ensures 0 ≡ accept_all; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void main_post_func(int res) -{ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_S6_tmp; */ - /*@ ghost int accept_all_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_S6_tmp = accept_S6; - accept_all_tmp = accept_all; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - if (accept_S6 == 1) accept_all_tmp = 1; else accept_all_tmp = 0; - accept_S6_tmp = 0; - accept_S5_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - accept_S2_tmp = 0; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_S6 = accept_S6_tmp; - accept_all = accept_all_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_init ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S4 ∧ 0 ≡ accept_S5 ∧ 0 ≡ accept_S6 ∧ - 0 ≡ accept_all; - - behavior aorai_acceptance: - ensures - 1 ≡ accept_S2 ∨ 1 ≡ accept_S3 ∨ 1 ≡ accept_S4 ∨ - 1 ≡ accept_S5 ∨ 1 ≡ accept_S6 ∨ 1 ≡ accept_all ∨ - 1 ≡ accept_init; - - behavior Buchi_property_behavior: - ensures - 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ 0 ≡ accept_S4 ∧ - 0 ≡ accept_S5 ∧ 0 ≡ accept_S6 ∧ 0 ≡ accept_init; - ensures 1 ≡ accept_all; - */ -int main(void) -{ - int __retres; - main_pre_func(); - if (rr < 5000) goto L; - opc(); - L4: goto L5; - L: opa(); - goto L2; - opc(); - L6: __retres = 1; - goto return_label; - L3: goto L4; - opc(); - goto L2; - L2: goto L3; - L5: opb(); - goto L6; - return_label: main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/hoare_seq.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/hoare_seq.res.oracle deleted file mode 100644 index d1a8dce2eb23b6ef73e833d6683b624dcab2484a..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/hoare_seq.res.oracle +++ /dev/null @@ -1,551 +0,0 @@ -[kernel] Parsing tests/aorai/hoare_seq.i (no preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_hoare_seq0.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_f_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_f_post_func_post_2 : Valid -[wp] [Qed] Goal typed_f_post_func_post : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part17 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_reject_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_reject_in_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_2_in_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_f_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part16 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_1_in_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_reject_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_reject_in_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part18 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part17 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part21 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part20 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part19 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_0_out____ : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Sf_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_reject_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_reject_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_2_out____ : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_1_out____ : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_main_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part17 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part16 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_0_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_reject_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_f = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int S0 = 1; */ -/*@ ghost int Sf = 0; */ -/*@ ghost int aorai_intermediate_state = 0; */ -/*@ ghost int aorai_intermediate_state_0 = 0; */ -/*@ ghost int aorai_intermediate_state_1 = 0; */ -/*@ ghost int aorai_intermediate_state_2 = 0; */ -/*@ ghost int aorai_reject = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_reject; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_in: - assumes 1 ≡ aorai_intermediate_state_0; - ensures 1 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_1_out: - assumes 0 ≡ aorai_intermediate_state_0; - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_reject_in: - assumes 1 ≡ aorai_intermediate_state; - ensures 1 ≡ aorai_reject; - - behavior buch_state_aorai_reject_out: - assumes 0 ≡ aorai_intermediate_state; - ensures 0 ≡ aorai_reject; - */ -void f_pre_func(void) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_reject_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_f; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_reject_tmp = aorai_reject; - if (aorai_intermediate_state == 1) aorai_reject_tmp = 1; - else aorai_reject_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - if (aorai_intermediate_state_0 == 1) aorai_intermediate_state_1_tmp = 1; - else aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_reject = aorai_reject_tmp; - return; -} - -/*@ requires - 1 ≡ aorai_intermediate_state_1 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧ - 0 ≡ aorai_intermediate_state ∧ 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_reject; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_in: - assumes 1 ≡ aorai_intermediate_state_1; - ensures 1 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_2_out: - assumes 0 ≡ aorai_intermediate_state_1; - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_reject_in: - assumes 1 ≡ aorai_reject; - ensures 1 ≡ aorai_reject; - - behavior buch_state_aorai_reject_out: - assumes 0 ≡ aorai_reject; - ensures 0 ≡ aorai_reject; - */ -void f_post_func(void) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_reject_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_f; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_reject_tmp = aorai_reject; - if (aorai_reject == 1) aorai_reject_tmp = 1; else aorai_reject_tmp = 0; - if (aorai_intermediate_state_1 == 1) aorai_intermediate_state_2_tmp = 1; - else aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_reject = aorai_reject_tmp; - return; -} - -/*@ requires - 1 ≡ aorai_intermediate_state_0 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧ - 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_reject; - requires - 1 ≡ aorai_intermediate_state_0 ∨ 0 ≡ aorai_intermediate_state_0; - requires - 1 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state; - ensures 1 ≡ aorai_intermediate_state_2; - - behavior Buchi_behavior_in_0: - assumes 1 ≡ aorai_intermediate_state_0; - ensures 1 ≡ aorai_intermediate_state_2; - - behavior Buchi_behavior_in_1: - assumes 1 ≡ aorai_intermediate_state; - ensures 1 ≡ aorai_reject; - - behavior Buchi_behavior_out_0: - ensures 0 ≡ S0; - - behavior Buchi_behavior_out_1: - ensures 0 ≡ Sf; - - behavior Buchi_behavior_out_2: - ensures 0 ≡ aorai_intermediate_state; - - behavior Buchi_behavior_out_3: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior Buchi_behavior_out_4: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior Buchi_behavior_out_5: - assumes 0 ≡ aorai_intermediate_state_0; - ensures 0 ≡ aorai_intermediate_state_2; - - behavior Buchi_behavior_out_6: - assumes 0 ≡ aorai_intermediate_state; - ensures 0 ≡ aorai_reject; - */ -void f(void) -{ - f_pre_func(); - f_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_reject; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_in: - assumes 1 ≡ S0 ∧ c > 0; - ensures 1 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_out: - assumes 0 ≡ S0 ∨ ¬(c > 0); - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_in: - assumes 1 ≡ S0 ∧ c ≤ 0; - ensures 1 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_0_out: - assumes 0 ≡ S0 ∨ ¬(c ≤ 0); - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_reject_out: - ensures 0 ≡ aorai_reject; - */ -void main_pre_func(int c) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_reject_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_reject_tmp = aorai_reject; - aorai_reject_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - if (S0 == 1) - if (c <= 0) aorai_intermediate_state_0_tmp = 1; - else aorai_intermediate_state_0_tmp = 0; - else aorai_intermediate_state_0_tmp = 0; - if (S0 == 1) aorai_intermediate_state_tmp = 1; - else aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_reject = aorai_reject_tmp; - return; -} - -/*@ requires - (1 ≡ aorai_intermediate_state ∨ 1 ≡ aorai_intermediate_state_0 ∨ - 1 ≡ aorai_intermediate_state_2) ∧ - 0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state_1; - requires 1 ≡ aorai_intermediate_state_2 ⇒ res ≡ 0 ∨ res ≢ 0; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_reject; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_in: - assumes - (1 ≡ aorai_intermediate_state_2 ∧ res ≡ 0) ∨ - 1 ≡ aorai_intermediate_state; - ensures 1 ≡ Sf; - - behavior buch_state_Sf_out: - assumes - (0 ≡ aorai_intermediate_state_2 ∨ ¬(res ≡ 0)) ∧ - 0 ≡ aorai_intermediate_state; - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_reject_in: - assumes - 1 ≡ aorai_reject ∨ - (1 ≡ aorai_intermediate_state_2 ∧ res ≢ 0) ∨ - 1 ≡ aorai_intermediate_state_0; - ensures 1 ≡ aorai_reject; - - behavior buch_state_aorai_reject_out: - assumes - 0 ≡ aorai_reject ∧ - (0 ≡ aorai_intermediate_state_2 ∨ res ≡ 0) ∧ - 0 ≡ aorai_intermediate_state_0; - ensures 0 ≡ aorai_reject; - */ -void main_post_func(int res) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_reject_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_reject_tmp = aorai_reject; - if (aorai_intermediate_state_0 == 1) aorai_reject_tmp = 1; - else - if (aorai_intermediate_state_2 == 1) { - if (res != 0) aorai_reject_tmp = 1; else goto _LAND; - } - else { - _LAND: ; - if (aorai_reject == 1) aorai_reject_tmp = 1; else aorai_reject_tmp = 0; - } - aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - if (aorai_intermediate_state == 1) Sf_tmp = 1; - else - if (aorai_intermediate_state_2 == 1) - if (res == 0) Sf_tmp = 1; else Sf_tmp = 0; - else Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_reject = aorai_reject_tmp; - return; -} - -/*@ requires - 1 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_reject; - requires 1 ≡ S0 ⇒ c > 0 ∨ c ≤ 0; - ensures 1 ≡ Sf; - - behavior bhv: - assumes c > 0; - ensures \result ≡ 0; - - behavior aorai_acceptance: - ensures 1 ≡ Sf; - - behavior Buchi_property_behavior: - ensures 1 ≡ Sf ∨ 0 ≡ Sf; - ensures 1 ≡ aorai_reject ∨ 0 ≡ aorai_reject; - ensures - 0 ≡ S0 ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ 0 ≡ aorai_intermediate_state_2; - ensures 1 ≡ Sf ∨ 1 ≡ aorai_reject; - */ -int main(int c) -{ - int __retres; - main_pre_func(c); - if (c <= 0) f(); - __retres = 0; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/loop_bts1050.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/loop_bts1050.res.oracle deleted file mode 100644 index 8251302b8c97a827a9bf3bf6aa276d0e182b10e7..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/loop_bts1050.res.oracle +++ /dev/null @@ -1,753 +0,0 @@ -[kernel] Parsing tests/aorai/loop_bts1050.i (no preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_loop_bts10500.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_f_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_f_post_func_post_2 : Valid -[wp] [Qed] Goal typed_f_post_func_post : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_2_in_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_3_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_f_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part18 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part17 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part16 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_1_in_1_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_1_in_1_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_1_out_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_3_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_g_post_func_post_2 : Valid -[wp] [Qed] Goal typed_g_post_func_post : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_0_in_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_3_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_g_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_g_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_g_pre_func_post : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_3_in_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_3_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part17 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_0_out____ : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Sf_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_3_out____ : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_2_out____ : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_1_out____ : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_3_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_f = 2, - op_g = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int S0 = 1; */ -/*@ ghost int Sf = 0; */ -/*@ ghost int aorai_intermediate_state = 0; */ -/*@ ghost int aorai_intermediate_state_0 = 0; */ -/*@ ghost int aorai_intermediate_state_1 = 0; */ -/*@ ghost int aorai_intermediate_state_2 = 0; */ -/*@ ghost int aorai_intermediate_state_3 = 0; */ -/*@ ghost int aorai_counter = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_counter, aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_in_0: - assumes 1 ≡ aorai_intermediate_state_0 ∧ aorai_counter < 5; - ensures 1 ≡ aorai_intermediate_state_1; - ensures aorai_counter ≡ \old(aorai_counter)+1; - - behavior buch_state_aorai_intermediate_state_1_in_1: - assumes 1 ≡ aorai_intermediate_state; - ensures 1 ≡ aorai_intermediate_state_1; - ensures aorai_counter ≡ 1; - - behavior buch_state_aorai_intermediate_state_1_out: - assumes - (0 ≡ aorai_intermediate_state_0 ∨ ¬(aorai_counter < 5)) ∧ - 0 ≡ aorai_intermediate_state; - ensures 0 ≡ aorai_intermediate_state_1; - ensures aorai_counter ≡ \old(aorai_counter); - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_out: - ensures 0 ≡ aorai_intermediate_state_3; - */ -void f_pre_func(void) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_f; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - aorai_intermediate_state_3_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - if (aorai_intermediate_state_0 == 1) - if (aorai_counter < 5) aorai_counter ++; - if (aorai_intermediate_state == 1) aorai_counter = 1; - if (aorai_intermediate_state == 1) aorai_intermediate_state_1_tmp = 1; - else - if (aorai_intermediate_state_0 == 1) - if (aorai_counter < 5) aorai_intermediate_state_1_tmp = 1; - else aorai_intermediate_state_1_tmp = 0; - else aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - 1 ≡ aorai_intermediate_state_1 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧ - 0 ≡ aorai_intermediate_state ∧ 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_in: - assumes 1 ≡ aorai_intermediate_state_1; - ensures 1 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_2_out: - assumes 0 ≡ aorai_intermediate_state_1; - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_out: - ensures 0 ≡ aorai_intermediate_state_3; - */ -void f_post_func(void) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_f; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - aorai_intermediate_state_3_tmp = 0; - if (aorai_intermediate_state_1 == 1) aorai_intermediate_state_2_tmp = 1; - else aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - (1 ≡ aorai_intermediate_state ∨ 1 ≡ aorai_intermediate_state_0) ∧ - 0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - requires 1 ≡ aorai_intermediate_state_0 ⇒ aorai_counter < 5; - requires - 0 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state_0; - requires - 1 ≡ aorai_intermediate_state_0 ∨ 0 ≡ aorai_intermediate_state_0; - requires - 1 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state; - - behavior Buchi_property_behavior: - ensures - 0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ 0 ≡ aorai_intermediate_state_3; - ensures 1 ≡ aorai_intermediate_state_2; - ensures - \at(1 ≡ aorai_intermediate_state_0,Pre) ∧ - 1 ≡ aorai_intermediate_state_2 ⇒ - aorai_counter ≡ \at(aorai_counter,Pre)+1; - ensures - \at(1 ≡ aorai_intermediate_state,Pre) ∧ - 1 ≡ aorai_intermediate_state_2 ⇒ aorai_counter ≡ 1; - */ -void f(void) -{ - f_pre_func(); - f_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_g; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_in: - assumes 1 ≡ aorai_intermediate_state_2; - ensures 1 ≡ aorai_intermediate_state_3; - - behavior buch_state_aorai_intermediate_state_3_out: - assumes 0 ≡ aorai_intermediate_state_2; - ensures 0 ≡ aorai_intermediate_state_3; - */ -void g_pre_func(void) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_g; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - if (aorai_intermediate_state_2 == 1) aorai_intermediate_state_3_tmp = 1; - else aorai_intermediate_state_3_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - 1 ≡ aorai_intermediate_state_3 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧ - 0 ≡ aorai_intermediate_state ∧ 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ 0 ≡ aorai_intermediate_state_2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_g; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_in: - assumes 1 ≡ aorai_intermediate_state_3; - ensures 1 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_0_out: - assumes 0 ≡ aorai_intermediate_state_3; - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_out: - ensures 0 ≡ aorai_intermediate_state_3; - */ -void g_post_func(void) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_g; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - aorai_intermediate_state_3_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - if (aorai_intermediate_state_3 == 1) aorai_intermediate_state_0_tmp = 1; - else aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - 1 ≡ aorai_intermediate_state_2 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧ - 0 ≡ aorai_intermediate_state ∧ 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ 0 ≡ aorai_intermediate_state_3; - - behavior Buchi_property_behavior: - ensures - 0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - ensures 1 ≡ aorai_intermediate_state_0; - */ -void g(void) -{ - g_pre_func(); - g_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_in: - assumes 1 ≡ S0; - ensures 1 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_out: - assumes 0 ≡ S0; - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_out: - ensures 0 ≡ aorai_intermediate_state_3; - */ -void main_pre_func(int c) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - aorai_intermediate_state_3_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - if (S0 == 1) aorai_intermediate_state_tmp = 1; - else aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - (1 ≡ aorai_intermediate_state ∨ 1 ≡ aorai_intermediate_state_0) ∧ - 0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_in: - assumes - 1 ≡ aorai_intermediate_state_0 ∨ 1 ≡ aorai_intermediate_state; - ensures 1 ≡ Sf; - - behavior buch_state_Sf_out: - assumes - 0 ≡ aorai_intermediate_state_0 ∧ 0 ≡ aorai_intermediate_state; - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_out: - ensures 0 ≡ aorai_intermediate_state_3; - */ -void main_post_func(int res) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - aorai_intermediate_state_3_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - if (aorai_intermediate_state == 1) Sf_tmp = 1; - else - if (aorai_intermediate_state_0 == 1) Sf_tmp = 1; else Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - 1 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - - behavior aorai_acceptance: - ensures 1 ≡ Sf; - - behavior Buchi_property_behavior: - ensures - 0 ≡ S0 ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - ensures 1 ≡ Sf; - ensures - \at(1 ≡ S0,Pre) ∧ 1 ≡ Sf ⇒ - (1 ≤ aorai_counter ≤ 5) ∨ - aorai_counter ≡ \at(aorai_counter,Pre)+0; - */ -int main(int c) -{ - int aorai_Loop_Init_37; - int __retres; - main_pre_func(c); - if (c < 0) c = 0; - if (c > 0) c = 5; - /*@ ghost aorai_Loop_Init_37 = 1; */ - aorai_loop_37: - /*@ loop invariant Aorai: 0 ≡ S0; - loop invariant Aorai: 0 ≡ Sf; - loop invariant - Aorai: - 1 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state; - loop invariant - Aorai: - 1 ≡ aorai_intermediate_state_0 ∨ - 0 ≡ aorai_intermediate_state_0; - loop invariant Aorai: 0 ≡ aorai_intermediate_state_1; - loop invariant Aorai: 0 ≡ aorai_intermediate_state_2; - loop invariant Aorai: 0 ≡ aorai_intermediate_state_3; - loop invariant - Aorai: - 1 ≡ aorai_intermediate_state ∨ - 1 ≡ aorai_intermediate_state_0; - loop invariant - Aorai: - aorai_Loop_Init_37 ≢ 0 ⇒ - \at(1 ≡ S0,Pre) ⇒ 0 ≡ aorai_intermediate_state_0; - loop invariant - Aorai: aorai_Loop_Init_37 ≡ 0 ⇒ 0 ≡ aorai_intermediate_state; - loop invariant - Aorai: - \at(1 ≡ aorai_intermediate_state,aorai_loop_37) ∧ - 1 ≡ aorai_intermediate_state_0 ⇒ 1 ≤ aorai_counter ≤ 5; - */ - while (1) { - if (! c) goto while_0_break; - /*@ ghost aorai_Loop_Init_37 = 0; */ - f(); - g(); - c --; - } - while_0_break: ; - __retres = 0; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/not_prm.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/not_prm.res.oracle deleted file mode 100644 index 4d9c5febd4bf309268f76ad1db7fba72b5c9bff5..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/not_prm.res.oracle +++ /dev/null @@ -1,120 +0,0 @@ -[kernel] Parsing tests/aorai/not_prm.i (no preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_not_prm0.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_f_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_f_post_func_post_2 : Valid -[wp] [Qed] Goal typed_f_post_func_post : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_Sf_in_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_f_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_Sf_in_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_S0_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_f = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_f; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int S0 = 1; */ -/*@ ghost int Sf = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_in: - assumes 1 ≡ S0 ∧ x ≥ 4; - ensures 1 ≡ Sf; - - behavior buch_state_Sf_out: - assumes 0 ≡ S0 ∨ ¬(x ≥ 4); - ensures 0 ≡ Sf; - */ -void f_pre_func(int x) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_f; - S0_tmp = S0; - Sf_tmp = Sf; - if (S0 == 1) - if (x >= 4) Sf_tmp = 1; else Sf_tmp = 0; - else Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - return; -} - -/*@ requires 1 ≡ Sf ∧ 0 ≡ S0; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_in: - assumes 1 ≡ Sf; - ensures 1 ≡ Sf; - - behavior buch_state_Sf_out: - assumes 0 ≡ Sf; - ensures 0 ≡ Sf; - */ -void f_post_func(int res) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_f; - S0_tmp = S0; - Sf_tmp = Sf; - if (Sf == 1) Sf_tmp = 1; else Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - return; -} - -/*@ requires 1 ≡ S0 ∧ 0 ≡ Sf; - requires 1 ≡ S0 ⇒ x ≥ 4; - - behavior aorai_acceptance: - ensures 1 ≡ Sf; - - behavior Buchi_property_behavior: - ensures 0 ≡ S0; - ensures 1 ≡ Sf; - */ -int f(int x) -{ - f_pre_func(x); - f_post_func(x); - return x; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/other.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/other.res.oracle deleted file mode 100644 index e3f9de9e5215c71c449f41cee15e94154ef80b2f..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/other.res.oracle +++ /dev/null @@ -1,796 +0,0 @@ -[kernel] Parsing tests/aorai/other.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_other0.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_f_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_f_post_func_post_2 : Valid -[wp] [Qed] Goal typed_f_post_func_post : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_init_in_post : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part17 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_last_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_last_in_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_init_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_step1_out_post : Valid -[wp] [Alt-Ergo] Goal typed_f_post_func_buch_state_step1_in_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_f_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_init_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_init_in_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part16 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_step1_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_last_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_last_in_post : Valid -[wp] [Alt-Ergo] Goal typed_f_pre_func_buch_state_step1_in_post : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_g_post_func_post_2 : Valid -[wp] [Qed] Goal typed_g_post_func_post : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_init_in_post : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part17 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_last_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_last_in_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_init_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_step1_out_post : Valid -[wp] [Alt-Ergo] Goal typed_g_post_func_buch_state_step1_in_post : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_g_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_g_pre_func_post : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_init_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_init_in_post : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part16 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_step1_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_last_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_last_in_post : Valid -[wp] [Alt-Ergo] Goal typed_g_pre_func_buch_state_step1_in_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_init_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part17 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_last_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_last_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_step1_out_post : Valid -[wp] [Alt-Ergo] Goal typed_main_post_func_buch_state_step1_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_init_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_init_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part8 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_step1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_last_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_f = 2, - op_g = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -int x = 0; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int init = 1; */ -/*@ ghost int last = 0; */ -/*@ ghost int step1 = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, init, last, step1; - - behavior buch_state_init_in: - assumes (1 ≡ last ∧ x ≡ 4) ∨ (1 ≡ init ∧ x ≢ 3); - ensures 1 ≡ init; - - behavior buch_state_init_out: - assumes (0 ≡ last ∨ ¬(x ≡ 4)) ∧ (0 ≡ init ∨ ¬(x ≢ 3)); - ensures 0 ≡ init; - - behavior buch_state_last_in: - assumes - (1 ≡ step1 ∧ x ≡ 4) ∨ (1 ≡ last ∧ x ≢ 4 ∧ x ≢ 3); - ensures 1 ≡ last; - - behavior buch_state_last_out: - assumes - (0 ≡ step1 ∨ ¬(x ≡ 4)) ∧ - (0 ≡ last ∨ ¬(x ≢ 4 ∧ x ≢ 3)); - ensures 0 ≡ last; - - behavior buch_state_step1_in: - assumes - (1 ≡ step1 ∧ x ≢ 4) ∨ (1 ≡ last ∧ x ≡ 3) ∨ - (1 ≡ init ∧ x ≡ 3); - ensures 1 ≡ step1; - - behavior buch_state_step1_out: - assumes - (0 ≡ step1 ∨ ¬(x ≢ 4)) ∧ (0 ≡ last ∨ ¬(x ≡ 3)) ∧ - (0 ≡ init ∨ ¬(x ≡ 3)); - ensures 0 ≡ step1; - */ -void f_pre_func(void) -{ - /*@ ghost int init_tmp; */ - /*@ ghost int last_tmp; */ - /*@ ghost int step1_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_f; - init_tmp = init; - last_tmp = last; - step1_tmp = step1; - if (init == 1) { - if (x == 3) step1_tmp = 1; else goto _LAND_0; - } - else { - _LAND_0: ; - if (last == 1) { - if (x == 3) step1_tmp = 1; else goto _LAND; - } - else { - _LAND: ; - if (step1 == 1) - if (x != 4) step1_tmp = 1; else step1_tmp = 0; - else step1_tmp = 0; - } - } - if (last == 1) { - if (x != 4) { - if (x != 3) last_tmp = 1; else goto _LAND_1; - } - else goto _LAND_1; - } - else { - _LAND_1: ; - if (step1 == 1) - if (x == 4) last_tmp = 1; else last_tmp = 0; - else last_tmp = 0; - } - if (init == 1) { - if (x != 3) init_tmp = 1; else goto _LAND_2; - } - else { - _LAND_2: ; - if (last == 1) - if (x == 4) init_tmp = 1; else init_tmp = 0; - else init_tmp = 0; - } - init = init_tmp; - last = last_tmp; - step1 = step1_tmp; - return; -} - -/*@ requires 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1; - requires 1 ≡ last ⇒ x ≡ 4 ∨ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 3; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, init, last, step1; - - behavior buch_state_init_in: - assumes (1 ≡ last ∧ x ≡ 4) ∨ (1 ≡ init ∧ x ≢ 3); - ensures 1 ≡ init; - - behavior buch_state_init_out: - assumes (0 ≡ last ∨ ¬(x ≡ 4)) ∧ (0 ≡ init ∨ ¬(x ≢ 3)); - ensures 0 ≡ init; - - behavior buch_state_last_in: - assumes - (1 ≡ step1 ∧ x ≡ 4) ∨ (1 ≡ last ∧ x ≢ 4 ∧ x ≢ 3); - ensures 1 ≡ last; - - behavior buch_state_last_out: - assumes - (0 ≡ step1 ∨ ¬(x ≡ 4)) ∧ - (0 ≡ last ∨ ¬(x ≢ 4 ∧ x ≢ 3)); - ensures 0 ≡ last; - - behavior buch_state_step1_in: - assumes - (1 ≡ step1 ∧ x ≢ 4) ∨ (1 ≡ last ∧ x ≡ 3) ∨ - (1 ≡ init ∧ x ≡ 3); - ensures 1 ≡ step1; - - behavior buch_state_step1_out: - assumes - (0 ≡ step1 ∨ ¬(x ≢ 4)) ∧ (0 ≡ last ∨ ¬(x ≡ 3)) ∧ - (0 ≡ init ∨ ¬(x ≡ 3)); - ensures 0 ≡ step1; - */ -void f_post_func(void) -{ - /*@ ghost int init_tmp; */ - /*@ ghost int last_tmp; */ - /*@ ghost int step1_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_f; - init_tmp = init; - last_tmp = last; - step1_tmp = step1; - if (init == 1) { - if (x == 3) step1_tmp = 1; else goto _LAND_0; - } - else { - _LAND_0: ; - if (last == 1) { - if (x == 3) step1_tmp = 1; else goto _LAND; - } - else { - _LAND: ; - if (step1 == 1) - if (x != 4) step1_tmp = 1; else step1_tmp = 0; - else step1_tmp = 0; - } - } - if (last == 1) { - if (x != 4) { - if (x != 3) last_tmp = 1; else goto _LAND_1; - } - else goto _LAND_1; - } - else { - _LAND_1: ; - if (step1 == 1) - if (x == 4) last_tmp = 1; else last_tmp = 0; - else last_tmp = 0; - } - if (init == 1) { - if (x != 3) init_tmp = 1; else goto _LAND_2; - } - else { - _LAND_2: ; - if (last == 1) - if (x == 4) init_tmp = 1; else init_tmp = 0; - else init_tmp = 0; - } - init = init_tmp; - last = last_tmp; - step1 = step1_tmp; - return; -} - -/*@ requires 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1; - requires 1 ≡ last ⇒ x ≡ 4 ∨ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 3; - requires 1 ≡ step1 ∨ 0 ≡ step1; - requires 1 ≡ last ∨ 0 ≡ last; - requires 1 ≡ init ∨ 0 ≡ init; - - behavior Buchi_behavior_in_0: - assumes (1 ≡ last ∧ x ≡ 4) ∨ (1 ≡ init ∧ x ≢ 3); - ensures - (1 ≡ init ⇒ x ≢ 3 ∨ x ≡ 4) ∧ - (1 ≡ last ⇒ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 4) ∧ - (1 ≡ step1 ⇒ x ≡ 3 ∨ x ≢ 4); - ensures 1 ≡ init ∨ 0 ≡ init; - ensures 1 ≡ step1 ∨ 0 ≡ step1; - ensures 1 ≡ init ∨ 1 ≡ step1; - - behavior Buchi_behavior_in_1: - assumes - (1 ≡ step1 ∧ x ≡ 4) ∨ (1 ≡ last ∧ x ≢ 4 ∧ x ≢ 3); - ensures - (1 ≡ init ⇒ x ≢ 3 ∨ x ≡ 4) ∧ - (1 ≡ last ⇒ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 4) ∧ - (1 ≡ step1 ⇒ x ≡ 3 ∨ x ≢ 4); - ensures 1 ≡ init ∨ 0 ≡ init; - ensures 1 ≡ last ∨ 0 ≡ last; - ensures 1 ≡ step1 ∨ 0 ≡ step1; - ensures 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1; - - behavior Buchi_behavior_in_2: - assumes - (1 ≡ step1 ∧ x ≢ 4) ∨ (1 ≡ last ∧ x ≡ 3) ∨ - (1 ≡ init ∧ x ≡ 3); - ensures - (1 ≡ init ⇒ x ≢ 3 ∨ x ≡ 4) ∧ - (1 ≡ last ⇒ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 4) ∧ - (1 ≡ step1 ⇒ x ≡ 3 ∨ x ≢ 4); - ensures 1 ≡ last ∨ 0 ≡ last; - ensures 1 ≡ step1 ∨ 0 ≡ step1; - ensures 1 ≡ last ∨ 1 ≡ step1; - - behavior Buchi_behavior_out_0: - assumes - (0 ≡ last ∨ (x ≡ 3 ∧ x ≢ 4)) ∧ - (0 ≡ step1 ∨ x ≢ 4) ∧ (0 ≡ init ∨ x ≡ 3); - ensures 0 ≡ init; - - behavior Buchi_behavior_out_1: - assumes - 0 ≡ step1 ∧ (0 ≡ init ∨ x ≢ 3) ∧ - (0 ≡ last ∨ (x ≢ 3 ∧ x ≡ 4)); - ensures 0 ≡ last; - - behavior Buchi_behavior_out_2: - assumes 0 ≡ last ∧ 0 ≡ init ∧ 0 ≡ step1; - ensures 0 ≡ step1; - */ -void f(void) -{ - f_pre_func(); - x = 3; - f_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_g; - assigns aorai_CurOpStatus, aorai_CurOperation, init, last, step1; - - behavior buch_state_init_in: - assumes (1 ≡ last ∧ x ≡ 4) ∨ (1 ≡ init ∧ x ≢ 3); - ensures 1 ≡ init; - - behavior buch_state_init_out: - assumes (0 ≡ last ∨ ¬(x ≡ 4)) ∧ (0 ≡ init ∨ ¬(x ≢ 3)); - ensures 0 ≡ init; - - behavior buch_state_last_in: - assumes - (1 ≡ step1 ∧ x ≡ 4) ∨ (1 ≡ last ∧ x ≢ 4 ∧ x ≢ 3); - ensures 1 ≡ last; - - behavior buch_state_last_out: - assumes - (0 ≡ step1 ∨ ¬(x ≡ 4)) ∧ - (0 ≡ last ∨ ¬(x ≢ 4 ∧ x ≢ 3)); - ensures 0 ≡ last; - - behavior buch_state_step1_in: - assumes - (1 ≡ step1 ∧ x ≢ 4) ∨ (1 ≡ last ∧ x ≡ 3) ∨ - (1 ≡ init ∧ x ≡ 3); - ensures 1 ≡ step1; - - behavior buch_state_step1_out: - assumes - (0 ≡ step1 ∨ ¬(x ≢ 4)) ∧ (0 ≡ last ∨ ¬(x ≡ 3)) ∧ - (0 ≡ init ∨ ¬(x ≡ 3)); - ensures 0 ≡ step1; - */ -void g_pre_func(void) -{ - /*@ ghost int init_tmp; */ - /*@ ghost int last_tmp; */ - /*@ ghost int step1_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_g; - init_tmp = init; - last_tmp = last; - step1_tmp = step1; - if (init == 1) { - if (x == 3) step1_tmp = 1; else goto _LAND_0; - } - else { - _LAND_0: ; - if (last == 1) { - if (x == 3) step1_tmp = 1; else goto _LAND; - } - else { - _LAND: ; - if (step1 == 1) - if (x != 4) step1_tmp = 1; else step1_tmp = 0; - else step1_tmp = 0; - } - } - if (last == 1) { - if (x != 4) { - if (x != 3) last_tmp = 1; else goto _LAND_1; - } - else goto _LAND_1; - } - else { - _LAND_1: ; - if (step1 == 1) - if (x == 4) last_tmp = 1; else last_tmp = 0; - else last_tmp = 0; - } - if (init == 1) { - if (x != 3) init_tmp = 1; else goto _LAND_2; - } - else { - _LAND_2: ; - if (last == 1) - if (x == 4) init_tmp = 1; else init_tmp = 0; - else init_tmp = 0; - } - init = init_tmp; - last = last_tmp; - step1 = step1_tmp; - return; -} - -/*@ requires 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1; - requires 1 ≡ last ⇒ x ≡ 4 ∨ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 3; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_g; - assigns aorai_CurOpStatus, aorai_CurOperation, init, last, step1; - - behavior buch_state_init_in: - assumes (1 ≡ last ∧ x ≡ 4) ∨ (1 ≡ init ∧ x ≢ 3); - ensures 1 ≡ init; - - behavior buch_state_init_out: - assumes (0 ≡ last ∨ ¬(x ≡ 4)) ∧ (0 ≡ init ∨ ¬(x ≢ 3)); - ensures 0 ≡ init; - - behavior buch_state_last_in: - assumes - (1 ≡ step1 ∧ x ≡ 4) ∨ (1 ≡ last ∧ x ≢ 4 ∧ x ≢ 3); - ensures 1 ≡ last; - - behavior buch_state_last_out: - assumes - (0 ≡ step1 ∨ ¬(x ≡ 4)) ∧ - (0 ≡ last ∨ ¬(x ≢ 4 ∧ x ≢ 3)); - ensures 0 ≡ last; - - behavior buch_state_step1_in: - assumes - (1 ≡ step1 ∧ x ≢ 4) ∨ (1 ≡ last ∧ x ≡ 3) ∨ - (1 ≡ init ∧ x ≡ 3); - ensures 1 ≡ step1; - - behavior buch_state_step1_out: - assumes - (0 ≡ step1 ∨ ¬(x ≢ 4)) ∧ (0 ≡ last ∨ ¬(x ≡ 3)) ∧ - (0 ≡ init ∨ ¬(x ≡ 3)); - ensures 0 ≡ step1; - */ -void g_post_func(void) -{ - /*@ ghost int init_tmp; */ - /*@ ghost int last_tmp; */ - /*@ ghost int step1_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_g; - init_tmp = init; - last_tmp = last; - step1_tmp = step1; - if (init == 1) { - if (x == 3) step1_tmp = 1; else goto _LAND_0; - } - else { - _LAND_0: ; - if (last == 1) { - if (x == 3) step1_tmp = 1; else goto _LAND; - } - else { - _LAND: ; - if (step1 == 1) - if (x != 4) step1_tmp = 1; else step1_tmp = 0; - else step1_tmp = 0; - } - } - if (last == 1) { - if (x != 4) { - if (x != 3) last_tmp = 1; else goto _LAND_1; - } - else goto _LAND_1; - } - else { - _LAND_1: ; - if (step1 == 1) - if (x == 4) last_tmp = 1; else last_tmp = 0; - else last_tmp = 0; - } - if (init == 1) { - if (x != 3) init_tmp = 1; else goto _LAND_2; - } - else { - _LAND_2: ; - if (last == 1) - if (x == 4) init_tmp = 1; else init_tmp = 0; - else init_tmp = 0; - } - init = init_tmp; - last = last_tmp; - step1 = step1_tmp; - return; -} - -/*@ requires 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1; - requires 1 ≡ last ⇒ x ≡ 4 ∨ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 3; - requires 1 ≡ step1 ∨ 0 ≡ step1; - requires 1 ≡ last ∨ 0 ≡ last; - requires 1 ≡ init ∨ 0 ≡ init; - - behavior Buchi_behavior_in_0: - assumes (1 ≡ last ∧ x ≡ 4) ∨ (1 ≡ init ∧ x ≢ 3); - ensures - (1 ≡ init ⇒ x ≢ 3 ∨ x ≡ 4) ∧ - (1 ≡ last ⇒ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 4) ∧ - (1 ≡ step1 ⇒ x ≡ 3 ∨ x ≢ 4); - ensures 1 ≡ init ∨ 0 ≡ init; - ensures 1 ≡ step1 ∨ 0 ≡ step1; - ensures 1 ≡ init ∨ 1 ≡ step1; - - behavior Buchi_behavior_in_1: - assumes - (1 ≡ step1 ∧ x ≡ 4) ∨ (1 ≡ last ∧ x ≢ 4 ∧ x ≢ 3); - ensures - (1 ≡ init ⇒ x ≢ 3 ∨ x ≡ 4) ∧ - (1 ≡ last ⇒ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 4) ∧ - (1 ≡ step1 ⇒ x ≡ 3 ∨ x ≢ 4); - ensures 1 ≡ init ∨ 0 ≡ init; - ensures 1 ≡ last ∨ 0 ≡ last; - ensures 1 ≡ step1 ∨ 0 ≡ step1; - ensures 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1; - - behavior Buchi_behavior_in_2: - assumes - (1 ≡ step1 ∧ x ≢ 4) ∨ (1 ≡ last ∧ x ≡ 3) ∨ - (1 ≡ init ∧ x ≡ 3); - ensures - (1 ≡ init ⇒ x ≢ 3 ∨ x ≡ 4) ∧ - (1 ≡ last ⇒ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 4) ∧ - (1 ≡ step1 ⇒ x ≡ 3 ∨ x ≢ 4); - ensures 1 ≡ last ∨ 0 ≡ last; - ensures 1 ≡ step1 ∨ 0 ≡ step1; - ensures 1 ≡ last ∨ 1 ≡ step1; - - behavior Buchi_behavior_out_0: - assumes - (0 ≡ last ∨ (x ≡ 3 ∧ x ≢ 4)) ∧ - (0 ≡ step1 ∨ x ≢ 4) ∧ (0 ≡ init ∨ x ≡ 3); - ensures 0 ≡ init; - - behavior Buchi_behavior_out_1: - assumes - 0 ≡ step1 ∧ (0 ≡ init ∨ x ≢ 3) ∧ - (0 ≡ last ∨ (x ≢ 3 ∧ x ≡ 4)); - ensures 0 ≡ last; - - behavior Buchi_behavior_out_2: - assumes 0 ≡ last ∧ 0 ≡ init ∧ 0 ≡ step1; - ensures 0 ≡ step1; - */ -void g(void) -{ - g_pre_func(); - x = 4; - g_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, init, last, step1; - - behavior buch_state_init_in: - assumes 1 ≡ init ∧ x ≢ 3; - ensures 1 ≡ init; - - behavior buch_state_init_out: - assumes 0 ≡ init ∨ ¬(x ≢ 3); - ensures 0 ≡ init; - - behavior buch_state_last_out: - ensures 0 ≡ last; - - behavior buch_state_step1_out: - ensures 0 ≡ step1; - */ -void main_pre_func(void) -{ - /*@ ghost int init_tmp; */ - /*@ ghost int last_tmp; */ - /*@ ghost int step1_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - init_tmp = init; - last_tmp = last; - step1_tmp = step1; - step1_tmp = 0; - last_tmp = 0; - if (init == 1) - if (x != 3) init_tmp = 1; else init_tmp = 0; - else init_tmp = 0; - init = init_tmp; - last = last_tmp; - step1 = step1_tmp; - return; -} - -/*@ requires 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1; - requires 1 ≡ last ⇒ x ≡ 4 ∨ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 3; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, init, last, step1; - - behavior buch_state_init_in: - assumes (1 ≡ last ∧ x ≡ 4) ∨ (1 ≡ init ∧ x ≢ 3); - ensures 1 ≡ init; - - behavior buch_state_init_out: - assumes (0 ≡ last ∨ ¬(x ≡ 4)) ∧ (0 ≡ init ∨ ¬(x ≢ 3)); - ensures 0 ≡ init; - - behavior buch_state_last_in: - assumes - (1 ≡ step1 ∧ x ≡ 4) ∨ (1 ≡ last ∧ x ≢ 4 ∧ x ≢ 3); - ensures 1 ≡ last; - - behavior buch_state_last_out: - assumes - (0 ≡ step1 ∨ ¬(x ≡ 4)) ∧ - (0 ≡ last ∨ ¬(x ≢ 4 ∧ x ≢ 3)); - ensures 0 ≡ last; - - behavior buch_state_step1_in: - assumes - (1 ≡ step1 ∧ x ≢ 4) ∨ (1 ≡ last ∧ x ≡ 3) ∨ - (1 ≡ init ∧ x ≡ 3); - ensures 1 ≡ step1; - - behavior buch_state_step1_out: - assumes - (0 ≡ step1 ∨ ¬(x ≢ 4)) ∧ (0 ≡ last ∨ ¬(x ≡ 3)) ∧ - (0 ≡ init ∨ ¬(x ≡ 3)); - ensures 0 ≡ step1; - */ -void main_post_func(int res) -{ - /*@ ghost int init_tmp; */ - /*@ ghost int last_tmp; */ - /*@ ghost int step1_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - init_tmp = init; - last_tmp = last; - step1_tmp = step1; - if (init == 1) { - if (x == 3) step1_tmp = 1; else goto _LAND_0; - } - else { - _LAND_0: ; - if (last == 1) { - if (x == 3) step1_tmp = 1; else goto _LAND; - } - else { - _LAND: ; - if (step1 == 1) - if (x != 4) step1_tmp = 1; else step1_tmp = 0; - else step1_tmp = 0; - } - } - if (last == 1) { - if (x != 4) { - if (x != 3) last_tmp = 1; else goto _LAND_1; - } - else goto _LAND_1; - } - else { - _LAND_1: ; - if (step1 == 1) - if (x == 4) last_tmp = 1; else last_tmp = 0; - else last_tmp = 0; - } - if (init == 1) { - if (x != 3) init_tmp = 1; else goto _LAND_2; - } - else { - _LAND_2: ; - if (last == 1) - if (x == 4) init_tmp = 1; else init_tmp = 0; - else init_tmp = 0; - } - init = init_tmp; - last = last_tmp; - step1 = step1_tmp; - return; -} - -/*@ requires 1 ≡ init ∧ 0 ≡ last ∧ 0 ≡ step1; - requires 1 ≡ init ⇒ x ≢ 3; - - behavior aorai_acceptance: - ensures 1 ≡ last; - - behavior Buchi_property_behavior: - ensures - (1 ≡ init ⇒ x ≢ 3 ∨ x ≡ 4) ∧ - (1 ≡ last ⇒ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 4) ∧ - (1 ≡ step1 ⇒ x ≡ 3 ∨ x ≢ 4); - ensures 1 ≡ init ∨ 0 ≡ init; - ensures 1 ≡ last ∨ 0 ≡ last; - ensures 1 ≡ step1 ∨ 0 ≡ step1; - ensures \true; - ensures 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1; - */ -int main(void) -{ - main_pre_func(); - f(); - g(); - f(); - g(); - main_post_func(x); - return x; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/seq.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/seq.res.oracle deleted file mode 100644 index c885df01ab6aa381f0739cd8a67c9f6c22b2bd9a..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/seq.res.oracle +++ /dev/null @@ -1,735 +0,0 @@ -[kernel] Parsing tests/aorai/seq.i (no preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_seq0.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_f_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_f_post_func_post_2 : Valid -[wp] [Qed] Goal typed_f_post_func_post : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_0_in_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_3_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_f_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_1_in_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_3_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_g_post_func_post_2 : Valid -[wp] [Qed] Goal typed_g_post_func_post : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_2_in_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_3_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_g_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_g_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_g_pre_func_post : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part18 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part17 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part16 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part19 : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_3_in_1_post_2 : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_3_in_1_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_3_in_2_post_2 : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_3_in_2_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_3_out_post_2 : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_3_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part17 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_0_out____ : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Sf_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_3_out____ : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_2_out____ : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_1_out____ : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_3_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_f = 2, - op_g = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int S0 = 1; */ -/*@ ghost int Sf = 0; */ -/*@ ghost int aorai_intermediate_state = 0; */ -/*@ ghost int aorai_intermediate_state_0 = 0; */ -/*@ ghost int aorai_intermediate_state_1 = 0; */ -/*@ ghost int aorai_intermediate_state_2 = 0; */ -/*@ ghost int aorai_intermediate_state_3 = 0; */ -/*@ ghost int aorai_counter = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_in: - assumes 1 ≡ aorai_intermediate_state; - ensures 1 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_1_out: - assumes 0 ≡ aorai_intermediate_state; - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_out: - ensures 0 ≡ aorai_intermediate_state_3; - */ -void f_pre_func(void) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_f; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - aorai_intermediate_state_3_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - if (aorai_intermediate_state == 1) aorai_intermediate_state_1_tmp = 1; - else aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - 1 ≡ aorai_intermediate_state_1 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧ - 0 ≡ aorai_intermediate_state ∧ 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_in: - assumes 1 ≡ aorai_intermediate_state_1; - ensures 1 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_0_out: - assumes 0 ≡ aorai_intermediate_state_1; - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_out: - ensures 0 ≡ aorai_intermediate_state_3; - */ -void f_post_func(void) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_f; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - aorai_intermediate_state_3_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - if (aorai_intermediate_state_1 == 1) aorai_intermediate_state_0_tmp = 1; - else aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - 1 ≡ aorai_intermediate_state ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧ - 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - - behavior Buchi_property_behavior: - ensures - 0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - ensures 1 ≡ aorai_intermediate_state_0; - */ -void f(void) -{ - f_pre_func(); - f_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_g; - assigns aorai_counter, aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_in_0: - assumes 1 ≡ aorai_intermediate_state_2 ∧ aorai_counter < 2; - ensures 1 ≡ aorai_intermediate_state_3; - ensures aorai_counter ≡ \old(aorai_counter)+1; - - behavior buch_state_aorai_intermediate_state_3_in_1: - assumes 1 ≡ aorai_intermediate_state_0; - ensures 1 ≡ aorai_intermediate_state_3; - ensures aorai_counter ≡ 1; - - behavior buch_state_aorai_intermediate_state_3_in_2: - assumes 1 ≡ aorai_intermediate_state; - ensures 1 ≡ aorai_intermediate_state_3; - ensures aorai_counter ≡ 1; - - behavior buch_state_aorai_intermediate_state_3_out: - assumes - (0 ≡ aorai_intermediate_state_2 ∨ ¬(aorai_counter < 2)) ∧ - 0 ≡ aorai_intermediate_state_0 ∧ 0 ≡ aorai_intermediate_state; - ensures 0 ≡ aorai_intermediate_state_3; - ensures aorai_counter ≡ \old(aorai_counter); - */ -void g_pre_func(void) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_g; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - if (aorai_intermediate_state_2 == 1) - if (aorai_counter < 2) aorai_counter ++; - if (aorai_intermediate_state_0 == 1) aorai_counter = 1; - if (aorai_intermediate_state == 1) aorai_counter = 1; - if (aorai_intermediate_state == 1) aorai_intermediate_state_3_tmp = 1; - else - if (aorai_intermediate_state_0 == 1) aorai_intermediate_state_3_tmp = 1; - else - if (aorai_intermediate_state_2 == 1) - if (aorai_counter < 2) aorai_intermediate_state_3_tmp = 1; - else aorai_intermediate_state_3_tmp = 0; - else aorai_intermediate_state_3_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - 1 ≡ aorai_intermediate_state_3 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧ - 0 ≡ aorai_intermediate_state ∧ 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ 0 ≡ aorai_intermediate_state_2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_g; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_in: - assumes 1 ≡ aorai_intermediate_state_3; - ensures 1 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_2_out: - assumes 0 ≡ aorai_intermediate_state_3; - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_out: - ensures 0 ≡ aorai_intermediate_state_3; - */ -void g_post_func(void) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_g; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - aorai_intermediate_state_3_tmp = 0; - if (aorai_intermediate_state_3 == 1) aorai_intermediate_state_2_tmp = 1; - else aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - (1 ≡ aorai_intermediate_state ∨ 1 ≡ aorai_intermediate_state_0 ∨ - 1 ≡ aorai_intermediate_state_2) ∧ - 0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_3; - requires 1 ≡ aorai_intermediate_state_2 ⇒ aorai_counter < 2; - requires - 0 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state_2; - requires - 0 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state_0; - requires - 0 ≡ aorai_intermediate_state_0 ∨ 0 ≡ aorai_intermediate_state_2; - requires - 1 ≡ aorai_intermediate_state_2 ∨ 0 ≡ aorai_intermediate_state_2; - requires - 1 ≡ aorai_intermediate_state_0 ∨ 0 ≡ aorai_intermediate_state_0; - requires - 1 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state; - - behavior Buchi_property_behavior: - ensures - 0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ 0 ≡ aorai_intermediate_state_3; - ensures 1 ≡ aorai_intermediate_state_2; - ensures - \at(1 ≡ aorai_intermediate_state_2,Pre) ∧ - 1 ≡ aorai_intermediate_state_2 ⇒ - aorai_counter ≡ \at(aorai_counter,Pre)+1; - ensures - \at(1 ≡ aorai_intermediate_state_0,Pre) ∧ - 1 ≡ aorai_intermediate_state_2 ⇒ aorai_counter ≡ 1; - ensures - \at(1 ≡ aorai_intermediate_state,Pre) ∧ - 1 ≡ aorai_intermediate_state_2 ⇒ aorai_counter ≡ 1; - */ -void g(void) -{ - g_pre_func(); - g_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_in: - assumes 1 ≡ S0; - ensures 1 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_out: - assumes 0 ≡ S0; - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_out: - ensures 0 ≡ aorai_intermediate_state_3; - */ -void main_pre_func(int c) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - aorai_intermediate_state_3_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - if (S0 == 1) aorai_intermediate_state_tmp = 1; - else aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - 1 ≡ aorai_intermediate_state_2 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧ - 0 ≡ aorai_intermediate_state ∧ 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ 0 ≡ aorai_intermediate_state_3; - requires 1 ≡ aorai_intermediate_state_2 ⇒ 1 ≤ aorai_counter; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_in: - assumes 1 ≡ aorai_intermediate_state_2 ∧ 1 ≤ aorai_counter; - ensures 1 ≡ Sf; - - behavior buch_state_Sf_out: - assumes 0 ≡ aorai_intermediate_state_2 ∨ ¬(1 ≤ aorai_counter); - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_out: - ensures 0 ≡ aorai_intermediate_state_3; - */ -void main_post_func(int res) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - aorai_intermediate_state_3_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - if (aorai_intermediate_state_2 == 1) - if (1 <= aorai_counter) Sf_tmp = 1; else Sf_tmp = 0; - else Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - 1 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - - behavior aorai_acceptance: - ensures 1 ≡ Sf; - - behavior Buchi_property_behavior: - ensures 1 ≡ Sf ⇒ 1 ≤ aorai_counter; - ensures - 0 ≡ S0 ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - ensures 1 ≡ Sf; - ensures \at(1 ≡ S0,Pre) ∧ 1 ≡ Sf ⇒ 1 ≤ aorai_counter ≤ 2; - */ -int main(int c) -{ - int __retres; - main_pre_func(c); - if (c) f(); - g(); - if (c) g(); - __retres = 0; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/seq_loop.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/seq_loop.res.oracle deleted file mode 100644 index fa97bb7c5ad0fba69131b3c65fb51f1c2954f41a..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/seq_loop.res.oracle +++ /dev/null @@ -1,764 +0,0 @@ -[kernel] Parsing tests/aorai/seq_loop.i (no preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_seq_loop0.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_f_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_f_post_func_post_2 : Valid -[wp] [Qed] Goal typed_f_post_func_post : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_f_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_2_in_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_3_out_post : Valid -[wp] [Qed] Goal typed_f_post_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_f_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_post : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part18 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part17 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part16 : Valid -[wp] [Qed] Goal typed_f_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_1_in_1_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_1_in_1_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_1_out_post_2 : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_3_out_post : Valid -[wp] [Qed] Goal typed_f_pre_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_g_post_func_post_2 : Valid -[wp] [Qed] Goal typed_g_post_func_post : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_g_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_0_in_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_3_out_post : Valid -[wp] [Qed] Goal typed_g_post_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_g_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_g_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_g_pre_func_post : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_3_in_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_g_pre_func_buch_state_aorai_intermediate_state_3_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part17 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_0_out____ : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Sf_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_3_out____ : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_2_out____ : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_1_out____ : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_0_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_3_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_f = 2, - op_g = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int S0 = 1; */ -/*@ ghost int Sf = 0; */ -/*@ ghost int aorai_intermediate_state = 0; */ -/*@ ghost int aorai_intermediate_state_0 = 0; */ -/*@ ghost int aorai_intermediate_state_1 = 0; */ -/*@ ghost int aorai_intermediate_state_2 = 0; */ -/*@ ghost int aorai_intermediate_state_3 = 0; */ -/*@ ghost int aorai_counter = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_counter, aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_in_0: - assumes 1 ≡ aorai_intermediate_state_0 ∧ aorai_counter < 5; - ensures 1 ≡ aorai_intermediate_state_1; - ensures aorai_counter ≡ \old(aorai_counter)+1; - - behavior buch_state_aorai_intermediate_state_1_in_1: - assumes 1 ≡ aorai_intermediate_state; - ensures 1 ≡ aorai_intermediate_state_1; - ensures aorai_counter ≡ 1; - - behavior buch_state_aorai_intermediate_state_1_out: - assumes - (0 ≡ aorai_intermediate_state_0 ∨ ¬(aorai_counter < 5)) ∧ - 0 ≡ aorai_intermediate_state; - ensures 0 ≡ aorai_intermediate_state_1; - ensures aorai_counter ≡ \old(aorai_counter); - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_out: - ensures 0 ≡ aorai_intermediate_state_3; - */ -void f_pre_func(void) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_f; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - aorai_intermediate_state_3_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - if (aorai_intermediate_state_0 == 1) - if (aorai_counter < 5) aorai_counter ++; - if (aorai_intermediate_state == 1) aorai_counter = 1; - if (aorai_intermediate_state == 1) aorai_intermediate_state_1_tmp = 1; - else - if (aorai_intermediate_state_0 == 1) - if (aorai_counter < 5) aorai_intermediate_state_1_tmp = 1; - else aorai_intermediate_state_1_tmp = 0; - else aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - 1 ≡ aorai_intermediate_state_1 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧ - 0 ≡ aorai_intermediate_state ∧ 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_f; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_in: - assumes 1 ≡ aorai_intermediate_state_1; - ensures 1 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_2_out: - assumes 0 ≡ aorai_intermediate_state_1; - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_out: - ensures 0 ≡ aorai_intermediate_state_3; - */ -void f_post_func(void) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_f; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - aorai_intermediate_state_3_tmp = 0; - if (aorai_intermediate_state_1 == 1) aorai_intermediate_state_2_tmp = 1; - else aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - (1 ≡ aorai_intermediate_state ∨ 1 ≡ aorai_intermediate_state_0) ∧ - 0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - requires 1 ≡ aorai_intermediate_state_0 ⇒ aorai_counter < 5; - requires - 0 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state_0; - requires - 1 ≡ aorai_intermediate_state_0 ∨ 0 ≡ aorai_intermediate_state_0; - requires - 1 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state; - - behavior Buchi_property_behavior: - ensures - 0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ 0 ≡ aorai_intermediate_state_3; - ensures 1 ≡ aorai_intermediate_state_2; - ensures - \at(1 ≡ aorai_intermediate_state_0,Pre) ∧ - 1 ≡ aorai_intermediate_state_2 ⇒ - aorai_counter ≡ \at(aorai_counter,Pre)+1; - ensures - \at(1 ≡ aorai_intermediate_state,Pre) ∧ - 1 ≡ aorai_intermediate_state_2 ⇒ aorai_counter ≡ 1; - */ -void f(void) -{ - f_pre_func(); - f_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_g; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_in: - assumes 1 ≡ aorai_intermediate_state_2; - ensures 1 ≡ aorai_intermediate_state_3; - - behavior buch_state_aorai_intermediate_state_3_out: - assumes 0 ≡ aorai_intermediate_state_2; - ensures 0 ≡ aorai_intermediate_state_3; - */ -void g_pre_func(void) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_g; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - if (aorai_intermediate_state_2 == 1) aorai_intermediate_state_3_tmp = 1; - else aorai_intermediate_state_3_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - 1 ≡ aorai_intermediate_state_3 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧ - 0 ≡ aorai_intermediate_state ∧ 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ 0 ≡ aorai_intermediate_state_2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_g; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_in: - assumes 1 ≡ aorai_intermediate_state_3; - ensures 1 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_0_out: - assumes 0 ≡ aorai_intermediate_state_3; - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_out: - ensures 0 ≡ aorai_intermediate_state_3; - */ -void g_post_func(void) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_g; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - aorai_intermediate_state_3_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - if (aorai_intermediate_state_3 == 1) aorai_intermediate_state_0_tmp = 1; - else aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - 1 ≡ aorai_intermediate_state_2 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧ - 0 ≡ aorai_intermediate_state ∧ 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ 0 ≡ aorai_intermediate_state_3; - - behavior Buchi_property_behavior: - ensures - 0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - ensures 1 ≡ aorai_intermediate_state_0; - */ -void g(void) -{ - g_pre_func(); - g_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_in: - assumes 1 ≡ S0; - ensures 1 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_out: - assumes 0 ≡ S0; - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_out: - ensures 0 ≡ aorai_intermediate_state_3; - */ -void main_pre_func(int c) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - aorai_intermediate_state_3_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - if (S0 == 1) aorai_intermediate_state_tmp = 1; - else aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - (1 ≡ aorai_intermediate_state ∨ 1 ≡ aorai_intermediate_state_0) ∧ - 0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_in: - assumes - 1 ≡ aorai_intermediate_state_0 ∨ 1 ≡ aorai_intermediate_state; - ensures 1 ≡ Sf; - - behavior buch_state_Sf_out: - assumes - 0 ≡ aorai_intermediate_state_0 ∧ 0 ≡ aorai_intermediate_state; - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_0_out: - ensures 0 ≡ aorai_intermediate_state_0; - - behavior buch_state_aorai_intermediate_state_1_out: - ensures 0 ≡ aorai_intermediate_state_1; - - behavior buch_state_aorai_intermediate_state_2_out: - ensures 0 ≡ aorai_intermediate_state_2; - - behavior buch_state_aorai_intermediate_state_3_out: - ensures 0 ≡ aorai_intermediate_state_3; - */ -void main_post_func(int res) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - /*@ ghost int aorai_intermediate_state_0_tmp; */ - /*@ ghost int aorai_intermediate_state_1_tmp; */ - /*@ ghost int aorai_intermediate_state_2_tmp; */ - /*@ ghost int aorai_intermediate_state_3_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_0_tmp = aorai_intermediate_state_0; - aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; - aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; - aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - aorai_intermediate_state_3_tmp = 0; - aorai_intermediate_state_2_tmp = 0; - aorai_intermediate_state_1_tmp = 0; - aorai_intermediate_state_0_tmp = 0; - aorai_intermediate_state_tmp = 0; - if (aorai_intermediate_state == 1) Sf_tmp = 1; - else - if (aorai_intermediate_state_0 == 1) Sf_tmp = 1; else Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - aorai_intermediate_state_0 = aorai_intermediate_state_0_tmp; - aorai_intermediate_state_1 = aorai_intermediate_state_1_tmp; - aorai_intermediate_state_2 = aorai_intermediate_state_2_tmp; - aorai_intermediate_state_3 = aorai_intermediate_state_3_tmp; - return; -} - -/*@ requires - 1 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state, aorai_intermediate_state_0, - aorai_intermediate_state_1, aorai_intermediate_state_2, - aorai_intermediate_state_3, aorai_counter; - - behavior aorai_acceptance: - ensures 1 ≡ Sf; - - behavior Buchi_property_behavior: - ensures - 0 ≡ S0 ∧ 0 ≡ aorai_intermediate_state ∧ - 0 ≡ aorai_intermediate_state_0 ∧ - 0 ≡ aorai_intermediate_state_1 ∧ - 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; - ensures 1 ≡ Sf; - ensures - \at(1 ≡ S0,Pre) ∧ 1 ≡ Sf ⇒ - (1 ≤ aorai_counter ≤ 5) ∨ - aorai_counter ≡ \at(aorai_counter,Pre)+0; - */ -int main(int c) -{ - int aorai_Loop_Init_39; - int __retres; - main_pre_func(c); - if (c < 0) c = 0; - if (c > 5) c = 5; - /*@ assert 0 ≤ c ≤ 5; */ ; - /*@ ghost aorai_Loop_Init_39 = 1; */ - aorai_loop_39: - /*@ loop invariant Aorai: 0 ≡ S0; - loop invariant Aorai: 0 ≡ Sf; - loop invariant - Aorai: - 1 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state; - loop invariant - Aorai: - 1 ≡ aorai_intermediate_state_0 ∨ - 0 ≡ aorai_intermediate_state_0; - loop invariant Aorai: 0 ≡ aorai_intermediate_state_1; - loop invariant Aorai: 0 ≡ aorai_intermediate_state_2; - loop invariant Aorai: 0 ≡ aorai_intermediate_state_3; - loop invariant - Aorai: - 1 ≡ aorai_intermediate_state ∨ - 1 ≡ aorai_intermediate_state_0; - loop invariant - Aorai: - aorai_Loop_Init_39 ≢ 0 ⇒ - \at(1 ≡ S0,Pre) ⇒ 0 ≡ aorai_intermediate_state_0; - loop invariant - Aorai: aorai_Loop_Init_39 ≡ 0 ⇒ 0 ≡ aorai_intermediate_state; - loop invariant - Aorai: - \at(1 ≡ aorai_intermediate_state,aorai_loop_39) ∧ - 1 ≡ aorai_intermediate_state_0 ⇒ 1 ≤ aorai_counter ≤ 5; - loop assigns c, aorai_Loop_Init_39, aorai_CurOpStatus, - aorai_CurOperation, S0, Sf, aorai_intermediate_state, - aorai_intermediate_state_0, aorai_intermediate_state_1, - aorai_intermediate_state_2, aorai_intermediate_state_3, - aorai_counter; - loop assigns aorai_Loop_Init_39 \from \nothing; - */ - while (1) { - if (! c) goto while_0_break; - /*@ ghost aorai_Loop_Init_39 = 0; */ - f(); - g(); - c --; - } - while_0_break: ; - __retres = 0; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/single_call.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/single_call.res.oracle deleted file mode 100644 index 712bfa00cd2c8c656bdce8aad08ab0120956c1f5..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/single_call.res.oracle +++ /dev/null @@ -1,142 +0,0 @@ -[kernel] Parsing tests/aorai/single_call.i (no preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_single_call0.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_main_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Sf_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_aorai_intermediate_state_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_Sf_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S0_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_aorai_intermediate_state_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int S0 = 1; */ -/*@ ghost int Sf = 0; */ -/*@ ghost int aorai_intermediate_state = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_out: - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_in: - assumes 1 ≡ S0; - ensures 1 ≡ aorai_intermediate_state; - - behavior buch_state_aorai_intermediate_state_out: - assumes 0 ≡ S0; - ensures 0 ≡ aorai_intermediate_state; - */ -void main_pre_func(void) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - if (S0 == 1) aorai_intermediate_state_tmp = 1; - else aorai_intermediate_state_tmp = 0; - Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - return; -} - -/*@ requires 1 ≡ aorai_intermediate_state ∧ 0 ≡ S0 ∧ 0 ≡ Sf; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, - aorai_intermediate_state; - - behavior buch_state_S0_out: - ensures 0 ≡ S0; - - behavior buch_state_Sf_in: - assumes 1 ≡ aorai_intermediate_state; - ensures 1 ≡ Sf; - - behavior buch_state_Sf_out: - assumes 0 ≡ aorai_intermediate_state; - ensures 0 ≡ Sf; - - behavior buch_state_aorai_intermediate_state_out: - ensures 0 ≡ aorai_intermediate_state; - */ -void main_post_func(int res) -{ - /*@ ghost int S0_tmp; */ - /*@ ghost int Sf_tmp; */ - /*@ ghost int aorai_intermediate_state_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - S0_tmp = S0; - Sf_tmp = Sf; - aorai_intermediate_state_tmp = aorai_intermediate_state; - aorai_intermediate_state_tmp = 0; - if (aorai_intermediate_state == 1) Sf_tmp = 1; else Sf_tmp = 0; - S0_tmp = 0; - S0 = S0_tmp; - Sf = Sf_tmp; - aorai_intermediate_state = aorai_intermediate_state_tmp; - return; -} - -/*@ requires 1 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state; - - behavior aorai_acceptance: - ensures 1 ≡ Sf; - - behavior Buchi_property_behavior: - ensures 0 ≡ S0 ∧ 0 ≡ aorai_intermediate_state; - ensures 1 ≡ Sf; - */ -int main(void) -{ - int __retres; - main_pre_func(); - __retres = 0; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_acces_params.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_acces_params.res.oracle deleted file mode 100644 index ff9ed90082ea33e0e744cbf57045d37191f398a8..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_acces_params.res.oracle +++ /dev/null @@ -1,597 +0,0 @@ -[kernel] Parsing tests/aorai/test_acces_params.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_acces_params0.i (no preprocessing) -/tmp/aorai_test_acces_params0.i:4:[wp] warning: Global invariant not handled yet ('inv' ignored) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S4_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_mainst_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_SF_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_SF_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S1_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S4_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_mainst_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_SF_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opa_post_func_post_2 : Valid -[wp] [Qed] Goal typed_opa_post_func_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_S3_in_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_mainst_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_SF_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_S4_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opa_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_opa_pre_func_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_S2_in_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_mainst_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_SF_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_S4_out_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_opb_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opb_post_func_post_2 : Valid -[wp] [Qed] Goal typed_opb_post_func_post : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_mainst_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_SF_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_SF_in_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_S4_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opb_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_opb_pre_func_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_S4_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_S4_in_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_mainst_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_SF_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_main = 2, - op_opa = 1, - op_opb = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -int status = 0; -int rr = 1; -/*@ global invariant inv: 0 ≤ rr ≤ 5000; - */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int S1 = 0; */ -/*@ ghost int S2 = 0; */ -/*@ ghost int S3 = 0; */ -/*@ ghost int S4 = 0; */ -/*@ ghost int SF = 0; */ -/*@ ghost int mainst = 1; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_opa; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, SF, - mainst; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_in: - assumes 1 ≡ S1 ∧ i ≥ 0; - ensures 1 ≡ S2; - - behavior buch_state_S2_out: - assumes 0 ≡ S1 ∨ ¬(i ≥ 0); - ensures 0 ≡ S2; - - behavior buch_state_S3_out: - ensures 0 ≡ S3; - - behavior buch_state_S4_out: - ensures 0 ≡ S4; - - behavior buch_state_SF_out: - ensures 0 ≡ SF; - - behavior buch_state_mainst_out: - ensures 0 ≡ mainst; - */ -void opa_pre_func(int i, int j) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S3_tmp; */ - /*@ ghost int S4_tmp; */ - /*@ ghost int SF_tmp; */ - /*@ ghost int mainst_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_opa; - S1_tmp = S1; - S2_tmp = S2; - S3_tmp = S3; - S4_tmp = S4; - SF_tmp = SF; - mainst_tmp = mainst; - mainst_tmp = 0; - SF_tmp = 0; - S4_tmp = 0; - S3_tmp = 0; - if (S1 == 1) - if (i >= 0) S2_tmp = 1; else S2_tmp = 0; - else S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S3 = S3_tmp; - S4 = S4_tmp; - SF = SF_tmp; - mainst = mainst_tmp; - return; -} - -/*@ requires - 1 ≡ S2 ∧ 0 ≡ S1 ∧ 0 ≡ S3 ∧ 0 ≡ S4 ∧ 0 ≡ SF ∧ - 0 ≡ mainst; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_opa; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, SF, - mainst; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_S3_in: - assumes 1 ≡ S2; - ensures 1 ≡ S3; - - behavior buch_state_S3_out: - assumes 0 ≡ S2; - ensures 0 ≡ S3; - - behavior buch_state_S4_out: - ensures 0 ≡ S4; - - behavior buch_state_SF_out: - ensures 0 ≡ SF; - - behavior buch_state_mainst_out: - ensures 0 ≡ mainst; - */ -void opa_post_func(void) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S3_tmp; */ - /*@ ghost int S4_tmp; */ - /*@ ghost int SF_tmp; */ - /*@ ghost int mainst_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_opa; - S1_tmp = S1; - S2_tmp = S2; - S3_tmp = S3; - S4_tmp = S4; - SF_tmp = SF; - mainst_tmp = mainst; - mainst_tmp = 0; - SF_tmp = 0; - S4_tmp = 0; - if (S2 == 1) S3_tmp = 1; else S3_tmp = 0; - S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S3 = S3_tmp; - S4 = S4_tmp; - SF = SF_tmp; - mainst = mainst_tmp; - return; -} - -/*@ requires - 1 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ S4 ∧ 0 ≡ SF ∧ - 0 ≡ mainst; - requires 1 ≡ S1 ⇒ i ≥ 0; - requires rr < 5000; - - behavior j: - ensures rr < 5001; - - behavior Buchi_property_behavior: - ensures - 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S4 ∧ 0 ≡ SF ∧ 0 ≡ mainst; - ensures 1 ≡ S3; - */ -void opa(int i, int j) -{ - opa_pre_func(i,j); - rr = i + j; - opa_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_opb; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, SF, - mainst; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_S3_out: - ensures 0 ≡ S3; - - behavior buch_state_S4_in: - assumes 1 ≡ S3; - ensures 1 ≡ S4; - - behavior buch_state_S4_out: - assumes 0 ≡ S3; - ensures 0 ≡ S4; - - behavior buch_state_SF_out: - ensures 0 ≡ SF; - - behavior buch_state_mainst_out: - ensures 0 ≡ mainst; - */ -void opb_pre_func(void) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S3_tmp; */ - /*@ ghost int S4_tmp; */ - /*@ ghost int SF_tmp; */ - /*@ ghost int mainst_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_opb; - S1_tmp = S1; - S2_tmp = S2; - S3_tmp = S3; - S4_tmp = S4; - SF_tmp = SF; - mainst_tmp = mainst; - mainst_tmp = 0; - SF_tmp = 0; - if (S3 == 1) S4_tmp = 1; else S4_tmp = 0; - S3_tmp = 0; - S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S3 = S3_tmp; - S4 = S4_tmp; - SF = SF_tmp; - mainst = mainst_tmp; - return; -} - -/*@ requires - 1 ≡ S4 ∧ 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ SF ∧ - 0 ≡ mainst; - requires 1 ≡ S4 ⇒ res > 0; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_opb; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, SF, - mainst; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_S3_out: - ensures 0 ≡ S3; - - behavior buch_state_S4_out: - ensures 0 ≡ S4; - - behavior buch_state_SF_in: - assumes 1 ≡ S4 ∧ res > 0; - ensures 1 ≡ SF; - - behavior buch_state_SF_out: - assumes 0 ≡ S4 ∨ ¬(res > 0); - ensures 0 ≡ SF; - - behavior buch_state_mainst_out: - ensures 0 ≡ mainst; - */ -void opb_post_func(int res) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S3_tmp; */ - /*@ ghost int S4_tmp; */ - /*@ ghost int SF_tmp; */ - /*@ ghost int mainst_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_opb; - S1_tmp = S1; - S2_tmp = S2; - S3_tmp = S3; - S4_tmp = S4; - SF_tmp = SF; - mainst_tmp = mainst; - mainst_tmp = 0; - if (S4 == 1) - if (res > 0) SF_tmp = 1; else SF_tmp = 0; - else SF_tmp = 0; - S4_tmp = 0; - S3_tmp = 0; - S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S3 = S3_tmp; - S4 = S4_tmp; - SF = SF_tmp; - mainst = mainst_tmp; - return; -} - -/*@ requires - 1 ≡ S3 ∧ 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S4 ∧ 0 ≡ SF ∧ - 0 ≡ mainst; - - behavior Buchi_property_behavior: - ensures 1 ≡ SF ⇒ \result > 0; - ensures - 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ S4 ∧ 0 ≡ mainst; - ensures 1 ≡ SF; - */ -int opb(void) -{ - int __retres; - opb_pre_func(); - status = 1; - __retres = status * 3; - opb_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, SF, - mainst; - - behavior buch_state_S1_in: - assumes 1 ≡ mainst; - ensures 1 ≡ S1; - - behavior buch_state_S1_out: - assumes 0 ≡ mainst; - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_S3_out: - ensures 0 ≡ S3; - - behavior buch_state_S4_out: - ensures 0 ≡ S4; - - behavior buch_state_SF_out: - ensures 0 ≡ SF; - - behavior buch_state_mainst_out: - ensures 0 ≡ mainst; - */ -void main_pre_func(void) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S3_tmp; */ - /*@ ghost int S4_tmp; */ - /*@ ghost int SF_tmp; */ - /*@ ghost int mainst_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - S1_tmp = S1; - S2_tmp = S2; - S3_tmp = S3; - S4_tmp = S4; - SF_tmp = SF; - mainst_tmp = mainst; - mainst_tmp = 0; - SF_tmp = 0; - S4_tmp = 0; - S3_tmp = 0; - S2_tmp = 0; - if (mainst == 1) S1_tmp = 1; else S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S3 = S3_tmp; - S4 = S4_tmp; - SF = SF_tmp; - mainst = mainst_tmp; - return; -} - -/*@ requires - 1 ≡ SF ∧ 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ S4 ∧ - 0 ≡ mainst; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, SF, - mainst; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_S3_out: - ensures 0 ≡ S3; - - behavior buch_state_S4_out: - ensures 0 ≡ S4; - - behavior buch_state_SF_in: - assumes 1 ≡ SF; - ensures 1 ≡ SF; - - behavior buch_state_SF_out: - assumes 0 ≡ SF; - ensures 0 ≡ SF; - - behavior buch_state_mainst_out: - ensures 0 ≡ mainst; - */ -void main_post_func(int res) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S3_tmp; */ - /*@ ghost int S4_tmp; */ - /*@ ghost int SF_tmp; */ - /*@ ghost int mainst_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - S1_tmp = S1; - S2_tmp = S2; - S3_tmp = S3; - S4_tmp = S4; - SF_tmp = SF; - mainst_tmp = mainst; - mainst_tmp = 0; - if (SF == 1) SF_tmp = 1; else SF_tmp = 0; - S4_tmp = 0; - S3_tmp = 0; - S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S3 = S3_tmp; - S4 = S4_tmp; - SF = SF_tmp; - mainst = mainst_tmp; - return; -} - -/*@ requires - 1 ≡ mainst ∧ 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ S4 ∧ - 0 ≡ SF; - - behavior Buchi_property_behavior: - ensures - 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ S4 ∧ 0 ≡ mainst; - ensures 1 ≡ SF; - */ -int main(void) -{ - int __retres; - main_pre_func(); - if (rr < 5000) opa(rr,300); - rr = opb(); - __retres = 1; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_acces_params2.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_acces_params2.res.oracle deleted file mode 100644 index 36faad6b3f8756de4bd9e8dc54eab26af41ca28b..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_acces_params2.res.oracle +++ /dev/null @@ -1,872 +0,0 @@ -[kernel] Parsing tests/aorai/test_acces_params2.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_acces_params20.i (no preprocessing) -/tmp/aorai_test_acces_params20.i:3:[wp] warning: Global invariant not handled yet ('inv' ignored) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S6_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S5_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S4_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S7_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S7_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S2_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S6_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S5_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S4_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S7_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opa_post_func_post_2 : Valid -[wp] [Qed] Goal typed_opa_post_func_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part17 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_S4_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_S4_in_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_S7_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_S6_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_S5_out_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_opa_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opa_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_opa_pre_func_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part16 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_S5_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_S4_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_S3_in_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_S7_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_S6_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opb_post_func_post_2 : Valid -[wp] [Qed] Goal typed_opb_post_func_post : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_S6_in_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_S5_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_S4_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_S7_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_S6_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opb_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_opb_pre_func_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_S6_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_S5_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_S5_in_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_S4_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_S7_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opc_post_func_post_2 : Valid -[wp] [Qed] Goal typed_opc_post_func_post : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_S7_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_S6_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_S5_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_S4_out_post : Valid -[wp] Computing [200 goals...] -[wp] [Qed] Goal typed_opc_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opc_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_opc_pre_func_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_S4_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_S3_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_S7_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_S6_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_S5_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_main = 3, - op_opa = 2, - op_opb = 1, - op_opc = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -int rr = 1; -/*@ global invariant inv: 0 ≤ rr ≤ 5000; - */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int S1 = 1; */ -/*@ ghost int S2 = 0; */ -/*@ ghost int S3 = 0; */ -/*@ ghost int S4 = 0; */ -/*@ ghost int S5 = 0; */ -/*@ ghost int S6 = 0; */ -/*@ ghost int S7 = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_opa; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, S5, S6, - S7; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_S3_in: - assumes 1 ≡ S2 ∧ r ≥ 0; - ensures 1 ≡ S3; - - behavior buch_state_S3_out: - assumes 0 ≡ S2 ∨ ¬(r ≥ 0); - ensures 0 ≡ S3; - - behavior buch_state_S4_out: - ensures 0 ≡ S4; - - behavior buch_state_S5_out: - ensures 0 ≡ S5; - - behavior buch_state_S6_out: - ensures 0 ≡ S6; - - behavior buch_state_S7_out: - ensures 0 ≡ S7; - */ -void opa_pre_func(int r) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S3_tmp; */ - /*@ ghost int S4_tmp; */ - /*@ ghost int S5_tmp; */ - /*@ ghost int S6_tmp; */ - /*@ ghost int S7_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_opa; - S1_tmp = S1; - S2_tmp = S2; - S3_tmp = S3; - S4_tmp = S4; - S5_tmp = S5; - S6_tmp = S6; - S7_tmp = S7; - S7_tmp = 0; - S6_tmp = 0; - S5_tmp = 0; - S4_tmp = 0; - if (S2 == 1) - if (r >= 0) S3_tmp = 1; else S3_tmp = 0; - else S3_tmp = 0; - S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S3 = S3_tmp; - S4 = S4_tmp; - S5 = S5_tmp; - S6 = S6_tmp; - S7 = S7_tmp; - return; -} - -/*@ requires - 1 ≡ S3 ∧ 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S4 ∧ 0 ≡ S5 ∧ - 0 ≡ S6 ∧ 0 ≡ S7; - requires 1 ≡ S3 ⇒ res ≤ 5000; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_opa; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, S5, S6, - S7; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_S3_out: - ensures 0 ≡ S3; - - behavior buch_state_S4_in: - assumes 1 ≡ S3 ∧ res ≤ 5000; - ensures 1 ≡ S4; - - behavior buch_state_S4_out: - assumes 0 ≡ S3 ∨ ¬(res ≤ 5000); - ensures 0 ≡ S4; - - behavior buch_state_S5_out: - ensures 0 ≡ S5; - - behavior buch_state_S6_out: - ensures 0 ≡ S6; - - behavior buch_state_S7_out: - ensures 0 ≡ S7; - */ -void opa_post_func(int res) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S3_tmp; */ - /*@ ghost int S4_tmp; */ - /*@ ghost int S5_tmp; */ - /*@ ghost int S6_tmp; */ - /*@ ghost int S7_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_opa; - S1_tmp = S1; - S2_tmp = S2; - S3_tmp = S3; - S4_tmp = S4; - S5_tmp = S5; - S6_tmp = S6; - S7_tmp = S7; - S7_tmp = 0; - S6_tmp = 0; - S5_tmp = 0; - if (S3 == 1) - if (res <= 5000) S4_tmp = 1; else S4_tmp = 0; - else S4_tmp = 0; - S3_tmp = 0; - S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S3 = S3_tmp; - S4 = S4_tmp; - S5 = S5_tmp; - S6 = S6_tmp; - S7 = S7_tmp; - return; -} - -/*@ requires - 1 ≡ S2 ∧ 0 ≡ S1 ∧ 0 ≡ S3 ∧ 0 ≡ S4 ∧ 0 ≡ S5 ∧ - 0 ≡ S6 ∧ 0 ≡ S7; - requires 1 ≡ S2 ⇒ r ≥ 0; - requires r < 5000; - - behavior j: - ensures \result ≡ \old(r)+1; - - behavior Buchi_property_behavior: - ensures 1 ≡ S4 ⇒ \result ≤ 5000; - ensures - 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ S5 ∧ 0 ≡ S6 ∧ - 0 ≡ S7; - ensures 1 ≡ S4; - */ -int opa(int r) -{ - int __retres; - opa_pre_func(r); - __retres = r + 1; - opa_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_opb; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, S5, S6, - S7; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_S3_out: - ensures 0 ≡ S3; - - behavior buch_state_S4_out: - ensures 0 ≡ S4; - - behavior buch_state_S5_in: - assumes 1 ≡ S4; - ensures 1 ≡ S5; - - behavior buch_state_S5_out: - assumes 0 ≡ S4; - ensures 0 ≡ S5; - - behavior buch_state_S6_out: - ensures 0 ≡ S6; - - behavior buch_state_S7_out: - ensures 0 ≡ S7; - */ -void opb_pre_func(void) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S3_tmp; */ - /*@ ghost int S4_tmp; */ - /*@ ghost int S5_tmp; */ - /*@ ghost int S6_tmp; */ - /*@ ghost int S7_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_opb; - S1_tmp = S1; - S2_tmp = S2; - S3_tmp = S3; - S4_tmp = S4; - S5_tmp = S5; - S6_tmp = S6; - S7_tmp = S7; - S7_tmp = 0; - S6_tmp = 0; - if (S4 == 1) S5_tmp = 1; else S5_tmp = 0; - S4_tmp = 0; - S3_tmp = 0; - S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S3 = S3_tmp; - S4 = S4_tmp; - S5 = S5_tmp; - S6 = S6_tmp; - S7 = S7_tmp; - return; -} - -/*@ requires - 1 ≡ S5 ∧ 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ S4 ∧ - 0 ≡ S6 ∧ 0 ≡ S7; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_opb; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, S5, S6, - S7; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_S3_out: - ensures 0 ≡ S3; - - behavior buch_state_S4_out: - ensures 0 ≡ S4; - - behavior buch_state_S5_out: - ensures 0 ≡ S5; - - behavior buch_state_S6_in: - assumes 1 ≡ S5; - ensures 1 ≡ S6; - - behavior buch_state_S6_out: - assumes 0 ≡ S5; - ensures 0 ≡ S6; - - behavior buch_state_S7_out: - ensures 0 ≡ S7; - */ -void opb_post_func(void) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S3_tmp; */ - /*@ ghost int S4_tmp; */ - /*@ ghost int S5_tmp; */ - /*@ ghost int S6_tmp; */ - /*@ ghost int S7_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_opb; - S1_tmp = S1; - S2_tmp = S2; - S3_tmp = S3; - S4_tmp = S4; - S5_tmp = S5; - S6_tmp = S6; - S7_tmp = S7; - S7_tmp = 0; - if (S5 == 1) S6_tmp = 1; else S6_tmp = 0; - S5_tmp = 0; - S4_tmp = 0; - S3_tmp = 0; - S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S3 = S3_tmp; - S4 = S4_tmp; - S5 = S5_tmp; - S6 = S6_tmp; - S7 = S7_tmp; - return; -} - -/*@ requires - 1 ≡ S4 ∧ 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ S5 ∧ - 0 ≡ S6 ∧ 0 ≡ S7; - requires rr ≥ 1 ∧ rr ≤ 5000; - - behavior f: - ensures rr ≥ 3 ∧ rr ≤ 5000; - - behavior Buchi_property_behavior: - ensures - 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ S4 ∧ 0 ≡ S5 ∧ - 0 ≡ S7; - ensures 1 ≡ S6; - */ -void opb(void) -{ - opb_pre_func(); - if (rr < 4998) rr += 2; - opb_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_opc; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, S5, S6, - S7; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_S3_out: - ensures 0 ≡ S3; - - behavior buch_state_S4_out: - ensures 0 ≡ S4; - - behavior buch_state_S5_out: - ensures 0 ≡ S5; - - behavior buch_state_S6_out: - ensures 0 ≡ S6; - - behavior buch_state_S7_out: - ensures 0 ≡ S7; - */ -void opc_pre_func(void) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S3_tmp; */ - /*@ ghost int S4_tmp; */ - /*@ ghost int S5_tmp; */ - /*@ ghost int S6_tmp; */ - /*@ ghost int S7_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_opc; - S1_tmp = S1; - S2_tmp = S2; - S3_tmp = S3; - S4_tmp = S4; - S5_tmp = S5; - S6_tmp = S6; - S7_tmp = S7; - S7_tmp = 0; - S6_tmp = 0; - S5_tmp = 0; - S4_tmp = 0; - S3_tmp = 0; - S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S3 = S3_tmp; - S4 = S4_tmp; - S5 = S5_tmp; - S6 = S6_tmp; - S7 = S7_tmp; - return; -} - -/*@ requires \false; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_opc; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, S5, S6, - S7; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_S3_out: - ensures 0 ≡ S3; - - behavior buch_state_S4_out: - ensures 0 ≡ S4; - - behavior buch_state_S5_out: - ensures 0 ≡ S5; - - behavior buch_state_S6_out: - ensures 0 ≡ S6; - - behavior buch_state_S7_out: - ensures 0 ≡ S7; - */ -void opc_post_func(void) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S3_tmp; */ - /*@ ghost int S4_tmp; */ - /*@ ghost int S5_tmp; */ - /*@ ghost int S6_tmp; */ - /*@ ghost int S7_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_opc; - S1_tmp = S1; - S2_tmp = S2; - S3_tmp = S3; - S4_tmp = S4; - S5_tmp = S5; - S6_tmp = S6; - S7_tmp = S7; - S7_tmp = 0; - S6_tmp = 0; - S5_tmp = 0; - S4_tmp = 0; - S3_tmp = 0; - S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S3 = S3_tmp; - S4 = S4_tmp; - S5 = S5_tmp; - S6 = S6_tmp; - S7 = S7_tmp; - return; -} - -/*@ requires \false; - - behavior d: - ensures rr ≡ 600; - - behavior Buchi_behavior_out_0: - ensures 0 ≡ S1; - - behavior Buchi_behavior_out_1: - ensures 0 ≡ S2; - - behavior Buchi_behavior_out_2: - ensures 0 ≡ S3; - - behavior Buchi_behavior_out_3: - ensures 0 ≡ S4; - - behavior Buchi_behavior_out_4: - ensures 0 ≡ S5; - - behavior Buchi_behavior_out_5: - ensures 0 ≡ S6; - - behavior Buchi_behavior_out_6: - ensures 0 ≡ S7; - */ -void opc(void) -{ - opc_pre_func(); - rr = 600; - opc_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, S5, S6, - S7; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_in: - assumes 1 ≡ S1; - ensures 1 ≡ S2; - - behavior buch_state_S2_out: - assumes 0 ≡ S1; - ensures 0 ≡ S2; - - behavior buch_state_S3_out: - ensures 0 ≡ S3; - - behavior buch_state_S4_out: - ensures 0 ≡ S4; - - behavior buch_state_S5_out: - ensures 0 ≡ S5; - - behavior buch_state_S6_out: - ensures 0 ≡ S6; - - behavior buch_state_S7_out: - ensures 0 ≡ S7; - */ -void main_pre_func(void) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S3_tmp; */ - /*@ ghost int S4_tmp; */ - /*@ ghost int S5_tmp; */ - /*@ ghost int S6_tmp; */ - /*@ ghost int S7_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - S1_tmp = S1; - S2_tmp = S2; - S3_tmp = S3; - S4_tmp = S4; - S5_tmp = S5; - S6_tmp = S6; - S7_tmp = S7; - S7_tmp = 0; - S6_tmp = 0; - S5_tmp = 0; - S4_tmp = 0; - S3_tmp = 0; - if (S1 == 1) S2_tmp = 1; else S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S3 = S3_tmp; - S4 = S4_tmp; - S5 = S5_tmp; - S6 = S6_tmp; - S7 = S7_tmp; - return; -} - -/*@ requires - 1 ≡ S6 ∧ 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ S4 ∧ - 0 ≡ S5 ∧ 0 ≡ S7; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, S5, S6, - S7; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_S3_out: - ensures 0 ≡ S3; - - behavior buch_state_S4_out: - ensures 0 ≡ S4; - - behavior buch_state_S5_out: - ensures 0 ≡ S5; - - behavior buch_state_S6_out: - ensures 0 ≡ S6; - - behavior buch_state_S7_in: - assumes 1 ≡ S6; - ensures 1 ≡ S7; - - behavior buch_state_S7_out: - assumes 0 ≡ S6; - ensures 0 ≡ S7; - */ -void main_post_func(int res) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int S3_tmp; */ - /*@ ghost int S4_tmp; */ - /*@ ghost int S5_tmp; */ - /*@ ghost int S6_tmp; */ - /*@ ghost int S7_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - S1_tmp = S1; - S2_tmp = S2; - S3_tmp = S3; - S4_tmp = S4; - S5_tmp = S5; - S6_tmp = S6; - S7_tmp = S7; - if (S6 == 1) S7_tmp = 1; else S7_tmp = 0; - S6_tmp = 0; - S5_tmp = 0; - S4_tmp = 0; - S3_tmp = 0; - S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - S3 = S3_tmp; - S4 = S4_tmp; - S5 = S5_tmp; - S6 = S6_tmp; - S7 = S7_tmp; - return; -} - -/*@ requires - 1 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ S4 ∧ 0 ≡ S5 ∧ - 0 ≡ S6 ∧ 0 ≡ S7; - requires rr ≡ 1; - - behavior Buchi_property_behavior: - ensures - 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ S4 ∧ 0 ≡ S5 ∧ - 0 ≡ S6; - ensures 1 ≡ S7; - */ -int main(void) -{ - int __retres; - main_pre_func(); - if (rr < 5000) rr = opa(rr); - opb(); - goto L6; - opc(); - L6: __retres = 1; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_boucle.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_boucle.res.oracle deleted file mode 100644 index da1fcef5be47d91894510004a4838fb0164d6fda..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_boucle.res.oracle +++ /dev/null @@ -1,421 +0,0 @@ -[kernel] Parsing tests/aorai/test_boucle.c (with preprocessing) -tests/aorai/test_boucle.c:16:[kernel] warning: Calling undeclared function call_to_an_undefined_function. Old style K&R code? -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_boucle0.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_a_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_a_post_func_post_2 : Valid -[wp] [Qed] Goal typed_a_post_func_post : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_a_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_a_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_a_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_a_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_a_post_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_a_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_a_pre_func_post : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_a_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_a_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part8 : Valid -[wp] [Qed] Goal typed_a_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_a_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_a_pre_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_b_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_b_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_b_post_func_post_2 : Valid -[wp] [Qed] Goal typed_b_post_func_post : Valid -[wp] [Qed] Goal typed_b_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_b_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_b_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_b_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_b_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_b_post_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_b_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_b_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_b_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_b_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_b_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_b_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_b_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_b_pre_func_post : Valid -[wp] [Qed] Goal typed_b_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_b_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_b_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_b_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_b_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_b_pre_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_b_pre_func_assign_part8 : Valid -[wp] [Qed] Goal typed_b_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_b_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_b_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S1_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_a = 2, - op_b = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -extern int call_to_an_undefined_function(); - -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int T0_S2 = 0; */ -/*@ ghost int T0_init = 1; */ -/*@ ghost int accept_S1 = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_a; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_out: - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_S1 ∨ 1 ≡ T0_S2; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_S1 ∧ 0 ≡ T0_S2; - ensures 0 ≡ accept_S1; - */ -void a_pre_func(void) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_a; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - if (T0_S2 == 1) accept_S1_tmp = 1; - else - if (accept_S1 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires 1 ≡ accept_S1 ∧ 0 ≡ T0_S2 ∧ 0 ≡ T0_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_a; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_out: - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ accept_S1; - */ -void a_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_a; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - if (accept_S1 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires (1 ≡ T0_S2 ∨ 1 ≡ accept_S1) ∧ 0 ≡ T0_init; - requires 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - requires 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - requires \true; - ensures 0 ≤ \result ≤ 1; - - behavior Buchi_property_behavior: - ensures 0 ≡ T0_S2 ∧ 0 ≡ T0_init; - ensures 1 ≡ accept_S1; - */ -int a(void) -{ - int __retres; - a_pre_func(); - __retres = 1; - a_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_b; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S1 ∨ 1 ≡ T0_S2; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S1 ∧ 0 ≡ T0_S2; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - */ -void b_pre_func(void) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_b; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S1_tmp = 0; - T0_init_tmp = 0; - if (T0_S2 == 1) T0_S2_tmp = 1; - else - if (accept_S1 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires 1 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S1; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_b; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ T0_S2; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ T0_S2; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - */ -void b_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_b; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S1_tmp = 0; - T0_init_tmp = 0; - if (T0_S2 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires (1 ≡ T0_S2 ∨ 1 ≡ accept_S1) ∧ 0 ≡ T0_init; - requires 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - requires 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - requires \true; - ensures 1 ≤ \result ≤ 2; - - behavior Buchi_property_behavior: - ensures 0 ≡ T0_init ∧ 0 ≡ accept_S1; - ensures 1 ≡ T0_S2; - */ -int b(void) -{ - int __retres; - b_pre_func(); - call_to_an_undefined_function(); - __retres = 2; - b_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_out: - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ T0_init; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ T0_init; - ensures 0 ≡ accept_S1; - */ -void main_pre_func(void) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - if (T0_init == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires 1 ≡ accept_S1 ∧ 0 ≡ T0_S2 ∧ 0 ≡ T0_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_out: - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ accept_S1; - */ -void main_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - if (accept_S1 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires 1 ≡ T0_init ∧ 0 ≡ T0_S2 ∧ 0 ≡ accept_S1; - requires \true; - ensures 0 ≤ \result ≤ 1; - - behavior aorai_acceptance: - ensures 1 ≡ accept_S1; - - behavior Buchi_property_behavior: - ensures 0 ≡ T0_S2 ∧ 0 ≡ T0_init; - ensures 1 ≡ accept_S1; - */ -int main(void) -{ - int aorai_Loop_Init_26; - int x; - int tmp_1; - main_pre_func(); - x = a(); - /*@ ghost aorai_Loop_Init_26 = 1; */ - aorai_loop_26: - /*@ loop invariant i: 0 ≤ x ≤ 11; - loop invariant Aorai: 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - loop invariant Aorai: 0 ≡ T0_init; - loop invariant Aorai: 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - loop invariant Aorai: 1 ≡ T0_S2 ∨ 1 ≡ accept_S1; - loop invariant - Aorai: - aorai_Loop_Init_26 ≢ 0 ⇒ - \at(1 ≡ T0_init,Pre) ⇒ 0 ≡ T0_S2; - loop invariant Aorai: aorai_Loop_Init_26 ≡ 0 ⇒ 0 ≡ accept_S1; - */ - while (1) { - if (! (x < 10)) goto while_0_break; - /*@ ghost aorai_Loop_Init_26 = 0; */ - { - int tmp_0; - tmp_0 = b(); - x += tmp_0; - } - } - while_0_break: ; - tmp_1 = a(); - main_post_func(tmp_1); - return tmp_1; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_boucle1.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_boucle1.res.oracle deleted file mode 100644 index b08aaf3b180a7b6796e6cc1cb244013567aaaba8..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_boucle1.res.oracle +++ /dev/null @@ -1,604 +0,0 @@ -[kernel] Parsing tests/aorai/test_boucle1.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_boucle10.i (no preprocessing) -/tmp/aorai_test_boucle10.i:3:[wp] warning: Global invariant not handled yet ('inv_cpt' ignored) -/tmp/aorai_test_boucle10.i:6:[wp] warning: Global invariant not handled yet ('inv_status' ignored) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_commit_trans_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_post_2 : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_post : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_commit_trans_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_post : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_commit_trans_pre_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_init_trans_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_init_trans_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_init_trans_post_func_post_2 : Valid -[wp] [Qed] Goal typed_init_trans_post_func_post : Valid -[wp] [Qed] Goal typed_init_trans_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_init_trans_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_init_trans_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_init_trans_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_init_trans_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_init_trans_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_init_trans_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_init_trans_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_init_trans_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_init_trans_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_init_trans_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_init_trans_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_init_trans_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_init_trans_post_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_init_trans_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_init_trans_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_init_trans_post_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_init_trans_post_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_init_trans_post_func_buch_state_accept_S4_in_post : Valid -[wp] [Qed] Goal typed_init_trans_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_post : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_init_trans_pre_func_buch_state_accept_S3_out_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S3_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S3_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_commit_trans = 2, - op_init_trans = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -int cpt = 3; -/*@ global invariant inv_cpt: 0 ≤ cpt ≤ 3; - */ -int status = 0; -/*@ global invariant inv_status: 0 ≤ status ≤ 1; - */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int accept_S1 = 0; */ -/*@ ghost int accept_S2 = 0; */ -/*@ ghost int accept_S3 = 0; */ -/*@ ghost int accept_S4 = 0; */ -/*@ ghost int accept_init = 1; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_commit_trans; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, - accept_S3, accept_S4, accept_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ accept_S4; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ accept_S4; - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void commit_trans_pre_func(void) -{ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_commit_trans; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - if (accept_S4 == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - accept_S1_tmp = 0; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S4 ∧ 0 ≡ accept_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_commit_trans; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, - accept_S3, accept_S4, accept_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ accept_S2; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ accept_S2; - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void commit_trans_post_func(int res) -{ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_commit_trans; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - if (accept_S2 == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - accept_S1_tmp = 0; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S4 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2 ∧ - 0 ≡ accept_S3 ∧ 0 ≡ accept_init; - requires \true; - - behavior a: - ensures 0 ≤ \result ≤ 1; - - behavior Buchi_property_behavior: - ensures - 0 ≡ accept_S1 ∧ 0 ≡ accept_S3 ∧ 0 ≡ accept_S4 ∧ - 0 ≡ accept_init; - ensures 1 ≡ accept_S2; - */ -int commit_trans(void) -{ - int __retres; - commit_trans_pre_func(); - __retres = 1; - commit_trans_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_init_trans; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, - accept_S3, accept_S4, accept_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ accept_S2; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ accept_S2; - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void init_trans_pre_func(void) -{ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_init_trans; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - if (accept_S2 == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - accept_S1_tmp = 0; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S4 ∧ 0 ≡ accept_init; - requires 1 ≡ accept_S2 ⇒ status ≡ 0 ∨ status ≢ 0; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_init_trans; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, - accept_S3, accept_S4, accept_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ accept_S2 ∧ status ≡ 0; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ accept_S2 ∨ ¬(status ≡ 0); - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_in: - assumes 1 ≡ accept_S2 ∧ status ≢ 0; - ensures 1 ≡ accept_S4; - - behavior buch_state_accept_S4_out: - assumes 0 ≡ accept_S2 ∨ status ≡ 0; - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void init_trans_post_func(int res) -{ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_init_trans; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - if (accept_S2 == 1) - if (status != 0) accept_S4_tmp = 1; else accept_S4_tmp = 0; - else accept_S4_tmp = 0; - accept_S3_tmp = 0; - if (accept_S2 == 1) - if (status == 0) accept_S2_tmp = 1; else accept_S2_tmp = 0; - else accept_S2_tmp = 0; - accept_S1_tmp = 0; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S4 ∧ 0 ≡ accept_init; - requires \true; - - behavior a: - ensures 0 ≤ \result ≤ 1; - - behavior Buchi_property_behavior: - ensures - (1 ≡ accept_S2 ⇒ status ≡ 0) ∧ - (1 ≡ accept_S4 ⇒ status ≢ 0); - ensures 1 ≡ accept_S2 ∨ 0 ≡ accept_S2; - ensures 1 ≡ accept_S4 ∨ 0 ≡ accept_S4; - ensures 0 ≡ accept_S1 ∧ 0 ≡ accept_S3 ∧ 0 ≡ accept_init; - ensures 1 ≡ accept_S2 ∨ 1 ≡ accept_S4; - */ -int init_trans(void) -{ - int __retres; - init_trans_pre_func(); - __retres = 1; - init_trans_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, - accept_S3, accept_S4, accept_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ accept_init; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ accept_init; - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void main_pre_func(void) -{ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - if (accept_init == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - accept_S1_tmp = 0; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S4 ∧ 0 ≡ accept_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, - accept_S3, accept_S4, accept_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_S2; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_S2; - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ accept_S2; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ accept_S2; - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_in: - assumes 1 ≡ accept_S2; - ensures 1 ≡ accept_S3; - - behavior buch_state_accept_S3_out: - assumes 0 ≡ accept_S2; - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void main_post_func(int res) -{ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_S4_tmp = 0; - if (accept_S2 == 1) accept_S3_tmp = 1; else accept_S3_tmp = 0; - if (accept_S2 == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - if (accept_S2 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_init ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2 ∧ - 0 ≡ accept_S3 ∧ 0 ≡ accept_S4; - requires \true; - - behavior a: - ensures 0 ≤ \result ≤ 1; - - behavior aorai_acceptance: - ensures - 1 ≡ accept_S1 ∨ 1 ≡ accept_S2 ∨ 1 ≡ accept_S3 ∨ - 1 ≡ accept_S4 ∨ 1 ≡ accept_init; - - behavior Buchi_property_behavior: - ensures 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - ensures 1 ≡ accept_S2 ∨ 0 ≡ accept_S2; - ensures 1 ≡ accept_S3 ∨ 0 ≡ accept_S3; - ensures 0 ≡ accept_S4 ∧ 0 ≡ accept_init; - ensures 1 ≡ accept_S1 ∨ 1 ≡ accept_S2 ∨ 1 ≡ accept_S3; - */ -int main(void) -{ - int aorai_Loop_Init_32; - int __retres; - main_pre_func(); - cpt = 3; - status = 0; - /*@ ghost aorai_Loop_Init_32 = 1; */ - aorai_loop_32: - /*@ loop invariant - i: - 0 ≤ status ≤ 1 ∧ 0 ≤ cpt ≤ 3 ∧ - (cpt ≡ 0 ⇒ status ≡ 0); - loop invariant Aorai: 0 ≡ accept_S1; - loop invariant Aorai: 1 ≡ accept_S2; - loop invariant Aorai: 0 ≡ accept_S3; - loop invariant Aorai: 0 ≡ accept_S4; - loop invariant Aorai: 0 ≡ accept_init; - */ - while (1) { - if (! (cpt > 0)) goto while_0_break; - /*@ ghost aorai_Loop_Init_32 = 0; */ - status = init_trans(); - if (status) { - status = commit_trans(); - if (status) goto label_ok; - } - cpt --; - } - while_0_break: ; - __retres = 0; - goto return_label; - label_ok: __retres = 1; - return_label: main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_boucle2.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_boucle2.res.oracle deleted file mode 100644 index ed96de3b6af2a9f36f0fc45ba036b3fb2cfe4538..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_boucle2.res.oracle +++ /dev/null @@ -1,631 +0,0 @@ -[kernel] Parsing tests/aorai/test_boucle2.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_boucle20.i (no preprocessing) -/tmp/aorai_test_boucle20.i:4:[wp] warning: Global invariant not handled yet ('inv' ignored) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_all_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opa_post_func_post_2 : Valid -[wp] [Qed] Goal typed_opa_post_func_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S3_in_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opa_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_opa_pre_func_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_S5_out_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_opb_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opb_post_func_post_2 : Valid -[wp] [Qed] Goal typed_opb_post_func_post : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S5_in_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opb_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_opb_pre_func_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S4_in_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S5_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_main = 2, - op_opa = 1, - op_opb = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -int status = 0; -int rr = 1; -/*@ global invariant inv: 0 ≤ rr ≤ 50; - */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int T0_S2 = 0; */ -/*@ ghost int T0_init = 1; */ -/*@ ghost int accept_S3 = 0; */ -/*@ ghost int accept_S4 = 0; */ -/*@ ghost int accept_S5 = 0; */ -/*@ ghost int accept_all = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_opa; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S3, - accept_S4, accept_S5, accept_all; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ T0_S2; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ T0_S2; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - */ -void opa_pre_func(void) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_all_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_opa; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_all_tmp = accept_all; - accept_all_tmp = 0; - accept_S5_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - T0_init_tmp = 0; - if (T0_S2 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_all = accept_all_tmp; - return; -} - -/*@ requires - 1 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S4 ∧ 0 ≡ accept_S5 ∧ 0 ≡ accept_all; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_opa; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S3, - accept_S4, accept_S5, accept_all; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ T0_S2; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ T0_S2; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S3_in: - assumes 1 ≡ T0_S2 ∧ rr ≡ 51; - ensures 1 ≡ accept_S3; - - behavior buch_state_accept_S3_out: - assumes 0 ≡ T0_S2 ∨ ¬(rr ≡ 51); - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - */ -void opa_post_func(void) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_all_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_opa; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_all_tmp = accept_all; - accept_all_tmp = 0; - accept_S5_tmp = 0; - accept_S4_tmp = 0; - if (T0_S2 == 1) - if (rr == 51) accept_S3_tmp = 1; else accept_S3_tmp = 0; - else accept_S3_tmp = 0; - T0_init_tmp = 0; - if (T0_S2 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_all = accept_all_tmp; - return; -} - -/*@ requires - 1 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S4 ∧ 0 ≡ accept_S5 ∧ 0 ≡ accept_all; - requires rr < 50; - - behavior j: - ensures rr < 51; - - behavior Buchi_property_behavior: - ensures 1 ≡ accept_S3 ⇒ rr ≡ 51; - ensures 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - ensures 1 ≡ accept_S3 ∨ 0 ≡ accept_S3; - ensures - 0 ≡ T0_init ∧ 0 ≡ accept_S4 ∧ 0 ≡ accept_S5 ∧ - 0 ≡ accept_all; - ensures 1 ≡ T0_S2 ∨ 1 ≡ accept_S3; - */ -void opa(void) -{ - opa_pre_func(); - rr ++; - opa_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_opb; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S3, - accept_S4, accept_S5, accept_all; - - behavior buch_state_T0_S2_out: - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_in: - assumes 1 ≡ accept_S3; - ensures 1 ≡ accept_S4; - - behavior buch_state_accept_S4_out: - assumes 0 ≡ accept_S3; - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - */ -void opb_pre_func(void) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_all_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_opb; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_all_tmp = accept_all; - accept_all_tmp = 0; - accept_S5_tmp = 0; - if (accept_S3 == 1) accept_S4_tmp = 1; else accept_S4_tmp = 0; - accept_S3_tmp = 0; - T0_init_tmp = 0; - T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_all = accept_all_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S4 ∧ 0 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ - 0 ≡ accept_S3 ∧ 0 ≡ accept_S5 ∧ 0 ≡ accept_all; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_opb; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S3, - accept_S4, accept_S5, accept_all; - - behavior buch_state_T0_S2_out: - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_in: - assumes 1 ≡ accept_S4; - ensures 1 ≡ accept_S5; - - behavior buch_state_accept_S5_out: - assumes 0 ≡ accept_S4; - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - */ -void opb_post_func(void) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_all_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_opb; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_all_tmp = accept_all; - accept_all_tmp = 0; - if (accept_S4 == 1) accept_S5_tmp = 1; else accept_S5_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - T0_init_tmp = 0; - T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_all = accept_all_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S3 ∧ 0 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ - 0 ≡ accept_S4 ∧ 0 ≡ accept_S5 ∧ 0 ≡ accept_all; - - behavior Buchi_property_behavior: - ensures - 0 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S4 ∧ 0 ≡ accept_all; - ensures 1 ≡ accept_S5; - */ -void opb(void) -{ - opb_pre_func(); - status = 1; - opb_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S3, - accept_S4, accept_S5, accept_all; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ T0_init; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ T0_init; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - */ -void main_pre_func(void) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_all_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_all_tmp = accept_all; - accept_all_tmp = 0; - accept_S5_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - T0_init_tmp = 0; - if (T0_init == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_all = accept_all_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S5 ∧ 0 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ - 0 ≡ accept_S3 ∧ 0 ≡ accept_S4 ∧ 0 ≡ accept_all; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S3, - accept_S4, accept_S5, accept_all; - - behavior buch_state_T0_S2_out: - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_all_in: - assumes 1 ≡ accept_S5; - ensures 1 ≡ accept_all; - - behavior buch_state_accept_all_out: - assumes 0 ≡ accept_S5; - ensures 0 ≡ accept_all; - */ -void main_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_all_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_all_tmp = accept_all; - if (accept_S5 == 1) accept_all_tmp = 1; else accept_all_tmp = 0; - accept_S5_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - T0_init_tmp = 0; - T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_all = accept_all_tmp; - return; -} - -/*@ requires - 1 ≡ T0_init ∧ 0 ≡ T0_S2 ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S4 ∧ 0 ≡ accept_S5 ∧ 0 ≡ accept_all; - - behavior aorai_acceptance: - ensures - 1 ≡ accept_S3 ∨ 1 ≡ accept_S4 ∨ 1 ≡ accept_S5 ∨ - 1 ≡ accept_all; - - behavior Buchi_property_behavior: - ensures - 0 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S4 ∧ 0 ≡ accept_S5; - ensures 1 ≡ accept_all; - */ -int main(void) -{ - int aorai_Loop_Init_26; - int __retres; - /*@ ghost int tmp; */ - main_pre_func(); - /*@ ghost aorai_Loop_Init_26 = 1; */ - aorai_loop_26: - /*@ loop invariant 0 ≤ rr ≤ 50; - loop invariant Aorai: 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - loop invariant Aorai: 0 ≡ T0_init; - loop invariant Aorai: 1 ≡ accept_S3 ∨ 0 ≡ accept_S3; - loop invariant Aorai: 0 ≡ accept_S4; - loop invariant Aorai: 0 ≡ accept_S5; - loop invariant Aorai: 0 ≡ accept_all; - loop invariant Aorai: 1 ≡ T0_S2 ∨ 1 ≡ accept_S3; - loop invariant - Aorai: - aorai_Loop_Init_26 ≢ 0 ⇒ - \at(1 ≡ T0_init,Pre) ⇒ 0 ≡ accept_S3; - */ - while (1) { - if (! (rr < 50)) goto while_0_break; - /*@ ghost aorai_Loop_Init_26 = 0; */ - opa(); - } - while_0_break: ; - opb(); - /*@ ghost tmp = 1; */ - /*@ ghost tmp = 0; */ - __retres = 1; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_boucle3.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_boucle3.res.oracle deleted file mode 100644 index f5fe45a55d0956768eb9685301ad887c4fbd7773..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_boucle3.res.oracle +++ /dev/null @@ -1,608 +0,0 @@ -[kernel] Parsing tests/aorai/test_boucle3.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_boucle30.i (no preprocessing) -/tmp/aorai_test_boucle30.i:4:[wp] warning: Global invariant not handled yet ('inv' ignored) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_S4_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T1_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_S4_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_all_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T1_S2_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_S4_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T1_S2_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opa_post_func_post_2 : Valid -[wp] [Qed] Goal typed_opa_post_func_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_T0_S4_in_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_T1_S2_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_T1_S2_in_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_T0_S4_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opa_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_opa_pre_func_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_T0_S4_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_T0_S4_in_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_T1_S2_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_T1_S2_in_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_all_out_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_opb_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opb_post_func_post_2 : Valid -[wp] [Qed] Goal typed_opb_post_func_post : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_T0_S4_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_T0_S4_in_post : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_T1_S2_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opb_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_opb_pre_func_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_T0_S4_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S3_in_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_T1_S2_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_main = 2, - op_opa = 1, - op_opb = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -int status = 0; -int rr = 1; -/*@ global invariant inv: 0 ≤ rr ≤ 50; - */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int T0_S4 = 0; */ -/*@ ghost int T0_init = 1; */ -/*@ ghost int T1_S2 = 0; */ -/*@ ghost int accept_S3 = 0; */ -/*@ ghost int accept_all = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_opa; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S4, T0_init, T1_S2, - accept_S3, accept_all; - - behavior buch_state_T0_S4_in: - assumes 1 ≡ T0_S4; - ensures 1 ≡ T0_S4; - - behavior buch_state_T0_S4_out: - assumes 0 ≡ T0_S4; - ensures 0 ≡ T0_S4; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_S2_in: - assumes 1 ≡ T1_S2; - ensures 1 ≡ T1_S2; - - behavior buch_state_T1_S2_out: - assumes 0 ≡ T1_S2; - ensures 0 ≡ T1_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - */ -void opa_pre_func(void) -{ - /*@ ghost int T0_S4_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_all_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_opa; - T0_S4_tmp = T0_S4; - T0_init_tmp = T0_init; - T1_S2_tmp = T1_S2; - accept_S3_tmp = accept_S3; - accept_all_tmp = accept_all; - accept_all_tmp = 0; - accept_S3_tmp = 0; - if (T1_S2 == 1) T1_S2_tmp = 1; else T1_S2_tmp = 0; - T0_init_tmp = 0; - if (T0_S4 == 1) T0_S4_tmp = 1; else T0_S4_tmp = 0; - T0_S4 = T0_S4_tmp; - T0_init = T0_init_tmp; - T1_S2 = T1_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_all = accept_all_tmp; - return; -} - -/*@ requires - (1 ≡ T0_S4 ∨ 1 ≡ T1_S2) ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_all; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_opa; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S4, T0_init, T1_S2, - accept_S3, accept_all; - - behavior buch_state_T0_S4_in: - assumes 1 ≡ T0_S4; - ensures 1 ≡ T0_S4; - - behavior buch_state_T0_S4_out: - assumes 0 ≡ T0_S4; - ensures 0 ≡ T0_S4; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_S2_in: - assumes 1 ≡ T1_S2; - ensures 1 ≡ T1_S2; - - behavior buch_state_T1_S2_out: - assumes 0 ≡ T1_S2; - ensures 0 ≡ T1_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - */ -void opa_post_func(void) -{ - /*@ ghost int T0_S4_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_all_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_opa; - T0_S4_tmp = T0_S4; - T0_init_tmp = T0_init; - T1_S2_tmp = T1_S2; - accept_S3_tmp = accept_S3; - accept_all_tmp = accept_all; - accept_all_tmp = 0; - accept_S3_tmp = 0; - if (T1_S2 == 1) T1_S2_tmp = 1; else T1_S2_tmp = 0; - T0_init_tmp = 0; - if (T0_S4 == 1) T0_S4_tmp = 1; else T0_S4_tmp = 0; - T0_S4 = T0_S4_tmp; - T0_init = T0_init_tmp; - T1_S2 = T1_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_all = accept_all_tmp; - return; -} - -/*@ requires - (1 ≡ T0_S4 ∨ 1 ≡ T1_S2) ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_all; - requires 1 ≡ T1_S2 ∨ 0 ≡ T1_S2; - requires 1 ≡ T0_S4 ∨ 0 ≡ T0_S4; - requires rr < 50; - - behavior j: - ensures rr < 51; - - behavior Buchi_behavior_in_0: - assumes 1 ≡ T0_S4; - ensures 1 ≡ T0_S4; - - behavior Buchi_behavior_in_1: - assumes 1 ≡ T1_S2; - ensures 1 ≡ T1_S2; - - behavior Buchi_behavior_out_0: - assumes 0 ≡ T0_S4; - ensures 0 ≡ T0_S4; - - behavior Buchi_behavior_out_1: - ensures 0 ≡ T0_init; - - behavior Buchi_behavior_out_2: - assumes 0 ≡ T1_S2; - ensures 0 ≡ T1_S2; - - behavior Buchi_behavior_out_3: - ensures 0 ≡ accept_S3; - - behavior Buchi_behavior_out_4: - ensures 0 ≡ accept_all; - */ -void opa(void) -{ - opa_pre_func(); - rr ++; - opa_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_opb; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S4, T0_init, T1_S2, - accept_S3, accept_all; - - behavior buch_state_T0_S4_out: - ensures 0 ≡ T0_S4; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_S2_out: - ensures 0 ≡ T1_S2; - - behavior buch_state_accept_S3_in: - assumes 1 ≡ T1_S2 ∧ rr ≡ 51; - ensures 1 ≡ accept_S3; - - behavior buch_state_accept_S3_out: - assumes 0 ≡ T1_S2 ∨ ¬(rr ≡ 51); - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - */ -void opb_pre_func(void) -{ - /*@ ghost int T0_S4_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_all_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_opb; - T0_S4_tmp = T0_S4; - T0_init_tmp = T0_init; - T1_S2_tmp = T1_S2; - accept_S3_tmp = accept_S3; - accept_all_tmp = accept_all; - accept_all_tmp = 0; - if (T1_S2 == 1) - if (rr == 51) accept_S3_tmp = 1; else accept_S3_tmp = 0; - else accept_S3_tmp = 0; - T1_S2_tmp = 0; - T0_init_tmp = 0; - T0_S4_tmp = 0; - T0_S4 = T0_S4_tmp; - T0_init = T0_init_tmp; - T1_S2 = T1_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_all = accept_all_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S3 ∧ 0 ≡ T0_S4 ∧ 0 ≡ T0_init ∧ 0 ≡ T1_S2 ∧ - 0 ≡ accept_all; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_opb; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S4, T0_init, T1_S2, - accept_S3, accept_all; - - behavior buch_state_T0_S4_in: - assumes 1 ≡ accept_S3; - ensures 1 ≡ T0_S4; - - behavior buch_state_T0_S4_out: - assumes 0 ≡ accept_S3; - ensures 0 ≡ T0_S4; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_S2_out: - ensures 0 ≡ T1_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - */ -void opb_post_func(void) -{ - /*@ ghost int T0_S4_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_all_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_opb; - T0_S4_tmp = T0_S4; - T0_init_tmp = T0_init; - T1_S2_tmp = T1_S2; - accept_S3_tmp = accept_S3; - accept_all_tmp = accept_all; - accept_all_tmp = 0; - accept_S3_tmp = 0; - T1_S2_tmp = 0; - T0_init_tmp = 0; - if (accept_S3 == 1) T0_S4_tmp = 1; else T0_S4_tmp = 0; - T0_S4 = T0_S4_tmp; - T0_init = T0_init_tmp; - T1_S2 = T1_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_all = accept_all_tmp; - return; -} - -/*@ requires - 1 ≡ T1_S2 ∧ 0 ≡ T0_S4 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_all; - requires 1 ≡ T1_S2 ⇒ rr ≡ 51; - - behavior Buchi_property_behavior: - ensures - 0 ≡ T0_init ∧ 0 ≡ T1_S2 ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_all; - ensures 1 ≡ T0_S4; - */ -void opb(void) -{ - opb_pre_func(); - status = 1; - opb_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S4, T0_init, T1_S2, - accept_S3, accept_all; - - behavior buch_state_T0_S4_out: - ensures 0 ≡ T0_S4; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_S2_in: - assumes 1 ≡ T0_init; - ensures 1 ≡ T1_S2; - - behavior buch_state_T1_S2_out: - assumes 0 ≡ T0_init; - ensures 0 ≡ T1_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - */ -void main_pre_func(void) -{ - /*@ ghost int T0_S4_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_all_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - T0_S4_tmp = T0_S4; - T0_init_tmp = T0_init; - T1_S2_tmp = T1_S2; - accept_S3_tmp = accept_S3; - accept_all_tmp = accept_all; - accept_all_tmp = 0; - accept_S3_tmp = 0; - if (T0_init == 1) T1_S2_tmp = 1; else T1_S2_tmp = 0; - T0_init_tmp = 0; - T0_S4_tmp = 0; - T0_S4 = T0_S4_tmp; - T0_init = T0_init_tmp; - T1_S2 = T1_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_all = accept_all_tmp; - return; -} - -/*@ requires - 1 ≡ T0_S4 ∧ 0 ≡ T0_init ∧ 0 ≡ T1_S2 ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_all; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S4, T0_init, T1_S2, - accept_S3, accept_all; - - behavior buch_state_T0_S4_in: - assumes 1 ≡ T0_S4; - ensures 1 ≡ T0_S4; - - behavior buch_state_T0_S4_out: - assumes 0 ≡ T0_S4; - ensures 0 ≡ T0_S4; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_S2_out: - ensures 0 ≡ T1_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_all_in: - assumes 1 ≡ T0_S4; - ensures 1 ≡ accept_all; - - behavior buch_state_accept_all_out: - assumes 0 ≡ T0_S4; - ensures 0 ≡ accept_all; - */ -void main_post_func(int res) -{ - /*@ ghost int T0_S4_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_all_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - T0_S4_tmp = T0_S4; - T0_init_tmp = T0_init; - T1_S2_tmp = T1_S2; - accept_S3_tmp = accept_S3; - accept_all_tmp = accept_all; - if (T0_S4 == 1) accept_all_tmp = 1; else accept_all_tmp = 0; - accept_S3_tmp = 0; - T1_S2_tmp = 0; - T0_init_tmp = 0; - if (T0_S4 == 1) T0_S4_tmp = 1; else T0_S4_tmp = 0; - T0_S4 = T0_S4_tmp; - T0_init = T0_init_tmp; - T1_S2 = T1_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_all = accept_all_tmp; - return; -} - -/*@ requires - 1 ≡ T0_init ∧ 0 ≡ T0_S4 ∧ 0 ≡ T1_S2 ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_all; - - behavior aorai_acceptance: - ensures 1 ≡ accept_S3 ∨ 1 ≡ accept_all; - - behavior Buchi_property_behavior: - ensures 1 ≡ T0_S4 ∨ 0 ≡ T0_S4; - ensures 1 ≡ accept_all ∨ 0 ≡ accept_all; - ensures 0 ≡ T0_init ∧ 0 ≡ T1_S2 ∧ 0 ≡ accept_S3; - ensures 1 ≡ T0_S4 ∨ 1 ≡ accept_all; - */ -int main(void) -{ - int aorai_Loop_Init_41; - int aorai_Loop_Init_31; - int __retres; - main_pre_func(); - /*@ ghost aorai_Loop_Init_31 = 1; */ - aorai_loop_31: - /*@ loop invariant 0 ≤ rr ≤ 50; - loop invariant Aorai: 0 ≡ T0_S4; - loop invariant Aorai: 0 ≡ T0_init; - loop invariant Aorai: 1 ≡ T1_S2; - loop invariant Aorai: 0 ≡ accept_S3; - loop invariant Aorai: 0 ≡ accept_all; - */ - while (1) { - if (! (rr < 50)) goto while_0_break; - /*@ ghost aorai_Loop_Init_31 = 0; */ - opa(); - } - while_0_break: ; - opb(); - rr = 0; - /*@ ghost aorai_Loop_Init_41 = 1; */ - aorai_loop_41: - /*@ loop invariant Aorai: 1 ≡ T0_S4; - loop invariant Aorai: 0 ≡ T0_init; - loop invariant Aorai: 0 ≡ T1_S2; - loop invariant Aorai: 0 ≡ accept_S3; - loop invariant Aorai: 0 ≡ accept_all; - */ - while (1) { - if (! (rr < 50)) goto while_1_break; - /*@ ghost aorai_Loop_Init_41 = 0; */ - opa(); - } - while_1_break: ; - __retres = 1; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_boucle_rechercheTableau.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_boucle_rechercheTableau.res.oracle deleted file mode 100644 index bf30d3ed3da4f90707f9b37ba4d1ce7ec0001c5f..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_boucle_rechercheTableau.res.oracle +++ /dev/null @@ -1,436 +0,0 @@ -[kernel] Parsing tests/aorai/test_boucle_rechercheTableau.c (with preprocessing) -tests/aorai/test_boucle_rechercheTableau.c:17:[kernel] warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -tests/aorai/test_boucle_rechercheTableau.c:7:[kernel] warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_boucle_rechercheTableau0.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_foo_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_foo_post_func_post_2 : Valid -[wp] [Qed] Goal typed_foo_post_func_post : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_foo_post_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_foo_post_func_buch_state_End_in_post : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_foo_post_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_foo_post_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_foo_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_foo_pre_func_post : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_foo_pre_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_foo_pre_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_foo_pre_func_buch_state_End_in_post : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_foo_pre_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_post_2 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_buch_state_End_in_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_buch_state_WillDoFoo_in_post : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_post : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_buch_state_Idle_in_post : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_End_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_Idle_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_WillDoFoo_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_foo = 2, - op_isPresent = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int End = 0; */ -/*@ ghost int Idle = 1; */ -/*@ ghost int WillDoFoo = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_isPresent; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; - - behavior buch_state_End_out: - ensures 0 ≡ End; - - behavior buch_state_Idle_in: - assumes 1 ≡ Idle; - ensures 1 ≡ Idle; - - behavior buch_state_Idle_out: - assumes 0 ≡ Idle; - ensures 0 ≡ Idle; - - behavior buch_state_WillDoFoo_out: - ensures 0 ≡ WillDoFoo; - */ -void isPresent_pre_func(int *t, int max, int val) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_isPresent; - End_tmp = End; - Idle_tmp = Idle; - WillDoFoo_tmp = WillDoFoo; - WillDoFoo_tmp = 0; - if (Idle == 1) Idle_tmp = 1; else Idle_tmp = 0; - End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires 1 ≡ Idle ∧ 0 ≡ End ∧ 0 ≡ WillDoFoo; - requires 1 ≡ Idle ⇒ res ≢ -1 ∨ res ≡ -1; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_isPresent; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; - - behavior buch_state_End_in: - assumes 1 ≡ Idle ∧ res ≢ -1; - ensures 1 ≡ End; - - behavior buch_state_End_out: - assumes 0 ≡ Idle ∨ ¬(res ≢ -1); - ensures 0 ≡ End; - - behavior buch_state_Idle_out: - ensures 0 ≡ Idle; - - behavior buch_state_WillDoFoo_in: - assumes 1 ≡ Idle ∧ res ≡ -1; - ensures 1 ≡ WillDoFoo; - - behavior buch_state_WillDoFoo_out: - assumes 0 ≡ Idle ∨ ¬(res ≡ -1); - ensures 0 ≡ WillDoFoo; - */ -void isPresent_post_func(int res) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_isPresent; - End_tmp = End; - Idle_tmp = Idle; - WillDoFoo_tmp = WillDoFoo; - if (Idle == 1) - if (res == -1) WillDoFoo_tmp = 1; else WillDoFoo_tmp = 0; - else WillDoFoo_tmp = 0; - Idle_tmp = 0; - if (Idle == 1) - if (res != -1) End_tmp = 1; else End_tmp = 0; - else End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires 1 ≡ Idle ∧ 0 ≡ End ∧ 0 ≡ WillDoFoo; - requires \valid(t+(0 .. max)); - requires max ≥ 0; - ensures (0 ≤ \result ≤ \old(max)) ∨ \result ≡ -1; - ensures 0 ≤ \result ≤ \old(max) ⇒ *(\old(t)+\result) ≡ \old(val); - ensures - \result ≡ -1 ⇒ - (∀ ℤ j; 0 ≤ j ≤ \old(max) ⇒ *(\old(t)+j) ≢ \old(val)); - - behavior Buchi_property_behavior: - ensures - (1 ≡ End ⇒ \result ≢ -1) ∧ - (1 ≡ WillDoFoo ⇒ \result ≡ -1); - ensures 1 ≡ End ∨ 0 ≡ End; - ensures 1 ≡ WillDoFoo ∨ 0 ≡ WillDoFoo; - ensures 0 ≡ Idle; - ensures 1 ≡ End ∨ 1 ≡ WillDoFoo; - */ -int isPresent(int *t, int max, int val) -{ - int aorai_Loop_Init_32; - int __retres; - int i; - isPresent_pre_func(t,max,val); - i = 0; - /*@ ghost aorai_Loop_Init_32 = 1; */ - aorai_loop_32: - /*@ loop invariant - inv: - 0 ≤ i ≤ max ∧ \valid(t+(0 .. max)) ∧ max ≥ 0 ∧ - (∀ ℤ j; 0 ≤ j ≤ i-1 ⇒ *(t+j) ≢ val); - loop invariant Aorai: 0 ≡ End; - loop invariant Aorai: 1 ≡ Idle; - loop invariant Aorai: 0 ≡ WillDoFoo; - loop variant (v: max-i); - */ - while (1) { - if (i < max) { - if (! (*(t + i) != val)) goto while_0_break; - } - else goto while_0_break; - /*@ ghost aorai_Loop_Init_32 = 0; */ - i ++; - } - while_0_break: ; - if (*(t + i) == val) { - __retres = i; - goto return_label; - } - __retres = -1; - return_label: isPresent_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_foo; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; - - behavior buch_state_End_in: - assumes 1 ≡ WillDoFoo; - ensures 1 ≡ End; - - behavior buch_state_End_out: - assumes 0 ≡ WillDoFoo; - ensures 0 ≡ End; - - behavior buch_state_Idle_out: - ensures 0 ≡ Idle; - - behavior buch_state_WillDoFoo_out: - ensures 0 ≡ WillDoFoo; - */ -void foo_pre_func(void) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_foo; - End_tmp = End; - Idle_tmp = Idle; - WillDoFoo_tmp = WillDoFoo; - WillDoFoo_tmp = 0; - Idle_tmp = 0; - if (WillDoFoo == 1) End_tmp = 1; else End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires 1 ≡ End ∧ 0 ≡ Idle ∧ 0 ≡ WillDoFoo; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_foo; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; - - behavior buch_state_End_in: - assumes 1 ≡ End; - ensures 1 ≡ End; - - behavior buch_state_End_out: - assumes 0 ≡ End; - ensures 0 ≡ End; - - behavior buch_state_Idle_out: - ensures 0 ≡ Idle; - - behavior buch_state_WillDoFoo_out: - ensures 0 ≡ WillDoFoo; - */ -void foo_post_func(void) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_foo; - End_tmp = End; - Idle_tmp = Idle; - WillDoFoo_tmp = WillDoFoo; - WillDoFoo_tmp = 0; - Idle_tmp = 0; - if (End == 1) End_tmp = 1; else End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires 1 ≡ WillDoFoo ∧ 0 ≡ End ∧ 0 ≡ Idle; - - behavior Buchi_property_behavior: - ensures 0 ≡ Idle ∧ 0 ≡ WillDoFoo; - ensures 1 ≡ End; - */ -void foo(void) -{ - foo_pre_func(); - foo_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; - - behavior buch_state_End_out: - ensures 0 ≡ End; - - behavior buch_state_Idle_in: - assumes 1 ≡ Idle; - ensures 1 ≡ Idle; - - behavior buch_state_Idle_out: - assumes 0 ≡ Idle; - ensures 0 ≡ Idle; - - behavior buch_state_WillDoFoo_out: - ensures 0 ≡ WillDoFoo; - */ -void main_pre_func(int argc, char **argv) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - End_tmp = End; - Idle_tmp = Idle; - WillDoFoo_tmp = WillDoFoo; - WillDoFoo_tmp = 0; - if (Idle == 1) Idle_tmp = 1; else Idle_tmp = 0; - End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires 1 ≡ End ∧ 0 ≡ Idle ∧ 0 ≡ WillDoFoo; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; - - behavior buch_state_End_in: - assumes 1 ≡ End; - ensures 1 ≡ End; - - behavior buch_state_End_out: - assumes 0 ≡ End; - ensures 0 ≡ End; - - behavior buch_state_Idle_out: - ensures 0 ≡ Idle; - - behavior buch_state_WillDoFoo_out: - ensures 0 ≡ WillDoFoo; - */ -void main_post_func(int res) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - End_tmp = End; - Idle_tmp = Idle; - WillDoFoo_tmp = WillDoFoo; - WillDoFoo_tmp = 0; - Idle_tmp = 0; - if (End == 1) End_tmp = 1; else End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires 1 ≡ Idle ∧ 0 ≡ End ∧ 0 ≡ WillDoFoo; - - behavior aorai_acceptance: - ensures 1 ≡ End; - - behavior Buchi_property_behavior: - ensures 0 ≡ Idle ∧ 0 ≡ WillDoFoo; - ensures 1 ≡ End; - */ -int main(int argc, char **argv) -{ - int __retres; - int tab[4]; - int r; - main_pre_func(argc,argv); - tab[0] = 10; - tab[1] = 20; - tab[2] = 33; - tab[3] = 15; - r = isPresent(tab,3,33); - if (r == -1) foo(); - __retres = 1; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_factorial.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_factorial.res.oracle deleted file mode 100644 index 246b748a70d9af01d11ebb1ce45a294160c870d7..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_factorial.res.oracle +++ /dev/null @@ -1,512 +0,0 @@ -[kernel] Parsing tests/aorai/test_factorial.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_factorial0.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_decode_int_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_post_2 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_post : Valid -[wp] [Qed] Goal typed_decode_int_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_decode_int_post_func_assign_part9 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_decode_int_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_decode_int_post_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_decode_int_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_post : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_factorial_post_func_post_2 : Valid -[wp] [Qed] Goal typed_factorial_post_func_post : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_factorial_post_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_factorial_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_factorial_post_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_factorial_post_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_factorial_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_factorial_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_post : Valid -[wp] [Qed] Goal typed_factorial_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_factorial_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_factorial_pre_func_assign_part8 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_factorial_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part9 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_init_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_decode_int = 2, - op_factorial = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int accept_S1 = 0; */ -/*@ ghost int accept_S2 = 0; */ -/*@ ghost int accept_init = 1; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_decode_int; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, - accept_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void decode_int_pre_func(char *s) -{ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_decode_int; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_S2_tmp = 0; - if (accept_S1 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires 1 ≡ accept_S1 ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_decode_int; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, - accept_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void decode_int_post_func(int res) -{ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_decode_int; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - if (accept_S1 == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - if (accept_S1 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires 1 ≡ accept_S1 ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_init; - - behavior Buchi_property_behavior: - ensures 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - ensures 1 ≡ accept_S2 ∨ 0 ≡ accept_S2; - ensures 0 ≡ accept_init; - ensures 1 ≡ accept_S1 ∨ 1 ≡ accept_S2; - */ -int decode_int(char *s) -{ - int aorai_Loop_Init_81; - int __retres; - int intmax; - int cutlim; - int cutoff; - int value; - char c; - decode_int_pre_func(s); - intmax = ~ (1 << (sizeof(int) * (unsigned int)8 - (unsigned int)1)); - cutlim = intmax % 10; - cutoff = intmax / 10; - value = 0; - /*@ ghost aorai_Loop_Init_81 = 1; */ - aorai_loop_81: - /*@ loop invariant Aorai: 1 ≡ accept_S1; - loop invariant Aorai: 0 ≡ accept_S2; - loop invariant Aorai: 0 ≡ accept_init; - */ - while (1) { - { - char *tmp; - /*@ ghost aorai_Loop_Init_81 = 0; */ - tmp = s; - s ++; - c = *tmp; - if (! c) goto while_0_break; - { - int v; - v = 0; - switch ((int)c) { - case '0': v = 0; - goto switch_1_break; - case '1': v = 1; - goto switch_1_break; - case '2': v = 2; - goto switch_1_break; - case '3': v = 3; - goto switch_1_break; - case '4': v = 4; - goto switch_1_break; - case '5': v = 5; - goto switch_1_break; - case '6': v = 6; - goto switch_1_break; - case '7': v = 7; - goto switch_1_break; - case '8': v = 8; - goto switch_1_break; - case '9': v = 9; - goto switch_1_break; - default: ; - __retres = -1; - goto return_label; - } - switch_1_break: ; - if (value > cutoff) { - __retres = -1; - goto return_label; - } - else - if (value == cutoff) - if (v > cutlim) { - __retres = -1; - goto return_label; - } - value = value * 10 + v; - } - } - } - while_0_break: ; - __retres = value; - return_label: decode_int_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_factorial; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, - accept_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ accept_S2 ∨ 1 ≡ accept_S1; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ accept_S2 ∧ 0 ≡ accept_S1; - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void factorial_pre_func(int value) -{ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_factorial; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - if (accept_S1 == 1) accept_S2_tmp = 1; - else - if (accept_S2 == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - accept_S1_tmp = 0; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires (1 ≡ accept_S1 ∨ 1 ≡ accept_S2) ∧ 0 ≡ accept_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_factorial; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, - accept_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_S2 ∨ 1 ≡ accept_S1; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_S2 ∧ 0 ≡ accept_S1; - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ accept_S2 ∨ 1 ≡ accept_S1; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ accept_S2 ∧ 0 ≡ accept_S1; - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void factorial_post_func(int res) -{ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_factorial; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - if (accept_S1 == 1) accept_S2_tmp = 1; - else - if (accept_S2 == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - if (accept_S1 == 1) accept_S1_tmp = 1; - else - if (accept_S2 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires (1 ≡ accept_S1 ∨ 1 ≡ accept_S2) ∧ 0 ≡ accept_init; - requires 1 ≡ accept_S2 ∨ 0 ≡ accept_S2; - requires 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - requires 0 ≤ value ≤ 12; - decreases value; - ensures \result ≥ 1; - - behavior Buchi_property_behavior: - ensures 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - ensures 1 ≡ accept_S2 ∨ 0 ≡ accept_S2; - ensures 0 ≡ accept_init; - ensures 1 ≡ accept_S1 ∨ 1 ≡ accept_S2; - */ -int factorial(int value) -{ - int tmp_0; - factorial_pre_func(value); - if (value > 0) { - int tmp; - tmp = factorial(value - 1); - tmp_0 = tmp * value; - } - else tmp_0 = 1; - factorial_post_func(tmp_0); - return tmp_0; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, - accept_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_init; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_init; - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void main_pre_func(int argc, char **argv) -{ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_S2_tmp = 0; - if (accept_init == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires 1 ≡ accept_S1 ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, - accept_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void main_post_func(int res) -{ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - if (accept_S1 == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - if (accept_S1 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires 1 ≡ accept_init ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2; - requires argc ≡ 2; - ensures \result ≡ 0 ∨ \result ≡ 1; - - behavior Buchi_property_behavior: - ensures 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - ensures 1 ≡ accept_S2 ∨ 0 ≡ accept_S2; - ensures 0 ≡ accept_init; - ensures 1 ≡ accept_S1 ∨ 1 ≡ accept_S2; - */ -int main(int argc, char **argv) -{ - int __retres; - int value; - main_pre_func(argc,argv); - if (argc != 2) { - __retres = 1; - goto return_label; - } - else { - value = decode_int(*(argv + 1)); - if (value < 0) { - __retres = 1; - goto return_label; - } - else - if (value > 12) { - __retres = 1; - goto return_label; - } - } - factorial(value); - __retres = 0; - return_label: main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_factorial2.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_factorial2.res.oracle deleted file mode 100644 index 4944a79ee26faa16a15db9ab2edfb30644fefc90..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_factorial2.res.oracle +++ /dev/null @@ -1,509 +0,0 @@ -[kernel] Parsing tests/aorai/test_factorial2.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_factorial20.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_decode_int_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_post_2 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_post : Valid -[wp] [Qed] Goal typed_decode_int_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_buch_state_S1_in_post : Valid -[wp] [Qed] Goal typed_decode_int_post_func_assign_part9 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_decode_int_post_func_buch_state_main_0_out_post : Valid -[wp] [Qed] Goal typed_decode_int_post_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_decode_int_post_func_buch_state_S2_in_post : Valid -[wp] [Qed] Goal typed_decode_int_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_post : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_buch_state_S1_in_post : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_decode_int_pre_func_buch_state_main_0_out_post : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_factorial_post_func_post_2 : Valid -[wp] [Qed] Goal typed_factorial_post_func_post : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_factorial_post_func_buch_state_S2_in_post : Valid -[wp] [Qed] Goal typed_factorial_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_factorial_post_func_buch_state_S1_in_post : Valid -[wp] [Qed] Goal typed_factorial_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_factorial_post_func_buch_state_main_0_out_post : Valid -[wp] [Qed] Goal typed_factorial_post_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_factorial_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_post : Valid -[wp] [Qed] Goal typed_factorial_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_buch_state_S2_in_post : Valid -[wp] [Qed] Goal typed_factorial_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_factorial_pre_func_assign_part8 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_factorial_pre_func_buch_state_main_0_out_post : Valid -[wp] [Qed] Goal typed_factorial_pre_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S1_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part9 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_main_0_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S2_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S1_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_main_0_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_decode_int = 2, - op_factorial = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int S1 = 0; */ -/*@ ghost int S2 = 0; */ -/*@ ghost int main_0 = 1; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_decode_int; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, main_0; - - behavior buch_state_S1_in: - assumes 1 ≡ S1; - ensures 1 ≡ S1; - - behavior buch_state_S1_out: - assumes 0 ≡ S1; - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_main_0_out: - ensures 0 ≡ main_0; - */ -void decode_int_pre_func(char *s) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int main_0_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_decode_int; - S1_tmp = S1; - S2_tmp = S2; - main_0_tmp = main_0; - main_0_tmp = 0; - S2_tmp = 0; - if (S1 == 1) S1_tmp = 1; else S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - main_0 = main_0_tmp; - return; -} - -/*@ requires 1 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ main_0; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_decode_int; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, main_0; - - behavior buch_state_S1_in: - assumes 1 ≡ S1; - ensures 1 ≡ S1; - - behavior buch_state_S1_out: - assumes 0 ≡ S1; - ensures 0 ≡ S1; - - behavior buch_state_S2_in: - assumes 1 ≡ S1 ∧ 1 ≢ 0; - ensures 1 ≡ S2; - - behavior buch_state_S2_out: - assumes 0 ≡ S1 ∨ 1 ≡ 0; - ensures 0 ≡ S2; - - behavior buch_state_main_0_out: - ensures 0 ≡ main_0; - */ -void decode_int_post_func(int res) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int main_0_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_decode_int; - S1_tmp = S1; - S2_tmp = S2; - main_0_tmp = main_0; - main_0_tmp = 0; - if (S1 == 1) S2_tmp = 1; else S2_tmp = 0; - if (S1 == 1) S1_tmp = 1; else S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - main_0 = main_0_tmp; - return; -} - -/*@ requires 1 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ main_0; - - behavior Buchi_property_behavior: - ensures 1 ≡ S2 ⇒ 1 ≢ 0; - ensures 1 ≡ S1 ∨ 0 ≡ S1; - ensures 1 ≡ S2 ∨ 0 ≡ S2; - ensures 0 ≡ main_0; - ensures 1 ≡ S1 ∨ 1 ≡ S2; - */ -int decode_int(char *s) -{ - int aorai_Loop_Init_81; - int __retres; - int intmax; - int cutlim; - int cutoff; - int value; - char c; - decode_int_pre_func(s); - intmax = ~ (1 << (sizeof(int) * (unsigned int)8 - (unsigned int)1)); - cutlim = intmax % 10; - cutoff = intmax / 10; - value = 0; - /*@ ghost aorai_Loop_Init_81 = 1; */ - aorai_loop_81: - /*@ loop invariant Aorai: 1 ≡ S1; - loop invariant Aorai: 0 ≡ S2; - loop invariant Aorai: 0 ≡ main_0; - */ - while (1) { - { - char *tmp; - /*@ ghost aorai_Loop_Init_81 = 0; */ - tmp = s; - s ++; - c = *tmp; - if (! c) goto while_0_break; - { - int v; - v = 0; - switch ((int)c) { - case '0': v = 0; - goto switch_1_break; - case '1': v = 1; - goto switch_1_break; - case '2': v = 2; - goto switch_1_break; - case '3': v = 3; - goto switch_1_break; - case '4': v = 4; - goto switch_1_break; - case '5': v = 5; - goto switch_1_break; - case '6': v = 6; - goto switch_1_break; - case '7': v = 7; - goto switch_1_break; - case '8': v = 8; - goto switch_1_break; - case '9': v = 9; - goto switch_1_break; - default: ; - __retres = -1; - goto return_label; - } - switch_1_break: ; - if (value > cutoff) { - __retres = -1; - goto return_label; - } - else - if (value == cutoff) - if (v > cutlim) { - __retres = -1; - goto return_label; - } - value = value * 10 + v; - } - } - } - while_0_break: ; - __retres = value; - return_label: decode_int_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_factorial; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, main_0; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_S2_in: - assumes 1 ≡ S2 ∨ (1 ≡ S1 ∧ 1 ≢ 0); - ensures 1 ≡ S2; - - behavior buch_state_S2_out: - assumes 0 ≡ S2 ∧ (0 ≡ S1 ∨ 1 ≡ 0); - ensures 0 ≡ S2; - - behavior buch_state_main_0_out: - ensures 0 ≡ main_0; - */ -void factorial_pre_func(int value) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int main_0_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_factorial; - S1_tmp = S1; - S2_tmp = S2; - main_0_tmp = main_0; - main_0_tmp = 0; - if (S1 == 1) S2_tmp = 1; - else - if (S2 == 1) S2_tmp = 1; else S2_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - main_0 = main_0_tmp; - return; -} - -/*@ requires (1 ≡ S1 ∨ 1 ≡ S2) ∧ 0 ≡ main_0; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_factorial; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, main_0; - - behavior buch_state_S1_in: - assumes 1 ≡ S2 ∨ 1 ≡ S1; - ensures 1 ≡ S1; - - behavior buch_state_S1_out: - assumes 0 ≡ S2 ∧ 0 ≡ S1; - ensures 0 ≡ S1; - - behavior buch_state_S2_in: - assumes 1 ≡ S2 ∨ (1 ≡ S1 ∧ 1 ≢ 0); - ensures 1 ≡ S2; - - behavior buch_state_S2_out: - assumes 0 ≡ S2 ∧ (0 ≡ S1 ∨ 1 ≡ 0); - ensures 0 ≡ S2; - - behavior buch_state_main_0_out: - ensures 0 ≡ main_0; - */ -void factorial_post_func(int res) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int main_0_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_factorial; - S1_tmp = S1; - S2_tmp = S2; - main_0_tmp = main_0; - main_0_tmp = 0; - if (S1 == 1) S2_tmp = 1; - else - if (S2 == 1) S2_tmp = 1; else S2_tmp = 0; - if (S1 == 1) S1_tmp = 1; - else - if (S2 == 1) S1_tmp = 1; else S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - main_0 = main_0_tmp; - return; -} - -/*@ requires (1 ≡ S1 ∨ 1 ≡ S2) ∧ 0 ≡ main_0; - requires 1 ≡ S1 ⇒ 1 ≢ 0; - requires 1 ≡ S2 ∨ 0 ≡ S2; - requires 1 ≡ S1 ∨ 0 ≡ S1; - requires 0 ≤ value ≤ 12; - decreases value; - ensures \result ≥ 1; - - behavior Buchi_property_behavior: - ensures 1 ≡ S1 ∨ 0 ≡ S1; - ensures 1 ≡ S2 ∨ 0 ≡ S2; - ensures 0 ≡ main_0; - ensures 1 ≡ S1 ∨ 1 ≡ S2; - */ -int factorial(int value) -{ - int tmp_0; - factorial_pre_func(value); - if (value > 0) { - int tmp; - tmp = factorial(value - 1); - tmp_0 = tmp * value; - } - else tmp_0 = 1; - factorial_post_func(tmp_0); - return tmp_0; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, main_0; - - behavior buch_state_S1_in: - assumes 1 ≡ main_0; - ensures 1 ≡ S1; - - behavior buch_state_S1_out: - assumes 0 ≡ main_0; - ensures 0 ≡ S1; - - behavior buch_state_S2_out: - ensures 0 ≡ S2; - - behavior buch_state_main_0_out: - ensures 0 ≡ main_0; - */ -void main_pre_func(int argc, char **argv) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int main_0_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - S1_tmp = S1; - S2_tmp = S2; - main_0_tmp = main_0; - main_0_tmp = 0; - S2_tmp = 0; - if (main_0 == 1) S1_tmp = 1; else S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - main_0 = main_0_tmp; - return; -} - -/*@ requires 1 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ main_0; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, main_0; - - behavior buch_state_S1_in: - assumes 1 ≡ S1; - ensures 1 ≡ S1; - - behavior buch_state_S1_out: - assumes 0 ≡ S1; - ensures 0 ≡ S1; - - behavior buch_state_S2_in: - assumes 1 ≡ S1 ∧ 1 ≢ 0; - ensures 1 ≡ S2; - - behavior buch_state_S2_out: - assumes 0 ≡ S1 ∨ 1 ≡ 0; - ensures 0 ≡ S2; - - behavior buch_state_main_0_out: - ensures 0 ≡ main_0; - */ -void main_post_func(int res) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int S2_tmp; */ - /*@ ghost int main_0_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - S1_tmp = S1; - S2_tmp = S2; - main_0_tmp = main_0; - main_0_tmp = 0; - if (S1 == 1) S2_tmp = 1; else S2_tmp = 0; - if (S1 == 1) S1_tmp = 1; else S1_tmp = 0; - S1 = S1_tmp; - S2 = S2_tmp; - main_0 = main_0_tmp; - return; -} - -/*@ requires 1 ≡ main_0 ∧ 0 ≡ S1 ∧ 0 ≡ S2; - requires argc ≡ 2; - ensures \result ≡ 0 ∨ \result ≡ 1; - - behavior Buchi_property_behavior: - ensures 1 ≡ S2 ⇒ 1 ≢ 0; - ensures 1 ≡ S1 ∨ 0 ≡ S1; - ensures 1 ≡ S2 ∨ 0 ≡ S2; - ensures 0 ≡ main_0; - ensures 1 ≡ S1 ∨ 1 ≡ S2; - */ -int main(int argc, char **argv) -{ - int __retres; - int value; - main_pre_func(argc,argv); - if (argc != 2) { - __retres = 1; - goto return_label; - } - else { - value = decode_int(*(argv + 1)); - if (value < 0) { - __retres = 1; - goto return_label; - } - else - if (value > 12) { - __retres = 1; - goto return_label; - } - } - factorial(value); - __retres = 0; - return_label: main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_recursion1.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_recursion1.res.oracle deleted file mode 100644 index 143f3333da9b923a6a9e50fec6c98bf48bd19bc8..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_recursion1.res.oracle +++ /dev/null @@ -1,446 +0,0 @@ -[kernel] Parsing tests/aorai/test_recursion1.c (with preprocessing) -tests/aorai/test_recursion1.c:21:[kernel] warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -tests/aorai/test_recursion1.c:42:[kernel] warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -tests/aorai/test_recursion1.c:54:[kernel] warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_recursion10.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: No definition for 'string_len' interpreted as reads nothing -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_countOne_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_countOne_post_func_post_2 : Valid -[wp] [Qed] Goal typed_countOne_post_func_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_count_post_func_post_2 : Valid -[wp] [Qed] Goal typed_count_post_func_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_count_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_count_pre_func_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part9 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S1_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_count = 2, - op_countOne = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ -axiomatic string_len { - logic ℤ string_len{L}(char *s) ; - - axiom strlen0{L}: ∀ char *s; \valid{L}(s) ⇒ string_len{L}(s) ≥ 0; - - axiom strlen1{L}: - ∀ char *s; - \valid{L}(s) ∧ *(s+0) ≡ '\000' ⇒ string_len{L}(s) ≡ 0; - - axiom strlen2{L}: - ∀ char *s; \valid{L}(s) ⇒ *(s+string_len{L}(s)) ≡ '\000'; - - axiom strlen3{L}: - ∀ char *s; - \valid{L}(s) ∧ *(s+0) ≢ '\000' ⇒ - string_len{L}(s) ≡ 1+string_len{L}(s+1) ∧ \valid{L}(s+1); - - axiom strlen4{L}: - ∀ char *s; - \valid{L}(s) ⇒ - (∀ ℤ i; 0 ≤ i < string_len{L}(s) ⇒ *(s+i) ≢ '\000'); - - } - */ -/*@ -predicate valid_string{L}(char *s) = - \valid{L}(s) ∧ \valid{L}(s+(0 .. string_len{L}(s))); - */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int T0_S2 = 0; */ -/*@ ghost int T0_init = 1; */ -/*@ ghost int accept_S1 = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_countOne; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ T0_S2; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ T0_S2; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - */ -void countOne_pre_func(char *argv) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_countOne; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S1_tmp = 0; - T0_init_tmp = 0; - if (T0_S2 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires 1 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S1; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_countOne; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ T0_S2; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ T0_S2; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - */ -void countOne_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_countOne; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S1_tmp = 0; - T0_init_tmp = 0; - if (T0_S2 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires 1 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S1; - requires valid_string(argv); - ensures \result ≡ string_len(\old(argv)); - - behavior Buchi_property_behavior: - ensures 0 ≡ T0_init ∧ 0 ≡ accept_S1; - ensures 1 ≡ T0_S2; - */ -int countOne(char *argv) -{ - int __retres; - int r; - int tmp; - countOne_pre_func(argv); - r = 0; - if ((int)*(argv + 0) == 0) { - __retres = 0; - goto return_label; - } - r ++; - tmp = countOne(argv + 1); - r += tmp; - __retres = r; - return_label: countOne_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_count; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - */ -void count_pre_func(int argc, char **argv) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_count; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S1_tmp = 0; - T0_init_tmp = 0; - if (accept_S1 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires 1 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S1; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_count; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_out: - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ T0_S2; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ T0_S2; - ensures 0 ≡ accept_S1; - */ -void count_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_count; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - if (T0_S2 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires 1 ≡ accept_S1 ∧ 0 ≡ T0_S2 ∧ 0 ≡ T0_init; - requires - argc > 0 ∧ \valid(argv) ∧ \valid(argv+(0 .. argc)) ∧ - (∀ ℤ i; 0 ≤ i < argc ⇒ valid_string(*(argv+i))); - ensures \result ≥ 0; - - behavior Buchi_property_behavior: - ensures 0 ≡ T0_S2 ∧ 0 ≡ T0_init; - ensures 1 ≡ accept_S1; - */ -int count(int argc, char **argv) -{ - int s; - count_pre_func(argc,argv); - s = countOne(*(argv + 0)); - if (argc > 1) { - int tmp_0; - tmp_0 = count(argc - 1,argv + 1); - s += tmp_0; - } - count_post_func(s); - return s; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_out: - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ T0_init; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ T0_init; - ensures 0 ≡ accept_S1; - */ -void main_pre_func(int argc, char **argv) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - if (T0_init == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires 1 ≡ accept_S1 ∧ 0 ≡ T0_S2 ∧ 0 ≡ T0_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ accept_S1; - */ -void main_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - if (accept_S1 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - if (accept_S1 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires 1 ≡ T0_init ∧ 0 ≡ T0_S2 ∧ 0 ≡ accept_S1; - requires - argc ≥ 0 ∧ (argc > 0 ⇒ \valid(argv)) ∧ - \valid(argv+(0 .. argc)) ∧ - (∀ ℤ i; 0 ≤ i < argc ⇒ valid_string(*(argv+i))); - ensures \result ≡ 1; - - behavior aorai_acceptance: - ensures 1 ≡ accept_S1; - - behavior Buchi_property_behavior: - ensures 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - ensures 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - ensures 0 ≡ T0_init; - ensures 1 ≡ T0_S2 ∨ 1 ≡ accept_S1; - */ -int main(int argc, char **argv) -{ - int __retres; - int somme; - main_pre_func(argc,argv); - somme = 0; - if (argc > 0) somme = count(argc,argv); - __retres = 1; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_recursion2.0.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_recursion2.0.res.oracle deleted file mode 100644 index 11708e2d1cea3cd908a55cc8fc3f9e4db16be754..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_recursion2.0.res.oracle +++ /dev/null @@ -1,555 +0,0 @@ -[kernel] Parsing tests/aorai/test_recursion2.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_recursion20.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: No definition for 'string_len' interpreted as reads nothing -[wp] warning: No definition for 'sum_tab' interpreted as reads nothing -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_count_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_count_post_func_post_2 : Valid -[wp] [Qed] Goal typed_count_post_func_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T1_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_S1_in_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_T2_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_count_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_count_pre_func_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_S1_in_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_accept_T2_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T1_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_T2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_T2_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part9 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part8 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_T2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T1_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_post_2 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_post : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_buch_state_T1_out_post : Valid -[wp] [Qed] Goal typed_sumOne_post_func_buch_state_T1_in_post : Valid -[wp] [Qed] Goal typed_sumOne_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_sumOne_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_sumOne_post_func_buch_state_accept_T2_out_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_post : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part9 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part8 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_buch_state_accept_T2_out_post : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_buch_state_T1_out_post : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_buch_state_T1_in_post : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_buch_state_T0_init_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_count = 2, - op_main = 1, - op_sumOne = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ -axiomatic string_len { - logic ℤ string_len{L}(char *s) ; - - axiom strlen0{L}: ∀ char *s; \valid{L}(s) ⇒ string_len{L}(s) ≥ 0; - - axiom strlen1{L}: - ∀ char *s; - \valid{L}(s) ∧ *(s+0) ≡ '\000' ⇒ string_len{L}(s) ≡ 0; - - axiom strlen2{L}: - ∀ char *s; \valid{L}(s) ⇒ *(s+string_len{L}(s)) ≡ '\000'; - - axiom strlen3{L}: - ∀ char *s; - \valid{L}(s) ∧ *(s+0) ≢ '\000' ⇒ - string_len{L}(s) ≡ 1+string_len{L}(s+1) ∧ \valid{L}(s+1); - - axiom strlen4{L}: - ∀ char *s; - \valid{L}(s) ⇒ - (∀ ℤ i; 0 ≤ i < string_len{L}(s) ⇒ *(s+i) ≢ '\000'); - - } - */ -/*@ -predicate valid_string{L}(char *s) = - \valid{L}(s) ∧ \valid{L}(s+(0 .. string_len{L}(s))); - */ -/*@ -axiomatic sum_tab { - logic ℤ sum_tab{L}(char *t, ℤ l, ℤ i) ; - - axiom sum_tab0{L}: - ∀ char *t, ℤ l; - \valid{L}(t+(0 .. l)) ⇒ sum_tab{L}(t, l, 0) ≡ *(t+0); - - axiom sum_tabi{L}: - ∀ char *t, ℤ l, ℤ i; - \valid{L}(t+(0 .. l)) ∧ 0 < i ≤ l ⇒ - sum_tab{L}(t, l, i) ≡ sum_tab{L}(t, l, i-1)+*(t+i); - - axiom sum_tabn{L}: - ∀ char *t, ℤ l; - \valid{L}(t+(0 .. l)) ∧ l > 0 ∧ l ≡ string_len{L}(t) ⇒ - sum_tab{L}(t, l, l) ≡ sum_tab{L}(t, l, l-1); - - } - */ -int global_argc = 0; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int S1 = 0; */ -/*@ ghost int T0_init = 1; */ -/*@ ghost int T1 = 0; */ -/*@ ghost int accept_T2 = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_count; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, - accept_T2; - - behavior buch_state_S1_in: - assumes (1 ≡ T1 ∧ global_argc > 0) ∨ 1 ≡ S1; - ensures 1 ≡ S1; - - behavior buch_state_S1_out: - assumes (0 ≡ T1 ∨ ¬(global_argc > 0)) ∧ 0 ≡ S1; - ensures 0 ≡ S1; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_out: - ensures 0 ≡ T1; - - behavior buch_state_accept_T2_out: - ensures 0 ≡ accept_T2; - */ -void count_pre_func(char *argv) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_tmp; */ - /*@ ghost int accept_T2_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_count; - S1_tmp = S1; - T0_init_tmp = T0_init; - T1_tmp = T1; - accept_T2_tmp = accept_T2; - accept_T2_tmp = 0; - T1_tmp = 0; - T0_init_tmp = 0; - if (S1 == 1) S1_tmp = 1; - else - if (T1 == 1) - if (global_argc > 0) S1_tmp = 1; else S1_tmp = 0; - else S1_tmp = 0; - S1 = S1_tmp; - T0_init = T0_init_tmp; - T1 = T1_tmp; - accept_T2 = accept_T2_tmp; - return; -} - -/*@ requires 1 ≡ S1 ∧ 0 ≡ T0_init ∧ 0 ≡ T1 ∧ 0 ≡ accept_T2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_count; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, - accept_T2; - - behavior buch_state_S1_in: - assumes 1 ≡ S1; - ensures 1 ≡ S1; - - behavior buch_state_S1_out: - assumes 0 ≡ S1; - ensures 0 ≡ S1; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_out: - ensures 0 ≡ T1; - - behavior buch_state_accept_T2_out: - ensures 0 ≡ accept_T2; - */ -void count_post_func(int res) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_tmp; */ - /*@ ghost int accept_T2_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_count; - S1_tmp = S1; - T0_init_tmp = T0_init; - T1_tmp = T1; - accept_T2_tmp = accept_T2; - accept_T2_tmp = 0; - T1_tmp = 0; - T0_init_tmp = 0; - if (S1 == 1) S1_tmp = 1; else S1_tmp = 0; - S1 = S1_tmp; - T0_init = T0_init_tmp; - T1 = T1_tmp; - accept_T2 = accept_T2_tmp; - return; -} - -/*@ requires (1 ≡ S1 ∨ 1 ≡ T1) ∧ 0 ≡ T0_init ∧ 0 ≡ accept_T2; - requires 1 ≡ T1 ⇒ global_argc > 0; - requires 1 ≡ T1 ∨ 0 ≡ T1; - requires 1 ≡ S1 ∨ 0 ≡ S1; - requires valid_string(argv); - ensures \result ≡ string_len(\old(argv)); - - behavior Buchi_property_behavior: - ensures 0 ≡ T0_init ∧ 0 ≡ T1 ∧ 0 ≡ accept_T2; - ensures 1 ≡ S1; - */ -int count(char *argv) -{ - int __retres; - int tmp; - count_pre_func(argv); - if ((int)*(argv + 0) == 0) { - __retres = 0; - goto return_label; - } - tmp = count(argv + 1); - __retres = 1 + tmp; - return_label: count_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_sumOne; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, - accept_T2; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_in: - assumes 1 ≡ S1; - ensures 1 ≡ T1; - - behavior buch_state_T1_out: - assumes 0 ≡ S1; - ensures 0 ≡ T1; - - behavior buch_state_accept_T2_out: - ensures 0 ≡ accept_T2; - */ -void sumOne_pre_func(char *t, int length) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_tmp; */ - /*@ ghost int accept_T2_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_sumOne; - S1_tmp = S1; - T0_init_tmp = T0_init; - T1_tmp = T1; - accept_T2_tmp = accept_T2; - accept_T2_tmp = 0; - if (S1 == 1) T1_tmp = 1; else T1_tmp = 0; - T0_init_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - T0_init = T0_init_tmp; - T1 = T1_tmp; - accept_T2 = accept_T2_tmp; - return; -} - -/*@ requires 1 ≡ T1 ∧ 0 ≡ S1 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_T2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_sumOne; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, - accept_T2; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_in: - assumes 1 ≡ T1; - ensures 1 ≡ T1; - - behavior buch_state_T1_out: - assumes 0 ≡ T1; - ensures 0 ≡ T1; - - behavior buch_state_accept_T2_out: - ensures 0 ≡ accept_T2; - */ -void sumOne_post_func(int res) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_tmp; */ - /*@ ghost int accept_T2_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_sumOne; - S1_tmp = S1; - T0_init_tmp = T0_init; - T1_tmp = T1; - accept_T2_tmp = accept_T2; - accept_T2_tmp = 0; - if (T1 == 1) T1_tmp = 1; else T1_tmp = 0; - T0_init_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - T0_init = T0_init_tmp; - T1 = T1_tmp; - accept_T2 = accept_T2_tmp; - return; -} - -/*@ requires 1 ≡ S1 ∧ 0 ≡ T0_init ∧ 0 ≡ T1 ∧ 0 ≡ accept_T2; - requires valid_string(t) ∧ length ≥ 0 ∧ length ≡ string_len(t); - ensures \result ≡ sum_tab(\old(t), \old(length), \old(length)); - - behavior Buchi_property_behavior: - ensures 0 ≡ S1 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_T2; - ensures 1 ≡ T1; - */ -int sumOne(char *t, int length) -{ - int aorai_Loop_Init_42; - int sum; - int i; - sumOne_pre_func(t,length); - sum = 0; - i = 0; - i = 0; - /*@ ghost aorai_Loop_Init_42 = 1; */ - aorai_loop_42: - /*@ loop invariant ranges: 0 ≤ i ≤ length; - loop invariant sumValue0: i ≡ 0 ⇒ sum ≡ 0; - loop invariant sumValuei: i > 0 ⇒ sum ≡ sum_tab(t, length, i-1); - loop invariant Aorai: 0 ≡ S1; - loop invariant Aorai: 0 ≡ T0_init; - loop invariant Aorai: 1 ≡ T1; - loop invariant Aorai: 0 ≡ accept_T2; - */ - while (1) { - if (! (i < length)) goto while_0_break; - /*@ ghost aorai_Loop_Init_42 = 0; */ - sum += (int)*(t + i); - i ++; - } - while_0_break: ; - sumOne_post_func(sum); - return sum; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, - accept_T2; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_in: - assumes 1 ≡ T0_init; - ensures 1 ≡ T1; - - behavior buch_state_T1_out: - assumes 0 ≡ T0_init; - ensures 0 ≡ T1; - - behavior buch_state_accept_T2_out: - ensures 0 ≡ accept_T2; - */ -void main_pre_func(int argc, char **argv) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_tmp; */ - /*@ ghost int accept_T2_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - S1_tmp = S1; - T0_init_tmp = T0_init; - T1_tmp = T1; - accept_T2_tmp = accept_T2; - accept_T2_tmp = 0; - if (T0_init == 1) T1_tmp = 1; else T1_tmp = 0; - T0_init_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - T0_init = T0_init_tmp; - T1 = T1_tmp; - accept_T2 = accept_T2_tmp; - return; -} - -/*@ requires 1 ≡ T1 ∧ 0 ≡ S1 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_T2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, - accept_T2; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_in: - assumes 1 ≡ T1; - ensures 1 ≡ T1; - - behavior buch_state_T1_out: - assumes 0 ≡ T1; - ensures 0 ≡ T1; - - behavior buch_state_accept_T2_in: - assumes 1 ≡ T1; - ensures 1 ≡ accept_T2; - - behavior buch_state_accept_T2_out: - assumes 0 ≡ T1; - ensures 0 ≡ accept_T2; - */ -void main_post_func(int res) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_tmp; */ - /*@ ghost int accept_T2_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - S1_tmp = S1; - T0_init_tmp = T0_init; - T1_tmp = T1; - accept_T2_tmp = accept_T2; - if (T1 == 1) accept_T2_tmp = 1; else accept_T2_tmp = 0; - if (T1 == 1) T1_tmp = 1; else T1_tmp = 0; - T0_init_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - T0_init = T0_init_tmp; - T1 = T1_tmp; - accept_T2 = accept_T2_tmp; - return; -} - -/*@ requires 1 ≡ T0_init ∧ 0 ≡ S1 ∧ 0 ≡ T1 ∧ 0 ≡ accept_T2; - requires - argc ≥ 0 ∧ (argc > 0 ⇒ \valid(argv) ∧ valid_string(*(argv+0))); - ensures \result ≡ 1; - - behavior aorai_acceptance: - ensures 1 ≡ accept_T2; - - behavior Buchi_property_behavior: - ensures 1 ≡ T1 ∨ 0 ≡ T1; - ensures 1 ≡ accept_T2 ∨ 0 ≡ accept_T2; - ensures 0 ≡ S1 ∧ 0 ≡ T0_init; - ensures 1 ≡ T1 ∨ 1 ≡ accept_T2; - */ -int main(int argc, char **argv) -{ - int __retres; - int sum; - int length; - main_pre_func(argc,argv); - sum = 0; - global_argc = argc; - if (argc > 0) { - length = count(*(argv + 0)); - sum = sumOne(*(argv + 0),length); - } - __retres = 1; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_recursion2.1.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_recursion2.1.res.oracle deleted file mode 100644 index 3147fb0b473ab66376dd1d39b5ea0587311839a1..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_recursion2.1.res.oracle +++ /dev/null @@ -1,559 +0,0 @@ -[kernel] Parsing tests/aorai/test_recursion2.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_recursion21.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: No definition for 'string_len' interpreted as reads nothing -[wp] warning: No definition for 'sum_tab' interpreted as reads nothing -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_count_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_count_post_func_post_2 : Valid -[wp] [Qed] Goal typed_count_post_func_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T1_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_S1_in_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_T2_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_count_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_count_pre_func_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_S1_in_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_accept_T2_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_T2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_T2_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T1_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part9 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part8 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_T2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T1_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_post_2 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_post : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_sumOne_post_func_buch_state_T1_out_post : Valid -[wp] [Qed] Goal typed_sumOne_post_func_buch_state_T1_in_post : Valid -[wp] [Qed] Goal typed_sumOne_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_sumOne_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_sumOne_post_func_buch_state_accept_T2_out_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_post : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part9 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part8 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_buch_state_accept_T2_out_post : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_buch_state_T1_out_post : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_buch_state_T1_in_post : Valid -[wp] [Qed] Goal typed_sumOne_pre_func_buch_state_T0_init_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_count = 2, - op_main = 1, - op_sumOne = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ -axiomatic string_len { - logic ℤ string_len{L}(char *s) ; - - axiom strlen0{L}: ∀ char *s; \valid{L}(s) ⇒ string_len{L}(s) ≥ 0; - - axiom strlen1{L}: - ∀ char *s; - \valid{L}(s) ∧ *(s+0) ≡ '\000' ⇒ string_len{L}(s) ≡ 0; - - axiom strlen2{L}: - ∀ char *s; \valid{L}(s) ⇒ *(s+string_len{L}(s)) ≡ '\000'; - - axiom strlen3{L}: - ∀ char *s; - \valid{L}(s) ∧ *(s+0) ≢ '\000' ⇒ - string_len{L}(s) ≡ 1+string_len{L}(s+1) ∧ \valid{L}(s+1); - - axiom strlen4{L}: - ∀ char *s; - \valid{L}(s) ⇒ - (∀ ℤ i; 0 ≤ i < string_len{L}(s) ⇒ *(s+i) ≢ '\000'); - - } - */ -/*@ -predicate valid_string{L}(char *s) = - \valid{L}(s) ∧ \valid{L}(s+(0 .. string_len{L}(s))); - */ -/*@ -axiomatic sum_tab { - logic ℤ sum_tab{L}(char *t, ℤ l, ℤ i) ; - - axiom sum_tab0{L}: - ∀ char *t, ℤ l; - \valid{L}(t+(0 .. l)) ⇒ sum_tab{L}(t, l, 0) ≡ *(t+0); - - axiom sum_tabi{L}: - ∀ char *t, ℤ l, ℤ i; - \valid{L}(t+(0 .. l)) ∧ 0 < i ≤ l ⇒ - sum_tab{L}(t, l, i) ≡ sum_tab{L}(t, l, i-1)+*(t+i); - - axiom sum_tabn{L}: - ∀ char *t, ℤ l; - \valid{L}(t+(0 .. l)) ∧ l > 0 ∧ l ≡ string_len{L}(t) ⇒ - sum_tab{L}(t, l, l) ≡ sum_tab{L}(t, l, l-1); - - } - */ -int global_argc = 0; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int S1 = 0; */ -/*@ ghost int T0_init = 1; */ -/*@ ghost int T1 = 0; */ -/*@ ghost int accept_T2 = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_count; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, - accept_T2; - - behavior buch_state_S1_in: - assumes (1 ≡ T1 ∧ global_argc > 0) ∨ 1 ≡ S1; - ensures 1 ≡ S1; - - behavior buch_state_S1_out: - assumes (0 ≡ T1 ∨ ¬(global_argc > 0)) ∧ 0 ≡ S1; - ensures 0 ≡ S1; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_out: - ensures 0 ≡ T1; - - behavior buch_state_accept_T2_out: - ensures 0 ≡ accept_T2; - */ -void count_pre_func(char *argv) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_tmp; */ - /*@ ghost int accept_T2_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_count; - S1_tmp = S1; - T0_init_tmp = T0_init; - T1_tmp = T1; - accept_T2_tmp = accept_T2; - accept_T2_tmp = 0; - T1_tmp = 0; - T0_init_tmp = 0; - if (S1 == 1) S1_tmp = 1; - else - if (T1 == 1) - if (global_argc > 0) S1_tmp = 1; else S1_tmp = 0; - else S1_tmp = 0; - S1 = S1_tmp; - T0_init = T0_init_tmp; - T1 = T1_tmp; - accept_T2 = accept_T2_tmp; - return; -} - -/*@ requires 1 ≡ S1 ∧ 0 ≡ T0_init ∧ 0 ≡ T1 ∧ 0 ≡ accept_T2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_count; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, - accept_T2; - - behavior buch_state_S1_in: - assumes 1 ≡ S1; - ensures 1 ≡ S1; - - behavior buch_state_S1_out: - assumes 0 ≡ S1; - ensures 0 ≡ S1; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_out: - ensures 0 ≡ T1; - - behavior buch_state_accept_T2_out: - ensures 0 ≡ accept_T2; - */ -void count_post_func(int res) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_tmp; */ - /*@ ghost int accept_T2_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_count; - S1_tmp = S1; - T0_init_tmp = T0_init; - T1_tmp = T1; - accept_T2_tmp = accept_T2; - accept_T2_tmp = 0; - T1_tmp = 0; - T0_init_tmp = 0; - if (S1 == 1) S1_tmp = 1; else S1_tmp = 0; - S1 = S1_tmp; - T0_init = T0_init_tmp; - T1 = T1_tmp; - accept_T2 = accept_T2_tmp; - return; -} - -/*@ requires (1 ≡ S1 ∨ 1 ≡ T1) ∧ 0 ≡ T0_init ∧ 0 ≡ accept_T2; - requires 1 ≡ T1 ⇒ global_argc > 0; - requires 1 ≡ T1 ∨ 0 ≡ T1; - requires 1 ≡ S1 ∨ 0 ≡ S1; - requires valid_string(argv); - ensures \result ≡ string_len(\old(argv)); - - behavior Buchi_property_behavior: - ensures 0 ≡ T0_init ∧ 0 ≡ T1 ∧ 0 ≡ accept_T2; - ensures 1 ≡ S1; - */ -int count(char *argv) -{ - int __retres; - int tmp; - count_pre_func(argv); - if ((int)*(argv + 0) == 0) { - __retres = 0; - goto return_label; - } - tmp = count(argv + 1); - __retres = 1 + tmp; - return_label: count_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_sumOne; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, - accept_T2; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_in: - assumes 1 ≡ S1; - ensures 1 ≡ T1; - - behavior buch_state_T1_out: - assumes 0 ≡ S1; - ensures 0 ≡ T1; - - behavior buch_state_accept_T2_out: - ensures 0 ≡ accept_T2; - */ -void sumOne_pre_func(char *t, int length) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_tmp; */ - /*@ ghost int accept_T2_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_sumOne; - S1_tmp = S1; - T0_init_tmp = T0_init; - T1_tmp = T1; - accept_T2_tmp = accept_T2; - accept_T2_tmp = 0; - if (S1 == 1) T1_tmp = 1; else T1_tmp = 0; - T0_init_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - T0_init = T0_init_tmp; - T1 = T1_tmp; - accept_T2 = accept_T2_tmp; - return; -} - -/*@ requires 1 ≡ T1 ∧ 0 ≡ S1 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_T2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_sumOne; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, - accept_T2; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_in: - assumes 1 ≡ T1; - ensures 1 ≡ T1; - - behavior buch_state_T1_out: - assumes 0 ≡ T1; - ensures 0 ≡ T1; - - behavior buch_state_accept_T2_out: - ensures 0 ≡ accept_T2; - */ -void sumOne_post_func(int res) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_tmp; */ - /*@ ghost int accept_T2_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_sumOne; - S1_tmp = S1; - T0_init_tmp = T0_init; - T1_tmp = T1; - accept_T2_tmp = accept_T2; - accept_T2_tmp = 0; - if (T1 == 1) T1_tmp = 1; else T1_tmp = 0; - T0_init_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - T0_init = T0_init_tmp; - T1 = T1_tmp; - accept_T2 = accept_T2_tmp; - return; -} - -/*@ requires 1 ≡ S1 ∧ 0 ≡ T0_init ∧ 0 ≡ T1 ∧ 0 ≡ accept_T2; - requires valid_string(t) ∧ length ≥ 0 ∧ length ≡ string_len(t); - ensures \result ≡ sum_tab(\old(t), \old(length), \old(length)); - - behavior Buchi_property_behavior: - ensures 0 ≡ S1 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_T2; - ensures 1 ≡ T1; - */ -int sumOne(char *t, int length) -{ - int aorai_Loop_Init_42; - int sum; - int i; - sumOne_pre_func(t,length); - sum = 0; - i = 0; - i = 0; - /*@ ghost aorai_Loop_Init_42 = 1; */ - aorai_loop_42: - /*@ loop invariant ranges: 0 ≤ i ≤ length; - loop invariant sumValue0: i ≡ 0 ⇒ sum ≡ 0; - loop invariant sumValuei: i > 0 ⇒ sum ≡ sum_tab(t, length, i-1); - loop invariant Aorai: 0 ≡ S1; - loop invariant Aorai: 0 ≡ T0_init; - loop invariant Aorai: 1 ≡ T1; - loop invariant Aorai: 0 ≡ accept_T2; - */ - while (1) { - if (! (i < length)) goto while_0_break; - /*@ ghost aorai_Loop_Init_42 = 0; */ - sum += (int)*(t + i); - i ++; - } - while_0_break: ; - sumOne_post_func(sum); - return sum; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, - accept_T2; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_in: - assumes 1 ≡ T0_init; - ensures 1 ≡ T1; - - behavior buch_state_T1_out: - assumes 0 ≡ T0_init; - ensures 0 ≡ T1; - - behavior buch_state_accept_T2_out: - ensures 0 ≡ accept_T2; - */ -void main_pre_func(int argc, char **argv) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_tmp; */ - /*@ ghost int accept_T2_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - S1_tmp = S1; - T0_init_tmp = T0_init; - T1_tmp = T1; - accept_T2_tmp = accept_T2; - accept_T2_tmp = 0; - if (T0_init == 1) T1_tmp = 1; else T1_tmp = 0; - T0_init_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - T0_init = T0_init_tmp; - T1 = T1_tmp; - accept_T2 = accept_T2_tmp; - return; -} - -/*@ requires 1 ≡ T1 ∧ 0 ≡ S1 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_T2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, - accept_T2; - - behavior buch_state_S1_out: - ensures 0 ≡ S1; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_T1_in: - assumes 1 ≡ T1; - ensures 1 ≡ T1; - - behavior buch_state_T1_out: - assumes 0 ≡ T1; - ensures 0 ≡ T1; - - behavior buch_state_accept_T2_in: - assumes 1 ≡ T1 ∧ res ≡ 1; - ensures 1 ≡ accept_T2; - - behavior buch_state_accept_T2_out: - assumes 0 ≡ T1 ∨ ¬(res ≡ 1); - ensures 0 ≡ accept_T2; - */ -void main_post_func(int res) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int T1_tmp; */ - /*@ ghost int accept_T2_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - S1_tmp = S1; - T0_init_tmp = T0_init; - T1_tmp = T1; - accept_T2_tmp = accept_T2; - if (T1 == 1) - if (res == 1) accept_T2_tmp = 1; else accept_T2_tmp = 0; - else accept_T2_tmp = 0; - if (T1 == 1) T1_tmp = 1; else T1_tmp = 0; - T0_init_tmp = 0; - S1_tmp = 0; - S1 = S1_tmp; - T0_init = T0_init_tmp; - T1 = T1_tmp; - accept_T2 = accept_T2_tmp; - return; -} - -/*@ requires 1 ≡ T0_init ∧ 0 ≡ S1 ∧ 0 ≡ T1 ∧ 0 ≡ accept_T2; - requires - argc ≥ 0 ∧ (argc > 0 ⇒ \valid(argv) ∧ valid_string(*(argv+0))); - ensures \result ≡ 1; - - behavior aorai_acceptance: - ensures 1 ≡ accept_T2; - - behavior Buchi_property_behavior: - ensures 1 ≡ accept_T2 ⇒ \result ≡ 1; - ensures 1 ≡ T1 ∨ 0 ≡ T1; - ensures 1 ≡ accept_T2 ∨ 0 ≡ accept_T2; - ensures 0 ≡ S1 ∧ 0 ≡ T0_init; - ensures 1 ≡ T1 ∨ 1 ≡ accept_T2; - */ -int main(int argc, char **argv) -{ - int __retres; - int sum; - int length; - main_pre_func(argc,argv); - sum = 0; - global_argc = argc; - if (argc > 0) { - length = count(*(argv + 0)); - sum = sumOne(*(argv + 0),length); - } - __retres = 1; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_recursion4.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_recursion4.res.oracle deleted file mode 100644 index 742aff39a927383abfbbb2be8d371c6be872186a..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_recursion4.res.oracle +++ /dev/null @@ -1,446 +0,0 @@ -[kernel] Parsing tests/aorai/test_recursion4.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_recursion40.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_foo_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_foo_post_func_post_2 : Valid -[wp] [Qed] Goal typed_foo_post_func_post : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_foo_post_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_foo_post_func_buch_state_End_in_post : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_foo_post_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_foo_post_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_foo_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_foo_pre_func_post : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_foo_pre_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_foo_pre_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_foo_pre_func_buch_state_End_in_post : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_foo_pre_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_post_2 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_buch_state_End_in_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_buch_state_WillDoFoo_in_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_post : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_buch_state_Idle_in_post : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_End_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_Idle_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_WillDoFoo_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_foo = 2, - op_isPresent = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -#pragma JessieIntegerModel(math) -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int End = 0; */ -/*@ ghost int Idle = 1; */ -/*@ ghost int WillDoFoo = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_isPresent; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; - - behavior buch_state_End_out: - ensures 0 ≡ End; - - behavior buch_state_Idle_in: - assumes 1 ≡ Idle; - ensures 1 ≡ Idle; - - behavior buch_state_Idle_out: - assumes 0 ≡ Idle; - ensures 0 ≡ Idle; - - behavior buch_state_WillDoFoo_out: - ensures 0 ≡ WillDoFoo; - */ -void isPresent_pre_func(int *t, int size, int val) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_isPresent; - End_tmp = End; - Idle_tmp = Idle; - WillDoFoo_tmp = WillDoFoo; - WillDoFoo_tmp = 0; - if (Idle == 1) Idle_tmp = 1; else Idle_tmp = 0; - End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires 1 ≡ End ∨ 1 ≡ Idle ∨ 1 ≡ WillDoFoo; - requires 1 ≡ End ⇒ res ≢ -1; - requires 1 ≡ Idle ⇒ res ≢ -1 ∨ res ≡ -1; - requires 1 ≡ WillDoFoo ⇒ res ≡ -1; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_isPresent; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; - - behavior buch_state_End_in: - assumes (1 ≡ Idle ∧ res ≢ -1) ∨ (1 ≡ End ∧ res ≢ -1); - ensures 1 ≡ End; - - behavior buch_state_End_out: - assumes - (0 ≡ Idle ∨ ¬(res ≢ -1)) ∧ (0 ≡ End ∨ ¬(res ≢ -1)); - ensures 0 ≡ End; - - behavior buch_state_Idle_out: - ensures 0 ≡ Idle; - - behavior buch_state_WillDoFoo_in: - assumes - (1 ≡ WillDoFoo ∧ res ≡ -1) ∨ (1 ≡ Idle ∧ res ≡ -1); - ensures 1 ≡ WillDoFoo; - - behavior buch_state_WillDoFoo_out: - assumes - (0 ≡ WillDoFoo ∨ ¬(res ≡ -1)) ∧ - (0 ≡ Idle ∨ ¬(res ≡ -1)); - ensures 0 ≡ WillDoFoo; - */ -void isPresent_post_func(int res) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_isPresent; - End_tmp = End; - Idle_tmp = Idle; - WillDoFoo_tmp = WillDoFoo; - if (Idle == 1) { - if (res == -1) WillDoFoo_tmp = 1; else goto _LAND; - } - else { - _LAND: ; - if (WillDoFoo == 1) - if (res == -1) WillDoFoo_tmp = 1; else WillDoFoo_tmp = 0; - else WillDoFoo_tmp = 0; - } - Idle_tmp = 0; - if (End == 1) { - if (res != -1) End_tmp = 1; else goto _LAND_0; - } - else { - _LAND_0: ; - if (Idle == 1) - if (res != -1) End_tmp = 1; else End_tmp = 0; - else End_tmp = 0; - } - End = End_tmp; - Idle = Idle_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires 1 ≡ Idle ∧ 0 ≡ End ∧ 0 ≡ WillDoFoo; - requires \valid(t+(0 .. size-1)); - requires size ≥ 0; - decreases size; - ensures -1 ≤ \result < \old(size); - - behavior found: - ensures 0 ≤ \result ⇒ *(\old(t)+\result) ≡ \old(val); - - behavior notIn: - ensures - \result ≡ -1 ⇒ - (∀ ℤ i; 0 ≤ i < \old(size) ⇒ *(\old(t)+i) ≢ \old(val)); - - behavior Buchi_property_behavior: - ensures - (1 ≡ End ⇒ \result ≢ -1) ∧ - (1 ≡ WillDoFoo ⇒ \result ≡ -1); - ensures 1 ≡ End ∨ 0 ≡ End; - ensures 1 ≡ WillDoFoo ∨ 0 ≡ WillDoFoo; - ensures 0 ≡ Idle; - ensures 1 ≡ End ∨ 1 ≡ WillDoFoo; - */ -int isPresent(int *t, int size, int val) -{ - int __retres; - int r; - int tmp; - isPresent_pre_func(t,size,val); - if (size == 0) { - __retres = -1; - goto return_label; - } - if (*(t + 0) == val) { - __retres = 0; - goto return_label; - } - tmp = isPresent(t + 1,size - 1,val); - r = 1 + tmp; - if (r == 0) r = -1; - __retres = r; - return_label: isPresent_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_foo; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; - - behavior buch_state_End_in: - assumes 1 ≡ WillDoFoo; - ensures 1 ≡ End; - - behavior buch_state_End_out: - assumes 0 ≡ WillDoFoo; - ensures 0 ≡ End; - - behavior buch_state_Idle_out: - ensures 0 ≡ Idle; - - behavior buch_state_WillDoFoo_out: - ensures 0 ≡ WillDoFoo; - */ -void foo_pre_func(void) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_foo; - End_tmp = End; - Idle_tmp = Idle; - WillDoFoo_tmp = WillDoFoo; - WillDoFoo_tmp = 0; - Idle_tmp = 0; - if (WillDoFoo == 1) End_tmp = 1; else End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires 1 ≡ End ∧ 0 ≡ Idle ∧ 0 ≡ WillDoFoo; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_foo; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; - - behavior buch_state_End_in: - assumes 1 ≡ End; - ensures 1 ≡ End; - - behavior buch_state_End_out: - assumes 0 ≡ End; - ensures 0 ≡ End; - - behavior buch_state_Idle_out: - ensures 0 ≡ Idle; - - behavior buch_state_WillDoFoo_out: - ensures 0 ≡ WillDoFoo; - */ -void foo_post_func(void) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_foo; - End_tmp = End; - Idle_tmp = Idle; - WillDoFoo_tmp = WillDoFoo; - WillDoFoo_tmp = 0; - Idle_tmp = 0; - if (End == 1) End_tmp = 1; else End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires 1 ≡ WillDoFoo ∧ 0 ≡ End ∧ 0 ≡ Idle; - - behavior Buchi_property_behavior: - ensures 0 ≡ Idle ∧ 0 ≡ WillDoFoo; - ensures 1 ≡ End; - */ -void foo(void) -{ - foo_pre_func(); - foo_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; - - behavior buch_state_End_out: - ensures 0 ≡ End; - - behavior buch_state_Idle_in: - assumes 1 ≡ Idle; - ensures 1 ≡ Idle; - - behavior buch_state_Idle_out: - assumes 0 ≡ Idle; - ensures 0 ≡ Idle; - - behavior buch_state_WillDoFoo_out: - ensures 0 ≡ WillDoFoo; - */ -void main_pre_func(int argc, char **argv) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - End_tmp = End; - Idle_tmp = Idle; - WillDoFoo_tmp = WillDoFoo; - WillDoFoo_tmp = 0; - if (Idle == 1) Idle_tmp = 1; else Idle_tmp = 0; - End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires 1 ≡ End ∧ 0 ≡ Idle ∧ 0 ≡ WillDoFoo; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; - - behavior buch_state_End_in: - assumes 1 ≡ End; - ensures 1 ≡ End; - - behavior buch_state_End_out: - assumes 0 ≡ End; - ensures 0 ≡ End; - - behavior buch_state_Idle_out: - ensures 0 ≡ Idle; - - behavior buch_state_WillDoFoo_out: - ensures 0 ≡ WillDoFoo; - */ -void main_post_func(int res) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - End_tmp = End; - Idle_tmp = Idle; - WillDoFoo_tmp = WillDoFoo; - WillDoFoo_tmp = 0; - Idle_tmp = 0; - if (End == 1) End_tmp = 1; else End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires 1 ≡ Idle ∧ 0 ≡ End ∧ 0 ≡ WillDoFoo; - - behavior aorai_acceptance: - ensures 1 ≡ End; - - behavior Buchi_property_behavior: - ensures 0 ≡ Idle ∧ 0 ≡ WillDoFoo; - ensures 1 ≡ End; - */ -int main(int argc, char **argv) -{ - int __retres; - int tab[4]; - int r; - main_pre_func(argc,argv); - tab[0] = 10; - tab[1] = 20; - tab[2] = 33; - tab[3] = 15; - r = isPresent(tab,4,33); - if (r == -1) foo(); - __retres = 1; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_recursion5.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_recursion5.res.oracle deleted file mode 100644 index d19ffd1364213d90e472befbc3219d8ac7e1fc2e..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_recursion5.res.oracle +++ /dev/null @@ -1,687 +0,0 @@ -[kernel] Parsing tests/aorai/test_recursion5.c (with preprocessing) -tests/aorai/test_recursion5.c:12:[kernel] warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -tests/aorai/test_recursion5.c:28:[kernel] warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_recursion50.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_foo_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_foo_post_func_post_2 : Valid -[wp] [Qed] Goal typed_foo_post_func_post : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_foo_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_foo_post_func_buch_state_IgnoreFoo_out_post : Valid -[wp] [Qed] Goal typed_foo_post_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_foo_post_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_foo_post_func_buch_state_End_in_post : Valid -[wp] [Qed] Goal typed_foo_post_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_foo_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_foo_pre_func_post : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_foo_pre_func_buch_state_End_in_post : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part9 : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part8 : Valid -[wp] [Qed] Goal typed_foo_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_foo_pre_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_foo_pre_func_buch_state_IgnoreFoo_out_post : Valid -[wp] [Qed] Goal typed_foo_pre_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_foo_pre_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_post_2 : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_post : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_buch_state_IgnoreFoo_in_post : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_buch_state_WillDoFoo_in_post : Valid -[wp] [Qed] Goal typed_isPresentRec_post_func_buch_state_IgnoreFoo_out_post : Valid -[wp] [Qed] Goal typed_isPresentRec_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_isPresentRec_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_isPresentRec_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_isPresentRec_pre_func_post : Valid -[wp] [Qed] Goal typed_isPresentRec_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_isPresentRec_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_isPresentRec_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_isPresentRec_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_isPresentRec_pre_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_isPresentRec_pre_func_assign_part9 : Valid -[wp] [Qed] Goal typed_isPresentRec_pre_func_assign_part8 : Valid -[wp] [Qed] Goal typed_isPresentRec_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_isPresentRec_pre_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_isPresentRec_pre_func_buch_state_IgnoreFoo_out_post : Valid -[wp] [Qed] Goal typed_isPresentRec_pre_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_isPresentRec_pre_func_buch_state_Idle_in_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_post_2 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_buch_state_End_in_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_isPresent_post_func_buch_state_WillDoFoo_in_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_buch_state_IgnoreFoo_out_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_isPresent_post_func_buch_state_WillDoFoo_out_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_post : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part9 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part8 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_buch_state_IgnoreFoo_out_post : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_isPresent_pre_func_buch_state_Idle_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_IgnoreFoo_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_End_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_End_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part9 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part8 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_WillDoFoo_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_IgnoreFoo_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_Idle_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_Idle_in_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_foo = 3, - op_isPresent = 2, - op_isPresentRec = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int End = 0; */ -/*@ ghost int Idle = 1; */ -/*@ ghost int IgnoreFoo = 0; */ -/*@ ghost int WillDoFoo = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_isPresentRec; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, IgnoreFoo, - WillDoFoo; - - behavior buch_state_End_out: - ensures 0 ≡ End; - - behavior buch_state_Idle_in: - assumes 1 ≡ Idle; - ensures 1 ≡ Idle; - - behavior buch_state_Idle_out: - assumes 0 ≡ Idle; - ensures 0 ≡ Idle; - - behavior buch_state_IgnoreFoo_out: - ensures 0 ≡ IgnoreFoo; - - behavior buch_state_WillDoFoo_out: - ensures 0 ≡ WillDoFoo; - */ -void isPresentRec_pre_func(int *t, int i, int max, int val) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int IgnoreFoo_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_isPresentRec; - End_tmp = End; - Idle_tmp = Idle; - IgnoreFoo_tmp = IgnoreFoo; - WillDoFoo_tmp = WillDoFoo; - WillDoFoo_tmp = 0; - IgnoreFoo_tmp = 0; - if (Idle == 1) Idle_tmp = 1; else Idle_tmp = 0; - End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - IgnoreFoo = IgnoreFoo_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires - (1 ≡ Idle ∨ 1 ≡ IgnoreFoo ∨ 1 ≡ WillDoFoo) ∧ 0 ≡ End; - requires 1 ≡ Idle ⇒ res ≢ -1 ∨ res ≡ -1; - requires 1 ≡ IgnoreFoo ⇒ res ≢ -1; - requires 1 ≡ WillDoFoo ⇒ res ≡ -1; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_isPresentRec; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, IgnoreFoo, - WillDoFoo; - - behavior buch_state_End_out: - ensures 0 ≡ End; - - behavior buch_state_Idle_out: - ensures 0 ≡ Idle; - - behavior buch_state_IgnoreFoo_in: - assumes - (1 ≡ IgnoreFoo ∧ res ≢ -1) ∨ (1 ≡ Idle ∧ res ≢ -1); - ensures 1 ≡ IgnoreFoo; - - behavior buch_state_IgnoreFoo_out: - assumes - (0 ≡ IgnoreFoo ∨ ¬(res ≢ -1)) ∧ - (0 ≡ Idle ∨ ¬(res ≢ -1)); - ensures 0 ≡ IgnoreFoo; - - behavior buch_state_WillDoFoo_in: - assumes - (1 ≡ WillDoFoo ∧ res ≡ -1) ∨ (1 ≡ Idle ∧ res ≡ -1); - ensures 1 ≡ WillDoFoo; - - behavior buch_state_WillDoFoo_out: - assumes - (0 ≡ WillDoFoo ∨ ¬(res ≡ -1)) ∧ - (0 ≡ Idle ∨ ¬(res ≡ -1)); - ensures 0 ≡ WillDoFoo; - */ -void isPresentRec_post_func(int res) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int IgnoreFoo_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_isPresentRec; - End_tmp = End; - Idle_tmp = Idle; - IgnoreFoo_tmp = IgnoreFoo; - WillDoFoo_tmp = WillDoFoo; - if (Idle == 1) { - if (res == -1) WillDoFoo_tmp = 1; else goto _LAND; - } - else { - _LAND: ; - if (WillDoFoo == 1) - if (res == -1) WillDoFoo_tmp = 1; else WillDoFoo_tmp = 0; - else WillDoFoo_tmp = 0; - } - if (Idle == 1) { - if (res != -1) IgnoreFoo_tmp = 1; else goto _LAND_0; - } - else { - _LAND_0: ; - if (IgnoreFoo == 1) - if (res != -1) IgnoreFoo_tmp = 1; else IgnoreFoo_tmp = 0; - else IgnoreFoo_tmp = 0; - } - Idle_tmp = 0; - End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - IgnoreFoo = IgnoreFoo_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires - 1 ≡ Idle ∧ 0 ≡ End ∧ 0 ≡ IgnoreFoo ∧ 0 ≡ WillDoFoo; - requires \valid(t+(0 .. max)); - requires max ≥ 0; - requires 0 ≤ i ≤ max; - decreases max-i; - ensures (\old(i) ≤ \result ≤ \old(max)) ∨ \result ≡ -1; - ensures - \old(i) ≤ \result ≤ \old(max) ⇒ *(\old(t)+\result) ≡ \old(val); - ensures - \result ≡ -1 ⇒ - (∀ ℤ j; \old(i) ≤ j ≤ \old(max) ⇒ *(\old(t)+j) ≢ \old(val)); - - behavior Buchi_property_behavior: - ensures - (1 ≡ IgnoreFoo ⇒ \result ≢ -1) ∧ - (1 ≡ WillDoFoo ⇒ \result ≡ -1); - ensures 1 ≡ IgnoreFoo ∨ 0 ≡ IgnoreFoo; - ensures 1 ≡ WillDoFoo ∨ 0 ≡ WillDoFoo; - ensures 0 ≡ End ∧ 0 ≡ Idle; - ensures 1 ≡ IgnoreFoo ∨ 1 ≡ WillDoFoo; - */ -int isPresentRec(int *t, int i, int max, int val) -{ - int __retres; - int tmp; - isPresentRec_pre_func(t,i,max,val); - if (*(t + i) == val) { - __retres = i; - goto return_label; - } - if (max == i) { - __retres = -1; - goto return_label; - } - tmp = isPresentRec(t,i + 1,max,val); - __retres = tmp; - return_label: isPresentRec_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_isPresent; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, IgnoreFoo, - WillDoFoo; - - behavior buch_state_End_out: - ensures 0 ≡ End; - - behavior buch_state_Idle_in: - assumes 1 ≡ Idle; - ensures 1 ≡ Idle; - - behavior buch_state_Idle_out: - assumes 0 ≡ Idle; - ensures 0 ≡ Idle; - - behavior buch_state_IgnoreFoo_out: - ensures 0 ≡ IgnoreFoo; - - behavior buch_state_WillDoFoo_out: - ensures 0 ≡ WillDoFoo; - */ -void isPresent_pre_func(int *t, int max, int val) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int IgnoreFoo_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_isPresent; - End_tmp = End; - Idle_tmp = Idle; - IgnoreFoo_tmp = IgnoreFoo; - WillDoFoo_tmp = WillDoFoo; - WillDoFoo_tmp = 0; - IgnoreFoo_tmp = 0; - if (Idle == 1) Idle_tmp = 1; else Idle_tmp = 0; - End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - IgnoreFoo = IgnoreFoo_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires - (1 ≡ IgnoreFoo ∨ 1 ≡ WillDoFoo) ∧ 0 ≡ End ∧ 0 ≡ Idle; - requires 1 ≡ IgnoreFoo ⇒ res ≢ -1; - requires 1 ≡ WillDoFoo ⇒ res ≡ -1; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_isPresent; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, IgnoreFoo, - WillDoFoo; - - behavior buch_state_End_in: - assumes 1 ≡ IgnoreFoo ∧ res ≢ -1; - ensures 1 ≡ End; - - behavior buch_state_End_out: - assumes 0 ≡ IgnoreFoo ∨ ¬(res ≢ -1); - ensures 0 ≡ End; - - behavior buch_state_Idle_out: - ensures 0 ≡ Idle; - - behavior buch_state_IgnoreFoo_out: - ensures 0 ≡ IgnoreFoo; - - behavior buch_state_WillDoFoo_in: - assumes 1 ≡ WillDoFoo ∧ res ≡ -1; - ensures 1 ≡ WillDoFoo; - - behavior buch_state_WillDoFoo_out: - assumes 0 ≡ WillDoFoo ∨ ¬(res ≡ -1); - ensures 0 ≡ WillDoFoo; - */ -void isPresent_post_func(int res) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int IgnoreFoo_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_isPresent; - End_tmp = End; - Idle_tmp = Idle; - IgnoreFoo_tmp = IgnoreFoo; - WillDoFoo_tmp = WillDoFoo; - if (WillDoFoo == 1) - if (res == -1) WillDoFoo_tmp = 1; else WillDoFoo_tmp = 0; - else WillDoFoo_tmp = 0; - IgnoreFoo_tmp = 0; - Idle_tmp = 0; - if (IgnoreFoo == 1) - if (res != -1) End_tmp = 1; else End_tmp = 0; - else End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - IgnoreFoo = IgnoreFoo_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires - 1 ≡ Idle ∧ 0 ≡ End ∧ 0 ≡ IgnoreFoo ∧ 0 ≡ WillDoFoo; - requires \valid(t+(0 .. max)); - requires max ≥ 0; - ensures (0 ≤ \result ≤ \old(max)) ∨ \result ≡ -1; - ensures 0 ≤ \result ≤ \old(max) ⇒ *(\old(t)+\result) ≡ \old(val); - ensures - \result ≡ -1 ⇒ - (∀ ℤ i; 0 ≤ i ≤ \old(max) ⇒ *(\old(t)+i) ≢ \old(val)); - - behavior Buchi_property_behavior: - ensures - (1 ≡ End ⇒ \result ≢ -1) ∧ - (1 ≡ WillDoFoo ⇒ \result ≡ -1); - ensures 1 ≡ End ∨ 0 ≡ End; - ensures 1 ≡ WillDoFoo ∨ 0 ≡ WillDoFoo; - ensures 0 ≡ Idle ∧ 0 ≡ IgnoreFoo; - ensures 1 ≡ End ∨ 1 ≡ WillDoFoo; - */ -int isPresent(int *t, int max, int val) -{ - int tmp; - isPresent_pre_func(t,max,val); - tmp = isPresentRec(t,0,max,val); - isPresent_post_func(tmp); - return tmp; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_foo; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, IgnoreFoo, - WillDoFoo; - - behavior buch_state_End_in: - assumes 1 ≡ WillDoFoo; - ensures 1 ≡ End; - - behavior buch_state_End_out: - assumes 0 ≡ WillDoFoo; - ensures 0 ≡ End; - - behavior buch_state_Idle_out: - ensures 0 ≡ Idle; - - behavior buch_state_IgnoreFoo_out: - ensures 0 ≡ IgnoreFoo; - - behavior buch_state_WillDoFoo_out: - ensures 0 ≡ WillDoFoo; - */ -void foo_pre_func(void) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int IgnoreFoo_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_foo; - End_tmp = End; - Idle_tmp = Idle; - IgnoreFoo_tmp = IgnoreFoo; - WillDoFoo_tmp = WillDoFoo; - WillDoFoo_tmp = 0; - IgnoreFoo_tmp = 0; - Idle_tmp = 0; - if (WillDoFoo == 1) End_tmp = 1; else End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - IgnoreFoo = IgnoreFoo_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires - 1 ≡ End ∧ 0 ≡ Idle ∧ 0 ≡ IgnoreFoo ∧ 0 ≡ WillDoFoo; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_foo; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, IgnoreFoo, - WillDoFoo; - - behavior buch_state_End_in: - assumes 1 ≡ End; - ensures 1 ≡ End; - - behavior buch_state_End_out: - assumes 0 ≡ End; - ensures 0 ≡ End; - - behavior buch_state_Idle_out: - ensures 0 ≡ Idle; - - behavior buch_state_IgnoreFoo_out: - ensures 0 ≡ IgnoreFoo; - - behavior buch_state_WillDoFoo_out: - ensures 0 ≡ WillDoFoo; - */ -void foo_post_func(void) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int IgnoreFoo_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_foo; - End_tmp = End; - Idle_tmp = Idle; - IgnoreFoo_tmp = IgnoreFoo; - WillDoFoo_tmp = WillDoFoo; - WillDoFoo_tmp = 0; - IgnoreFoo_tmp = 0; - Idle_tmp = 0; - if (End == 1) End_tmp = 1; else End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - IgnoreFoo = IgnoreFoo_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires - 1 ≡ WillDoFoo ∧ 0 ≡ End ∧ 0 ≡ Idle ∧ 0 ≡ IgnoreFoo; - - behavior Buchi_property_behavior: - ensures 0 ≡ Idle ∧ 0 ≡ IgnoreFoo ∧ 0 ≡ WillDoFoo; - ensures 1 ≡ End; - */ -void foo(void) -{ - foo_pre_func(); - foo_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, IgnoreFoo, - WillDoFoo; - - behavior buch_state_End_out: - ensures 0 ≡ End; - - behavior buch_state_Idle_in: - assumes 1 ≡ Idle; - ensures 1 ≡ Idle; - - behavior buch_state_Idle_out: - assumes 0 ≡ Idle; - ensures 0 ≡ Idle; - - behavior buch_state_IgnoreFoo_out: - ensures 0 ≡ IgnoreFoo; - - behavior buch_state_WillDoFoo_out: - ensures 0 ≡ WillDoFoo; - */ -void main_pre_func(int argc, char **argv) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int IgnoreFoo_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - End_tmp = End; - Idle_tmp = Idle; - IgnoreFoo_tmp = IgnoreFoo; - WillDoFoo_tmp = WillDoFoo; - WillDoFoo_tmp = 0; - IgnoreFoo_tmp = 0; - if (Idle == 1) Idle_tmp = 1; else Idle_tmp = 0; - End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - IgnoreFoo = IgnoreFoo_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires - 1 ≡ End ∧ 0 ≡ Idle ∧ 0 ≡ IgnoreFoo ∧ 0 ≡ WillDoFoo; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, IgnoreFoo, - WillDoFoo; - - behavior buch_state_End_in: - assumes 1 ≡ End; - ensures 1 ≡ End; - - behavior buch_state_End_out: - assumes 0 ≡ End; - ensures 0 ≡ End; - - behavior buch_state_Idle_out: - ensures 0 ≡ Idle; - - behavior buch_state_IgnoreFoo_out: - ensures 0 ≡ IgnoreFoo; - - behavior buch_state_WillDoFoo_out: - ensures 0 ≡ WillDoFoo; - */ -void main_post_func(int res) -{ - /*@ ghost int End_tmp; */ - /*@ ghost int Idle_tmp; */ - /*@ ghost int IgnoreFoo_tmp; */ - /*@ ghost int WillDoFoo_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - End_tmp = End; - Idle_tmp = Idle; - IgnoreFoo_tmp = IgnoreFoo; - WillDoFoo_tmp = WillDoFoo; - WillDoFoo_tmp = 0; - IgnoreFoo_tmp = 0; - Idle_tmp = 0; - if (End == 1) End_tmp = 1; else End_tmp = 0; - End = End_tmp; - Idle = Idle_tmp; - IgnoreFoo = IgnoreFoo_tmp; - WillDoFoo = WillDoFoo_tmp; - return; -} - -/*@ requires - 1 ≡ Idle ∧ 0 ≡ End ∧ 0 ≡ IgnoreFoo ∧ 0 ≡ WillDoFoo; - - behavior aorai_acceptance: - ensures 1 ≡ End; - - behavior Buchi_property_behavior: - ensures 0 ≡ Idle ∧ 0 ≡ IgnoreFoo ∧ 0 ≡ WillDoFoo; - ensures 1 ≡ End; - */ -int main(int argc, char **argv) -{ - int __retres; - int tab[4]; - int r; - main_pre_func(argc,argv); - tab[0] = 10; - tab[1] = 20; - tab[2] = 33; - tab[3] = 15; - r = isPresent(tab,3,33); - if (r == -1) foo(); - __retres = 1; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_struct.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_struct.res.oracle deleted file mode 100644 index e44ffe014aa3c754ee511304d3b77406946e0fe6..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_struct.res.oracle +++ /dev/null @@ -1,242 +0,0 @@ -[kernel] Parsing tests/aorai/test_struct.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_struct0.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_increment_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_increment_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_increment_post_func_post_2 : Valid -[wp] [Qed] Goal typed_increment_post_func_post : Valid -[wp] [Qed] Goal typed_increment_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_increment_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_increment_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_increment_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_increment_post_func_buch_state_main_0_out_post : Valid -[wp] [Qed] Goal typed_increment_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_increment_post_func_buch_state_S1_in_post : Valid -[wp] [Qed] Goal typed_increment_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_increment_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_increment_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_increment_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_increment_pre_func_post : Valid -[wp] [Qed] Goal typed_increment_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_increment_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_increment_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_increment_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_increment_pre_func_buch_state_main_0_out_post : Valid -[wp] [Qed] Goal typed_increment_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_increment_pre_func_buch_state_S1_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_main_0_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_S1_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_main_0_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S1_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_S1_in_post : Valid -/* Generated by Frama-C */ -struct People { - int Age ; - char Gender ; -}; -enum aorai_ListOper { - op_increment = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -struct People nobody; -int myAge = 0; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int S1 = 0; */ -/*@ ghost int main_0 = 1; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_increment; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, main_0; - - behavior buch_state_S1_in: - assumes 1 ≡ S1 ∧ nobody.Age ≡ 1; - ensures 1 ≡ S1; - - behavior buch_state_S1_out: - assumes 0 ≡ S1 ∨ ¬(nobody.Age ≡ 1); - ensures 0 ≡ S1; - - behavior buch_state_main_0_out: - ensures 0 ≡ main_0; - */ -void increment_pre_func(void) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int main_0_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_increment; - S1_tmp = S1; - main_0_tmp = main_0; - main_0_tmp = 0; - if (S1 == 1) - if (nobody.Age == 1) S1_tmp = 1; else S1_tmp = 0; - else S1_tmp = 0; - S1 = S1_tmp; - main_0 = main_0_tmp; - return; -} - -/*@ requires 1 ≡ S1 ∧ 0 ≡ main_0; - requires 1 ≡ S1 ⇒ nobody.Age ≡ 1; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_increment; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, main_0; - - behavior buch_state_S1_in: - assumes 1 ≡ S1 ∧ nobody.Age ≡ 1; - ensures 1 ≡ S1; - - behavior buch_state_S1_out: - assumes 0 ≡ S1 ∨ ¬(nobody.Age ≡ 1); - ensures 0 ≡ S1; - - behavior buch_state_main_0_out: - ensures 0 ≡ main_0; - */ -void increment_post_func(void) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int main_0_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_increment; - S1_tmp = S1; - main_0_tmp = main_0; - main_0_tmp = 0; - if (S1 == 1) - if (nobody.Age == 1) S1_tmp = 1; else S1_tmp = 0; - else S1_tmp = 0; - S1 = S1_tmp; - main_0 = main_0_tmp; - return; -} - -/*@ requires 1 ≡ S1 ∧ 0 ≡ main_0; - requires 1 ≡ S1 ⇒ nobody.Age ≡ 1; - - behavior Buchi_property_behavior: - ensures 1 ≡ S1 ⇒ nobody.Age ≡ 1; - ensures 0 ≡ main_0; - ensures 1 ≡ S1; - */ -void increment(void) -{ - increment_pre_func(); - (nobody.Age) ++; - myAge ++; - increment_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, main_0; - - behavior buch_state_S1_in: - assumes 1 ≡ main_0 ∧ nobody.Age ≡ 0; - ensures 1 ≡ S1; - - behavior buch_state_S1_out: - assumes 0 ≡ main_0 ∨ ¬(nobody.Age ≡ 0); - ensures 0 ≡ S1; - - behavior buch_state_main_0_out: - ensures 0 ≡ main_0; - */ -void main_pre_func(void) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int main_0_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - S1_tmp = S1; - main_0_tmp = main_0; - main_0_tmp = 0; - if (main_0 == 1) - if (nobody.Age == 0) S1_tmp = 1; else S1_tmp = 0; - else S1_tmp = 0; - S1 = S1_tmp; - main_0 = main_0_tmp; - return; -} - -/*@ requires 1 ≡ S1 ∧ 0 ≡ main_0; - requires 1 ≡ S1 ⇒ nobody.Age ≡ 1; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, S1, main_0; - - behavior buch_state_S1_in: - assumes 1 ≡ S1 ∧ nobody.Age ≡ 1; - ensures 1 ≡ S1; - - behavior buch_state_S1_out: - assumes 0 ≡ S1 ∨ ¬(nobody.Age ≡ 1); - ensures 0 ≡ S1; - - behavior buch_state_main_0_out: - ensures 0 ≡ main_0; - */ -void main_post_func(int res) -{ - /*@ ghost int S1_tmp; */ - /*@ ghost int main_0_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - S1_tmp = S1; - main_0_tmp = main_0; - main_0_tmp = 0; - if (S1 == 1) - if (nobody.Age == 1) S1_tmp = 1; else S1_tmp = 0; - else S1_tmp = 0; - S1 = S1_tmp; - main_0 = main_0_tmp; - return; -} - -/*@ requires 1 ≡ main_0 ∧ 0 ≡ S1; - requires 1 ≡ main_0 ⇒ nobody.Age ≡ 0; - - behavior aorai_acceptance: - ensures 1 ≡ S1 ∨ 1 ≡ main_0; - - behavior Buchi_property_behavior: - ensures 1 ≡ S1 ⇒ nobody.Age ≡ 1; - ensures 0 ≡ main_0; - ensures 1 ≡ S1; - */ -int main(void) -{ - int __retres; - main_pre_func(); - nobody.Age = 0; - increment(); - __retres = 0; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_switch2.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_switch2.res.oracle deleted file mode 100644 index c242d324f4265404212e6145056b250f4bc76461..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_switch2.res.oracle +++ /dev/null @@ -1,874 +0,0 @@ -[kernel] Parsing tests/aorai/test_switch2.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -tests/aorai/test_switch2.c:34:[aorai] warning: Call to opc not conforming to automaton (post-cond). Assuming it is on a dead path -tests/aorai/test_switch2.c:23:[aorai] warning: Call to opc not conforming to automaton (pre-cond). Assuming it is on a dead path -[kernel] Parsing /tmp/aorai_test_switch20.i (no preprocessing) -/tmp/aorai_test_switch20.i:4:[wp] warning: Global invariant not handled yet ('inv' ignored) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_all_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S6_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S6_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opa_post_func_post_2 : Valid -[wp] [Qed] Goal typed_opa_post_func_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_opa_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S6_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_S4_in_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_opa_post_func_buch_state_accept_all_out_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_opa_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opa_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_opa_pre_func_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_S3_in_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_S6_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_opa_pre_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opb_post_func_post_2 : Valid -[wp] [Qed] Goal typed_opb_post_func_post : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part16 : Valid -[wp] [Qed] Goal typed_opb_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S6_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S6_in_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_opb_post_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opb_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_opb_pre_func_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S6_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_S5_in_post : Valid -[wp] [Qed] Goal typed_opb_pre_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opc_post_func_post_2 : Valid -[wp] [Qed] Goal typed_opc_post_func_post : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_accept_S6_out_post : Valid -[wp] [Qed] Goal typed_opc_post_func_buch_state_accept_S5_out_post : Valid -[wp] Computing [200 goals...] -[wp] [Qed] Goal typed_opc_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_opc_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_opc_pre_func_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part14 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part13 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part12 : Valid -[wp] [Qed] Goal typed_opc_pre_func_assign_part11 : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_accept_S5_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_accept_S4_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_accept_S3_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_accept_init_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_accept_all_out_post : Valid -[wp] [Qed] Goal typed_opc_pre_func_buch_state_accept_S6_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_main = 3, - op_opa = 2, - op_opb = 1, - op_opc = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -int status = 0; -int rr = 1; -/*@ global invariant inv: 0 ≤ rr ≤ 50; - */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int accept_S2 = 0; */ -/*@ ghost int accept_S3 = 0; */ -/*@ ghost int accept_S4 = 0; */ -/*@ ghost int accept_S5 = 0; */ -/*@ ghost int accept_S6 = 0; */ -/*@ ghost int accept_all = 0; */ -/*@ ghost int accept_init = 1; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_opa; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, - accept_S4, accept_S5, accept_S6, accept_all, accept_init; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_in: - assumes 1 ≡ accept_S2; - ensures 1 ≡ accept_S3; - - behavior buch_state_accept_S3_out: - assumes 0 ≡ accept_S2; - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_S6_out: - ensures 0 ≡ accept_S6; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void opa_pre_func(void) -{ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_S6_tmp; */ - /*@ ghost int accept_all_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_opa; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_S6_tmp = accept_S6; - accept_all_tmp = accept_all; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_all_tmp = 0; - accept_S6_tmp = 0; - accept_S5_tmp = 0; - accept_S4_tmp = 0; - if (accept_S2 == 1) accept_S3_tmp = 1; else accept_S3_tmp = 0; - accept_S2_tmp = 0; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_S6 = accept_S6_tmp; - accept_all = accept_all_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S3 ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_S4 ∧ - 0 ≡ accept_S5 ∧ 0 ≡ accept_S6 ∧ 0 ≡ accept_all ∧ - 0 ≡ accept_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_opa; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, - accept_S4, accept_S5, accept_S6, accept_all, accept_init; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_in: - assumes 1 ≡ accept_S3; - ensures 1 ≡ accept_S4; - - behavior buch_state_accept_S4_out: - assumes 0 ≡ accept_S3; - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_S6_out: - ensures 0 ≡ accept_S6; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void opa_post_func(void) -{ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_S6_tmp; */ - /*@ ghost int accept_all_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_opa; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_S6_tmp = accept_S6; - accept_all_tmp = accept_all; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_all_tmp = 0; - accept_S6_tmp = 0; - accept_S5_tmp = 0; - if (accept_S3 == 1) accept_S4_tmp = 1; else accept_S4_tmp = 0; - accept_S3_tmp = 0; - accept_S2_tmp = 0; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_S6 = accept_S6_tmp; - accept_all = accept_all_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ 0 ≡ accept_S4 ∧ - 0 ≡ accept_S5 ∧ 0 ≡ accept_S6 ∧ 0 ≡ accept_all ∧ - 0 ≡ accept_init; - requires rr < 50; - - behavior j: - ensures rr < 51; - - behavior Buchi_property_behavior: - ensures - 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ 0 ≡ accept_S5 ∧ - 0 ≡ accept_S6 ∧ 0 ≡ accept_all ∧ 0 ≡ accept_init; - ensures 1 ≡ accept_S4; - */ -void opa(void) -{ - opa_pre_func(); - rr ++; - opa_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_opb; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, - accept_S4, accept_S5, accept_S6, accept_all, accept_init; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_in: - assumes 1 ≡ accept_S4; - ensures 1 ≡ accept_S5; - - behavior buch_state_accept_S5_out: - assumes 0 ≡ accept_S4; - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_S6_out: - ensures 0 ≡ accept_S6; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void opb_pre_func(void) -{ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_S6_tmp; */ - /*@ ghost int accept_all_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_opb; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_S6_tmp = accept_S6; - accept_all_tmp = accept_all; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_all_tmp = 0; - accept_S6_tmp = 0; - if (accept_S4 == 1) accept_S5_tmp = 1; else accept_S5_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - accept_S2_tmp = 0; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_S6 = accept_S6_tmp; - accept_all = accept_all_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S5 ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S4 ∧ 0 ≡ accept_S6 ∧ 0 ≡ accept_all ∧ - 0 ≡ accept_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_opb; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, - accept_S4, accept_S5, accept_S6, accept_all, accept_init; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_S6_in: - assumes 1 ≡ accept_S5; - ensures 1 ≡ accept_S6; - - behavior buch_state_accept_S6_out: - assumes 0 ≡ accept_S5; - ensures 0 ≡ accept_S6; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void opb_post_func(void) -{ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_S6_tmp; */ - /*@ ghost int accept_all_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_opb; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_S6_tmp = accept_S6; - accept_all_tmp = accept_all; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_all_tmp = 0; - if (accept_S5 == 1) accept_S6_tmp = 1; else accept_S6_tmp = 0; - accept_S5_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - accept_S2_tmp = 0; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_S6 = accept_S6_tmp; - accept_all = accept_all_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S4 ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S5 ∧ 0 ≡ accept_S6 ∧ 0 ≡ accept_all ∧ - 0 ≡ accept_init; - - behavior Buchi_property_behavior: - ensures - 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ 0 ≡ accept_S4 ∧ - 0 ≡ accept_S5 ∧ 0 ≡ accept_all ∧ 0 ≡ accept_init; - ensures 1 ≡ accept_S6; - */ -void opb(void) -{ - opb_pre_func(); - status = 1; - opb_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_opc; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, - accept_S4, accept_S5, accept_S6, accept_all, accept_init; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_S6_out: - ensures 0 ≡ accept_S6; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void opc_pre_func(void) -{ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_S6_tmp; */ - /*@ ghost int accept_all_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_opc; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_S6_tmp = accept_S6; - accept_all_tmp = accept_all; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_all_tmp = 0; - accept_S6_tmp = 0; - accept_S5_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - accept_S2_tmp = 0; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_S6 = accept_S6_tmp; - accept_all = accept_all_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires \false; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_opc; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, - accept_S4, accept_S5, accept_S6, accept_all, accept_init; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_S6_out: - ensures 0 ≡ accept_S6; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void opc_post_func(void) -{ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_S6_tmp; */ - /*@ ghost int accept_all_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_opc; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_S6_tmp = accept_S6; - accept_all_tmp = accept_all; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_all_tmp = 0; - accept_S6_tmp = 0; - accept_S5_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - accept_S2_tmp = 0; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_S6 = accept_S6_tmp; - accept_all = accept_all_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires \false; - - behavior Buchi_behavior_out_0: - ensures 0 ≡ accept_S2; - - behavior Buchi_behavior_out_1: - ensures 0 ≡ accept_S3; - - behavior Buchi_behavior_out_2: - ensures 0 ≡ accept_S4; - - behavior Buchi_behavior_out_3: - ensures 0 ≡ accept_S5; - - behavior Buchi_behavior_out_4: - ensures 0 ≡ accept_S6; - - behavior Buchi_behavior_out_5: - ensures 0 ≡ accept_all; - - behavior Buchi_behavior_out_6: - ensures 0 ≡ accept_init; - */ -void opc(void) -{ - opc_pre_func(); - rr = 9000; - opc_post_func(); - return; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, - accept_S4, accept_S5, accept_S6, accept_all, accept_init; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ accept_init; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ accept_init; - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_S6_out: - ensures 0 ≡ accept_S6; - - behavior buch_state_accept_all_out: - ensures 0 ≡ accept_all; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void main_pre_func(void) -{ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_S6_tmp; */ - /*@ ghost int accept_all_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_S6_tmp = accept_S6; - accept_all_tmp = accept_all; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - accept_all_tmp = 0; - accept_S6_tmp = 0; - accept_S5_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - if (accept_init == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_S6 = accept_S6_tmp; - accept_all = accept_all_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S6 ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S4 ∧ 0 ≡ accept_S5 ∧ 0 ≡ accept_all ∧ - 0 ≡ accept_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, - accept_S4, accept_S5, accept_S6, accept_all, accept_init; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - - behavior buch_state_accept_S3_out: - ensures 0 ≡ accept_S3; - - behavior buch_state_accept_S4_out: - ensures 0 ≡ accept_S4; - - behavior buch_state_accept_S5_out: - ensures 0 ≡ accept_S5; - - behavior buch_state_accept_S6_out: - ensures 0 ≡ accept_S6; - - behavior buch_state_accept_all_in: - assumes 1 ≡ accept_S6; - ensures 1 ≡ accept_all; - - behavior buch_state_accept_all_out: - assumes 0 ≡ accept_S6; - ensures 0 ≡ accept_all; - - behavior buch_state_accept_init_out: - ensures 0 ≡ accept_init; - */ -void main_post_func(int res) -{ - /*@ ghost int accept_S2_tmp; */ - /*@ ghost int accept_S3_tmp; */ - /*@ ghost int accept_S4_tmp; */ - /*@ ghost int accept_S5_tmp; */ - /*@ ghost int accept_S6_tmp; */ - /*@ ghost int accept_all_tmp; */ - /*@ ghost int accept_init_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - accept_S2_tmp = accept_S2; - accept_S3_tmp = accept_S3; - accept_S4_tmp = accept_S4; - accept_S5_tmp = accept_S5; - accept_S6_tmp = accept_S6; - accept_all_tmp = accept_all; - accept_init_tmp = accept_init; - accept_init_tmp = 0; - if (accept_S6 == 1) accept_all_tmp = 1; else accept_all_tmp = 0; - accept_S6_tmp = 0; - accept_S5_tmp = 0; - accept_S4_tmp = 0; - accept_S3_tmp = 0; - accept_S2_tmp = 0; - accept_S2 = accept_S2_tmp; - accept_S3 = accept_S3_tmp; - accept_S4 = accept_S4_tmp; - accept_S5 = accept_S5_tmp; - accept_S6 = accept_S6_tmp; - accept_all = accept_all_tmp; - accept_init = accept_init_tmp; - return; -} - -/*@ requires - 1 ≡ accept_init ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ - 0 ≡ accept_S4 ∧ 0 ≡ accept_S5 ∧ 0 ≡ accept_S6 ∧ - 0 ≡ accept_all; - - behavior aorai_acceptance: - ensures - 1 ≡ accept_S2 ∨ 1 ≡ accept_S3 ∨ 1 ≡ accept_S4 ∨ - 1 ≡ accept_S5 ∨ 1 ≡ accept_S6 ∨ 1 ≡ accept_all ∨ - 1 ≡ accept_init; - - behavior Buchi_property_behavior: - ensures - 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ 0 ≡ accept_S4 ∧ - 0 ≡ accept_S5 ∧ 0 ≡ accept_S6 ∧ 0 ≡ accept_init; - ensures 1 ≡ accept_all; - */ -int main(void) -{ - int __retres; - main_pre_func(); - switch (rr) { - case 1: opa(); - goto switch_0_break; - case 3: opa(); - default: ; - opc(); - } - switch_0_break: ; - opb(); - __retres = 1; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_switch3.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_switch3.res.oracle deleted file mode 100644 index ab0f22fee2f3132b3db42027759c32a0232ad24b..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_switch3.res.oracle +++ /dev/null @@ -1,525 +0,0 @@ -[kernel] Parsing tests/aorai/test_switch3.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_switch30.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_countOne_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_countOne_post_func_post_2 : Valid -[wp] [Qed] Goal typed_countOne_post_func_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_count_post_func_post_2 : Valid -[wp] [Qed] Goal typed_count_post_func_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_count_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_count_pre_func_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S1_in_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_main_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S1_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_count = 2, - op_countOne = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int T0_S2 = 0; */ -/*@ ghost int T0_init = 1; */ -/*@ ghost int accept_S1 = 0; */ -/*@ ghost int accept_S2 = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_countOne; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S2 ∨ 1 ≡ T0_S2; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S2 ∧ 0 ≡ T0_S2; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - */ -void countOne_pre_func(char *argv) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_countOne; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S2_tmp = 0; - accept_S1_tmp = 0; - T0_init_tmp = 0; - if (T0_S2 == 1) T0_S2_tmp = 1; - else - if (accept_S2 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - 1 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_countOne; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ T0_S2; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ T0_S2; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - */ -void countOne_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_countOne; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S2_tmp = 0; - accept_S1_tmp = 0; - T0_init_tmp = 0; - if (T0_S2 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - (1 ≡ T0_S2 ∨ 1 ≡ accept_S2) ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S1; - requires 1 ≡ accept_S2 ∨ 0 ≡ accept_S2; - requires 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - - behavior Buchi_property_behavior: - ensures 0 ≡ T0_init ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2; - ensures 1 ≡ T0_S2; - */ -int countOne(char *argv) -{ - int r; - countOne_pre_func(argv); - r = 0; - switch ((int)*(argv + 0)) { - int tmp; - case 0: r = 0; - goto switch_0_break; - case 1: case 2: case 3: default: ; - r ++; - tmp = countOne(argv + 1); - r += tmp; - } - switch_0_break: ; - countOne_post_func(r); - return r; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_count; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ T0_S2; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ T0_S2; - ensures 0 ≡ accept_S2; - */ -void count_pre_func(int argc, char **argv) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_count; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - if (T0_S2 == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - accept_S1_tmp = 0; - T0_init_tmp = 0; - if (accept_S1 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - (1 ≡ T0_S2 ∨ 1 ≡ accept_S1 ∨ 1 ≡ accept_S2) ∧ 0 ≡ T0_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_count; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_S2 ∨ 1 ≡ accept_S1 ∨ 1 ≡ T0_S2; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ T0_S2; - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ accept_S2 ∨ 1 ≡ T0_S2; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ accept_S2 ∧ 0 ≡ T0_S2; - ensures 0 ≡ accept_S2; - */ -void count_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_count; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - if (T0_S2 == 1) accept_S2_tmp = 1; - else - if (accept_S2 == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - if (T0_S2 == 1) accept_S1_tmp = 1; - else - if (accept_S1 == 1) accept_S1_tmp = 1; - else - if (accept_S2 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - if (accept_S1 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - (1 ≡ T0_S2 ∨ 1 ≡ accept_S1) ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S2; - requires 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - requires 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - - behavior Buchi_property_behavior: - ensures 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - ensures 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - ensures 1 ≡ accept_S2 ∨ 0 ≡ accept_S2; - ensures 0 ≡ T0_init; - ensures 1 ≡ T0_S2 ∨ 1 ≡ accept_S1 ∨ 1 ≡ accept_S2; - */ -int count(int argc, char **argv) -{ - int __retres; - count_pre_func(argc,argv); - if (argc > 0) { - int tmp; - int tmp_0; - tmp = countOne(*(argv + 0)); - tmp_0 = count(argc - 1,argv + 1); - __retres = tmp + tmp_0; - goto return_label; - } - __retres = 0; - return_label: count_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ T0_init; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ T0_init; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ T0_init; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ T0_init; - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - */ -void main_pre_func(int argc, char **argv) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S2_tmp = 0; - if (T0_init == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - if (T0_init == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S1 ∧ 0 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - */ -void main_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S2_tmp = 0; - if (accept_S1 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - if (accept_S1 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - 1 ≡ T0_init ∧ 0 ≡ T0_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2; - - behavior aorai_acceptance: - ensures 1 ≡ accept_S1 ∨ 1 ≡ accept_S2; - - behavior Buchi_property_behavior: - ensures 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - ensures 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - ensures 0 ≡ T0_init ∧ 0 ≡ accept_S2; - ensures 1 ≡ T0_S2 ∨ 1 ≡ accept_S1; - */ -int main(int argc, char **argv) -{ - int __retres; - int somme; - main_pre_func(argc,argv); - somme = count(argc,argv); - __retres = 1; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_switch3_et_recursion.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_switch3_et_recursion.res.oracle deleted file mode 100644 index a5cf704fc19e475aebedba6aac3a7ff595b70fb9..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_switch3_et_recursion.res.oracle +++ /dev/null @@ -1,401 +0,0 @@ -[kernel] Parsing tests/aorai/test_switch3_et_recursion.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -tests/aorai/test_switch3_et_recursion.c:26:[aorai] warning: Call to countOne does not follow automaton's specification. This path is assumed to be dead -[kernel] Parsing /tmp/aorai_test_switch3_et_recursion0.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_countOne_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_countOne_post_func_post_2 : Valid -[wp] [Qed] Goal typed_countOne_post_func_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_count_post_func_post_2 : Valid -[wp] [Qed] Goal typed_count_post_func_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_count_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_count_pre_func_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part9 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part8 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part2 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part1 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part6 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part5 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part4 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part3 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part7 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S1_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_count = 2, - op_countOne = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int T0_S2 = 0; */ -/*@ ghost int T0_init = 1; */ -/*@ ghost int accept_S1 = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_countOne; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ T0_S2; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ T0_S2; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - */ -void countOne_pre_func(char *argv) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_countOne; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S1_tmp = 0; - T0_init_tmp = 0; - if (T0_S2 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires \false; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_countOne; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_out: - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - */ -void countOne_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_countOne; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S1_tmp = 0; - T0_init_tmp = 0; - T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires 1 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S1; - - behavior Buchi_behavior_out_0: - ensures 0 ≡ T0_S2; - - behavior Buchi_behavior_out_1: - ensures 0 ≡ T0_init; - - behavior Buchi_behavior_out_2: - ensures 0 ≡ accept_S1; - */ -int countOne(char *argv) -{ - int r; - countOne_pre_func(argv); - r = 0; - switch ((int)*(argv + 0)) { - int tmp; - case 0: r = 0; - case 1: case 2: case 3: default: ; - r ++; - tmp = countOne(argv + 1); - r += tmp; - } - countOne_post_func(r); - return r; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_count; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - */ -void count_pre_func(int argc, char **argv) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_count; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S1_tmp = 0; - T0_init_tmp = 0; - if (accept_S1 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires 1 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S1; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_count; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_out: - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ T0_S2; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ T0_S2; - ensures 0 ≡ accept_S1; - */ -void count_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_count; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - if (T0_S2 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires 1 ≡ accept_S1 ∧ 0 ≡ T0_S2 ∧ 0 ≡ T0_init; - - behavior Buchi_property_behavior: - ensures 0 ≡ T0_S2 ∧ 0 ≡ T0_init; - ensures 1 ≡ accept_S1; - */ -int count(int argc, char **argv) -{ - int __retres; - count_pre_func(argc,argv); - if (argc > 0) { - int tmp; - int tmp_0; - tmp = countOne(*(argv + 0)); - tmp_0 = count(argc - 1,argv + 1); - __retres = tmp + tmp_0; - goto return_label; - } - __retres = 0; - return_label: count_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_out: - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ T0_init; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ T0_init; - ensures 0 ≡ accept_S1; - */ -void main_pre_func(int argc, char **argv) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - if (T0_init == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires 1 ≡ accept_S1 ∧ 0 ≡ T0_S2 ∧ 0 ≡ T0_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ accept_S1; - */ -void main_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - if (accept_S1 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - if (accept_S1 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - return; -} - -/*@ requires 1 ≡ T0_init ∧ 0 ≡ T0_S2 ∧ 0 ≡ accept_S1; - - behavior aorai_acceptance: - ensures 1 ≡ accept_S1; - - behavior Buchi_property_behavior: - ensures 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - ensures 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - ensures 0 ≡ T0_init; - ensures 1 ≡ T0_S2 ∨ 1 ≡ accept_S1; - */ -int main(int argc, char **argv) -{ - int __retres; - int somme; - main_pre_func(argc,argv); - somme = count(argc,argv); - __retres = 1; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_switch3_if.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_switch3_if.res.oracle deleted file mode 100644 index 88c0e9d0cb1000d7837bfe235e5ca00376bab973..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_switch3_if.res.oracle +++ /dev/null @@ -1,521 +0,0 @@ -[kernel] Parsing tests/aorai/test_switch3_if.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_switch3_if0.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_countOne_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_countOne_post_func_post_2 : Valid -[wp] [Qed] Goal typed_countOne_post_func_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_count_post_func_post_2 : Valid -[wp] [Qed] Goal typed_count_post_func_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_count_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_count_pre_func_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S1_in_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_main_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S1_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_count = 2, - op_countOne = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int T0_S2 = 0; */ -/*@ ghost int T0_init = 1; */ -/*@ ghost int accept_S1 = 0; */ -/*@ ghost int accept_S2 = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_countOne; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S2 ∨ 1 ≡ T0_S2; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S2 ∧ 0 ≡ T0_S2; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - */ -void countOne_pre_func(char *argv) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_countOne; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S2_tmp = 0; - accept_S1_tmp = 0; - T0_init_tmp = 0; - if (T0_S2 == 1) T0_S2_tmp = 1; - else - if (accept_S2 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - 1 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_countOne; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ T0_S2; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ T0_S2; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - */ -void countOne_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_countOne; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S2_tmp = 0; - accept_S1_tmp = 0; - T0_init_tmp = 0; - if (T0_S2 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - (1 ≡ T0_S2 ∨ 1 ≡ accept_S2) ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S1; - requires 1 ≡ accept_S2 ∨ 0 ≡ accept_S2; - requires 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - - behavior Buchi_property_behavior: - ensures 0 ≡ T0_init ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2; - ensures 1 ≡ T0_S2; - */ -int countOne(char *argv) -{ - int r; - countOne_pre_func(argv); - r = 0; - if ((int)*(argv + 0) != 0) { - int tmp; - r ++; - tmp = countOne(argv + 1); - r += tmp; - } - countOne_post_func(r); - return r; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_count; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ T0_S2; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ T0_S2; - ensures 0 ≡ accept_S2; - */ -void count_pre_func(int argc, char **argv) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_count; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - if (T0_S2 == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - accept_S1_tmp = 0; - T0_init_tmp = 0; - if (accept_S1 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - (1 ≡ T0_S2 ∨ 1 ≡ accept_S1 ∨ 1 ≡ accept_S2) ∧ 0 ≡ T0_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_count; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_S2 ∨ 1 ≡ accept_S1 ∨ 1 ≡ T0_S2; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ T0_S2; - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ accept_S2 ∨ 1 ≡ T0_S2; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ accept_S2 ∧ 0 ≡ T0_S2; - ensures 0 ≡ accept_S2; - */ -void count_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_count; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - if (T0_S2 == 1) accept_S2_tmp = 1; - else - if (accept_S2 == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - if (T0_S2 == 1) accept_S1_tmp = 1; - else - if (accept_S1 == 1) accept_S1_tmp = 1; - else - if (accept_S2 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - if (accept_S1 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - (1 ≡ T0_S2 ∨ 1 ≡ accept_S1) ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S2; - requires 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - requires 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - - behavior Buchi_property_behavior: - ensures 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - ensures 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - ensures 1 ≡ accept_S2 ∨ 0 ≡ accept_S2; - ensures 0 ≡ T0_init; - ensures 1 ≡ T0_S2 ∨ 1 ≡ accept_S1 ∨ 1 ≡ accept_S2; - */ -int count(int argc, char **argv) -{ - int __retres; - count_pre_func(argc,argv); - if (argc > 0) { - int tmp; - int tmp_0; - tmp = countOne(*(argv + 0)); - tmp_0 = count(argc - 1,argv + 1); - __retres = tmp + tmp_0; - goto return_label; - } - __retres = 0; - return_label: count_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ T0_init; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ T0_init; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ T0_init; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ T0_init; - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - */ -void main_pre_func(int argc, char **argv) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S2_tmp = 0; - if (T0_init == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - if (T0_init == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S1 ∧ 0 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - */ -void main_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S2_tmp = 0; - if (accept_S1 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - if (accept_S1 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - 1 ≡ T0_init ∧ 0 ≡ T0_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2; - - behavior aorai_acceptance: - ensures 1 ≡ accept_S1 ∨ 1 ≡ accept_S2; - - behavior Buchi_property_behavior: - ensures 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - ensures 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - ensures 0 ≡ T0_init ∧ 0 ≡ accept_S2; - ensures 1 ≡ T0_S2 ∨ 1 ≡ accept_S1; - */ -int main(int argc, char **argv) -{ - int __retres; - int somme; - main_pre_func(argc,argv); - somme = count(argc,argv); - __retres = 1; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/test_switch3_return.res.oracle b/src/plugins/aorai/tests/aorai/oracle_prove/test_switch3_return.res.oracle deleted file mode 100644 index 7a4d8695c525f060ef9bf5b52fc55ea53260142e..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/oracle_prove/test_switch3_return.res.oracle +++ /dev/null @@ -1,526 +0,0 @@ -[kernel] Parsing tests/aorai/test_switch3_return.c (with preprocessing) -[aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_switch3_return0.i (no preprocessing) -[wp] Collecting axiomatic usage -[wp] warning: Missing RTE guards -[wp] [Qed] Goal typed_countOne_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_countOne_post_func_post_2 : Valid -[wp] [Qed] Goal typed_countOne_post_func_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_countOne_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_countOne_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_countOne_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_count_post_func_post_2 : Valid -[wp] [Qed] Goal typed_count_post_func_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part14 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part13 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part12 : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_count_post_func_assign_part15 : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_count_post_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_count_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_count_pre_func_post : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_count_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_count_pre_func_buch_state_accept_S2_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_post_func_post_2 : Valid -[wp] [Qed] Goal typed_main_post_func_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_main_post_func_assign_part11 : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S1_out_post : Valid -[wp] [Qed] Goal typed_main_post_func_buch_state_accept_S1_in_post : Valid -[wp] Computing [100 goals...] -[wp] [Qed] Goal typed_main_pre_func_assign_part02 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part01 : Valid -[wp] [Qed] Goal typed_main_pre_func_post_2 : Valid -[wp] [Qed] Goal typed_main_pre_func_post : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part06 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part05 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part04 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part03 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part10 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part09 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part08 : Valid -[wp] [Qed] Goal typed_main_pre_func_assign_part07 : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S1_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_init_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_T0_S2_in_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S2_out_post : Valid -[wp] [Qed] Goal typed_main_pre_func_buch_state_accept_S1_out_post : Valid -/* Generated by Frama-C */ -enum aorai_ListOper { - op_count = 2, - op_countOne = 1, - op_main = 0 -}; -enum aorai_OpStatusList { - aorai_Terminated = 1, - aorai_Called = 0 -}; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ -/*@ ghost int T0_S2 = 0; */ -/*@ ghost int T0_init = 1; */ -/*@ ghost int accept_S1 = 0; */ -/*@ ghost int accept_S2 = 0; */ -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_countOne; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S2 ∨ 1 ≡ T0_S2; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S2 ∧ 0 ≡ T0_S2; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - */ -void countOne_pre_func(char *argv) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_countOne; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S2_tmp = 0; - accept_S1_tmp = 0; - T0_init_tmp = 0; - if (T0_S2 == 1) T0_S2_tmp = 1; - else - if (accept_S2 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - 1 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_countOne; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ T0_S2; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ T0_S2; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - */ -void countOne_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_countOne; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S2_tmp = 0; - accept_S1_tmp = 0; - T0_init_tmp = 0; - if (T0_S2 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - (1 ≡ T0_S2 ∨ 1 ≡ accept_S2) ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S1; - requires 1 ≡ accept_S2 ∨ 0 ≡ accept_S2; - requires 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - - behavior Buchi_property_behavior: - ensures 0 ≡ T0_init ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2; - ensures 1 ≡ T0_S2; - */ -int countOne(char *argv) -{ - int __retres; - int r; - countOne_pre_func(argv); - r = 0; - switch ((int)*(argv + 0)) { - int tmp; - case 0: __retres = 0; - goto return_label; - case 1: case 2: case 3: default: ; - r ++; - tmp = countOne(argv + 1); - r += tmp; - } - __retres = r; - return_label: countOne_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_count; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_out: - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ T0_S2; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ T0_S2; - ensures 0 ≡ accept_S2; - */ -void count_pre_func(int argc, char **argv) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_count; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - if (T0_S2 == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - accept_S1_tmp = 0; - T0_init_tmp = 0; - if (accept_S1 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - (1 ≡ T0_S2 ∨ 1 ≡ accept_S1 ∨ 1 ≡ accept_S2) ∧ 0 ≡ T0_init; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_count; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_S2 ∨ 1 ≡ accept_S1 ∨ 1 ≡ T0_S2; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ T0_S2; - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_in: - assumes 1 ≡ accept_S2 ∨ 1 ≡ T0_S2; - ensures 1 ≡ accept_S2; - - behavior buch_state_accept_S2_out: - assumes 0 ≡ accept_S2 ∧ 0 ≡ T0_S2; - ensures 0 ≡ accept_S2; - */ -void count_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_count; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - if (T0_S2 == 1) accept_S2_tmp = 1; - else - if (accept_S2 == 1) accept_S2_tmp = 1; else accept_S2_tmp = 0; - if (T0_S2 == 1) accept_S1_tmp = 1; - else - if (accept_S1 == 1) accept_S1_tmp = 1; - else - if (accept_S2 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - if (accept_S1 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - (1 ≡ T0_S2 ∨ 1 ≡ accept_S1) ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S2; - requires 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - requires 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - - behavior Buchi_property_behavior: - ensures 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - ensures 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - ensures 1 ≡ accept_S2 ∨ 0 ≡ accept_S2; - ensures 0 ≡ T0_init; - ensures 1 ≡ T0_S2 ∨ 1 ≡ accept_S1 ∨ 1 ≡ accept_S2; - */ -int count(int argc, char **argv) -{ - int __retres; - count_pre_func(argc,argv); - if (argc > 0) { - int tmp; - int tmp_0; - tmp = countOne(*(argv + 0)); - tmp_0 = count(argc - 1,argv + 1); - __retres = tmp + tmp_0; - goto return_label; - } - __retres = 0; - return_label: count_post_func(__retres); - return __retres; -} - -/*@ ensures aorai_CurOpStatus ≡ aorai_Called; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ T0_init; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ T0_init; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ T0_init; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ T0_init; - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - */ -void main_pre_func(int argc, char **argv) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Called; - aorai_CurOperation = op_main; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S2_tmp = 0; - if (T0_init == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - if (T0_init == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - 1 ≡ accept_S1 ∧ 0 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S2; - ensures aorai_CurOpStatus ≡ aorai_Terminated; - ensures aorai_CurOperation ≡ op_main; - assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, - accept_S2; - - behavior buch_state_T0_S2_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ T0_S2; - - behavior buch_state_T0_S2_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ T0_S2; - - behavior buch_state_T0_init_out: - ensures 0 ≡ T0_init; - - behavior buch_state_accept_S1_in: - assumes 1 ≡ accept_S1; - ensures 1 ≡ accept_S1; - - behavior buch_state_accept_S1_out: - assumes 0 ≡ accept_S1; - ensures 0 ≡ accept_S1; - - behavior buch_state_accept_S2_out: - ensures 0 ≡ accept_S2; - */ -void main_post_func(int res) -{ - /*@ ghost int T0_S2_tmp; */ - /*@ ghost int T0_init_tmp; */ - /*@ ghost int accept_S1_tmp; */ - /*@ ghost int accept_S2_tmp; */ - aorai_CurOpStatus = aorai_Terminated; - aorai_CurOperation = op_main; - T0_S2_tmp = T0_S2; - T0_init_tmp = T0_init; - accept_S1_tmp = accept_S1; - accept_S2_tmp = accept_S2; - accept_S2_tmp = 0; - if (accept_S1 == 1) accept_S1_tmp = 1; else accept_S1_tmp = 0; - T0_init_tmp = 0; - if (accept_S1 == 1) T0_S2_tmp = 1; else T0_S2_tmp = 0; - T0_S2 = T0_S2_tmp; - T0_init = T0_init_tmp; - accept_S1 = accept_S1_tmp; - accept_S2 = accept_S2_tmp; - return; -} - -/*@ requires - 1 ≡ T0_init ∧ 0 ≡ T0_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2; - - behavior aorai_acceptance: - ensures 1 ≡ accept_S1 ∨ 1 ≡ accept_S2; - - behavior Buchi_property_behavior: - ensures 1 ≡ T0_S2 ∨ 0 ≡ T0_S2; - ensures 1 ≡ accept_S1 ∨ 0 ≡ accept_S1; - ensures 0 ≡ T0_init ∧ 0 ≡ accept_S2; - ensures 1 ≡ T0_S2 ∨ 1 ≡ accept_S1; - */ -int main(int argc, char **argv) -{ - int __retres; - int somme; - main_pre_func(argc,argv); - somme = count(argc,argv); - __retres = 1; - main_post_func(__retres); - return __retres; -} - - diff --git a/src/plugins/aorai/tests/aorai/other.c b/src/plugins/aorai/tests/aorai/other.c deleted file mode 100644 index 63236bb1ede64423cb81c5b1a96a8b1fcf7f6c2d..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/other.c +++ /dev/null @@ -1,17 +0,0 @@ -/* run.config* - OPT: -aorai-automata tests/aorai/other.ya -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ -*/ - -int x=0; - -void f (void) { x=3; } - -void g (void) { x=4; } - -int main () { - f(); - g(); - f(); - g(); - return x; -} diff --git a/src/plugins/aorai/tests/aorai/result_prove/.empty b/src/plugins/aorai/tests/aorai/result_prove/.empty deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/plugins/aorai/tests/aorai/seq.i b/src/plugins/aorai/tests/aorai/seq.i deleted file mode 100644 index e678efde2b45872b949f7eaa4d71e443f06c1b74..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/seq.i +++ /dev/null @@ -1,14 +0,0 @@ -/* run.config* - OPT: -aorai-automata tests/aorai/seq.ya -aorai-test 1 -load-module tests/aorai/Aorai_test.cmxs -aorai-acceptance -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ - */ - -void f() { } - -void g() { } - -int main(int c) { - if (c) f(); - g(); - if (c) g(); - return 0; -} diff --git a/src/plugins/aorai/tests/aorai/single_call.i b/src/plugins/aorai/tests/aorai/single_call.i deleted file mode 100644 index b95c43e64cee80455bede3aff51c644c1ce019c9..0000000000000000000000000000000000000000 --- a/src/plugins/aorai/tests/aorai/single_call.i +++ /dev/null @@ -1,5 +0,0 @@ -/* run.config* - OPT: -aorai-automata tests/aorai/single_call.ya -aorai-test 1 -load-module tests/aorai/Aorai_test.cmxs -aorai-acceptance -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ -*/ - -int main () {} diff --git a/src/plugins/aorai/tests/aorai/call_tree.c b/src/plugins/aorai/tests/ltl/call_tree.c similarity index 100% rename from src/plugins/aorai/tests/aorai/call_tree.c rename to src/plugins/aorai/tests/ltl/call_tree.c diff --git a/src/plugins/aorai/tests/aorai/call_tree.ltl b/src/plugins/aorai/tests/ltl/call_tree.ltl similarity index 100% rename from src/plugins/aorai/tests/aorai/call_tree.ltl rename to src/plugins/aorai/tests/ltl/call_tree.ltl diff --git a/src/plugins/aorai/tests/aorai/goto.c b/src/plugins/aorai/tests/ltl/goto.c similarity index 72% rename from src/plugins/aorai/tests/aorai/goto.c rename to src/plugins/aorai/tests/ltl/goto.c index 4bfdb268546eb2e0bc023cb84535b51af6c22f67..ccd31e28dbe2344aa5c4fee8254898945fcfa29c 100644 --- a/src/plugins/aorai/tests/aorai/goto.c +++ b/src/plugins/aorai/tests/ltl/goto.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl tests/aorai/goto.ltl -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int status=0; diff --git a/src/plugins/aorai/tests/aorai/goto.ltl b/src/plugins/aorai/tests/ltl/goto.ltl similarity index 100% rename from src/plugins/aorai/tests/aorai/goto.ltl rename to src/plugins/aorai/tests/ltl/goto.ltl diff --git a/src/plugins/aorai/tests/aorai/oracle/goto.res.oracle b/src/plugins/aorai/tests/ltl/oracle/goto.res.oracle similarity index 95% rename from src/plugins/aorai/tests/aorai/oracle/goto.res.oracle rename to src/plugins/aorai/tests/ltl/oracle/goto.res.oracle index 0043d14bb25bf9672874239bd7375191989faa0d..c1554953000b5e332460b05a1a5bb6c832c1829c 100644 --- a/src/plugins/aorai/tests/aorai/oracle/goto.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/goto.res.oracle @@ -1,8 +1,8 @@ -[kernel] Parsing tests/aorai/goto.c (with preprocessing) +[kernel] Parsing tests/ltl/goto.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[aorai] tests/aorai/goto.c:28: Warning: +[aorai] tests/ltl/goto.c:28: Warning: Call to opc does not follow automaton's specification. This path is assumed to be dead -[kernel] Parsing /tmp/aorai_goto_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_goto_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_main = 3, @@ -28,7 +28,11 @@ int rr = 1; /*@ ghost int accept_all = 0; */ /*@ ghost int accept_init = 1; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ 0 ≡ accept_S4 ∧ + 0 ≡ accept_S5 ∧ 0 ≡ accept_S6 ∧ 0 ≡ accept_all ∧ + 0 ≡ accept_init; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_opa; assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, accept_S4, accept_S5, accept_S6, accept_all, accept_init; @@ -193,7 +197,11 @@ void opa(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ accept_S4 ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ + 0 ≡ accept_S5 ∧ 0 ≡ accept_S6 ∧ 0 ≡ accept_all ∧ + 0 ≡ accept_init; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_opb; assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, accept_S4, accept_S5, accept_S6, accept_all, accept_init; @@ -354,7 +362,8 @@ void opb(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires \false; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_opc; assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, accept_S4, accept_S5, accept_S6, accept_all, accept_init; @@ -514,7 +523,11 @@ void opc(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ accept_init ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ + 0 ≡ accept_S4 ∧ 0 ≡ accept_S5 ∧ 0 ≡ accept_S6 ∧ + 0 ≡ accept_all; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, accept_S4, accept_S5, accept_S6, accept_all, accept_init; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_boucle.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_boucle.res.oracle similarity index 94% rename from src/plugins/aorai/tests/aorai/oracle/test_boucle.res.oracle rename to src/plugins/aorai/tests/ltl/oracle/test_boucle.res.oracle index a418b2f7c9e83d32274eff23ee3173ea9cba90cf..43f443e26e9773bfe488435071f0953066f1112b 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_boucle.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_boucle.res.oracle @@ -1,8 +1,8 @@ -[kernel] Parsing tests/aorai/test_boucle.c (with preprocessing) -[kernel:typing:implicit-function-declaration] tests/aorai/test_boucle.c:16: Warning: +[kernel] Parsing tests/ltl/test_boucle.c (with preprocessing) +[kernel:typing:implicit-function-declaration] tests/ltl/test_boucle.c:16: Warning: Calling undeclared function call_to_an_undefined_function. Old style K&R code? [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_boucle_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_boucle_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_call_to_an_undefined_function = 3, @@ -22,7 +22,8 @@ extern int call_to_an_undefined_function(void); /*@ ghost int T0_init = 1; */ /*@ ghost int accept_S1 = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires (1 ≡ T0_S2 ∨ 1 ≡ accept_S1) ∧ 0 ≡ T0_init; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_a; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; @@ -126,7 +127,8 @@ int a(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires (1 ≡ T0_S2 ∨ 1 ≡ accept_S1) ∧ 0 ≡ T0_init; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_b; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; @@ -231,7 +233,8 @@ int b(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ T0_init ∧ 0 ≡ T0_S2 ∧ 0 ≡ accept_S1; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_boucle1.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_boucle1.res.oracle similarity index 95% rename from src/plugins/aorai/tests/aorai/oracle/test_boucle1.res.oracle rename to src/plugins/aorai/tests/ltl/oracle/test_boucle1.res.oracle index 4fd824e2ad33bdb3a46508999084d5f048ad25a6..31031e82bb479afbb18fa7e403bf822e42c7f654 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_boucle1.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_boucle1.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/test_boucle1.c (with preprocessing) +[kernel] Parsing tests/ltl/test_boucle1.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_boucle1_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_boucle1_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_commit_trans = 2, @@ -25,7 +25,10 @@ int status = 0; /*@ ghost int accept_S4 = 0; */ /*@ ghost int accept_init = 1; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ accept_S4 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2 ∧ + 0 ≡ accept_S3 ∧ 0 ≡ accept_init; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_commit_trans; assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, accept_S3, accept_S4, accept_init; @@ -161,7 +164,10 @@ int commit_trans(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ accept_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S3 ∧ + 0 ≡ accept_S4 ∧ 0 ≡ accept_init; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_init_trans; assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, accept_S3, accept_S4, accept_init; @@ -310,7 +316,10 @@ int init_trans(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ accept_init ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2 ∧ + 0 ≡ accept_S3 ∧ 0 ≡ accept_S4; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, accept_S3, accept_S4, accept_init; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_boucle2.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_boucle2.res.oracle similarity index 95% rename from src/plugins/aorai/tests/aorai/oracle/test_boucle2.res.oracle rename to src/plugins/aorai/tests/ltl/oracle/test_boucle2.res.oracle index 4b6cca74dbc83f17871fb61da2e0b92b388a9e8a..e2122593e23b155dd6385ea9e1f256cf66a3157d 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_boucle2.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_boucle2.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/test_boucle2.c (with preprocessing) +[kernel] Parsing tests/ltl/test_boucle2.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_boucle2_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_boucle2_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_main = 2, @@ -24,7 +24,10 @@ int rr = 1; /*@ ghost int accept_S5 = 0; */ /*@ ghost int accept_all = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S3 ∧ + 0 ≡ accept_S4 ∧ 0 ≡ accept_S5 ∧ 0 ≡ accept_all; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_opa; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S3, accept_S4, accept_S5, accept_all; @@ -183,7 +186,10 @@ void opa(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ accept_S3 ∧ 0 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ + 0 ≡ accept_S4 ∧ 0 ≡ accept_S5 ∧ 0 ≡ accept_all; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_opb; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S3, accept_S4, accept_S5, accept_all; @@ -328,7 +334,10 @@ void opb(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ T0_init ∧ 0 ≡ T0_S2 ∧ 0 ≡ accept_S3 ∧ + 0 ≡ accept_S4 ∧ 0 ≡ accept_S5 ∧ 0 ≡ accept_all; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S3, accept_S4, accept_S5, accept_all; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_boucle3.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_boucle3.res.oracle similarity index 94% rename from src/plugins/aorai/tests/aorai/oracle/test_boucle3.res.oracle rename to src/plugins/aorai/tests/ltl/oracle/test_boucle3.res.oracle index 611da850e54cd7f992ea6c81baa61527aff85002..44c7d11061b5a33640e834283e79a608ac9885e1 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_boucle3.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_boucle3.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/test_boucle3.c (with preprocessing) +[kernel] Parsing tests/ltl/test_boucle3.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_boucle3_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_boucle3_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_main = 2, @@ -23,7 +23,10 @@ int rr = 1; /*@ ghost int accept_S3 = 0; */ /*@ ghost int accept_all = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + (1 ≡ T0_S4 ∨ 1 ≡ T1_S2) ∧ 0 ≡ T0_init ∧ + 0 ≡ accept_S3 ∧ 0 ≡ accept_all; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_opa; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S4, T0_init, T1_S2, accept_S3, accept_all; @@ -189,7 +192,11 @@ void opa(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ T1_S2 ∧ 0 ≡ T0_S4 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S3 ∧ + 0 ≡ accept_all; + requires 1 ≡ T1_S2 ⇒ rr ≡ 51; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_opb; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S4, T0_init, T1_S2, accept_S3, accept_all; @@ -323,7 +330,10 @@ void opb(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ T0_init ∧ 0 ≡ T0_S4 ∧ 0 ≡ T1_S2 ∧ 0 ≡ accept_S3 ∧ + 0 ≡ accept_all; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S4, T0_init, T1_S2, accept_S3, accept_all; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_factorial.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_factorial.res.oracle similarity index 95% rename from src/plugins/aorai/tests/aorai/oracle/test_factorial.res.oracle rename to src/plugins/aorai/tests/ltl/oracle/test_factorial.res.oracle index bc2b324895728405c00ffa43fcb51fd18cd6c681..41a681dcff82e65b2fa850c0c8f9f7485adc2a39 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_factorial.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_factorial.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/test_factorial.c (with preprocessing) +[kernel] Parsing tests/ltl/test_factorial.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_factorial_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_factorial_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_decode_int = 2, @@ -17,7 +17,8 @@ enum aorai_OpStatusList { /*@ ghost int accept_S2 = 0; */ /*@ ghost int accept_init = 1; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ accept_S1 ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_init; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_decode_int; assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, accept_init; @@ -185,7 +186,8 @@ int decode_int(char *s) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires (1 ≡ accept_S1 ∨ 1 ≡ accept_S2) ∧ 0 ≡ accept_init; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_factorial; assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, accept_init; @@ -306,7 +308,8 @@ int factorial(int value) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ accept_init ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2, accept_init; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_recursion1.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_recursion1.res.oracle similarity index 93% rename from src/plugins/aorai/tests/aorai/oracle/test_recursion1.res.oracle rename to src/plugins/aorai/tests/ltl/oracle/test_recursion1.res.oracle index bcd5caca7e911c3bfa1d4622186c5f95c7ed4f95..c3757b98233f81226e3bf18a2a4fdf0ba0e6aba9 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_recursion1.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_recursion1.res.oracle @@ -1,12 +1,12 @@ -[kernel] Parsing tests/aorai/test_recursion1.c (with preprocessing) -[kernel] tests/aorai/test_recursion1.c:21: Warning: +[kernel] Parsing tests/ltl/test_recursion1.c (with preprocessing) +[kernel] tests/ltl/test_recursion1.c:21: Warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -[kernel] tests/aorai/test_recursion1.c:42: Warning: +[kernel] tests/ltl/test_recursion1.c:42: Warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -[kernel] tests/aorai/test_recursion1.c:54: Warning: +[kernel] tests/ltl/test_recursion1.c:54: Warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_recursion1_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_recursion1_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_count = 2, @@ -51,7 +51,8 @@ predicate valid_string{L}(char *s) = /*@ ghost int T0_init = 1; */ /*@ ghost int accept_S1 = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S1; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_countOne; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; @@ -163,7 +164,8 @@ int countOne(char *argv) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ accept_S1 ∧ 0 ≡ T0_S2 ∧ 0 ≡ T0_init; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_count; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; @@ -269,7 +271,8 @@ int count(int argc, char **argv) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ T0_init ∧ 0 ≡ T0_S2 ∧ 0 ≡ accept_S1; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_recursion2.0.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_recursion2.0.res.oracle similarity index 95% rename from src/plugins/aorai/tests/aorai/oracle/test_recursion2.0.res.oracle rename to src/plugins/aorai/tests/ltl/oracle/test_recursion2.0.res.oracle index efa580f6bc6e5aae0b60ae36c26c5fc05bdf1b01..2a45f6df9a0c0492d43a914b3956d05da1ec92dc 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_recursion2.0.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_recursion2.0.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/test_recursion2.c (with preprocessing) +[kernel] Parsing tests/ltl/test_recursion2.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_recursion2_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_recursion2_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_count = 2, @@ -67,7 +67,9 @@ int global_argc = 0; /*@ ghost int T1 = 0; */ /*@ ghost int accept_T2 = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires (1 ≡ S1 ∨ 1 ≡ T1) ∧ 0 ≡ T0_init ∧ 0 ≡ accept_T2; + requires 1 ≡ T1 ⇒ global_argc > 0; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_count; assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, accept_T2; @@ -196,7 +198,8 @@ int count(char *argv) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ S1 ∧ 0 ≡ T0_init ∧ 0 ≡ T1 ∧ 0 ≡ accept_T2; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_sumOne; assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, accept_T2; @@ -327,7 +330,8 @@ int sumOne(char *t, int length) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ T0_init ∧ 0 ≡ S1 ∧ 0 ≡ T1 ∧ 0 ≡ accept_T2; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, accept_T2; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_recursion2.1.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_recursion2.1.res.oracle similarity index 95% rename from src/plugins/aorai/tests/aorai/oracle/test_recursion2.1.res.oracle rename to src/plugins/aorai/tests/ltl/oracle/test_recursion2.1.res.oracle index 8b5a200aeaa8f8ae1ec8d1f931528ee7fdc52242..741ab2d5228be77cd697851f6fb4c8a80e783e9c 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_recursion2.1.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_recursion2.1.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/test_recursion2.c (with preprocessing) +[kernel] Parsing tests/ltl/test_recursion2.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_recursion2_1.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_recursion2_1.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_count = 2, @@ -67,7 +67,9 @@ int global_argc = 0; /*@ ghost int T1 = 0; */ /*@ ghost int accept_T2 = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires (1 ≡ S1 ∨ 1 ≡ T1) ∧ 0 ≡ T0_init ∧ 0 ≡ accept_T2; + requires 1 ≡ T1 ⇒ global_argc > 0; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_count; assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, accept_T2; @@ -196,7 +198,8 @@ int count(char *argv) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ S1 ∧ 0 ≡ T0_init ∧ 0 ≡ T1 ∧ 0 ≡ accept_T2; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_sumOne; assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, accept_T2; @@ -327,7 +330,8 @@ int sumOne(char *t, int length) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ T0_init ∧ 0 ≡ S1 ∧ 0 ≡ T1 ∧ 0 ≡ accept_T2; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, S1, T0_init, T1, accept_T2; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_switch2.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_switch2.res.oracle similarity index 95% rename from src/plugins/aorai/tests/aorai/oracle/test_switch2.res.oracle rename to src/plugins/aorai/tests/ltl/oracle/test_switch2.res.oracle index cf43cbba6f083bd3c2f9f92301ec727ef15d74fe..2ceecc16fc151c2ddca917d597dc7114a5a58dd8 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_switch2.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_switch2.res.oracle @@ -1,10 +1,10 @@ -[kernel] Parsing tests/aorai/test_switch2.c (with preprocessing) +[kernel] Parsing tests/ltl/test_switch2.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[aorai] tests/aorai/test_switch2.c:34: Warning: +[aorai] tests/ltl/test_switch2.c:34: Warning: Call to opc not conforming to automaton (post-cond). Assuming it is on a dead path -[aorai] tests/aorai/test_switch2.c:23: Warning: +[aorai] tests/ltl/test_switch2.c:23: Warning: Call to opc not conforming to automaton (pre-cond). Assuming it is on a dead path -[kernel] Parsing /tmp/aorai_test_switch2_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_switch2_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_main = 3, @@ -30,7 +30,11 @@ int rr = 1; /*@ ghost int accept_all = 0; */ /*@ ghost int accept_init = 1; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ 0 ≡ accept_S4 ∧ + 0 ≡ accept_S5 ∧ 0 ≡ accept_S6 ∧ 0 ≡ accept_all ∧ + 0 ≡ accept_init; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_opa; assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, accept_S4, accept_S5, accept_S6, accept_all, accept_init; @@ -195,7 +199,11 @@ void opa(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ accept_S4 ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ + 0 ≡ accept_S5 ∧ 0 ≡ accept_S6 ∧ 0 ≡ accept_all ∧ + 0 ≡ accept_init; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_opb; assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, accept_S4, accept_S5, accept_S6, accept_all, accept_init; @@ -356,7 +364,8 @@ void opb(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires \false; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_opc; assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, accept_S4, accept_S5, accept_S6, accept_all, accept_init; @@ -516,7 +525,11 @@ void opc(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ accept_init ∧ 0 ≡ accept_S2 ∧ 0 ≡ accept_S3 ∧ + 0 ≡ accept_S4 ∧ 0 ≡ accept_S5 ∧ 0 ≡ accept_S6 ∧ + 0 ≡ accept_all; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, accept_S2, accept_S3, accept_S4, accept_S5, accept_S6, accept_all, accept_init; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_switch3.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_switch3.res.oracle similarity index 95% rename from src/plugins/aorai/tests/aorai/oracle/test_switch3.res.oracle rename to src/plugins/aorai/tests/ltl/oracle/test_switch3.res.oracle index 7c650ba0861a05cd096cf028417e699e2328cf20..98fef42772d572f1ea75d8df26c6b528b85884c1 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_switch3.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_switch3.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/test_switch3.c (with preprocessing) +[kernel] Parsing tests/ltl/test_switch3.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_switch3_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_switch3_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_count = 2, @@ -18,7 +18,10 @@ enum aorai_OpStatusList { /*@ ghost int accept_S1 = 0; */ /*@ ghost int accept_S2 = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + (1 ≡ T0_S2 ∨ 1 ≡ accept_S2) ∧ 0 ≡ T0_init ∧ + 0 ≡ accept_S1; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_countOne; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, accept_S2; @@ -143,7 +146,10 @@ int countOne(char *argv) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + (1 ≡ T0_S2 ∨ 1 ≡ accept_S1) ∧ 0 ≡ T0_init ∧ + 0 ≡ accept_S2; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_count; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, accept_S2; @@ -294,7 +300,9 @@ int count(int argc, char **argv) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ T0_init ∧ 0 ≡ T0_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, accept_S2; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_switch3_et_recursion.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_switch3_et_recursion.res.oracle similarity index 93% rename from src/plugins/aorai/tests/aorai/oracle/test_switch3_et_recursion.res.oracle rename to src/plugins/aorai/tests/ltl/oracle/test_switch3_et_recursion.res.oracle index 36ea60d0a6ebc872ec3f26d8f37a0aa53d8a46a6..e5154fb858165466a56370e5d91986cf92384539 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_switch3_et_recursion.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_switch3_et_recursion.res.oracle @@ -1,8 +1,8 @@ -[kernel] Parsing tests/aorai/test_switch3_et_recursion.c (with preprocessing) +[kernel] Parsing tests/ltl/test_switch3_et_recursion.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[aorai] tests/aorai/test_switch3_et_recursion.c:26: Warning: +[aorai] tests/ltl/test_switch3_et_recursion.c:26: Warning: Call to countOne does not follow automaton's specification. This path is assumed to be dead -[kernel] Parsing /tmp/aorai_test_switch3_et_recursion_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_switch3_et_recursion_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_count = 2, @@ -19,7 +19,8 @@ enum aorai_OpStatusList { /*@ ghost int T0_init = 1; */ /*@ ghost int accept_S1 = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S1; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_countOne; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; @@ -123,7 +124,8 @@ int countOne(char *argv) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ accept_S1 ∧ 0 ≡ T0_S2 ∧ 0 ≡ T0_init; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_count; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; @@ -231,7 +233,8 @@ int count(int argc, char **argv) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ T0_init ∧ 0 ≡ T0_S2 ∧ 0 ≡ accept_S1; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_switch3_if.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_switch3_if.res.oracle similarity index 95% rename from src/plugins/aorai/tests/aorai/oracle/test_switch3_if.res.oracle rename to src/plugins/aorai/tests/ltl/oracle/test_switch3_if.res.oracle index d0d98a3a8d87ccdcc08c916ad90c03ecdb9c8459..4666520a57e4971263d00b54bcf6e80c92189602 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_switch3_if.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_switch3_if.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/test_switch3_if.c (with preprocessing) +[kernel] Parsing tests/ltl/test_switch3_if.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_switch3_if_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_switch3_if_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_count = 2, @@ -18,7 +18,10 @@ enum aorai_OpStatusList { /*@ ghost int accept_S1 = 0; */ /*@ ghost int accept_S2 = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + (1 ≡ T0_S2 ∨ 1 ≡ accept_S2) ∧ 0 ≡ T0_init ∧ + 0 ≡ accept_S1; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_countOne; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, accept_S2; @@ -141,7 +144,10 @@ int countOne(char *argv) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + (1 ≡ T0_S2 ∨ 1 ≡ accept_S1) ∧ 0 ≡ T0_init ∧ + 0 ≡ accept_S2; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_count; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, accept_S2; @@ -292,7 +298,9 @@ int count(int argc, char **argv) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ T0_init ∧ 0 ≡ T0_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, accept_S2; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_switch3_return.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_switch3_return.res.oracle similarity index 95% rename from src/plugins/aorai/tests/aorai/oracle/test_switch3_return.res.oracle rename to src/plugins/aorai/tests/ltl/oracle/test_switch3_return.res.oracle index e3f099446489b1a2263da75cbaf33a37c1ef68fe..95252b378b334550da4837d9954756ec07d77f4c 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_switch3_return.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_switch3_return.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/test_switch3_return.c (with preprocessing) +[kernel] Parsing tests/ltl/test_switch3_return.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_switch3_return_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_switch3_return_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_count = 2, @@ -18,7 +18,10 @@ enum aorai_OpStatusList { /*@ ghost int accept_S1 = 0; */ /*@ ghost int accept_S2 = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + (1 ≡ T0_S2 ∨ 1 ≡ accept_S2) ∧ 0 ≡ T0_init ∧ + 0 ≡ accept_S1; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_countOne; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, accept_S2; @@ -148,7 +151,10 @@ int countOne(char *argv) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + (1 ≡ T0_S2 ∨ 1 ≡ accept_S1) ∧ 0 ≡ T0_init ∧ + 0 ≡ accept_S2; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_count; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, accept_S2; @@ -299,7 +305,9 @@ int count(int argc, char **argv) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ T0_init ∧ 0 ≡ T0_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1, accept_S2; diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/goto.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/goto.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..a0b1d8ed006dcc5ea0ee140a4ffe963e975d0e90 --- /dev/null +++ b/src/plugins/aorai/tests/ltl/oracle_prove/goto.res.oracle @@ -0,0 +1,8 @@ +[kernel] Parsing tests/ltl/goto.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[aorai] tests/ltl/goto.c:28: Warning: + Call to opc does not follow automaton's specification. This path is assumed to be dead +[kernel] Parsing TMPDIR/aorai_goto_0.i (no preprocessing) +[wp] TMPDIR/aorai_goto_0.i:4: Warning: + Global invariant not handled yet ('inv' ignored) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..6e0517bda1c07bff22106dd567c40ef03029419d --- /dev/null +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle.res.oracle @@ -0,0 +1,8 @@ +[kernel] Parsing tests/ltl/test_boucle.c (with preprocessing) +[kernel:typing:implicit-function-declaration] tests/ltl/test_boucle.c:16: Warning: + Calling undeclared function call_to_an_undefined_function. Old style K&R code? +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_boucle_0.i (no preprocessing) +[wp] Warning: Missing RTE guards +[kernel:annot:missing-spec] TMPDIR/aorai_test_boucle_0.i:81: Warning: + Neither code nor specification for function call_to_an_undefined_function, generating default assigns from the prototype diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle1.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle1.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..1569a5b398d4faf17bcd738ec5e59ba3470a7d8f --- /dev/null +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle1.res.oracle @@ -0,0 +1,8 @@ +[kernel] Parsing tests/ltl/test_boucle1.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_boucle1_0.i (no preprocessing) +[wp] TMPDIR/aorai_test_boucle1_0.i:3: Warning: + Global invariant not handled yet ('inv_cpt' ignored) +[wp] TMPDIR/aorai_test_boucle1_0.i:6: Warning: + Global invariant not handled yet ('inv_status' ignored) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle2.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle2.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..6aff87fc8f04cb57fafbcfab6e1693e21a6112c8 --- /dev/null +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle2.res.oracle @@ -0,0 +1,6 @@ +[kernel] Parsing tests/ltl/test_boucle2.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_boucle2_0.i (no preprocessing) +[wp] TMPDIR/aorai_test_boucle2_0.i:4: Warning: + Global invariant not handled yet ('inv' ignored) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle3.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle3.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..d42c00524da292d300baf6eb1c8465fca0a1de88 --- /dev/null +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle3.res.oracle @@ -0,0 +1,6 @@ +[kernel] Parsing tests/ltl/test_boucle3.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_boucle3_0.i (no preprocessing) +[wp] TMPDIR/aorai_test_boucle3_0.i:4: Warning: + Global invariant not handled yet ('inv' ignored) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_factorial.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_factorial.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..6e1e98b96475e950de103887600795bebb7f75c7 --- /dev/null +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_factorial.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ltl/test_factorial.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_factorial_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion1.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion1.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..b41e5fc1a018d973abfb9b98ecb0739dc439b879 --- /dev/null +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion1.res.oracle @@ -0,0 +1,11 @@ +[kernel] Parsing tests/ltl/test_recursion1.c (with preprocessing) +[kernel] tests/ltl/test_recursion1.c:21: Warning: + parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. +[kernel] tests/ltl/test_recursion1.c:42: Warning: + parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. +[kernel] tests/ltl/test_recursion1.c:54: Warning: + parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_recursion1_0.i (no preprocessing) +[wp] Warning: No definition for 'string_len' interpreted as reads nothing +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion2.0.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion2.0.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..ccdb613ba7df3a6e4cf3d433a986b71f550e4501 --- /dev/null +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion2.0.res.oracle @@ -0,0 +1,6 @@ +[kernel] Parsing tests/ltl/test_recursion2.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_recursion2_0.i (no preprocessing) +[wp] Warning: No definition for 'string_len' interpreted as reads nothing +[wp] Warning: No definition for 'sum_tab' interpreted as reads nothing +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion2.1.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion2.1.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..8e71caf0debca2dc610c47ca48fbce0d3983eb82 --- /dev/null +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion2.1.res.oracle @@ -0,0 +1,6 @@ +[kernel] Parsing tests/ltl/test_recursion2.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_recursion2_1.i (no preprocessing) +[wp] Warning: No definition for 'string_len' interpreted as reads nothing +[wp] Warning: No definition for 'sum_tab' interpreted as reads nothing +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_switch2.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch2.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..9964a15c39c0df3664931de857618178351c0552 --- /dev/null +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch2.res.oracle @@ -0,0 +1,10 @@ +[kernel] Parsing tests/ltl/test_switch2.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[aorai] tests/ltl/test_switch2.c:34: Warning: + Call to opc not conforming to automaton (post-cond). Assuming it is on a dead path +[aorai] tests/ltl/test_switch2.c:23: Warning: + Call to opc not conforming to automaton (pre-cond). Assuming it is on a dead path +[kernel] Parsing TMPDIR/aorai_test_switch2_0.i (no preprocessing) +[wp] TMPDIR/aorai_test_switch2_0.i:4: Warning: + Global invariant not handled yet ('inv' ignored) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..bfe46c01065891f3dc5d9c074dfc8a316e494409 --- /dev/null +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ltl/test_switch3.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_switch3_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_et_recursion.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_et_recursion.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..f13072d1a65cb42361f1cb18532fbc21dba5c80a --- /dev/null +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_et_recursion.res.oracle @@ -0,0 +1,6 @@ +[kernel] Parsing tests/ltl/test_switch3_et_recursion.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[aorai] tests/ltl/test_switch3_et_recursion.c:26: Warning: + Call to countOne does not follow automaton's specification. This path is assumed to be dead +[kernel] Parsing TMPDIR/aorai_test_switch3_et_recursion_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_if.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_if.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..68de03d1b30d2be55649d7e8c0139bd9668a380e --- /dev/null +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_if.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ltl/test_switch3_if.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_switch3_if_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_return.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_return.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..2bfc5074656abd0609d096003396b2d396dbdce4 --- /dev/null +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_return.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ltl/test_switch3_return.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_switch3_return_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/aorai/test_boucle.c b/src/plugins/aorai/tests/ltl/test_boucle.c similarity index 69% rename from src/plugins/aorai/tests/aorai/test_boucle.c rename to src/plugins/aorai/tests/ltl/test_boucle.c index 3259071fb87a60e71c54ef9634acab68c534e556..72cf5e78ac931fa05a5a21be18a1777112e6e8e2 100644 --- a/src/plugins/aorai/tests/aorai/test_boucle.c +++ b/src/plugins/aorai/tests/ltl/test_boucle.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl tests/aorai/test_boucle.ltl -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ /*@ requires \true; diff --git a/src/plugins/aorai/tests/aorai/test_boucle.ltl b/src/plugins/aorai/tests/ltl/test_boucle.ltl similarity index 100% rename from src/plugins/aorai/tests/aorai/test_boucle.ltl rename to src/plugins/aorai/tests/ltl/test_boucle.ltl diff --git a/src/plugins/aorai/tests/aorai/test_boucle1.c b/src/plugins/aorai/tests/ltl/test_boucle1.c similarity index 80% rename from src/plugins/aorai/tests/aorai/test_boucle1.c rename to src/plugins/aorai/tests/ltl/test_boucle1.c index 50c3948cf362e55ed303c0a096bd297cd085de7c..0245ffedcfdfe67aad9a8d9610159c9a3313b0e8 100644 --- a/src/plugins/aorai/tests/aorai/test_boucle1.c +++ b/src/plugins/aorai/tests/ltl/test_boucle1.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl tests/aorai/test_boucle1.ltl -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int cpt=3; diff --git a/src/plugins/aorai/tests/aorai/test_boucle1.ltl b/src/plugins/aorai/tests/ltl/test_boucle1.ltl similarity index 100% rename from src/plugins/aorai/tests/aorai/test_boucle1.ltl rename to src/plugins/aorai/tests/ltl/test_boucle1.ltl diff --git a/src/plugins/aorai/tests/aorai/test_boucle2.c b/src/plugins/aorai/tests/ltl/test_boucle2.c similarity index 67% rename from src/plugins/aorai/tests/aorai/test_boucle2.c rename to src/plugins/aorai/tests/ltl/test_boucle2.c index 334a87c35252cf8ddd51f55f020f3a16138016a7..9d4cf3a9aff3c018e3739a253578cdcfb92eea5e 100644 --- a/src/plugins/aorai/tests/aorai/test_boucle2.c +++ b/src/plugins/aorai/tests/ltl/test_boucle2.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl tests/aorai/test_boucle2.ltl -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int status=0; diff --git a/src/plugins/aorai/tests/aorai/test_boucle2.ltl b/src/plugins/aorai/tests/ltl/test_boucle2.ltl similarity index 100% rename from src/plugins/aorai/tests/aorai/test_boucle2.ltl rename to src/plugins/aorai/tests/ltl/test_boucle2.ltl diff --git a/src/plugins/aorai/tests/aorai/test_boucle3.c b/src/plugins/aorai/tests/ltl/test_boucle3.c similarity index 66% rename from src/plugins/aorai/tests/aorai/test_boucle3.c rename to src/plugins/aorai/tests/ltl/test_boucle3.c index d69f4cabdd4352da405ff11255aebfa5ecef8914..6c93a4202649a24dff714ef33906252a84b74704 100644 --- a/src/plugins/aorai/tests/aorai/test_boucle3.c +++ b/src/plugins/aorai/tests/ltl/test_boucle3.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl tests/aorai/test_boucle3.ltl -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ diff --git a/src/plugins/aorai/tests/aorai/test_boucle3.ltl b/src/plugins/aorai/tests/ltl/test_boucle3.ltl similarity index 100% rename from src/plugins/aorai/tests/aorai/test_boucle3.ltl rename to src/plugins/aorai/tests/ltl/test_boucle3.ltl diff --git a/src/plugins/aorai/tests/aorai/test_factorial.c b/src/plugins/aorai/tests/ltl/test_factorial.c similarity index 91% rename from src/plugins/aorai/tests/aorai/test_factorial.c rename to src/plugins/aorai/tests/ltl/test_factorial.c index 589904e8bb19b24ac0c3791a2f3404cd997398cd..6a429a55e31de0a06be227ffd9ca72d1fb4770ea 100644 --- a/src/plugins/aorai/tests/aorai/test_factorial.c +++ b/src/plugins/aorai/tests/ltl/test_factorial.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl tests/aorai/test_factorial.ltl -aorai-test 1 -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ diff --git a/src/plugins/aorai/tests/aorai/test_factorial.ltl b/src/plugins/aorai/tests/ltl/test_factorial.ltl similarity index 100% rename from src/plugins/aorai/tests/aorai/test_factorial.ltl rename to src/plugins/aorai/tests/ltl/test_factorial.ltl diff --git a/src/plugins/aorai/tests/aorai/test_recursion1.c b/src/plugins/aorai/tests/ltl/test_recursion1.c similarity index 91% rename from src/plugins/aorai/tests/aorai/test_recursion1.c rename to src/plugins/aorai/tests/ltl/test_recursion1.c index aa0c965730a8a66102e5a912b1edacb418ca4e7e..ee0968101b1a776f5b232d5740d4ae4e2c568f7e 100644 --- a/src/plugins/aorai/tests/aorai/test_recursion1.c +++ b/src/plugins/aorai/tests/ltl/test_recursion1.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl tests/aorai/test_recursion1.ltl -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ diff --git a/src/plugins/aorai/tests/aorai/test_recursion1.ltl b/src/plugins/aorai/tests/ltl/test_recursion1.ltl similarity index 100% rename from src/plugins/aorai/tests/aorai/test_recursion1.ltl rename to src/plugins/aorai/tests/ltl/test_recursion1.ltl diff --git a/src/plugins/aorai/tests/aorai/test_recursion2.c b/src/plugins/aorai/tests/ltl/test_recursion2.c similarity index 87% rename from src/plugins/aorai/tests/aorai/test_recursion2.c rename to src/plugins/aorai/tests/ltl/test_recursion2.c index 10764545a55a8454744052b6bc7f72522c1f4ab0..a13c39b9f887df7af32c52fa0f2a142e992478cd 100644 --- a/src/plugins/aorai/tests/aorai/test_recursion2.c +++ b/src/plugins/aorai/tests/ltl/test_recursion2.c @@ -1,6 +1,6 @@ /* run.config* - OPT: -aorai-buchi tests/aorai/test_recursion2.promela -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ - OPT: -aorai-buchi tests/aorai/test_recursion3.promela -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-buchi @PTEST_DIR@/@PTEST_NAME@.promela -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-buchi @PTEST_DIR@/test_recursion3.promela -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ /* Calcul de la longueur cumulee des chaines de caracteres prises en parametre */ diff --git a/src/plugins/aorai/tests/aorai/test_recursion2.promela b/src/plugins/aorai/tests/ltl/test_recursion2.promela similarity index 100% rename from src/plugins/aorai/tests/aorai/test_recursion2.promela rename to src/plugins/aorai/tests/ltl/test_recursion2.promela diff --git a/src/plugins/aorai/tests/aorai/test_recursion3.promela b/src/plugins/aorai/tests/ltl/test_recursion3.promela similarity index 100% rename from src/plugins/aorai/tests/aorai/test_recursion3.promela rename to src/plugins/aorai/tests/ltl/test_recursion3.promela diff --git a/src/plugins/aorai/tests/aorai/test_switch2.c b/src/plugins/aorai/tests/ltl/test_switch2.c similarity index 67% rename from src/plugins/aorai/tests/aorai/test_switch2.c rename to src/plugins/aorai/tests/ltl/test_switch2.c index d5d32950c88aada63aee916f58cc830d7fee4751..f411cec23dcd459cbfe1bdb5d3d33b05ad6e3ee2 100644 --- a/src/plugins/aorai/tests/aorai/test_switch2.c +++ b/src/plugins/aorai/tests/ltl/test_switch2.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl tests/aorai/test_switch2.ltl -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int status=0; diff --git a/src/plugins/aorai/tests/aorai/test_switch2.ltl b/src/plugins/aorai/tests/ltl/test_switch2.ltl similarity index 100% rename from src/plugins/aorai/tests/aorai/test_switch2.ltl rename to src/plugins/aorai/tests/ltl/test_switch2.ltl diff --git a/src/plugins/aorai/tests/aorai/test_switch3.c b/src/plugins/aorai/tests/ltl/test_switch3.c similarity index 76% rename from src/plugins/aorai/tests/aorai/test_switch3.c rename to src/plugins/aorai/tests/ltl/test_switch3.c index 9c2b3d52a9679cee8f001f2af4848eb6ccf82e10..42e5fc6ba9aebb0bf7be62ec776e3a969f250d4a 100644 --- a/src/plugins/aorai/tests/aorai/test_switch3.c +++ b/src/plugins/aorai/tests/ltl/test_switch3.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl tests/aorai/test_switch3.ltl -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ /* Calcul de la longueur cumulee des chaines de caracteres prises en parametre */ diff --git a/src/plugins/aorai/tests/aorai/test_switch3.ltl b/src/plugins/aorai/tests/ltl/test_switch3.ltl similarity index 100% rename from src/plugins/aorai/tests/aorai/test_switch3.ltl rename to src/plugins/aorai/tests/ltl/test_switch3.ltl diff --git a/src/plugins/aorai/tests/aorai/test_switch3_et_recursion.c b/src/plugins/aorai/tests/ltl/test_switch3_et_recursion.c similarity index 79% rename from src/plugins/aorai/tests/aorai/test_switch3_et_recursion.c rename to src/plugins/aorai/tests/ltl/test_switch3_et_recursion.c index 51ae0495113fa8deae4e5ab62b30b7255a7a3914..00caa9826bb96e63a099b54204d1e1d5e9c3aeab 100644 --- a/src/plugins/aorai/tests/aorai/test_switch3_et_recursion.c +++ b/src/plugins/aorai/tests/ltl/test_switch3_et_recursion.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl tests/aorai/test_switch3_et_recursion.ltl -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ /* Calcul de la longueur cumulee des chaines de caracteres prises en parametre */ diff --git a/src/plugins/aorai/tests/aorai/test_switch3_et_recursion.ltl b/src/plugins/aorai/tests/ltl/test_switch3_et_recursion.ltl similarity index 100% rename from src/plugins/aorai/tests/aorai/test_switch3_et_recursion.ltl rename to src/plugins/aorai/tests/ltl/test_switch3_et_recursion.ltl diff --git a/src/plugins/aorai/tests/aorai/test_switch3_if.c b/src/plugins/aorai/tests/ltl/test_switch3_if.c similarity index 74% rename from src/plugins/aorai/tests/aorai/test_switch3_if.c rename to src/plugins/aorai/tests/ltl/test_switch3_if.c index 4b483877008ff209fdaf56910605b44c455530fb..f6375d4d859a018e4349cbcbdca037d48298de40 100644 --- a/src/plugins/aorai/tests/aorai/test_switch3_if.c +++ b/src/plugins/aorai/tests/ltl/test_switch3_if.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl tests/aorai/test_switch3.ltl -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/test_switch3.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ /* Calcul de la longueur cumulee des chaines de caracteres prises en parametre */ diff --git a/src/plugins/aorai/tests/aorai/test_switch3_return.c b/src/plugins/aorai/tests/ltl/test_switch3_return.c similarity index 76% rename from src/plugins/aorai/tests/aorai/test_switch3_return.c rename to src/plugins/aorai/tests/ltl/test_switch3_return.c index 62956822a69c9dd34fee64206c52772b23288a7e..a105540b9829ff3d2cdb2a7c12b4f7b056c8ece2 100644 --- a/src/plugins/aorai/tests/aorai/test_switch3_return.c +++ b/src/plugins/aorai/tests/ltl/test_switch3_return.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl tests/aorai/test_switch3.ltl -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/test_switch3.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ /* Calcul de la longueur cumulee des chaines de caracteres prises en parametre */ diff --git a/src/plugins/aorai/tests/ya/assigns.c b/src/plugins/aorai/tests/ya/assigns.c new file mode 100644 index 0000000000000000000000000000000000000000..ce6fe159678db8d14bddb1119d020f3b6362b14b --- /dev/null +++ b/src/plugins/aorai/tests/ya/assigns.c @@ -0,0 +1,22 @@ +/* run.config* + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/assigns_det.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + MODULE: @PTEST_DIR@/name_projects.cmxs + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -then -print +*/ + +int X; + +void f(void) { X++; } + +/*@ assigns X; + behavior foo: + assigns X; +*/ +int main () { + //@ assigns X; + X++; + //@ assigns X; + f(); + return X; +} diff --git a/src/plugins/aorai/tests/aorai/assigns.ya b/src/plugins/aorai/tests/ya/assigns.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/assigns.ya rename to src/plugins/aorai/tests/ya/assigns.ya diff --git a/src/plugins/aorai/tests/aorai/assigns_det.ya b/src/plugins/aorai/tests/ya/assigns_det.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/assigns_det.ya rename to src/plugins/aorai/tests/ya/assigns_det.ya diff --git a/src/plugins/aorai/tests/aorai/bts1289-2.ya b/src/plugins/aorai/tests/ya/bts1289-2.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/bts1289-2.ya rename to src/plugins/aorai/tests/ya/bts1289-2.ya diff --git a/src/plugins/aorai/tests/ya/bts1289.i b/src/plugins/aorai/tests/ya/bts1289.i new file mode 100644 index 0000000000000000000000000000000000000000..2c6c8f9aa59097ab9cd9f8dd9aa63d1ffcf62900 --- /dev/null +++ b/src/plugins/aorai/tests/ya/bts1289.i @@ -0,0 +1,14 @@ +/* run.config* + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test 1 -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@-2.ya -load-module tests/Aorai_test.cmxs -aorai-test 1 -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + */ + +void a(void) {} + +void main(void) +{ + //@ loop assigns i; + for (int i=0; i<10; ++i) + a(); +} + diff --git a/src/plugins/aorai/tests/aorai/bts1289.ya b/src/plugins/aorai/tests/ya/bts1289.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/bts1289.ya rename to src/plugins/aorai/tests/ya/bts1289.ya diff --git a/src/plugins/aorai/tests/aorai/declared_function.i b/src/plugins/aorai/tests/ya/declared_function.i similarity index 57% rename from src/plugins/aorai/tests/aorai/declared_function.i rename to src/plugins/aorai/tests/ya/declared_function.i index 6f8d33d4208e2ba86505d262a86f2b206f9612ac..53bcdfd71ad5fdf29b39d44acc444dd4a29d5c79 100644 --- a/src/plugins/aorai/tests/aorai/declared_function.i +++ b/src/plugins/aorai/tests/ya/declared_function.i @@ -1,5 +1,5 @@ /* run.config* -OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ +OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int f(void); diff --git a/src/plugins/aorai/tests/aorai/declared_function.ya b/src/plugins/aorai/tests/ya/declared_function.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/declared_function.ya rename to src/plugins/aorai/tests/ya/declared_function.ya diff --git a/src/plugins/aorai/tests/aorai/deterministic.i b/src/plugins/aorai/tests/ya/deterministic.i similarity index 57% rename from src/plugins/aorai/tests/aorai/deterministic.i rename to src/plugins/aorai/tests/ya/deterministic.i index 6361d59e5bc0ef9b77af180e67f1748f96cbdf78..b92271127e264c85e2578be4fbdc86a1e7ac8a9e 100644 --- a/src/plugins/aorai/tests/aorai/deterministic.i +++ b/src/plugins/aorai/tests/ya/deterministic.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata tests/aorai/deterministic.ya -aorai-test 1 -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int X; diff --git a/src/plugins/aorai/tests/aorai/deterministic.ya b/src/plugins/aorai/tests/ya/deterministic.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/deterministic.ya rename to src/plugins/aorai/tests/ya/deterministic.ya diff --git a/src/plugins/aorai/tests/ya/formals.i b/src/plugins/aorai/tests/ya/formals.i new file mode 100644 index 0000000000000000000000000000000000000000..4a32df49b67be992c14ceb88e3541d05c638992d --- /dev/null +++ b/src/plugins/aorai/tests/ya/formals.i @@ -0,0 +1,9 @@ +/* run.config* +OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ +*/ + +int f(int x) { return x; } + +int g(int y) { return y; } + +int main() { f(1); g(2); } diff --git a/src/plugins/aorai/tests/aorai/formals.ya b/src/plugins/aorai/tests/ya/formals.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/formals.ya rename to src/plugins/aorai/tests/ya/formals.ya diff --git a/src/plugins/aorai/tests/ya/generate_assigns_bts1290.i b/src/plugins/aorai/tests/ya/generate_assigns_bts1290.i new file mode 100644 index 0000000000000000000000000000000000000000..2e92796ec0655d2ae0977566205fc1072e275a60 --- /dev/null +++ b/src/plugins/aorai/tests/ya/generate_assigns_bts1290.i @@ -0,0 +1,9 @@ +/* run.config* + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test 1 -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + */ +void main(void) +{ + //@ loop assigns i; + for (int i=0; i<10; ++i) + ; +} diff --git a/src/plugins/aorai/tests/aorai/generate_assigns_bts1290.ya b/src/plugins/aorai/tests/ya/generate_assigns_bts1290.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/generate_assigns_bts1290.ya rename to src/plugins/aorai/tests/ya/generate_assigns_bts1290.ya diff --git a/src/plugins/aorai/tests/ya/hoare_seq.i b/src/plugins/aorai/tests/ya/hoare_seq.i new file mode 100644 index 0000000000000000000000000000000000000000..cc7e148477430589b00c142325c5a4baf3a32531 --- /dev/null +++ b/src/plugins/aorai/tests/ya/hoare_seq.i @@ -0,0 +1,14 @@ +/* run.config* +OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ +*/ + +void f(void) { } + +/*@ behavior bhv: + assumes c > 0; + ensures \result == 0; +*/ +int main(int c) { + if (c <= 0) { f (); } + return 0; +} diff --git a/src/plugins/aorai/tests/aorai/hoare_seq.ya b/src/plugins/aorai/tests/ya/hoare_seq.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/hoare_seq.ya rename to src/plugins/aorai/tests/ya/hoare_seq.ya diff --git a/src/plugins/aorai/tests/aorai/incorrect.i b/src/plugins/aorai/tests/ya/incorrect.i similarity index 58% rename from src/plugins/aorai/tests/aorai/incorrect.i rename to src/plugins/aorai/tests/ya/incorrect.i index 6a904675b53e3a0c81d4262ba64e7bb11dae255a..fae082d3120aa4fd80c2354bcc318c71e43a689d 100644 --- a/src/plugins/aorai/tests/aorai/incorrect.i +++ b/src/plugins/aorai/tests/ya/incorrect.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int f(void); diff --git a/src/plugins/aorai/tests/aorai/incorrect.ya b/src/plugins/aorai/tests/ya/incorrect.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/incorrect.ya rename to src/plugins/aorai/tests/ya/incorrect.ya diff --git a/src/plugins/aorai/tests/aorai/loop_bts1050.i b/src/plugins/aorai/tests/ya/loop_bts1050.i similarity index 50% rename from src/plugins/aorai/tests/aorai/loop_bts1050.i rename to src/plugins/aorai/tests/ya/loop_bts1050.i index d6d2cef2968e4060731ab38116aa5a1792a59a7e..fdec741b7b32ef14be4756afd8847a9ac21ccb27 100644 --- a/src/plugins/aorai/tests/aorai/loop_bts1050.i +++ b/src/plugins/aorai/tests/ya/loop_bts1050.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata tests/aorai/loop_bts1050.ya -aorai-test 1 -load-module tests/aorai/Aorai_test.cmxs -aorai-acceptance -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-acceptance -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ void f(){}; diff --git a/src/plugins/aorai/tests/aorai/loop_bts1050.ya b/src/plugins/aorai/tests/ya/loop_bts1050.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/loop_bts1050.ya rename to src/plugins/aorai/tests/ya/loop_bts1050.ya diff --git a/src/plugins/aorai/tests/aorai/monostate.i b/src/plugins/aorai/tests/ya/monostate.i similarity index 60% rename from src/plugins/aorai/tests/aorai/monostate.i rename to src/plugins/aorai/tests/ya/monostate.i index 1eedae0ff61712b9ab23aca587a10d80f8af33b6..9dade69c092b118f482686eaa918ee2e878a692c 100644 --- a/src/plugins/aorai/tests/aorai/monostate.i +++ b/src/plugins/aorai/tests/ya/monostate.i @@ -1,5 +1,5 @@ /* run.config -OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ +OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ void f(void) {} diff --git a/src/plugins/aorai/tests/aorai/monostate.ya b/src/plugins/aorai/tests/ya/monostate.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/monostate.ya rename to src/plugins/aorai/tests/ya/monostate.ya diff --git a/src/plugins/aorai/tests/aorai/name_projects.ml b/src/plugins/aorai/tests/ya/name_projects.ml similarity index 100% rename from src/plugins/aorai/tests/aorai/name_projects.ml rename to src/plugins/aorai/tests/ya/name_projects.ml diff --git a/src/plugins/aorai/tests/ya/not_prm.i b/src/plugins/aorai/tests/ya/not_prm.i new file mode 100644 index 0000000000000000000000000000000000000000..d96e123d6e6a367565597f0cce0df942b23a2ba5 --- /dev/null +++ b/src/plugins/aorai/tests/ya/not_prm.i @@ -0,0 +1,7 @@ +/* run.config* + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test -main f -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ +*/ + +int f(int x) { + return x; +} diff --git a/src/plugins/aorai/tests/aorai/not_prm.ya b/src/plugins/aorai/tests/ya/not_prm.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/not_prm.ya rename to src/plugins/aorai/tests/ya/not_prm.ya diff --git a/src/plugins/aorai/tests/aorai/oracle/assigns.0.res.oracle b/src/plugins/aorai/tests/ya/oracle/assigns.0.res.oracle similarity index 94% rename from src/plugins/aorai/tests/aorai/oracle/assigns.0.res.oracle rename to src/plugins/aorai/tests/ya/oracle/assigns.0.res.oracle index ef6224bb447e03550381c8c205c6feb41da0f37e..09b37de9a73706afe84ec0fa380d5be28c09a3a8 100644 --- a/src/plugins/aorai/tests/aorai/oracle/assigns.0.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/assigns.0.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/assigns.c (with preprocessing) +[kernel] Parsing tests/ya/assigns.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_assigns_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_assigns_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_f = 1, @@ -19,7 +19,9 @@ int X; /*@ ghost int Sf = 0; */ /*@ ghost int in_main = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ Sf ∧ 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S_in_f ∧ 0 ≡ in_main; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_f; assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S_in_f, Sf, in_main; @@ -146,7 +148,9 @@ void f(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S_in_f ∧ 0 ≡ Sf ∧ 0 ≡ in_main; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S_in_f, Sf, in_main; diff --git a/src/plugins/aorai/tests/aorai/oracle/assigns.1.res.oracle b/src/plugins/aorai/tests/ya/oracle/assigns.1.res.oracle similarity index 95% rename from src/plugins/aorai/tests/aorai/oracle/assigns.1.res.oracle rename to src/plugins/aorai/tests/ya/oracle/assigns.1.res.oracle index 5f5602cdd80d5cc5e3123a0fe3281b1fd19fbe99..7b3833fb8c530be00f93100df610e7986540081f 100644 --- a/src/plugins/aorai/tests/aorai/oracle/assigns.1.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/assigns.1.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/assigns.c (with preprocessing) +[kernel] Parsing tests/ya/assigns.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_assigns_1.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_assigns_1.i (no preprocessing) /* Generated by Frama-C */ enum aorai_States { aorai_reject_state = -2, @@ -33,7 +33,8 @@ int X; /*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ /*@ ghost int aorai_CurStates = S1; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires aorai_CurStates ≡ Sf; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_f; assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; @@ -123,7 +124,8 @@ void f(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires aorai_CurStates ≡ S1; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; diff --git a/src/plugins/aorai/tests/aorai/oracle/assigns.2.res.oracle b/src/plugins/aorai/tests/ya/oracle/assigns.2.res.oracle similarity index 84% rename from src/plugins/aorai/tests/aorai/oracle/assigns.2.res.oracle rename to src/plugins/aorai/tests/ya/oracle/assigns.2.res.oracle index a03928c6cad0adaaa70de524ae1c846eca1db1bd..f5a60a3aac12f9e6f74b645b97c97125445d9996 100644 --- a/src/plugins/aorai/tests/aorai/oracle/assigns.2.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/assigns.2.res.oracle @@ -1,4 +1,4 @@ -[kernel] Parsing tests/aorai/assigns.c (with preprocessing) +[kernel] Parsing tests/ya/assigns.c (with preprocessing) [aorai] Welcome to the Aorai plugin /* Generated by Frama-C */ int X; diff --git a/src/plugins/aorai/tests/aorai/oracle/bts1289.0.res.oracle b/src/plugins/aorai/tests/ya/oracle/bts1289.0.res.oracle similarity index 91% rename from src/plugins/aorai/tests/aorai/oracle/bts1289.0.res.oracle rename to src/plugins/aorai/tests/ya/oracle/bts1289.0.res.oracle index 97ad07ce779b14e27de99125e07e9e9b2bd71f11..74d55944211b288cd559e0c0f19e44b01dbcbbc6 100644 --- a/src/plugins/aorai/tests/aorai/oracle/bts1289.0.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/bts1289.0.res.oracle @@ -1,7 +1,7 @@ -[kernel] Parsing tests/aorai/bts1289.i (no preprocessing) +[kernel] Parsing tests/ya/bts1289.i (no preprocessing) [aorai] Welcome to the Aorai plugin [aorai] Warning: Call to main does not follow automaton's specification. This path is assumed to be dead -[kernel] Parsing /tmp/aorai_bts1289_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_bts1289_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_a = 1, @@ -15,7 +15,8 @@ enum aorai_OpStatusList { /*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ /*@ ghost int S = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires \false; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_a; assigns aorai_CurOpStatus, aorai_CurOperation, S; @@ -69,7 +70,8 @@ void a(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires \false; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, S; diff --git a/src/plugins/aorai/tests/aorai/oracle/bts1289.1.res.oracle b/src/plugins/aorai/tests/ya/oracle/bts1289.1.res.oracle similarity index 95% rename from src/plugins/aorai/tests/aorai/oracle/bts1289.1.res.oracle rename to src/plugins/aorai/tests/ya/oracle/bts1289.1.res.oracle index 566b9dc7ab47ef19917278a6e3bc53664b0d291a..adebb6ca55ae7558e8d58bd9d45d024806c68784 100644 --- a/src/plugins/aorai/tests/aorai/oracle/bts1289.1.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/bts1289.1.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/bts1289.i (no preprocessing) +[kernel] Parsing tests/ya/bts1289.i (no preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_bts1289_1.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_bts1289_1.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_a = 1, @@ -18,7 +18,10 @@ enum aorai_OpStatusList { /*@ ghost int aorai_intermediate_state_0 = 0; */ /*@ ghost int init = 1; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + (1 ≡ S ∨ 1 ≡ T) ∧ 0 ≡ aorai_intermediate_state ∧ + 0 ≡ aorai_intermediate_state_0 ∧ 0 ≡ init; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_a; assigns aorai_CurOpStatus, aorai_CurOperation, S, T, aorai_intermediate_state, aorai_intermediate_state_0, init; @@ -181,7 +184,10 @@ void a(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ init ∧ 0 ≡ S ∧ 0 ≡ T ∧ + 0 ≡ aorai_intermediate_state ∧ 0 ≡ aorai_intermediate_state_0; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, S, T, aorai_intermediate_state, aorai_intermediate_state_0, init; diff --git a/src/plugins/aorai/tests/aorai/oracle/declared_function.res.oracle b/src/plugins/aorai/tests/ya/oracle/declared_function.res.oracle similarity index 93% rename from src/plugins/aorai/tests/aorai/oracle/declared_function.res.oracle rename to src/plugins/aorai/tests/ya/oracle/declared_function.res.oracle index 9d37fe0b6442bed85a03f3b4a22d895bf153f3ca..ab55916b9af828248a4309cdc6424442f8027441 100644 --- a/src/plugins/aorai/tests/aorai/oracle/declared_function.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/declared_function.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/declared_function.i (no preprocessing) +[kernel] Parsing tests/ya/declared_function.i (no preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_declared_function_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_declared_function_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_States { aorai_reject_state = -2, @@ -46,7 +46,8 @@ check lemma I_deterministic_trans{L}: */ /*@ ghost int aorai_CurStates = I; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires aorai_CurStates ≡ I; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; diff --git a/src/plugins/aorai/tests/aorai/oracle/deterministic.res.oracle b/src/plugins/aorai/tests/ya/oracle/deterministic.res.oracle similarity index 95% rename from src/plugins/aorai/tests/aorai/oracle/deterministic.res.oracle rename to src/plugins/aorai/tests/ya/oracle/deterministic.res.oracle index 75acb9204ee5a6aee059455def9e02c64419a037..5a30e59e7d5e51dd0849a5f48c908fbe5493e073 100644 --- a/src/plugins/aorai/tests/aorai/oracle/deterministic.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/deterministic.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/deterministic.i (no preprocessing) +[kernel] Parsing tests/ya/deterministic.i (no preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_deterministic_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_deterministic_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_States { aorai_reject_state = -2, @@ -63,7 +63,9 @@ check lemma S0_deterministic_trans{L}: */ /*@ ghost int aorai_CurStates = Si; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires aorai_CurStates ≡ S3; + requires aorai_CurStates ≡ S3 ⇒ x ≡ 5 ∨ x ≡ 4; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_g; assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; @@ -191,7 +193,9 @@ void g(int x) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires aorai_CurStates ≡ S1; + requires aorai_CurStates ≡ S1 ⇒ x ≡ 4; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_f; assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; @@ -310,7 +314,9 @@ int f(int x) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires aorai_CurStates ≡ S0; + requires aorai_CurStates ≡ S0 ⇒ c ≡ 0 ∨ c ≢ 0; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_real_main; assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; @@ -429,7 +435,8 @@ int real_main(int c) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires aorai_CurStates ≡ Si; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; diff --git a/src/plugins/aorai/tests/aorai/oracle/formals.res.oracle b/src/plugins/aorai/tests/ya/oracle/formals.res.oracle similarity index 97% rename from src/plugins/aorai/tests/aorai/oracle/formals.res.oracle rename to src/plugins/aorai/tests/ya/oracle/formals.res.oracle index f7b7f60952fc0de58218d819587217b5ac8e2cb3..3fa9613a782d0cd189af5fb61fae70e89db84d9f 100644 --- a/src/plugins/aorai/tests/aorai/oracle/formals.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/formals.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/formals.i (no preprocessing) +[kernel] Parsing tests/ya/formals.i (no preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_formals_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_formals_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_States { aorai_reject_state = -2, @@ -77,7 +77,9 @@ check lemma aorai_intermediate_state_deterministic_trans{L}: \at(aorai_x,L) ≢ 1)); */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires aorai_CurStates ≡ main_0; + requires aorai_CurStates ≡ main_0 ⇒ x ≡ 3 ∨ x ≡ 1; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_f; assigns aorai_x_0, aorai_x, aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; @@ -295,7 +297,10 @@ int f(int x) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + aorai_CurStates ≡ OK ∨ + aorai_CurStates ≡ aorai_intermediate_state_0; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_g; assigns aorai_y, aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; @@ -473,7 +478,8 @@ int g(int y) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires aorai_CurStates ≡ init; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; diff --git a/src/plugins/aorai/tests/aorai/oracle/generate_assigns_bts1290.res.oracle b/src/plugins/aorai/tests/ya/oracle/generate_assigns_bts1290.res.oracle similarity index 90% rename from src/plugins/aorai/tests/aorai/oracle/generate_assigns_bts1290.res.oracle rename to src/plugins/aorai/tests/ya/oracle/generate_assigns_bts1290.res.oracle index f256e74d9cbfec7dfa9e9d2917fffe6deff0149e..6d8dc5b0067777a8f5ab853f8611e02a22d4925e 100644 --- a/src/plugins/aorai/tests/aorai/oracle/generate_assigns_bts1290.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/generate_assigns_bts1290.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/generate_assigns_bts1290.i (no preprocessing) +[kernel] Parsing tests/ya/generate_assigns_bts1290.i (no preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_generate_assigns_bts1290_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_generate_assigns_bts1290_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_main = 0 @@ -13,7 +13,8 @@ enum aorai_OpStatusList { /*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ /*@ ghost int S = 1; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ S; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, S; diff --git a/src/plugins/aorai/tests/aorai/oracle/hoare_seq.res.oracle b/src/plugins/aorai/tests/ya/oracle/hoare_seq.res.oracle similarity index 92% rename from src/plugins/aorai/tests/aorai/oracle/hoare_seq.res.oracle rename to src/plugins/aorai/tests/ya/oracle/hoare_seq.res.oracle index 9025e381a6c817d1455ffe392d0de9f1382755bc..ebd409ed392d15619f4c8d0f79e744425eb21ad0 100644 --- a/src/plugins/aorai/tests/aorai/oracle/hoare_seq.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/hoare_seq.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/hoare_seq.i (no preprocessing) +[kernel] Parsing tests/ya/hoare_seq.i (no preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_hoare_seq_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_hoare_seq_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_f = 1, @@ -20,7 +20,11 @@ enum aorai_OpStatusList { /*@ ghost int aorai_intermediate_state_2 = 0; */ /*@ ghost int aorai_reject = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ aorai_intermediate_state_0 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧ + 0 ≡ aorai_intermediate_state_1 ∧ + 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_reject; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_f; assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, aorai_intermediate_state, aorai_intermediate_state_0, @@ -227,7 +231,31 @@ void f(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; +/@ assigns \nothing; + + behavior bhv: + assumes c > 0; + ensures \result ≡ 1; + assigns \nothing; + + behavior bhv_out: + assumes ¬(c > 0); + ensures \result ≡ 0; + assigns \nothing; + + complete behaviors bhv, bhv_out; + disjoint behaviors bhv, bhv_out; + @/ +int main_bhv_bhv(int c); */ + +/*@ ghost + /@ requires + 1 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧ + 0 ≡ aorai_intermediate_state_0 ∧ + 0 ≡ aorai_intermediate_state_1 ∧ + 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_reject; + requires 1 ≡ S0 ⇒ c ≤ 0 ∨ c > 0; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, aorai_intermediate_state, aorai_intermediate_state_0, @@ -267,6 +295,7 @@ void f(void) @/ void main_pre_func(int c) { + int bhv_aux; int S0_tmp; int Sf_tmp; int aorai_intermediate_state_tmp; @@ -290,7 +319,10 @@ void f(void) if (c <= 0) aorai_intermediate_state_0_tmp = 1; else aorai_intermediate_state_0_tmp = 0; else aorai_intermediate_state_0_tmp = 0; - if (S0 == 1) aorai_intermediate_state_tmp = 1; + bhv_aux = main_bhv_bhv(c); + if (S0 == 1) + if (bhv_aux) aorai_intermediate_state_tmp = 1; + else aorai_intermediate_state_tmp = 0; else aorai_intermediate_state_tmp = 0; Sf_tmp = 0; S0_tmp = 0; diff --git a/src/plugins/aorai/tests/aorai/oracle/incorrect.res.oracle b/src/plugins/aorai/tests/ya/oracle/incorrect.res.oracle similarity index 90% rename from src/plugins/aorai/tests/aorai/oracle/incorrect.res.oracle rename to src/plugins/aorai/tests/ya/oracle/incorrect.res.oracle index f0441fa89f01c774e4a8ac2e8e94708bf91e14b0..3913f00e2f485fad13453eb892e7fcc28f412f75 100644 --- a/src/plugins/aorai/tests/aorai/oracle/incorrect.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/incorrect.res.oracle @@ -1,7 +1,7 @@ -[kernel] Parsing tests/aorai/incorrect.i (no preprocessing) +[kernel] Parsing tests/ya/incorrect.i (no preprocessing) [aorai] Welcome to the Aorai plugin [aorai] Warning: Call to main does not follow automaton's specification. This path is assumed to be dead -[kernel] Parsing /tmp/aorai_incorrect_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_incorrect_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_States { aorai_reject_state = -2, @@ -23,7 +23,8 @@ int f(void); /*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ /*@ ghost int aorai_CurStates = s0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires \false; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; diff --git a/src/plugins/aorai/tests/aorai/oracle/loop_bts1050.res.oracle b/src/plugins/aorai/tests/ya/oracle/loop_bts1050.res.oracle similarity index 94% rename from src/plugins/aorai/tests/aorai/oracle/loop_bts1050.res.oracle rename to src/plugins/aorai/tests/ya/oracle/loop_bts1050.res.oracle index a6f3f8f7d8a6c963688ebbb9b7231ae346ab2944..04b434bbf6da11f31a874aaceca1c219eb90348e 100644 --- a/src/plugins/aorai/tests/aorai/oracle/loop_bts1050.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/loop_bts1050.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/loop_bts1050.i (no preprocessing) +[kernel] Parsing tests/ya/loop_bts1050.i (no preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_loop_bts1050_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_loop_bts1050_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_f = 2, @@ -22,7 +22,14 @@ enum aorai_OpStatusList { /*@ ghost int aorai_intermediate_state_3 = 0; */ /*@ ghost int aorai_counter = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + (1 ≡ aorai_intermediate_state ∨ 1 ≡ aorai_intermediate_state_0) ∧ + 0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state_1 ∧ + 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; + requires 1 ≡ aorai_intermediate_state_0 ⇒ aorai_counter < 5; + requires + 0 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state_0; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_f; assigns aorai_counter, aorai_CurOpStatus, aorai_CurOperation, S0, Sf, aorai_intermediate_state, aorai_intermediate_state_0, @@ -84,15 +91,15 @@ enum aorai_OpStatusList { aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; aorai_intermediate_state_3_tmp = 0; aorai_intermediate_state_2_tmp = 0; - if (aorai_intermediate_state_0 == 1) - if (aorai_counter < 5) aorai_counter ++; - if (aorai_intermediate_state == 1) aorai_counter = 1; if (aorai_intermediate_state == 1) aorai_intermediate_state_1_tmp = 1; else if (aorai_intermediate_state_0 == 1) if (aorai_counter < 5) aorai_intermediate_state_1_tmp = 1; else aorai_intermediate_state_1_tmp = 0; else aorai_intermediate_state_1_tmp = 0; + if (aorai_intermediate_state_0 == 1) + if (aorai_counter < 5) aorai_counter ++; + if (aorai_intermediate_state == 1) aorai_counter = 1; aorai_intermediate_state_0_tmp = 0; aorai_intermediate_state_tmp = 0; Sf_tmp = 0; @@ -220,7 +227,12 @@ void f(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ aorai_intermediate_state_2 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧ + 0 ≡ aorai_intermediate_state ∧ + 0 ≡ aorai_intermediate_state_0 ∧ + 0 ≡ aorai_intermediate_state_1 ∧ 0 ≡ aorai_intermediate_state_3; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_g; assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, aorai_intermediate_state, aorai_intermediate_state_0, @@ -388,7 +400,12 @@ void g(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧ + 0 ≡ aorai_intermediate_state_0 ∧ + 0 ≡ aorai_intermediate_state_1 ∧ + 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, aorai_intermediate_state, aorai_intermediate_state_0, diff --git a/src/plugins/aorai/tests/aorai/oracle/monostate.res.oracle b/src/plugins/aorai/tests/ya/oracle/monostate.res.oracle similarity index 94% rename from src/plugins/aorai/tests/aorai/oracle/monostate.res.oracle rename to src/plugins/aorai/tests/ya/oracle/monostate.res.oracle index 00d9af27024d4c9f1ab797e12c8459678891dfb0..5df73b9c95c31edffe2319c7c773b93acfa13b23 100644 --- a/src/plugins/aorai/tests/aorai/oracle/monostate.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/monostate.res.oracle @@ -1,9 +1,9 @@ -[kernel] Parsing tests/aorai/monostate.i (no preprocessing) +[kernel] Parsing tests/ya/monostate.i (no preprocessing) [aorai] Welcome to the Aorai plugin [aorai] Warning: Call to main does not follow automaton's specification. This path is assumed to be dead -[aorai] tests/aorai/monostate.i:8: Warning: +[aorai] tests/ya/monostate.i:8: Warning: Call to main not conforming to automaton (pre-cond). Assuming it is on a dead path -[kernel] Parsing /tmp/aorai_monostate_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_monostate_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_States { aorai_reject_state = -2, @@ -39,7 +39,8 @@ check lemma Init_deterministic_trans{L}: */ /*@ ghost int aorai_CurStates = Init; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires \false; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_f; assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; @@ -128,7 +129,8 @@ void f(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires \false; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; diff --git a/src/plugins/aorai/tests/aorai/oracle/not_prm.res.oracle b/src/plugins/aorai/tests/ya/oracle/not_prm.res.oracle similarity index 89% rename from src/plugins/aorai/tests/aorai/oracle/not_prm.res.oracle rename to src/plugins/aorai/tests/ya/oracle/not_prm.res.oracle index ba7d90bbeced0d8b23285c47292b045b98b3e073..fb6b465a2256fcbac162429a15459d215ef802d0 100644 --- a/src/plugins/aorai/tests/aorai/oracle/not_prm.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/not_prm.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/not_prm.i (no preprocessing) +[kernel] Parsing tests/ya/not_prm.i (no preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_not_prm_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_not_prm_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_f = 0 @@ -14,7 +14,9 @@ enum aorai_OpStatusList { /*@ ghost int S0 = 1; */ /*@ ghost int Sf = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ S0 ∧ 0 ≡ Sf; + requires 1 ≡ S0 ⇒ x ≥ 4; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_f; assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf; diff --git a/src/plugins/aorai/tests/aorai/oracle/other.res.oracle b/src/plugins/aorai/tests/ya/oracle/other.res.oracle similarity index 96% rename from src/plugins/aorai/tests/aorai/oracle/other.res.oracle rename to src/plugins/aorai/tests/ya/oracle/other.res.oracle index 480cdbac3e337e91a9a7e27ca0dee315fdfe892b..80809ada84f52d13998c0490ccf20da3bad3ce0f 100644 --- a/src/plugins/aorai/tests/aorai/oracle/other.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/other.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/other.c (with preprocessing) +[kernel] Parsing tests/ya/other.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_other_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_other_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_f = 2, @@ -18,7 +18,9 @@ int x = 0; /*@ ghost int last = 0; */ /*@ ghost int step1 = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1; + requires 1 ≡ last ⇒ x ≡ 3 ∨ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 4; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_f; assigns aorai_CurOpStatus, aorai_CurOperation, init, last, step1; @@ -264,7 +266,9 @@ void f(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1; + requires 1 ≡ last ⇒ x ≡ 3 ∨ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 4; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_g; assigns aorai_CurOpStatus, aorai_CurOperation, init, last, step1; @@ -510,7 +514,8 @@ void g(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ init ∧ 0 ≡ last ∧ 0 ≡ step1; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, init, last, step1; diff --git a/src/plugins/aorai/tests/aorai/oracle/seq.res.oracle b/src/plugins/aorai/tests/ya/oracle/seq.res.oracle similarity index 94% rename from src/plugins/aorai/tests/aorai/oracle/seq.res.oracle rename to src/plugins/aorai/tests/ya/oracle/seq.res.oracle index 6640fa2d480d2331da9cf76d2b78ae199029d41d..ef2675cd7f075668a39ea9d309c2c53fe921c317 100644 --- a/src/plugins/aorai/tests/aorai/oracle/seq.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/seq.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/seq.i (no preprocessing) +[kernel] Parsing tests/ya/seq.i (no preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_seq_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_seq_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_f = 2, @@ -22,7 +22,12 @@ enum aorai_OpStatusList { /*@ ghost int aorai_intermediate_state_3 = 0; */ /*@ ghost int aorai_counter = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ aorai_intermediate_state ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧ + 0 ≡ aorai_intermediate_state_0 ∧ + 0 ≡ aorai_intermediate_state_1 ∧ + 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_f; assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, aorai_intermediate_state, aorai_intermediate_state_0, @@ -191,7 +196,19 @@ void f(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + (1 ≡ aorai_intermediate_state ∨ 1 ≡ aorai_intermediate_state_0 ∨ + 1 ≡ aorai_intermediate_state_2) ∧ + 0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state_1 ∧ + 0 ≡ aorai_intermediate_state_3; + requires 1 ≡ aorai_intermediate_state_2 ⇒ aorai_counter < 2; + requires + 0 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state_2; + requires + 0 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state_0; + requires + 0 ≡ aorai_intermediate_state_0 ∨ 0 ≡ aorai_intermediate_state_2; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_g; assigns aorai_counter, aorai_CurOpStatus, aorai_CurOperation, S0, Sf, aorai_intermediate_state, aorai_intermediate_state_0, @@ -256,10 +273,6 @@ void f(void) aorai_intermediate_state_1_tmp = aorai_intermediate_state_1; aorai_intermediate_state_2_tmp = aorai_intermediate_state_2; aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; - if (aorai_intermediate_state_2 == 1) - if (aorai_counter < 2) aorai_counter ++; - if (aorai_intermediate_state_0 == 1) aorai_counter = 1; - if (aorai_intermediate_state == 1) aorai_counter = 1; if (aorai_intermediate_state == 1) aorai_intermediate_state_3_tmp = 1; else if (aorai_intermediate_state_0 == 1) aorai_intermediate_state_3_tmp = 1; @@ -268,6 +281,10 @@ void f(void) if (aorai_counter < 2) aorai_intermediate_state_3_tmp = 1; else aorai_intermediate_state_3_tmp = 0; else aorai_intermediate_state_3_tmp = 0; + if (aorai_intermediate_state_2 == 1) + if (aorai_counter < 2) aorai_counter ++; + if (aorai_intermediate_state_0 == 1) aorai_counter = 1; + if (aorai_intermediate_state == 1) aorai_counter = 1; aorai_intermediate_state_2_tmp = 0; aorai_intermediate_state_1_tmp = 0; aorai_intermediate_state_0_tmp = 0; @@ -407,7 +424,12 @@ void g(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧ + 0 ≡ aorai_intermediate_state_0 ∧ + 0 ≡ aorai_intermediate_state_1 ∧ + 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, aorai_intermediate_state, aorai_intermediate_state_0, diff --git a/src/plugins/aorai/tests/aorai/oracle/seq_loop.res.oracle b/src/plugins/aorai/tests/ya/oracle/seq_loop.res.oracle similarity index 95% rename from src/plugins/aorai/tests/aorai/oracle/seq_loop.res.oracle rename to src/plugins/aorai/tests/ya/oracle/seq_loop.res.oracle index b71bd8809d29cfc3d80253833fb03a144991aa1f..3e600a02555ac40005422af1968c929809712c56 100644 --- a/src/plugins/aorai/tests/aorai/oracle/seq_loop.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/seq_loop.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/seq_loop.i (no preprocessing) +[kernel] Parsing tests/ya/seq_loop.i (no preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_seq_loop_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_seq_loop_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_f = 2, @@ -22,7 +22,14 @@ enum aorai_OpStatusList { /*@ ghost int aorai_intermediate_state_3 = 0; */ /*@ ghost int aorai_counter = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + (1 ≡ aorai_intermediate_state ∨ 1 ≡ aorai_intermediate_state_0) ∧ + 0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state_1 ∧ + 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; + requires 1 ≡ aorai_intermediate_state_0 ⇒ aorai_counter < 5; + requires + 0 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state_0; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_f; assigns aorai_counter, aorai_CurOpStatus, aorai_CurOperation, S0, Sf, aorai_intermediate_state, aorai_intermediate_state_0, @@ -84,15 +91,15 @@ enum aorai_OpStatusList { aorai_intermediate_state_3_tmp = aorai_intermediate_state_3; aorai_intermediate_state_3_tmp = 0; aorai_intermediate_state_2_tmp = 0; - if (aorai_intermediate_state_0 == 1) - if (aorai_counter < 5) aorai_counter ++; - if (aorai_intermediate_state == 1) aorai_counter = 1; if (aorai_intermediate_state == 1) aorai_intermediate_state_1_tmp = 1; else if (aorai_intermediate_state_0 == 1) if (aorai_counter < 5) aorai_intermediate_state_1_tmp = 1; else aorai_intermediate_state_1_tmp = 0; else aorai_intermediate_state_1_tmp = 0; + if (aorai_intermediate_state_0 == 1) + if (aorai_counter < 5) aorai_counter ++; + if (aorai_intermediate_state == 1) aorai_counter = 1; aorai_intermediate_state_0_tmp = 0; aorai_intermediate_state_tmp = 0; Sf_tmp = 0; @@ -220,7 +227,12 @@ void f(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ aorai_intermediate_state_2 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧ + 0 ≡ aorai_intermediate_state ∧ + 0 ≡ aorai_intermediate_state_0 ∧ + 0 ≡ aorai_intermediate_state_1 ∧ 0 ≡ aorai_intermediate_state_3; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_g; assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, aorai_intermediate_state, aorai_intermediate_state_0, @@ -388,7 +400,12 @@ void g(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧ + 0 ≡ aorai_intermediate_state_0 ∧ + 0 ≡ aorai_intermediate_state_1 ∧ + 0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, aorai_intermediate_state, aorai_intermediate_state_0, diff --git a/src/plugins/aorai/tests/aorai/oracle/single_call.res.oracle b/src/plugins/aorai/tests/ya/oracle/single_call.res.oracle similarity index 92% rename from src/plugins/aorai/tests/aorai/oracle/single_call.res.oracle rename to src/plugins/aorai/tests/ya/oracle/single_call.res.oracle index cfb4234eb0cc7b8041bf606a33047a0e78c41e62..ee4213fd46c5d23bbeacb123d8f1409c65f5ef1a 100644 --- a/src/plugins/aorai/tests/aorai/oracle/single_call.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/single_call.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/single_call.i (no preprocessing) +[kernel] Parsing tests/ya/single_call.i (no preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_single_call_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_single_call_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_main = 0 @@ -15,7 +15,8 @@ enum aorai_OpStatusList { /*@ ghost int Sf = 0; */ /*@ ghost int aorai_intermediate_state = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf, aorai_intermediate_state; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_acces_params.res.oracle b/src/plugins/aorai/tests/ya/oracle/test_acces_params.res.oracle similarity index 94% rename from src/plugins/aorai/tests/aorai/oracle/test_acces_params.res.oracle rename to src/plugins/aorai/tests/ya/oracle/test_acces_params.res.oracle index 3e646c93b8ae727e15a415e503375931b43eb550..2f0841a21006211b9a4f313bf10bf689d197d285 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_acces_params.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/test_acces_params.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/test_acces_params.c (with preprocessing) +[kernel] Parsing tests/ya/test_acces_params.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_acces_params_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_acces_params_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_main = 2, @@ -24,7 +24,11 @@ int rr = 1; /*@ ghost int SF = 0; */ /*@ ghost int mainst = 1; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ S4 ∧ 0 ≡ SF ∧ + 0 ≡ mainst; + requires 1 ≡ S1 ⇒ i ≥ 0; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_opa; assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, SF, mainst; @@ -175,7 +179,10 @@ void opa(int i, int j) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ S3 ∧ 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S4 ∧ 0 ≡ SF ∧ + 0 ≡ mainst; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_opb; assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, SF, mainst; @@ -325,7 +332,10 @@ int opb(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ mainst ∧ 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ S4 ∧ + 0 ≡ SF; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, SF, mainst; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_acces_params2.res.oracle b/src/plugins/aorai/tests/ya/oracle/test_acces_params2.res.oracle similarity index 94% rename from src/plugins/aorai/tests/aorai/oracle/test_acces_params2.res.oracle rename to src/plugins/aorai/tests/ya/oracle/test_acces_params2.res.oracle index a45dd2a4943de29c09a912eaecf6499f6a60da54..14191d7f00b8e8d5cd13f1a5f7842b00c44a3c4b 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_acces_params2.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/test_acces_params2.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/test_acces_params2.c (with preprocessing) +[kernel] Parsing tests/ya/test_acces_params2.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_acces_params2_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_acces_params2_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_main = 3, @@ -25,7 +25,11 @@ int rr = 1; /*@ ghost int S6 = 0; */ /*@ ghost int S7 = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ S2 ∧ 0 ≡ S1 ∧ 0 ≡ S3 ∧ 0 ≡ S4 ∧ 0 ≡ S5 ∧ + 0 ≡ S6 ∧ 0 ≡ S7; + requires 1 ≡ S2 ⇒ r ≥ 0; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_opa; assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, S5, S6, S7; @@ -196,7 +200,10 @@ int opa(int r) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ S4 ∧ 0 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ S5 ∧ + 0 ≡ S6 ∧ 0 ≡ S7; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_opb; assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, S5, S6, S7; @@ -359,7 +366,8 @@ void opb(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires \false; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_opc; assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, S5, S6, S7; @@ -522,7 +530,10 @@ void opc(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ S3 ∧ 0 ≡ S4 ∧ 0 ≡ S5 ∧ + 0 ≡ S6 ∧ 0 ≡ S7; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, S3, S4, S5, S6, S7; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_boucle_rechercheTableau.res.oracle b/src/plugins/aorai/tests/ya/oracle/test_boucle_rechercheTableau.res.oracle similarity index 93% rename from src/plugins/aorai/tests/aorai/oracle/test_boucle_rechercheTableau.res.oracle rename to src/plugins/aorai/tests/ya/oracle/test_boucle_rechercheTableau.res.oracle index 4b0631f98f1d319c24ddf6be7b3fbfd24241c367..862eecf00b3d95eabb6ff90430a634d16d8f3a2d 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_boucle_rechercheTableau.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/test_boucle_rechercheTableau.res.oracle @@ -1,10 +1,10 @@ -[kernel] Parsing tests/aorai/test_boucle_rechercheTableau.c (with preprocessing) -[kernel] tests/aorai/test_boucle_rechercheTableau.c:17: Warning: +[kernel] Parsing tests/ya/test_boucle_rechercheTableau.c (with preprocessing) +[kernel] tests/ya/test_boucle_rechercheTableau.c:17: Warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -[kernel] tests/aorai/test_boucle_rechercheTableau.c:7: Warning: +[kernel] tests/ya/test_boucle_rechercheTableau.c:7: Warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_boucle_rechercheTableau_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_boucle_rechercheTableau_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_foo = 2, @@ -21,7 +21,8 @@ enum aorai_OpStatusList { /*@ ghost int Idle = 1; */ /*@ ghost int WillDoFoo = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ Idle ∧ 0 ≡ End ∧ 0 ≡ WillDoFoo; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_isPresent; assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; @@ -168,7 +169,8 @@ int isPresent(int *t, int max, int val) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ WillDoFoo ∧ 0 ≡ End ∧ 0 ≡ Idle; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_foo; assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; @@ -262,7 +264,8 @@ void foo(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ Idle ∧ 0 ≡ End ∧ 0 ≡ WillDoFoo; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_factorial2.res.oracle b/src/plugins/aorai/tests/ya/oracle/test_factorial.res.oracle similarity index 95% rename from src/plugins/aorai/tests/aorai/oracle/test_factorial2.res.oracle rename to src/plugins/aorai/tests/ya/oracle/test_factorial.res.oracle index 13d491bf7faf1f26825db7ca0ca991ba715d9315..d3c59bb4befd891ca4a21f07b24c760adc8df894 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_factorial2.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/test_factorial.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/test_factorial2.c (with preprocessing) +[kernel] Parsing tests/ya/test_factorial.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_factorial2_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_factorial_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_decode_int = 2, @@ -17,7 +17,8 @@ enum aorai_OpStatusList { /*@ ghost int S2 = 0; */ /*@ ghost int main_0 = 1; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ S1 ∧ 0 ≡ S2 ∧ 0 ≡ main_0; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_decode_int; assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, main_0; @@ -184,7 +185,9 @@ int decode_int(char *s) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires (1 ≡ S1 ∨ 1 ≡ S2) ∧ 0 ≡ main_0; + requires 1 ≡ S1 ⇒ 1 ≢ 0; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_factorial; assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, main_0; @@ -304,7 +307,8 @@ int factorial(int value) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ main_0 ∧ 0 ≡ S1 ∧ 0 ≡ S2; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, S1, S2, main_0; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_recursion4.res.oracle b/src/plugins/aorai/tests/ya/oracle/test_recursion4.res.oracle similarity index 95% rename from src/plugins/aorai/tests/aorai/oracle/test_recursion4.res.oracle rename to src/plugins/aorai/tests/ya/oracle/test_recursion4.res.oracle index 09a6e371c266a733e453905cbb7c6d3a06323cbe..6652049d8dd0807628419b6c351661b2da4ea857 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_recursion4.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/test_recursion4.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/test_recursion4.c (with preprocessing) +[kernel] Parsing tests/ya/test_recursion4.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_recursion4_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_recursion4_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_foo = 2, @@ -18,7 +18,8 @@ enum aorai_OpStatusList { /*@ ghost int Idle = 1; */ /*@ ghost int WillDoFoo = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ Idle ∧ 0 ≡ End ∧ 0 ≡ WillDoFoo; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_isPresent; assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; @@ -174,7 +175,8 @@ int isPresent(int *t, int size, int val) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ WillDoFoo ∧ 0 ≡ End ∧ 0 ≡ Idle; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_foo; assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; @@ -268,7 +270,8 @@ void foo(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ Idle ∧ 0 ≡ End ∧ 0 ≡ WillDoFoo; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, WillDoFoo; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_recursion5.res.oracle b/src/plugins/aorai/tests/ya/oracle/test_recursion5.res.oracle similarity index 94% rename from src/plugins/aorai/tests/aorai/oracle/test_recursion5.res.oracle rename to src/plugins/aorai/tests/ya/oracle/test_recursion5.res.oracle index b5c3e5aa9304fc5c42d1db1f402c63097c595463..059961889707d7edefa1fd55d1593761b0b071c2 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_recursion5.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/test_recursion5.res.oracle @@ -1,10 +1,10 @@ -[kernel] Parsing tests/aorai/test_recursion5.c (with preprocessing) -[kernel] tests/aorai/test_recursion5.c:12: Warning: +[kernel] Parsing tests/ya/test_recursion5.c (with preprocessing) +[kernel] tests/ya/test_recursion5.c:12: Warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -[kernel] tests/aorai/test_recursion5.c:28: Warning: +[kernel] tests/ya/test_recursion5.c:28: Warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_recursion5_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_recursion5_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { op_foo = 3, @@ -23,7 +23,9 @@ enum aorai_OpStatusList { /*@ ghost int IgnoreFoo = 0; */ /*@ ghost int WillDoFoo = 0; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ Idle ∧ 0 ≡ End ∧ 0 ≡ IgnoreFoo ∧ 0 ≡ WillDoFoo; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_isPresentRec; assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, IgnoreFoo, WillDoFoo; @@ -197,7 +199,9 @@ int isPresentRec(int *t, int i, int max, int val) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ Idle ∧ 0 ≡ End ∧ 0 ≡ IgnoreFoo ∧ 0 ≡ WillDoFoo; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_isPresent; assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, IgnoreFoo, WillDoFoo; @@ -335,7 +339,9 @@ int isPresent(int *t, int max, int val) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ WillDoFoo ∧ 0 ≡ End ∧ 0 ≡ Idle ∧ 0 ≡ IgnoreFoo; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_foo; assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, IgnoreFoo, WillDoFoo; @@ -447,7 +453,9 @@ void foo(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires + 1 ≡ Idle ∧ 0 ≡ End ∧ 0 ≡ IgnoreFoo ∧ 0 ≡ WillDoFoo; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, End, Idle, IgnoreFoo, WillDoFoo; diff --git a/src/plugins/aorai/tests/aorai/oracle/test_struct.res.oracle b/src/plugins/aorai/tests/ya/oracle/test_struct.res.oracle similarity index 92% rename from src/plugins/aorai/tests/aorai/oracle/test_struct.res.oracle rename to src/plugins/aorai/tests/ya/oracle/test_struct.res.oracle index 485f555e125d20c2ae094c7edfeb9fb49284ef75..0916e902014b3cb6b3c85b722d2a0b894c791b12 100644 --- a/src/plugins/aorai/tests/aorai/oracle/test_struct.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/test_struct.res.oracle @@ -1,6 +1,6 @@ -[kernel] Parsing tests/aorai/test_struct.c (with preprocessing) +[kernel] Parsing tests/ya/test_struct.c (with preprocessing) [aorai] Welcome to the Aorai plugin -[kernel] Parsing /tmp/aorai_test_struct_0.i (no preprocessing) +[kernel] Parsing TMPDIR/aorai_test_struct_0.i (no preprocessing) /* Generated by Frama-C */ struct People { int Age ; @@ -21,7 +21,9 @@ int myAge = 0; /*@ ghost int S1 = 0; */ /*@ ghost int main_0 = 1; */ /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ S1 ∧ 0 ≡ main_0; + requires 1 ≡ S1 ⇒ nobody.Age ≡ 1; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_increment; assigns aorai_CurOpStatus, aorai_CurOperation, S1, main_0; @@ -110,7 +112,9 @@ void increment(void) } /*@ ghost - /@ ensures aorai_CurOpStatus ≡ aorai_Called; + /@ requires 1 ≡ main_0 ∧ 0 ≡ S1; + requires 1 ≡ main_0 ⇒ nobody.Age ≡ 0; + ensures aorai_CurOpStatus ≡ aorai_Called; ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, S1, main_0; diff --git a/src/plugins/aorai/tests/ya/oracle_prove/assigns.0.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/assigns.0.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..6e42468e3ad6fb56d5cfecda01abf90d858bcfe2 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/assigns.0.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ya/assigns.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_assigns_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/assigns.1.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/assigns.1.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..bfa57eb1f306974f472def9cf44e9cb20c224eb2 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/assigns.1.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ya/assigns.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_assigns_1.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/aorai/oracle_prove/assigns.2.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/assigns.2.res.oracle similarity index 84% rename from src/plugins/aorai/tests/aorai/oracle_prove/assigns.2.res.oracle rename to src/plugins/aorai/tests/ya/oracle_prove/assigns.2.res.oracle index a03928c6cad0adaaa70de524ae1c846eca1db1bd..f5a60a3aac12f9e6f74b645b97c97125445d9996 100644 --- a/src/plugins/aorai/tests/aorai/oracle_prove/assigns.2.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/assigns.2.res.oracle @@ -1,4 +1,4 @@ -[kernel] Parsing tests/aorai/assigns.c (with preprocessing) +[kernel] Parsing tests/ya/assigns.c (with preprocessing) [aorai] Welcome to the Aorai plugin /* Generated by Frama-C */ int X; diff --git a/src/plugins/aorai/tests/ya/oracle_prove/bts1289.0.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/bts1289.0.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..8a21ce6dc7cc4ae686a93943b42b1a52a4ecf689 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/bts1289.0.res.oracle @@ -0,0 +1,5 @@ +[kernel] Parsing tests/ya/bts1289.i (no preprocessing) +[aorai] Welcome to the Aorai plugin +[aorai] Warning: Call to main does not follow automaton's specification. This path is assumed to be dead +[kernel] Parsing TMPDIR/aorai_bts1289_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/bts1289.1.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/bts1289.1.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..7455ed9f29ad0d766b44878cabe2cf61ab7e0a98 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/bts1289.1.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ya/bts1289.i (no preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_bts1289_1.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/declared_function.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/declared_function.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..e961cfa00b2c702983e5a54ba2f3c9f44d55d313 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/declared_function.res.oracle @@ -0,0 +1,6 @@ +[kernel] Parsing tests/ya/declared_function.i (no preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_declared_function_0.i (no preprocessing) +[kernel:annot:missing-spec] TMPDIR/aorai_declared_function_0.i:48: Warning: + Neither code nor specification for function f, generating default assigns from the prototype +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/deterministic.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/deterministic.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..da8094d3368a5686310a2aff3d01b936866ceb30 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/deterministic.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ya/deterministic.i (no preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_deterministic_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/formals.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/formals.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..203e6f02f62136e70e652d204f160ecb34450cde --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/formals.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ya/formals.i (no preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_formals_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/generate_assigns_bts1290.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/generate_assigns_bts1290.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..8c689f78567e5268a9ff9b5e916b7ee948bb47ab --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/generate_assigns_bts1290.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ya/generate_assigns_bts1290.i (no preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_generate_assigns_bts1290_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/hoare_seq.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/hoare_seq.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..25f11ffa4fd49a20ff9441ac586602ccffb8bfa8 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/hoare_seq.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ya/hoare_seq.i (no preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_hoare_seq_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/incorrect.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/incorrect.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..950cae9f7c78b63bcd69aa8acf18cd4a83ecf3d2 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/incorrect.res.oracle @@ -0,0 +1,7 @@ +[kernel] Parsing tests/ya/incorrect.i (no preprocessing) +[aorai] Welcome to the Aorai plugin +[aorai] Warning: Call to main does not follow automaton's specification. This path is assumed to be dead +[kernel] Parsing TMPDIR/aorai_incorrect_0.i (no preprocessing) +[wp] Warning: Missing RTE guards +[kernel:annot:missing-spec] TMPDIR/aorai_incorrect_0.i:61: Warning: + Neither code nor specification for function f, generating default assigns from the prototype diff --git a/src/plugins/aorai/tests/ya/oracle_prove/loop_bts1050.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/loop_bts1050.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..8830b5bd606bd9d84295fe6287d86194126227e3 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/loop_bts1050.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ya/loop_bts1050.i (no preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_loop_bts1050_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/monostate.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/monostate.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..b67969ffa619277d83073558f3089340c56cc8a1 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/monostate.res.oracle @@ -0,0 +1 @@ +[kernel] Parsing tests/ya/monostate.i (no preprocessing) diff --git a/src/plugins/aorai/tests/ya/oracle_prove/not_prm.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/not_prm.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..fd02e38e18a3bbf64d83f462bb12b7d3f1b5bc04 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/not_prm.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ya/not_prm.i (no preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_not_prm_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/other.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/other.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..470d9d475b7189d3ad2178ee95013cc97bdc81f5 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/other.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ya/other.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_other_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/seq.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/seq.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..750146c1ae60528b0c2e8ad46caf226758da9106 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/seq.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ya/seq.i (no preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_seq_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/seq_loop.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/seq_loop.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..37849cdec351ef0d0ac0a23bd999d16c95507974 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/seq_loop.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ya/seq_loop.i (no preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_seq_loop_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/single_call.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/single_call.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..dbd60dc8fb54dbf01fb849c02ef8a49365e03b57 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/single_call.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ya/single_call.i (no preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_single_call_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/test_acces_params.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/test_acces_params.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..a20fbf3e28dfbe78c2e6e38549ae116e82d50117 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/test_acces_params.res.oracle @@ -0,0 +1,6 @@ +[kernel] Parsing tests/ya/test_acces_params.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_acces_params_0.i (no preprocessing) +[wp] TMPDIR/aorai_test_acces_params_0.i:4: Warning: + Global invariant not handled yet ('inv' ignored) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/test_acces_params2.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/test_acces_params2.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..c45f6f03706d1f2f3f8b0c0ea9771e9bca8aa970 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/test_acces_params2.res.oracle @@ -0,0 +1,6 @@ +[kernel] Parsing tests/ya/test_acces_params2.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_acces_params2_0.i (no preprocessing) +[wp] TMPDIR/aorai_test_acces_params2_0.i:3: Warning: + Global invariant not handled yet ('inv' ignored) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/test_boucle_rechercheTableau.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/test_boucle_rechercheTableau.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..d303821150962269a00d47dd2e504fcea9944db9 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/test_boucle_rechercheTableau.res.oracle @@ -0,0 +1,8 @@ +[kernel] Parsing tests/ya/test_boucle_rechercheTableau.c (with preprocessing) +[kernel] tests/ya/test_boucle_rechercheTableau.c:17: Warning: + parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. +[kernel] tests/ya/test_boucle_rechercheTableau.c:7: Warning: + parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_boucle_rechercheTableau_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/test_factorial.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/test_factorial.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..533a909e627c6e37bef7e29d3cf59dfd1a159e28 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/test_factorial.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ya/test_factorial.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_factorial_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/test_recursion4.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/test_recursion4.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..5ca3ac392fdd4b832d8ddadfb0116c1e1e74530b --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/test_recursion4.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ya/test_recursion4.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_recursion4_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/test_recursion5.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/test_recursion5.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..6d11db5117d25a5e722e0f3d7601bd33b5908fe3 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/test_recursion5.res.oracle @@ -0,0 +1,8 @@ +[kernel] Parsing tests/ya/test_recursion5.c (with preprocessing) +[kernel] tests/ya/test_recursion5.c:12: Warning: + parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. +[kernel] tests/ya/test_recursion5.c:28: Warning: + parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_recursion5_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/test_struct.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/test_struct.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..fe4190800bde83f284a0788579d355d2a84ed468 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/test_struct.res.oracle @@ -0,0 +1,4 @@ +[kernel] Parsing tests/ya/test_struct.c (with preprocessing) +[aorai] Welcome to the Aorai plugin +[kernel] Parsing TMPDIR/aorai_test_struct_0.i (no preprocessing) +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/other.c b/src/plugins/aorai/tests/ya/other.c new file mode 100644 index 0000000000000000000000000000000000000000..4e13872dbf2b5ae2c6f44bb887577bfa91d3402e --- /dev/null +++ b/src/plugins/aorai/tests/ya/other.c @@ -0,0 +1,17 @@ +/* run.config* + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ +*/ + +int x=0; + +void f (void) { x=3; } + +void g (void) { x=4; } + +int main () { + f(); + g(); + f(); + g(); + return x; +} diff --git a/src/plugins/aorai/tests/aorai/other.ya b/src/plugins/aorai/tests/ya/other.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/other.ya rename to src/plugins/aorai/tests/ya/other.ya diff --git a/src/plugins/aorai/tests/ya/seq.i b/src/plugins/aorai/tests/ya/seq.i new file mode 100644 index 0000000000000000000000000000000000000000..f573a5491b319de72d6072634e78f3ebc33d5381 --- /dev/null +++ b/src/plugins/aorai/tests/ya/seq.i @@ -0,0 +1,14 @@ +/* run.config* + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-acceptance -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + */ + +void f() { } + +void g() { } + +int main(int c) { + if (c) f(); + g(); + if (c) g(); + return 0; +} diff --git a/src/plugins/aorai/tests/aorai/seq.ya b/src/plugins/aorai/tests/ya/seq.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/seq.ya rename to src/plugins/aorai/tests/ya/seq.ya diff --git a/src/plugins/aorai/tests/aorai/seq_loop.i b/src/plugins/aorai/tests/ya/seq_loop.i similarity index 58% rename from src/plugins/aorai/tests/aorai/seq_loop.i rename to src/plugins/aorai/tests/ya/seq_loop.i index 113c40febc1e0bdfb1f84cf570c04efff1090da7..07cc7cf2a9b9593684429bbd6d0a1950f97818c1 100644 --- a/src/plugins/aorai/tests/aorai/seq_loop.i +++ b/src/plugins/aorai/tests/ya/seq_loop.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata tests/aorai/seq_loop.ya -aorai-test 1 -load-module tests/aorai/Aorai_test.cmxs -aorai-acceptance -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-acceptance -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ void f() {} diff --git a/src/plugins/aorai/tests/aorai/seq_loop.ya b/src/plugins/aorai/tests/ya/seq_loop.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/seq_loop.ya rename to src/plugins/aorai/tests/ya/seq_loop.ya diff --git a/src/plugins/aorai/tests/ya/single_call.i b/src/plugins/aorai/tests/ya/single_call.i new file mode 100644 index 0000000000000000000000000000000000000000..257ce2b2c7a4493ee42953dcff3b29bed8d29643 --- /dev/null +++ b/src/plugins/aorai/tests/ya/single_call.i @@ -0,0 +1,5 @@ +/* run.config* + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-acceptance -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ +*/ + +int main () {} diff --git a/src/plugins/aorai/tests/aorai/single_call.ya b/src/plugins/aorai/tests/ya/single_call.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/single_call.ya rename to src/plugins/aorai/tests/ya/single_call.ya diff --git a/src/plugins/aorai/tests/aorai/test_acces_params.c b/src/plugins/aorai/tests/ya/test_acces_params.c similarity index 65% rename from src/plugins/aorai/tests/aorai/test_acces_params.c rename to src/plugins/aorai/tests/ya/test_acces_params.c index 4464408edf7d0295c24c802248b7c3d5b3824f1b..884140ce9cab8b66952394937c1595f7a31dd37a 100644 --- a/src/plugins/aorai/tests/aorai/test_acces_params.c +++ b/src/plugins/aorai/tests/ya/test_acces_params.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata tests/aorai/test_acces_params.ya -aorai-test 1 -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int status=0; diff --git a/src/plugins/aorai/tests/aorai/test_acces_params.ya b/src/plugins/aorai/tests/ya/test_acces_params.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/test_acces_params.ya rename to src/plugins/aorai/tests/ya/test_acces_params.ya diff --git a/src/plugins/aorai/tests/aorai/test_acces_params2.c b/src/plugins/aorai/tests/ya/test_acces_params2.c similarity index 74% rename from src/plugins/aorai/tests/aorai/test_acces_params2.c rename to src/plugins/aorai/tests/ya/test_acces_params2.c index 11264e266de3901a8db3668727ded49333c1c661..86092179e3f19e4041f7d3f3b5b2623d073edf51 100644 --- a/src/plugins/aorai/tests/aorai/test_acces_params2.c +++ b/src/plugins/aorai/tests/ya/test_acces_params2.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata tests/aorai/test_acces_params2.ya -aorai-test 1 -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ diff --git a/src/plugins/aorai/tests/aorai/test_acces_params2.ya b/src/plugins/aorai/tests/ya/test_acces_params2.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/test_acces_params2.ya rename to src/plugins/aorai/tests/ya/test_acces_params2.ya diff --git a/src/plugins/aorai/tests/aorai/test_boucle_rechercheTableau.c b/src/plugins/aorai/tests/ya/test_boucle_rechercheTableau.c similarity index 79% rename from src/plugins/aorai/tests/aorai/test_boucle_rechercheTableau.c rename to src/plugins/aorai/tests/ya/test_boucle_rechercheTableau.c index d7d07eb92b0a822946aecff6764876be3e897f3a..7dcf436cfe3bc7a95f03bb57faf63c8cca87b1b9 100644 --- a/src/plugins/aorai/tests/aorai/test_boucle_rechercheTableau.c +++ b/src/plugins/aorai/tests/ya/test_boucle_rechercheTableau.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata tests/aorai/test_boucle_rechercheTableau.ya -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ diff --git a/src/plugins/aorai/tests/aorai/test_boucle_rechercheTableau.ya b/src/plugins/aorai/tests/ya/test_boucle_rechercheTableau.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/test_boucle_rechercheTableau.ya rename to src/plugins/aorai/tests/ya/test_boucle_rechercheTableau.ya diff --git a/src/plugins/aorai/tests/aorai/test_factorial2.c b/src/plugins/aorai/tests/ya/test_factorial.c similarity index 89% rename from src/plugins/aorai/tests/aorai/test_factorial2.c rename to src/plugins/aorai/tests/ya/test_factorial.c index 1a1b494eb9d94d71c414eda98fa2d161fc9772a4..9cb2213b68d6e23abeaed004b89d16e8b7a8d67e 100644 --- a/src/plugins/aorai/tests/aorai/test_factorial2.c +++ b/src/plugins/aorai/tests/ya/test_factorial.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata tests/aorai/test_factorial.ya -aorai-test 1 -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ diff --git a/src/plugins/aorai/tests/aorai/test_factorial.ya b/src/plugins/aorai/tests/ya/test_factorial.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/test_factorial.ya rename to src/plugins/aorai/tests/ya/test_factorial.ya diff --git a/src/plugins/aorai/tests/aorai/test_recursion4.c b/src/plugins/aorai/tests/ya/test_recursion4.c similarity index 78% rename from src/plugins/aorai/tests/aorai/test_recursion4.c rename to src/plugins/aorai/tests/ya/test_recursion4.c index 85baa11a37a788de58fd00e34bdd5d7592eb92c9..cf4c5d8523a6c123692f77b03bb2a129b9e3c20c 100644 --- a/src/plugins/aorai/tests/aorai/test_recursion4.c +++ b/src/plugins/aorai/tests/ya/test_recursion4.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata tests/aorai/test_recursion4.ya -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ # pragma JessieIntegerModel(math) diff --git a/src/plugins/aorai/tests/aorai/test_recursion4.ya b/src/plugins/aorai/tests/ya/test_recursion4.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/test_recursion4.ya rename to src/plugins/aorai/tests/ya/test_recursion4.ya diff --git a/src/plugins/aorai/tests/aorai/test_recursion5.c b/src/plugins/aorai/tests/ya/test_recursion5.c similarity index 86% rename from src/plugins/aorai/tests/aorai/test_recursion5.c rename to src/plugins/aorai/tests/ya/test_recursion5.c index 2985332729f939fb0f54e2d92e9f44d0f4e45c4d..241030e711241484c0f829e0a16101618649f832 100644 --- a/src/plugins/aorai/tests/aorai/test_recursion5.c +++ b/src/plugins/aorai/tests/ya/test_recursion5.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata tests/aorai/test_recursion5.ya -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ diff --git a/src/plugins/aorai/tests/aorai/test_recursion5.ya b/src/plugins/aorai/tests/ya/test_recursion5.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/test_recursion5.ya rename to src/plugins/aorai/tests/ya/test_recursion5.ya diff --git a/src/plugins/aorai/tests/aorai/test_struct.c b/src/plugins/aorai/tests/ya/test_struct.c similarity index 55% rename from src/plugins/aorai/tests/aorai/test_struct.c rename to src/plugins/aorai/tests/ya/test_struct.c index deb58d911f1394b2ecd45119af2499037e3e7439..1b8ff3ec2ff039f6a94506b149db7d128961e656 100644 --- a/src/plugins/aorai/tests/aorai/test_struct.c +++ b/src/plugins/aorai/tests/ya/test_struct.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata tests/aorai/test_struct.ya -aorai-test 1 -aorai-acceptance -load-module tests/aorai/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ struct People{ diff --git a/src/plugins/aorai/tests/aorai/test_struct.ya b/src/plugins/aorai/tests/ya/test_struct.ya similarity index 100% rename from src/plugins/aorai/tests/aorai/test_struct.ya rename to src/plugins/aorai/tests/ya/test_struct.ya diff --git a/src/plugins/value/domains/traces_domain.ml b/src/plugins/value/domains/traces_domain.ml index 1ac089b9834bef79962cfe1bf1613ab331c64c08..cc652e75bf545674a9eafecbe5c24c255c7643b6 100644 --- a/src/plugins/value/domains/traces_domain.ml +++ b/src/plugins/value/domains/traces_domain.ml @@ -1093,6 +1093,7 @@ let rec stmts_of_cfg cfg current var_map locals return_exp acc = (** all our variables are assigned, not defined *) let var_map = List.fold_left fresh_varinfo var_map vs in let vs = List.map (subst_in_varinfo var_map) vs in + List.iter (fun v -> v.vformal <- false) vs; locals := vs @ !locals; let block = { Cil_types.battrs = []; bscoping = true;