From c501007bb5b29296ce3b1b82e168dc826b1ceaad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 25 Jan 2019 12:00:59 +0100 Subject: [PATCH 001/376] [rte] linting plug-in --- .Makefile.lint | 5 -- src/plugins/rte/generator.ml | 126 ++++++++++++++-------------- src/plugins/rte/options.ml | 86 +++++++++---------- src/plugins/rte/register.ml | 20 ++--- src/plugins/rte/rte.ml | 36 ++++---- src/plugins/rte/visit.ml | 156 +++++++++++++++++------------------ 6 files changed, 212 insertions(+), 217 deletions(-) diff --git a/.Makefile.lint b/.Makefile.lint index f213229e557..da13c5b801a 100644 --- a/.Makefile.lint +++ b/.Makefile.lint @@ -366,11 +366,6 @@ ML_LINT_KO+=src/plugins/postdominators/compute.ml ML_LINT_KO+=src/plugins/postdominators/postdominators_parameters.ml ML_LINT_KO+=src/plugins/postdominators/print.ml ML_LINT_KO+=src/plugins/print_api/print_interface.ml -ML_LINT_KO+=src/plugins/rte/generator.ml -ML_LINT_KO+=src/plugins/rte/options.ml -ML_LINT_KO+=src/plugins/rte/register.ml -ML_LINT_KO+=src/plugins/rte/rte.ml -ML_LINT_KO+=src/plugins/rte/visit.ml ML_LINT_KO+=src/plugins/scope/Scope.mli ML_LINT_KO+=src/plugins/scope/datascope.ml ML_LINT_KO+=src/plugins/scope/defs.ml diff --git a/src/plugins/rte/generator.ml b/src/plugins/rte/generator.ml index b6c626b68c4..e72328ab527 100644 --- a/src/plugins/rte/generator.ml +++ b/src/plugins/rte/generator.ml @@ -32,26 +32,26 @@ let states : State.t list ref = ref [] let accessors : Db.RteGen.status_accessor list ref = ref [] module Make - (M:sig - val name:string - val parameter: Typed_parameter.t - val additional_parameters: Typed_parameter.t list - end) - = + (M:sig + val name:string + val parameter: Typed_parameter.t + val additional_parameters: Typed_parameter.t list + end) += struct - module H = + module H = Kernel_function.Make_Table (Datatype.Bool) (struct - let name = "RTE.Computed." ^ M.name - let size = 17 - let dependencies = + let name = "RTE.Computed." ^ M.name + let size = 17 + let dependencies = let extract p = State.get p.Typed_parameter.name in - Ast.self - :: Options.Trivial.self - :: List.map extract (M.parameter :: M.additional_parameters) - end) + Ast.self + :: Options.Trivial.self + :: List.map extract (M.parameter :: M.additional_parameters) + end) let is_computed = (* Nothing to do for functions without body. *) @@ -70,42 +70,42 @@ end module Initialized = Make (struct - let name = "initialized" - let parameter = Options.DoInitialized.parameter - let additional_parameters = [ ] - end) + let name = "initialized" + let parameter = Options.DoInitialized.parameter + let additional_parameters = [ ] + end) module Mem_access = Make (struct - let name = "mem_access" - let parameter = Options.DoMemAccess.parameter - let additional_parameters = [ Kernel.SafeArrays.parameter ] - end) + let name = "mem_access" + let parameter = Options.DoMemAccess.parameter + let additional_parameters = [ Kernel.SafeArrays.parameter ] + end) module Pointer_call = Make (struct - let name = "pointer_call" - let parameter = Options.DoPointerCall.parameter - let additional_parameters = [] - end) + let name = "pointer_call" + let parameter = Options.DoPointerCall.parameter + let additional_parameters = [] + end) module Div_mod = Make (struct - let name = "division_by_zero" - let parameter = Options.DoDivMod.parameter - let additional_parameters = [] - end) + let name = "division_by_zero" + let parameter = Options.DoDivMod.parameter + let additional_parameters = [] + end) module Shift = Make (struct - let name = "shift_value_out_of_bounds" - let parameter = Options.DoShift.parameter - let additional_parameters = [] - end) + let name = "shift_value_out_of_bounds" + let parameter = Options.DoShift.parameter + let additional_parameters = [] + end) module Left_shift_negative = Make @@ -126,51 +126,51 @@ module Right_shift_negative = module Signed_overflow = Make (struct - let name = "signed_overflow" - let parameter = Kernel.SignedOverflow.parameter - let additional_parameters = [] - end) + let name = "signed_overflow" + let parameter = Kernel.SignedOverflow.parameter + let additional_parameters = [] + end) module Signed_downcast = Make (struct - let name = "downcast" - let parameter = Kernel.SignedDowncast.parameter - let additional_parameters = [] - end) + let name = "downcast" + let parameter = Kernel.SignedDowncast.parameter + let additional_parameters = [] + end) module Unsigned_overflow = Make (struct - let name = "unsigned_overflow" - let parameter = Kernel.UnsignedOverflow.parameter - let additional_parameters = [] - end) + let name = "unsigned_overflow" + let parameter = Kernel.UnsignedOverflow.parameter + let additional_parameters = [] + end) module Unsigned_downcast = Make (struct - let name = "unsigned_downcast" - let parameter = Kernel.UnsignedDowncast.parameter - let additional_parameters = [] - end) + let name = "unsigned_downcast" + let parameter = Kernel.UnsignedDowncast.parameter + let additional_parameters = [] + end) module Float_to_int = Make (struct - let name = "float_to_int" - let parameter = Options.DoFloatToInt.parameter - let additional_parameters = [] - end) + let name = "float_to_int" + let parameter = Options.DoFloatToInt.parameter + let additional_parameters = [] + end) module Finite_float = Make (struct - let name = "finite_float" - let parameter = Kernel.SpecialFloat.parameter - let additional_parameters = [] - end) + let name = "finite_float" + let parameter = Kernel.SpecialFloat.parameter + let additional_parameters = [] + end) module Bool_value = Make @@ -191,11 +191,11 @@ let () = Db.RteGen.self := self let all_statuses = !accessors let emitter = - Emitter.create - "rte" - [ Emitter.Property_status; Emitter.Alarm ] - ~correctness:[ Kernel.SafeArrays.parameter ] - ~tuning:[] + Emitter.create + "rte" + [ Emitter.Property_status; Emitter.Alarm ] + ~correctness:[ Kernel.SafeArrays.parameter ] + ~tuning:[] (* Local Variables: diff --git a/src/plugins/rte/options.ml b/src/plugins/rte/options.ml index 7c646c80c6e..0b629f7f994 100644 --- a/src/plugins/rte/options.ml +++ b/src/plugins/rte/options.ml @@ -21,47 +21,47 @@ (**************************************************************************) let help_msg = "generates annotations for runtime error checking and \ -preconditions at call sites" + preconditions at call sites" include Plugin.Register - (struct - let name = "rtegen" - let shortname = "rte" - let help = help_msg - end) + (struct + let name = "rtegen" + let shortname = "rte" + let help = help_msg + end) (* enabling/disabling plugin *) module Enabled = False (struct - let option_name = "-rte" - let help = "when on (off by default), " ^ help_msg - end) + let option_name = "-rte" + let help = "when on (off by default), " ^ help_msg + end) (* annotates division by zero (undefined behavior) *) module DoDivMod = True (struct - let option_name = "-rte-div" - let help = "when on (default), annotate for modulo and division by zero" - end) + let option_name = "-rte-div" + let help = "when on (default), annotate for modulo and division by zero" + end) (* annotates left and right shifts (undefined behavior) *) module DoShift = True (struct - let option_name = "-rte-shift" - let help = "when on (default), annotate for left and right shifts by a value out of bounds" - end) + let option_name = "-rte-shift" + let help = "when on (default), annotate for left and right shifts by a value out of bounds" + end) (* annotates casts from floating-point to integer (undefined behavior) *) module DoFloatToInt = True (struct - let option_name = "-rte-float-to-int" - let help = "when on (default), annotate casts from floating-point to \ - integer" - end) + let option_name = "-rte-float-to-int" + let help = "when on (default), annotate casts from floating-point to \ + integer" + end) (* annotates local variables and pointers read (aside from globals) initialization *) module DoInitialized = @@ -76,52 +76,52 @@ module DoInitialized = module DoMemAccess = True (struct - let option_name = "-rte-mem" - let help = "when on (default), annotate for valid pointer or \ -array access" - end) + let option_name = "-rte-mem" + let help = "when on (default), annotate for valid pointer or \ + array access" + end) (* annotates calls through pointers *) module DoPointerCall = True (struct - let option_name = "-rte-pointer-call" - let help = "when on, annotate functions calls through pointers" - end) + let option_name = "-rte-pointer-call" + let help = "when on, annotate functions calls through pointers" + end) (* uses results of basic constant propagation in order to check validity / invalidity of generated assertions, emitting a status if possible - *) +*) module Trivial = False (struct - let option_name = "-rte-trivial-annotations" - let help = "generate annotations for constant expressions, even when \ -they trivially hold" - (* if on, evaluates constants in order to check if assertions - are trivially true / false *) - end) + let option_name = "-rte-trivial-annotations" + let help = "generate annotations for constant expressions, even when \ + they trivially hold" + (* if on, evaluates constants in order to check if assertions + are trivially true / false *) + end) -(* emits a warning when an assertion generated by rte is clearly invalid +(* emits a warning when an assertion generated by rte is clearly invalid (using constant folding, see ConstFold *) module Warn = True (struct - let option_name = "-rte-warn" - let help = "when on (default), emits warning on broken asserts" - end) + let option_name = "-rte-warn" + let help = "when on (default), emits warning on broken asserts" + end) (* this option allows the user to select a set of functions on which - the plug-in performs its jobs (and only those). + the plug-in performs its jobs (and only those). By default all functions are annotated *) module FunctionSelection = Kernel_function_set (struct - let option_name = "-rte-select" - let arg_name = "fun" - let help = "select <fun> for analysis (default all functions)" - end) - + let option_name = "-rte-select" + let arg_name = "fun" + let help = "select <fun> for analysis (default all functions)" + end) + let warn ?source fmt = warning ?source ~current:true ~once:true fmt (* diff --git a/src/plugins/rte/register.ml b/src/plugins/rte/register.ml index 5a7a9ba4af9..8831d66b29b 100644 --- a/src/plugins/rte/register.ml +++ b/src/plugins/rte/register.ml @@ -20,7 +20,7 @@ (* *) (**************************************************************************) -let journal_register ?comment is_dyn name ty_arg fctref fct = +let journal_register ?comment is_dyn name ty_arg fctref fct = let ty = Datatype.func ty_arg Datatype.unit in Db.register (Db.Journalize("RteGen." ^ name, ty)) fctref fct; if is_dyn then @@ -29,21 +29,21 @@ let journal_register ?comment is_dyn name ty_arg fctref fct = in () -let nojournal_register fctref fct = +let nojournal_register fctref fct = Db.register Db.Journalization_not_required fctref (fun () -> fct) -let () = +let () = journal_register false "annotate_kf" Kernel_function.ty Db.RteGen.annotate_kf Visit.annotate_kf; - journal_register false "compute" Datatype.unit Db.RteGen.compute + journal_register false "compute" Datatype.unit Db.RteGen.compute Visit.compute; journal_register true ~comment:"Generate all RTE annotations in the \ - given function." + given function." "do_all_rte" Kernel_function.ty Db.RteGen.do_all_rte Visit.do_all_rte; journal_register false ~comment:"Generate all RTE annotations except pre-conditions \ - in the given function." + in the given function." "do_rte" Kernel_function.ty Db.RteGen.do_rte Visit.do_rte; let open Generator in let open Db.RteGen in @@ -76,7 +76,7 @@ let _ = let _ = Dynamic.register ~comment:"Get the list of annotations previously emitted by RTE for the \ -given statement." + given statement." ~plugin:"RteGen" "get_rte_annotations" (Datatype.func @@ -88,7 +88,7 @@ given statement." let _ = Dynamic.register ~comment:"Generate RTE annotations corresponding to the given stmt of \ -the given function." + the given function." ~plugin:"RteGen" "stmt_annotations" (Datatype.func2 Kernel_function.ty Cil_datatype.Stmt.ty @@ -99,10 +99,10 @@ the given function." let _ = Dynamic.register ~comment:"Generate RTE annotations corresponding to the given exp \ -of the given stmt in the given function." + of the given stmt in the given function." ~plugin:"RteGen" "exp_annotations" - (Datatype.func3 Kernel_function.ty Cil_datatype.Stmt.ty Cil_datatype.Exp.ty + (Datatype.func3 Kernel_function.ty Cil_datatype.Stmt.ty Cil_datatype.Exp.ty (let module L = Datatype.List(Cil_datatype.Code_annotation) in L.ty)) ~journalize:false Visit.do_exp_annotations diff --git a/src/plugins/rte/rte.ml b/src/plugins/rte/rte.ml index 855e2b4e729..130ec550685 100644 --- a/src/plugins/rte/rte.ml +++ b/src/plugins/rte/rte.ml @@ -54,7 +54,7 @@ let valid_index ~remove_trivial ~on_alarm e size = let v_e = get_expr_val e in let v_size = get_expr_val size in let neg_ok = - Extlib.may_map ~dft:false (Integer.le Integer.zero) v_e + Extlib.may_map ~dft:false (Integer.le Integer.zero) v_e || Cil.isUnsignedInteger (Cil.typeOf e) in if not neg_ok then alarm Lower_bound; @@ -76,10 +76,10 @@ let valid_index ~remove_trivial ~on_alarm e size = let lval_assertion ~read_only ~remove_trivial ~on_alarm lv = (* For accesses to known arrays we generate an assertions that constrains the index. This is simpler than the [\valid] assertion *) - let rec check_array_access default off typ in_struct = + let rec check_array_access default off typ in_struct = match off with - | NoOffset -> - if default then + | NoOffset -> + if default then on_alarm ?status:None (Alarms.Memory_access(lv, read_only)) | Field (fi, off) -> (* Mark that we went through a struct field, then recurse *) @@ -108,10 +108,10 @@ let lval_assertion ~read_only ~remove_trivial ~on_alarm lv = (* assertion for lvalue initialization *) let lval_initialized_assertion ~remove_trivial:_ ~on_alarm lv = - let rec check_array_initialized default off typ in_struct l = + let rec check_array_initialized default off typ in_struct l = match off with - | NoOffset -> - begin + | NoOffset -> + begin match typ with | TComp({cstruct = false; cfields} ,_,_) -> (match cfields with @@ -123,10 +123,10 @@ let lval_initialized_assertion ~remove_trivial:_ ~on_alarm lv = (fun fi -> Cil.addOffsetLval (Field (fi, NoOffset)) lv) cfields in - if default then + if default then on_alarm ?status:None (Alarms.Uninitialized_union llv)) - | _ -> - if default then + | _ -> + if default then on_alarm ?status:None (Alarms.Uninitialized lv) end | Field (fi, off) -> @@ -165,7 +165,7 @@ let uminus_assertion ~remove_trivial ~on_alarm exp = if remove_trivial then begin match get_expr_val exp with | None -> alarm () - | Some a64 -> + | Some a64 -> (* constant operand *) if Integer.equal a64 min_ty then alarm ~status:Property_status.False_if_reachable () @@ -179,9 +179,9 @@ let mult_sub_add_assertion ~signed ~remove_trivial ~on_alarm (exp,op,lexp,rexp) is strictly more than [max_ty] or strictly less than [min_ty] *) let t = Cil.unrollType (Cil.typeOf exp) in let size = Cil.bitsSizeOf t in - let min_ty, max_ty = + let min_ty, max_ty = if signed then Cil.min_signed_number size, Cil.max_signed_number size - else Integer.zero, Cil.max_unsigned_number size + else Integer.zero, Cil.max_unsigned_number size in let alarm ?status bk = let bound = match bk with @@ -228,7 +228,7 @@ let mult_sub_add_assertion ~signed ~remove_trivial ~on_alarm (exp,op,lexp,rexp) (* Only negative overflows are possible, since r is positive. (TODO: nothing can happen on [max_int]. *) alarm Lower_bound - end + end | Some v, None, Mult | None, Some v, Mult when Integer.is_zero v || Integer.is_one v -> () @@ -286,7 +286,7 @@ let signed_div_assertion ~remove_trivial ~on_alarm (exp, lexp, rexp) = | Some _, Some _ -> (* invalid constant division *) alarm ~status:Property_status.False_if_reachable () - | None, Some _ | Some _, None | None, None -> + | None, Some _ | Some _, None | None, None -> (* at least one is not constant: cannot conclude *) alarm () end @@ -347,12 +347,12 @@ let shift_overflow_assertion ~signed ~remove_trivial ~on_alarm (exp, op, lexp, r in if remove_trivial then begin match get_expr_val lexp, get_expr_val rexp with - | None,_ | _, None -> + | None,_ | _, None -> overflow_alarm () | Some lval64, Some rval64 -> (* both operands are constant: check result is representable in result type *) - if Integer.ge rval64 Integer.zero + if Integer.ge rval64 Integer.zero && Integer.gt (Integer.shift_left lval64 rval64) maxValResult then overflow_alarm ~status:Property_status.False_if_reachable () @@ -384,7 +384,7 @@ let unsigned_downcast_assertion ~remove_trivial ~on_alarm (ty, exp) = on_alarm ?status a; in let alarms () = - if Cil.isSigned kind then begin (* signed to unsigned *) + if Cil.isSigned kind then begin (* signed to unsigned *) alarm Upper_bound; alarm Lower_bound; end else (* unsigned to unsigned; cannot overflow in the negative *) diff --git a/src/plugins/rte/visit.ml b/src/plugins/rte/visit.ml index c8091e90c75..19c5fa1fa52 100644 --- a/src/plugins/rte/visit.ml +++ b/src/plugins/rte/visit.ml @@ -28,7 +28,7 @@ open Cil_datatype (* AST inplace visitor for runtime annotation generation *) (* module for bypassing categories of annotation generation for certain - expression ids ; + expression ids ; useful in a case such as signed char cx,cy,cz; @@ -177,8 +177,8 @@ class annot_visitor kf to_annot on_alarm = object (self) let stmt = Extlib.the (self#current_stmt) in Queue.add (fun () -> - let annot = Logic_const.new_code_annotation (AStmtSpec ([], spec)) in - Annotations.add_code_annot Generator.emitter ~kf stmt annot) + let annot = Logic_const.new_code_annotation (AStmtSpec ([], spec)) in + Annotations.add_code_annot Generator.emitter ~kf stmt annot) self#get_filling_actions method private generate_assertion: 'a. 'a Rte.alarm_gen -> 'a -> unit = @@ -188,22 +188,22 @@ class annot_visitor kf to_annot on_alarm = object (self) fgen ~remove_trivial ~on_alarm method! vstmt s = match s.skind with - | UnspecifiedSequence l -> - (* UnspecifiedSequences may contain lvals for side-effects, that - give rise to spurious assertions *) - let no_lval = List.map (fun (s, _, _, _, sref) -> s, [], [], [], sref) l in - let s' = { s with skind = UnspecifiedSequence no_lval } in - Cil.ChangeDoChildrenPost (s', fun _ -> s) - | _ -> Cil.DoChildren + | UnspecifiedSequence l -> + (* UnspecifiedSequences may contain lvals for side-effects, that + give rise to spurious assertions *) + let no_lval = List.map (fun (s, _, _, _, sref) -> s, [], [], [], sref) l in + let s' = { s with skind = UnspecifiedSequence no_lval } in + Cil.ChangeDoChildrenPost (s', fun _ -> s) + | _ -> Cil.DoChildren method private treat_call ret_opt = match ret_opt, self#do_mem_access () with | None, _ | Some _, false -> () - | Some ret, true -> + | Some ret, true -> Options.debug "lval %a: validity of potential mem access checked\n" - Printer.pp_lval ret; - self#generate_assertion - (Rte.lval_assertion ~read_only:Alarms.For_writing) ret + Printer.pp_lval ret; + self#generate_assertion + (Rte.lval_assertion ~read_only:Alarms.For_writing) ret method private check_uchar_assign dest src = @@ -215,59 +215,59 @@ class annot_visitor kf to_annot on_alarm = object (self) dest end; begin match src.enode with - | Lval src_lv -> - let typ1 = Cil.typeOfLval src_lv in - let typ2 = Cil.typeOfLval dest in - let isUChar t = Cil.isUnsignedInteger t && Cil.isAnyCharType t in - if isUChar typ1 && isUChar typ2 then - self#mark_to_skip_initialized src_lv - | _ -> () + | Lval src_lv -> + let typ1 = Cil.typeOfLval src_lv in + let typ2 = Cil.typeOfLval dest in + let isUChar t = Cil.isUnsignedInteger t && Cil.isAnyCharType t in + if isUChar typ1 && isUChar typ2 then + self#mark_to_skip_initialized src_lv + | _ -> () end ; Cil.DoChildren (* assigned left values are checked for valid access *) method! vinst = function - | Set (lval,exp,_) -> self#check_uchar_assign lval exp - | Call (ret_opt,funcexp,argl,_) -> - (* Do not emit alarms on Eva builtins such as Frama_C_show_each, that should - have no effect on analyses. *) - let is_builtin, is_va_start = - match funcexp.enode with - | Lval (Var vinfo, NoOffset) -> - let kf = Globals.Functions.get vinfo in - let frama_b = Ast_info.is_frama_c_builtin (Kernel_function.get_name kf) - in - let va_start = Kernel_function.get_name kf = "__builtin_va_start" in - (frama_b, va_start) - | _ -> (false, false) - in - if is_va_start then begin - match (List.nth argl 0).enode with + | Set (lval,exp,_) -> self#check_uchar_assign lval exp + | Call (ret_opt,funcexp,argl,_) -> + (* Do not emit alarms on Eva builtins such as Frama_C_show_each, that should + have no effect on analyses. *) + let is_builtin, is_va_start = + match funcexp.enode with + | Lval (Var vinfo, NoOffset) -> + let kf = Globals.Functions.get vinfo in + let frama_b = Ast_info.is_frama_c_builtin (Kernel_function.get_name kf) + in + let va_start = Kernel_function.get_name kf = "__builtin_va_start" in + (frama_b, va_start) + | _ -> (false, false) + in + if is_va_start then begin + match (List.nth argl 0).enode with | Lval lv -> self#mark_to_skip_initialized lv | _ -> () - end ; - if is_builtin - then Cil.SkipChildren - else begin - self#treat_call ret_opt; - (* Alarm if the call is through a pointer. Done in DoChildrenPost to get a - more pleasant ordering of annotations. *) - let do_ptr () = - if self#do_pointer_call () then - match funcexp.enode with - | Lval (Mem e, _) -> self#generate_assertion Rte.pointer_call (e, argl) - | _ -> () - in - Cil.DoChildrenPost (fun res -> do_ptr (); res) - end - | Local_init (v,ConsInit(f,args,kind),loc) -> - let do_call lv _e _args _loc = self#treat_call lv in - Cil.treat_constructor_as_func do_call v f args kind loc; - Cil.DoChildren - | Local_init (v,AssignInit (SingleInit exp),_) -> - self#check_uchar_assign (Cil.var v) exp - | Local_init (_,AssignInit _,_) - | Asm _ | Skip _ | Code_annot _ -> Cil.DoChildren + end ; + if is_builtin + then Cil.SkipChildren + else begin + self#treat_call ret_opt; + (* Alarm if the call is through a pointer. Done in DoChildrenPost to get a + more pleasant ordering of annotations. *) + let do_ptr () = + if self#do_pointer_call () then + match funcexp.enode with + | Lval (Mem e, _) -> self#generate_assertion Rte.pointer_call (e, argl) + | _ -> () + in + Cil.DoChildrenPost (fun res -> do_ptr (); res) + end + | Local_init (v,ConsInit(f,args,kind),loc) -> + let do_call lv _e _args _loc = self#treat_call lv in + Cil.treat_constructor_as_func do_call v f args kind loc; + Cil.DoChildren + | Local_init (v,AssignInit (SingleInit exp),_) -> + self#check_uchar_assign (Cil.var v) exp + | Local_init (_,AssignInit _,_) + | Asm _ | Skip _ | Code_annot _ -> Cil.DoChildren method! vexpr exp = Options.debug "considering exp %a\n" Printer.pp_exp exp; @@ -281,12 +281,12 @@ class annot_visitor kf to_annot on_alarm = object (self) let generate () = match exp.enode with | BinOp((Div | Mod) as op, lexp, rexp, ty) -> - (match Cil.unrollType ty with - | TInt(kind,_) -> + (match Cil.unrollType ty with + | TInt(kind,_) -> (* add assertion "divisor not zero" *) if self#do_div_mod () then self#generate_assertion Rte.divmod_assertion rexp; - if self#do_signed_overflow () && op = Div && Cil.isSigned kind then + if self#do_signed_overflow () && op = Div && Cil.isSigned kind then (* treat the special case of signed division overflow (no signed modulo overflow) *) self#generate_assertion Rte.signed_div_assertion (exp, lexp, rexp) @@ -295,7 +295,7 @@ class annot_visitor kf to_annot on_alarm = object (self) | _ -> ()) | BinOp((Shiftlt | Shiftrt) as op, lexp, rexp,ttype ) -> - (match Cil.unrollType ttype with + (match Cil.unrollType ttype with | TInt(kind,_) -> (* 0 <= rexp <= width *) if self#do_shift () then begin @@ -320,13 +320,13 @@ class annot_visitor kf to_annot on_alarm = object (self) | BinOp((PlusA |MinusA | Mult) as op, lexp, rexp, ttype) -> (* may be skipped if the enclosing expression is a downcast to a signed type *) - (match Cil.unrollType ttype with - | TInt(kind,_) when Cil.isSigned kind -> + (match Cil.unrollType ttype with + | TInt(kind,_) when Cil.isSigned kind -> if self#do_signed_overflow () && not (self#must_skip exp) then self#generate_assertion (Rte.mult_sub_add_assertion ~signed:true) (exp, op, lexp, rexp) - | TInt(kind,_) when not (Cil.isSigned kind) -> + | TInt(kind,_) when not (Cil.isSigned kind) -> if self#do_unsigned_overflow () then self#generate_assertion (Rte.mult_sub_add_assertion ~signed:false) @@ -340,8 +340,8 @@ class annot_visitor kf to_annot on_alarm = object (self) "subtracting the promoted value from the largest value of the promoted type and adding one", the result is always representable: so no overflow *) - (match Cil.unrollType ty with - | TInt(kind,_) when Cil.isSigned kind -> + (match Cil.unrollType ty with + | TInt(kind,_) when Cil.isSigned kind -> if self#do_signed_overflow () then self#generate_assertion Rte.uminus_assertion exp; | TFloat(fkind,_) when self#do_finite_float () -> @@ -356,9 +356,9 @@ class annot_visitor kf to_annot on_alarm = object (self) (* left values are checked for valid access *) if self#do_mem_access () then begin Options.debug - "exp %a is an lval: validity of potential mem access checked" + "exp %a is an lval: validity of potential mem access checked" Printer.pp_exp exp; - self#generate_assertion + self#generate_assertion (Rte.lval_assertion ~read_only:Alarms.For_reading) lval end; if self#do_initialized () && not (self#must_skip_initialized lval) then begin @@ -391,12 +391,12 @@ class annot_visitor kf to_annot on_alarm = object (self) | _ -> ()); | Const (CReal(f,fkind,_)) when self#do_finite_float () -> begin match Pervasives.classify_float f with - | FP_normal - | FP_subnormal - | FP_zero -> () - | FP_infinite - | FP_nan -> - self#generate_assertion Rte.finite_float_assertion (fkind,exp) + | FP_normal + | FP_subnormal + | FP_zero -> () + | FP_infinite + | FP_nan -> + self#generate_assertion Rte.finite_float_assertion (fkind,exp) end | StartOf _ | AddrOf _ @@ -416,7 +416,7 @@ class annot_visitor kf to_annot on_alarm = object (self) end -let rte_annotations stmt = +let rte_annotations stmt = Annotations.fold_code_annot (fun e a acc -> if Emitter.equal e Generator.emitter then a ::acc else acc) stmt -- GitLab From 391019fdfb19776c56b012ef3c7fd96a0fc04fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 25 Jan 2019 12:55:07 +0100 Subject: [PATCH 002/376] [rte] make option remove-trivial local --- src/plugins/rte/visit.ml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/rte/visit.ml b/src/plugins/rte/visit.ml index 19c5fa1fa52..ff98a038440 100644 --- a/src/plugins/rte/visit.ml +++ b/src/plugins/rte/visit.ml @@ -53,6 +53,7 @@ open Cil_datatype *) type to_annotate = { + remove_trivial: bool; initialized: bool; mem_access: bool; div_mod: bool; @@ -70,6 +71,7 @@ type to_annotate = { } let annotate_all = { + remove_trivial = false; initialized = true; mem_access = true; div_mod = true; @@ -89,6 +91,7 @@ let annotate_all = { (** Which annotations should be added, deduced from the options of RTE and the kernel itself. *) let annotate_from_options () = { + remove_trivial = Options.Trivial.get (); initialized = Options.DoInitialized.get (); mem_access = Options.DoMemAccess.get (); div_mod = Options.DoDivMod.get (); @@ -182,10 +185,9 @@ class annot_visitor kf to_annot on_alarm = object (self) self#get_filling_actions method private generate_assertion: 'a. 'a Rte.alarm_gen -> 'a -> unit = - let remove_trivial = not (Options.Trivial.get ()) in fun fgen -> let on_alarm ?status a = on_alarm self#current_kinstr ?status a in - fgen ~remove_trivial ~on_alarm + fgen ~remove_trivial:to_annot.remove_trivial ~on_alarm method! vstmt s = match s.skind with | UnspecifiedSequence l -> @@ -422,7 +424,6 @@ let rte_annotations stmt = stmt [] - (** {2 List of all RTEs on a given Cil object} *) let get_annotations from kf stmt x = -- GitLab From 7f80d054999097beac8ced029fd62a6b847b4e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 25 Jan 2019 13:25:48 +0100 Subject: [PATCH 003/376] [rte] filtering with continuation --- src/plugins/rte/visit.ml | 84 +++++++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 32 deletions(-) diff --git a/src/plugins/rte/visit.ml b/src/plugins/rte/visit.ml index ff98a038440..869f5788986 100644 --- a/src/plugins/rte/visit.ml +++ b/src/plugins/rte/visit.ml @@ -60,8 +60,8 @@ type to_annotate = { shift: bool; left_shift_negative: bool; right_shift_negative: bool; - signed_ov: bool; - unsigned_ov: bool; + signed_overflow: bool; + unsigned_overflow: bool; signed_downcast: bool; unsigned_downcast: bool; float_to_int: bool; @@ -71,15 +71,15 @@ type to_annotate = { } let annotate_all = { - remove_trivial = false; + remove_trivial = true; initialized = true; mem_access = true; div_mod = true; shift = true; left_shift_negative = true; right_shift_negative = true; - signed_ov = true; - unsigned_ov = true; + signed_overflow = true; + unsigned_overflow = true; signed_downcast = true; unsigned_downcast = true; float_to_int = true; @@ -88,25 +88,46 @@ let annotate_all = { bool_value = true; } -(** Which annotations should be added, deduced from the options of RTE and - the kernel itself. *) -let annotate_from_options () = { - remove_trivial = Options.Trivial.get (); - initialized = Options.DoInitialized.get (); - mem_access = Options.DoMemAccess.get (); - div_mod = Options.DoDivMod.get (); - shift = Options.DoShift.get (); - left_shift_negative = Kernel.LeftShiftNegative.get (); - right_shift_negative = Kernel.RightShiftNegative.get (); - signed_ov = Kernel.SignedOverflow.get (); - unsigned_ov = Kernel.UnsignedOverflow.get (); - signed_downcast = Kernel.SignedDowncast.get (); - unsigned_downcast = Kernel.UnsignedDowncast.get (); - float_to_int = Options.DoFloatToInt.get (); - finite_float = Kernel.SpecialFloat.get () <> "none"; - pointer_call = Options.DoPointerCall.get (); - bool_value = Kernel.InvalidBool.get (); -} +(* Which annotations should be added, + from local options, or deduced from the options of RTE and the kernel *) + +let option get = function None -> get () | Some flag -> flag + +let annotate_from_options + job + ?remove_trivial + ?initialized + ?mem_access + ?div_mod + ?shift + ?left_shift_negative + ?right_shift_negative + ?signed_overflow + ?unsigned_overflow + ?signed_downcast + ?unsigned_downcast + ?float_to_int + ?finite_float + ?pointer_call + ?bool_value + data = + job { + remove_trivial = option (fun () -> not (Options.Trivial.get ())) remove_trivial ; + initialized = option Options.DoInitialized.get initialized ; + mem_access = option Options.DoMemAccess.get mem_access ; + div_mod = option Options.DoDivMod.get div_mod ; + shift = option Options.DoShift.get shift; + left_shift_negative = option Kernel.LeftShiftNegative.get left_shift_negative ; + right_shift_negative = option Kernel.RightShiftNegative.get right_shift_negative ; + signed_overflow = option Kernel.SignedOverflow.get signed_overflow ; + unsigned_overflow = option Kernel.UnsignedOverflow.get unsigned_overflow ; + signed_downcast = option Kernel.SignedDowncast.get signed_downcast ; + unsigned_downcast = option Kernel.UnsignedDowncast.get unsigned_downcast ; + float_to_int = option Options.DoFloatToInt.get float_to_int ; + finite_float = option (fun () -> Kernel.SpecialFloat.get () <> "none") finite_float ; + pointer_call = option Options.DoPointerCall.get pointer_call ; + bool_value = option Kernel.InvalidBool.get bool_value ; + } data (** [kf]: function to annotate [to_annot]: which RTE to generate. @@ -152,10 +173,10 @@ class annot_visitor kf to_annot on_alarm = object (self) && not (Generator.Right_shift_negative.is_computed kf) method private do_signed_overflow () = - to_annot.signed_ov && not (Generator.Signed_overflow.is_computed kf) + to_annot.signed_overflow && not (Generator.Signed_overflow.is_computed kf) method private do_unsigned_overflow () = - to_annot.unsigned_ov && not (Generator.Unsigned_overflow.is_computed kf) + to_annot.unsigned_overflow && not (Generator.Unsigned_overflow.is_computed kf) method private do_signed_downcast () = to_annot.signed_downcast && not (Generator.Signed_downcast.is_computed kf) @@ -427,7 +448,7 @@ let rte_annotations stmt = (** {2 List of all RTEs on a given Cil object} *) let get_annotations from kf stmt x = - let to_annot = annotate_from_options () in + let to_annot = annotate_from_options (fun flags () -> flags) () in (* Accumulator containing all the code_annots corresponding to an alarm emitted so far. *) let code_annots = ref [] in @@ -478,9 +499,9 @@ let annotate_kf_aux to_annot kf = comp Shift.accessor to_annot.shift ||| comp Left_shift_negative.accessor to_annot.left_shift_negative ||| comp Right_shift_negative.accessor to_annot.right_shift_negative ||| - comp Signed_overflow.accessor to_annot.signed_ov ||| + comp Signed_overflow.accessor to_annot.signed_overflow ||| comp Signed_downcast.accessor to_annot.signed_downcast ||| - comp Unsigned_overflow.accessor to_annot.unsigned_ov ||| + comp Unsigned_overflow.accessor to_annot.unsigned_overflow ||| comp Unsigned_downcast.accessor to_annot.unsigned_downcast ||| comp Float_to_int.accessor to_annot.float_to_int ||| comp Finite_float.accessor to_annot.finite_float @@ -502,8 +523,7 @@ let annotate_kf_aux to_annot kf = end (* generates annotation for function kf on the basis of command-line options *) -let annotate_kf kf = - annotate_kf_aux (annotate_from_options ()) kf +let annotate_kf kf = annotate_from_options annotate_kf_aux kf (* annotate for all rte + unsigned overflows (which are not rte), for a given function *) @@ -520,7 +540,7 @@ let do_all_rte kf = let do_rte kf = let to_annot = { annotate_all with - unsigned_ov = false; + unsigned_overflow = false; signed_downcast = false; unsigned_downcast = false; } in -- GitLab From 4b2ac79a89f03d5d557c70bde35d28ddbe7112d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 25 Jan 2019 13:52:34 +0100 Subject: [PATCH 004/376] [rte] low-level visitor API --- src/plugins/rte/RteGen.mli | 50 +++++++++++++++++++++++++++++++++++++- src/plugins/rte/visit.ml | 43 ++++++++++++++++++++++++++++++++ src/plugins/rte/visit.mli | 41 +++++++++++++++++++++++++++++++ 3 files changed, 133 insertions(+), 1 deletion(-) diff --git a/src/plugins/rte/RteGen.mli b/src/plugins/rte/RteGen.mli index 9926f78e4a0..bd2f3ac38d5 100644 --- a/src/plugins/rte/RteGen.mli +++ b/src/plugins/rte/RteGen.mli @@ -20,4 +20,52 @@ (* *) (**************************************************************************) -(** No function is directly exported: they are registered in {!Db.Value}. *) +(** Some functions are also registered in {!Db.Value}. *) + +open Cil_types + +module Visit : +sig + + (** Low-level iterator + + [generator ~options:... on_alarm kf stmt element] iterates over + potential alarms for Cil element, located in the given + kernel_function and stmt. + + The [on_alarm ki ?status alarm] callback is invoked with + the k-instruction originating the alarm and the already known status, + if any. + + Potential alarms can be specified by the provided options, + with defaults generated from the Kernel options and the RTE plug-in + options. + *) + type 'a generator = + ?remove_trivial:bool -> + ?initialized:Options.DoInitialized.t -> + ?mem_access:Options.DoMemAccess.t -> + ?div_mod:Options.DoDivMod.t -> + ?shift:Options.DoShift.t -> + ?left_shift_negative:Kernel.LeftShiftNegative.t -> + ?right_shift_negative:Kernel.RightShiftNegative.t -> + ?signed_overflow:Kernel.SignedOverflow.t -> + ?unsigned_overflow:Kernel.UnsignedOverflow.t -> + ?signed_downcast:Kernel.SignedDowncast.t -> + ?unsigned_downcast:Kernel.UnsignedDowncast.t -> + ?float_to_int:Options.DoFloatToInt.t -> + ?finite_float:bool -> + ?pointer_call:Options.DoPointerCall.t -> + ?bool_value:Kernel.InvalidBool.t -> + (Cil_types.kinstr -> + ?status:Property_status.emitted_status -> Alarms.alarm -> unit) -> + Kernel_function.t -> + Cil_types.stmt -> + 'a -> unit + + val iter_lval : lval generator + val iter_exp : exp generator + val iter_instr : instr generator + val iter_stmt : stmt generator + +end diff --git a/src/plugins/rte/visit.ml b/src/plugins/rte/visit.ml index 869f5788986..7b28afc6cd8 100644 --- a/src/plugins/rte/visit.ml +++ b/src/plugins/rte/visit.ml @@ -445,6 +445,49 @@ let rte_annotations stmt = stmt [] +(** {2 Iterate over Alarms on Cil elements} *) + +type 'a generator = + ?remove_trivial:bool -> + ?initialized:Options.DoInitialized.t -> + ?mem_access:Options.DoMemAccess.t -> + ?div_mod:Options.DoDivMod.t -> + ?shift:Options.DoShift.t -> + ?left_shift_negative:Kernel.LeftShiftNegative.t -> + ?right_shift_negative:Kernel.RightShiftNegative.t -> + ?signed_overflow:Kernel.SignedOverflow.t -> + ?unsigned_overflow:Kernel.UnsignedOverflow.t -> + ?signed_downcast:Kernel.SignedDowncast.t -> + ?unsigned_downcast:Kernel.UnsignedDowncast.t -> + ?float_to_int:Options.DoFloatToInt.t -> + ?finite_float:bool -> + ?pointer_call:Options.DoPointerCall.t -> + ?bool_value:Kernel.InvalidBool.t -> + (Cil_types.kinstr -> + ?status:Property_status.emitted_status -> Alarms.alarm -> unit) -> + Kernel_function.t -> + Cil_types.stmt -> + 'a -> unit + +let iter_alarms visit to_annot on_alarm kf stmt element = + let visitor = object (self) + inherit annot_visitor kf to_annot on_alarm + initializer self#push_stmt stmt + end in + ignore (visit (visitor :> Cil.cilVisitor) element) + +let iter_lval : lval generator = + annotate_from_options (iter_alarms Cil.visitCilLval) + +let iter_exp : exp generator = + annotate_from_options (iter_alarms Cil.visitCilExpr) + +let iter_instr : instr generator = + annotate_from_options (iter_alarms Cil.visitCilInstr) + +let iter_stmt : stmt generator = + annotate_from_options (iter_alarms Cil.visitCilStmt) + (** {2 List of all RTEs on a given Cil object} *) let get_annotations from kf stmt x = diff --git a/src/plugins/rte/visit.mli b/src/plugins/rte/visit.mli index 1413e3b8f7b..4dc723cc58c 100644 --- a/src/plugins/rte/visit.mli +++ b/src/plugins/rte/visit.mli @@ -22,6 +22,47 @@ open Cil_types +(** Low-level iterator + + [generator ~options:... on_alarm kf stmt element] iterates over + potential alarms for Cil element, located in the given + kernel_function and stmt. + + The [on_alarm ki ?status alarm] callback is invoked with + the k-instruction originating the alarm and the already known status, + if any. + + Potential alarms can be specified by the provided options, + with defaults generated from the Kernel options and the RTE plug-in + options. +*) +type 'a generator = + ?remove_trivial:bool -> + ?initialized:Options.DoInitialized.t -> + ?mem_access:Options.DoMemAccess.t -> + ?div_mod:Options.DoDivMod.t -> + ?shift:Options.DoShift.t -> + ?left_shift_negative:Kernel.LeftShiftNegative.t -> + ?right_shift_negative:Kernel.RightShiftNegative.t -> + ?signed_overflow:Kernel.SignedOverflow.t -> + ?unsigned_overflow:Kernel.UnsignedOverflow.t -> + ?signed_downcast:Kernel.SignedDowncast.t -> + ?unsigned_downcast:Kernel.UnsignedDowncast.t -> + ?float_to_int:Options.DoFloatToInt.t -> + ?finite_float:bool -> + ?pointer_call:Options.DoPointerCall.t -> + ?bool_value:Kernel.InvalidBool.t -> + (Cil_types.kinstr -> + ?status:Property_status.emitted_status -> Alarms.alarm -> unit) -> + Kernel_function.t -> + Cil_types.stmt -> + 'a -> unit + +val iter_lval : lval generator +val iter_exp : exp generator +val iter_instr : instr generator +val iter_stmt : stmt generator + (** Generates RTE for a single function. Uses the status of the various RTE options do decide which kinds of annotations must be generated. *) -- GitLab From 6acc67fc871f180172214cd8a010ef72cd3ec85d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 1 Feb 2019 16:30:03 +0100 Subject: [PATCH 005/376] [rte] use the record instead of flags --- src/plugins/rte/RteGen.mli | 93 ++++++++++++++------- src/plugins/rte/visit.ml | 167 +++++++++++++++++++------------------ src/plugins/rte/visit.mli | 93 ++++++++++++++------- 3 files changed, 212 insertions(+), 141 deletions(-) diff --git a/src/plugins/rte/RteGen.mli b/src/plugins/rte/RteGen.mli index bd2f3ac38d5..7c7ef14725b 100644 --- a/src/plugins/rte/RteGen.mli +++ b/src/plugins/rte/RteGen.mli @@ -27,45 +27,80 @@ open Cil_types module Visit : sig - (** Low-level iterator + (** Low-level control over iterators *) - [generator ~options:... on_alarm kf stmt element] iterates over - potential alarms for Cil element, located in the given - kernel_function and stmt. + type flags = { + remove_trivial: bool; + initialized: bool; + mem_access: bool; + div_mod: bool; + shift: bool; + left_shift_negative: bool; + right_shift_negative: bool; + signed_overflow: bool; + unsigned_overflow: bool; + signed_downcast: bool; + unsigned_downcast: bool; + float_to_int: bool; + finite_float: bool; + pointer_call: bool; + bool_value: bool; + } + + (** Defaults are taken from the Kernel and RTE plug-in options *) + val default : + ?remove_trivial:bool -> + ?initialized:bool -> + ?mem_access:bool -> + ?div_mod:bool -> + ?shift:bool -> + ?left_shift_negative:bool -> + ?right_shift_negative:bool -> + ?signed_overflow:bool -> + ?unsigned_overflow:bool -> + ?signed_downcast:bool -> + ?unsigned_downcast:bool -> + ?float_to_int:bool -> + ?finite_float:bool -> + ?pointer_call:bool -> + ?bool_value:bool -> + unit -> flags + + (** All flags set to [true] *) + val flags_all : flags + + (** All flags set to [false] *) + val flags_none : flags + + (** Low-level iterators callback. + + The [on_alarm stmt ?status alarm] callback is invoked with + the [stmt] originating the alarm and the already known status, + if any. + *) + type on_alarm = + kinstr -> ?status:Property_status.emitted_status -> + Alarms.alarm -> unit + + (** Low-level iterators The [on_alarm ki ?status alarm] callback is invoked with the k-instruction originating the alarm and the already known status, if any. - Potential alarms can be specified by the provided options, - with defaults generated from the Kernel options and the RTE plug-in - options. + Potential alarms can be specified by the provided flags, + with defaults from the Kernel and RTE plug-in options. *) - type 'a generator = - ?remove_trivial:bool -> - ?initialized:Options.DoInitialized.t -> - ?mem_access:Options.DoMemAccess.t -> - ?div_mod:Options.DoDivMod.t -> - ?shift:Options.DoShift.t -> - ?left_shift_negative:Kernel.LeftShiftNegative.t -> - ?right_shift_negative:Kernel.RightShiftNegative.t -> - ?signed_overflow:Kernel.SignedOverflow.t -> - ?unsigned_overflow:Kernel.UnsignedOverflow.t -> - ?signed_downcast:Kernel.SignedDowncast.t -> - ?unsigned_downcast:Kernel.UnsignedDowncast.t -> - ?float_to_int:Options.DoFloatToInt.t -> - ?finite_float:bool -> - ?pointer_call:Options.DoPointerCall.t -> - ?bool_value:Kernel.InvalidBool.t -> - (Cil_types.kinstr -> - ?status:Property_status.emitted_status -> Alarms.alarm -> unit) -> + + type 'a iterator = + ?flags:flags -> on_alarm -> Kernel_function.t -> Cil_types.stmt -> 'a -> unit - val iter_lval : lval generator - val iter_exp : exp generator - val iter_instr : instr generator - val iter_stmt : stmt generator + val iter_lval : lval iterator + val iter_exp : exp iterator + val iter_instr : instr iterator + val iter_stmt : stmt iterator end diff --git a/src/plugins/rte/visit.ml b/src/plugins/rte/visit.ml index 7b28afc6cd8..e262588f298 100644 --- a/src/plugins/rte/visit.ml +++ b/src/plugins/rte/visit.ml @@ -52,7 +52,7 @@ open Cil_datatype and is stronger) *) -type to_annotate = { +type flags = { remove_trivial: bool; initialized: bool; mem_access: bool; @@ -70,7 +70,7 @@ type to_annotate = { bool_value: bool; } -let annotate_all = { +let flags_all = { remove_trivial = true; initialized = true; mem_access = true; @@ -88,13 +88,30 @@ let annotate_all = { bool_value = true; } +let flags_none = { + remove_trivial = false; + initialized = false; + mem_access = false; + div_mod = false; + shift = false; + left_shift_negative = false; + right_shift_negative = false; + signed_overflow = false; + unsigned_overflow = false; + signed_downcast = false; + unsigned_downcast = false; + float_to_int = false; + finite_float = false; + pointer_call = false; + bool_value = false; +} + (* Which annotations should be added, from local options, or deduced from the options of RTE and the kernel *) -let option get = function None -> get () | Some flag -> flag +let option (get : unit -> bool) = function None -> get () | Some flag -> flag -let annotate_from_options - job +let default ?remove_trivial ?initialized ?mem_access @@ -110,8 +127,8 @@ let annotate_from_options ?finite_float ?pointer_call ?bool_value - data = - job { + () = + { remove_trivial = option (fun () -> not (Options.Trivial.get ())) remove_trivial ; initialized = option Options.DoInitialized.get initialized ; mem_access = option Options.DoMemAccess.get mem_access ; @@ -127,12 +144,12 @@ let annotate_from_options finite_float = option (fun () -> Kernel.SpecialFloat.get () <> "none") finite_float ; pointer_call = option Options.DoPointerCall.get pointer_call ; bool_value = option Kernel.InvalidBool.get bool_value ; - } data + } (** [kf]: function to annotate - [to_annot]: which RTE to generate. + [flags]: which RTE to generate. [register]: the action to perform on each RTE alarm *) -class annot_visitor kf to_annot on_alarm = object (self) +class annot_visitor kf flags on_alarm = object (self) inherit Visitor.frama_c_inplace @@ -153,49 +170,49 @@ class annot_visitor kf to_annot on_alarm = object (self) r method private do_initialized () = - to_annot.initialized && not (Generator.Initialized.is_computed kf) + flags.initialized && not (Generator.Initialized.is_computed kf) method private do_mem_access () = - to_annot.mem_access && not (Generator.Mem_access.is_computed kf) + flags.mem_access && not (Generator.Mem_access.is_computed kf) method private do_div_mod () = - to_annot.div_mod && not (Generator.Div_mod.is_computed kf) + flags.div_mod && not (Generator.Div_mod.is_computed kf) method private do_shift () = - to_annot.shift && not (Generator.Shift.is_computed kf) + flags.shift && not (Generator.Shift.is_computed kf) method private do_left_shift_negative () = - to_annot.left_shift_negative + flags.left_shift_negative && not (Generator.Left_shift_negative.is_computed kf) method private do_right_shift_negative () = - to_annot.right_shift_negative + flags.right_shift_negative && not (Generator.Right_shift_negative.is_computed kf) method private do_signed_overflow () = - to_annot.signed_overflow && not (Generator.Signed_overflow.is_computed kf) + flags.signed_overflow && not (Generator.Signed_overflow.is_computed kf) method private do_unsigned_overflow () = - to_annot.unsigned_overflow && not (Generator.Unsigned_overflow.is_computed kf) + flags.unsigned_overflow && not (Generator.Unsigned_overflow.is_computed kf) method private do_signed_downcast () = - to_annot.signed_downcast && not (Generator.Signed_downcast.is_computed kf) + flags.signed_downcast && not (Generator.Signed_downcast.is_computed kf) method private do_unsigned_downcast () = - to_annot.unsigned_downcast && + flags.unsigned_downcast && not (Generator.Unsigned_downcast.is_computed kf) method private do_float_to_int () = - to_annot.float_to_int && not (Generator.Float_to_int.is_computed kf) + flags.float_to_int && not (Generator.Float_to_int.is_computed kf) method private do_finite_float () = - to_annot.finite_float && not (Generator.Finite_float.is_computed kf) + flags.finite_float && not (Generator.Finite_float.is_computed kf) method private do_pointer_call () = - to_annot.pointer_call && not (Generator.Pointer_call.is_computed kf) + flags.pointer_call && not (Generator.Pointer_call.is_computed kf) method private do_bool_value () = - to_annot.bool_value && not (Generator.Bool_value.is_computed kf) + flags.bool_value && not (Generator.Bool_value.is_computed kf) method private queue_stmt_spec spec = let stmt = Extlib.the (self#current_stmt) in @@ -208,7 +225,7 @@ class annot_visitor kf to_annot on_alarm = object (self) method private generate_assertion: 'a. 'a Rte.alarm_gen -> 'a -> unit = fun fgen -> let on_alarm ?status a = on_alarm self#current_kinstr ?status a in - fgen ~remove_trivial:to_annot.remove_trivial ~on_alarm + fgen ~remove_trivial:flags.remove_trivial ~on_alarm method! vstmt s = match s.skind with | UnspecifiedSequence l -> @@ -447,51 +464,35 @@ let rte_annotations stmt = (** {2 Iterate over Alarms on Cil elements} *) -type 'a generator = - ?remove_trivial:bool -> - ?initialized:Options.DoInitialized.t -> - ?mem_access:Options.DoMemAccess.t -> - ?div_mod:Options.DoDivMod.t -> - ?shift:Options.DoShift.t -> - ?left_shift_negative:Kernel.LeftShiftNegative.t -> - ?right_shift_negative:Kernel.RightShiftNegative.t -> - ?signed_overflow:Kernel.SignedOverflow.t -> - ?unsigned_overflow:Kernel.UnsignedOverflow.t -> - ?signed_downcast:Kernel.SignedDowncast.t -> - ?unsigned_downcast:Kernel.UnsignedDowncast.t -> - ?float_to_int:Options.DoFloatToInt.t -> - ?finite_float:bool -> - ?pointer_call:Options.DoPointerCall.t -> - ?bool_value:Kernel.InvalidBool.t -> - (Cil_types.kinstr -> - ?status:Property_status.emitted_status -> Alarms.alarm -> unit) -> - Kernel_function.t -> - Cil_types.stmt -> - 'a -> unit +type on_alarm = + kinstr -> ?status:Property_status.emitted_status -> + Alarms.alarm -> unit -let iter_alarms visit to_annot on_alarm kf stmt element = +let iter_alarms visit ?flags (on_alarm:on_alarm) kf stmt element = + let flags = match flags with + | None -> default () + | Some opt -> opt in let visitor = object (self) - inherit annot_visitor kf to_annot on_alarm + inherit annot_visitor kf flags on_alarm initializer self#push_stmt stmt end in ignore (visit (visitor :> Cil.cilVisitor) element) -let iter_lval : lval generator = - annotate_from_options (iter_alarms Cil.visitCilLval) - -let iter_exp : exp generator = - annotate_from_options (iter_alarms Cil.visitCilExpr) - -let iter_instr : instr generator = - annotate_from_options (iter_alarms Cil.visitCilInstr) +type 'a iterator = + ?flags:flags -> on_alarm -> + Kernel_function.t -> + Cil_types.stmt -> + 'a -> unit -let iter_stmt : stmt generator = - annotate_from_options (iter_alarms Cil.visitCilStmt) +let iter_lval : lval iterator = iter_alarms Cil.visitCilLval +let iter_exp : exp iterator = iter_alarms Cil.visitCilExpr +let iter_instr : instr iterator = iter_alarms Cil.visitCilInstr +let iter_stmt : stmt iterator = iter_alarms Cil.visitCilStmt (** {2 List of all RTEs on a given Cil object} *) let get_annotations from kf stmt x = - let to_annot = annotate_from_options (fun flags () -> flags) () in + let flags = default () in (* Accumulator containing all the code_annots corresponding to an alarm emitted so far. *) let code_annots = ref [] in @@ -500,7 +501,7 @@ let get_annotations from kf stmt x = code_annots := ca :: !code_annots; in let o = object (self) - inherit annot_visitor kf to_annot on_alarm + inherit annot_visitor kf flags on_alarm initializer self#push_stmt stmt end in ignore (from (o :> Cil.cilVisitor) x); @@ -514,8 +515,8 @@ let do_exp_annotations = get_annotations Cil.visitCilExpr (** {2 Annotations of kernel_functions for a given type of RTE} *) -(* generates annotation for function kf on the basis of [to_annot] *) -let annotate_kf_aux to_annot kf = +(* generates annotation for function kf on the basis of [flags] *) +let annotate_kf_aux flags kf = Options.debug "annotating function %a" Kernel_function.pretty kf; match kf.fundec with | Declaration _ -> () @@ -535,19 +536,19 @@ let annotate_kf_aux to_annot kf = (* Strict version of ||, because [comp] has side-effects *) let (|||) a b = a || b in let open Generator in - if comp Initialized.accessor to_annot.initialized ||| - comp Mem_access.accessor to_annot.mem_access ||| - comp Pointer_call.accessor to_annot.pointer_call ||| - comp Div_mod.accessor to_annot.div_mod ||| - comp Shift.accessor to_annot.shift ||| - comp Left_shift_negative.accessor to_annot.left_shift_negative ||| - comp Right_shift_negative.accessor to_annot.right_shift_negative ||| - comp Signed_overflow.accessor to_annot.signed_overflow ||| - comp Signed_downcast.accessor to_annot.signed_downcast ||| - comp Unsigned_overflow.accessor to_annot.unsigned_overflow ||| - comp Unsigned_downcast.accessor to_annot.unsigned_downcast ||| - comp Float_to_int.accessor to_annot.float_to_int ||| - comp Finite_float.accessor to_annot.finite_float + if comp Initialized.accessor flags.initialized ||| + comp Mem_access.accessor flags.mem_access ||| + comp Pointer_call.accessor flags.pointer_call ||| + comp Div_mod.accessor flags.div_mod ||| + comp Shift.accessor flags.shift ||| + comp Left_shift_negative.accessor flags.left_shift_negative ||| + comp Right_shift_negative.accessor flags.right_shift_negative ||| + comp Signed_overflow.accessor flags.signed_overflow ||| + comp Signed_downcast.accessor flags.signed_downcast ||| + comp Unsigned_overflow.accessor flags.unsigned_overflow ||| + comp Unsigned_downcast.accessor flags.unsigned_downcast ||| + comp Float_to_int.accessor flags.float_to_int ||| + comp Finite_float.accessor flags.finite_float then begin Options.feedback "annotating function %a" Kernel_function.pretty kf; let warn = Options.Warn.get () in @@ -559,35 +560,35 @@ let annotate_kf_aux to_annot kf = Printer.pp_code_annotation ca | _ -> () in - let vis = new annot_visitor kf to_annot on_alarm in + let vis = new annot_visitor kf flags on_alarm in let nkf = Visitor.visitFramacFunction vis f in assert(nkf == f); List.iter (fun f -> f ()) !to_update; end (* generates annotation for function kf on the basis of command-line options *) -let annotate_kf kf = annotate_from_options annotate_kf_aux kf +let annotate_kf kf = annotate_kf_aux (default ()) kf (* annotate for all rte + unsigned overflows (which are not rte), for a given function *) let do_all_rte kf = - let to_annot = - { annotate_all with + let flags = + { flags_all with signed_downcast = false; unsigned_downcast = false; } in - annotate_kf_aux to_annot kf + annotate_kf_aux flags kf (* annotate for rte only (not unsigned overflows and downcasts) for a given function *) let do_rte kf = - let to_annot = - { annotate_all with + let flags = + { flags_all with unsigned_overflow = false; signed_downcast = false; unsigned_downcast = false; } in - annotate_kf_aux to_annot kf + annotate_kf_aux flags kf let compute () = (* compute RTE annotations, whether Enabled is set or not *) diff --git a/src/plugins/rte/visit.mli b/src/plugins/rte/visit.mli index 4dc723cc58c..3aab4626ecf 100644 --- a/src/plugins/rte/visit.mli +++ b/src/plugins/rte/visit.mli @@ -22,46 +22,81 @@ open Cil_types -(** Low-level iterator +(** Low-level control over iterators *) - [generator ~options:... on_alarm kf stmt element] iterates over - potential alarms for Cil element, located in the given - kernel_function and stmt. +type flags = { + remove_trivial: bool; + initialized: bool; + mem_access: bool; + div_mod: bool; + shift: bool; + left_shift_negative: bool; + right_shift_negative: bool; + signed_overflow: bool; + unsigned_overflow: bool; + signed_downcast: bool; + unsigned_downcast: bool; + float_to_int: bool; + finite_float: bool; + pointer_call: bool; + bool_value: bool; +} + +(** Defaults are taken from the Kernel and RTE plug-in options *) +val default : + ?remove_trivial:bool -> + ?initialized:bool -> + ?mem_access:bool -> + ?div_mod:bool -> + ?shift:bool -> + ?left_shift_negative:bool -> + ?right_shift_negative:bool -> + ?signed_overflow:bool -> + ?unsigned_overflow:bool -> + ?signed_downcast:bool -> + ?unsigned_downcast:bool -> + ?float_to_int:bool -> + ?finite_float:bool -> + ?pointer_call:bool -> + ?bool_value:bool -> + unit -> flags + +(** All flags set to [true] *) +val flags_all : flags + +(** All flags set to [false] *) +val flags_none : flags + +(** Low-level iterators callback. + + The [on_alarm stmt ?status alarm] callback is invoked with + the [stmt] originating the alarm and the already known status, + if any. +*) +type on_alarm = + kinstr -> ?status:Property_status.emitted_status -> + Alarms.alarm -> unit + +(** Low-level iterators The [on_alarm ki ?status alarm] callback is invoked with the k-instruction originating the alarm and the already known status, if any. - Potential alarms can be specified by the provided options, - with defaults generated from the Kernel options and the RTE plug-in - options. + Potential alarms can be specified by the provided flags, + with defaults from the Kernel and RTE plug-in options. *) -type 'a generator = - ?remove_trivial:bool -> - ?initialized:Options.DoInitialized.t -> - ?mem_access:Options.DoMemAccess.t -> - ?div_mod:Options.DoDivMod.t -> - ?shift:Options.DoShift.t -> - ?left_shift_negative:Kernel.LeftShiftNegative.t -> - ?right_shift_negative:Kernel.RightShiftNegative.t -> - ?signed_overflow:Kernel.SignedOverflow.t -> - ?unsigned_overflow:Kernel.UnsignedOverflow.t -> - ?signed_downcast:Kernel.SignedDowncast.t -> - ?unsigned_downcast:Kernel.UnsignedDowncast.t -> - ?float_to_int:Options.DoFloatToInt.t -> - ?finite_float:bool -> - ?pointer_call:Options.DoPointerCall.t -> - ?bool_value:Kernel.InvalidBool.t -> - (Cil_types.kinstr -> - ?status:Property_status.emitted_status -> Alarms.alarm -> unit) -> + +type 'a iterator = + ?flags:flags -> on_alarm -> Kernel_function.t -> Cil_types.stmt -> 'a -> unit -val iter_lval : lval generator -val iter_exp : exp generator -val iter_instr : instr generator -val iter_stmt : stmt generator +val iter_lval : lval iterator +val iter_exp : exp iterator +val iter_instr : instr iterator +val iter_stmt : stmt iterator (** Generates RTE for a single function. Uses the status of the various RTE options do decide which kinds of annotations must be generated. -- GitLab From ba17b25f122ed8dda6471597638d5a9b37140d8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Tue, 3 Apr 2018 16:33:25 +0200 Subject: [PATCH 006/376] =?UTF-8?q?[WP]=20automatically=20filter=20propert?= =?UTF-8?q?ies=20with=20name=20=E2=80=98no=5Fwp:=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/wp/Changelog | 3 +- src/plugins/wp/doc/manual/wp_plugin.tex | 3 ++ src/plugins/wp/tests/wp_plugin/nowp.c | 7 +++ .../wp/tests/wp_plugin/nowp.c.0.report.json | 1 + .../wp/tests/wp_plugin/oracle/nowp.res.oracle | 6 +++ .../wp_plugin/oracle_qualif/nowp.res.oracle | 9 ++++ src/plugins/wp/wpAnnot.ml | 2 +- src/plugins/wp/wpPropId.ml | 51 +++++++++++-------- src/plugins/wp/wpPropId.mli | 6 ++- 9 files changed, 64 insertions(+), 24 deletions(-) create mode 100644 src/plugins/wp/tests/wp_plugin/nowp.c create mode 100644 src/plugins/wp/tests/wp_plugin/nowp.c.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle/nowp.res.oracle create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/nowp.res.oracle diff --git a/src/plugins/wp/Changelog b/src/plugins/wp/Changelog index 65843136872..e949fb06f40 100644 --- a/src/plugins/wp/Changelog +++ b/src/plugins/wp/Changelog @@ -20,7 +20,8 @@ # <Prover>: prover ############################################################################### - - Wp [2019/01/28] New floating-point model + - WP [2019/02/05] Auto filter properties with name "no_wp:" + - Wp [2019/01/28] New floating-point model - WP [2018/02/16] Filter out some variables from separation - TIP [2018/02/15] Extend bitwise-eq auto-strategy on hypotheses - TIP [2018/02/15] Fix wrong reconciliation of sub-scripts during replay diff --git a/src/plugins/wp/doc/manual/wp_plugin.tex b/src/plugins/wp/doc/manual/wp_plugin.tex index 86bdae51f57..ab349e42530 100644 --- a/src/plugins/wp/doc/manual/wp_plugin.tex +++ b/src/plugins/wp/doc/manual/wp_plugin.tex @@ -762,6 +762,9 @@ interface of the programmatic API. Properties can be prefixed with a minus sign to \emph{skip} the associated annotations. For example \texttt{-wp-prop="-@assigns"} removes all \texttt{assigns} and \texttt{loop assigns} properties from the selection. + \\ + \textbf{Remark:} properties with name \verb+no_wp:+ are always and automatically + filtered and never proved by WP. \item [\tt -wp-(no)-status-all] includes in the goal selection all properties regardless of their current status (default is: \texttt{no}). \item [\tt -wp-(no)-status-valid] includes in the goal selection those properties diff --git a/src/plugins/wp/tests/wp_plugin/nowp.c b/src/plugins/wp/tests/wp_plugin/nowp.c new file mode 100644 index 00000000000..c79a19034c7 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/nowp.c @@ -0,0 +1,7 @@ + +int main(int a) { + int b; + if (a) b = 42 + a; + //@ assert no_wp: \initialized(&b); + return b; +} diff --git a/src/plugins/wp/tests/wp_plugin/nowp.c.0.report.json b/src/plugins/wp/tests/wp_plugin/nowp.c.0.report.json new file mode 100644 index 00000000000..19765bd501b --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/nowp.c.0.report.json @@ -0,0 +1 @@ +null diff --git a/src/plugins/wp/tests/wp_plugin/oracle/nowp.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/nowp.res.oracle new file mode 100644 index 00000000000..134cf5cfbb8 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle/nowp.res.oracle @@ -0,0 +1,6 @@ +# frama-c -wp [...] +[kernel] Parsing tests/wp_plugin/nowp.c (with preprocessing) +[wp] Running WP plugin... +[wp] Loading driver 'share/wp.driver' +[wp] Warning: Missing RTE guards +[wp] No proof obligations diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/nowp.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/nowp.res.oracle new file mode 100644 index 00000000000..a36ba397028 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/nowp.res.oracle @@ -0,0 +1,9 @@ +# frama-c -wp -wp-timeout 90 -wp-steps 1500 [...] +[kernel] Parsing tests/wp_plugin/nowp.c (with preprocessing) +[wp] Running WP plugin... +[wp] Loading driver 'share/wp.driver' +[wp] Warning: Missing RTE guards +[wp] 0 goal scheduled +[wp] Proved goals: 0 / 0 +[wp] Report 'tests/wp_plugin/nowp.c.0.report.json' +------------------------------------------------------------- diff --git a/src/plugins/wp/wpAnnot.ml b/src/plugins/wp/wpAnnot.ml index cffa1268c68..b3e9f7e76b9 100644 --- a/src/plugins/wp/wpAnnot.ml +++ b/src/plugins/wp/wpAnnot.ml @@ -325,10 +325,10 @@ let filter_configstatus config pid = let filter_asked config pid = match config.asked_prop with - | AllProps -> true | IdProp idp -> Property.equal (WpPropId.property_of_id pid) idp | CallPre (s_call, asked_pre) -> WpPropId.select_call_pre s_call asked_pre pid | NamedProp names -> WpPropId.select_by_name names pid + | AllProps -> WpPropId.select_default pid let rec filter config pid = function | [] -> None diff --git a/src/plugins/wp/wpPropId.ml b/src/plugins/wp/wpPropId.ml index 7ee846ce041..43fc36f5e26 100644 --- a/src/plugins/wp/wpPropId.ml +++ b/src/plugins/wp/wpPropId.ml @@ -693,29 +693,38 @@ let is_loop_preservation p = end | _ -> None -let select_by_name asked_names pid = +let user_prop_pid pid = let p_prop = match pid.p_kind with | PKPre (_,_,p_prop) -> p_prop - | _ -> property_of_id pid - in - let names = user_prop_names p_prop in - let is_minus s = try s.[0] = '-' with _ -> false in - let is_plus s = try s.[0] = '+' with _ -> false in - let remove_first s = String.sub s 1 ((String.length s) -1) in - let eval acc asked = - let is_minus,a = match acc with - | None -> if is_minus asked then true,true else false,false - | Some a -> (is_minus asked),a - in let eval () = - let asked = if is_minus || (is_plus asked) then remove_first asked else asked - in List.mem asked names - in Some (if is_minus - then a && (not (eval ())) - else a || (eval ())) - in - match List.fold_left eval None asked_names with - | Some false -> false - | _ -> true + | _ -> property_of_id pid in + user_prop_names p_prop + +let select_default pid = + let names = user_prop_pid pid in + not (List.mem "no_wp" names) + +let select_by_name asked_names pid = + let names = user_prop_pid pid in + if List.mem "no_wp" names then false + else + let is_minus s = try s.[0] = '-' with _ -> false in + let is_plus s = try s.[0] = '+' with _ -> false in + let remove_first s = String.sub s 1 ((String.length s) -1) in + let eval acc asked = + let is_minus,a = match acc with + | None -> if is_minus asked then true,true else false,false + | Some a -> (is_minus asked),a + in let eval () = + let asked = if is_minus || (is_plus asked) + then remove_first asked else asked + in List.mem asked names + in Some (if is_minus + then a && (not (eval ())) + else a || (eval ())) + in + match List.fold_left eval None asked_names with + | Some false -> false + | _ -> true let select_call_pre s_call asked_pre pid = match pid.p_kind with diff --git a/src/plugins/wp/wpPropId.mli b/src/plugins/wp/wpPropId.mli index 16b42ff8adc..5b143da7426 100644 --- a/src/plugins/wp/wpPropId.mli +++ b/src/plugins/wp/wpPropId.mli @@ -54,8 +54,12 @@ val is_assigns : prop_id -> bool val is_requires : Property.t -> bool val is_loop_preservation : prop_id -> stmt option +(** test if the prop_id does not have a [no_wp:] in its name(s). *) +val select_default : prop_id -> bool + (** test if the prop_id has to be selected for the asked name. - * Also returns a debug message to explain then answer. *) + Also returns a debug message to explain then answer. Includes + a test for [no_wp:]. *) val select_by_name : string list -> prop_id -> bool (** test if the prop_id has to be selected when we want to select the call -- GitLab From c097780d37209bebc63f59a470dcf926d1261e86 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Fri, 11 Jan 2019 16:18:11 +0100 Subject: [PATCH 007/376] [Libc] add specs for several functions --- share/libc/__fc_machdep.h | 1 + share/libc/__fc_machdep_linux_shared.h | 1 + share/libc/limits.h | 3 + share/libc/pwd.h | 26 ++-- share/libc/string.h | 23 ++++ share/libc/unistd.h | 38 +++++- .../tests/erroneous/oracle/exec.res.oracle | 6 +- .../tests/known/oracle/exec.res.oracle | 6 +- .../oracle/exec_failed_requirement.res.oracle | 6 +- tests/builtins/oracle/memcpy.res.oracle | 92 +++++++++----- tests/libc/oracle/coverage.res.oracle | 2 +- tests/libc/oracle/fc_libc.0.res.oracle | 117 +++++++++--------- tests/libc/oracle/fc_libc.1.res.oracle | 85 ++++++++++++- tests/libc/oracle/netdb_c.res.oracle | 1 + tests/libc/oracle/pwd_h.res.oracle | 24 ++-- tests/libc/oracle/string_c.res.oracle | 8 +- tests/libc/oracle/string_c_generic.res.oracle | 4 +- tests/libc/oracle/string_h.res.oracle | 35 ++++++ tests/libc/oracle/unistd_h.0.res.oracle | 34 +++++ tests/libc/oracle/unistd_h.1.res.oracle | 34 +++++ tests/libc/pwd_h.c | 8 ++ tests/libc/string_h.c | 6 + tests/libc/unistd_h.c | 5 + 23 files changed, 437 insertions(+), 128 deletions(-) diff --git a/share/libc/__fc_machdep.h b/share/libc/__fc_machdep.h index 34752edcb40..f6f2d7e9a6d 100644 --- a/share/libc/__fc_machdep.h +++ b/share/libc/__fc_machdep.h @@ -447,6 +447,7 @@ /* Note: MSVC does not define this constant, but because it is used in an ACSL specification, it is safer to define it anyway. */ #define __FC_HOST_NAME_MAX 255 +#define __FC_TTY_NAME_MAX 32 /* Optional */ #define __INT8_T signed char diff --git a/share/libc/__fc_machdep_linux_shared.h b/share/libc/__fc_machdep_linux_shared.h index 0b0760b19e3..ebe92fc6617 100644 --- a/share/libc/__fc_machdep_linux_shared.h +++ b/share/libc/__fc_machdep_linux_shared.h @@ -102,6 +102,7 @@ #define __FC_PATH_MAX 256 // Note: POSIX requires HOST_NAME_MAX >= 255, but Linux uses 64 #define __FC_HOST_NAME_MAX 64 +#define __FC_TTY_NAME_MAX 32 /* for stdarg.h */ #define __FC_VA_LIST_T __builtin_va_list diff --git a/share/libc/limits.h b/share/libc/limits.h index 703571925dc..d42a1f75a55 100644 --- a/share/libc/limits.h +++ b/share/libc/limits.h @@ -85,6 +85,9 @@ Note: Mac OS does not define this constant. */ #define HOST_NAME_MAX __FC_HOST_NAME_MAX +/* Maximum length of a terminal device name. */ +#define TTY_NAME_MAX __FC_TTY_NAME_MAX + /* Maximum length of argument to the exec functions including environment data. Minimum Acceptable Value: {_POSIX_ARG_MAX} (4096 in POSIX.1-2008) "... the total space used to store the environment and the arguments to the diff --git a/share/libc/pwd.h b/share/libc/pwd.h index 17cca2f73e4..c93e3126bec 100644 --- a/share/libc/pwd.h +++ b/share/libc/pwd.h @@ -26,6 +26,7 @@ __PUSH_FC_STDLIB #include "__fc_define_uid_and_gid.h" +#include "__fc_string_axiomatic.h" // for size_t #include "stddef.h" @@ -37,6 +38,7 @@ struct passwd { char *pw_passwd; // not POSIX, but allowed by it, and present in glibc uid_t pw_uid; gid_t pw_gid; + char *pw_gecos; // not POSIX, but present in most implementations char *pw_dir; char *pw_shell; }; @@ -48,7 +50,7 @@ extern gid_t __fc_getpwuid_pw_gid; extern char __fc_getpwuid_pw_dir[64]; extern char __fc_getpwuid_pw_shell[64]; -struct passwd __fc_getpwuid = +struct passwd __fc_pwd = {.pw_name = __fc_getpwuid_pw_name, .pw_passwd = __fc_getpwuid_pw_passwd, .pw_uid = __fc_getpwuid_pw_uid, @@ -56,16 +58,24 @@ struct passwd __fc_getpwuid = .pw_dir = __fc_getpwuid_pw_dir, .pw_shell = __fc_getpwuid_pw_shell}; -struct passwd *__fc_p_getpwuid = & __fc_getpwuid; +struct passwd *__fc_p_pwd = & __fc_pwd; +/*@ + // missing: may assign to errno: EIO, EINTR, EMFILE, ENFILE + // missing: assigns \result, __fc_pwd[0..] \from 'password database' + requires valid_name: valid_read_string(name); + assigns \result \from __fc_p_pwd, indirect:name[0..]; + assigns __fc_pwd \from indirect:name[0..]; + ensures result_null_or_internal_struct: + \result == \null || \result == __fc_p_pwd; +*/ +extern struct passwd *getpwnam(const char *name); -extern struct passwd *getpwnam(const char *); - -/*@ // missing: assigns \result, __fc_getpwuid[0..] \from 'password database' - assigns \result \from __fc_p_getpwuid, indirect:uid; - assigns __fc_getpwuid \from indirect:uid; +/*@ // missing: assigns \result, __fc_pwd[0..] \from 'password database' + assigns \result \from __fc_p_pwd, indirect:uid; + assigns __fc_pwd \from indirect:uid; ensures result_null_or_internal_struct: - \result == \null || \result == __fc_p_getpwuid; + \result == \null || \result == __fc_p_pwd; */ extern struct passwd *getpwuid(uid_t uid); diff --git a/share/libc/string.h b/share/libc/string.h index f810f9a8067..b9e46ee597e 100644 --- a/share/libc/string.h +++ b/share/libc/string.h @@ -374,6 +374,18 @@ extern char *strcpy(char *restrict dest, const char *restrict src); extern char *strncpy(char *restrict dest, const char *restrict src, size_t n); +/*@ // Non-POSIX, but often present + @ requires valid_string_src: valid_read_string(src); + @ requires room_nstring: \valid(dest+(0..n-1)); + @ requires separation: + @ \separated(dest+(0..n-1), src+(0..\max(n-1,strlen(src)))); + @ assigns dest[0..n-1] \from src[0..n-1]; + @ assigns \result \from indirect:src, indirect:src[0..n-1], indirect:n; + @ ensures initialization: \initialized(dest+(0..\min(strlen(src),n-1))); + @ ensures bounded_result: \result == strlen(src); + */ +size_t strlcpy(char * restrict dest, const char * restrict src, size_t n); + // stpcpy is POSIX.1-2008 #ifdef _POSIX_C_SOURCE # if _POSIX_C_SOURCE >= 200809L @@ -429,6 +441,17 @@ extern char *strcat(char *restrict dest, const char *restrict src); @*/ extern char *strncat(char *restrict dest, const char *restrict src, size_t n); +/*@ // Non-POSIX, but often present + @ // missing: separation + @ requires valid_string_src: valid_read_string(src); + @ requires valid_string_dest: valid_string(dest); + @ requires room_nstring: \valid(dest+(0..n-1)); + @ assigns dest[strlen(dest)..n] \from indirect:n, src[0..strlen(src)]; + @ assigns \result \from indirect:src, indirect:src[0..n-1], indirect:n; + @ ensures bounded_result: \result == strlen(dest) + strlen(src); + @*/ +extern size_t strlcat(char *restrict dest, const char *restrict src, size_t n); + /*@ // missing: separation @ requires valid_dest: \valid(dest+(0..n - 1)); @ requires valid_string_src: valid_read_string(src); diff --git a/share/libc/unistd.h b/share/libc/unistd.h index 7edb5316c3e..d3e906a43b3 100644 --- a/share/libc/unistd.h +++ b/share/libc/unistd.h @@ -747,7 +747,18 @@ extern unsigned int alarm(unsigned int); extern int brk(void *); extern int chdir(const char *path); extern int chroot(const char *path); -extern int chown(const char *, uid_t, gid_t); + + +/*@ // missing: may assign to errno: EACCES, ELOOP, ENAMETOOLONG, ENOENT, + // ENOTDIR, EROFS, EIO, EINTR, EINVAL + // missing: assigns \result \from 'filesystem, permissions' + // missing: assigns 'file permissions' \from owner, group; + requires valid_string_path: valid_read_string(path); + assigns \result \from indirect:path, indirect:path[0..], indirect:owner, + indirect:group; + ensures result_ok_or_error: \result == 0 || \result == -1; +*/ +extern int chown(const char *path, uid_t owner, gid_t group); /*@ requires valid_fd: 0 <= fd < __FC_MAX_OPEN_FILES; @@ -812,7 +823,12 @@ extern int execve(const char *path, char *const argv[], char *const env */ extern int execvp(const char *path, char *const argv[]); +/*@ + assigns \nothing; + ensures never_terminates: \false; +*/ extern void _exit(int) __attribute__ ((__noreturn__)); + extern int fchown(int, uid_t, gid_t); extern int fchdir(int); extern int fdatasync(int); @@ -908,7 +924,13 @@ extern pid_t getsid(pid_t); extern uid_t getuid(void); extern char *getwd(char *); -extern int isatty(int); + +/*@ //missing: may assign to errno: EBADF, ENOTTY (POSIX) / EINVAL (Linux) + assigns \result \from indirect:fd, indirect:__fc_fds[fd]; + ensures result_true_or_false: \result == 0 || \result == 1; + */ +extern int isatty(int fd); + extern int lchown(const char *, uid_t, gid_t); extern int link(const char *, const char *); extern int lockf(int, int, off_t); @@ -1028,7 +1050,17 @@ extern long int sysconf(int name); extern pid_t tcgetpgrp(int); extern int tcsetpgrp(int, pid_t); extern int truncate(const char *, off_t); -extern char *ttyname(int); + +extern volatile char __fc_ttyname[TTY_NAME_MAX]; +extern char *__fc_p_ttyname = __fc_ttyname; + +/*@ + // missing: may assign to errno: EBADF, ENOTTY + assigns \result \from __fc_p_ttyname, indirect:fildes; + ensures result_name_or_null: \result == __fc_p_ttyname || \result == \null; + */ +extern char *ttyname(int fildes); + extern int ttyname_r(int, char *, size_t); extern useconds_t ualarm(useconds_t, useconds_t); extern int unlink(const char *); diff --git a/src/plugins/variadic/tests/erroneous/oracle/exec.res.oracle b/src/plugins/variadic/tests/erroneous/oracle/exec.res.oracle index e97d595d452..7e86be9c572 100644 --- a/src/plugins/variadic/tests/erroneous/oracle/exec.res.oracle +++ b/src/plugins/variadic/tests/erroneous/oracle/exec.res.oracle @@ -1,8 +1,8 @@ -[variadic] FRAMAC_SHARE/libc/unistd.h:784: +[variadic] FRAMAC_SHARE/libc/unistd.h:795: Declaration of variadic function execl. -[variadic] FRAMAC_SHARE/libc/unistd.h:789: +[variadic] FRAMAC_SHARE/libc/unistd.h:800: Declaration of variadic function execle. -[variadic] FRAMAC_SHARE/libc/unistd.h:794: +[variadic] FRAMAC_SHARE/libc/unistd.h:805: Declaration of variadic function execlp. [variadic] tests/erroneous/exec.c:5: Warning: Incorrect type for argument 3. The argument will be cast from int to char *. diff --git a/src/plugins/variadic/tests/known/oracle/exec.res.oracle b/src/plugins/variadic/tests/known/oracle/exec.res.oracle index d71aa38a8b7..1b512fc679b 100644 --- a/src/plugins/variadic/tests/known/oracle/exec.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/exec.res.oracle @@ -1,8 +1,8 @@ -[variadic] FRAMAC_SHARE/libc/unistd.h:784: +[variadic] FRAMAC_SHARE/libc/unistd.h:795: Declaration of variadic function execl. -[variadic] FRAMAC_SHARE/libc/unistd.h:789: +[variadic] FRAMAC_SHARE/libc/unistd.h:800: Declaration of variadic function execle. -[variadic] FRAMAC_SHARE/libc/unistd.h:794: +[variadic] FRAMAC_SHARE/libc/unistd.h:805: Declaration of variadic function execlp. [variadic] tests/known/exec.c:9: Translating call to execle to a call to execve. [variadic] tests/known/exec.c:11: Warning: diff --git a/src/plugins/variadic/tests/known/oracle/exec_failed_requirement.res.oracle b/src/plugins/variadic/tests/known/oracle/exec_failed_requirement.res.oracle index 089a6c792a3..3bdfda3fde9 100644 --- a/src/plugins/variadic/tests/known/oracle/exec_failed_requirement.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/exec_failed_requirement.res.oracle @@ -1,8 +1,8 @@ -[variadic] FRAMAC_SHARE/libc/unistd.h:784: +[variadic] FRAMAC_SHARE/libc/unistd.h:795: Declaration of variadic function execl. -[variadic] FRAMAC_SHARE/libc/unistd.h:789: +[variadic] FRAMAC_SHARE/libc/unistd.h:800: Declaration of variadic function execle. -[variadic] FRAMAC_SHARE/libc/unistd.h:794: +[variadic] FRAMAC_SHARE/libc/unistd.h:805: Declaration of variadic function execlp. [variadic] tests/known/exec_failed_requirement.c:7: Translating call to execl to a call to execv. diff --git a/tests/builtins/oracle/memcpy.res.oracle b/tests/builtins/oracle/memcpy.res.oracle index 056a7d23f93..34325075722 100644 --- a/tests/builtins/oracle/memcpy.res.oracle +++ b/tests/builtins/oracle/memcpy.res.oracle @@ -1547,6 +1547,23 @@ [ Valid ] Behavior 'partial' by Frama-C kernel. +-------------------------------------------------------------------------------- +--- Properties of Function 'strlcpy' +-------------------------------------------------------------------------------- + +[ Extern ] Post-condition 'initialization' + Unverifiable but considered Valid. +[ Extern ] Post-condition 'bounded_result' + Unverifiable but considered Valid. +[ Extern ] Assigns (file share/libc/string.h, line 382) + Unverifiable but considered Valid. +[ Extern ] Froms (file share/libc/string.h, line 382) + Unverifiable but considered Valid. +[ Extern ] Froms (file share/libc/string.h, line 383) + Unverifiable but considered Valid. +[ Valid ] Default behavior + by Frama-C kernel. + -------------------------------------------------------------------------------- --- Properties of Function 'strcat' -------------------------------------------------------------------------------- @@ -1559,11 +1576,11 @@ Unverifiable but considered Valid. [ Extern ] Post-condition 'result_ptr' Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/string.h, line 397) +[ Extern ] Assigns (file share/libc/string.h, line 409) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 397) +[ Extern ] Froms (file share/libc/string.h, line 409) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 400) +[ Extern ] Froms (file share/libc/string.h, line 412) Unverifiable but considered Valid. [ Valid ] Default behavior by Frama-C kernel. @@ -1578,23 +1595,23 @@ Unverifiable but considered Valid. [ Extern ] Post-condition for 'partial' 'sum_of_bounded_lengths' Unverifiable but considered Valid. -[ Extern ] Assigns for 'complete' (file share/libc/string.h, line 417) +[ Extern ] Assigns for 'complete' (file share/libc/string.h, line 429) Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/string.h, line 411) +[ Extern ] Assigns (file share/libc/string.h, line 423) Unverifiable but considered Valid. -[ Extern ] Assigns for 'partial' (file share/libc/string.h, line 425) +[ Extern ] Assigns for 'partial' (file share/libc/string.h, line 437) Unverifiable but considered Valid. -[ Extern ] Froms for 'complete' (file share/libc/string.h, line 417) +[ Extern ] Froms for 'complete' (file share/libc/string.h, line 429) Unverifiable but considered Valid. -[ Extern ] Froms for 'complete' (file share/libc/string.h, line 419) +[ Extern ] Froms for 'complete' (file share/libc/string.h, line 431) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 411) +[ Extern ] Froms (file share/libc/string.h, line 423) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 412) +[ Extern ] Froms (file share/libc/string.h, line 424) Unverifiable but considered Valid. -[ Extern ] Froms for 'partial' (file share/libc/string.h, line 425) +[ Extern ] Froms for 'partial' (file share/libc/string.h, line 437) Unverifiable but considered Valid. -[ Extern ] Froms for 'partial' (file share/libc/string.h, line 427) +[ Extern ] Froms for 'partial' (file share/libc/string.h, line 439) Unverifiable but considered Valid. [ Valid ] Behavior 'complete' by Frama-C kernel. @@ -1603,15 +1620,30 @@ [ Valid ] Behavior 'partial' by Frama-C kernel. +-------------------------------------------------------------------------------- +--- Properties of Function 'strlcat' +-------------------------------------------------------------------------------- + +[ Extern ] Post-condition 'bounded_result' + Unverifiable but considered Valid. +[ Extern ] Assigns (file share/libc/string.h, line 449) + Unverifiable but considered Valid. +[ Extern ] Froms (file share/libc/string.h, line 449) + Unverifiable but considered Valid. +[ Extern ] Froms (file share/libc/string.h, line 450) + Unverifiable but considered Valid. +[ Valid ] Default behavior + by Frama-C kernel. + -------------------------------------------------------------------------------- --- Properties of Function 'strxfrm' -------------------------------------------------------------------------------- -[ Extern ] Assigns (file share/libc/string.h, line 435) +[ Extern ] Assigns (file share/libc/string.h, line 458) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 435) +[ Extern ] Froms (file share/libc/string.h, line 458) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 436) +[ Extern ] Froms (file share/libc/string.h, line 459) Unverifiable but considered Valid. [ Valid ] Default behavior by Frama-C kernel. @@ -1626,19 +1658,19 @@ Unverifiable but considered Valid. [ Extern ] Post-condition for 'no_allocation' 'result_null' Unverifiable but considered Valid. -[ Extern ] Assigns for 'allocation' (file share/libc/string.h, line 447) +[ Extern ] Assigns for 'allocation' (file share/libc/string.h, line 470) Unverifiable but considered Valid. [ Extern ] Assigns nothing Unverifiable but considered Valid. [ Extern ] Assigns for 'no_allocation' nothing Unverifiable but considered Valid. -[ Extern ] Froms for 'allocation' (file share/libc/string.h, line 447) +[ Extern ] Froms for 'allocation' (file share/libc/string.h, line 470) Unverifiable but considered Valid. -[ Extern ] Froms for 'allocation' (file share/libc/string.h, line 448) +[ Extern ] Froms for 'allocation' (file share/libc/string.h, line 471) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 444) +[ Extern ] Froms (file share/libc/string.h, line 467) Unverifiable but considered Valid. -[ Extern ] Froms for 'no_allocation' (file share/libc/string.h, line 454) +[ Extern ] Froms for 'no_allocation' (file share/libc/string.h, line 477) Unverifiable but considered Valid. [ Valid ] Behavior 'allocation' by Frama-C kernel. @@ -1646,7 +1678,7 @@ by Frama-C kernel. [ Valid ] Behavior 'no_allocation' by Frama-C kernel. -[ Extern ] Frees/Allocates nothing/(file share/libc/string.h, line 443) +[ Extern ] Frees/Allocates nothing/(file share/libc/string.h, line 466) Unverifiable but considered Valid. [ Extern ] Frees/Allocates for 'no_allocation' nothing/nothing Unverifiable but considered Valid. @@ -1661,19 +1693,19 @@ Unverifiable but considered Valid. [ Extern ] Post-condition for 'no_allocation' 'result_null' Unverifiable but considered Valid. -[ Extern ] Assigns for 'allocation' (file share/libc/string.h, line 465) +[ Extern ] Assigns for 'allocation' (file share/libc/string.h, line 488) Unverifiable but considered Valid. [ Extern ] Assigns nothing Unverifiable but considered Valid. [ Extern ] Assigns for 'no_allocation' nothing Unverifiable but considered Valid. -[ Extern ] Froms for 'allocation' (file share/libc/string.h, line 465) +[ Extern ] Froms for 'allocation' (file share/libc/string.h, line 488) Unverifiable but considered Valid. -[ Extern ] Froms for 'allocation' (file share/libc/string.h, line 466) +[ Extern ] Froms for 'allocation' (file share/libc/string.h, line 489) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 461) +[ Extern ] Froms (file share/libc/string.h, line 484) Unverifiable but considered Valid. -[ Extern ] Froms for 'no_allocation' (file share/libc/string.h, line 475) +[ Extern ] Froms for 'no_allocation' (file share/libc/string.h, line 498) Unverifiable but considered Valid. [ Valid ] Behavior 'allocation' by Frama-C kernel. @@ -1681,7 +1713,7 @@ by Frama-C kernel. [ Valid ] Behavior 'no_allocation' by Frama-C kernel. -[ Extern ] Frees/Allocates nothing/(file share/libc/string.h, line 460) +[ Extern ] Frees/Allocates nothing/(file share/libc/string.h, line 483) Unverifiable but considered Valid. [ Extern ] Frees/Allocates for 'no_allocation' nothing/nothing Unverifiable but considered Valid. @@ -2134,9 +2166,9 @@ -------------------------------------------------------------------------------- --- Status Report Summary -------------------------------------------------------------------------------- - 156 Completely validated - 216 Considered valid + 158 Completely validated + 225 Considered valid 29 To be validated 4 Alarms emitted - 405 Total + 416 Total -------------------------------------------------------------------------------- diff --git a/tests/libc/oracle/coverage.res.oracle b/tests/libc/oracle/coverage.res.oracle index 6c5fe3be202..81b8f86a27e 100644 --- a/tests/libc/oracle/coverage.res.oracle +++ b/tests/libc/oracle/coverage.res.oracle @@ -28,7 +28,7 @@ main: 4 stmts out of 4 (100.0%) [metrics] Eva coverage statistics ======================= - Syntactically reachable functions = 2 (out of 76) + Syntactically reachable functions = 2 (out of 78) Semantically reached functions = 2 Coverage estimation = 100.0% [metrics] Statements analyzed by Eva diff --git a/tests/libc/oracle/fc_libc.0.res.oracle b/tests/libc/oracle/fc_libc.0.res.oracle index b48eca2cad5..32c4f831a3a 100644 --- a/tests/libc/oracle/fc_libc.0.res.oracle +++ b/tests/libc/oracle/fc_libc.0.res.oracle @@ -38,7 +38,7 @@ wcslen (2 calls); wcsncat (0 call); wcsncpy (0 call); wmemcpy (0 call); wmemset (0 call); - Undefined functions (360) + Undefined functions (367) ========================= FD_CLR (0 call); FD_ISSET (0 call); FD_SET (0 call); FD_ZERO (0 call); Frama_C_abort (1 call); Frama_C_char_interval (1 call); @@ -64,43 +64,44 @@ __va_fcntl_int (0 call); __va_fcntl_void (0 call); __va_ioctl_int (0 call); __va_ioctl_ptr (0 call); __va_ioctl_void (0 call); __va_open_mode_t (0 call); __va_open_void (0 call); - __va_openat_mode_t (0 call); __va_openat_void (0 call); abort (0 call); - accept (0 call); access (0 call); acos (0 call); acosf (0 call); - acosh (0 call); acoshf (0 call); acoshl (0 call); acosl (0 call); - alloca (0 call); asin (0 call); asinf (0 call); asinl (0 call); - at_quick_exit (0 call); atan (0 call); atan2 (0 call); atan2f (0 call); - atanf (0 call); atanl (0 call); atexit (0 call); atof (0 call); - atol (0 call); atoll (0 call); basename (0 call); bind (0 call); - bsearch (0 call); bzero (0 call); ceil (0 call); ceilf (0 call); - ceill (0 call); clearerr (0 call); clearerr_unlocked (0 call); - clock (0 call); clock_gettime (0 call); clock_nanosleep (0 call); - close (0 call); closedir (0 call); closelog (0 call); connect (0 call); - cos (0 call); cosf (0 call); cosl (0 call); creat (0 call); ctime (0 call); - difftime (0 call); dirname (0 call); div (0 call); dup (0 call); - dup2 (0 call); execl (0 call); execle (0 call); execlp (0 call); - execv (0 call); execve (0 call); execvp (0 call); exit (0 call); - exp (0 call); expf (0 call); fabsl (0 call); fclose (0 call); - fcntl (0 call); fdopen (0 call); feof (2 calls); feof_unlocked (0 call); - ferror (2 calls); ferror_unlocked (0 call); fflush (0 call); fgetc (1 call); - fgetpos (0 call); fgets (0 call); fgetws (0 call); fileno (0 call); - fileno_unlocked (0 call); flock (0 call); flockfile (0 call); - floor (0 call); floorf (0 call); floorl (0 call); fmod (0 call); - fmodf (0 call); fopen (0 call); fork (0 call); fputc (0 call); - fputs (0 call); fread (0 call); free (1 call); freeaddrinfo (0 call); - freopen (0 call); fseek (0 call); fsetpos (0 call); ftell (0 call); - ftrylockfile (0 call); funlockfile (0 call); fwrite (0 call); - gai_strerror (0 call); getc (0 call); getc_unlocked (0 call); - getchar (0 call); getchar_unlocked (0 call); getcwd (0 call); - getegid (0 call); geteuid (0 call); getgid (0 call); gethostname (0 call); - getitimer (0 call); getopt (0 call); getopt_long (0 call); - getopt_long_only (0 call); getpid (0 call); getppid (0 call); - getpriority (0 call); getpwuid (0 call); getresgid (0 call); - getresuid (0 call); getrlimit (0 call); getrusage (0 call); gets (0 call); - getsid (0 call); getsockopt (0 call); gettimeofday (0 call); - getuid (0 call); gmtime (0 call); htonl (0 call); htons (0 call); - iconv (0 call); iconv_close (0 call); iconv_open (0 call); - inet_addr (2 calls); inet_ntoa (0 call); inet_ntop (0 call); - inet_pton (0 call); isascii (0 call); kill (0 call); labs (0 call); + __va_openat_mode_t (0 call); __va_openat_void (0 call); _exit (0 call); + abort (0 call); accept (0 call); access (0 call); acos (0 call); + acosf (0 call); acosh (0 call); acoshf (0 call); acoshl (0 call); + acosl (0 call); alloca (0 call); asin (0 call); asinf (0 call); + asinl (0 call); at_quick_exit (0 call); atan (0 call); atan2 (0 call); + atan2f (0 call); atanf (0 call); atanl (0 call); atexit (0 call); + atof (0 call); atol (0 call); atoll (0 call); basename (0 call); + bind (0 call); bsearch (0 call); bzero (0 call); ceil (0 call); + ceilf (0 call); ceill (0 call); chown (0 call); clearerr (0 call); + clearerr_unlocked (0 call); clock (0 call); clock_gettime (0 call); + clock_nanosleep (0 call); close (0 call); closedir (0 call); + closelog (0 call); connect (0 call); cos (0 call); cosf (0 call); + cosl (0 call); creat (0 call); ctime (0 call); difftime (0 call); + dirname (0 call); div (0 call); dup (0 call); dup2 (0 call); execl (0 call); + execle (0 call); execlp (0 call); execv (0 call); execve (0 call); + execvp (0 call); exit (0 call); exp (0 call); expf (0 call); fabsl (0 call); + fclose (0 call); fcntl (0 call); fdopen (0 call); feof (2 calls); + feof_unlocked (0 call); ferror (2 calls); ferror_unlocked (0 call); + fflush (0 call); fgetc (1 call); fgetpos (0 call); fgets (0 call); + fgetws (0 call); fileno (0 call); fileno_unlocked (0 call); flock (0 call); + flockfile (0 call); floor (0 call); floorf (0 call); floorl (0 call); + fmod (0 call); fmodf (0 call); fopen (0 call); fork (0 call); + fputc (0 call); fputs (0 call); fread (0 call); free (1 call); + freeaddrinfo (0 call); freopen (0 call); fseek (0 call); fsetpos (0 call); + ftell (0 call); ftrylockfile (0 call); funlockfile (0 call); + fwrite (0 call); gai_strerror (0 call); getc (0 call); + getc_unlocked (0 call); getchar (0 call); getchar_unlocked (0 call); + getcwd (0 call); getegid (0 call); geteuid (0 call); getgid (0 call); + gethostname (0 call); getitimer (0 call); getopt (0 call); + getopt_long (0 call); getopt_long_only (0 call); getpid (0 call); + getppid (0 call); getpriority (0 call); getpwnam (0 call); + getpwuid (0 call); getresgid (0 call); getresuid (0 call); + getrlimit (0 call); getrusage (0 call); gets (0 call); getsid (0 call); + getsockopt (0 call); gettimeofday (0 call); getuid (0 call); + gmtime (0 call); htonl (0 call); htons (0 call); iconv (0 call); + iconv_close (0 call); iconv_open (0 call); inet_addr (2 calls); + inet_ntoa (0 call); inet_ntop (0 call); inet_pton (0 call); + isascii (0 call); isatty (0 call); kill (0 call); labs (0 call); ldiv (0 call); listen (0 call); llabs (0 call); lldiv (0 call); localtime (0 call); log (0 call); log10 (0 call); log10f (0 call); log10l (0 call); log2 (0 call); log2f (0 call); log2l (0 call); @@ -134,28 +135,30 @@ sinl (0 call); socket (0 call); socketpair (0 call); sqrt (0 call); sqrtf (0 call); sqrtl (0 call); srand (0 call); srand48 (0 call); srandom (0 call); stat (0 call); strcoll (0 call); strcspn (0 call); - strftime (0 call); strncasecmp (0 call); strpbrk (0 call); strsep (0 call); - strspn (0 call); strtod (0 call); strtof (0 call); strtoimax (0 call); - strtok (0 call); strtok_r (0 call); strtol (0 call); strtold (0 call); - strtoll (0 call); strtoul (0 call); strtoull (0 call); strxfrm (0 call); - sync (0 call); sysconf (0 call); syslog (0 call); system (0 call); - tcgetattr (0 call); tcsetattr (0 call); time (0 call); times (0 call); - tmpfile (0 call); tmpnam (0 call); trunc (0 call); truncf (0 call); - truncl (0 call); tzset (0 call); umask (0 call); ungetc (0 call); - usleep (0 call); utimes (0 call); vfprintf (0 call); vfscanf (0 call); - vprintf (0 call); vscanf (0 call); vsnprintf (0 call); vsprintf (0 call); - vsyslog (0 call); wait (0 call); waitpid (0 call); wcschr (0 call); - wcscmp (0 call); wcscspn (0 call); wcslcat (0 call); wcslcpy (0 call); - wcsncmp (0 call); wcspbrk (0 call); wcsrchr (0 call); wcsspn (0 call); - wcsstr (0 call); wcstombs (0 call); wctomb (0 call); wmemchr (0 call); - wmemcmp (0 call); wmemmove (0 call); write (0 call); + strftime (0 call); strlcat (0 call); strlcpy (0 call); strncasecmp (0 call); + strpbrk (0 call); strsep (0 call); strspn (0 call); strtod (0 call); + strtof (0 call); strtoimax (0 call); strtok (0 call); strtok_r (0 call); + strtol (0 call); strtold (0 call); strtoll (0 call); strtoul (0 call); + strtoull (0 call); strxfrm (0 call); sync (0 call); sysconf (0 call); + syslog (0 call); system (0 call); tcgetattr (0 call); tcsetattr (0 call); + time (0 call); times (0 call); tmpfile (0 call); tmpnam (0 call); + trunc (0 call); truncf (0 call); truncl (0 call); ttyname (0 call); + tzset (0 call); umask (0 call); ungetc (0 call); usleep (0 call); + utimes (0 call); vfprintf (0 call); vfscanf (0 call); vprintf (0 call); + vscanf (0 call); vsnprintf (0 call); vsprintf (0 call); vsyslog (0 call); + wait (0 call); waitpid (0 call); wcschr (0 call); wcscmp (0 call); + wcscspn (0 call); wcslcat (0 call); wcslcpy (0 call); wcsncmp (0 call); + wcspbrk (0 call); wcsrchr (0 call); wcsspn (0 call); wcsstr (0 call); + wcstombs (0 call); wctomb (0 call); wmemchr (0 call); wmemcmp (0 call); + wmemmove (0 call); write (0 call); - 'Extern' global variables (17) + 'Extern' global variables (18) ============================== __fc_basename; __fc_dirname; __fc_getpwuid_pw_dir; __fc_getpwuid_pw_gid; __fc_getpwuid_pw_name; __fc_getpwuid_pw_passwd; __fc_getpwuid_pw_shell; __fc_getpwuid_pw_uid; __fc_hostname; __fc_mblen_state; __fc_mbtowc_state; - __fc_strerror; __fc_wctomb_state; optarg; opterr; optopt; tzname + __fc_strerror; __fc_ttyname; __fc_wctomb_state; optarg; opterr; optopt; + tzname Potential entry points (1) ========================== @@ -165,13 +168,13 @@ ============== Sloc = 1026 Decision point = 195 - Global variables = 59 + Global variables = 61 If = 186 Loop = 42 Goto = 84 Assignment = 415 Exit point = 76 - Function = 436 + Function = 443 Function call = 84 Pointer dereferencing = 157 Cyclomatic complexity = 271 diff --git a/tests/libc/oracle/fc_libc.1.res.oracle b/tests/libc/oracle/fc_libc.1.res.oracle index 8fbee9224b0..e56f5e98e8c 100644 --- a/tests/libc/oracle/fc_libc.1.res.oracle +++ b/tests/libc/oracle/fc_libc.1.res.oracle @@ -310,6 +310,7 @@ struct passwd { char *pw_passwd ; uid_t pw_uid ; gid_t pw_gid ; + char *pw_gecos ; char *pw_dir ; char *pw_shell ; }; @@ -3473,10 +3474,42 @@ char *strcpy(char *dest, char const *src); char *strncpy(char *dest, char const *src, size_t n); +/*@ requires valid_string_src: valid_read_string(src); + requires room_nstring: \valid(dest + (0 .. n - 1)); + requires + separation: + \separated( + dest + (0 .. n - 1), src + (0 .. \max(n - 1, strlen(src))) + ); + ensures + initialization: + \initialized(\old(dest) + (0 .. \min(strlen(\old(src)), \old(n) - 1))); + ensures bounded_result: \result ≡ strlen(\old(src)); + assigns *(dest + (0 .. n - 1)), \result; + assigns *(dest + (0 .. n - 1)) \from *(src + (0 .. n - 1)); + assigns \result + \from (indirect: src), (indirect: *(src + (0 .. n - 1))), (indirect: n); + */ +size_t strlcpy(char * __restrict dest, char const * __restrict src, size_t n); + char *strcat(char *dest, char const *src); char *strncat(char *dest, char const *src, size_t n); +/*@ requires valid_string_src: valid_read_string(src); + requires valid_string_dest: valid_string(dest); + requires room_nstring: \valid(dest + (0 .. n - 1)); + ensures + bounded_result: \result ≡ strlen(\old(dest)) + strlen(\old(src)); + assigns *(dest + (strlen{Old}(dest) .. n)), \result; + assigns *(dest + (strlen{Old}(dest) .. n)) + \from (indirect: n), *(src + (0 .. strlen{Old}(src))); + assigns \result + \from (indirect: src), (indirect: *(src + (0 .. n - 1))), (indirect: n); + */ +extern size_t strlcat(char * __restrict dest, char const * __restrict src, + size_t n); + /*@ requires valid_dest: \valid(dest + (0 .. n - 1)); requires valid_string_src: valid_read_string(src); assigns *(dest + (0 .. n - 1)), \result; @@ -6758,20 +6791,31 @@ extern char __fc_getpwuid_pw_dir[64]; extern char __fc_getpwuid_pw_shell[64]; -struct passwd __fc_getpwuid = +struct passwd __fc_pwd = {.pw_name = __fc_getpwuid_pw_name, .pw_passwd = __fc_getpwuid_pw_passwd, .pw_uid = __fc_getpwuid_pw_uid, .pw_gid = __fc_getpwuid_pw_gid, + .pw_gecos = (char *)0, .pw_dir = __fc_getpwuid_pw_dir, .pw_shell = __fc_getpwuid_pw_shell}; -struct passwd *__fc_p_getpwuid = & __fc_getpwuid; +struct passwd *__fc_p_pwd = & __fc_pwd; +/*@ requires valid_name: valid_read_string(name); + ensures + result_null_or_internal_struct: + \result ≡ \null ∨ \result ≡ __fc_p_pwd; + assigns \result, __fc_pwd; + assigns \result \from __fc_p_pwd, (indirect: *(name + (0 ..))); + assigns __fc_pwd \from (indirect: *(name + (0 ..))); + */ +extern struct passwd *getpwnam(char const *name); + /*@ ensures result_null_or_internal_struct: - \result ≡ \null ∨ \result ≡ __fc_p_getpwuid; - assigns \result, __fc_getpwuid; - assigns \result \from __fc_p_getpwuid, (indirect: uid); - assigns __fc_getpwuid \from (indirect: uid); + \result ≡ \null ∨ \result ≡ __fc_p_pwd; + assigns \result, __fc_pwd; + assigns \result \from __fc_p_pwd, (indirect: uid); + assigns __fc_pwd \from (indirect: uid); */ extern struct passwd *getpwuid(uid_t uid); @@ -7011,6 +7055,15 @@ extern int tcsetattr(int fd, int optional_actions, struct termios *termios_p); */ extern int access(char const *path, int amode); +/*@ requires valid_string_path: valid_read_string(path); + ensures result_ok_or_error: \result ≡ 0 ∨ \result ≡ -1; + assigns \result; + assigns \result + \from (indirect: path), (indirect: *(path + (0 ..))), + (indirect: owner), (indirect: group); + */ +extern int chown(char const *path, uid_t owner, gid_t group); + /*@ requires valid_fd: 0 ≤ fd < 1024; ensures result_ok_or_error: \result ≡ 0 ∨ \result ≡ -1; assigns __fc_fds[fd], \result; @@ -7084,6 +7137,10 @@ extern int execve(char const *path, char * const *argv, char * const *env); */ extern int execvp(char const *path, char * const *argv); +/*@ ensures never_terminates: \false; + assigns \nothing; */ +extern __attribute__((__noreturn__)) void _exit(int); + /*@ ensures result_ok_child_or_error: \result ≡ 0 ∨ \result > 0 ∨ \result ≡ -1; @@ -7150,6 +7207,12 @@ extern pid_t getsid(pid_t); assigns \result \from \nothing; */ extern uid_t getuid(void); +/*@ ensures result_true_or_false: \result ≡ 0 ∨ \result ≡ 1; + assigns \result; + assigns \result \from (indirect: fd), (indirect: __fc_fds[fd]); + */ +extern int isatty(int fd); + /*@ requires valid_path: valid_read_string(path); assigns \result; assigns \result \from (indirect: *(path + (0 ..))), (indirect: name); @@ -7231,6 +7294,16 @@ extern void sync(void); assigns \result \from (indirect: name); */ extern long sysconf(int name); +extern char volatile __fc_ttyname[32]; + +char *__fc_p_ttyname = (char *)(__fc_ttyname); +/*@ ensures + result_name_or_null: \result ≡ __fc_p_ttyname ∨ \result ≡ \null; + assigns \result; + assigns \result \from __fc_p_ttyname, (indirect: fildes); + */ +extern char *ttyname(int fildes); + /*@ ensures result_ok_or_error: \result ≡ 0 ∨ \result ≡ -1; assigns \result, Frama_C_entropy_source; assigns \result diff --git a/tests/libc/oracle/netdb_c.res.oracle b/tests/libc/oracle/netdb_c.res.oracle index d928b74c99c..1ceb0a03241 100644 --- a/tests/libc/oracle/netdb_c.res.oracle +++ b/tests/libc/oracle/netdb_c.res.oracle @@ -14,6 +14,7 @@ \return(getenv) == 0 (auto) \return(bsearch) == 0 (auto) \return(getcwd) == 0 (auto) + \return(ttyname) == 0 (auto) \return(memchr) == 0 (auto) \return(memcpy) == 0 (auto) \return(memmove) == 0 (auto) diff --git a/tests/libc/oracle/pwd_h.res.oracle b/tests/libc/oracle/pwd_h.res.oracle index 3eca6d0e89b..d0fdf54a69e 100644 --- a/tests/libc/oracle/pwd_h.res.oracle +++ b/tests/libc/oracle/pwd_h.res.oracle @@ -12,16 +12,24 @@ [eva:alarm] tests/libc/pwd_h.c:14: Warning: assertion got status unknown. [eva:alarm] tests/libc/pwd_h.c:15: Warning: assertion got status unknown. [eva:alarm] tests/libc/pwd_h.c:16: Warning: assertion got status unknown. +[eva] computing for function getpwnam <- main. + Called from tests/libc/pwd_h.c:18. +[eva] using specification for function getpwnam +[eva] tests/libc/pwd_h.c:18: + function getpwnam: precondition 'valid_name' got status valid. +[eva] Done for function getpwnam +[eva:alarm] tests/libc/pwd_h.c:21: Warning: assertion got status unknown. +[eva:alarm] tests/libc/pwd_h.c:22: Warning: assertion got status unknown. +[eva:alarm] tests/libc/pwd_h.c:23: Warning: assertion got status unknown. +[eva:alarm] tests/libc/pwd_h.c:24: Warning: assertion got status unknown. [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== [eva:final-states] Values at end of function main: - __fc_getpwuid.pw_name ∈ {{ NULL + [--..--] ; &__fc_getpwuid_pw_name[0] }} - .pw_passwd ∈ - {{ NULL + [--..--] ; &__fc_getpwuid_pw_passwd[0] }} - {.pw_uid; .pw_gid} ∈ [--..--] - .pw_dir ∈ {{ NULL + [--..--] ; &__fc_getpwuid_pw_dir[0] }} - .pw_shell ∈ - {{ NULL + [--..--] ; &__fc_getpwuid_pw_shell[0] }} - pw ∈ {{ NULL ; &__fc_getpwuid }} + __fc_pwd.pw_name ∈ {{ NULL + [--..--] ; &__fc_getpwuid_pw_name[0] }} + .pw_passwd ∈ {{ NULL + [--..--] ; &__fc_getpwuid_pw_passwd[0] }} + {.pw_uid; .pw_gid; .pw_gecos} ∈ [--..--] + .pw_dir ∈ {{ NULL + [--..--] ; &__fc_getpwuid_pw_dir[0] }} + .pw_shell ∈ {{ NULL + [--..--] ; &__fc_getpwuid_pw_shell[0] }} + pw ∈ {{ NULL ; &__fc_pwd }} __retres ∈ {0} diff --git a/tests/libc/oracle/string_c.res.oracle b/tests/libc/oracle/string_c.res.oracle index b49c71f34ab..7dc1cf2aedc 100644 --- a/tests/libc/oracle/string_c.res.oracle +++ b/tests/libc/oracle/string_c.res.oracle @@ -485,13 +485,13 @@ function strlen: precondition 'valid_string_s' got status valid. [eva] Recording results for strlen [eva] Done for function strlen -[eva] share/libc/string.h:399: +[eva] share/libc/string.h:411: function strcat: postcondition 'sum_of_lengths' got status valid. -[eva] share/libc/string.h:402: +[eva] share/libc/string.h:414: function strcat: postcondition 'initialization,dest' got status valid. -[eva] share/libc/string.h:403: +[eva] share/libc/string.h:415: function strcat: postcondition 'dest_null_terminated' got status valid. -[eva] share/libc/string.h:404: +[eva] share/libc/string.h:416: function strcat: postcondition 'result_ptr' got status valid. [eva] Recording results for strcat [eva] Done for function strcat diff --git a/tests/libc/oracle/string_c_generic.res.oracle b/tests/libc/oracle/string_c_generic.res.oracle index 091a7fd4bb2..3431164e2af 100644 --- a/tests/libc/oracle/string_c_generic.res.oracle +++ b/tests/libc/oracle/string_c_generic.res.oracle @@ -252,9 +252,9 @@ function strlen: postcondition 'acsl_c_equiv' got status valid. [eva] Recording results for strlen [eva] Done for function strlen -[eva] share/libc/string.h:413: +[eva] share/libc/string.h:425: function strncat: postcondition 'result_ptr' got status valid. -[eva] share/libc/string.h:428: +[eva] share/libc/string.h:440: function strncat, behavior partial: postcondition 'sum_of_bounded_lengths' got status valid. [eva] Recording results for strncat [eva] Done for function strncat diff --git a/tests/libc/oracle/string_h.res.oracle b/tests/libc/oracle/string_h.res.oracle index e9d3b493008..dd500d0409a 100644 --- a/tests/libc/oracle/string_h.res.oracle +++ b/tests/libc/oracle/string_h.res.oracle @@ -256,6 +256,35 @@ Consider adding ./share/libc/string.c to the analyzed source files. [eva] tests/libc/string_h.c:120: Warning: ignoring unsupported \allocates clause [eva] Done for function strndup +[eva] computing for function strlcpy <- main. + Called from tests/libc/string_h.c:124. +[eva] using specification for function strlcpy +[eva] tests/libc/string_h.c:124: + function strlcpy: precondition 'valid_string_src' got status valid. +[eva] tests/libc/string_h.c:124: + function strlcpy: precondition 'room_nstring' got status valid. +[eva] tests/libc/string_h.c:124: + function strlcpy: precondition 'separation' got status valid. +[eva] Done for function strlcpy +[eva] computing for function strlcpy <- main. + Called from tests/libc/string_h.c:125. +[eva] tests/libc/string_h.c:125: + function strlcpy: precondition 'valid_string_src' got status valid. +[eva] tests/libc/string_h.c:125: + function strlcpy: precondition 'room_nstring' got status valid. +[eva] tests/libc/string_h.c:125: + function strlcpy: precondition 'separation' got status valid. +[eva] Done for function strlcpy +[eva] computing for function strlcat <- main. + Called from tests/libc/string_h.c:126. +[eva] using specification for function strlcat +[eva:alarm] tests/libc/string_h.c:126: Warning: + function strlcat: precondition 'valid_string_src' got status unknown. +[eva:alarm] tests/libc/string_h.c:126: Warning: + function strlcat: precondition 'valid_string_dest' got status unknown. +[eva] tests/libc/string_h.c:126: + function strlcat: precondition 'room_nstring' got status valid. +[eva] Done for function strlcat [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== @@ -301,4 +330,10 @@ __fc_strtok_ptr ∈ {{ "constant!" + [0..--] }} a ∈ [--..--] b ∈ [--..--] + buf[0..15] ∈ [--..--] + buf2[0..5] ∈ [--..--] + [6..31] ∈ [--..--] or UNINITIALIZED + r1 ∈ {18} + r2 ∈ {5} + r3 ∈ [--..--] __retres ∈ {0} diff --git a/tests/libc/oracle/unistd_h.0.res.oracle b/tests/libc/oracle/unistd_h.0.res.oracle index b3c282aca8b..8acd40bd2d4 100644 --- a/tests/libc/oracle/unistd_h.0.res.oracle +++ b/tests/libc/oracle/unistd_h.0.res.oracle @@ -1,9 +1,11 @@ [kernel] Parsing tests/libc/unistd_h.c (with preprocessing) [eva] Splitting return states on: \return(access) == 0 (auto) + \return(chown) == 0 (auto) \return(dup) == -1 (auto) \return(getcwd) == 0 (auto) \return(gethostname) == 0 (auto) + \return(isatty) == 0 (auto) \return(setegid) == 0 (auto) \return(seteuid) == 0 (auto) \return(setgid) == 0 (auto) @@ -11,6 +13,7 @@ \return(setreuid) == 0 (auto) \return(setsid) == 0 (auto) \return(setuid) == 0 (auto) + \return(ttyname) == 0 (auto) \return(usleep) == 0 (auto) \return(getresuid) == 0 (auto) \return(setresuid) == 0 (auto) @@ -468,6 +471,36 @@ [eva] computing for function setreuid <- main. Called from tests/libc/unistd_h.c:74. [eva] Done for function setreuid +[eva] computing for function isatty <- main. + Called from tests/libc/unistd_h.c:76. +[eva] using specification for function isatty +[eva] Done for function isatty +[eva] computing for function isatty <- main. + Called from tests/libc/unistd_h.c:76. +[eva] Done for function isatty +[eva] tests/libc/unistd_h.c:77: assertion got status valid. +[eva] computing for function ttyname <- main. + Called from tests/libc/unistd_h.c:78. +[eva] using specification for function ttyname +[eva] Done for function ttyname +[eva] computing for function ttyname <- main. + Called from tests/libc/unistd_h.c:78. +[eva] Done for function ttyname +[eva] computing for function chown <- main. + Called from tests/libc/unistd_h.c:80. +[eva] using specification for function chown +[eva] tests/libc/unistd_h.c:80: + function chown: precondition 'valid_string_path' got status valid. +[eva] Done for function chown +[eva] computing for function chown <- main. + Called from tests/libc/unistd_h.c:80. +[eva] Done for function chown +[eva] computing for function chown <- main. + Called from tests/libc/unistd_h.c:80. +[eva] Done for function chown +[eva] computing for function chown <- main. + Called from tests/libc/unistd_h.c:80. +[eva] Done for function chown [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== @@ -491,4 +524,5 @@ egid ∈ [--..--] or UNINITIALIZED sgid ∈ [--..--] or UNINITIALIZED p ∈ [--..--] + tty ∈ {{ NULL ; &__fc_ttyname[0] }} __retres ∈ {0; 1} diff --git a/tests/libc/oracle/unistd_h.1.res.oracle b/tests/libc/oracle/unistd_h.1.res.oracle index 2b8e38fde21..39a11b77b4e 100644 --- a/tests/libc/oracle/unistd_h.1.res.oracle +++ b/tests/libc/oracle/unistd_h.1.res.oracle @@ -1,9 +1,11 @@ [kernel] Parsing tests/libc/unistd_h.c (with preprocessing) [eva] Splitting return states on: \return(access) == 0 (auto) + \return(chown) == 0 (auto) \return(dup) == -1 (auto) \return(getcwd) == 0 (auto) \return(gethostname) == 0 (auto) + \return(isatty) == 0 (auto) \return(setegid) == 0 (auto) \return(seteuid) == 0 (auto) \return(setgid) == 0 (auto) @@ -11,6 +13,7 @@ \return(setreuid) == 0 (auto) \return(setsid) == 0 (auto) \return(setuid) == 0 (auto) + \return(ttyname) == 0 (auto) \return(usleep) == 0 (auto) \return(getresuid) == 0 (auto) \return(setresuid) == 0 (auto) @@ -468,6 +471,36 @@ [eva] computing for function setreuid <- main. Called from tests/libc/unistd_h.c:74. [eva] Done for function setreuid +[eva] computing for function isatty <- main. + Called from tests/libc/unistd_h.c:76. +[eva] using specification for function isatty +[eva] Done for function isatty +[eva] computing for function isatty <- main. + Called from tests/libc/unistd_h.c:76. +[eva] Done for function isatty +[eva] tests/libc/unistd_h.c:77: assertion got status valid. +[eva] computing for function ttyname <- main. + Called from tests/libc/unistd_h.c:78. +[eva] using specification for function ttyname +[eva] Done for function ttyname +[eva] computing for function ttyname <- main. + Called from tests/libc/unistd_h.c:78. +[eva] Done for function ttyname +[eva] computing for function chown <- main. + Called from tests/libc/unistd_h.c:80. +[eva] using specification for function chown +[eva] tests/libc/unistd_h.c:80: + function chown: precondition 'valid_string_path' got status valid. +[eva] Done for function chown +[eva] computing for function chown <- main. + Called from tests/libc/unistd_h.c:80. +[eva] Done for function chown +[eva] computing for function chown <- main. + Called from tests/libc/unistd_h.c:80. +[eva] Done for function chown +[eva] computing for function chown <- main. + Called from tests/libc/unistd_h.c:80. +[eva] Done for function chown [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== @@ -491,4 +524,5 @@ egid ∈ [--..--] or UNINITIALIZED sgid ∈ [--..--] or UNINITIALIZED p ∈ [--..--] + tty ∈ {{ NULL ; &__fc_ttyname[0] }} __retres ∈ {0; 1} diff --git a/tests/libc/pwd_h.c b/tests/libc/pwd_h.c index 78abed115d3..6d69824821e 100644 --- a/tests/libc/pwd_h.c +++ b/tests/libc/pwd_h.c @@ -15,4 +15,12 @@ int main() { //@ assert valid_read_string(pw->pw_dir); //@ assert valid_read_string(pw->pw_shell); } + pw = getpwnam("root"); + if (pw) { + //Note: the assertions below are currently imprecise + //@ assert valid_read_string(pw->pw_name); + //@ assert valid_read_string(pw->pw_passwd); + //@ assert valid_read_string(pw->pw_dir); + //@ assert valid_read_string(pw->pw_shell); + } } diff --git a/tests/libc/string_h.c b/tests/libc/string_h.c index 600dfa70083..9dd3b05c2b9 100644 --- a/tests/libc/string_h.c +++ b/tests/libc/string_h.c @@ -118,5 +118,11 @@ int main(int argc, char **argv) test_strtok_r(); char *a = strdup("bla"); // unsound; specification currently unsupported char *b = strndup("bla", 2); // unsound; specification currently unsupported + + char buf[16]; + char buf2[32]; + size_t r1 = strlcpy(buf, "longer than buffer", 16); + size_t r2 = strlcpy(buf2, "short", 16); + size_t r3 = strlcat(buf2, buf, 32); return 0; } diff --git a/tests/libc/unistd_h.c b/tests/libc/unistd_h.c index d0f26a9bb53..d665ec88fa9 100644 --- a/tests/libc/unistd_h.c +++ b/tests/libc/unistd_h.c @@ -73,5 +73,10 @@ int main() { r = setregid(rgid, egid); r = setreuid(ruid, euid); + r = isatty(1); + //@ assert r == 0 || r == 1; + char *tty = ttyname(1); + + r = chown("/tmp/a.txt", 01000, 01000); return 0; } -- GitLab From 5bd9c8c9eca282626dd90775f228b284c56fd54e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 18 Feb 2019 11:24:31 +0100 Subject: [PATCH 008/376] [Eva] Fixes simple_memory: do not fail on top locations. Catches Abstract_interp.Error_Top when folding a location. When updating the state from a valuation, do not reduce the value for a location that is not a singleton: the state can instead be left unchanged, while the binding of an imprecise location cannot reduce the state. --- src/plugins/value/domains/simple_memory.ml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/plugins/value/domains/simple_memory.ml b/src/plugins/value/domains/simple_memory.ml index 9612b41755a..4f27194587e 100644 --- a/src/plugins/value/domains/simple_memory.ml +++ b/src/plugins/value/domains/simple_memory.ml @@ -141,7 +141,8 @@ module Make_Memory (Value: Value) = struct else add b v state | Imprecise -> remove b state in - Location_Bits.fold_topset_ok aux_base loc state + try Location_Bits.fold_topset_ok aux_base loc state + with Abstract_interp.Error_Top -> empty let remove_variables vars state = let remove_variable state v = remove (Base.of_varinfo v) state in @@ -161,9 +162,11 @@ module Make_Memory (Value: Value) = struct | Precise -> Bottom.join Value.join r (`Value (find_or_top b state)) | Imprecise -> `Value Value.top in - match Location_Bits.fold_topset_ok aux_base loc `Bottom with - | `Bottom -> Value.top (* does not happen if the location is not empty *) - | `Value v -> v + try + match Location_Bits.fold_topset_ok aux_base loc `Bottom with + | `Bottom -> Value.top (* does not happen if the location is not empty *) + | `Value v -> v + with Abstract_interp.Error_Top -> Value.top end @@ -234,7 +237,10 @@ module Make_Internal (Info: sig val name: string end) (Value: Value) = struct | Lval lv -> begin match Valuation.find_loc valuation lv with | `Top -> state - | `Value {loc; typ} -> bind_loc loc typ record.value.v state + | `Value {loc; typ} -> + if Precise_locs.cardinal_zero_or_one loc + then bind_loc loc typ record.value.v state + else state end | _ -> state -- GitLab From 27ebe2c256408a0ac3a8db0ab61e17371b73812e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 15 Feb 2019 16:19:03 +0100 Subject: [PATCH 009/376] [Eva] Fixes the storage of unmarshallable domains. --- src/plugins/value/domains/domain_store.ml | 28 +++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/plugins/value/domains/domain_store.ml b/src/plugins/value/domains/domain_store.ml index 22d08a62838..6bcf2d60866 100644 --- a/src/plugins/value/domains/domain_store.ml +++ b/src/plugins/value/domains/domain_store.ml @@ -40,14 +40,38 @@ module Make (Domain: InputDomain) = struct let dependencies = [ Db.Value.self ] let size = 16 - module Storage = - State_builder.Ref (Datatype.Bool) + module type Ref = sig + val get : unit -> bool + val set : bool -> unit + end + + (* Boolean reference saved on the disk. *) + module Bool_Ref_State = + State_builder.Ref + (Datatype.Bool) (struct let dependencies = dependencies let name = name ^ ".Storage" let default () = false end) + (* Boolean reference. Not saved on the disk. *) + module Bool_Ref = struct + let x = ref false + let set y = x := y + let get () = !x + end + + (* A boolean reference indicating whether the states of the domain have been + saved. False by default, it becomes true when the engine calls + [register_global_state] at the start of the analysis. + If the domain is unmarshallable, its states cannot be saved on the + disk, and this boolean should not be saved either. *) + module Storage = + (val (if Descr.is_unmarshable Domain.descr + then (module Bool_Ref) + else (module Bool_Ref_State)) : Ref) + module Global_State = State_builder.Option_ref (Domain) (struct -- GitLab From 861f1bf84c761a80ffe6316d4bdddc45b4735797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Tue, 19 Feb 2019 10:43:56 +0100 Subject: [PATCH 010/376] [rte] simplifies and document API --- src/plugins/rte/RteGen.mli | 94 +++++++++++++++++++++++++++++------- src/plugins/rte/rte.ml | 84 ++++++++++++++++----------------- src/plugins/rte/rte.mli | 4 +- src/plugins/rte/visit.ml | 38 ++++++++------- src/plugins/rte/visit.mli | 97 ++++++++++++++++++++++++++------------ 5 files changed, 207 insertions(+), 110 deletions(-) diff --git a/src/plugins/rte/RteGen.mli b/src/plugins/rte/RteGen.mli index 7c7ef14725b..fb3e32553ca 100644 --- a/src/plugins/rte/RteGen.mli +++ b/src/plugins/rte/RteGen.mli @@ -22,13 +22,42 @@ (** Some functions are also registered in {!Db.Value}. *) -open Cil_types - +(* --- included from visit.mli --- *) module Visit : sig - (** Low-level control over iterators *) + open Cil_types + + (** {2 RTE Generator API} + + The all-in-one entry points of the RTE plugin. + *) + + (** Generates RTE for a single function. Uses the status of the various + RTE options do decide which kinds of annotations must be generated. + *) + val annotate_kf: kernel_function -> unit + + (** Generates all RTEs for a given function. *) + val do_all_rte: kernel_function -> unit + + (** Generates all RTEs except preconditions for a given function. *) + val do_rte: kernel_function -> unit + + val rte_annotations: stmt -> code_annotation list + val do_stmt_annotations: kernel_function -> stmt -> code_annotation list + val do_exp_annotations: kernel_function -> stmt -> exp -> code_annotation list + + (** Main entry point of the plug-in, used by [-rte] option: computes + RTE on the whole AST. Which kind of RTE is generated depends on the + options given on the command line. + *) + val compute: unit -> unit + + (** {2 Low Level Iterator Control} *) + (** Flags for controling the low-level API. Each flag control whether + a category of alarms will be visited or not. *) type flags = { remove_trivial: bool; initialized: bool; @@ -47,7 +76,7 @@ sig bool_value: bool; } - (** Defaults are taken from the Kernel and RTE plug-in options *) + (** Defaults flags are taken from the Kernel and RTE plug-in options. *) val default : ?remove_trivial:bool -> ?initialized:bool -> @@ -66,21 +95,34 @@ sig ?bool_value:bool -> unit -> flags - (** All flags set to [true] *) + (** All flags set to [true]. *) val flags_all : flags - (** All flags set to [false] *) + (** All flags set to [false]. *) val flags_none : flags - (** Low-level iterators callback. + (** {2 Low-Level RTE Iterators} + + RTE Iterators allow to traverse a Cil AST fragment (stmt, expr, l-value) + and reveal its potential Alarms. Each alarm will be presented to a callback + with type [on_alarm], that you can use in turn to generate an annotation + or perform any other treatment. + + Flags can be used to select which alarm categories to visit, with + defaults derived from Kernel and RTE plug-in parameters. + *) + + (** Alarm callback. + + The [on_alarm kf stmt ~invalid alarm] callback is invoked on each + alarm visited by an RTE iterator, provided it fits the selected categories. + The [kf] and [stmt] designates the statement originating the alarm, + while [~invalid:true] is set when the alarm trivially evaluates to false. + In this later case, the corresponding annotation shall be assigned + the status [False_if_reachable]. - The [on_alarm stmt ?status alarm] callback is invoked with - the [stmt] originating the alarm and the already known status, - if any. *) - type on_alarm = - kinstr -> ?status:Property_status.emitted_status -> - Alarms.alarm -> unit + type on_alarm = kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> unit (** Low-level iterators @@ -94,13 +136,33 @@ sig type 'a iterator = ?flags:flags -> on_alarm -> - Kernel_function.t -> - Cil_types.stmt -> - 'a -> unit + Kernel_function.t -> Cil_types.stmt -> 'a -> unit val iter_lval : lval iterator val iter_exp : exp iterator val iter_instr : instr iterator val iter_stmt : stmt iterator + (** {2 Alarm Helpers} *) + + (** Returns a [False_if_reachable] status when invalid. *) + val status : invalid:bool -> Property_status.emitted_status option + + (** Registers and returns the annotation associated with the alarm, + and a boolean flag indicating whether it has been freshly generated + or not. *) + val annotation : + Emitter.t -> kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> + code_annotation * bool + + (** A callback that simply register the annotation associated with the alarm. *) + val register : Emitter.t -> on_alarm + +(* +Local Variables: +compile-command: "make -C ../../.." +End: +*) + + end diff --git a/src/plugins/rte/rte.ml b/src/plugins/rte/rte.ml index 130ec550685..b1f2b7ffaec 100644 --- a/src/plugins/rte/rte.ml +++ b/src/plugins/rte/rte.ml @@ -24,9 +24,7 @@ open Cil_types type 'a alarm_gen = remove_trivial:bool -> - on_alarm:(?status:Property_status.emitted_status -> - Alarms.alarm -> - unit) -> + on_alarm:(invalid:bool -> Alarms.alarm -> unit) -> 'a -> unit type bound_kind = Alarms.bound_kind = Lower_bound | Upper_bound @@ -45,7 +43,7 @@ let valid_index ~remove_trivial ~on_alarm e size = in (* Do not create upper-bound check on GNU zero-length arrays *) if not (bk == Upper_bound && Cil.isZero size) then begin - on_alarm ?status:None (Alarms.Index_out_of_bound(e, b)) + on_alarm ~invalid:false (Alarms.Index_out_of_bound(e, b)) end in if remove_trivial then begin @@ -80,7 +78,7 @@ let lval_assertion ~read_only ~remove_trivial ~on_alarm lv = match off with | NoOffset -> if default then - on_alarm ?status:None (Alarms.Memory_access(lv, read_only)) + on_alarm ~invalid:false (Alarms.Memory_access(lv, read_only)) | Field (fi, off) -> (* Mark that we went through a struct field, then recurse *) check_array_access default off fi.ftype true @@ -124,10 +122,10 @@ let lval_initialized_assertion ~remove_trivial:_ ~on_alarm lv = cfields in if default then - on_alarm ?status:None (Alarms.Uninitialized_union llv)) + on_alarm ~invalid:false (Alarms.Uninitialized_union llv)) | _ -> if default then - on_alarm ?status:None (Alarms.Uninitialized lv) + on_alarm ~invalid:false (Alarms.Uninitialized lv) end | Field (fi, off) -> (* Mark that we went through a struct field, then recurse *) @@ -158,9 +156,9 @@ let uminus_assertion ~remove_trivial ~on_alarm exp = let min_ty = Cil.min_signed_number size in (* alarm is bound <= exp, hence bound must be MIN_INT+1 *) let bound = Integer.add Integer.one min_ty in - let alarm ?status () = + let alarm ?(invalid=false) () = let a = Alarms.Overflow(Alarms.Signed, exp, bound, Lower_bound) in - on_alarm ?status a + on_alarm ~invalid a in if remove_trivial then begin match get_expr_val exp with @@ -168,7 +166,7 @@ let uminus_assertion ~remove_trivial ~on_alarm exp = | Some a64 -> (* constant operand *) if Integer.equal a64 min_ty then - alarm ~status:Property_status.False_if_reachable () + alarm ~invalid:true () end else alarm () @@ -183,13 +181,13 @@ let mult_sub_add_assertion ~signed ~remove_trivial ~on_alarm (exp,op,lexp,rexp) if signed then Cil.min_signed_number size, Cil.max_signed_number size else Integer.zero, Cil.max_unsigned_number size in - let alarm ?status bk = + let alarm ?(invalid=false) bk = let bound = match bk with | Upper_bound -> max_ty | Lower_bound -> min_ty in let signed = if signed then Alarms.Signed else Alarms.Unsigned in - on_alarm ?status (Alarms.Overflow (signed, exp, bound, bk)); + on_alarm ~invalid (Alarms.Overflow (signed, exp, bound, bk)); in let alarms () = alarm Lower_bound; @@ -199,7 +197,7 @@ let mult_sub_add_assertion ~signed ~remove_trivial ~on_alarm (exp,op,lexp,rexp) match get_expr_val lexp, get_expr_val rexp, op with | Some l, Some r, _ -> (* both operands are constant *) let warn r = - let warn bk = alarm ~status:Property_status.False_if_reachable bk in + let warn bk = alarm ~invalid:true bk in if Integer.gt r max_ty then warn Upper_bound else if Integer.lt r min_ty then warn Lower_bound in @@ -240,8 +238,8 @@ let mult_sub_add_assertion ~signed ~remove_trivial ~on_alarm (exp,op,lexp,rexp) (* assertions for division and modulo (divisor is 0) *) let divmod_assertion ~remove_trivial ~on_alarm divisor = (* division or modulo: overflow occurs when divisor is equal to zero *) - let alarm ?status () = - on_alarm ?status (Alarms.Division_by_zero divisor); + let alarm ?(invalid=false) () = + on_alarm ~invalid (Alarms.Division_by_zero divisor); in if remove_trivial then begin match get_expr_val divisor with @@ -250,7 +248,7 @@ let divmod_assertion ~remove_trivial ~on_alarm divisor = | Some v64 -> if Integer.equal v64 Integer.zero then (* divide by 0 *) - alarm ~status:Property_status.False_if_reachable () + alarm ~invalid:true () (* else divide by constant which is not 0: nothing to assert *) end else alarm () @@ -270,9 +268,9 @@ let signed_div_assertion ~remove_trivial ~on_alarm (exp, lexp, rexp) = (* check dividend_expr / divisor_expr : if constants ... *) (* compute smallest representable "size bits" (signed) integer *) let max_ty = Cil.max_signed_number size in - let alarm ?status () = + let alarm ?(invalid=false) () = let a = Alarms.Overflow(Alarms.Signed, exp, max_ty, Alarms.Upper_bound) in - on_alarm ?status a; + on_alarm ~invalid a; in if remove_trivial then begin let min = Cil.min_signed_number size in @@ -285,7 +283,7 @@ let signed_div_assertion ~remove_trivial ~on_alarm (exp, lexp, rexp) = () | Some _, Some _ -> (* invalid constant division *) - alarm ~status:Property_status.False_if_reachable () + alarm ~invalid:true () | None, Some _ | Some _, None | None, None -> (* at least one is not constant: cannot conclude *) alarm () @@ -294,9 +292,9 @@ let signed_div_assertion ~remove_trivial ~on_alarm (exp, lexp, rexp) = (* Assertions for the left and right operands of left and right shift. *) let shift_assertion ~remove_trivial ~on_alarm (exp, upper_bound) = - let alarm ?status () = + let alarm ?(invalid=false) () = let a = Alarms.Invalid_shift(exp, upper_bound) in - on_alarm ?status a; + on_alarm ~invalid a ; in if remove_trivial then begin match get_expr_val exp with @@ -310,7 +308,7 @@ let shift_assertion ~remove_trivial ~on_alarm (exp, upper_bound) = | Some u -> Integer.lt c64 (Integer.of_int u) in if not (Integer.ge c64 Integer.zero && upper_bound_ok) then - alarm ~status:Property_status.False_if_reachable () + alarm ~invalid:true () end else alarm () @@ -340,10 +338,10 @@ let shift_overflow_assertion ~signed ~remove_trivial ~on_alarm (exp, op, lexp, r then Cil.max_signed_number size else Cil.max_unsigned_number size in - let overflow_alarm ?status () = + let overflow_alarm ?(invalid=false) () = let signed = if signed then Alarms.Signed else Alarms.Unsigned in let a = Alarms.Overflow (signed, exp, maxValResult, Alarms.Upper_bound) in - on_alarm ?status a; + on_alarm ~invalid a; in if remove_trivial then begin match get_expr_val lexp, get_expr_val rexp with @@ -355,7 +353,7 @@ let shift_overflow_assertion ~signed ~remove_trivial ~on_alarm (exp, op, lexp, r if Integer.ge rval64 Integer.zero && Integer.gt (Integer.shift_left lval64 rval64) maxValResult then - overflow_alarm ~status:Property_status.False_if_reachable () + overflow_alarm ~invalid:true () end else overflow_alarm () @@ -375,13 +373,13 @@ let unsigned_downcast_assertion ~remove_trivial ~on_alarm (ty, exp) = ok is same bit size ; if target is <, requires <= max target *) let max_ty = Cil.max_unsigned_number szTo in - let alarm ?status bk = + let alarm ?(invalid=false) bk = let b = match bk with | Lower_bound -> Integer.zero | Upper_bound -> max_ty in let a = Alarms.Overflow (Alarms.Unsigned_downcast, exp, b, bk) in - on_alarm ?status a; + on_alarm ~invalid a; in let alarms () = if Cil.isSigned kind then begin (* signed to unsigned *) @@ -395,11 +393,9 @@ let unsigned_downcast_assertion ~remove_trivial ~on_alarm (ty, exp) = | None -> alarms () | Some a64 -> if Integer.lt a64 Integer.zero then - alarm ~status:Property_status.False_if_reachable - Lower_bound + alarm ~invalid:true Lower_bound else if Integer.gt a64 max_ty then - alarm ~status:Property_status.False_if_reachable - Upper_bound + alarm ~invalid:true Upper_bound end else alarms ()) | _ -> () @@ -416,13 +412,13 @@ let signed_downcast_assertion ~remove_trivial ~on_alarm (ty, exp) = (* downcast: the expression result should fit on szTo bits *) let min_ty = Cil.min_signed_number szTo in let max_ty = Cil.max_signed_number szTo in - let alarm ?status bk = + let alarm ?(invalid=false) bk = let b = match bk with | Lower_bound -> min_ty | Upper_bound -> max_ty in let a = Alarms.Overflow (Alarms.Signed_downcast, exp, b, bk) in - on_alarm ?status a; + on_alarm ~invalid a; in let alarms () = if Cil.isSigned kind then begin @@ -437,9 +433,9 @@ let signed_downcast_assertion ~remove_trivial ~on_alarm (ty, exp) = | None -> alarms () | Some a64 -> (if Integer.lt a64 min_ty then - alarm ~status:Property_status.False_if_reachable Lower_bound + alarm ~invalid:true Lower_bound else if Integer.gt a64 max_ty then - alarm ~status:Property_status.False_if_reachable Upper_bound) + alarm ~invalid:true Upper_bound) end else alarms ()) | _ -> () @@ -456,12 +452,12 @@ let float_to_int_assertion ~remove_trivial ~on_alarm (ty, exp) = else Integer.zero, Cil.max_unsigned_number szTo in - let alarm ?status bk = + let alarm ?(invalid=false) bk = let b = match bk with | Lower_bound -> min_ty | Upper_bound -> max_ty in - on_alarm ?status (Alarms.Float_to_int (exp, b, bk)) + on_alarm ~invalid (Alarms.Float_to_int (exp, b, bk)) in let f = match exp.enode with | Const (CReal (f, _, _)) -> Some f @@ -474,9 +470,9 @@ let float_to_int_assertion ~remove_trivial ~on_alarm (ty, exp) = try let fint = Floating_point.truncate_to_integer f in if Integer.lt fint min_ty then - alarm ~status:Property_status.False_if_reachable Lower_bound + alarm ~invalid:true Lower_bound else if Integer.gt fint max_ty then - alarm ~status:Property_status.False_if_reachable Upper_bound + alarm ~invalid:true Upper_bound with Floating_point.Float_Non_representable_as_Int64 sign -> match sign with | Floating_point.Neg -> alarm Lower_bound @@ -490,19 +486,19 @@ let float_to_int_assertion ~remove_trivial ~on_alarm (ty, exp) = (* assertion for checking only finite float are used *) let finite_float_assertion ~remove_trivial:_ ~on_alarm (fkind, exp) = - let status = None in + let invalid = false in match Kernel.SpecialFloat.get () with | "none" -> () - | "nan" -> on_alarm ?status (Alarms.Is_nan (exp, fkind)) - | "non-finite" -> on_alarm ?status (Alarms.Is_nan_or_infinite (exp, fkind)) + | "nan" -> on_alarm ~invalid (Alarms.Is_nan (exp, fkind)) + | "non-finite" -> on_alarm ~invalid (Alarms.Is_nan_or_infinite (exp, fkind)) | _ -> assert false (* assertion for a pointer call [( *e )(args)]. *) let pointer_call ~remove_trivial:_ ~on_alarm (e, args) = - on_alarm ?status:None (Alarms.Function_pointer (e, Some args)) + on_alarm ~invalid:false (Alarms.Function_pointer (e, Some args)) let bool_value ~remove_trivial:_ ~on_alarm lv = - on_alarm ?status:None (Alarms.Invalid_bool lv) + on_alarm ~invalid:false (Alarms.Invalid_bool lv) (* Local Variables: diff --git a/src/plugins/rte/rte.mli b/src/plugins/rte/rte.mli index 0b1d55a21e3..6d194a63109 100644 --- a/src/plugins/rte/rte.mli +++ b/src/plugins/rte/rte.mli @@ -24,9 +24,7 @@ open Cil_types type 'a alarm_gen = remove_trivial:bool -> - on_alarm:(?status:Property_status.emitted_status -> - Alarms.alarm -> - unit) -> + on_alarm:(invalid:bool -> Alarms.alarm -> unit) -> 'a -> unit (** ['a alarm_gen] is an abstraction over the process of generating a certain kind of RTEs over something of type ['a]. diff --git a/src/plugins/rte/visit.ml b/src/plugins/rte/visit.ml index e262588f298..dea0d52eeee 100644 --- a/src/plugins/rte/visit.ml +++ b/src/plugins/rte/visit.ml @@ -224,7 +224,8 @@ class annot_visitor kf flags on_alarm = object (self) method private generate_assertion: 'a. 'a Rte.alarm_gen -> 'a -> unit = fun fgen -> - let on_alarm ?status a = on_alarm self#current_kinstr ?status a in + let stmt = Extlib.the (self#current_stmt) in + let on_alarm ~invalid a = on_alarm stmt ~invalid a in fgen ~remove_trivial:flags.remove_trivial ~on_alarm method! vstmt s = match s.skind with @@ -464,31 +465,39 @@ let rte_annotations stmt = (** {2 Iterate over Alarms on Cil elements} *) -type on_alarm = - kinstr -> ?status:Property_status.emitted_status -> - Alarms.alarm -> unit +type on_alarm = kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> unit let iter_alarms visit ?flags (on_alarm:on_alarm) kf stmt element = let flags = match flags with | None -> default () | Some opt -> opt in let visitor = object (self) - inherit annot_visitor kf flags on_alarm + inherit annot_visitor kf flags (on_alarm kf) initializer self#push_stmt stmt end in ignore (visit (visitor :> Cil.cilVisitor) element) type 'a iterator = ?flags:flags -> on_alarm -> - Kernel_function.t -> - Cil_types.stmt -> - 'a -> unit + Kernel_function.t -> Cil_types.stmt -> 'a -> unit let iter_lval : lval iterator = iter_alarms Cil.visitCilLval let iter_exp : exp iterator = iter_alarms Cil.visitCilExpr let iter_instr : instr iterator = iter_alarms Cil.visitCilInstr let iter_stmt : stmt iterator = iter_alarms Cil.visitCilStmt +(** {2 Regitration} *) + +let status ~invalid = + if invalid then Some Property_status.False_if_reachable else None + +let annotation emitter kf stmt ~invalid alarm = + let status = status ~invalid in + Alarms.register emitter ~kf (Kstmt stmt) ?status alarm + +let register emitter kf stmt ~invalid alarm = + ignore (annotation emitter kf stmt ~invalid alarm) + (** {2 List of all RTEs on a given Cil object} *) let get_annotations from kf stmt x = @@ -496,8 +505,8 @@ let get_annotations from kf stmt x = (* Accumulator containing all the code_annots corresponding to an alarm emitted so far. *) let code_annots = ref [] in - let on_alarm ki ?status:_ alarm = - let ca, _ = Alarms.to_annot ki alarm in + let on_alarm stmt ~invalid:_ alarm = + let ca, _ = Alarms.to_annot (Kstmt stmt) alarm in code_annots := ca :: !code_annots; in let o = object (self) @@ -512,7 +521,6 @@ let do_stmt_annotations kf stmt = let do_exp_annotations = get_annotations Cil.visitCilExpr - (** {2 Annotations of kernel_functions for a given type of RTE} *) (* generates annotation for function kf on the basis of [flags] *) @@ -552,13 +560,11 @@ let annotate_kf_aux flags kf = then begin Options.feedback "annotating function %a" Kernel_function.pretty kf; let warn = Options.Warn.get () in - let on_alarm ki ?status alarm = - let ca, _ = Alarms.register Generator.emitter ~kf ki ?status alarm in - match warn, status with - | true, Some Property_status.False_if_reachable -> + let on_alarm stmt ~invalid alarm = + let ca, _ = annotation Generator.emitter kf stmt ~invalid alarm in + if warn && invalid then Options.warn "@[guaranteed RTE:@ %a@]" Printer.pp_code_annotation ca - | _ -> () in let vis = new annot_visitor kf flags on_alarm in let nkf = Visitor.visitFramacFunction vis f in diff --git a/src/plugins/rte/visit.mli b/src/plugins/rte/visit.mli index 3aab4626ecf..4c7f5fc7103 100644 --- a/src/plugins/rte/visit.mli +++ b/src/plugins/rte/visit.mli @@ -20,10 +20,40 @@ (* *) (**************************************************************************) +(* --- Synchronized with RteGen.mli --- *) + open Cil_types -(** Low-level control over iterators *) +(** {2 RTE Generator API} + + The all-in-one entry points of the RTE plugin. +*) + +(** Generates RTE for a single function. Uses the status of the various + RTE options do decide which kinds of annotations must be generated. +*) +val annotate_kf: kernel_function -> unit + +(** Generates all RTEs for a given function. *) +val do_all_rte: kernel_function -> unit + +(** Generates all RTEs except preconditions for a given function. *) +val do_rte: kernel_function -> unit + +val rte_annotations: stmt -> code_annotation list +val do_stmt_annotations: kernel_function -> stmt -> code_annotation list +val do_exp_annotations: kernel_function -> stmt -> exp -> code_annotation list + +(** Main entry point of the plug-in, used by [-rte] option: computes + RTE on the whole AST. Which kind of RTE is generated depends on the + options given on the command line. +*) +val compute: unit -> unit + +(** {2 Low Level Iterator Control} *) +(** Flags for controling the low-level API. Each flag control whether + a category of alarms will be visited or not. *) type flags = { remove_trivial: bool; initialized: bool; @@ -42,7 +72,7 @@ type flags = { bool_value: bool; } -(** Defaults are taken from the Kernel and RTE plug-in options *) +(** Defaults flags are taken from the Kernel and RTE plug-in options. *) val default : ?remove_trivial:bool -> ?initialized:bool -> @@ -61,21 +91,34 @@ val default : ?bool_value:bool -> unit -> flags -(** All flags set to [true] *) +(** All flags set to [true]. *) val flags_all : flags -(** All flags set to [false] *) +(** All flags set to [false]. *) val flags_none : flags -(** Low-level iterators callback. +(** {2 Low-Level RTE Iterators} + + RTE Iterators allow to traverse a Cil AST fragment (stmt, expr, l-value) + and reveal its potential Alarms. Each alarm will be presented to a callback + with type [on_alarm], that you can use in turn to generate an annotation + or perform any other treatment. + + Flags can be used to select which alarm categories to visit, with + defaults derived from Kernel and RTE plug-in parameters. +*) + +(** Alarm callback. + + The [on_alarm kf stmt ~invalid alarm] callback is invoked on each + alarm visited by an RTE iterator, provided it fits the selected categories. + The [kf] and [stmt] designates the statement originating the alarm, + while [~invalid:true] is set when the alarm trivially evaluates to false. + In this later case, the corresponding annotation shall be assigned + the status [False_if_reachable]. - The [on_alarm stmt ?status alarm] callback is invoked with - the [stmt] originating the alarm and the already known status, - if any. *) -type on_alarm = - kinstr -> ?status:Property_status.emitted_status -> - Alarms.alarm -> unit +type on_alarm = kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> unit (** Low-level iterators @@ -89,35 +132,27 @@ type on_alarm = type 'a iterator = ?flags:flags -> on_alarm -> - Kernel_function.t -> - Cil_types.stmt -> - 'a -> unit + Kernel_function.t -> Cil_types.stmt -> 'a -> unit val iter_lval : lval iterator val iter_exp : exp iterator val iter_instr : instr iterator val iter_stmt : stmt iterator -(** Generates RTE for a single function. Uses the status of the various - RTE options do decide which kinds of annotations must be generated. -*) -val annotate_kf: kernel_function -> unit - -(** Generates all RTEs for a given function. *) -val do_all_rte: kernel_function -> unit +(** {2 Alarm Helpers} *) -(** Generates all RTEs except preconditions for a given function. *) -val do_rte: kernel_function -> unit +(** Returns a [False_if_reachable] status when invalid. *) +val status : invalid:bool -> Property_status.emitted_status option -val rte_annotations: stmt -> code_annotation list -val do_stmt_annotations: kernel_function -> stmt -> code_annotation list -val do_exp_annotations: kernel_function -> stmt -> exp -> code_annotation list +(** Registers and returns the annotation associated with the alarm, + and a boolean flag indicating whether it has been freshly generated + or not. *) +val annotation : + Emitter.t -> kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> + code_annotation * bool -(** Main entry point of the plug-in, used by [-rte] option: computes - RTE on the whole AST. Which kind of RTE is generated depends on the - options given on the command line. -*) -val compute: unit -> unit +(** A callback that simply register the annotation associated with the alarm. *) +val register : Emitter.t -> on_alarm (* Local Variables: -- GitLab From 1cdece355c1ac3b19ca2cadba7289bc288b02810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 19 Feb 2019 10:42:57 +0100 Subject: [PATCH 011/376] [Inout] Fixes the operational_inputs on initializations of const local variables. Initialized const variables should be included as outputs of the function. --- src/plugins/inout/operational_inputs.ml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/plugins/inout/operational_inputs.ml b/src/plugins/inout/operational_inputs.ml index 2cb17a9f311..e1e981e872a 100644 --- a/src/plugins/inout/operational_inputs.ml +++ b/src/plugins/inout/operational_inputs.ml @@ -285,10 +285,13 @@ end) = struct {data with over_inputs_d = Zone.join data.over_inputs_d new_inputs} ;; - let add_out state lv deps data = + (* Initialized const variables should be included as outputs of the function, + so [for_writing] must be false for local initializations. It should be + true for all other instructions. *) + let add_out ~for_writing state lv deps data = let deps, new_outs, exact = !Db.Value.lval_to_zone_with_deps_state state - ~deps:(Some deps) ~for_writing:true lv + ~deps:(Some deps) ~for_writing lv in store_non_terminating_outputs new_outs; let new_inputs = Zone.diff deps data.under_outputs_d in @@ -304,7 +307,7 @@ end) = struct over_inputs_d = Zone.join data.over_inputs_d new_inputs; over_outputs_d = Zone.join data.over_outputs_d new_outs } - let transfer_call s dest f args _loc data = + let transfer_call ~for_writing s dest f args _loc data = let state = X.stmt_state s in let f_inputs, called = !Db.Value.expr_to_kernel_function_state @@ -349,7 +352,7 @@ end) = struct (* Treatment for the possible assignment of the call result *) (match dest with | None -> result - | Some lv -> add_out state lv Zone.bottom result) + | Some lv -> add_out ~for_writing state lv Zone.bottom result) in result (* Transfer function on instructions. *) @@ -360,14 +363,14 @@ end) = struct let e_inputs = !Db.From.find_deps_no_transitivity_state state exp in - add_out state lv e_inputs data + add_out ~for_writing:true state lv e_inputs data | Local_init (v, AssignInit i, _) -> let state = X.stmt_state stmt in let rec aux lv i acc = match i with | SingleInit e -> let e_inputs = !Db.From.find_deps_no_transitivity_state state e in - add_out state lv e_inputs acc + add_out ~for_writing:false state lv e_inputs acc | CompoundInit(ct, initl) -> let implicit = true in let doinit o i _ data = aux (Cil.addOffsetLval o lv) i data in @@ -375,9 +378,10 @@ end) = struct in aux (Cil.var v) i data | Call (lvaloption,funcexp,argl,loc) -> - transfer_call stmt lvaloption funcexp argl loc data + transfer_call ~for_writing:true stmt lvaloption funcexp argl loc data | Local_init(v, ConsInit(f, args, kind), loc) -> - Cil.treat_constructor_as_func (transfer_call stmt) v f args kind loc data + let transfer = transfer_call ~for_writing:false stmt in + Cil.treat_constructor_as_func transfer v f args kind loc data | Asm _ | Code_annot _ | Skip _ -> data ;; -- GitLab From cfc3e127686dc28a17df01c627bf5bfbad5fcc8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Tue, 19 Feb 2019 15:40:41 +0100 Subject: [PATCH 012/376] [rte] polishing doc --- src/plugins/rte/RteGen.mli | 11 +---------- src/plugins/rte/visit.mli | 11 +---------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/plugins/rte/RteGen.mli b/src/plugins/rte/RteGen.mli index fb3e32553ca..a191e61ffb4 100644 --- a/src/plugins/rte/RteGen.mli +++ b/src/plugins/rte/RteGen.mli @@ -124,16 +124,7 @@ sig *) type on_alarm = kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> unit - (** Low-level iterators - - The [on_alarm ki ?status alarm] callback is invoked with - the k-instruction originating the alarm and the already known status, - if any. - - Potential alarms can be specified by the provided flags, - with defaults from the Kernel and RTE plug-in options. - *) - + (** Type of low-level iterators visiting an element ['a] of the AST *) type 'a iterator = ?flags:flags -> on_alarm -> Kernel_function.t -> Cil_types.stmt -> 'a -> unit diff --git a/src/plugins/rte/visit.mli b/src/plugins/rte/visit.mli index 4c7f5fc7103..1f75de9bd22 100644 --- a/src/plugins/rte/visit.mli +++ b/src/plugins/rte/visit.mli @@ -120,16 +120,7 @@ val flags_none : flags *) type on_alarm = kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> unit -(** Low-level iterators - - The [on_alarm ki ?status alarm] callback is invoked with - the k-instruction originating the alarm and the already known status, - if any. - - Potential alarms can be specified by the provided flags, - with defaults from the Kernel and RTE plug-in options. -*) - +(** Type of low-level iterators visiting an element ['a] of the AST *) type 'a iterator = ?flags:flags -> on_alarm -> Kernel_function.t -> Cil_types.stmt -> 'a -> unit -- GitLab From 330b3c2e95e2c9c18e715ae59148c9746cc8caa7 Mon Sep 17 00:00:00 2001 From: DavidCok <cok@frontiernet.net> Date: Wed, 20 Feb 2019 10:27:29 +0100 Subject: [PATCH 013/376] Simple typo --- share/libc/time.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/libc/time.h b/share/libc/time.h index 52c4455579f..ffe74960d94 100644 --- a/share/libc/time.h +++ b/share/libc/time.h @@ -169,7 +169,7 @@ extern int clock_getres(clockid_t, struct timespec *); #else // simulates a system without monotonic clock assigns \result\from clk_id; - ensures error: \result == EINVAL + ensures error: \result == EINVAL; #endif behavior bad_clock_id: assumes bad_id: clk_id != CLOCK_REALTIME && clk_id != CLOCK_MONOTONIC; -- GitLab From b255a3ef16b32faa41e17c0236937c3363e13c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 20 Feb 2019 15:37:00 +0100 Subject: [PATCH 014/376] [rte] simplify extern RteGen.mli --- src/plugins/rte/RteGen.mli | 137 +------------------------------------ 1 file changed, 2 insertions(+), 135 deletions(-) diff --git a/src/plugins/rte/RteGen.mli b/src/plugins/rte/RteGen.mli index a191e61ffb4..0357b823a55 100644 --- a/src/plugins/rte/RteGen.mli +++ b/src/plugins/rte/RteGen.mli @@ -22,138 +22,5 @@ (** Some functions are also registered in {!Db.Value}. *) -(* --- included from visit.mli --- *) -module Visit : -sig - - open Cil_types - - (** {2 RTE Generator API} - - The all-in-one entry points of the RTE plugin. - *) - - (** Generates RTE for a single function. Uses the status of the various - RTE options do decide which kinds of annotations must be generated. - *) - val annotate_kf: kernel_function -> unit - - (** Generates all RTEs for a given function. *) - val do_all_rte: kernel_function -> unit - - (** Generates all RTEs except preconditions for a given function. *) - val do_rte: kernel_function -> unit - - val rte_annotations: stmt -> code_annotation list - val do_stmt_annotations: kernel_function -> stmt -> code_annotation list - val do_exp_annotations: kernel_function -> stmt -> exp -> code_annotation list - - (** Main entry point of the plug-in, used by [-rte] option: computes - RTE on the whole AST. Which kind of RTE is generated depends on the - options given on the command line. - *) - val compute: unit -> unit - - (** {2 Low Level Iterator Control} *) - - (** Flags for controling the low-level API. Each flag control whether - a category of alarms will be visited or not. *) - type flags = { - remove_trivial: bool; - initialized: bool; - mem_access: bool; - div_mod: bool; - shift: bool; - left_shift_negative: bool; - right_shift_negative: bool; - signed_overflow: bool; - unsigned_overflow: bool; - signed_downcast: bool; - unsigned_downcast: bool; - float_to_int: bool; - finite_float: bool; - pointer_call: bool; - bool_value: bool; - } - - (** Defaults flags are taken from the Kernel and RTE plug-in options. *) - val default : - ?remove_trivial:bool -> - ?initialized:bool -> - ?mem_access:bool -> - ?div_mod:bool -> - ?shift:bool -> - ?left_shift_negative:bool -> - ?right_shift_negative:bool -> - ?signed_overflow:bool -> - ?unsigned_overflow:bool -> - ?signed_downcast:bool -> - ?unsigned_downcast:bool -> - ?float_to_int:bool -> - ?finite_float:bool -> - ?pointer_call:bool -> - ?bool_value:bool -> - unit -> flags - - (** All flags set to [true]. *) - val flags_all : flags - - (** All flags set to [false]. *) - val flags_none : flags - - (** {2 Low-Level RTE Iterators} - - RTE Iterators allow to traverse a Cil AST fragment (stmt, expr, l-value) - and reveal its potential Alarms. Each alarm will be presented to a callback - with type [on_alarm], that you can use in turn to generate an annotation - or perform any other treatment. - - Flags can be used to select which alarm categories to visit, with - defaults derived from Kernel and RTE plug-in parameters. - *) - - (** Alarm callback. - - The [on_alarm kf stmt ~invalid alarm] callback is invoked on each - alarm visited by an RTE iterator, provided it fits the selected categories. - The [kf] and [stmt] designates the statement originating the alarm, - while [~invalid:true] is set when the alarm trivially evaluates to false. - In this later case, the corresponding annotation shall be assigned - the status [False_if_reachable]. - - *) - type on_alarm = kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> unit - - (** Type of low-level iterators visiting an element ['a] of the AST *) - type 'a iterator = - ?flags:flags -> on_alarm -> - Kernel_function.t -> Cil_types.stmt -> 'a -> unit - - val iter_lval : lval iterator - val iter_exp : exp iterator - val iter_instr : instr iterator - val iter_stmt : stmt iterator - - (** {2 Alarm Helpers} *) - - (** Returns a [False_if_reachable] status when invalid. *) - val status : invalid:bool -> Property_status.emitted_status option - - (** Registers and returns the annotation associated with the alarm, - and a boolean flag indicating whether it has been freshly generated - or not. *) - val annotation : - Emitter.t -> kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> - code_annotation * bool - - (** A callback that simply register the annotation associated with the alarm. *) - val register : Emitter.t -> on_alarm - -(* -Local Variables: -compile-command: "make -C ../../.." -End: -*) - - -end +(** Visitors to iterate over Alarms and/or generate Code-Annotations *) +module Visit : module type of Visit -- GitLab From 687f1bf2a82e2e7080cf6528b05d06255a3c8ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 20 Feb 2019 17:07:53 +0100 Subject: [PATCH 015/376] [rte] move rte_annotations to generator --- src/plugins/rte/generator.ml | 6 ++++++ src/plugins/rte/generator.mli | 10 +++++++++- src/plugins/rte/register.ml | 2 +- src/plugins/rte/visit.ml | 6 ------ src/plugins/rte/visit.mli | 1 - 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/plugins/rte/generator.ml b/src/plugins/rte/generator.ml index e72328ab527..2a944b6c6cd 100644 --- a/src/plugins/rte/generator.ml +++ b/src/plugins/rte/generator.ml @@ -197,6 +197,12 @@ let emitter = ~correctness:[ Kernel.SafeArrays.parameter ] ~tuning:[] +let get_registered_annotations stmt = + Annotations.fold_code_annot + (fun e a acc -> if Emitter.equal e emitter then a ::acc else acc) + stmt + [] + (* Local Variables: compile-command: "make -C ../../.." diff --git a/src/plugins/rte/generator.mli b/src/plugins/rte/generator.mli index 2ed6fe38a32..ae903fb0bc8 100644 --- a/src/plugins/rte/generator.mli +++ b/src/plugins/rte/generator.mli @@ -26,6 +26,8 @@ module type S = sig val accessor: Db.RteGen.status_accessor end +(* No module for Trivial: dependency added for generators below *) + module Initialized: S module Mem_access: S module Pointer_call: S @@ -41,9 +43,15 @@ module Float_to_int: S module Finite_float: S module Bool_value: S +val all_statuses: Db.RteGen.status_accessor list + +(** The Emitter for Annotations registered by RTE *) val emitter: Emitter.t -val all_statuses: Db.RteGen.status_accessor list +open Cil_types + +(** Returns all annotations actually {i registered} by RTE so far *) +val get_registered_annotations: stmt -> code_annotation list (* Local Variables: diff --git a/src/plugins/rte/register.ml b/src/plugins/rte/register.ml index 8831d66b29b..e5b0281e856 100644 --- a/src/plugins/rte/register.ml +++ b/src/plugins/rte/register.ml @@ -83,7 +83,7 @@ let _ = Cil_datatype.Stmt.ty (let module L = Datatype.List(Cil_datatype.Code_annotation) in L.ty)) ~journalize:true - Visit.rte_annotations + Generator.get_registered_annotations let _ = Dynamic.register diff --git a/src/plugins/rte/visit.ml b/src/plugins/rte/visit.ml index dea0d52eeee..a4746447501 100644 --- a/src/plugins/rte/visit.ml +++ b/src/plugins/rte/visit.ml @@ -457,12 +457,6 @@ class annot_visitor kf flags on_alarm = object (self) end -let rte_annotations stmt = - Annotations.fold_code_annot - (fun e a acc -> if Emitter.equal e Generator.emitter then a ::acc else acc) - stmt - [] - (** {2 Iterate over Alarms on Cil elements} *) type on_alarm = kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> unit diff --git a/src/plugins/rte/visit.mli b/src/plugins/rte/visit.mli index 1f75de9bd22..1127c3c52b9 100644 --- a/src/plugins/rte/visit.mli +++ b/src/plugins/rte/visit.mli @@ -40,7 +40,6 @@ val do_all_rte: kernel_function -> unit (** Generates all RTEs except preconditions for a given function. *) val do_rte: kernel_function -> unit -val rte_annotations: stmt -> code_annotation list val do_stmt_annotations: kernel_function -> stmt -> code_annotation list val do_exp_annotations: kernel_function -> stmt -> exp -> code_annotation list -- GitLab From d5091e6c0b612bf5671161035573257d8716e2f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 20 Feb 2019 17:28:16 +0100 Subject: [PATCH 016/376] [rte] moving flags and more exports --- Makefile | 2 +- headers/header_spec.txt | 2 + src/plugins/rte/RteGen.mli | 29 ++++++++- src/plugins/rte/flags.ml | 121 +++++++++++++++++++++++++++++++++++ src/plugins/rte/flags.mli | 72 +++++++++++++++++++++ src/plugins/rte/visit.ml | 126 ++----------------------------------- src/plugins/rte/visit.mli | 50 +-------------- 7 files changed, 228 insertions(+), 174 deletions(-) create mode 100644 src/plugins/rte/flags.ml create mode 100644 src/plugins/rte/flags.mli diff --git a/Makefile b/Makefile index 1668a9d2777..be71d63e14e 100644 --- a/Makefile +++ b/Makefile @@ -957,7 +957,7 @@ $(eval $(call include_generic_plugin_Makefile,$(PLUGIN_NAME))) PLUGIN_ENABLE:=$(ENABLE_RTEGEN) PLUGIN_NAME:=RteGen PLUGIN_DIR:=src/plugins/rte -PLUGIN_CMO:= options generator rte visit register +PLUGIN_CMO:= options generator rte flags visit register PLUGIN_DISTRIBUTED:=yes PLUGIN_INTERNAL_TEST:=yes PLUGIN_TESTS_DIRS:=rte rte_manual diff --git a/headers/header_spec.txt b/headers/header_spec.txt index dd34d6c7e78..37041b02d29 100644 --- a/headers/header_spec.txt +++ b/headers/header_spec.txt @@ -1002,6 +1002,8 @@ src/plugins/report/report_parameters.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/report/scan.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/report/scan.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/rte/RteGen.mli: CEA_LGPL_OR_PROPRIETARY +src/plugins/rte/flags.ml: CEA_LGPL_OR_PROPRIETARY +src/plugins/rte/flags.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/rte/generator.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/rte/generator.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/rte/options.ml: CEA_LGPL_OR_PROPRIETARY diff --git a/src/plugins/rte/RteGen.mli b/src/plugins/rte/RteGen.mli index 0357b823a55..37f64d20dc0 100644 --- a/src/plugins/rte/RteGen.mli +++ b/src/plugins/rte/RteGen.mli @@ -20,7 +20,32 @@ (* *) (**************************************************************************) -(** Some functions are also registered in {!Db.Value}. *) +(** Consult internal plug-in documentation for more details *) + +(** Flags for filtering Alarms *) +module Flags : module type of Flags + +(** RTE Generator Status & Emitters *) +module Generator : module type of Generator (** Visitors to iterate over Alarms and/or generate Code-Annotations *) -module Visit : module type of Visit +module Visit : sig + open Cil_types + val annotate_kf: kernel_function -> unit + val do_all_rte: kernel_function -> unit + val do_rte: kernel_function -> unit + val do_stmt_annotations: kernel_function -> stmt -> code_annotation list + val do_exp_annotations: kernel_function -> stmt -> exp -> code_annotation list + val compute: unit -> unit + type on_alarm = kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> unit + type 'a iterator = ?flags:Flags.t -> on_alarm -> + Kernel_function.t -> Cil_types.stmt -> 'a -> unit + val iter_lval : lval iterator + val iter_exp : exp iterator + val iter_instr : instr iterator + val iter_stmt : stmt iterator + val annotation : + Emitter.t -> kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> + code_annotation * bool + val register : Emitter.t -> on_alarm +end diff --git a/src/plugins/rte/flags.ml b/src/plugins/rte/flags.ml new file mode 100644 index 00000000000..eed7aa13716 --- /dev/null +++ b/src/plugins/rte/flags.ml @@ -0,0 +1,121 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + +(* -------------------------------------------------------------------------- *) +(* --- Fine Tuning Visitors --- *) +(* -------------------------------------------------------------------------- *) + +type t = { + remove_trivial: bool; + initialized: bool; + mem_access: bool; + div_mod: bool; + shift: bool; + left_shift_negative: bool; + right_shift_negative: bool; + signed_overflow: bool; + unsigned_overflow: bool; + signed_downcast: bool; + unsigned_downcast: bool; + float_to_int: bool; + finite_float: bool; + pointer_call: bool; + bool_value: bool; +} + +let all = { + remove_trivial = true; + initialized = true; + mem_access = true; + div_mod = true; + shift = true; + left_shift_negative = true; + right_shift_negative = true; + signed_overflow = true; + unsigned_overflow = true; + signed_downcast = true; + unsigned_downcast = true; + float_to_int = true; + finite_float = true; + pointer_call = true; + bool_value = true; +} + +let none = { + remove_trivial = false; + initialized = false; + mem_access = false; + div_mod = false; + shift = false; + left_shift_negative = false; + right_shift_negative = false; + signed_overflow = false; + unsigned_overflow = false; + signed_downcast = false; + unsigned_downcast = false; + float_to_int = false; + finite_float = false; + pointer_call = false; + bool_value = false; +} + +(* Which annotations should be added, + from local options, or deduced from the options of RTE and the kernel *) + +let option (get : unit -> bool) = function None -> get () | Some flag -> flag + +let default + ?remove_trivial + ?initialized + ?mem_access + ?div_mod + ?shift + ?left_shift_negative + ?right_shift_negative + ?signed_overflow + ?unsigned_overflow + ?signed_downcast + ?unsigned_downcast + ?float_to_int + ?finite_float + ?pointer_call + ?bool_value + () = + { + remove_trivial = option (fun () -> not (Options.Trivial.get ())) remove_trivial ; + initialized = option Options.DoInitialized.get initialized ; + mem_access = option Options.DoMemAccess.get mem_access ; + div_mod = option Options.DoDivMod.get div_mod ; + shift = option Options.DoShift.get shift; + left_shift_negative = option Kernel.LeftShiftNegative.get left_shift_negative ; + right_shift_negative = option Kernel.RightShiftNegative.get right_shift_negative ; + signed_overflow = option Kernel.SignedOverflow.get signed_overflow ; + unsigned_overflow = option Kernel.UnsignedOverflow.get unsigned_overflow ; + signed_downcast = option Kernel.SignedDowncast.get signed_downcast ; + unsigned_downcast = option Kernel.UnsignedDowncast.get unsigned_downcast ; + float_to_int = option Options.DoFloatToInt.get float_to_int ; + finite_float = option (fun () -> Kernel.SpecialFloat.get () <> "none") finite_float ; + pointer_call = option Options.DoPointerCall.get pointer_call ; + bool_value = option Kernel.InvalidBool.get bool_value ; + } + +(* -------------------------------------------------------------------------- *) diff --git a/src/plugins/rte/flags.mli b/src/plugins/rte/flags.mli new file mode 100644 index 00000000000..578ba9ef308 --- /dev/null +++ b/src/plugins/rte/flags.mli @@ -0,0 +1,72 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + +(* -------------------------------------------------------------------------- *) +(** Filtering Categories of Alarms *) +(* -------------------------------------------------------------------------- *) + +(** Flags for controling the low-level API. Each flag control whether + a category of alarms will be visited or not. *) +type t = { + remove_trivial: bool; + initialized: bool; + mem_access: bool; + div_mod: bool; + shift: bool; + left_shift_negative: bool; + right_shift_negative: bool; + signed_overflow: bool; + unsigned_overflow: bool; + signed_downcast: bool; + unsigned_downcast: bool; + float_to_int: bool; + finite_float: bool; + pointer_call: bool; + bool_value: bool; +} + +(** Defaults flags are taken from the Kernel and RTE plug-in options. *) +val default : + ?remove_trivial:bool -> + ?initialized:bool -> + ?mem_access:bool -> + ?div_mod:bool -> + ?shift:bool -> + ?left_shift_negative:bool -> + ?right_shift_negative:bool -> + ?signed_overflow:bool -> + ?unsigned_overflow:bool -> + ?signed_downcast:bool -> + ?unsigned_downcast:bool -> + ?float_to_int:bool -> + ?finite_float:bool -> + ?pointer_call:bool -> + ?bool_value:bool -> + unit -> t + +(** All flags set to [true]. *) +val all : t + +(** All flags set to [false]. *) +val none : t + +(* -------------------------------------------------------------------------- *) diff --git a/src/plugins/rte/visit.ml b/src/plugins/rte/visit.ml index a4746447501..4487c5bdfff 100644 --- a/src/plugins/rte/visit.ml +++ b/src/plugins/rte/visit.ml @@ -24,128 +24,10 @@ open Cil_types open Cil_datatype +open Flags (* AST inplace visitor for runtime annotation generation *) -(* module for bypassing categories of annotation generation for certain - expression ids ; - useful in a case such as - - signed char cx,cy,cz; - cz = cx * cy; - - which translates to - - cz = (signed char) ((int) cx * (int) cz) ; - - which would in this case be annotated both by - - assert - (((int )cx+(int )cy <= 2147483647) and - ((int )cx+(int )cy >= (-0x7FFFFFFF-1))); - - and - - assert (((int )cx+(int )cy <= 127) and ((int )cx+(int )cy >= -128)); - - while we only want to keep the second assert (comes from the cast, - and is stronger) -*) - -type flags = { - remove_trivial: bool; - initialized: bool; - mem_access: bool; - div_mod: bool; - shift: bool; - left_shift_negative: bool; - right_shift_negative: bool; - signed_overflow: bool; - unsigned_overflow: bool; - signed_downcast: bool; - unsigned_downcast: bool; - float_to_int: bool; - finite_float: bool; - pointer_call: bool; - bool_value: bool; -} - -let flags_all = { - remove_trivial = true; - initialized = true; - mem_access = true; - div_mod = true; - shift = true; - left_shift_negative = true; - right_shift_negative = true; - signed_overflow = true; - unsigned_overflow = true; - signed_downcast = true; - unsigned_downcast = true; - float_to_int = true; - finite_float = true; - pointer_call = true; - bool_value = true; -} - -let flags_none = { - remove_trivial = false; - initialized = false; - mem_access = false; - div_mod = false; - shift = false; - left_shift_negative = false; - right_shift_negative = false; - signed_overflow = false; - unsigned_overflow = false; - signed_downcast = false; - unsigned_downcast = false; - float_to_int = false; - finite_float = false; - pointer_call = false; - bool_value = false; -} - -(* Which annotations should be added, - from local options, or deduced from the options of RTE and the kernel *) - -let option (get : unit -> bool) = function None -> get () | Some flag -> flag - -let default - ?remove_trivial - ?initialized - ?mem_access - ?div_mod - ?shift - ?left_shift_negative - ?right_shift_negative - ?signed_overflow - ?unsigned_overflow - ?signed_downcast - ?unsigned_downcast - ?float_to_int - ?finite_float - ?pointer_call - ?bool_value - () = - { - remove_trivial = option (fun () -> not (Options.Trivial.get ())) remove_trivial ; - initialized = option Options.DoInitialized.get initialized ; - mem_access = option Options.DoMemAccess.get mem_access ; - div_mod = option Options.DoDivMod.get div_mod ; - shift = option Options.DoShift.get shift; - left_shift_negative = option Kernel.LeftShiftNegative.get left_shift_negative ; - right_shift_negative = option Kernel.RightShiftNegative.get right_shift_negative ; - signed_overflow = option Kernel.SignedOverflow.get signed_overflow ; - unsigned_overflow = option Kernel.UnsignedOverflow.get unsigned_overflow ; - signed_downcast = option Kernel.SignedDowncast.get signed_downcast ; - unsigned_downcast = option Kernel.UnsignedDowncast.get unsigned_downcast ; - float_to_int = option Options.DoFloatToInt.get float_to_int ; - finite_float = option (fun () -> Kernel.SpecialFloat.get () <> "none") finite_float ; - pointer_call = option Options.DoPointerCall.get pointer_call ; - bool_value = option Kernel.InvalidBool.get bool_value ; - } - (** [kf]: function to annotate [flags]: which RTE to generate. [register]: the action to perform on each RTE alarm *) @@ -472,7 +354,7 @@ let iter_alarms visit ?flags (on_alarm:on_alarm) kf stmt element = ignore (visit (visitor :> Cil.cilVisitor) element) type 'a iterator = - ?flags:flags -> on_alarm -> + ?flags:Flags.t -> on_alarm -> Kernel_function.t -> Cil_types.stmt -> 'a -> unit let iter_lval : lval iterator = iter_alarms Cil.visitCilLval @@ -573,7 +455,7 @@ let annotate_kf kf = annotate_kf_aux (default ()) kf function *) let do_all_rte kf = let flags = - { flags_all with + { Flags.all with signed_downcast = false; unsigned_downcast = false; } in @@ -583,7 +465,7 @@ let do_all_rte kf = function *) let do_rte kf = let flags = - { flags_all with + { Flags.all with unsigned_overflow = false; signed_downcast = false; unsigned_downcast = false; } diff --git a/src/plugins/rte/visit.mli b/src/plugins/rte/visit.mli index 1127c3c52b9..9c909a5706c 100644 --- a/src/plugins/rte/visit.mli +++ b/src/plugins/rte/visit.mli @@ -49,53 +49,6 @@ val do_exp_annotations: kernel_function -> stmt -> exp -> code_annotation list *) val compute: unit -> unit -(** {2 Low Level Iterator Control} *) - -(** Flags for controling the low-level API. Each flag control whether - a category of alarms will be visited or not. *) -type flags = { - remove_trivial: bool; - initialized: bool; - mem_access: bool; - div_mod: bool; - shift: bool; - left_shift_negative: bool; - right_shift_negative: bool; - signed_overflow: bool; - unsigned_overflow: bool; - signed_downcast: bool; - unsigned_downcast: bool; - float_to_int: bool; - finite_float: bool; - pointer_call: bool; - bool_value: bool; -} - -(** Defaults flags are taken from the Kernel and RTE plug-in options. *) -val default : - ?remove_trivial:bool -> - ?initialized:bool -> - ?mem_access:bool -> - ?div_mod:bool -> - ?shift:bool -> - ?left_shift_negative:bool -> - ?right_shift_negative:bool -> - ?signed_overflow:bool -> - ?unsigned_overflow:bool -> - ?signed_downcast:bool -> - ?unsigned_downcast:bool -> - ?float_to_int:bool -> - ?finite_float:bool -> - ?pointer_call:bool -> - ?bool_value:bool -> - unit -> flags - -(** All flags set to [true]. *) -val flags_all : flags - -(** All flags set to [false]. *) -val flags_none : flags - (** {2 Low-Level RTE Iterators} RTE Iterators allow to traverse a Cil AST fragment (stmt, expr, l-value) @@ -120,8 +73,7 @@ val flags_none : flags type on_alarm = kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> unit (** Type of low-level iterators visiting an element ['a] of the AST *) -type 'a iterator = - ?flags:flags -> on_alarm -> +type 'a iterator = ?flags:Flags.t -> on_alarm -> Kernel_function.t -> Cil_types.stmt -> 'a -> unit val iter_lval : lval iterator -- GitLab From 5923955916ec9564072c8d9fb1efd61aafef1e88 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Wed, 20 Feb 2019 17:28:28 +0100 Subject: [PATCH 017/376] [Kernel] fix incompatibility with BSD sed --- Makefile.generating | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.generating b/Makefile.generating index 174a2b7bd49..58a6083f7db 100644 --- a/Makefile.generating +++ b/Makefile.generating @@ -41,8 +41,8 @@ tests/ptests_config: Makefile.generating share/Makefile.config $(CHMOD_RO) $@ ALL_LIBRARY_NAMES=$(shell ocamlfind query -r -p-format $(LIBRARY_NAMES) $(LIBRARY_NAMES_GUI)) -MAJOR_VERSION=$(shell $(SED) 's/^\([0-9]\+\)\..*/\1/' VERSION) -MINOR_VERSION=$(shell $(SED) 's/^[0-9]\+\.\([0-9]\+\).*/\1/' VERSION) +MAJOR_VERSION=$(shell $(SED) -E 's/^([0-9]+)\..*/\1/' VERSION) +MINOR_VERSION=$(shell $(SED) -E 's/^[0-9]+\.([0-9]+).*/\1/' VERSION) $(CONFIG_FILE): $(CONFIG_FILE).in VERSION VERSION_CODENAME share/Makefile.config Makefile.generating configure.in $(SED) \ @@ -211,7 +211,7 @@ endif lib/fc/META.frama-c: share/META.frama-c share/Makefile.config Makefile.generating $(MKDIR) lib/fc/ - $(SED) $< -e "s/@REQUIRES/$(LIBRARY_NAMES)/" > $@ + $(SED) "s/@REQUIRES/$(LIBRARY_NAMES)/" $< > $@ GENERATED += lib/fc/META.frama-c -- GitLab From d895ca1ed56b354362ee1c51ba9ed1d157541978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 20 Feb 2019 18:08:10 +0100 Subject: [PATCH 018/376] [rte] refactor high level API --- src/plugins/rte/RteGen.mli | 24 ++++++---- src/plugins/rte/register.ml | 54 ++++++++++++++++++--- src/plugins/rte/visit.ml | 95 ++++++++++++++----------------------- src/plugins/rte/visit.mli | 45 ++++++++---------- 4 files changed, 118 insertions(+), 100 deletions(-) diff --git a/src/plugins/rte/RteGen.mli b/src/plugins/rte/RteGen.mli index 37f64d20dc0..aff86d1508f 100644 --- a/src/plugins/rte/RteGen.mli +++ b/src/plugins/rte/RteGen.mli @@ -31,12 +31,21 @@ module Generator : module type of Generator (** Visitors to iterate over Alarms and/or generate Code-Annotations *) module Visit : sig open Cil_types - val annotate_kf: kernel_function -> unit - val do_all_rte: kernel_function -> unit - val do_rte: kernel_function -> unit - val do_stmt_annotations: kernel_function -> stmt -> code_annotation list - val do_exp_annotations: kernel_function -> stmt -> exp -> code_annotation list - val compute: unit -> unit + + val annotate: ?flags:Flags.t -> kernel_function -> unit + + val get_annotations_kf: + ?flags:Flags.t -> kernel_function -> code_annotation list + + val get_annotations_stmt: + ?flags:Flags.t -> kernel_function -> stmt -> code_annotation list + + val get_annotations_exp: + ?flags:Flags.t -> kernel_function -> stmt -> exp -> code_annotation list + + val get_annotations_lval: + ?flags:Flags.t -> kernel_function -> stmt -> lval -> code_annotation list + type on_alarm = kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> unit type 'a iterator = ?flags:Flags.t -> on_alarm -> Kernel_function.t -> Cil_types.stmt -> 'a -> unit @@ -44,8 +53,7 @@ module Visit : sig val iter_exp : exp iterator val iter_instr : instr iterator val iter_stmt : stmt iterator - val annotation : + val register : Emitter.t -> kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> code_annotation * bool - val register : Emitter.t -> on_alarm end diff --git a/src/plugins/rte/register.ml b/src/plugins/rte/register.ml index e5b0281e856..87386ea7f8b 100644 --- a/src/plugins/rte/register.ml +++ b/src/plugins/rte/register.ml @@ -20,6 +20,47 @@ (* *) (**************************************************************************) +(* -------------------------------------------------------------------------- *) +(* dedicated computations *) +(* -------------------------------------------------------------------------- *) + +open Flags + +(* annotate for all rte + unsigned overflows (which are not rte), for a given + function *) +let do_all_rte kf = + let flags = + { Flags.all with + signed_downcast = false; + unsigned_downcast = false; } + in + Visit.annotate ~flags kf + +(* annotate for rte only (not unsigned overflows and downcasts) for a given + function *) +let do_rte kf = + let flags = + { Flags.all with + unsigned_overflow = false; + signed_downcast = false; + unsigned_downcast = false; } + in + Visit.annotate ~flags kf + +let compute () = + (* compute RTE annotations, whether Enabled is set or not *) + Ast.compute () ; + let include_function kf = + let fsel = Options.FunctionSelection.get () in + Kernel_function.Set.is_empty fsel + || Kernel_function.Set.mem kf fsel + in + Globals.Functions.iter + (fun kf -> if include_function kf then !Db.RteGen.annotate_kf kf) + + +(* journal utilities *) + let journal_register ?comment is_dyn name ty_arg fctref fct = let ty = Datatype.func ty_arg Datatype.unit in Db.register (Db.Journalize("RteGen." ^ name, ty)) fctref fct; @@ -34,17 +75,16 @@ let nojournal_register fctref fct = let () = journal_register false - "annotate_kf" Kernel_function.ty Db.RteGen.annotate_kf Visit.annotate_kf; - journal_register false "compute" Datatype.unit Db.RteGen.compute - Visit.compute; + "annotate_kf" Kernel_function.ty Db.RteGen.annotate_kf Visit.annotate; + journal_register false "compute" Datatype.unit Db.RteGen.compute compute; journal_register true ~comment:"Generate all RTE annotations in the \ given function." - "do_all_rte" Kernel_function.ty Db.RteGen.do_all_rte Visit.do_all_rte; + "do_all_rte" Kernel_function.ty Db.RteGen.do_all_rte do_all_rte; journal_register false ~comment:"Generate all RTE annotations except pre-conditions \ in the given function." - "do_rte" Kernel_function.ty Db.RteGen.do_rte Visit.do_rte; + "do_rte" Kernel_function.ty Db.RteGen.do_rte do_rte; let open Generator in let open Db.RteGen in nojournal_register get_signedOv_status Signed_overflow.accessor; @@ -94,7 +134,7 @@ let _ = (Datatype.func2 Kernel_function.ty Cil_datatype.Stmt.ty (let module L = Datatype.List(Cil_datatype.Code_annotation) in L.ty)) ~journalize:false - Visit.do_stmt_annotations + Visit.get_annotations_stmt let _ = Dynamic.register @@ -105,7 +145,7 @@ let _ = (Datatype.func3 Kernel_function.ty Cil_datatype.Stmt.ty Cil_datatype.Exp.ty (let module L = Datatype.List(Cil_datatype.Code_annotation) in L.ty)) ~journalize:false - Visit.do_exp_annotations + Visit.get_annotations_exp let main () = (* reset "rte generated"/"called precond generated" properties for all diff --git a/src/plugins/rte/visit.ml b/src/plugins/rte/visit.ml index 4487c5bdfff..9bd7ee4f39b 100644 --- a/src/plugins/rte/visit.ml +++ b/src/plugins/rte/visit.ml @@ -343,12 +343,11 @@ end type on_alarm = kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> unit +let filter = function None -> Flags.default () | Some flags -> flags + let iter_alarms visit ?flags (on_alarm:on_alarm) kf stmt element = - let flags = match flags with - | None -> default () - | Some opt -> opt in let visitor = object (self) - inherit annot_visitor kf flags (on_alarm kf) + inherit annot_visitor kf (filter flags) (on_alarm kf) initializer self#push_stmt stmt end in ignore (visit (visitor :> Cil.cilVisitor) element) @@ -367,40 +366,51 @@ let iter_stmt : stmt iterator = iter_alarms Cil.visitCilStmt let status ~invalid = if invalid then Some Property_status.False_if_reachable else None -let annotation emitter kf stmt ~invalid alarm = +let register emitter kf stmt ~invalid alarm = let status = status ~invalid in Alarms.register emitter ~kf (Kstmt stmt) ?status alarm -let register emitter kf stmt ~invalid alarm = - ignore (annotation emitter kf stmt ~invalid alarm) - -(** {2 List of all RTEs on a given Cil object} *) +(* -------------------------------------------------------------------------- *) +(* --- List Code Annotations --- *) +(* -------------------------------------------------------------------------- *) -let get_annotations from kf stmt x = - let flags = default () in - (* Accumulator containing all the code_annots corresponding to an alarm - emitted so far. *) - let code_annots = ref [] in +let collector () = + let pool = ref [] in let on_alarm stmt ~invalid:_ alarm = let ca, _ = Alarms.to_annot (Kstmt stmt) alarm in - code_annots := ca :: !code_annots; - in - let o = object (self) - inherit annot_visitor kf flags on_alarm + pool := ca :: !pool ; + in pool , on_alarm + +let get_annotations_kf ?flags kf = + match kf.fundec with + | Declaration _ -> [] + | Definition(f, _) -> + let pool,on_alarm = collector () in + let visitor = new annot_visitor kf (filter flags) on_alarm in + ignore (Visitor.visitFramacFunction visitor f) ; !pool + +let collect from flags kf stmt elt = + let pool,on_alarm = collector () in + let visitor = object (self) + inherit annot_visitor kf (filter flags) on_alarm initializer self#push_stmt stmt end in - ignore (from (o :> Cil.cilVisitor) x); - !code_annots + ignore (from (visitor :> Cil.cilVisitor) elt); !pool -let do_stmt_annotations kf stmt = - get_annotations Cil.visitCilStmt kf stmt stmt +let get_annotations_stmt ?flags kf stmt = + collect Cil.visitCilStmt flags kf stmt stmt -let do_exp_annotations = get_annotations Cil.visitCilExpr +let get_annotations_exp ?flags kf stmt exp = + collect Cil.visitCilExpr flags kf stmt exp + +let get_annotations_lval ?flags kf stmt lv = + collect Cil.visitCilLval flags kf stmt lv (** {2 Annotations of kernel_functions for a given type of RTE} *) (* generates annotation for function kf on the basis of [flags] *) -let annotate_kf_aux flags kf = +let annotate ?flags kf = + let flags = filter flags in Options.debug "annotating function %a" Kernel_function.pretty kf; match kf.fundec with | Declaration _ -> () @@ -437,7 +447,7 @@ let annotate_kf_aux flags kf = Options.feedback "annotating function %a" Kernel_function.pretty kf; let warn = Options.Warn.get () in let on_alarm stmt ~invalid alarm = - let ca, _ = annotation Generator.emitter kf stmt ~invalid alarm in + let ca, _ = register Generator.emitter kf stmt ~invalid alarm in if warn && invalid then Options.warn "@[guaranteed RTE:@ %a@]" Printer.pp_code_annotation ca @@ -448,41 +458,6 @@ let annotate_kf_aux flags kf = List.iter (fun f -> f ()) !to_update; end -(* generates annotation for function kf on the basis of command-line options *) -let annotate_kf kf = annotate_kf_aux (default ()) kf - -(* annotate for all rte + unsigned overflows (which are not rte), for a given - function *) -let do_all_rte kf = - let flags = - { Flags.all with - signed_downcast = false; - unsigned_downcast = false; } - in - annotate_kf_aux flags kf - -(* annotate for rte only (not unsigned overflows and downcasts) for a given - function *) -let do_rte kf = - let flags = - { Flags.all with - unsigned_overflow = false; - signed_downcast = false; - unsigned_downcast = false; } - in - annotate_kf_aux flags kf - -let compute () = - (* compute RTE annotations, whether Enabled is set or not *) - Ast.compute () ; - let include_function kf = - let fsel = Options.FunctionSelection.get () in - Kernel_function.Set.is_empty fsel - || Kernel_function.Set.mem kf fsel - in - Globals.Functions.iter - (fun kf -> if include_function kf then !Db.RteGen.annotate_kf kf) - (* Local Variables: compile-command: "make -C ../../.." diff --git a/src/plugins/rte/visit.mli b/src/plugins/rte/visit.mli index 9c909a5706c..3fe997f0057 100644 --- a/src/plugins/rte/visit.mli +++ b/src/plugins/rte/visit.mli @@ -24,30 +24,27 @@ open Cil_types -(** {2 RTE Generator API} +(** {2 RTE Generator API} *) - The all-in-one entry points of the RTE plugin. -*) +(** Annotate kernel-function with respect to options + and current generator status. *) +val annotate: ?flags:Flags.t -> kernel_function -> unit -(** Generates RTE for a single function. Uses the status of the various - RTE options do decide which kinds of annotations must be generated. -*) -val annotate_kf: kernel_function -> unit +(** Returns annotations associated to alarms {i without} registering them. *) +val get_annotations_kf: + ?flags:Flags.t -> kernel_function -> code_annotation list -(** Generates all RTEs for a given function. *) -val do_all_rte: kernel_function -> unit +(** Returns annotations associated to alarms {i without} registering them. *) +val get_annotations_stmt: + ?flags:Flags.t -> kernel_function -> stmt -> code_annotation list -(** Generates all RTEs except preconditions for a given function. *) -val do_rte: kernel_function -> unit +(** Returns annotations associated to alarms {i without} registering them. *) +val get_annotations_exp: + ?flags:Flags.t -> kernel_function -> stmt -> exp -> code_annotation list -val do_stmt_annotations: kernel_function -> stmt -> code_annotation list -val do_exp_annotations: kernel_function -> stmt -> exp -> code_annotation list - -(** Main entry point of the plug-in, used by [-rte] option: computes - RTE on the whole AST. Which kind of RTE is generated depends on the - options given on the command line. -*) -val compute: unit -> unit +(** Returns annotations associated to alarms {i without} registering them. *) +val get_annotations_lval: + ?flags:Flags.t -> kernel_function -> stmt -> lval -> code_annotation list (** {2 Low-Level RTE Iterators} @@ -88,14 +85,12 @@ val status : invalid:bool -> Property_status.emitted_status option (** Registers and returns the annotation associated with the alarm, and a boolean flag indicating whether it has been freshly generated - or not. *) -val annotation : - Emitter.t -> kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> + or not. Simple wrapper over [Alarms.register]. *) +val register : + Emitter.t -> + kernel_function -> stmt -> invalid:bool -> Alarms.alarm -> code_annotation * bool -(** A callback that simply register the annotation associated with the alarm. *) -val register : Emitter.t -> on_alarm - (* Local Variables: compile-command: "make -C ../../.." -- GitLab From 2baab0d3fedb2f2d4a3dc46a75d69f7d2c13123b Mon Sep 17 00:00:00 2001 From: Julien Signoles <julien.signoles@cea.fr> Date: Thu, 21 Feb 2019 10:19:06 +0100 Subject: [PATCH 019/376] [rte] remove 'open Flags' --- src/plugins/rte/register.ml | 6 ++---- src/plugins/rte/visit.ml | 37 ++++++++++++++++++++----------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/plugins/rte/register.ml b/src/plugins/rte/register.ml index 87386ea7f8b..ab0d3111c0a 100644 --- a/src/plugins/rte/register.ml +++ b/src/plugins/rte/register.ml @@ -24,14 +24,12 @@ (* dedicated computations *) (* -------------------------------------------------------------------------- *) -open Flags - (* annotate for all rte + unsigned overflows (which are not rte), for a given function *) let do_all_rte kf = let flags = { Flags.all with - signed_downcast = false; + Flags.signed_downcast = false; unsigned_downcast = false; } in Visit.annotate ~flags kf @@ -41,7 +39,7 @@ let do_all_rte kf = let do_rte kf = let flags = { Flags.all with - unsigned_overflow = false; + Flags.unsigned_overflow = false; signed_downcast = false; unsigned_downcast = false; } in diff --git a/src/plugins/rte/visit.ml b/src/plugins/rte/visit.ml index 9bd7ee4f39b..0a7c6fa81ba 100644 --- a/src/plugins/rte/visit.ml +++ b/src/plugins/rte/visit.ml @@ -24,7 +24,6 @@ open Cil_types open Cil_datatype -open Flags (* AST inplace visitor for runtime annotation generation *) @@ -52,49 +51,52 @@ class annot_visitor kf flags on_alarm = object (self) r method private do_initialized () = - flags.initialized && not (Generator.Initialized.is_computed kf) + flags.Flags.initialized && not (Generator.Initialized.is_computed kf) method private do_mem_access () = - flags.mem_access && not (Generator.Mem_access.is_computed kf) + flags.Flags.mem_access && not (Generator.Mem_access.is_computed kf) method private do_div_mod () = - flags.div_mod && not (Generator.Div_mod.is_computed kf) + flags.Flags.div_mod && not (Generator.Div_mod.is_computed kf) method private do_shift () = - flags.shift && not (Generator.Shift.is_computed kf) + flags.Flags.shift && not (Generator.Shift.is_computed kf) method private do_left_shift_negative () = - flags.left_shift_negative + flags.Flags.left_shift_negative && not (Generator.Left_shift_negative.is_computed kf) method private do_right_shift_negative () = - flags.right_shift_negative + flags.Flags.right_shift_negative && not (Generator.Right_shift_negative.is_computed kf) method private do_signed_overflow () = - flags.signed_overflow && not (Generator.Signed_overflow.is_computed kf) + flags.Flags.signed_overflow + && not (Generator.Signed_overflow.is_computed kf) method private do_unsigned_overflow () = - flags.unsigned_overflow && not (Generator.Unsigned_overflow.is_computed kf) + flags.Flags.unsigned_overflow + && not (Generator.Unsigned_overflow.is_computed kf) method private do_signed_downcast () = - flags.signed_downcast && not (Generator.Signed_downcast.is_computed kf) + flags.Flags.signed_downcast + && not (Generator.Signed_downcast.is_computed kf) method private do_unsigned_downcast () = - flags.unsigned_downcast && - not (Generator.Unsigned_downcast.is_computed kf) + flags.Flags.unsigned_downcast + && not (Generator.Unsigned_downcast.is_computed kf) method private do_float_to_int () = - flags.float_to_int && not (Generator.Float_to_int.is_computed kf) + flags.Flags.float_to_int && not (Generator.Float_to_int.is_computed kf) method private do_finite_float () = - flags.finite_float && not (Generator.Finite_float.is_computed kf) + flags.Flags.finite_float && not (Generator.Finite_float.is_computed kf) method private do_pointer_call () = - flags.pointer_call && not (Generator.Pointer_call.is_computed kf) + flags.Flags.pointer_call && not (Generator.Pointer_call.is_computed kf) method private do_bool_value () = - flags.bool_value && not (Generator.Bool_value.is_computed kf) + flags.Flags.bool_value && not (Generator.Bool_value.is_computed kf) method private queue_stmt_spec spec = let stmt = Extlib.the (self#current_stmt) in @@ -108,7 +110,7 @@ class annot_visitor kf flags on_alarm = object (self) fun fgen -> let stmt = Extlib.the (self#current_stmt) in let on_alarm ~invalid a = on_alarm stmt ~invalid a in - fgen ~remove_trivial:flags.remove_trivial ~on_alarm + fgen ~remove_trivial:flags.Flags.remove_trivial ~on_alarm method! vstmt s = match s.skind with | UnspecifiedSequence l -> @@ -430,6 +432,7 @@ let annotate ?flags kf = (* Strict version of ||, because [comp] has side-effects *) let (|||) a b = a || b in let open Generator in + let open Flags in if comp Initialized.accessor flags.initialized ||| comp Mem_access.accessor flags.mem_access ||| comp Pointer_call.accessor flags.pointer_call ||| -- GitLab From acc4e5c3c1ec7bff8e6eb294d01e844abc3fd31d Mon Sep 17 00:00:00 2001 From: Julien Signoles <julien.signoles@cea.fr> Date: Thu, 21 Feb 2019 10:54:57 +0100 Subject: [PATCH 020/376] indent --- src/plugins/rte/visit.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/rte/visit.ml b/src/plugins/rte/visit.ml index 0a7c6fa81ba..41f597a4fc0 100644 --- a/src/plugins/rte/visit.ml +++ b/src/plugins/rte/visit.ml @@ -72,19 +72,19 @@ class annot_visitor kf flags on_alarm = object (self) method private do_signed_overflow () = flags.Flags.signed_overflow - && not (Generator.Signed_overflow.is_computed kf) + && not (Generator.Signed_overflow.is_computed kf) method private do_unsigned_overflow () = flags.Flags.unsigned_overflow - && not (Generator.Unsigned_overflow.is_computed kf) + && not (Generator.Unsigned_overflow.is_computed kf) method private do_signed_downcast () = flags.Flags.signed_downcast - && not (Generator.Signed_downcast.is_computed kf) + && not (Generator.Signed_downcast.is_computed kf) method private do_unsigned_downcast () = flags.Flags.unsigned_downcast - && not (Generator.Unsigned_downcast.is_computed kf) + && not (Generator.Unsigned_downcast.is_computed kf) method private do_float_to_int () = flags.Flags.float_to_int && not (Generator.Float_to_int.is_computed kf) -- GitLab From dc658cd73fc73de366b739da002eefdbe43ab800 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Fri, 22 Feb 2019 10:19:52 +0100 Subject: [PATCH 021/376] [libc] avoid clang complains on unknown attributes when parsing libc especially useful for frama-clang, but could come handy should a user want to use clang as C pre-processor --- share/libc/features.h | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/share/libc/features.h b/share/libc/features.h index 08d5c8de3db..5c54040b141 100644 --- a/share/libc/features.h +++ b/share/libc/features.h @@ -34,12 +34,27 @@ #define __POP_FC_STDLIB #endif +#ifdef __clang__ +# define __CLANG_IGNORE_ATTRS_PUSH__ \ +_Pragma("clang diagnostic push") \ +_Pragma("clang diagnostic ignored \"-Wunknown-attributes\"") +# define __CLANG_IGNORE_ATTRS_POP__ \ +_Pragma("clang diagnostic pop") +#else +# define __CLANG_IGNORE_ATTRS_PUSH__ +# define __CLANG_IGNORE_ATTRS_POP__ +#endif + #ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } +# define __BEGIN_DECLS \ +extern "C" { \ + __CLANG_IGNORE_ATTRS_PUSH__ +# define __END_DECLS \ +__CLANG_IGNORE_ATTRS_POP__ \ +} #else -# define __BEGIN_DECLS -# define __END_DECLS +# define __BEGIN_DECLS __CLANG_IGNORE_ATTRS_PUSH__ +# define __END_DECLS __CLANG_IGNORE_ATTRS_POP__ #endif #undef __LEAF -- GitLab From ae68452a9eddc0d1e49438df91adea4398b16b44 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Fri, 22 Feb 2019 11:47:22 +0100 Subject: [PATCH 022/376] [Kernel] fixes help message about -PLUGIN-warn-key --- src/kernel_services/plugin_entry_points/plugin.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel_services/plugin_entry_points/plugin.ml b/src/kernel_services/plugin_entry_points/plugin.ml index 6048de1b0a8..fa721f6e114 100644 --- a/src/kernel_services/plugin_entry_points/plugin.ml +++ b/src/kernel_services/plugin_entry_points/plugin.ml @@ -734,7 +734,7 @@ struct let arg_name="k1[=s1][,...,kn[=sn]]" let help = "set warning status for category <k1> to <s1>,...,<kn> to <sn>. Use " - ^ debug_category_optname + ^ warn_category_optname ^ " help to get a list of available categories, and * to enable \ all categories. Possible statuses are inactive, feedback-once, \ once, active, error-once, error, and abort. Defaults to active" -- GitLab From 0a02f7e9306dc44fc76ef1bca0304fe9502dc36a Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Tue, 22 Jan 2019 18:58:39 +0100 Subject: [PATCH 023/376] [Libc] add several specs --- share/libc/signal.h | 32 +++- share/libc/stdlib.h | 12 +- share/libc/string.h | 15 +- share/libc/unistd.h | 34 +++- tests/builtins/oracle/imprecise.res.oracle | 12 ++ tests/builtins/oracle/memcpy.res.oracle | 25 ++- tests/builtins/oracle/memcpy2.res.oracle | 2 + tests/builtins/oracle/strnlen.res.oracle | 2 + tests/builtins/oracle/write-const.res.oracle | 8 + tests/libc/oracle/coverage.res.oracle | 2 +- tests/libc/oracle/fc_libc.0.res.oracle | 102 +++++------ tests/libc/oracle/fc_libc.1.res.oracle | 96 ++++++++++ tests/libc/oracle/netdb_c.res.oracle | 1 + tests/libc/oracle/signal_h.res.oracle | 177 +++++++++++++++++++ tests/libc/oracle/stdlib_h.res.oracle | 8 + tests/libc/oracle/string_h.res.oracle | 30 ++-- tests/libc/oracle/unistd_h.0.res.oracle | 50 ++++-- tests/libc/oracle/unistd_h.1.res.oracle | 50 ++++-- tests/libc/signal_h.c | 11 ++ tests/libc/stdlib_h.c | 4 + tests/libc/string_h.c | 3 +- tests/libc/unistd_h.c | 4 + 22 files changed, 576 insertions(+), 104 deletions(-) diff --git a/share/libc/signal.h b/share/libc/signal.h index f1eb5d6cc1b..d39758a71cc 100644 --- a/share/libc/signal.h +++ b/share/libc/signal.h @@ -96,7 +96,8 @@ typedef __fc_sighandler_t sig_t; #define SIGSYS 31 #define SIGUNUSED 31 - +#define SIGRTMIN 32 +#define SIGRTMAX 64 #define SA_NOCLDSTOP 0x00000001 #define SA_NOCLDWAIT 0x00000002 @@ -198,9 +199,25 @@ extern int sigdelset(sigset_t *set, int signum); */ extern int sigismember(const sigset_t *set, int signum); -extern int sigaction(int signum, const struct sigaction *act, - struct sigaction *oldact); - +extern struct sigaction __fc_sigaction[SIGRTMAX+1]; +extern struct sigaction *__fc_p_sigaction = __fc_sigaction; + +/*@ // missing: errno may be set to EINVAL when trying to set some signals + requires valid_signal: 0 <= signum <= SIGRTMAX; + requires valid_oldact_or_null: oldact == \null || \valid(oldact); + requires valid_read_act_or_null: act == \null || \valid_read(act); + requires separation:separated_acts: \separated(act, oldact); + assigns oldact == \null ? \empty : *oldact \from __fc_p_sigaction; + assigns act == \null ? \empty : __fc_p_sigaction[signum] \from *act; + assigns \result \from indirect:signum, indirect:act, indirect:*act, + indirect:oldact, indirect:*oldact; + ensures act_changed: act == \null || \subset(__fc_p_sigaction[signum], *act); + ensures oldact_assigned: oldact == \null || + \subset({*oldact}, __fc_p_sigaction[signum]); + ensures result_ok_or_error: \result == 0 || \result == -1; + */ +extern int sigaction(int signum, const struct sigaction *restrict act, + struct sigaction *restrict oldact); /*@ // missing: assigns *oldset \from 'previous mask in process' requires valid_set_or_null: set == \null || \valid_read(set); @@ -226,6 +243,13 @@ extern int sigprocmask(int how, const sigset_t * restrict set, */ extern int kill(pid_t pid, int sig); +/*@ // missing: errno may be set to EINVAL, EPERM, ESRCH + // missing: assigns 'other processes' \from 'other processes' + assigns \result \from indirect:pgrp, indirect: sig; + ensures result_ok_or_error: \result == 0 || \result == -1; +*/ +extern int killpg(pid_t pgrp, int sig); + __END_DECLS __POP_FC_STDLIB diff --git a/share/libc/stdlib.h b/share/libc/stdlib.h index e69ed2aa5b7..98a172ccdb0 100644 --- a/share/libc/stdlib.h +++ b/share/libc/stdlib.h @@ -593,7 +593,6 @@ extern size_t wcstombs(char * restrict s, const wchar_t * restrict pwcs, size_t n); - // Note: this specification should ideally use a more specific predicate, // such as 'is_allocable_aligned(alignment, size)'. /*@ @@ -622,6 +621,17 @@ extern size_t wcstombs(char * restrict s, */ extern int posix_memalign(void **memptr, size_t alignment, size_t size); +/*@ + // missing: requires 'last 6 characters of template must be XXXXXX' + // missing: assigns \result, template[0..] \from 'filesystem', 'RNG'; + requires valid_template: valid_string(template); + assigns template[0..] \from \nothing; + assigns \result \from \nothing; + ensures result_error_or_valid_fd: \result == -1 || + 0 <= \result < __FC_FOPEN_MAX; + */ +extern int mkstemp(char *template); + __END_DECLS __POP_FC_STDLIB diff --git a/share/libc/string.h b/share/libc/string.h index b9e46ee597e..1721e2dde50 100644 --- a/share/libc/string.h +++ b/share/libc/string.h @@ -502,15 +502,24 @@ extern char *strdup (const char *s); extern char *strndup (const char *s, size_t n); // More POSIX, non-C99 functions -#ifdef _POSIX_C_SOURCE extern char *stpncpy(char *restrict dest, const char *restrict src, size_t n); //extern int strcoll_l(const char *s1, const char *s2, locale_t locale); //extern char *strerror_l(int errnum, locale_t locale); extern int strerror_r(int errnum, char *strerrbuf, size_t buflen); -extern char *strsignal(int sig); + +extern char __fc_strsignal[64]; +char * const __fc_p_strsignal = __fc_strsignal; + +/*@ //missing: requires valid_signal(signum); + @ assigns \result \from __fc_p_strsignal, indirect:signum; + @ ensures result_internal_str: \result == __fc_p_strsignal; + @ ensures result_nul_terminated: \result[63] == 0; + @ ensures result_valid_string: valid_read_string(\result); + @*/ +extern char *strsignal(int signum); + //extern size_t strxfrm_l(char *restrict s1, const char *restrict s2, size_t n, // locale_t locale); -#endif __END_DECLS diff --git a/share/libc/unistd.h b/share/libc/unistd.h index d3e906a43b3..a966cf7cbf7 100644 --- a/share/libc/unistd.h +++ b/share/libc/unistd.h @@ -900,7 +900,15 @@ extern char *getlogin(void); extern int getlogin_r(char *, size_t); extern int getpagesize(void); extern char *getpass(const char *); -extern pid_t getpgid(pid_t); + +/*@ //missing: assigns \result \from 'process PGID' + assigns \result \from indirect:pid; +*/ +extern pid_t getpgid(pid_t pid); + +/*@ //missing: assigns \result \from 'calling process PGID' + assigns \result \from \nothing; +*/ extern pid_t getpgrp(void); /*@ //missing: assigns \result \from 'process id' @@ -998,7 +1006,13 @@ extern int seteuid(uid_t uid); */ extern int setgid(gid_t gid); -extern int setpgid(pid_t, pid_t); +/*@ // missing: may assign to errno + // missing: assigns \result \from 'processes' + assigns \result \from indirect:pid, indirect:pgid; + ensures result_ok_or_error: \result == 0 || \result == -1; +*/ +extern int setpgid(pid_t pid, pid_t pgid); + extern pid_t setpgrp(void); /*@ // missing: may assign errno to EINVAL, EPERM or EAGAIN @@ -1063,12 +1077,16 @@ extern char *ttyname(int fildes); extern int ttyname_r(int, char *, size_t); extern useconds_t ualarm(useconds_t, useconds_t); -extern int unlink(const char *); -// usleep is not POSIX anymore since 200809 -#if (_XOPEN_SOURCE >= 500) && ! (_POSIX_C_SOURCE >= 200809L) \ - || /* Glibc since 2.19: */ defined _DEFAULT_SOURCE \ - || /* Glibc versions <= 2.19: */ defined _BSD_SOURCE +/*@ // missing: may assign errno + // missing: assigns 'filesystem' \from path[0..]; + // missing: assigns \result \from 'filesystem'; + requires valid_string_path: valid_read_string(path); + assigns \result \from path[0..]; + ensures result_ok_or_error: \result == 0 || \result == -1; + */ +extern int unlink(const char *path); + /*@ assigns \result \from indirect:usec, indirect:Frama_C_entropy_source; assigns Frama_C_entropy_source \from Frama_C_entropy_source; @@ -1076,8 +1094,6 @@ extern int unlink(const char *); */ extern int usleep(useconds_t usec); -#endif - extern pid_t vfork(void); /*@ diff --git a/tests/builtins/oracle/imprecise.res.oracle b/tests/builtins/oracle/imprecise.res.oracle index 14a7a8fc9c7..d77f1466122 100644 --- a/tests/builtins/oracle/imprecise.res.oracle +++ b/tests/builtins/oracle/imprecise.res.oracle @@ -59,6 +59,8 @@ __fc_strtok_ptr ∈ {0} __fc_strerror[0..63] ∈ [--..--] __fc_p_strerror ∈ {{ &__fc_strerror[0] }} + __fc_strsignal[0..63] ∈ [--..--] + __fc_p_strsignal ∈ {{ &__fc_strsignal[0] }} i ∈ {1} j ∈ {1; 2} k[0..4] ∈ [--..--] @@ -143,6 +145,8 @@ __fc_strtok_ptr ∈ {0} __fc_strerror[0..63] ∈ [--..--] __fc_p_strerror ∈ {{ &__fc_strerror[0] }} + __fc_strsignal[0..63] ∈ [--..--] + __fc_p_strsignal ∈ {{ &__fc_strsignal[0] }} v ∈ [--..--] addr ∈ [--..--] v1.[bits 0 to 7] ∈ {1} @@ -179,6 +183,8 @@ __fc_strtok_ptr ∈ {0} __fc_strerror[0..63] ∈ [--..--] __fc_p_strerror ∈ {{ &__fc_strerror[0] }} + __fc_strsignal[0..63] ∈ [--..--] + __fc_p_strsignal ∈ {{ &__fc_strsignal[0] }} v ∈ [--..--] addr ∈ [--..--] v1.[bits 0 to 7] ∈ {1} @@ -624,6 +630,8 @@ __fc_strtok_ptr ∈ {{ NULL ; &S___fc_strtok_ptr[0] }} __fc_strerror[0..63] ∈ [--..--] __fc_p_strerror ∈ {{ &__fc_strerror[0] }} + __fc_strsignal[0..63] ∈ [--..--] + __fc_p_strsignal ∈ {{ &__fc_strsignal[0] }} i ∈ {1} j ∈ {1; 2} k[0..4] ∈ [--..--] @@ -702,6 +710,8 @@ __fc_strtok_ptr ∈ {{ NULL ; &S___fc_strtok_ptr[0] }} __fc_strerror[0..63] ∈ [--..--] __fc_p_strerror ∈ {{ &__fc_strerror[0] }} + __fc_strsignal[0..63] ∈ [--..--] + __fc_p_strsignal ∈ {{ &__fc_strsignal[0] }} v ∈ [--..--] addr ∈ [--..--] v1.[bits 0 to 7] ∈ {1} @@ -741,6 +751,8 @@ __fc_strtok_ptr ∈ {{ NULL ; &S___fc_strtok_ptr[0] }} __fc_strerror[0..63] ∈ [--..--] __fc_p_strerror ∈ {{ &__fc_strerror[0] }} + __fc_strsignal[0..63] ∈ [--..--] + __fc_p_strsignal ∈ {{ &__fc_strsignal[0] }} v ∈ [--..--] addr ∈ [--..--] v1.[bits 0 to 7] ∈ {1} diff --git a/tests/builtins/oracle/memcpy.res.oracle b/tests/builtins/oracle/memcpy.res.oracle index 34325075722..c767cf17fb5 100644 --- a/tests/builtins/oracle/memcpy.res.oracle +++ b/tests/builtins/oracle/memcpy.res.oracle @@ -400,6 +400,8 @@ __fc_strtok_ptr ∈ {0} __fc_strerror[0..63] ∈ [--..--] __fc_p_strerror ∈ {{ &__fc_strerror[0] }} + __fc_strsignal[0..63] ∈ [--..--] + __fc_p_strsignal ∈ {{ &__fc_strsignal[0] }} i ∈ [--..--] src[0..19] ∈ {0} dst1[0..19] ∈ {0} @@ -1718,6 +1720,23 @@ [ Extern ] Frees/Allocates for 'no_allocation' nothing/nothing Unverifiable but considered Valid. +-------------------------------------------------------------------------------- +--- Properties of Function 'strsignal' +-------------------------------------------------------------------------------- + +[ Extern ] Post-condition 'result_internal_str' + Unverifiable but considered Valid. +[ Extern ] Post-condition 'result_nul_terminated' + Unverifiable but considered Valid. +[ Extern ] Post-condition 'result_valid_string' + Unverifiable but considered Valid. +[ Extern ] Assigns nothing + Unverifiable but considered Valid. +[ Extern ] Froms (file share/libc/string.h, line 514) + Unverifiable but considered Valid. +[ Valid ] Default behavior + by Frama-C kernel. + -------------------------------------------------------------------------------- --- Properties of Function 'bzero' -------------------------------------------------------------------------------- @@ -2166,9 +2185,9 @@ -------------------------------------------------------------------------------- --- Status Report Summary -------------------------------------------------------------------------------- - 158 Completely validated - 225 Considered valid + 159 Completely validated + 230 Considered valid 29 To be validated 4 Alarms emitted - 416 Total + 422 Total -------------------------------------------------------------------------------- diff --git a/tests/builtins/oracle/memcpy2.res.oracle b/tests/builtins/oracle/memcpy2.res.oracle index bd415ec9eac..912286440a4 100644 --- a/tests/builtins/oracle/memcpy2.res.oracle +++ b/tests/builtins/oracle/memcpy2.res.oracle @@ -27,6 +27,8 @@ __fc_strtok_ptr ∈ {0} __fc_strerror[0..63] ∈ [--..--] __fc_p_strerror ∈ {{ &__fc_strerror[0] }} + __fc_strsignal[0..63] ∈ [--..--] + __fc_p_strsignal ∈ {{ &__fc_strsignal[0] }} c ∈ [--..--] v ∈ {{ NULL ; &S_v[0] }} t[0..510] ∈ {0} or UNINITIALIZED diff --git a/tests/builtins/oracle/strnlen.res.oracle b/tests/builtins/oracle/strnlen.res.oracle index 9cacd457242..097bcf8ac85 100644 --- a/tests/builtins/oracle/strnlen.res.oracle +++ b/tests/builtins/oracle/strnlen.res.oracle @@ -47,6 +47,8 @@ __fc_strtok_ptr ∈ {0} __fc_strerror[0..63] ∈ [--..--] __fc_p_strerror ∈ {{ &__fc_strerror[0] }} + __fc_strsignal[0..63] ∈ [--..--] + __fc_p_strsignal ∈ {{ &__fc_strsignal[0] }} t1[0] ∈ {97} [1] ∈ {98} [2] ∈ {99} diff --git a/tests/builtins/oracle/write-const.res.oracle b/tests/builtins/oracle/write-const.res.oracle index 35487069277..8b39ca3d183 100644 --- a/tests/builtins/oracle/write-const.res.oracle +++ b/tests/builtins/oracle/write-const.res.oracle @@ -24,6 +24,8 @@ __fc_strtok_ptr ∈ {0} __fc_strerror[0..63] ∈ [--..--] __fc_p_strerror ∈ {{ &__fc_strerror[0] }} + __fc_strsignal[0..63] ∈ [--..--] + __fc_p_strsignal ∈ {{ &__fc_strsignal[0] }} v ∈ [--..--] a ∈ {-1} b ∈ {1} @@ -49,6 +51,8 @@ __fc_strtok_ptr ∈ {0} __fc_strerror[0..63] ∈ [--..--] __fc_p_strerror ∈ {{ &__fc_strerror[0] }} + __fc_strsignal[0..63] ∈ [--..--] + __fc_p_strsignal ∈ {{ &__fc_strsignal[0] }} v ∈ [--..--] a ∈ {-1} b ∈ {84215045} @@ -71,6 +75,8 @@ __fc_strtok_ptr ∈ {0} __fc_strerror[0..63] ∈ [--..--] __fc_p_strerror ∈ {{ &__fc_strerror[0] }} + __fc_strsignal[0..63] ∈ [--..--] + __fc_p_strsignal ∈ {{ &__fc_strsignal[0] }} v ∈ [--..--] a ∈ {-1} b ∈ {1} @@ -92,6 +98,8 @@ __fc_strtok_ptr ∈ {0} __fc_strerror[0..63] ∈ [--..--] __fc_p_strerror ∈ {{ &__fc_strerror[0] }} + __fc_strsignal[0..63] ∈ [--..--] + __fc_p_strsignal ∈ {{ &__fc_strsignal[0] }} v ∈ [--..--] a ∈ {-1} b ∈ {2} diff --git a/tests/libc/oracle/coverage.res.oracle b/tests/libc/oracle/coverage.res.oracle index 81b8f86a27e..abb4e7886a7 100644 --- a/tests/libc/oracle/coverage.res.oracle +++ b/tests/libc/oracle/coverage.res.oracle @@ -28,7 +28,7 @@ main: 4 stmts out of 4 (100.0%) [metrics] Eva coverage statistics ======================= - Syntactically reachable functions = 2 (out of 78) + Syntactically reachable functions = 2 (out of 80) Semantically reached functions = 2 Coverage estimation = 100.0% [metrics] Statements analyzed by Eva diff --git a/tests/libc/oracle/fc_libc.0.res.oracle b/tests/libc/oracle/fc_libc.0.res.oracle index 32c4f831a3a..461bda59470 100644 --- a/tests/libc/oracle/fc_libc.0.res.oracle +++ b/tests/libc/oracle/fc_libc.0.res.oracle @@ -38,7 +38,7 @@ wcslen (2 calls); wcsncat (0 call); wcsncpy (0 call); wmemcpy (0 call); wmemset (0 call); - Undefined functions (367) + Undefined functions (375) ========================= FD_CLR (0 call); FD_ISSET (0 call); FD_SET (0 call); FD_ZERO (0 call); Frama_C_abort (1 call); Frama_C_char_interval (1 call); @@ -93,25 +93,26 @@ getc_unlocked (0 call); getchar (0 call); getchar_unlocked (0 call); getcwd (0 call); getegid (0 call); geteuid (0 call); getgid (0 call); gethostname (0 call); getitimer (0 call); getopt (0 call); - getopt_long (0 call); getopt_long_only (0 call); getpid (0 call); - getppid (0 call); getpriority (0 call); getpwnam (0 call); - getpwuid (0 call); getresgid (0 call); getresuid (0 call); - getrlimit (0 call); getrusage (0 call); gets (0 call); getsid (0 call); - getsockopt (0 call); gettimeofday (0 call); getuid (0 call); - gmtime (0 call); htonl (0 call); htons (0 call); iconv (0 call); - iconv_close (0 call); iconv_open (0 call); inet_addr (2 calls); - inet_ntoa (0 call); inet_ntop (0 call); inet_pton (0 call); - isascii (0 call); isatty (0 call); kill (0 call); labs (0 call); - ldiv (0 call); listen (0 call); llabs (0 call); lldiv (0 call); - localtime (0 call); log (0 call); log10 (0 call); log10f (0 call); - log10l (0 call); log2 (0 call); log2f (0 call); log2l (0 call); - logf (0 call); logl (0 call); longjmp (0 call); lrand48 (0 call); - malloc (7 calls); mblen (0 call); mbstowcs (0 call); mbtowc (0 call); - memoverlap (1 call); mkdir (0 call); mktime (0 call); nan (0 call); - nanf (0 call); nanl (0 call); nanosleep (0 call); ntohl (0 call); - ntohs (0 call); open (0 call); openat (0 call); opendir (0 call); - openlog (0 call); pathconf (0 call); pclose (0 call); perror (0 call); - pipe (0 call); poll (0 call); popen (0 call); pow (0 call); powf (0 call); + getopt_long (0 call); getopt_long_only (0 call); getpgid (0 call); + getpgrp (0 call); getpid (0 call); getppid (0 call); getpriority (0 call); + getpwnam (0 call); getpwuid (0 call); getresgid (0 call); + getresuid (0 call); getrlimit (0 call); getrusage (0 call); gets (0 call); + getsid (0 call); getsockopt (0 call); gettimeofday (0 call); + getuid (0 call); gmtime (0 call); htonl (0 call); htons (0 call); + iconv (0 call); iconv_close (0 call); iconv_open (0 call); + inet_addr (2 calls); inet_ntoa (0 call); inet_ntop (0 call); + inet_pton (0 call); isascii (0 call); isatty (0 call); kill (0 call); + killpg (0 call); labs (0 call); ldiv (0 call); listen (0 call); + llabs (0 call); lldiv (0 call); localtime (0 call); log (0 call); + log10 (0 call); log10f (0 call); log10l (0 call); log2 (0 call); + log2f (0 call); log2l (0 call); logf (0 call); logl (0 call); + longjmp (0 call); lrand48 (0 call); malloc (7 calls); mblen (0 call); + mbstowcs (0 call); mbtowc (0 call); memoverlap (1 call); mkdir (0 call); + mkstemp (0 call); mktime (0 call); nan (0 call); nanf (0 call); + nanl (0 call); nanosleep (0 call); ntohl (0 call); ntohs (0 call); + open (0 call); openat (0 call); opendir (0 call); openlog (0 call); + pathconf (0 call); pclose (0 call); perror (0 call); pipe (0 call); + poll (0 call); popen (0 call); pow (0 call); powf (0 call); pthread_cond_broadcast (0 call); pthread_cond_destroy (0 call); pthread_cond_init (0 call); pthread_cond_wait (0 call); pthread_create (0 call); pthread_join (0 call); @@ -125,40 +126,41 @@ roundf (0 call); roundl (0 call); select (0 call); send (0 call); setbuf (0 call); setegid (0 call); seteuid (0 call); setgid (0 call); sethostname (0 call); setitimer (0 call); setjmp (0 call); - setlogmask (0 call); setpriority (0 call); setregid (0 call); - setresgid (0 call); setresuid (0 call); setreuid (0 call); - setrlimit (0 call); setsid (0 call); setsockopt (0 call); + setlogmask (0 call); setpgid (0 call); setpriority (0 call); + setregid (0 call); setresgid (0 call); setresuid (0 call); + setreuid (0 call); setrlimit (0 call); setsid (0 call); setsockopt (0 call); settimeofday (0 call); setuid (0 call); setvbuf (0 call); shutdown (0 call); - sigaddset (0 call); sigdelset (0 call); sigemptyset (0 call); - sigfillset (0 call); sigismember (0 call); siglongjmp (0 call); - signal (0 call); sigprocmask (0 call); sin (0 call); sinf (0 call); - sinl (0 call); socket (0 call); socketpair (0 call); sqrt (0 call); - sqrtf (0 call); sqrtl (0 call); srand (0 call); srand48 (0 call); - srandom (0 call); stat (0 call); strcoll (0 call); strcspn (0 call); - strftime (0 call); strlcat (0 call); strlcpy (0 call); strncasecmp (0 call); - strpbrk (0 call); strsep (0 call); strspn (0 call); strtod (0 call); - strtof (0 call); strtoimax (0 call); strtok (0 call); strtok_r (0 call); - strtol (0 call); strtold (0 call); strtoll (0 call); strtoul (0 call); - strtoull (0 call); strxfrm (0 call); sync (0 call); sysconf (0 call); - syslog (0 call); system (0 call); tcgetattr (0 call); tcsetattr (0 call); - time (0 call); times (0 call); tmpfile (0 call); tmpnam (0 call); - trunc (0 call); truncf (0 call); truncl (0 call); ttyname (0 call); - tzset (0 call); umask (0 call); ungetc (0 call); usleep (0 call); - utimes (0 call); vfprintf (0 call); vfscanf (0 call); vprintf (0 call); - vscanf (0 call); vsnprintf (0 call); vsprintf (0 call); vsyslog (0 call); - wait (0 call); waitpid (0 call); wcschr (0 call); wcscmp (0 call); - wcscspn (0 call); wcslcat (0 call); wcslcpy (0 call); wcsncmp (0 call); - wcspbrk (0 call); wcsrchr (0 call); wcsspn (0 call); wcsstr (0 call); - wcstombs (0 call); wctomb (0 call); wmemchr (0 call); wmemcmp (0 call); - wmemmove (0 call); write (0 call); + sigaction (0 call); sigaddset (0 call); sigdelset (0 call); + sigemptyset (0 call); sigfillset (0 call); sigismember (0 call); + siglongjmp (0 call); signal (0 call); sigprocmask (0 call); sin (0 call); + sinf (0 call); sinl (0 call); socket (0 call); socketpair (0 call); + sqrt (0 call); sqrtf (0 call); sqrtl (0 call); srand (0 call); + srand48 (0 call); srandom (0 call); stat (0 call); strcoll (0 call); + strcspn (0 call); strftime (0 call); strlcat (0 call); strlcpy (0 call); + strncasecmp (0 call); strpbrk (0 call); strsep (0 call); strsignal (0 call); + strspn (0 call); strtod (0 call); strtof (0 call); strtoimax (0 call); + strtok (0 call); strtok_r (0 call); strtol (0 call); strtold (0 call); + strtoll (0 call); strtoul (0 call); strtoull (0 call); strxfrm (0 call); + sync (0 call); sysconf (0 call); syslog (0 call); system (0 call); + tcgetattr (0 call); tcsetattr (0 call); time (0 call); times (0 call); + tmpfile (0 call); tmpnam (0 call); trunc (0 call); truncf (0 call); + truncl (0 call); ttyname (0 call); tzset (0 call); umask (0 call); + ungetc (0 call); unlink (0 call); usleep (0 call); utimes (0 call); + vfprintf (0 call); vfscanf (0 call); vprintf (0 call); vscanf (0 call); + vsnprintf (0 call); vsprintf (0 call); vsyslog (0 call); wait (0 call); + waitpid (0 call); wcschr (0 call); wcscmp (0 call); wcscspn (0 call); + wcslcat (0 call); wcslcpy (0 call); wcsncmp (0 call); wcspbrk (0 call); + wcsrchr (0 call); wcsspn (0 call); wcsstr (0 call); wcstombs (0 call); + wctomb (0 call); wmemchr (0 call); wmemcmp (0 call); wmemmove (0 call); + write (0 call); - 'Extern' global variables (18) + 'Extern' global variables (20) ============================== __fc_basename; __fc_dirname; __fc_getpwuid_pw_dir; __fc_getpwuid_pw_gid; __fc_getpwuid_pw_name; __fc_getpwuid_pw_passwd; __fc_getpwuid_pw_shell; __fc_getpwuid_pw_uid; __fc_hostname; __fc_mblen_state; __fc_mbtowc_state; - __fc_strerror; __fc_ttyname; __fc_wctomb_state; optarg; opterr; optopt; - tzname + __fc_sigaction; __fc_strerror; __fc_strsignal; __fc_ttyname; + __fc_wctomb_state; optarg; opterr; optopt; tzname Potential entry points (1) ========================== @@ -168,13 +170,13 @@ ============== Sloc = 1026 Decision point = 195 - Global variables = 61 + Global variables = 65 If = 186 Loop = 42 Goto = 84 Assignment = 415 Exit point = 76 - Function = 443 + Function = 451 Function call = 84 Pointer dereferencing = 157 Cyclomatic complexity = 271 diff --git a/tests/libc/oracle/fc_libc.1.res.oracle b/tests/libc/oracle/fc_libc.1.res.oracle index e56f5e98e8c..88c0df5a8f9 100644 --- a/tests/libc/oracle/fc_libc.1.res.oracle +++ b/tests/libc/oracle/fc_libc.1.res.oracle @@ -122,6 +122,28 @@ typedef int pid_t; typedef unsigned int gid_t; typedef unsigned int uid_t; typedef unsigned long sigset_t; +union sigval { + int sival_int ; + void *sival_ptr ; +}; +struct __anonstruct_siginfo_t_20 { + int si_signo ; + int si_code ; + union sigval si_value ; + int si_errno ; + pid_t si_pid ; + uid_t si_uid ; + void *si_addr ; + int si_status ; + int si_band ; +}; +typedef struct __anonstruct_siginfo_t_20 siginfo_t; +struct sigaction { + void (*sa_handler)(int ) ; + void (*sa_sigaction)(int , siginfo_t *, void *) ; + sigset_t sa_mask ; + int sa_flags ; +}; typedef unsigned int socklen_t; typedef unsigned short sa_family_t; struct sockaddr { @@ -1923,6 +1945,15 @@ extern size_t wcstombs(char * __restrict s, wchar_t const * __restrict pwcs, int posix_memalign(void **memptr, size_t alignment, size_t size); +/*@ requires valid_template: valid_string(template); + ensures + result_error_or_valid_fd: \result ≡ -1 ∨ (0 ≤ \result < 16); + assigns *(template + (0 ..)), \result; + assigns *(template + (0 ..)) \from \nothing; + assigns \result \from \nothing; + */ +extern int mkstemp(char *template); + int glob(char const *pattern, int flags, int (*errfunc)(char const *epath, int eerrno), glob_t *pglob) { @@ -2898,6 +2929,33 @@ extern int sigdelset(sigset_t *set, int signum); */ extern int sigismember(sigset_t const *set, int signum); +extern struct sigaction __fc_sigaction[64 + 1]; + +struct sigaction *__fc_p_sigaction = __fc_sigaction; +/*@ requires valid_signal: 0 ≤ signum ≤ 64; + requires valid_oldact_or_null: oldact ≡ \null ∨ \valid(oldact); + requires valid_read_act_or_null: act ≡ \null ∨ \valid_read(act); + requires separation: separated_acts: \separated(act, oldact); + ensures + act_changed: + \old(act) ≡ \null ∨ + \subset(*(__fc_p_sigaction + \old(signum)), *\old(act)); + ensures + oldact_assigned: + \old(oldact) ≡ \null ∨ + *\old(oldact) ∈ *(__fc_p_sigaction + \old(signum)); + ensures result_ok_or_error: \result ≡ 0 ∨ \result ≡ -1; + assigns oldact ≡ \null? \empty: *oldact, + act ≡ \null? \empty: *(__fc_p_sigaction + signum), \result; + assigns oldact ≡ \null? \empty: *oldact \from __fc_p_sigaction; + assigns act ≡ \null? \empty: *(__fc_p_sigaction + signum) \from *act; + assigns \result + \from (indirect: signum), (indirect: act), (indirect: *act), + (indirect: oldact), (indirect: *oldact); + */ +extern int sigaction(int signum, struct sigaction const * __restrict act, + struct sigaction * __restrict oldact); + /*@ requires valid_set_or_null: set ≡ \null ∨ \valid_read(set); requires valid_how: set ≢ \null ⇒ how ∈ {0, 2, 1}; requires valid_oldset_or_null: oldset ≡ \null ∨ \valid(oldset); @@ -2923,6 +2981,12 @@ extern int sigprocmask(int how, sigset_t const * __restrict set, */ extern int kill(pid_t pid, int sig); +/*@ ensures result_ok_or_error: \result ≡ 0 ∨ \result ≡ -1; + assigns \result; + assigns \result \from (indirect: pgrp), (indirect: sig); + */ +extern int killpg(pid_t pgrp, int sig); + /*@ ghost struct __fc_sockfds_type __fc_sockfds[1024]; */ /*@ ghost extern int __fc_socket_counter __attribute__((__FRAMA_C_MODEL__)); */ @@ -3524,6 +3588,17 @@ char *strdup(char const *s); char *strndup(char const *s, size_t n); +extern char __fc_strsignal[64]; + +char * const __fc_p_strsignal = __fc_strsignal; +/*@ ensures result_internal_str: \result ≡ __fc_p_strsignal; + ensures result_nul_terminated: *(\result + 63) ≡ 0; + ensures result_valid_string: valid_read_string(\result); + assigns \result; + assigns \result \from __fc_p_strsignal, (indirect: signum); + */ +extern char *strsignal(int signum); + /*@ requires valid_memory_area: \valid((char *)s + (0 .. n - 1)); ensures s_initialized: initialization: @@ -7191,6 +7266,14 @@ extern int gethostname(char *name, size_t len); */ extern int sethostname(char const *name, size_t len); +/*@ assigns \result; + assigns \result \from (indirect: pid); */ +extern pid_t getpgid(pid_t pid); + +/*@ assigns \result; + assigns \result \from \nothing; */ +extern pid_t getpgrp(void); + /*@ assigns \result; assigns \result \from \nothing; */ extern pid_t getpid(void); @@ -7263,6 +7346,12 @@ extern int seteuid(uid_t uid); */ extern int setgid(gid_t gid); +/*@ ensures result_ok_or_error: \result ≡ 0 ∨ \result ≡ -1; + assigns \result; + assigns \result \from (indirect: pid), (indirect: pgid); + */ +extern int setpgid(pid_t pid, pid_t pgid); + /*@ ensures result_ok_or_error: \result ≡ 0 ∨ \result ≡ -1; assigns \result; assigns \result \from (indirect: rgid), (indirect: egid); @@ -7304,6 +7393,13 @@ char *__fc_p_ttyname = (char *)(__fc_ttyname); */ extern char *ttyname(int fildes); +/*@ requires valid_string_path: valid_read_string(path); + ensures result_ok_or_error: \result ≡ 0 ∨ \result ≡ -1; + assigns \result; + assigns \result \from *(path + (0 ..)); + */ +extern int unlink(char const *path); + /*@ ensures result_ok_or_error: \result ≡ 0 ∨ \result ≡ -1; assigns \result, Frama_C_entropy_source; assigns \result diff --git a/tests/libc/oracle/netdb_c.res.oracle b/tests/libc/oracle/netdb_c.res.oracle index 1ceb0a03241..fcd756cf744 100644 --- a/tests/libc/oracle/netdb_c.res.oracle +++ b/tests/libc/oracle/netdb_c.res.oracle @@ -33,6 +33,7 @@ \return(strncat) == 0 (auto) \return(strdup) == 0 (auto) \return(strndup) == 0 (auto) + \return(strsignal) == 0 (auto) \return(bind) == 0 (auto) \return(socket) == -1 (auto) \return(signal) == 0 (auto) diff --git a/tests/libc/oracle/signal_h.res.oracle b/tests/libc/oracle/signal_h.res.oracle index 1d3c95b0de4..f09d621e64d 100644 --- a/tests/libc/oracle/signal_h.res.oracle +++ b/tests/libc/oracle/signal_h.res.oracle @@ -99,12 +99,189 @@ Called from tests/libc/signal_h.c:42. [eva] using specification for function kill [eva] Done for function kill +[eva] computing for function sigaction <- main. + Called from tests/libc/signal_h.c:45. +[eva] using specification for function sigaction +[eva] tests/libc/signal_h.c:45: + function sigaction: precondition 'valid_signal' got status valid. +[eva] tests/libc/signal_h.c:45: + function sigaction: precondition 'valid_oldact_or_null' got status valid. +[eva] tests/libc/signal_h.c:45: + function sigaction: precondition 'valid_read_act_or_null' got status valid. +[eva] tests/libc/signal_h.c:45: + function sigaction: precondition 'separation,separated_acts' got status valid. +[eva] Done for function sigaction +[eva] computing for function sigaction <- main. + Called from tests/libc/signal_h.c:45. +[eva] Done for function sigaction +[eva] computing for function sigaction <- main. + Called from tests/libc/signal_h.c:48. +[eva] tests/libc/signal_h.c:48: + function sigaction: precondition 'valid_signal' got status valid. +[eva] tests/libc/signal_h.c:48: + function sigaction: precondition 'valid_oldact_or_null' got status valid. +[eva] tests/libc/signal_h.c:48: + function sigaction: precondition 'valid_read_act_or_null' got status valid. +[eva] tests/libc/signal_h.c:48: + function sigaction: precondition 'separation,separated_acts' got status valid. +[eva] share/libc/signal.h:214: + cannot evaluate ACSL term, unsupported ACSL construct: logic coercion struct sigaction -> set<struct sigaction> +[eva] Done for function sigaction +[eva] computing for function sigaction <- main. + Called from tests/libc/signal_h.c:51. +[eva] tests/libc/signal_h.c:51: + function sigaction: precondition 'valid_signal' got status valid. +[eva] tests/libc/signal_h.c:51: + function sigaction: precondition 'valid_oldact_or_null' got status valid. +[eva] tests/libc/signal_h.c:51: + function sigaction: precondition 'valid_read_act_or_null' got status valid. +[eva] tests/libc/signal_h.c:51: + function sigaction: precondition 'separation,separated_acts' got status valid. +[eva] Done for function sigaction [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== [eva:final-states] Values at end of function main: + __fc_sigaction[0]{.sa_handler; .sa_sigaction} ∈ {0} + [0]{.sa_mask; .sa_flags} ∈ [--..--] + [1]{.sa_handler; .sa_sigaction} ∈ {0} + [1]{.sa_mask; .sa_flags} ∈ [--..--] + [2]{.sa_handler; .sa_sigaction} ∈ {0} + [2]{.sa_mask; .sa_flags} ∈ [--..--] + [3]{.sa_handler; .sa_sigaction} ∈ {0} + [3]{.sa_mask; .sa_flags} ∈ [--..--] + [4]{.sa_handler; .sa_sigaction} ∈ {0} + [4]{.sa_mask; .sa_flags} ∈ [--..--] + [5]{.sa_handler; .sa_sigaction} ∈ {0} + [5]{.sa_mask; .sa_flags} ∈ [--..--] + [6]{.sa_handler; .sa_sigaction} ∈ {0} + [6]{.sa_mask; .sa_flags} ∈ [--..--] + [7]{.sa_handler; .sa_sigaction} ∈ {0} + [7]{.sa_mask; .sa_flags} ∈ [--..--] + [8]{.sa_handler; .sa_sigaction} ∈ {0} + [8]{.sa_mask; .sa_flags} ∈ [--..--] + [9]{.sa_handler; .sa_sigaction} ∈ {0} + [9]{.sa_mask; .sa_flags} ∈ [--..--] + [10] ∈ + {{ garbled mix of &{__fc_sigaction} + (origin: Library function) }} + [11]{.sa_handler; .sa_sigaction} ∈ {0} + [11]{.sa_mask; .sa_flags} ∈ [--..--] + [12]{.sa_handler; .sa_sigaction} ∈ {0} + [12]{.sa_mask; .sa_flags} ∈ [--..--] + [13]{.sa_handler; .sa_sigaction} ∈ {0} + [13]{.sa_mask; .sa_flags} ∈ [--..--] + [14]{.sa_handler; .sa_sigaction} ∈ {0} + [14]{.sa_mask; .sa_flags} ∈ [--..--] + [15]{.sa_handler; .sa_sigaction} ∈ {0} + [15]{.sa_mask; .sa_flags} ∈ [--..--] + [16]{.sa_handler; .sa_sigaction} ∈ {0} + [16]{.sa_mask; .sa_flags} ∈ [--..--] + [17]{.sa_handler; .sa_sigaction} ∈ {0} + [17]{.sa_mask; .sa_flags} ∈ [--..--] + [18] ∈ + {{ garbled mix of &{__fc_sigaction} + (origin: Library function) }} + [19]{.sa_handler; .sa_sigaction} ∈ {0} + [19]{.sa_mask; .sa_flags} ∈ [--..--] + [20]{.sa_handler; .sa_sigaction} ∈ {0} + [20]{.sa_mask; .sa_flags} ∈ [--..--] + [21]{.sa_handler; .sa_sigaction} ∈ {0} + [21]{.sa_mask; .sa_flags} ∈ [--..--] + [22]{.sa_handler; .sa_sigaction} ∈ {0} + [22]{.sa_mask; .sa_flags} ∈ [--..--] + [23]{.sa_handler; .sa_sigaction} ∈ {0} + [23]{.sa_mask; .sa_flags} ∈ [--..--] + [24]{.sa_handler; .sa_sigaction} ∈ {0} + [24]{.sa_mask; .sa_flags} ∈ [--..--] + [25]{.sa_handler; .sa_sigaction} ∈ {0} + [25]{.sa_mask; .sa_flags} ∈ [--..--] + [26]{.sa_handler; .sa_sigaction} ∈ {0} + [26]{.sa_mask; .sa_flags} ∈ [--..--] + [27]{.sa_handler; .sa_sigaction} ∈ {0} + [27]{.sa_mask; .sa_flags} ∈ [--..--] + [28]{.sa_handler; .sa_sigaction} ∈ {0} + [28]{.sa_mask; .sa_flags} ∈ [--..--] + [29]{.sa_handler; .sa_sigaction} ∈ {0} + [29]{.sa_mask; .sa_flags} ∈ [--..--] + [30]{.sa_handler; .sa_sigaction} ∈ {0} + [30]{.sa_mask; .sa_flags} ∈ [--..--] + [31]{.sa_handler; .sa_sigaction} ∈ {0} + [31]{.sa_mask; .sa_flags} ∈ [--..--] + [32]{.sa_handler; .sa_sigaction} ∈ {0} + [32]{.sa_mask; .sa_flags} ∈ [--..--] + [33]{.sa_handler; .sa_sigaction} ∈ {0} + [33]{.sa_mask; .sa_flags} ∈ [--..--] + [34]{.sa_handler; .sa_sigaction} ∈ {0} + [34]{.sa_mask; .sa_flags} ∈ [--..--] + [35]{.sa_handler; .sa_sigaction} ∈ {0} + [35]{.sa_mask; .sa_flags} ∈ [--..--] + [36]{.sa_handler; .sa_sigaction} ∈ {0} + [36]{.sa_mask; .sa_flags} ∈ [--..--] + [37]{.sa_handler; .sa_sigaction} ∈ {0} + [37]{.sa_mask; .sa_flags} ∈ [--..--] + [38]{.sa_handler; .sa_sigaction} ∈ {0} + [38]{.sa_mask; .sa_flags} ∈ [--..--] + [39]{.sa_handler; .sa_sigaction} ∈ {0} + [39]{.sa_mask; .sa_flags} ∈ [--..--] + [40]{.sa_handler; .sa_sigaction} ∈ {0} + [40]{.sa_mask; .sa_flags} ∈ [--..--] + [41]{.sa_handler; .sa_sigaction} ∈ {0} + [41]{.sa_mask; .sa_flags} ∈ [--..--] + [42]{.sa_handler; .sa_sigaction} ∈ {0} + [42]{.sa_mask; .sa_flags} ∈ [--..--] + [43]{.sa_handler; .sa_sigaction} ∈ {0} + [43]{.sa_mask; .sa_flags} ∈ [--..--] + [44]{.sa_handler; .sa_sigaction} ∈ {0} + [44]{.sa_mask; .sa_flags} ∈ [--..--] + [45]{.sa_handler; .sa_sigaction} ∈ {0} + [45]{.sa_mask; .sa_flags} ∈ [--..--] + [46]{.sa_handler; .sa_sigaction} ∈ {0} + [46]{.sa_mask; .sa_flags} ∈ [--..--] + [47]{.sa_handler; .sa_sigaction} ∈ {0} + [47]{.sa_mask; .sa_flags} ∈ [--..--] + [48]{.sa_handler; .sa_sigaction} ∈ {0} + [48]{.sa_mask; .sa_flags} ∈ [--..--] + [49]{.sa_handler; .sa_sigaction} ∈ {0} + [49]{.sa_mask; .sa_flags} ∈ [--..--] + [50]{.sa_handler; .sa_sigaction} ∈ {0} + [50]{.sa_mask; .sa_flags} ∈ [--..--] + [51]{.sa_handler; .sa_sigaction} ∈ {0} + [51]{.sa_mask; .sa_flags} ∈ [--..--] + [52]{.sa_handler; .sa_sigaction} ∈ {0} + [52]{.sa_mask; .sa_flags} ∈ [--..--] + [53]{.sa_handler; .sa_sigaction} ∈ {0} + [53]{.sa_mask; .sa_flags} ∈ [--..--] + [54]{.sa_handler; .sa_sigaction} ∈ {0} + [54]{.sa_mask; .sa_flags} ∈ [--..--] + [55]{.sa_handler; .sa_sigaction} ∈ {0} + [55]{.sa_mask; .sa_flags} ∈ [--..--] + [56]{.sa_handler; .sa_sigaction} ∈ {0} + [56]{.sa_mask; .sa_flags} ∈ [--..--] + [57]{.sa_handler; .sa_sigaction} ∈ {0} + [57]{.sa_mask; .sa_flags} ∈ [--..--] + [58]{.sa_handler; .sa_sigaction} ∈ {0} + [58]{.sa_mask; .sa_flags} ∈ [--..--] + [59]{.sa_handler; .sa_sigaction} ∈ {0} + [59]{.sa_mask; .sa_flags} ∈ [--..--] + [60]{.sa_handler; .sa_sigaction} ∈ {0} + [60]{.sa_mask; .sa_flags} ∈ [--..--] + [61]{.sa_handler; .sa_sigaction} ∈ {0} + [61]{.sa_mask; .sa_flags} ∈ [--..--] + [62]{.sa_handler; .sa_sigaction} ∈ {0} + [62]{.sa_mask; .sa_flags} ∈ [--..--] + [63]{.sa_handler; .sa_sigaction} ∈ {0} + [63]{.sa_mask; .sa_flags} ∈ [--..--] + [64]{.sa_handler; .sa_sigaction} ∈ {0} + [64]{.sa_mask; .sa_flags} ∈ [--..--] s ∈ [--..--] uninit ∈ UNINITIALIZED old ∈ [--..--] or UNINITIALIZED kill_res ∈ {-1; 0} + sa1 ∈ + {{ garbled mix of &{__fc_sigaction} + (origin: Library function) }} or UNINITIALIZED + sa2 ∈ + {{ garbled mix of &{__fc_sigaction} + (origin: Library function {tests/libc/signal_h.c:48}) }} or UNINITIALIZED __retres ∈ {-1; 0; 1; 2; 3} diff --git a/tests/libc/oracle/stdlib_h.res.oracle b/tests/libc/oracle/stdlib_h.res.oracle index c9beadd4b2c..f5a2bec1be1 100644 --- a/tests/libc/oracle/stdlib_h.res.oracle +++ b/tests/libc/oracle/stdlib_h.res.oracle @@ -232,6 +232,12 @@ function bsearch: precondition 'valid_function_compar' got status valid. [eva] Done for function bsearch [eva:alarm] tests/libc/stdlib_h.c:68: Warning: assertion got status unknown. +[eva] computing for function mkstemp <- main. + Called from tests/libc/stdlib_h.c:82. +[eva] using specification for function mkstemp +[eva] tests/libc/stdlib_h.c:82: + function mkstemp: precondition 'valid_template' got status valid. +[eva] Done for function mkstemp [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== @@ -261,4 +267,6 @@ [3] ∈ {20} key ∈ {-1} p ∈ {{ &ai[1] }} + tempFilename[0..9] ∈ [--..--] + r ∈ [-1..19] __retres ∈ {0} diff --git a/tests/libc/oracle/string_h.res.oracle b/tests/libc/oracle/string_h.res.oracle index dd500d0409a..913d0fe0a7c 100644 --- a/tests/libc/oracle/string_h.res.oracle +++ b/tests/libc/oracle/string_h.res.oracle @@ -257,34 +257,39 @@ [eva] tests/libc/string_h.c:120: Warning: ignoring unsupported \allocates clause [eva] Done for function strndup [eva] computing for function strlcpy <- main. - Called from tests/libc/string_h.c:124. + Called from tests/libc/string_h.c:123. [eva] using specification for function strlcpy -[eva] tests/libc/string_h.c:124: +[eva] tests/libc/string_h.c:123: function strlcpy: precondition 'valid_string_src' got status valid. -[eva] tests/libc/string_h.c:124: +[eva] tests/libc/string_h.c:123: function strlcpy: precondition 'room_nstring' got status valid. -[eva] tests/libc/string_h.c:124: +[eva] tests/libc/string_h.c:123: function strlcpy: precondition 'separation' got status valid. [eva] Done for function strlcpy [eva] computing for function strlcpy <- main. - Called from tests/libc/string_h.c:125. -[eva] tests/libc/string_h.c:125: + Called from tests/libc/string_h.c:124. +[eva] tests/libc/string_h.c:124: function strlcpy: precondition 'valid_string_src' got status valid. -[eva] tests/libc/string_h.c:125: +[eva] tests/libc/string_h.c:124: function strlcpy: precondition 'room_nstring' got status valid. -[eva] tests/libc/string_h.c:125: +[eva] tests/libc/string_h.c:124: function strlcpy: precondition 'separation' got status valid. [eva] Done for function strlcpy [eva] computing for function strlcat <- main. - Called from tests/libc/string_h.c:126. + Called from tests/libc/string_h.c:125. [eva] using specification for function strlcat -[eva:alarm] tests/libc/string_h.c:126: Warning: +[eva:alarm] tests/libc/string_h.c:125: Warning: function strlcat: precondition 'valid_string_src' got status unknown. -[eva:alarm] tests/libc/string_h.c:126: Warning: +[eva:alarm] tests/libc/string_h.c:125: Warning: function strlcat: precondition 'valid_string_dest' got status unknown. -[eva] tests/libc/string_h.c:126: +[eva] tests/libc/string_h.c:125: function strlcat: precondition 'room_nstring' got status valid. [eva] Done for function strlcat +[eva] computing for function strsignal <- main. + Called from tests/libc/string_h.c:126. +[eva] using specification for function strsignal +[eva] Done for function strsignal +[eva] tests/libc/string_h.c:127: assertion got status valid. [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== @@ -336,4 +341,5 @@ r1 ∈ {18} r2 ∈ {5} r3 ∈ [--..--] + strsig ∈ {{ &__fc_strsignal[0] }} __retres ∈ {0} diff --git a/tests/libc/oracle/unistd_h.0.res.oracle b/tests/libc/oracle/unistd_h.0.res.oracle index 8acd40bd2d4..78a30b4a80a 100644 --- a/tests/libc/oracle/unistd_h.0.res.oracle +++ b/tests/libc/oracle/unistd_h.0.res.oracle @@ -5,15 +5,18 @@ \return(dup) == -1 (auto) \return(getcwd) == 0 (auto) \return(gethostname) == 0 (auto) + \return(getpgrp) == 0 (auto) \return(isatty) == 0 (auto) \return(setegid) == 0 (auto) \return(seteuid) == 0 (auto) \return(setgid) == 0 (auto) + \return(setpgid) == 0 (auto) \return(setregid) == 0 (auto) \return(setreuid) == 0 (auto) \return(setsid) == 0 (auto) \return(setuid) == 0 (auto) \return(ttyname) == 0 (auto) + \return(unlink) == 0 (auto) \return(usleep) == 0 (auto) \return(getresuid) == 0 (auto) \return(setresuid) == 0 (auto) @@ -471,35 +474,62 @@ [eva] computing for function setreuid <- main. Called from tests/libc/unistd_h.c:74. [eva] Done for function setreuid -[eva] computing for function isatty <- main. +[eva] computing for function getpgid <- main. + Called from tests/libc/unistd_h.c:75. +[eva] using specification for function getpgid +[eva] Done for function getpgid +[eva] computing for function getpgid <- main. + Called from tests/libc/unistd_h.c:75. +[eva] Done for function getpgid +[eva] computing for function setpgid <- main. + Called from tests/libc/unistd_h.c:75. +[eva] using specification for function setpgid +[eva] Done for function setpgid +[eva] computing for function setpgid <- main. + Called from tests/libc/unistd_h.c:75. +[eva] Done for function setpgid +[eva] computing for function getpgrp <- main. + Called from tests/libc/unistd_h.c:76. +[eva] using specification for function getpgrp +[eva] Done for function getpgrp +[eva] computing for function getpgrp <- main. Called from tests/libc/unistd_h.c:76. +[eva] Done for function getpgrp +[eva] computing for function unlink <- main. + Called from tests/libc/unistd_h.c:78. +[eva] using specification for function unlink +[eva] tests/libc/unistd_h.c:78: + function unlink: precondition 'valid_string_path' got status valid. +[eva] Done for function unlink +[eva] computing for function isatty <- main. + Called from tests/libc/unistd_h.c:80. [eva] using specification for function isatty [eva] Done for function isatty [eva] computing for function isatty <- main. - Called from tests/libc/unistd_h.c:76. + Called from tests/libc/unistd_h.c:80. [eva] Done for function isatty -[eva] tests/libc/unistd_h.c:77: assertion got status valid. +[eva] tests/libc/unistd_h.c:81: assertion got status valid. [eva] computing for function ttyname <- main. - Called from tests/libc/unistd_h.c:78. + Called from tests/libc/unistd_h.c:82. [eva] using specification for function ttyname [eva] Done for function ttyname [eva] computing for function ttyname <- main. - Called from tests/libc/unistd_h.c:78. + Called from tests/libc/unistd_h.c:82. [eva] Done for function ttyname [eva] computing for function chown <- main. - Called from tests/libc/unistd_h.c:80. + Called from tests/libc/unistd_h.c:84. [eva] using specification for function chown -[eva] tests/libc/unistd_h.c:80: +[eva] tests/libc/unistd_h.c:84: function chown: precondition 'valid_string_path' got status valid. [eva] Done for function chown [eva] computing for function chown <- main. - Called from tests/libc/unistd_h.c:80. + Called from tests/libc/unistd_h.c:84. [eva] Done for function chown [eva] computing for function chown <- main. - Called from tests/libc/unistd_h.c:80. + Called from tests/libc/unistd_h.c:84. [eva] Done for function chown [eva] computing for function chown <- main. - Called from tests/libc/unistd_h.c:80. + Called from tests/libc/unistd_h.c:84. [eva] Done for function chown [eva] Recording results for main [eva] done for function main diff --git a/tests/libc/oracle/unistd_h.1.res.oracle b/tests/libc/oracle/unistd_h.1.res.oracle index 39a11b77b4e..78e0c0de0e6 100644 --- a/tests/libc/oracle/unistd_h.1.res.oracle +++ b/tests/libc/oracle/unistd_h.1.res.oracle @@ -5,15 +5,18 @@ \return(dup) == -1 (auto) \return(getcwd) == 0 (auto) \return(gethostname) == 0 (auto) + \return(getpgrp) == 0 (auto) \return(isatty) == 0 (auto) \return(setegid) == 0 (auto) \return(seteuid) == 0 (auto) \return(setgid) == 0 (auto) + \return(setpgid) == 0 (auto) \return(setregid) == 0 (auto) \return(setreuid) == 0 (auto) \return(setsid) == 0 (auto) \return(setuid) == 0 (auto) \return(ttyname) == 0 (auto) + \return(unlink) == 0 (auto) \return(usleep) == 0 (auto) \return(getresuid) == 0 (auto) \return(setresuid) == 0 (auto) @@ -471,35 +474,62 @@ [eva] computing for function setreuid <- main. Called from tests/libc/unistd_h.c:74. [eva] Done for function setreuid -[eva] computing for function isatty <- main. +[eva] computing for function getpgid <- main. + Called from tests/libc/unistd_h.c:75. +[eva] using specification for function getpgid +[eva] Done for function getpgid +[eva] computing for function getpgid <- main. + Called from tests/libc/unistd_h.c:75. +[eva] Done for function getpgid +[eva] computing for function setpgid <- main. + Called from tests/libc/unistd_h.c:75. +[eva] using specification for function setpgid +[eva] Done for function setpgid +[eva] computing for function setpgid <- main. + Called from tests/libc/unistd_h.c:75. +[eva] Done for function setpgid +[eva] computing for function getpgrp <- main. + Called from tests/libc/unistd_h.c:76. +[eva] using specification for function getpgrp +[eva] Done for function getpgrp +[eva] computing for function getpgrp <- main. Called from tests/libc/unistd_h.c:76. +[eva] Done for function getpgrp +[eva] computing for function unlink <- main. + Called from tests/libc/unistd_h.c:78. +[eva] using specification for function unlink +[eva] tests/libc/unistd_h.c:78: + function unlink: precondition 'valid_string_path' got status valid. +[eva] Done for function unlink +[eva] computing for function isatty <- main. + Called from tests/libc/unistd_h.c:80. [eva] using specification for function isatty [eva] Done for function isatty [eva] computing for function isatty <- main. - Called from tests/libc/unistd_h.c:76. + Called from tests/libc/unistd_h.c:80. [eva] Done for function isatty -[eva] tests/libc/unistd_h.c:77: assertion got status valid. +[eva] tests/libc/unistd_h.c:81: assertion got status valid. [eva] computing for function ttyname <- main. - Called from tests/libc/unistd_h.c:78. + Called from tests/libc/unistd_h.c:82. [eva] using specification for function ttyname [eva] Done for function ttyname [eva] computing for function ttyname <- main. - Called from tests/libc/unistd_h.c:78. + Called from tests/libc/unistd_h.c:82. [eva] Done for function ttyname [eva] computing for function chown <- main. - Called from tests/libc/unistd_h.c:80. + Called from tests/libc/unistd_h.c:84. [eva] using specification for function chown -[eva] tests/libc/unistd_h.c:80: +[eva] tests/libc/unistd_h.c:84: function chown: precondition 'valid_string_path' got status valid. [eva] Done for function chown [eva] computing for function chown <- main. - Called from tests/libc/unistd_h.c:80. + Called from tests/libc/unistd_h.c:84. [eva] Done for function chown [eva] computing for function chown <- main. - Called from tests/libc/unistd_h.c:80. + Called from tests/libc/unistd_h.c:84. [eva] Done for function chown [eva] computing for function chown <- main. - Called from tests/libc/unistd_h.c:80. + Called from tests/libc/unistd_h.c:84. [eva] Done for function chown [eva] Recording results for main [eva] done for function main diff --git a/tests/libc/signal_h.c b/tests/libc/signal_h.c index 289f4c365e8..f8aa063de2e 100644 --- a/tests/libc/signal_h.c +++ b/tests/libc/signal_h.c @@ -41,5 +41,16 @@ int main() { int kill_res = kill(42, SIGTERM); + struct sigaction sa1, sa2; + if (sigaction(SIGCHLD, 0, &sa1)) { + return -1; + } + if (sigaction(SIGCONT, &sa1, &sa2)) { + return -1; + } + if (sigaction(SIGUSR1, &sa2, 0)) { + return -1; + } + return 0; } diff --git a/tests/libc/stdlib_h.c b/tests/libc/stdlib_h.c index 160cf1d2bfc..dec6260f59f 100644 --- a/tests/libc/stdlib_h.c +++ b/tests/libc/stdlib_h.c @@ -77,5 +77,9 @@ int main() { char *v = getenv("MUTABLE"); if (v[8] != 'n') return 1; // possible only if imprecise }*/ + + char tempFilename[] = "blaXXXXXX"; + int r = mkstemp(tempFilename); + return 0; } diff --git a/tests/libc/string_h.c b/tests/libc/string_h.c index 9dd3b05c2b9..27065864dd5 100644 --- a/tests/libc/string_h.c +++ b/tests/libc/string_h.c @@ -118,11 +118,12 @@ int main(int argc, char **argv) test_strtok_r(); char *a = strdup("bla"); // unsound; specification currently unsupported char *b = strndup("bla", 2); // unsound; specification currently unsupported - char buf[16]; char buf2[32]; size_t r1 = strlcpy(buf, "longer than buffer", 16); size_t r2 = strlcpy(buf2, "short", 16); size_t r3 = strlcat(buf2, buf, 32); + char *strsig = strsignal(1); + //@ assert valid_read_string(strsig); return 0; } diff --git a/tests/libc/unistd_h.c b/tests/libc/unistd_h.c index d665ec88fa9..b6eba6c732c 100644 --- a/tests/libc/unistd_h.c +++ b/tests/libc/unistd_h.c @@ -72,6 +72,10 @@ int main() { r = setuid(ruid); r = setregid(rgid, egid); r = setreuid(ruid, euid); + r = setpgid(p, getpgid(0)); + r = getpgrp(); + + r = unlink("/tmp/test_unlink"); r = isatty(1); //@ assert r == 0 || r == 1; -- GitLab From 38cc60dffcacbbeadd88e51b7d979a4feda4b66c Mon Sep 17 00:00:00 2001 From: Maxime Jacquemin <maxime.jacquemin@cea.fr> Date: Fri, 22 Feb 2019 16:10:25 +0100 Subject: [PATCH 024/376] [Cabs2Cil] Cleaning of locals in dead empty blocks See the issue #507 --- src/kernel_internals/typing/cabs2cil.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index cccda3a9169..5623a49326f 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -7597,11 +7597,11 @@ and compileCondExp ~ghost ce st sf = match e.enode with | Const(CInt64(i,_,_)) when (not (Integer.equal i Integer.zero)) && canDrop sf -> - clean_up_chunk_locals sf; + full_clean_up_chunk_locals sf; se @@ (st, ghost) | Const(CInt64(z,_,_)) when (Integer.equal z Integer.zero) && canDrop st -> - clean_up_chunk_locals st; + full_clean_up_chunk_locals st; se @@ (sf, ghost) | _ -> (empty @@ (se, ghost)) @@ (ifChunk ~ghost e e.eloc st sf, ghost) end -- GitLab From 69895c90773d353a9a3b01ff8ede1826b399e658 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Mon, 25 Feb 2019 10:02:43 +0100 Subject: [PATCH 025/376] [Libc] remove obsoleted ifdefs --- share/libc/math.h | 28 +-- share/libc/signal.h | 2 - share/libc/stddef.h | 2 - share/libc/string.h | 6 - share/libc/unistd.h | 2 - .../report/tests/report/oracle/csv.csv | 2 +- tests/builtins/oracle/memcpy.res.oracle | 168 +++++++------ tests/idct/oracle/ieee_1180_1990.res.oracle | 233 +++++++++--------- tests/libc/oracle/coverage.res.oracle | 2 +- tests/libc/oracle/fc_libc.0.res.oracle | 40 +-- tests/libc/oracle/fc_libc.1.res.oracle | 27 ++ tests/libc/oracle/netdb_c.res.oracle | 4 +- tests/libc/oracle/signal_h.res.oracle | 2 +- tests/libc/oracle/stdlib_c_env.res.oracle | 2 +- tests/libc/oracle/string_c.res.oracle | 26 +- tests/libc/oracle/string_c_generic.res.oracle | 22 +- tests/misc/oracle/pragma-pack.0.res.oracle | 2 + 17 files changed, 307 insertions(+), 263 deletions(-) diff --git a/share/libc/math.h b/share/libc/math.h index a7a0ef9dbf6..f8d414b78b5 100644 --- a/share/libc/math.h +++ b/share/libc/math.h @@ -42,21 +42,19 @@ typedef double double_t; #define HUGE_VALL 0x1.0p32767L /* The constants below are not part of C99/C11 but they are defined in POSIX */ -#ifdef _XOPEN_SOURCE -# define M_E 0x1.5bf0a8b145769p1 /* e */ -# define M_LOG2E 0x1.71547652b82fep0 /* log_2 e */ -# define M_LOG10E 0x1.bcb7b1526e50ep-2 /* log_10 e */ -# define M_LN2 0x1.62e42fefa39efp-1 /* log_e 2 */ -# define M_LN10 0x1.26bb1bbb55516p1 /* log_e 10 */ -# define M_PI 0x1.921fb54442d18p1 /* pi */ -# define M_PI_2 0x1.921fb54442d18p0 /* pi/2 */ -# define M_PI_4 0x1.921fb54442d18p-1 /* pi/4 */ -# define M_1_PI 0x1.45f306dc9c883p-2 /* 1/pi */ -# define M_2_PI 0x1.45f306dc9c883p-1 /* 2/pi */ -# define M_2_SQRTPI 0x1.20dd750429b6dp0 /* 2/sqrt(pi) */ -# define M_SQRT2 0x1.6a09e667f3bcdp0 /* sqrt(2) */ -# define M_SQRT1_2 0x1.6a09e667f3bcdp-1 /* 1/sqrt(2) */ -#endif +#define M_E 0x1.5bf0a8b145769p1 /* e */ +#define M_LOG2E 0x1.71547652b82fep0 /* log_2 e */ +#define M_LOG10E 0x1.bcb7b1526e50ep-2 /* log_10 e */ +#define M_LN2 0x1.62e42fefa39efp-1 /* log_e 2 */ +#define M_LN10 0x1.26bb1bbb55516p1 /* log_e 10 */ +#define M_PI 0x1.921fb54442d18p1 /* pi */ +#define M_PI_2 0x1.921fb54442d18p0 /* pi/2 */ +#define M_PI_4 0x1.921fb54442d18p-1 /* pi/4 */ +#define M_1_PI 0x1.45f306dc9c883p-2 /* 1/pi */ +#define M_2_PI 0x1.45f306dc9c883p-1 /* 2/pi */ +#define M_2_SQRTPI 0x1.20dd750429b6dp0 /* 2/sqrt(pi) */ +#define M_SQRT2 0x1.6a09e667f3bcdp0 /* sqrt(2) */ +#define M_SQRT1_2 0x1.6a09e667f3bcdp-1 /* 1/sqrt(2) */ /* The following specifications will set errno. */ #define math_errhandling MATH_ERRNO diff --git a/share/libc/signal.h b/share/libc/signal.h index d39758a71cc..458175c0aef 100644 --- a/share/libc/signal.h +++ b/share/libc/signal.h @@ -44,9 +44,7 @@ typedef void (*__fc_sighandler_t) (int); #define sighandler_t __fc_sighandler_t /* for BSD 4.4 */ -#ifdef __USE_MISC typedef __fc_sighandler_t sig_t; -#endif #define SIG_DFL ((__fc_sighandler_t)0) /* default signal handling */ #define SIG_IGN ((__fc_sighandler_t)1) /* ignore signal */ diff --git a/share/libc/stddef.h b/share/libc/stddef.h index e32d8548e86..38c32691d7e 100644 --- a/share/libc/stddef.h +++ b/share/libc/stddef.h @@ -32,9 +32,7 @@ typedef __PTRDIFF_T ptrdiff_t; #endif __END_DECLS #include "__fc_define_size_t.h" -#ifdef __GNU_C__ #include "__fc_define_ssize_t.h" -#endif #include "__fc_define_wchar_t.h" #include "__fc_define_null.h" #define offsetof(type, member) __builtin_offsetof(type,member) diff --git a/share/libc/string.h b/share/libc/string.h index 1721e2dde50..c8f5b3d8ec3 100644 --- a/share/libc/string.h +++ b/share/libc/string.h @@ -222,7 +222,6 @@ extern char *strpbrk(const char *s, const char *accept); @*/ extern char *strstr(const char *haystack, const char *needle); -#ifdef __USE_GNU /*@ requires valid_string_haystack: valid_read_string(haystack); @ requires valid_string_needle: valid_read_string(needle); @ assigns \result \from haystack, indirect:haystack[0..], @@ -232,7 +231,6 @@ extern char *strstr(const char *haystack, const char *needle); @ || (\subset(\result, haystack+(0..)) && \valid_read(\result)); @*/ extern char *strcasestr (const char *haystack, const char *needle); -#endif // internal state of strtok char *__fc_strtok_ptr; @@ -387,8 +385,6 @@ extern char *strncpy(char *restrict dest, size_t strlcpy(char * restrict dest, const char * restrict src, size_t n); // stpcpy is POSIX.1-2008 -#ifdef _POSIX_C_SOURCE -# if _POSIX_C_SOURCE >= 200809L /*@ requires valid_string_src: valid_read_string(src); @ requires room_string: \valid(dest+(0..strlen(src))); @ requires separation: @@ -399,8 +395,6 @@ size_t strlcpy(char * restrict dest, const char * restrict src, size_t n); @ ensures points_to_end: \result == dest + strlen(dest); @*/ extern char *stpcpy(char *restrict dest, const char *restrict src); -# endif -#endif /*@ // missing: separation @ requires valid_string_src: valid_read_string(src); diff --git a/share/libc/unistd.h b/share/libc/unistd.h index a966cf7cbf7..3e790d21269 100644 --- a/share/libc/unistd.h +++ b/share/libc/unistd.h @@ -1109,7 +1109,6 @@ extern ssize_t write(int fd, const void *buf, size_t count); extern int setgroups(size_t size, const gid_t *list); // The following functions are GNU extensions -#ifdef _GNU_SOURCE /*@ // missing: assigns \result, *ruid, *euid, *suid \from 'process' @@ -1159,7 +1158,6 @@ int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); */ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); -#endif __END_DECLS diff --git a/src/plugins/report/tests/report/oracle/csv.csv b/src/plugins/report/tests/report/oracle/csv.csv index 27957ca3cfa..18a0e92bcf7 100644 --- a/src/plugins/report/tests/report/oracle/csv.csv +++ b/src/plugins/report/tests/report/oracle/csv.csv @@ -1,5 +1,5 @@ directory file line function property kind status property -FRAMAC_SHARE/libc math.h 528 pow precondition Unknown finite_logic_res: \is_finite(pow(x, y)) +FRAMAC_SHARE/libc math.h 526 pow precondition Unknown finite_logic_res: \is_finite(pow(x, y)) tests/report csv.c 11 main1 signed_overflow Unknown -2147483648 ≤ x * x tests/report csv.c 11 main1 signed_overflow Unknown x * x ≤ 2147483647 tests/report csv.c 12 main1 index_bound Unknown 0 ≤ x diff --git a/tests/builtins/oracle/memcpy.res.oracle b/tests/builtins/oracle/memcpy.res.oracle index c767cf17fb5..649c1f67a8f 100644 --- a/tests/builtins/oracle/memcpy.res.oracle +++ b/tests/builtins/oracle/memcpy.res.oracle @@ -1385,6 +1385,19 @@ [ Valid ] Default behavior by Frama-C kernel. +-------------------------------------------------------------------------------- +--- Properties of Function 'strcasestr' +-------------------------------------------------------------------------------- + +[ Extern ] Post-condition 'result_null_or_in_haystack' + Unverifiable but considered Valid. +[ Extern ] Assigns nothing + Unverifiable but considered Valid. +[ Extern ] Froms (file share/libc/string.h, line 227) + Unverifiable but considered Valid. +[ Valid ] Default behavior + by Frama-C kernel. + -------------------------------------------------------------------------------- --- Properties of Function 'strtok' -------------------------------------------------------------------------------- @@ -1397,11 +1410,13 @@ Unverifiable but considered Valid. [ Extern ] Post-condition for 'resume_str' 'ptr_subset' Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/string.h, line 242) +[ Extern ] Assigns (file share/libc/string.h, line 240) + Unverifiable but considered Valid. +[ Extern ] Assigns for 'new_str' (file share/libc/string.h, line 255) Unverifiable but considered Valid. -[ Extern ] Assigns for 'new_str' (file share/libc/string.h, line 257) +[ Extern ] Assigns for 'resume_str' (file share/libc/string.h, line 263) Unverifiable but considered Valid. -[ Extern ] Assigns for 'resume_str' (file share/libc/string.h, line 265) +[ Extern ] Froms (file share/libc/string.h, line 240) Unverifiable but considered Valid. [ Extern ] Froms (file share/libc/string.h, line 242) Unverifiable but considered Valid. @@ -1409,19 +1424,17 @@ Unverifiable but considered Valid. [ Extern ] Froms (file share/libc/string.h, line 246) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 248) +[ Extern ] Froms for 'new_str' (file share/libc/string.h, line 255) Unverifiable but considered Valid. -[ Extern ] Froms for 'new_str' (file share/libc/string.h, line 257) - Unverifiable but considered Valid. -[ Extern ] Froms for 'new_str' (file share/libc/string.h, line 258) +[ Extern ] Froms for 'new_str' (file share/libc/string.h, line 256) Unverifiable but considered Valid. -[ Extern ] Froms for 'new_str' (file share/libc/string.h, line 259) +[ Extern ] Froms for 'new_str' (file share/libc/string.h, line 257) Unverifiable but considered Valid. -[ Extern ] Froms for 'resume_str' (file share/libc/string.h, line 265) +[ Extern ] Froms for 'resume_str' (file share/libc/string.h, line 263) Unverifiable but considered Valid. -[ Extern ] Froms for 'resume_str' (file share/libc/string.h, line 268) +[ Extern ] Froms for 'resume_str' (file share/libc/string.h, line 266) Unverifiable but considered Valid. -[ Extern ] Froms for 'resume_str' (file share/libc/string.h, line 271) +[ Extern ] Froms for 'resume_str' (file share/libc/string.h, line 269) Unverifiable but considered Valid. [ Valid ] Default behavior by Frama-C kernel. @@ -1444,11 +1457,13 @@ Unverifiable but considered Valid. [ Extern ] Post-condition for 'resume_str' 'saveptr_subset' Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/string.h, line 284) +[ Extern ] Assigns (file share/libc/string.h, line 282) + Unverifiable but considered Valid. +[ Extern ] Assigns for 'new_str' (file share/libc/string.h, line 297) Unverifiable but considered Valid. -[ Extern ] Assigns for 'new_str' (file share/libc/string.h, line 299) +[ Extern ] Assigns for 'resume_str' (file share/libc/string.h, line 307) Unverifiable but considered Valid. -[ Extern ] Assigns for 'resume_str' (file share/libc/string.h, line 309) +[ Extern ] Froms (file share/libc/string.h, line 282) Unverifiable but considered Valid. [ Extern ] Froms (file share/libc/string.h, line 284) Unverifiable but considered Valid. @@ -1456,19 +1471,17 @@ Unverifiable but considered Valid. [ Extern ] Froms (file share/libc/string.h, line 288) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 290) +[ Extern ] Froms for 'new_str' (file share/libc/string.h, line 297) Unverifiable but considered Valid. -[ Extern ] Froms for 'new_str' (file share/libc/string.h, line 299) - Unverifiable but considered Valid. -[ Extern ] Froms for 'new_str' (file share/libc/string.h, line 300) +[ Extern ] Froms for 'new_str' (file share/libc/string.h, line 298) Unverifiable but considered Valid. -[ Extern ] Froms for 'new_str' (file share/libc/string.h, line 301) +[ Extern ] Froms for 'new_str' (file share/libc/string.h, line 299) Unverifiable but considered Valid. -[ Extern ] Froms for 'resume_str' (file share/libc/string.h, line 309) +[ Extern ] Froms for 'resume_str' (file share/libc/string.h, line 307) Unverifiable but considered Valid. -[ Extern ] Froms for 'resume_str' (file share/libc/string.h, line 312) +[ Extern ] Froms for 'resume_str' (file share/libc/string.h, line 310) Unverifiable but considered Valid. -[ Extern ] Froms for 'resume_str' (file share/libc/string.h, line 315) +[ Extern ] Froms for 'resume_str' (file share/libc/string.h, line 313) Unverifiable but considered Valid. [ Valid ] Default behavior by Frama-C kernel. @@ -1481,11 +1494,11 @@ --- Properties of Function 'strsep' -------------------------------------------------------------------------------- -[ Extern ] Assigns (file share/libc/string.h, line 327) +[ Extern ] Assigns (file share/libc/string.h, line 325) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 327) +[ Extern ] Froms (file share/libc/string.h, line 325) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 328) +[ Extern ] Froms (file share/libc/string.h, line 326) Unverifiable but considered Valid. [ Valid ] Default behavior by Frama-C kernel. @@ -1502,7 +1515,7 @@ Unverifiable but considered Valid. [ Extern ] Assigns nothing Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 338) +[ Extern ] Froms (file share/libc/string.h, line 336) Unverifiable but considered Valid. [ Valid ] Default behavior by Frama-C kernel. @@ -1515,11 +1528,11 @@ Unverifiable but considered Valid. [ Extern ] Post-condition 'result_ptr' Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/string.h, line 351) +[ Extern ] Assigns (file share/libc/string.h, line 349) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 351) +[ Extern ] Froms (file share/libc/string.h, line 349) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 352) +[ Extern ] Froms (file share/libc/string.h, line 350) Unverifiable but considered Valid. [ Valid ] Default behavior by Frama-C kernel. @@ -1536,11 +1549,11 @@ Unverifiable but considered Valid. [ Extern ] Post-condition for 'partial' 'equal_prefix' Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/string.h, line 363) +[ Extern ] Assigns (file share/libc/string.h, line 361) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 363) +[ Extern ] Froms (file share/libc/string.h, line 361) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 364) +[ Extern ] Froms (file share/libc/string.h, line 362) Unverifiable but considered Valid. [ Valid ] Behavior 'complete' by Frama-C kernel. @@ -1557,11 +1570,28 @@ Unverifiable but considered Valid. [ Extern ] Post-condition 'bounded_result' Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/string.h, line 382) +[ Extern ] Assigns (file share/libc/string.h, line 380) + Unverifiable but considered Valid. +[ Extern ] Froms (file share/libc/string.h, line 380) + Unverifiable but considered Valid. +[ Extern ] Froms (file share/libc/string.h, line 381) + Unverifiable but considered Valid. +[ Valid ] Default behavior + by Frama-C kernel. + +-------------------------------------------------------------------------------- +--- Properties of Function 'stpcpy' +-------------------------------------------------------------------------------- + +[ Extern ] Post-condition 'equal_contents' + Unverifiable but considered Valid. +[ Extern ] Post-condition 'points_to_end' + Unverifiable but considered Valid. +[ Extern ] Assigns (file share/libc/string.h, line 392) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 382) +[ Extern ] Froms (file share/libc/string.h, line 392) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 383) +[ Extern ] Froms (file share/libc/string.h, line 393) Unverifiable but considered Valid. [ Valid ] Default behavior by Frama-C kernel. @@ -1578,11 +1608,11 @@ Unverifiable but considered Valid. [ Extern ] Post-condition 'result_ptr' Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/string.h, line 409) +[ Extern ] Assigns (file share/libc/string.h, line 403) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 409) +[ Extern ] Froms (file share/libc/string.h, line 403) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 412) +[ Extern ] Froms (file share/libc/string.h, line 406) Unverifiable but considered Valid. [ Valid ] Default behavior by Frama-C kernel. @@ -1597,23 +1627,23 @@ Unverifiable but considered Valid. [ Extern ] Post-condition for 'partial' 'sum_of_bounded_lengths' Unverifiable but considered Valid. -[ Extern ] Assigns for 'complete' (file share/libc/string.h, line 429) +[ Extern ] Assigns for 'complete' (file share/libc/string.h, line 423) Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/string.h, line 423) +[ Extern ] Assigns (file share/libc/string.h, line 417) Unverifiable but considered Valid. -[ Extern ] Assigns for 'partial' (file share/libc/string.h, line 437) +[ Extern ] Assigns for 'partial' (file share/libc/string.h, line 431) Unverifiable but considered Valid. -[ Extern ] Froms for 'complete' (file share/libc/string.h, line 429) +[ Extern ] Froms for 'complete' (file share/libc/string.h, line 423) Unverifiable but considered Valid. -[ Extern ] Froms for 'complete' (file share/libc/string.h, line 431) +[ Extern ] Froms for 'complete' (file share/libc/string.h, line 425) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 423) +[ Extern ] Froms (file share/libc/string.h, line 417) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 424) +[ Extern ] Froms (file share/libc/string.h, line 418) Unverifiable but considered Valid. -[ Extern ] Froms for 'partial' (file share/libc/string.h, line 437) +[ Extern ] Froms for 'partial' (file share/libc/string.h, line 431) Unverifiable but considered Valid. -[ Extern ] Froms for 'partial' (file share/libc/string.h, line 439) +[ Extern ] Froms for 'partial' (file share/libc/string.h, line 433) Unverifiable but considered Valid. [ Valid ] Behavior 'complete' by Frama-C kernel. @@ -1628,11 +1658,11 @@ [ Extern ] Post-condition 'bounded_result' Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/string.h, line 449) +[ Extern ] Assigns (file share/libc/string.h, line 443) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 449) +[ Extern ] Froms (file share/libc/string.h, line 443) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 450) +[ Extern ] Froms (file share/libc/string.h, line 444) Unverifiable but considered Valid. [ Valid ] Default behavior by Frama-C kernel. @@ -1641,11 +1671,11 @@ --- Properties of Function 'strxfrm' -------------------------------------------------------------------------------- -[ Extern ] Assigns (file share/libc/string.h, line 458) +[ Extern ] Assigns (file share/libc/string.h, line 452) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 458) +[ Extern ] Froms (file share/libc/string.h, line 452) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 459) +[ Extern ] Froms (file share/libc/string.h, line 453) Unverifiable but considered Valid. [ Valid ] Default behavior by Frama-C kernel. @@ -1660,19 +1690,19 @@ Unverifiable but considered Valid. [ Extern ] Post-condition for 'no_allocation' 'result_null' Unverifiable but considered Valid. -[ Extern ] Assigns for 'allocation' (file share/libc/string.h, line 470) +[ Extern ] Assigns for 'allocation' (file share/libc/string.h, line 464) Unverifiable but considered Valid. [ Extern ] Assigns nothing Unverifiable but considered Valid. [ Extern ] Assigns for 'no_allocation' nothing Unverifiable but considered Valid. -[ Extern ] Froms for 'allocation' (file share/libc/string.h, line 470) +[ Extern ] Froms for 'allocation' (file share/libc/string.h, line 464) Unverifiable but considered Valid. -[ Extern ] Froms for 'allocation' (file share/libc/string.h, line 471) +[ Extern ] Froms for 'allocation' (file share/libc/string.h, line 465) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 467) +[ Extern ] Froms (file share/libc/string.h, line 461) Unverifiable but considered Valid. -[ Extern ] Froms for 'no_allocation' (file share/libc/string.h, line 477) +[ Extern ] Froms for 'no_allocation' (file share/libc/string.h, line 471) Unverifiable but considered Valid. [ Valid ] Behavior 'allocation' by Frama-C kernel. @@ -1680,7 +1710,7 @@ by Frama-C kernel. [ Valid ] Behavior 'no_allocation' by Frama-C kernel. -[ Extern ] Frees/Allocates nothing/(file share/libc/string.h, line 466) +[ Extern ] Frees/Allocates nothing/(file share/libc/string.h, line 460) Unverifiable but considered Valid. [ Extern ] Frees/Allocates for 'no_allocation' nothing/nothing Unverifiable but considered Valid. @@ -1695,19 +1725,19 @@ Unverifiable but considered Valid. [ Extern ] Post-condition for 'no_allocation' 'result_null' Unverifiable but considered Valid. -[ Extern ] Assigns for 'allocation' (file share/libc/string.h, line 488) +[ Extern ] Assigns for 'allocation' (file share/libc/string.h, line 482) Unverifiable but considered Valid. [ Extern ] Assigns nothing Unverifiable but considered Valid. [ Extern ] Assigns for 'no_allocation' nothing Unverifiable but considered Valid. -[ Extern ] Froms for 'allocation' (file share/libc/string.h, line 488) +[ Extern ] Froms for 'allocation' (file share/libc/string.h, line 482) Unverifiable but considered Valid. -[ Extern ] Froms for 'allocation' (file share/libc/string.h, line 489) +[ Extern ] Froms for 'allocation' (file share/libc/string.h, line 483) Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 484) +[ Extern ] Froms (file share/libc/string.h, line 478) Unverifiable but considered Valid. -[ Extern ] Froms for 'no_allocation' (file share/libc/string.h, line 498) +[ Extern ] Froms for 'no_allocation' (file share/libc/string.h, line 492) Unverifiable but considered Valid. [ Valid ] Behavior 'allocation' by Frama-C kernel. @@ -1715,7 +1745,7 @@ by Frama-C kernel. [ Valid ] Behavior 'no_allocation' by Frama-C kernel. -[ Extern ] Frees/Allocates nothing/(file share/libc/string.h, line 483) +[ Extern ] Frees/Allocates nothing/(file share/libc/string.h, line 477) Unverifiable but considered Valid. [ Extern ] Frees/Allocates for 'no_allocation' nothing/nothing Unverifiable but considered Valid. @@ -1732,7 +1762,7 @@ Unverifiable but considered Valid. [ Extern ] Assigns nothing Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/string.h, line 514) +[ Extern ] Froms (file share/libc/string.h, line 508) Unverifiable but considered Valid. [ Valid ] Default behavior by Frama-C kernel. @@ -2185,9 +2215,9 @@ -------------------------------------------------------------------------------- --- Status Report Summary -------------------------------------------------------------------------------- - 159 Completely validated - 230 Considered valid + 161 Completely validated + 238 Considered valid 29 To be validated 4 Alarms emitted - 422 Total + 432 Total -------------------------------------------------------------------------------- diff --git a/tests/idct/oracle/ieee_1180_1990.res.oracle b/tests/idct/oracle/ieee_1180_1990.res.oracle index 2c7e41c81de..288eef68b4c 100644 --- a/tests/idct/oracle/ieee_1180_1990.res.oracle +++ b/tests/idct/oracle/ieee_1180_1990.res.oracle @@ -1,7 +1,4 @@ [kernel] Parsing tests/idct/ieee_1180_1990.c (with preprocessing) -[kernel:parser:decimal-float] tests/idct/ieee_1180_1990.c:101: Warning: - Floating-point constant 3.14159265358979323846 is not represented exactly. Will use 0x1.921fb54442d18p1. - (warn-once: no further messages from category 'parser:decimal-float' will be emitted) [kernel] Parsing tests/idct/idct.c (with preprocessing) [eva] Analyzing a complete application starting at main [eva] Computing initial state @@ -2142,7 +2139,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 73) +[ Extern ] Froms (file share/libc/math.h, line 71) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2186,7 +2183,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 97) +[ Extern ] Froms (file share/libc/math.h, line 95) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2218,28 +2215,28 @@ [ Extern ] Post-condition for 'domain_error' 'errno_set' ensures errno_set: __fc_errno ≡ 1 Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/math.h, line 134) +[ Extern ] Assigns (file share/libc/math.h, line 132) assigns __fc_errno, \result; Unverifiable but considered Valid. -[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 141) +[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 139) assigns __fc_errno, \result; Unverifiable but considered Valid. [ Extern ] Assigns for 'normal' nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 134) +[ Extern ] Froms (file share/libc/math.h, line 132) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 134) +[ Extern ] Froms (file share/libc/math.h, line 132) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 141) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 139) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 141) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 139) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'normal' (file share/libc/math.h, line 137) +[ Extern ] Froms for 'normal' (file share/libc/math.h, line 135) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2262,28 +2259,28 @@ [ Extern ] Post-condition for 'domain_error' 'errno_set' ensures errno_set: __fc_errno ≡ 1 Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/math.h, line 148) +[ Extern ] Assigns (file share/libc/math.h, line 146) assigns __fc_errno, \result; Unverifiable but considered Valid. -[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 155) +[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 153) assigns __fc_errno, \result; Unverifiable but considered Valid. [ Extern ] Assigns for 'normal' nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 148) +[ Extern ] Froms (file share/libc/math.h, line 146) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 148) +[ Extern ] Froms (file share/libc/math.h, line 146) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 155) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 153) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 155) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 153) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'normal' (file share/libc/math.h, line 151) +[ Extern ] Froms for 'normal' (file share/libc/math.h, line 149) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2306,28 +2303,28 @@ [ Extern ] Post-condition for 'domain_error' 'errno_set' ensures errno_set: __fc_errno ≡ 1 Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/math.h, line 162) +[ Extern ] Assigns (file share/libc/math.h, line 160) assigns __fc_errno, \result; Unverifiable but considered Valid. -[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 169) +[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 167) assigns __fc_errno, \result; Unverifiable but considered Valid. [ Extern ] Assigns for 'normal' nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 162) +[ Extern ] Froms (file share/libc/math.h, line 160) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 162) +[ Extern ] Froms (file share/libc/math.h, line 160) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 169) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 167) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 169) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 167) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'normal' (file share/libc/math.h, line 165) +[ Extern ] Froms for 'normal' (file share/libc/math.h, line 163) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2350,28 +2347,28 @@ [ Extern ] Post-condition for 'domain_error' 'errno_set' ensures errno_set: __fc_errno ≡ 1 Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/math.h, line 176) +[ Extern ] Assigns (file share/libc/math.h, line 174) assigns __fc_errno, \result; Unverifiable but considered Valid. -[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 183) +[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 181) assigns __fc_errno, \result; Unverifiable but considered Valid. [ Extern ] Assigns for 'normal' nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 176) +[ Extern ] Froms (file share/libc/math.h, line 174) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 176) +[ Extern ] Froms (file share/libc/math.h, line 174) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 183) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 181) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 183) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 181) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'normal' (file share/libc/math.h, line 179) +[ Extern ] Froms for 'normal' (file share/libc/math.h, line 177) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2394,28 +2391,28 @@ [ Extern ] Post-condition for 'domain_error' 'errno_set' ensures errno_set: __fc_errno ≡ 1 Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/math.h, line 190) +[ Extern ] Assigns (file share/libc/math.h, line 188) assigns __fc_errno, \result; Unverifiable but considered Valid. -[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 197) +[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 195) assigns __fc_errno, \result; Unverifiable but considered Valid. [ Extern ] Assigns for 'normal' nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 190) +[ Extern ] Froms (file share/libc/math.h, line 188) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 190) +[ Extern ] Froms (file share/libc/math.h, line 188) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 197) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 195) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 197) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 195) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'normal' (file share/libc/math.h, line 193) +[ Extern ] Froms for 'normal' (file share/libc/math.h, line 191) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2438,28 +2435,28 @@ [ Extern ] Post-condition for 'domain_error' 'errno_set' ensures errno_set: __fc_errno ≡ 1 Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/math.h, line 204) +[ Extern ] Assigns (file share/libc/math.h, line 202) assigns __fc_errno, \result; Unverifiable but considered Valid. -[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 211) +[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 209) assigns __fc_errno, \result; Unverifiable but considered Valid. [ Extern ] Assigns for 'normal' nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 204) +[ Extern ] Froms (file share/libc/math.h, line 202) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 204) +[ Extern ] Froms (file share/libc/math.h, line 202) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 211) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 209) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 211) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 209) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'normal' (file share/libc/math.h, line 207) +[ Extern ] Froms for 'normal' (file share/libc/math.h, line 205) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2485,7 +2482,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 218) +[ Extern ] Froms (file share/libc/math.h, line 216) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2505,7 +2502,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 225) +[ Extern ] Froms (file share/libc/math.h, line 223) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2525,7 +2522,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 232) +[ Extern ] Froms (file share/libc/math.h, line 230) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2542,7 +2539,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 240) +[ Extern ] Froms (file share/libc/math.h, line 238) assigns \result \from x, y; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2559,7 +2556,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 247) +[ Extern ] Froms (file share/libc/math.h, line 245) assigns \result \from x, y; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2582,7 +2579,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 255) +[ Extern ] Froms (file share/libc/math.h, line 253) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2602,7 +2599,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 262) +[ Extern ] Froms (file share/libc/math.h, line 260) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2622,7 +2619,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 269) +[ Extern ] Froms (file share/libc/math.h, line 267) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2642,7 +2639,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 276) +[ Extern ] Froms (file share/libc/math.h, line 274) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2662,7 +2659,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 283) +[ Extern ] Froms (file share/libc/math.h, line 281) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2682,7 +2679,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 290) +[ Extern ] Froms (file share/libc/math.h, line 288) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2702,10 +2699,10 @@ [ Extern ] Post-condition for 'domain_error' 'errno_set' ensures errno_set: __fc_errno ≡ 1 Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/math.h, line 301) +[ Extern ] Assigns (file share/libc/math.h, line 299) assigns __fc_errno, \result; Unverifiable but considered Valid. -[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 312) +[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 310) assigns __fc_errno, \result; Unverifiable but considered Valid. [ Extern ] Assigns for 'infinite' nothing @@ -2714,22 +2711,22 @@ [ Extern ] Assigns for 'normal' nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 301) +[ Extern ] Froms (file share/libc/math.h, line 299) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 301) +[ Extern ] Froms (file share/libc/math.h, line 299) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 312) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 310) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 312) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 310) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'infinite' (file share/libc/math.h, line 308) +[ Extern ] Froms for 'infinite' (file share/libc/math.h, line 306) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'normal' (file share/libc/math.h, line 304) +[ Extern ] Froms for 'normal' (file share/libc/math.h, line 302) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2758,10 +2755,10 @@ [ Extern ] Post-condition for 'domain_error' 'errno_set' ensures errno_set: __fc_errno ≡ 1 Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/math.h, line 319) +[ Extern ] Assigns (file share/libc/math.h, line 317) assigns __fc_errno, \result; Unverifiable but considered Valid. -[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 330) +[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 328) assigns __fc_errno, \result; Unverifiable but considered Valid. [ Extern ] Assigns for 'infinite' nothing @@ -2770,22 +2767,22 @@ [ Extern ] Assigns for 'normal' nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 319) +[ Extern ] Froms (file share/libc/math.h, line 317) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 319) +[ Extern ] Froms (file share/libc/math.h, line 317) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 330) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 328) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 330) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 328) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'infinite' (file share/libc/math.h, line 326) +[ Extern ] Froms for 'infinite' (file share/libc/math.h, line 324) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'normal' (file share/libc/math.h, line 322) +[ Extern ] Froms for 'normal' (file share/libc/math.h, line 320) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2814,10 +2811,10 @@ [ Extern ] Post-condition for 'domain_error' 'errno_set' ensures errno_set: __fc_errno ≡ 1 Unverifiable but considered Valid. -[ Extern ] Assigns (file share/libc/math.h, line 337) +[ Extern ] Assigns (file share/libc/math.h, line 335) assigns __fc_errno, \result; Unverifiable but considered Valid. -[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 348) +[ Extern ] Assigns for 'domain_error' (file share/libc/math.h, line 346) assigns __fc_errno, \result; Unverifiable but considered Valid. [ Extern ] Assigns for 'infinite' nothing @@ -2826,22 +2823,22 @@ [ Extern ] Assigns for 'normal' nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 337) +[ Extern ] Froms (file share/libc/math.h, line 335) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 337) +[ Extern ] Froms (file share/libc/math.h, line 335) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 348) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 346) assigns __fc_errno \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 348) +[ Extern ] Froms for 'domain_error' (file share/libc/math.h, line 346) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'infinite' (file share/libc/math.h, line 344) +[ Extern ] Froms for 'infinite' (file share/libc/math.h, line 342) assigns \result \from x; Unverifiable but considered Valid. -[ Extern ] Froms for 'normal' (file share/libc/math.h, line 340) +[ Extern ] Froms for 'normal' (file share/libc/math.h, line 338) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2870,7 +2867,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 376) +[ Extern ] Froms (file share/libc/math.h, line 374) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2890,7 +2887,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 384) +[ Extern ] Froms (file share/libc/math.h, line 382) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2907,7 +2904,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 414) +[ Extern ] Froms (file share/libc/math.h, line 412) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2924,7 +2921,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 421) +[ Extern ] Froms (file share/libc/math.h, line 419) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2941,7 +2938,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 428) +[ Extern ] Froms (file share/libc/math.h, line 426) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2958,7 +2955,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 435) +[ Extern ] Froms (file share/libc/math.h, line 433) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2975,7 +2972,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 442) +[ Extern ] Froms (file share/libc/math.h, line 440) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -2992,7 +2989,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 449) +[ Extern ] Froms (file share/libc/math.h, line 447) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3009,7 +3006,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 460) +[ Extern ] Froms (file share/libc/math.h, line 458) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3026,7 +3023,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 467) +[ Extern ] Froms (file share/libc/math.h, line 465) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3043,7 +3040,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 474) +[ Extern ] Froms (file share/libc/math.h, line 472) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3068,7 +3065,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 500) +[ Extern ] Froms (file share/libc/math.h, line 498) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3093,7 +3090,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 508) +[ Extern ] Froms (file share/libc/math.h, line 506) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3118,7 +3115,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 516) +[ Extern ] Froms (file share/libc/math.h, line 514) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3135,7 +3132,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 529) +[ Extern ] Froms (file share/libc/math.h, line 527) assigns \result \from x, y; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3152,7 +3149,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 536) +[ Extern ] Froms (file share/libc/math.h, line 534) assigns \result \from x, y; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3178,7 +3175,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 545) +[ Extern ] Froms (file share/libc/math.h, line 543) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3198,7 +3195,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 553) +[ Extern ] Froms (file share/libc/math.h, line 551) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3218,7 +3215,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 561) +[ Extern ] Froms (file share/libc/math.h, line 559) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3235,7 +3232,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 584) +[ Extern ] Froms (file share/libc/math.h, line 582) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3252,7 +3249,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 590) +[ Extern ] Froms (file share/libc/math.h, line 588) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3269,7 +3266,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 597) +[ Extern ] Froms (file share/libc/math.h, line 595) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3286,7 +3283,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 603) +[ Extern ] Froms (file share/libc/math.h, line 601) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3303,7 +3300,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 609) +[ Extern ] Froms (file share/libc/math.h, line 607) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3320,7 +3317,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 615) +[ Extern ] Froms (file share/libc/math.h, line 613) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3337,7 +3334,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 637) +[ Extern ] Froms (file share/libc/math.h, line 635) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3354,7 +3351,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 643) +[ Extern ] Froms (file share/libc/math.h, line 641) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3371,7 +3368,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 649) +[ Extern ] Froms (file share/libc/math.h, line 647) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3388,7 +3385,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 663) +[ Extern ] Froms (file share/libc/math.h, line 661) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3405,7 +3402,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 669) +[ Extern ] Froms (file share/libc/math.h, line 667) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3422,7 +3419,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 675) +[ Extern ] Froms (file share/libc/math.h, line 673) assigns \result \from x; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3439,7 +3436,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 682) +[ Extern ] Froms (file share/libc/math.h, line 680) assigns \result \from x, y; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3456,7 +3453,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 689) +[ Extern ] Froms (file share/libc/math.h, line 687) assigns \result \from x, y; Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3473,7 +3470,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 710) +[ Extern ] Froms (file share/libc/math.h, line 708) assigns \result \from (indirect: *(tagp + (0 ..))); Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3490,7 +3487,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 717) +[ Extern ] Froms (file share/libc/math.h, line 715) assigns \result \from (indirect: *(tagp + (0 ..))); Unverifiable but considered Valid. [ Valid ] Default behavior @@ -3507,7 +3504,7 @@ [ Extern ] Assigns nothing assigns \nothing; Unverifiable but considered Valid. -[ Extern ] Froms (file share/libc/math.h, line 724) +[ Extern ] Froms (file share/libc/math.h, line 722) assigns \result \from (indirect: *(tagp + (0 ..))); Unverifiable but considered Valid. [ Valid ] Default behavior diff --git a/tests/libc/oracle/coverage.res.oracle b/tests/libc/oracle/coverage.res.oracle index abb4e7886a7..6e7f751bf3c 100644 --- a/tests/libc/oracle/coverage.res.oracle +++ b/tests/libc/oracle/coverage.res.oracle @@ -28,7 +28,7 @@ main: 4 stmts out of 4 (100.0%) [metrics] Eva coverage statistics ======================= - Syntactically reachable functions = 2 (out of 80) + Syntactically reachable functions = 2 (out of 82) Semantically reached functions = 2 Coverage estimation = 100.0% [metrics] Statements analyzed by Eva diff --git a/tests/libc/oracle/fc_libc.0.res.oracle b/tests/libc/oracle/fc_libc.0.res.oracle index 461bda59470..15885d81a20 100644 --- a/tests/libc/oracle/fc_libc.0.res.oracle +++ b/tests/libc/oracle/fc_libc.0.res.oracle @@ -38,7 +38,7 @@ wcslen (2 calls); wcsncat (0 call); wcsncpy (0 call); wmemcpy (0 call); wmemset (0 call); - Undefined functions (375) + Undefined functions (377) ========================= FD_CLR (0 call); FD_ISSET (0 call); FD_SET (0 call); FD_ZERO (0 call); Frama_C_abort (1 call); Frama_C_char_interval (1 call); @@ -135,24 +135,24 @@ siglongjmp (0 call); signal (0 call); sigprocmask (0 call); sin (0 call); sinf (0 call); sinl (0 call); socket (0 call); socketpair (0 call); sqrt (0 call); sqrtf (0 call); sqrtl (0 call); srand (0 call); - srand48 (0 call); srandom (0 call); stat (0 call); strcoll (0 call); - strcspn (0 call); strftime (0 call); strlcat (0 call); strlcpy (0 call); - strncasecmp (0 call); strpbrk (0 call); strsep (0 call); strsignal (0 call); - strspn (0 call); strtod (0 call); strtof (0 call); strtoimax (0 call); - strtok (0 call); strtok_r (0 call); strtol (0 call); strtold (0 call); - strtoll (0 call); strtoul (0 call); strtoull (0 call); strxfrm (0 call); - sync (0 call); sysconf (0 call); syslog (0 call); system (0 call); - tcgetattr (0 call); tcsetattr (0 call); time (0 call); times (0 call); - tmpfile (0 call); tmpnam (0 call); trunc (0 call); truncf (0 call); - truncl (0 call); ttyname (0 call); tzset (0 call); umask (0 call); - ungetc (0 call); unlink (0 call); usleep (0 call); utimes (0 call); - vfprintf (0 call); vfscanf (0 call); vprintf (0 call); vscanf (0 call); - vsnprintf (0 call); vsprintf (0 call); vsyslog (0 call); wait (0 call); - waitpid (0 call); wcschr (0 call); wcscmp (0 call); wcscspn (0 call); - wcslcat (0 call); wcslcpy (0 call); wcsncmp (0 call); wcspbrk (0 call); - wcsrchr (0 call); wcsspn (0 call); wcsstr (0 call); wcstombs (0 call); - wctomb (0 call); wmemchr (0 call); wmemcmp (0 call); wmemmove (0 call); - write (0 call); + srand48 (0 call); srandom (0 call); stat (0 call); stpcpy (0 call); + strcasestr (0 call); strcoll (0 call); strcspn (0 call); strftime (0 call); + strlcat (0 call); strlcpy (0 call); strncasecmp (0 call); strpbrk (0 call); + strsep (0 call); strsignal (0 call); strspn (0 call); strtod (0 call); + strtof (0 call); strtoimax (0 call); strtok (0 call); strtok_r (0 call); + strtol (0 call); strtold (0 call); strtoll (0 call); strtoul (0 call); + strtoull (0 call); strxfrm (0 call); sync (0 call); sysconf (0 call); + syslog (0 call); system (0 call); tcgetattr (0 call); tcsetattr (0 call); + time (0 call); times (0 call); tmpfile (0 call); tmpnam (0 call); + trunc (0 call); truncf (0 call); truncl (0 call); ttyname (0 call); + tzset (0 call); umask (0 call); ungetc (0 call); unlink (0 call); + usleep (0 call); utimes (0 call); vfprintf (0 call); vfscanf (0 call); + vprintf (0 call); vscanf (0 call); vsnprintf (0 call); vsprintf (0 call); + vsyslog (0 call); wait (0 call); waitpid (0 call); wcschr (0 call); + wcscmp (0 call); wcscspn (0 call); wcslcat (0 call); wcslcpy (0 call); + wcsncmp (0 call); wcspbrk (0 call); wcsrchr (0 call); wcsspn (0 call); + wcsstr (0 call); wcstombs (0 call); wctomb (0 call); wmemchr (0 call); + wmemcmp (0 call); wmemmove (0 call); write (0 call); 'Extern' global variables (20) ============================== @@ -176,7 +176,7 @@ Goto = 84 Assignment = 415 Exit point = 76 - Function = 451 + Function = 453 Function call = 84 Pointer dereferencing = 157 Cyclomatic complexity = 271 diff --git a/tests/libc/oracle/fc_libc.1.res.oracle b/tests/libc/oracle/fc_libc.1.res.oracle index 88c0df5a8f9..aecfd20abf2 100644 --- a/tests/libc/oracle/fc_libc.1.res.oracle +++ b/tests/libc/oracle/fc_libc.1.res.oracle @@ -3391,6 +3391,19 @@ extern char *strpbrk(char const *s, char const *accept); char *strstr(char const *haystack, char const *needle); +/*@ requires valid_string_haystack: valid_read_string(haystack); + requires valid_string_needle: valid_read_string(needle); + ensures + result_null_or_in_haystack: + \result ≡ \null ∨ + (\subset(\result, \old(haystack) + (0 ..)) ∧ \valid_read(\result)); + assigns \result; + assigns \result + \from haystack, (indirect: *(haystack + (0 ..))), + (indirect: *(needle + (0 ..))); + */ +extern char *strcasestr(char const *haystack, char const *needle); + char *__fc_strtok_ptr; /*@ requires valid_string_delim: valid_read_string(delim); assigns *(s + (0 ..)), *(__fc_strtok_ptr + (0 ..)), \result, @@ -3556,6 +3569,20 @@ char *strncpy(char *dest, char const *src, size_t n); */ size_t strlcpy(char * __restrict dest, char const * __restrict src, size_t n); +/*@ requires valid_string_src: valid_read_string(src); + requires room_string: \valid(dest + (0 .. strlen(src))); + requires + separation: + \separated(dest + (0 .. strlen(src)), src + (0 .. strlen(src))); + ensures equal_contents: strcmp(\old(dest), \old(src)) ≡ 0; + ensures points_to_end: \result ≡ \old(dest) + strlen(\old(dest)); + assigns *(dest + (0 .. strlen{Old}(src))), \result; + assigns *(dest + (0 .. strlen{Old}(src))) + \from *(src + (0 .. strlen{Old}(src))); + assigns \result \from dest; + */ +extern char *stpcpy(char * __restrict dest, char const * __restrict src); + char *strcat(char *dest, char const *src); char *strncat(char *dest, char const *src, size_t n); diff --git a/tests/libc/oracle/netdb_c.res.oracle b/tests/libc/oracle/netdb_c.res.oracle index fcd756cf744..419fd8ae3f5 100644 --- a/tests/libc/oracle/netdb_c.res.oracle +++ b/tests/libc/oracle/netdb_c.res.oracle @@ -23,12 +23,14 @@ \return(strrchr) == 0 (auto) \return(strpbrk) == 0 (auto) \return(strstr) == 0 (auto) + \return(strcasestr) == 0 (auto) \return(strtok) == 0 (auto) \return(strtok_r) == 0 (auto) \return(strsep) == 0 (auto) \return(strerror) == 0 (auto) \return(strcpy) == 0 (auto) \return(strncpy) == 0 (auto) + \return(stpcpy) == 0 (auto) \return(strcat) == 0 (auto) \return(strncat) == 0 (auto) \return(strdup) == 0 (auto) @@ -245,7 +247,7 @@ function strncpy: precondition 'room_nstring' got status valid. [eva] share/libc/netdb.c:147: function strncpy: precondition 'separation' got status valid. -[eva] share/libc/string.h:369: +[eva] share/libc/string.h:367: cannot evaluate ACSL term, unsupported ACSL construct: logic function strcmp [eva] Done for function strncpy [eva] Recording results for gethostbyname diff --git a/tests/libc/oracle/signal_h.res.oracle b/tests/libc/oracle/signal_h.res.oracle index f09d621e64d..42c80f2642d 100644 --- a/tests/libc/oracle/signal_h.res.oracle +++ b/tests/libc/oracle/signal_h.res.oracle @@ -124,7 +124,7 @@ function sigaction: precondition 'valid_read_act_or_null' got status valid. [eva] tests/libc/signal_h.c:48: function sigaction: precondition 'separation,separated_acts' got status valid. -[eva] share/libc/signal.h:214: +[eva] share/libc/signal.h:212: cannot evaluate ACSL term, unsupported ACSL construct: logic coercion struct sigaction -> set<struct sigaction> [eva] Done for function sigaction [eva] computing for function sigaction <- main. diff --git a/tests/libc/oracle/stdlib_c_env.res.oracle b/tests/libc/oracle/stdlib_c_env.res.oracle index bb422440f6d..5322b2985d4 100644 --- a/tests/libc/oracle/stdlib_c_env.res.oracle +++ b/tests/libc/oracle/stdlib_c_env.res.oracle @@ -105,7 +105,7 @@ function strcpy: precondition 'room_string' got status valid. [eva] tests/libc/stdlib_c_env.c:15: function strcpy: precondition 'separation' got status valid. -[eva] share/libc/string.h:353: +[eva] share/libc/string.h:351: cannot evaluate ACSL term, unsupported ACSL construct: logic function strcmp [eva] Done for function strcpy [eva] computing for function getenv <- main. diff --git a/tests/libc/oracle/string_c.res.oracle b/tests/libc/oracle/string_c.res.oracle index 7dc1cf2aedc..d4cb7a56f16 100644 --- a/tests/libc/oracle/string_c.res.oracle +++ b/tests/libc/oracle/string_c.res.oracle @@ -485,13 +485,13 @@ function strlen: precondition 'valid_string_s' got status valid. [eva] Recording results for strlen [eva] Done for function strlen -[eva] share/libc/string.h:411: +[eva] share/libc/string.h:405: function strcat: postcondition 'sum_of_lengths' got status valid. -[eva] share/libc/string.h:414: +[eva] share/libc/string.h:408: function strcat: postcondition 'initialization,dest' got status valid. -[eva] share/libc/string.h:415: +[eva] share/libc/string.h:409: function strcat: postcondition 'dest_null_terminated' got status valid. -[eva] share/libc/string.h:416: +[eva] share/libc/string.h:410: function strcat: postcondition 'result_ptr' got status valid. [eva] Recording results for strcat [eva] Done for function strcat @@ -550,11 +550,11 @@ function strcpy: precondition 'room_string' got status valid. [eva] tests/libc/string_c.c:142: function strcpy: precondition 'separation' got status valid. -[eva] share/libc/string.h:353: +[eva] share/libc/string.h:351: cannot evaluate ACSL term, unsupported ACSL construct: logic function strcmp -[eva:alarm] share/libc/string.h:353: Warning: +[eva:alarm] share/libc/string.h:351: Warning: function strcpy: postcondition 'equal_contents' got status unknown. -[eva] share/libc/string.h:354: +[eva] share/libc/string.h:352: function strcpy: postcondition 'result_ptr' got status valid. [eva] Recording results for strcpy [eva] Done for function strcpy @@ -594,13 +594,13 @@ function strncpy: precondition 'room_nstring' got status valid. [eva] tests/libc/string_c.c:154: function strncpy: precondition 'separation' got status valid. -[eva] share/libc/string.h:365: +[eva] share/libc/string.h:363: function strncpy: postcondition 'result_ptr' got status valid. -[eva] share/libc/string.h:366: +[eva] share/libc/string.h:364: function strncpy: postcondition 'initialization' got status valid. -[eva] share/libc/string.h:369: +[eva] share/libc/string.h:367: cannot evaluate ACSL term, unsupported ACSL construct: logic function strcmp -[eva:alarm] share/libc/string.h:369: Warning: +[eva:alarm] share/libc/string.h:367: Warning: function strncpy, behavior complete: postcondition 'equal_after_copy' got status unknown. [eva] Recording results for strncpy [eva] Done for function strncpy @@ -614,9 +614,9 @@ function strncpy: precondition 'room_nstring' got status valid. [eva] tests/libc/string_c.c:157: function strncpy: precondition 'separation' got status valid. -[eva] share/libc/string.h:372: +[eva] share/libc/string.h:370: cannot evaluate ACSL term, unsupported ACSL construct: logic function memcmp -[eva:alarm] share/libc/string.h:372: Warning: +[eva:alarm] share/libc/string.h:370: Warning: function strncpy, behavior partial: postcondition 'equal_prefix' got status unknown. [eva] Recording results for strncpy [eva] Done for function strncpy diff --git a/tests/libc/oracle/string_c_generic.res.oracle b/tests/libc/oracle/string_c_generic.res.oracle index 3431164e2af..79cc74ecd4c 100644 --- a/tests/libc/oracle/string_c_generic.res.oracle +++ b/tests/libc/oracle/string_c_generic.res.oracle @@ -12,11 +12,11 @@ function strcpy: precondition 'room_string' got status valid. [eva] tests/libc/string_c_generic.c:56: function strcpy: precondition 'separation' got status valid. -[eva] share/libc/string.h:353: +[eva] share/libc/string.h:351: cannot evaluate ACSL term, unsupported ACSL construct: logic function strcmp -[eva:alarm] share/libc/string.h:353: Warning: +[eva:alarm] share/libc/string.h:351: Warning: function strcpy: postcondition 'equal_contents' got status unknown. -[eva] share/libc/string.h:354: +[eva] share/libc/string.h:352: function strcpy: postcondition 'result_ptr' got status valid. [eva] Recording results for strcpy [eva] Done for function strcpy @@ -161,13 +161,13 @@ [eva] tests/libc/string_c_generic.c:73: function strncpy: precondition 'separation' got status valid. [eva] share/libc/string.c:212: starting to merge loop iterations -[eva] share/libc/string.h:365: +[eva] share/libc/string.h:363: function strncpy: postcondition 'result_ptr' got status valid. -[eva] share/libc/string.h:366: +[eva] share/libc/string.h:364: function strncpy: postcondition 'initialization' got status valid. -[eva] share/libc/string.h:369: +[eva] share/libc/string.h:367: cannot evaluate ACSL term, unsupported ACSL construct: logic function strcmp -[eva:alarm] share/libc/string.h:369: Warning: +[eva:alarm] share/libc/string.h:367: Warning: function strncpy, behavior complete: postcondition 'equal_after_copy' got status unknown. [eva] Recording results for strncpy [eva] Done for function strncpy @@ -199,9 +199,9 @@ function strncpy: precondition 'room_nstring' got status valid. [eva] tests/libc/string_c_generic.c:78: function strncpy: precondition 'separation' got status valid. -[eva] share/libc/string.h:372: +[eva] share/libc/string.h:370: cannot evaluate ACSL term, unsupported ACSL construct: logic function memcmp -[eva:alarm] share/libc/string.h:372: Warning: +[eva:alarm] share/libc/string.h:370: Warning: function strncpy, behavior partial: postcondition 'equal_prefix' got status unknown. [eva] Recording results for strncpy [eva] Done for function strncpy @@ -252,9 +252,9 @@ function strlen: postcondition 'acsl_c_equiv' got status valid. [eva] Recording results for strlen [eva] Done for function strlen -[eva] share/libc/string.h:425: +[eva] share/libc/string.h:419: function strncat: postcondition 'result_ptr' got status valid. -[eva] share/libc/string.h:440: +[eva] share/libc/string.h:434: function strncat, behavior partial: postcondition 'sum_of_bounded_lengths' got status valid. [eva] Recording results for strncat [eva] Done for function strncat diff --git a/tests/misc/oracle/pragma-pack.0.res.oracle b/tests/misc/oracle/pragma-pack.0.res.oracle index a129933710f..4ca3caef6f2 100644 --- a/tests/misc/oracle/pragma-pack.0.res.oracle +++ b/tests/misc/oracle/pragma-pack.0.res.oracle @@ -8,6 +8,8 @@ [kernel:typing:pragma] Pushing fc_stdlib stddef.h [kernel:typing:pragma] Pushing fc_stdlib __fc_define_size_t.h [kernel:typing:pragma] Popping fc_stdlib __fc_define_size_t.h +[kernel:typing:pragma] Pushing fc_stdlib __fc_define_ssize_t.h +[kernel:typing:pragma] Popping fc_stdlib __fc_define_ssize_t.h [kernel:typing:pragma] Pushing fc_stdlib __fc_define_wchar_t.h [kernel:typing:pragma] Popping fc_stdlib __fc_define_wchar_t.h [kernel:typing:pragma] Popping fc_stdlib stddef.h -- GitLab From 9e0a380f1d3fdcc72ae5bccddb533addc39e1c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 22 Feb 2019 14:17:50 +0100 Subject: [PATCH 026/376] [Kernel] Warns when converting a pointer into an integer without an explicit cast. Adds the new warning category "typing:int-conversion". --- src/kernel_internals/typing/cabs2cil.ml | 10 ++++++++-- src/kernel_services/plugin_entry_points/kernel.ml | 3 +++ src/kernel_services/plugin_entry_points/kernel.mli | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index cccda3a9169..9df39736f7c 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -2737,7 +2737,6 @@ let rec castTo ?(fromsource=false) (* Taking numerical address or calling an absolute location. Also accepted by gcc albeit with a warning. *) | TInt _, TPtr (TFun _, _) -> result - | TPtr (TFun _, _), TInt _ -> result (* pointer to potential function type. Note that we do not use unrollTypeDeep above in order to avoid needless divergence with @@ -2770,7 +2769,14 @@ let rec castTo ?(fromsource=false) | TInt _, TPtr _ -> result - | TPtr _, TInt _ -> result + | TPtr _, TInt _ -> + if not fromsource + then + Kernel.warning + ~wkey:Kernel.wkey_int_conversion + ~current:true + "Conversion from a pointer to an integer without an explicit cast"; + result | TArray _, TPtr _ -> result diff --git a/src/kernel_services/plugin_entry_points/kernel.ml b/src/kernel_services/plugin_entry_points/kernel.ml index 9c0399ad475..0c95ee14a2c 100644 --- a/src/kernel_services/plugin_entry_points/kernel.ml +++ b/src/kernel_services/plugin_entry_points/kernel.ml @@ -145,6 +145,9 @@ let wkey_incompatible_types_call = let wkey_incompatible_pointer_types = register_warn_category "typing:incompatible-pointer-types" +let wkey_int_conversion = + register_warn_category "typing:int-conversion" + let wkey_cert_exp_46 = register_warn_category "CERT:EXP:46" let wkey_cert_msc_38 = register_warn_category "CERT:MSC:38" diff --git a/src/kernel_services/plugin_entry_points/kernel.mli b/src/kernel_services/plugin_entry_points/kernel.mli index bc130617463..06e4720e294 100644 --- a/src/kernel_services/plugin_entry_points/kernel.mli +++ b/src/kernel_services/plugin_entry_points/kernel.mli @@ -138,6 +138,8 @@ val wkey_incompatible_types_call: warn_category val wkey_incompatible_pointer_types: warn_category +val wkey_int_conversion: warn_category + val wkey_cert_exp_46: warn_category val wkey_cert_msc_38: warn_category -- GitLab From 2c7e9f0c69717f1c0dbc72a6b257c3892d233e2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 22 Feb 2019 15:09:56 +0100 Subject: [PATCH 027/376] Fixes tests: explicitly casts pointers to integers to avoid a new warning. --- src/plugins/wp/tests/wp_acsl/pointer.i | 2 +- src/plugins/wp/tests/wp_plugin/frame.i | 2 +- src/plugins/wp/tests/wp_usage/code_spec.i | 2 +- tests/builtins/alloc.c | 2 +- tests/builtins/imprecise-malloc-free.c | 8 ++++---- tests/builtins/imprecise.c | 6 +++--- tests/builtins/long_init.c | 4 ++-- tests/builtins/long_init2.c | 4 ++-- tests/builtins/long_init3.c | 4 ++-- tests/builtins/memchr.c | 2 +- tests/builtins/memcpy.c | 2 +- tests/builtins/oracle/alloc_weak.res.oracle | 2 ++ tests/builtins/strchr.c | 2 +- tests/builtins/strlen.c | 2 +- tests/builtins/strnlen2.c | 2 +- tests/builtins/wcslen.c | 2 +- tests/slicing/slice_no_body.i | 2 +- tests/syntax/merge_loc.i | 2 +- tests/syntax/type_redef.i | 2 +- tests/value/addition.i | 10 +++++----- tests/value/array_ptr.i | 2 +- tests/value/bitfield.i | 6 +++--- tests/value/call_simple.i | 2 +- tests/value/cmp_ptr.i | 2 +- tests/value/context_free.i | 2 +- tests/value/downcast.i | 6 +++--- tests/value/from_call.i | 4 ++-- tests/value/from_ptr.i | 8 ++++---- tests/value/join_misaligned.i | 4 ++-- tests/value/mini_pointrer.i | 2 +- tests/value/nonlin.c | 2 +- tests/value/not_ct_array_arg.i | 2 +- tests/value/offset_top.i | 2 +- tests/value/oracle/bitfield.res.oracle | 6 +++--- tests/value/oracle/pointer_int_cast.res.oracle | 2 ++ tests/value/origin.i | 2 +- tests/value/period.c | 2 +- tests/value/reading_null.i | 2 +- tests/value/struct3.i | 2 +- tests/value/struct_array.i | 2 +- tests/value/struct_incl.i | 6 +++--- tests/value/symbolic_locs.i | 2 +- tests/value/volatile.c | 2 +- tests/value/volatilestruct.c | 2 +- 44 files changed, 71 insertions(+), 67 deletions(-) diff --git a/src/plugins/wp/tests/wp_acsl/pointer.i b/src/plugins/wp/tests/wp_acsl/pointer.i index d0d0f10cb85..168d9b15459 100644 --- a/src/plugins/wp/tests/wp_acsl/pointer.i +++ b/src/plugins/wp/tests/wp_acsl/pointer.i @@ -83,4 +83,4 @@ void absurd (int * q) { return; } ensures qed_ok: NotNull: p != \null ==> \result != 0 ; ensures qed_ok: IsNull: p == \null ==> \result == 0 ; */ -int null (int *p) { return p; } +int null (int *p) { return (int) p; } diff --git a/src/plugins/wp/tests/wp_plugin/frame.i b/src/plugins/wp/tests/wp_plugin/frame.i index 912625538c9..1292d5e277b 100644 --- a/src/plugins/wp/tests/wp_plugin/frame.i +++ b/src/plugins/wp/tests/wp_plugin/frame.i @@ -32,7 +32,7 @@ int localref(int *p) //@ensures KO: \result == r ; int alias(int r) { - int p = &r ; + int p = (int) &r ; f(); return r ; } diff --git a/src/plugins/wp/tests/wp_usage/code_spec.i b/src/plugins/wp/tests/wp_usage/code_spec.i index b325e6d3524..30c1819dcc1 100644 --- a/src/plugins/wp/tests/wp_usage/code_spec.i +++ b/src/plugins/wp/tests/wp_usage/code_spec.i @@ -37,7 +37,7 @@ void by_value_in_code(int x) { } void by_reference_in_code(int *p, int **qq) { - *p=(int *) 0; + *p=0; **qq=*p1; } diff --git a/tests/builtins/alloc.c b/tests/builtins/alloc.c index 51579426082..33f24cdc7d6 100644 --- a/tests/builtins/alloc.c +++ b/tests/builtins/alloc.c @@ -51,7 +51,7 @@ void main_abs(int c) r = - (int) q; *(int*)0x104=0; - *r = r; + *r = (int) r; (*q)++; a = *q; /* it is incorrect to find 1 here */ diff --git a/tests/builtins/imprecise-malloc-free.c b/tests/builtins/imprecise-malloc-free.c index 0e5bcc75dcb..8c3a3bc6021 100644 --- a/tests/builtins/imprecise-malloc-free.c +++ b/tests/builtins/imprecise-malloc-free.c @@ -9,7 +9,7 @@ extern int i; void main() { int size1, size2; - size1 = &size1 + i; + size1 = (int) (&size1 + i); size2 = i + ((int)&size2 >> 1); int *p = malloc((unsigned long)&i+(int)&i); int *q = malloc(size1); @@ -18,9 +18,9 @@ void main() { Frama_C_show_each(p, q, r); Frama_C_show_each(p+(int)p); - *p = p+1; - *q = q+2; - *r = r+3; + *p = (int) (p+1); + *q = (int) (q+2); + *r = (int) (r+3); free(p+(int)p); free(q+(int)r); diff --git a/tests/builtins/imprecise.c b/tests/builtins/imprecise.c index c462cafa2bf..9a82adfd802 100644 --- a/tests/builtins/imprecise.c +++ b/tests/builtins/imprecise.c @@ -19,7 +19,7 @@ void write_garbled() { // Write through a garbled mix int *p = (&j + (int) &k) - (int) &k; // creates a garbled mix *p = 1; Frama_C_dump_each(); - *p = p; + *p = (int) p; } volatile int v, addr; @@ -50,7 +50,7 @@ void abstract_structs() { // v2 = v1; memset(&v3, -5, sizeof(v3)); // Also illegal, rejected by gcc int *p2 = ((int*)&v2)+1; - *p2 = &addr; + *p2 = (int) &addr; // *t[5] = v2; // assigning incomplete type char *p4 = ((char*)&v5) + (short)v; *p4 = 18; @@ -63,7 +63,7 @@ void abstract_structs() { void cast_address() { int x; int *p = &x; - char c1 = p; + char c1 = (char) p; char c2 = *((char*)&p); char c3 = *((char*)&p)+0; } diff --git a/tests/builtins/long_init.c b/tests/builtins/long_init.c index 9bc8495470a..c244b17b5e3 100644 --- a/tests/builtins/long_init.c +++ b/tests/builtins/long_init.c @@ -31,7 +31,7 @@ double analyze(int *a, unsigned long *b, double *c) { return res; } -char garbled_mix = "abc"; +char garbled_mix = (char) "abc"; char *s = "abc"; //int another_global = 42; // from init_global2.c //int yet_another_global = 43; // from init_global3.c @@ -71,7 +71,7 @@ void init_inner(int n, char const *tea) { pr2 = &r2; pr_escaping = &r2; alloc1 = malloc(sizeof(int*)); - *alloc1 = alloc1; + *alloc1 = (int) alloc1; alloc2 = malloc(2*sizeof(int)); *alloc2 = 37; free(alloc2); diff --git a/tests/builtins/long_init2.c b/tests/builtins/long_init2.c index 564442c150e..065358b2e68 100644 --- a/tests/builtins/long_init2.c +++ b/tests/builtins/long_init2.c @@ -31,7 +31,7 @@ double analyze(int *a, unsigned long *b, double *c) { return res; } -char garbled_mix = "abc"; +char garbled_mix = (char) "abc"; char *s = "abc"; int another_global = 42; //int yet_another_global = 43; // from init_global3.c @@ -71,7 +71,7 @@ void init_inner(int n, char const *tea) { pr2 = &r2; pr_escaping = &r2; alloc1 = malloc(sizeof(int*)); - *alloc1 = alloc1; + *alloc1 = (int) alloc1; alloc2 = malloc(2*sizeof(int)); *alloc2 = 37; free(alloc2); diff --git a/tests/builtins/long_init3.c b/tests/builtins/long_init3.c index e5e30d8ce93..b3b97e7aee3 100644 --- a/tests/builtins/long_init3.c +++ b/tests/builtins/long_init3.c @@ -31,7 +31,7 @@ double analyze(int *a, unsigned long *b, double *c) { return res; } -char garbled_mix = "abc"; +char garbled_mix = (char) "abc"; char *s = "abc"; int another_global = 42; int yet_another_global = 43; @@ -71,7 +71,7 @@ void init_inner(int n, char const *tea) { pr2 = &r2; pr_escaping = &r2; alloc1 = malloc(sizeof(int*)); - *alloc1 = alloc1; + *alloc1 = (int) alloc1; alloc2 = malloc(2*sizeof(int)); *alloc2 = 37; free(alloc2); diff --git a/tests/builtins/memchr.c b/tests/builtins/memchr.c index 6a3f5b4b777..7b39c55a845 100644 --- a/tests/builtins/memchr.c +++ b/tests/builtins/memchr.c @@ -261,7 +261,7 @@ void memchr_escaping() { CHAR_ARRAY(s,4); { int x; - *((int *)s) = &x; + *((int *)s) = (int) &x; } IF_NONDET(s[0], 0); MEMCHR(RES, z1, s, 0, c, 4); // alarm diff --git a/tests/builtins/memcpy.c b/tests/builtins/memcpy.c index 8ef2b0ac855..3b438a80337 100644 --- a/tests/builtins/memcpy.c +++ b/tests/builtins/memcpy.c @@ -87,7 +87,7 @@ void main (int a, int b){ memcpy(&v3, t+(int)t, sizeof(v1)); memcpy(&v4 + (int)&v4, &v1, sizeof(v1)-20); - v4.y = &t[0]; + v4.y = (int) &t[0]; memcpy(&v5 + (int)&v5, &v4, sizeof(v4)-20); if (maybe) { diff --git a/tests/builtins/oracle/alloc_weak.res.oracle b/tests/builtins/oracle/alloc_weak.res.oracle index 2ec25a88deb..8a75c273777 100644 --- a/tests/builtins/oracle/alloc_weak.res.oracle +++ b/tests/builtins/oracle/alloc_weak.res.oracle @@ -1,4 +1,6 @@ [kernel] Parsing tests/builtins/alloc_weak.c (with preprocessing) +[kernel:typing:int-conversion] tests/builtins/alloc_weak.c:37: Warning: + Conversion from a pointer to an integer without an explicit cast [eva] Analyzing a complete application starting at main [eva] Computing initial state [eva] Initial state computed diff --git a/tests/builtins/strchr.c b/tests/builtins/strchr.c index 398a3d3c25c..e3678b24124 100644 --- a/tests/builtins/strchr.c +++ b/tests/builtins/strchr.c @@ -255,7 +255,7 @@ void strchr_escaping() { CHAR_ARRAY(s,4); { int x; - *((int *)s) = &x; + *((int *)s) = (int) &x; } IF_NONDET(s[0], 0); STRCHR(RES, z1, s, 0, c); // alarm diff --git a/tests/builtins/strlen.c b/tests/builtins/strlen.c index 91cf082a9ab..619b8a59cea 100644 --- a/tests/builtins/strlen.c +++ b/tests/builtins/strlen.c @@ -219,7 +219,7 @@ void escaping() { char s[4]; { int x; - *((int *)s) = &x; + *((int *)s) = (int) &x; } if (nondet) s[0] = 0; int z1 = strlen(s); // alarm diff --git a/tests/builtins/strnlen2.c b/tests/builtins/strnlen2.c index 9ea4b3c856f..241fb154832 100644 --- a/tests/builtins/strnlen2.c +++ b/tests/builtins/strnlen2.c @@ -193,7 +193,7 @@ void escaping() { CHAR_ARRAY(s,4); { int x; - *((int *)s) = &x; + *((int *)s) = (int) &x; } IF_NONDET(s[0], 0); RES z1 = strnlen(s, 4); // alarm diff --git a/tests/builtins/wcslen.c b/tests/builtins/wcslen.c index 906cc2d487f..dea7cd1aad9 100644 --- a/tests/builtins/wcslen.c +++ b/tests/builtins/wcslen.c @@ -219,7 +219,7 @@ void escaping() { wchar_t s[4]; { int x; - *((int *)s) = &x; *((int *)&s[1]) = &x; *((int *)&s[2]) = &x; *((int *)&s[3]) = &x; + *((int *)s) = (int)&x; *((int *)&s[1]) = (int)&x; *((int *)&s[2]) = (int)&x; *((int *)&s[3]) = (int)&x; } if (nondet) s[0] = 0; int z1 = wcslen(s); // alarm diff --git a/tests/slicing/slice_no_body.i b/tests/slicing/slice_no_body.i index 9c249f20d9f..2c58ae1277d 100644 --- a/tests/slicing/slice_no_body.i +++ b/tests/slicing/slice_no_body.i @@ -24,5 +24,5 @@ int h (void) { G = f (4); if (G > 0) G = g (c); - return g; + return (int)g; } diff --git a/tests/syntax/merge_loc.i b/tests/syntax/merge_loc.i index 91608458af6..8f08173f151 100644 --- a/tests/syntax/merge_loc.i +++ b/tests/syntax/merge_loc.i @@ -20,4 +20,4 @@ extern int baz; extern int baz; -int z = &baz; +int z = (int) &baz; diff --git a/tests/syntax/type_redef.i b/tests/syntax/type_redef.i index 11cbac58919..28d719f0638 100644 --- a/tests/syntax/type_redef.i +++ b/tests/syntax/type_redef.i @@ -61,7 +61,7 @@ typedef int magic; void i() { typedef void (*magic)(void); //valid { typedef struct {int obj;} magic; } //valid - magic m = g; //valid (test scoping of local typedef) + magic m = (magic) g; //valid (test scoping of local typedef) } magic m = 2; //valid (test scoping of local typedef) diff --git a/tests/value/addition.i b/tests/value/addition.i index ed227add3f6..98f1a90a1bd 100644 --- a/tests/value/addition.i +++ b/tests/value/addition.i @@ -35,15 +35,15 @@ int main(int u2, int u3, int u4) p2 = ~((int)&p1); - p3 = &(t[(char)(&p1)]); + p3 = (int) &(t[(char)(&p1)]); - p4 = &(tt[(char)(&p1)].a); + p4 = (int) &(tt[(char)(&p1)].a); - p5 = &(ttt[(char)(&p1)][(char)&p2]); + p5 = (int) &(ttt[(char)(&p1)][(char)&p2]); - p6 = &(ttt[(char)(&p1)][u2]); + p6 = (int) &(ttt[(char)(&p1)][u2]); - p7 = &(ttt[u2][(char)(&p2)]); + p7 = (int) &(ttt[u2][(char)(&p2)]); p8 = (&p1 + 1) < &p2; diff --git a/tests/value/array_ptr.i b/tests/value/array_ptr.i index 74ddfa99602..2305c9fb1ab 100644 --- a/tests/value/array_ptr.i +++ b/tests/value/array_ptr.i @@ -11,6 +11,6 @@ int f(param_check **x) { param_check l={1}; int main() { - int g = &l; + int g = (int) &l; f((param_check **)&g); } diff --git a/tests/value/bitfield.i b/tests/value/bitfield.i index 2fb52b64f96..595e5713872 100644 --- a/tests/value/bitfield.i +++ b/tests/value/bitfield.i @@ -120,14 +120,14 @@ void main_old (){ h.a = VV; - v.c = &v; - v.d = &v + 1; + v.c = (int) &v; + v.d = (int) (&v + 1); v.d = v.d + 1; v.a = 4; v.b = 7; f(v.b); h.b = foo + foo + h.a + h.b; - h.c = &v +1; + h.c = (int) (&v +1); k8.b = 8; kr8.b = return_8(); diff --git a/tests/value/call_simple.i b/tests/value/call_simple.i index 9c259df2d06..3447eff300e 100644 --- a/tests/value/call_simple.i +++ b/tests/value/call_simple.i @@ -4,7 +4,7 @@ void f(int* a,int b,int c) { int *i=a; *i = 0; a = 0; - X = a+b+c; + X = (int) (a+b+c); } int main (int ll) { diff --git a/tests/value/cmp_ptr.i b/tests/value/cmp_ptr.i index 0d499b504eb..198a11aacaf 100644 --- a/tests/value/cmp_ptr.i +++ b/tests/value/cmp_ptr.i @@ -20,7 +20,7 @@ int main (int u) { if (p >= &(T[5])) {*p=88;*q=77;} x = !(&y+2); - *(int*)&ff = &y + 2; + *(int*)&ff = (int) (&y + 2); y = !ff; diff --git a/tests/value/context_free.i b/tests/value/context_free.i index c53e2fabea5..67ecd1b2ea5 100644 --- a/tests/value/context_free.i +++ b/tests/value/context_free.i @@ -58,7 +58,7 @@ void f(int x, float y, int **p, int (*g)(char const*), void *vv, void **vvv, int char* pvoid = svoid.p; *pvoid = 1; pvoid = qvoid; - *pvoid = &pvoid; + *pvoid = (char) &pvoid; if (vol) { g("toto"); } } diff --git a/tests/value/downcast.i b/tests/value/downcast.i index c375fa7c92f..e979236ea12 100644 --- a/tests/value/downcast.i +++ b/tests/value/downcast.i @@ -88,9 +88,9 @@ void main6_val_warn_converted_signed() { } if (v) { int *p = &v; - int x = p; // No warning as an address fits in an integer. - short y = p; // Warnings, as an address may not fit in short. - unsigned short z = p; // No warninng on unsigned casts. + int x = (int) p; // No warning as an address fits in an integer. + short y = (short) p; // Warnings, as an address may not fit in short. + unsigned short z = (unsigned short) p; // No warninng on unsigned casts. } } diff --git a/tests/value/from_call.i b/tests/value/from_call.i index 4ca66207715..54942abc200 100644 --- a/tests/value/from_call.i +++ b/tests/value/from_call.i @@ -67,8 +67,8 @@ int access_tab(int ind) } int AA,AR,AS; -int At[2]={&AA}; -int Ar[2]={&AA}; +int At[2]={(int)&AA}; +int Ar[2]={(int)&AA}; int *Ap=At; /*@ assigns AR \from Ap[..] ; diff --git a/tests/value/from_ptr.i b/tests/value/from_ptr.i index 010d07507e8..2910e0d3451 100644 --- a/tests/value/from_ptr.i +++ b/tests/value/from_ptr.i @@ -9,8 +9,8 @@ int p[10][10][10]={0}; long *q; void main(int c) { - i = &p[11]; - i = &p[10]; + i = (long) &p[11]; + i = (long) &p[10]; if (c) // This branch is assumed to be dead since "i" is an invalid pointer. @@ -21,8 +21,8 @@ void main(int c) { } void main1(int c) { - i = &p[1]; - i = &p[0]; + i = (long) &p[1]; + i = (long) &p[0]; if (c) *((int*)i) = a; diff --git a/tests/value/join_misaligned.i b/tests/value/join_misaligned.i index 800a8e72bcb..52e76f487c5 100644 --- a/tests/value/join_misaligned.i +++ b/tests/value/join_misaligned.i @@ -20,7 +20,7 @@ void main(int c) ((char*)u)[6]='c'; *((short*)((char*)v+6))=0x44444444; *((short*)((char*)w+6))=57; - *((int*)((char*)y+6))=&t; + *((int*)((char*)y+6))= (int) &t; *((short*)(&z[3])) = 0x1111; *((short*) &a) = 0xFFFF; *((short*) &a+1) = 0xFFFF; @@ -34,7 +34,7 @@ void main(int c) x[0]=1; x[1]=0; x[2]=1; - *((int*)((char*)y+7))=&u; + *((int*)((char*)y+7))= (int) &u; a = va; a <<= 12; a--; diff --git a/tests/value/mini_pointrer.i b/tests/value/mini_pointrer.i index 1e9c9b3272e..5cfc288a044 100644 --- a/tests/value/mini_pointrer.i +++ b/tests/value/mini_pointrer.i @@ -3,7 +3,7 @@ int**ppp; int pp[2]; int p; void main(int c1, int c2, int c3) { - pp [c1] = &T[c1]; + pp [c1] = (int) &T[c1]; if (c2) ppp = &pp; else ppp = &T[-1]; **ppp=9; diff --git a/tests/value/nonlin.c b/tests/value/nonlin.c index e87dec750c6..173929f555a 100644 --- a/tests/value/nonlin.c +++ b/tests/value/nonlin.c @@ -20,7 +20,7 @@ void subdivide_pointer () { reduction, as it cannot improve the bounds of the result). */ y = *(p + i - i); /* The splitted lvalue contains a pointer value: no subdivision. */ - i = v ? i : &x; + i = v ? i : (int) &x; y = *(p + i - i); } diff --git a/tests/value/not_ct_array_arg.i b/tests/value/not_ct_array_arg.i index 8390478b484..e5fd2a58500 100644 --- a/tests/value/not_ct_array_arg.i +++ b/tests/value/not_ct_array_arg.i @@ -9,7 +9,7 @@ volatile int v; void main(int a, int tb[10][a], int tc[a][10]) { *(int*)tb = 1; Frama_C_dump_each(); - tb[9][100] = &tb; + tb[9][100] = (int) &tb; Frama_C_dump_each(); tc[1][1] = 3; if (v) diff --git a/tests/value/offset_top.i b/tests/value/offset_top.i index 31e6080d55d..622fb05071d 100644 --- a/tests/value/offset_top.i +++ b/tests/value/offset_top.i @@ -7,5 +7,5 @@ int TAB[10]; void main() { int i; - i = &TAB[*T]; + i = (int) &TAB[*T]; } diff --git a/tests/value/oracle/bitfield.res.oracle b/tests/value/oracle/bitfield.res.oracle index 33cb56816c0..05b0967b052 100644 --- a/tests/value/oracle/bitfield.res.oracle +++ b/tests/value/oracle/bitfield.res.oracle @@ -550,8 +550,8 @@ void main_old(void) else Frama_C_show_each(3); VV = (unsigned int)h.a; h.a = (unsigned int __attribute__((__FRAMA_C_BITFIELD_SIZE__(2))))VV; - v.c = (int __attribute__((__FRAMA_C_BITFIELD_SIZE__(22))))(& v); - v.d = (int __attribute__((__FRAMA_C_BITFIELD_SIZE__(32))))(& v + 1); + v.c = (int __attribute__((__FRAMA_C_BITFIELD_SIZE__(22))))((int)(& v)); + v.d = (int __attribute__((__FRAMA_C_BITFIELD_SIZE__(32))))((int)(& v + 1)); /*@ assert Eva: signed_overflow: -2147483648 ≤ (int)v.d + 1; */ /*@ assert Eva: signed_overflow: (int)v.d + 1 ≤ 2147483647; */ v.d = (int __attribute__((__FRAMA_C_BITFIELD_SIZE__(32))))((int)v.d + 1); @@ -561,7 +561,7 @@ void main_old(void) /*@ assert Eva: signed_overflow: -2147483648 ≤ foo + foo; */ /*@ assert Eva: signed_overflow: foo + foo ≤ 2147483647; */ h.b = (int __attribute__((__FRAMA_C_BITFIELD_SIZE__(4))))(((foo + foo) + (int)h.a) + (int)h.b); - h.c = (int __attribute__((__FRAMA_C_BITFIELD_SIZE__(22))))(& v + 1); + h.c = (int __attribute__((__FRAMA_C_BITFIELD_SIZE__(22))))((int)(& v + 1)); k8.b = (int __attribute__((__FRAMA_C_BITFIELD_SIZE__(4))))8; tmp = return_8(); kr8.b = (int __attribute__((__FRAMA_C_BITFIELD_SIZE__(4))))tmp; diff --git a/tests/value/oracle/pointer_int_cast.res.oracle b/tests/value/oracle/pointer_int_cast.res.oracle index 1348a0a3af6..078dfbbd5be 100644 --- a/tests/value/oracle/pointer_int_cast.res.oracle +++ b/tests/value/oracle/pointer_int_cast.res.oracle @@ -1,4 +1,6 @@ [kernel] Parsing tests/value/pointer_int_cast.i (no preprocessing) +[kernel:typing:int-conversion] tests/value/pointer_int_cast.i:9: Warning: + Conversion from a pointer to an integer without an explicit cast [eva] Analyzing a complete application starting at g [eva] Computing initial state [eva] Initial state computed diff --git a/tests/value/origin.i b/tests/value/origin.i index cf5adb70c04..4be9a4a8f12 100644 --- a/tests/value/origin.i +++ b/tests/value/origin.i @@ -18,7 +18,7 @@ void origin_arithmetic_1(void) { void origin_arithmetic_2(int c1) { pa2 = (int*)(-(int)ta2); qa2 = c1 ? pa2 : (int*)(-(int)tta2); - *qa2 = &aa2; + *qa2 = (int) &aa2; } /************/ void origin_arithmetic_3(void) { diff --git a/tests/value/period.c b/tests/value/period.c index 3b1ec68adec..5df43565146 100644 --- a/tests/value/period.c +++ b/tests/value/period.c @@ -52,5 +52,5 @@ void main() *p = 1; p = (&g + (int)&g) - (int)&g; // creates a garbled mix int vg = *p; - *p = &vg; + *p = (int) &vg; } diff --git a/tests/value/reading_null.i b/tests/value/reading_null.i index 088ddb074bb..1c0589b1d40 100644 --- a/tests/value/reading_null.i +++ b/tests/value/reading_null.i @@ -51,6 +51,6 @@ void main1(int c){ int X1; int* X2; - X1 = X2; + X1 = (int) X2; } diff --git a/tests/value/struct3.i b/tests/value/struct3.i index 4df620d7307..d3e0a39bac3 100644 --- a/tests/value/struct3.i +++ b/tests/value/struct3.i @@ -43,5 +43,5 @@ void main () { s2 = s1; // Creates a garbled mix internally; make sure not to log it - s2.a = s2.c + (int) s2.c; // creates a garbled mix in the struct + s2.a = (int) (s2.c + (int) s2.c); // creates a garbled mix in the struct } diff --git a/tests/value/struct_array.i b/tests/value/struct_array.i index 98af64f4a99..cfe0e9ab488 100644 --- a/tests/value/struct_array.i +++ b/tests/value/struct_array.i @@ -12,7 +12,7 @@ struct st1 { }; int *outp; int x,y,z1,z2,z3,z4; -struct st1 T[22] = { {1,2,0,&x}, {&z1,&z2,&z3,&y},{&z4,2,0,&x},{1,2,0,&x} }; +struct st1 T[22] = { {1,2,0,&x}, {(int)&z1,(int)&z2,&z3,&y},{(int)&z4,2,0,&x},{1,2,0,&x} }; struct S { int a; diff --git a/tests/value/struct_incl.i b/tests/value/struct_incl.i index b21e07739aa..9fdf1d88821 100644 --- a/tests/value/struct_incl.i +++ b/tests/value/struct_incl.i @@ -25,9 +25,9 @@ struct st1 s8,s7; long x,y,z,t; volatile int v; void main () { - x = &s1.d[9]; - y = &s1.d[10]; - z = &s1.b; + x = (long) &s1.d[9]; + y = (long) &s1.d[10]; + z = (long) &s1.b; diff --git a/tests/value/symbolic_locs.i b/tests/value/symbolic_locs.i index 63172f4ea02..2ac419472e4 100644 --- a/tests/value/symbolic_locs.i +++ b/tests/value/symbolic_locs.i @@ -51,7 +51,7 @@ void main4_scope_right() { unsigned int i = v; //@ assert i <= 8; { int x; - t[i] = &x; + t[i] = (int) &x; Frama_C_dump_each(); } Frama_C_dump_each(); // Should be empty, x out-of-scope diff --git a/tests/value/volatile.c b/tests/value/volatile.c index 39f7ee77336..300df2f38b8 100644 --- a/tests/value/volatile.c +++ b/tests/value/volatile.c @@ -80,7 +80,7 @@ int * volatile main2() { int * volatile p1, * volatile p2, * volatile p3; p1 = G ? 0 : &X; p2 = &X; - k = G ? 0 : &X; + k = G ? 0 : (int) &X; p3 = k; return k; } diff --git a/tests/value/volatilestruct.c b/tests/value/volatilestruct.c index bb84b75e8bb..3eadd6f1d02 100644 --- a/tests/value/volatilestruct.c +++ b/tests/value/volatilestruct.c @@ -28,7 +28,7 @@ void main() { char *q1 = p->f4.f1; int *q2 = p->f4.f2; int i = p->f5; - int j = p->f4.f2; + int j = (int) p->f4.f2; int r = (&x - p->f4.f1)+1; int s = (&y - p->f4.f2)+3; -- GitLab From 7514d3c22bbf1131b0ab02547cb7798c4fea9a75 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Thu, 14 Feb 2019 17:23:35 +0100 Subject: [PATCH 028/376] [ocaml] improve compatibility with OCaml 4.08 --- Makefile.generating | 7 +++++++ configure.in | 6 ++++++ opam/opam | 2 +- share/Makefile.config.in | 1 + src/kernel_services/abstract_interp/offsetmap.ml | 3 ++- src/kernel_services/ast_queries/cil_datatype.ml | 2 +- .../ast_queries/json_compilation_database.ok.ml | 2 +- src/kernel_services/cmdline_parameters/cmdline.ml | 4 ++-- src/kernel_services/plugin_entry_points/dynamic.ml | 2 +- src/kernel_services/plugin_entry_points/log.ml | 4 ++-- src/kernel_services/plugin_entry_points/plugin.ml | 7 ++++--- src/libraries/stdlib/extlib.ml | 4 ++-- src/libraries/stdlib/transitioning.ml.in | 4 ++++ src/libraries/stdlib/transitioning.mli | 8 ++++++++ src/libraries/utils/command.ml | 4 ++-- src/plugins/aorai/ltl_output.ml | 2 +- src/plugins/metrics/metrics_cabs.ml | 2 +- src/plugins/rte/visit.ml | 2 +- src/plugins/value/domains/numerors/numerors_domain.ok.ml | 2 +- src/plugins/value_types/cvalue.ml | 2 +- 20 files changed, 49 insertions(+), 21 deletions(-) diff --git a/Makefile.generating b/Makefile.generating index 58a6083f7db..a79f857a468 100644 --- a/Makefile.generating +++ b/Makefile.generating @@ -151,6 +151,12 @@ else ASSQ_OPT=assq_opt endif +ifeq ($(HAS_OCAML408),yes) + DYNLINK_INIT=fun () -> () +else + DYNLINK_INIT=Dynlink.init +endif + src/libraries/stdlib/transitioning.ml: \ src/libraries/stdlib/transitioning.ml.in \ Makefile.generating share/Makefile.config @@ -163,6 +169,7 @@ src/libraries/stdlib/transitioning.ml: \ -e 's/@FIND_OPT@/$(FIND_OPT)/g' \ -e 's/@ASSOC_OPT@/$(ASSOC_OPT)/g' \ -e 's/@ASSQ_OPT@/$(ASSQ_OPT)/g' \ + -e 's/@DYNLINK_INIT@/$(DYNLINK_INIT)/g' \ $< > $@ $(CHMOD_RO) $@ diff --git a/configure.in b/configure.in index 988da1a7b0c..f3c6e60e52c 100644 --- a/configure.in +++ b/configure.in @@ -121,6 +121,7 @@ AC_SUBST(HAS_OCAML403) AC_SUBST(HAS_OCAML404) AC_SUBST(HAS_OCAML405) AC_SUBST(HAS_OCAML407) +AC_SUBST(HAS_OCAML408) OCAMLMAJORNB=$(echo $OCAMLVERSION | cut -f 1 -d .) OCAMLMINORNB=$(echo $OCAMLVERSION | cut -f 2 -d .) @@ -131,11 +132,13 @@ if test $OCAMLMAJORNB -gt 4; then HAS_OCAML404=yes; HAS_OCAML405=yes; HAS_OCAML407=yes; + HAS_OCAML408=yes; else HAS_OCAML403=no; HAS_OCAML404=no; HAS_OCAML405=no; HAS_OCAML407=no; + HAS_OCAML408=no; if test $OCAMLMINORNB -ge 3; then HAS_OCAML403=yes; fi; @@ -148,6 +151,9 @@ else if test $OCAMLMINORNB -ge 7; then HAS_OCAML407=yes; fi; + if test $OCAMLMINORNB -ge 8; then + HAS_OCAML408=yes; + fi; fi; # MAJORNB -gt 4 # Ocaml library path diff --git a/opam/opam b/opam/opam index caef4a4893a..1a4556250e9 100644 --- a/opam/opam +++ b/opam/opam @@ -96,7 +96,7 @@ depends: [ ] depopts: [ - "yojson" { build } + "yojson" { build & >= "1.6.0" } "coq" { build } "why3" { build } "mlgmpidl" { build } diff --git a/share/Makefile.config.in b/share/Makefile.config.in index 9d321679ed9..38ae166ad90 100644 --- a/share/Makefile.config.in +++ b/share/Makefile.config.in @@ -89,6 +89,7 @@ HAS_OCAML403 ?=@HAS_OCAML403@ HAS_OCAML404 ?=@HAS_OCAML404@ HAS_OCAML405 ?=@HAS_OCAML405@ HAS_OCAML407 ?=@HAS_OCAML407@ +HAS_OCAML408 ?=@HAS_OCAML408@ NATIVE_THREADS ?=@HAS_NATIVE_THREADS@ OCAMLWIN32 ?=@OCAMLWIN32@ diff --git a/src/kernel_services/abstract_interp/offsetmap.ml b/src/kernel_services/abstract_interp/offsetmap.ml index 01dba5d8ede..d605d48d9cc 100644 --- a/src/kernel_services/abstract_interp/offsetmap.ml +++ b/src/kernel_services/abstract_interp/offsetmap.ml @@ -22,6 +22,7 @@ open Abstract_interp +let pervasives_succ = succ (* This module uses Bigints everywhere. Set up some notations *) let pretty_int = Int.pretty let ( =~ ) = Integer.equal @@ -308,7 +309,7 @@ module Make (V : module type of Offsetmap_lattice_with_isotropy) = struct then begin if current_counter = max_int then Kernel.fatal "Offsetmap(%s): internal maximum exeeded" V.name; - counter := Pervasives.succ current_counter; + counter := pervasives_succ current_counter; end; hashed_node diff --git a/src/kernel_services/ast_queries/cil_datatype.ml b/src/kernel_services/ast_queries/cil_datatype.ml index 3c944847e4e..a4d1063fa01 100644 --- a/src/kernel_services/ast_queries/cil_datatype.ml +++ b/src/kernel_services/ast_queries/cil_datatype.ml @@ -1443,7 +1443,7 @@ end (* @return [true] is the given logic real represents an exact float *) let is_exact_float r = - Pervasives.classify_float r.r_upper = FP_normal && + classify_float r.r_upper = FP_normal && Datatype.Float.equal r.r_upper r.r_lower let compare_logic_constant c1 c2 = match c1,c2 with diff --git a/src/kernel_services/ast_queries/json_compilation_database.ok.ml b/src/kernel_services/ast_queries/json_compilation_database.ok.ml index 851ddde5a87..2442e726b6a 100644 --- a/src/kernel_services/ast_queries/json_compilation_database.ok.ml +++ b/src/kernel_services/ast_queries/json_compilation_database.ok.ml @@ -127,7 +127,7 @@ let split_command_args s = never need quotes. *) let quote_define_argument arg = Format.sprintf "%S" arg -let parse_entry ?(cwd=Sys.getcwd()) (r : Yojson.Basic.json) = +let parse_entry ?(cwd=Sys.getcwd()) (r : Yojson.Basic.t) = let open Yojson.Basic.Util in let filename = r |> member "file" |> to_string in let dirname = r |> member "directory" |> to_string_option |> Extlib.opt_conv "" in diff --git a/src/kernel_services/cmdline_parameters/cmdline.ml b/src/kernel_services/cmdline_parameters/cmdline.ml index d74c0ed2086..b49b856b2cd 100644 --- a/src/kernel_services/cmdline_parameters/cmdline.ml +++ b/src/kernel_services/cmdline_parameters/cmdline.ml @@ -230,8 +230,8 @@ let catch_toplevel_run ~f ~at_normal_exit ~on_error = (* write again on stdout *) Log.set_output ~isatty:(Unix.isatty Unix.stdout) - (Pervasives.output_substring stdout) - (fun () -> Pervasives.flush stdout); + (output_substring stdout) + (fun () -> flush stdout); cleanup (); with | Exit -> diff --git a/src/kernel_services/plugin_entry_points/dynamic.ml b/src/kernel_services/plugin_entry_points/dynamic.ml index 5666e51558b..0ad27f1c620 100644 --- a/src/kernel_services/plugin_entry_points/dynamic.ml +++ b/src/kernel_services/plugin_entry_points/dynamic.ml @@ -46,7 +46,7 @@ let dynlib_init () = if not !dynlib_init then begin dynlib_init := true ; - Dynlink.init () ; + Transitioning.Dynlink.init () ; Dynlink.allow_unsafe_modules true ; end diff --git a/src/kernel_services/plugin_entry_points/log.ml b/src/kernel_services/plugin_entry_points/log.ml index be6d501cfc7..da8b3426d77 100644 --- a/src/kernel_services/plugin_entry_points/log.ml +++ b/src/kernel_services/plugin_entry_points/log.ml @@ -120,8 +120,8 @@ let stdout = { clean = true ; delayed = [] ; isatty = Unix.isatty Unix.stdout ; - output = Pervasives.output_substring Pervasives.stdout ; - flush = (fun () -> Pervasives.flush Pervasives.stdout); + output = output_substring stdout ; + flush = (fun () -> flush stdout); } let clean () = term_clean stdout diff --git a/src/kernel_services/plugin_entry_points/plugin.ml b/src/kernel_services/plugin_entry_points/plugin.ml index fa721f6e114..a5c3a0f2f72 100644 --- a/src/kernel_services/plugin_entry_points/plugin.ml +++ b/src/kernel_services/plugin_entry_points/plugin.ml @@ -166,7 +166,7 @@ struct let oc = open_out normalized_filename in let fmt = Format.formatter_of_out_channel oc in Hashtbl.add file_formatters normalized_filename fmt; - Extlib.safe_at_exit (fun () -> Pervasives.close_out oc); + Extlib.safe_at_exit (fun () -> close_out oc); fmt end @@ -608,6 +608,7 @@ struct let debug_optname = output_mode "Debug" "debug" module Debug = struct + let pervasives_incr = incr (* before 'incr' is shadowed by the one in Int *) include Int(struct let default = !debug_level () @@ -627,8 +628,8 @@ struct (fun old n -> (* the level of verbose is at least the level of debug *) if n > Verbose.get () then Verbose.set n; - if n = 0 then Pervasives.decr positive_debug_ref - else if old = 0 then Pervasives.incr positive_debug_ref); + if n = 0 then decr positive_debug_ref + else if old = 0 then pervasives_incr positive_debug_ref); if is_kernel () then begin Cmdline.kernel_debug_atleast_ref := (fun n -> get () >= n); match !Cmdline.Kernel_debug_level.value_if_set with diff --git a/src/libraries/stdlib/extlib.ml b/src/libraries/stdlib/extlib.ml index 6ec413e5c12..c24744c1154 100644 --- a/src/libraries/stdlib/extlib.ml +++ b/src/libraries/stdlib/extlib.ml @@ -341,11 +341,11 @@ let try_finally ~finally f x = The alternative, such as registering an daemon that raises an exception, hence interrupting the process, might not work: child processes still need to - run some daemons, such as [Pervasives.flush_all] which is registered by default. *) + run some daemons, such as [flush_all] which is registered by default. *) let pid = Unix.getpid () let safe_at_exit f = - Pervasives.at_exit + at_exit begin fun () -> let child = Unix.getpid () in if child = pid then f () diff --git a/src/libraries/stdlib/transitioning.ml.in b/src/libraries/stdlib/transitioning.ml.in index 053b4627244..7848ea531cf 100644 --- a/src/libraries/stdlib/transitioning.ml.in +++ b/src/libraries/stdlib/transitioning.ml.in @@ -83,6 +83,10 @@ module List = struct let assq_opt = @ASSQ_OPT@ end +module Dynlink = struct + let init = @DYNLINK_INIT@ +end + module Q = struct let round_to_float x exact = diff --git a/src/libraries/stdlib/transitioning.mli b/src/libraries/stdlib/transitioning.mli index c138f09e9b9..5b542fd7b9f 100644 --- a/src/libraries/stdlib/transitioning.mli +++ b/src/libraries/stdlib/transitioning.mli @@ -65,6 +65,14 @@ module List: sig val assq_opt: 'a -> ('a * 'b) list -> 'b option (** 4.05 *) end +module Stdlib: sig + val compare: 'a -> 'a -> int +end + +module Dynlink: sig + val init: unit -> unit +end + (** {1 Zarith} *) (** Function [Q.to_float] was introduced in Zarith 1.5 *) diff --git a/src/libraries/utils/command.ml b/src/libraries/utils/command.ml index 3e08c8037a6..f11b1065d5e 100644 --- a/src/libraries/utils/command.ml +++ b/src/libraries/utils/command.ml @@ -59,9 +59,9 @@ let pp_from_file fmt file = let rec bincopy buffer cin cout = let s = Bytes.length buffer in - let n = Pervasives.input cin buffer 0 s in + let n = input cin buffer 0 s in if n > 0 then - ( Pervasives.output cout buffer 0 n ; bincopy buffer cin cout ) + ( output cout buffer 0 n ; bincopy buffer cin cout ) else ( flush cout ) diff --git a/src/plugins/aorai/ltl_output.ml b/src/plugins/aorai/ltl_output.ml index ae142d75373..53e63d359f6 100644 --- a/src/plugins/aorai/ltl_output.ml +++ b/src/plugins/aorai/ltl_output.ml @@ -23,7 +23,7 @@ (* *) (**************************************************************************) -open Format open Pervasives +open Format open Ltlast let out_fmt=ref (formatter_of_out_channel stdout) diff --git a/src/plugins/metrics/metrics_cabs.ml b/src/plugins/metrics/metrics_cabs.ml index 8b46580b8dd..884e81054ac 100644 --- a/src/plugins/metrics/metrics_cabs.ml +++ b/src/plugins/metrics/metrics_cabs.ml @@ -520,7 +520,7 @@ let get_metrics cabs_visitor = and distinct_operands, total_operands = compute_operands operand_tbl in let program_length = total_operands +. total_operators in let vocabulary_size = distinct_operands +. distinct_operators in - let log2 x = (Pervasives.log x) /. (Pervasives.log 2.0) in + let log2 x = (log x) /. (log 2.0) in let program_volume = program_length *. (log2 vocabulary_size) in let difficulty_level = (distinct_operators /. 2.) *. (total_operands /. distinct_operands) in diff --git a/src/plugins/rte/visit.ml b/src/plugins/rte/visit.ml index 41f597a4fc0..33aeb7f6e7d 100644 --- a/src/plugins/rte/visit.ml +++ b/src/plugins/rte/visit.ml @@ -315,7 +315,7 @@ class annot_visitor kf flags on_alarm = object (self) self#generate_assertion Rte.finite_float_assertion (to_fkind,exp) | _ -> ()); | Const (CReal(f,fkind,_)) when self#do_finite_float () -> - begin match Pervasives.classify_float f with + begin match classify_float f with | FP_normal | FP_subnormal | FP_zero -> () diff --git a/src/plugins/value/domains/numerors/numerors_domain.ok.ml b/src/plugins/value/domains/numerors/numerors_domain.ok.ml index c385ee3a1f3..763a8209f23 100644 --- a/src/plugins/value/domains/numerors/numerors_domain.ok.ml +++ b/src/plugins/value/domains/numerors/numerors_domain.ok.ml @@ -153,7 +153,7 @@ module Domain = struct let log = Pervasives.open_out s in let fmt = Format.formatter_of_out_channel log in List.iter (fun f -> f fmt ()) !Numerors_Value.dprint_callstack ; - Pervasives.close_out log + close_out log | _, _ -> () end diff --git a/src/plugins/value_types/cvalue.ml b/src/plugins/value_types/cvalue.ml index f6306e870ba..7ee4502377b 100644 --- a/src/plugins/value_types/cvalue.ml +++ b/src/plugins/value_types/cvalue.ml @@ -32,7 +32,7 @@ module CardinalEstimate = struct let zero = None let one = Some 0.0 - let of_integer x = Some(Pervasives.log10 (Integer.to_float x)) + let of_integer x = Some(log10 (Integer.to_float x)) let infinite = Some(infinity) let mul a b = match (a,b) with | None, _ | _, None -> None -- GitLab From f3c4504d10c92ac66cc0723631a452b3440221a7 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Thu, 14 Feb 2019 17:29:04 +0100 Subject: [PATCH 029/376] [ocaml] improve compatibility with 4.08: Pervasives.compare --- devel_tools/ocamldep_transitive_closure.ml | 2 +- ptests/ptests.ml | 4 ++-- src/kernel_services/abstract_interp/abstract_interp.ml | 2 +- src/kernel_services/abstract_interp/float_interval.ml | 2 +- src/kernel_services/ast_data/alarms.ml | 8 ++++---- src/kernel_services/ast_data/property.ml | 2 +- src/kernel_services/ast_data/property_status.ml | 2 +- src/kernel_services/ast_printing/description.ml | 2 +- src/kernel_services/ast_queries/cil_datatype.ml | 2 +- src/kernel_services/ast_queries/file.ml | 2 +- src/kernel_services/ast_queries/logic_typing.ml | 4 ++-- src/kernel_services/ast_queries/logic_utils.ml | 6 +++--- src/libraries/datatype/datatype.ml | 8 ++++---- src/libraries/stdlib/FCHashtbl.ml | 2 +- src/libraries/stdlib/transitioning.ml.in | 6 ++++++ src/libraries/utils/bitvector.ml | 2 +- src/libraries/utils/json.mll | 2 +- src/libraries/utils/pretty_utils.ml | 7 +++++-- src/libraries/utils/pretty_utils.mli | 2 +- src/libraries/utils/rgmap.ml | 2 +- src/plugins/gui/pretty_source.ml | 4 ++-- src/plugins/gui/warning_manager.ml | 2 +- src/plugins/metrics/metrics_base.ml | 2 +- src/plugins/obfuscator/obfuscator_kind.ml | 2 +- src/plugins/qed/export.ml | 2 +- src/plugins/qed/intmap.ml | 4 ++-- src/plugins/qed/kind.ml | 2 +- src/plugins/qed/pool.ml | 4 ++-- src/plugins/qed/term.ml | 4 ++-- src/plugins/report/classify.ml | 2 +- src/plugins/report/csv.ml | 2 +- src/plugins/value/alarmset.ml | 2 +- src/plugins/value/domains/gauges/gauges_domain.ml | 2 +- src/plugins/value/gui_files/gui_callstacks_manager.ml | 2 +- src/plugins/value/gui_files/gui_red.ml | 2 +- src/plugins/value/utils/structure.ml | 2 +- src/plugins/value/utils/value_perf.ml | 2 +- src/plugins/value/values/numerors/numerors_interval.ml | 2 +- src/plugins/value/values/numerors/numerors_utils.ml | 2 +- src/plugins/value/values/sign_value.ml | 2 +- src/plugins/wp/CfgCompiler.ml | 2 +- src/plugins/wp/Conditions.ml | 2 +- src/plugins/wp/Cstring.ml | 2 +- src/plugins/wp/Factory.ml | 2 +- src/plugins/wp/LogicBuiltins.ml | 6 +++--- src/plugins/wp/MemTyped.ml | 2 +- src/plugins/wp/ProverScript.ml | 2 +- src/plugins/wp/ProverWhy3.ml | 2 +- src/plugins/wp/Splitter.ml | 4 ++-- src/plugins/wp/StmtSemantics.ml | 2 +- src/plugins/wp/Strategy.ml | 2 +- src/plugins/wp/VCS.ml | 6 +++--- src/plugins/wp/Warning.ml | 2 +- src/plugins/wp/ctypes.ml | 4 ++-- src/plugins/wp/proof.ml | 2 +- src/plugins/wp/share/install.ml | 4 ++-- src/plugins/wp/wpPropId.ml | 4 ++-- 57 files changed, 88 insertions(+), 79 deletions(-) diff --git a/devel_tools/ocamldep_transitive_closure.ml b/devel_tools/ocamldep_transitive_closure.ml index 3e3290c2246..c14aace6a12 100644 --- a/devel_tools/ocamldep_transitive_closure.ml +++ b/devel_tools/ocamldep_transitive_closure.ml @@ -7,7 +7,7 @@ let root = ref "" module Dep_graph = Graph.Imperative.Digraph.Concrete( struct type t = string - let compare = Pervasives.compare + let compare = Transitioning.Stdlib.compare let hash = Hashtbl.hash let equal = (=) end) diff --git a/ptests/ptests.ml b/ptests/ptests.ml index ef9497abebb..61d3b38decb 100644 --- a/ptests/ptests.ml +++ b/ptests/ptests.ml @@ -344,7 +344,7 @@ let () = ((Arg.align (List.sort (fun (optname1, _, _) (optname2, _, _) -> - Pervasives.compare optname1 optname2 + compare optname1 optname2 ) argspec) ) @ ["", Arg.Unit (fun () -> ()), example_msg;]) make_test_suite umsg @@ -1103,7 +1103,7 @@ module Make_Report(M:sig type t end)=struct (struct type t = toplevel_command let project cmd = (cmd.directory,cmd.file,cmd.n) - let compare c1 c2 = Pervasives.compare (project c1) (project c2) + let compare c1 c2 = compare (project c1) (project c2) let equal c1 c2 = (project c1)=(project c2) let hash c = Hashtbl.hash (project c) end) diff --git a/src/kernel_services/abstract_interp/abstract_interp.ml b/src/kernel_services/abstract_interp/abstract_interp.ml index 3d2f1fdd6bf..655ce875418 100644 --- a/src/kernel_services/abstract_interp/abstract_interp.ml +++ b/src/kernel_services/abstract_interp/abstract_interp.ml @@ -432,7 +432,7 @@ module Bool = struct type t = Top | True | False | Bottom let hash (b : t) = Hashtbl.hash b let equal (b1 : t) (b2 : t) = b1 = b2 - let compare (b1 : t) (b2 : t) = Pervasives.compare b1 b2 + let compare (b1 : t) (b2 : t) = Transitioning.Stdlib.compare b1 b2 let pretty fmt = function | Top -> Format.fprintf fmt "Top" | True -> Format.fprintf fmt "True" diff --git a/src/kernel_services/abstract_interp/float_interval.ml b/src/kernel_services/abstract_interp/float_interval.ml index 719eaa98d82..89c49bcc166 100644 --- a/src/kernel_services/abstract_interp/float_interval.ml +++ b/src/kernel_services/abstract_interp/float_interval.ml @@ -171,7 +171,7 @@ module Make (F: Float_sig.S) = struct let compare x y = match x, y with | FRange.Itv (b1, e1, n1), FRange.Itv (b2, e2, n2) -> - let c = Pervasives.compare n1 n2 in + let c = Transitioning.Stdlib.compare n1 n2 in if c <> 0 then c else let r = F.compare b1 b2 in if r <> 0 then r else F.compare e1 e2 diff --git a/src/kernel_services/ast_data/alarms.ml b/src/kernel_services/ast_data/alarms.ml index ff279b93cf0..a33a5047ef4 100644 --- a/src/kernel_services/ast_data/alarms.ml +++ b/src/kernel_services/ast_data/alarms.ml @@ -129,7 +129,7 @@ module D = let n = Exp.compare e1 e2 in if n = 0 then Extlib.compare_basic fk1 fk2 else n | Memory_access(lv1, access_kind1), Memory_access(lv2, access_kind2) -> - let n = Pervasives.compare access_kind1 access_kind2 in + let n = Transitioning.Stdlib.compare access_kind1 access_kind2 in if n = 0 then Lval.compare lv1 lv2 else n | Index_out_of_bound(e11, e12), Index_out_of_bound(e21, e22) -> let n = Exp.compare e11 e21 in @@ -141,11 +141,11 @@ module D = let n = Extlib.opt_compare Exp.compare e11 e21 in if n = 0 then Exp.compare e12 e22 else n | Overflow(s1, e1, n1, b1), Overflow(s2, e2, n2, b2) -> - let n = Pervasives.compare s1 s2 in + let n = Transitioning.Stdlib.compare s1 s2 in if n = 0 then let n = Exp.compare e1 e2 in if n = 0 then - let n = Pervasives.compare b1 b2 in + let n = Transitioning.Stdlib.compare b1 b2 in if n = 0 then Integer.compare n1 n2 else n else n @@ -154,7 +154,7 @@ module D = | Float_to_int(e1, n1, b1), Float_to_int(e2, n2, b2) -> let n = Exp.compare e1 e2 in if n = 0 then - let n = Pervasives.compare b1 b2 in + let n = Transitioning.Stdlib.compare b1 b2 in if n = 0 then Integer.compare n1 n2 else n else n diff --git a/src/kernel_services/ast_data/property.ml b/src/kernel_services/ast_data/property.ml index d61e7eec939..ccba7c4f34b 100644 --- a/src/kernel_services/ast_data/property.ml +++ b/src/kernel_services/ast_data/property.ml @@ -562,7 +562,7 @@ include Datatype.Make_with_collections let n = Extlib.opt_compare Kf.compare kf1 kf2 in if n = 0 then let n = Kinstr.compare ki1 ki2 in - if n = 0 then Pervasives.compare ba1 ba2 else n + if n = 0 then Transitioning.Stdlib.compare ba1 ba2 else n else n | IPAxiom (s1,_,_,_,_), IPAxiom (s2,_,_,_,_) diff --git a/src/kernel_services/ast_data/property_status.ml b/src/kernel_services/ast_data/property_status.ml index 10e25594bfe..4842bcdeb30 100644 --- a/src/kernel_services/ast_data/property_status.ml +++ b/src/kernel_services/ast_data/property_status.ml @@ -47,7 +47,7 @@ module Emitted_status = | True -> "VALID" | False_if_reachable | False_and_reachable -> "**NOT** VALID" | Dont_know -> "unknown") - let compare (s1:t) s2 = Pervasives.compare s1 s2 + let compare (s1:t) s2 = Transitioning.Stdlib.compare s1 s2 let equal (s1:t) s2 = s1 = s2 let hash (s:t) = Caml_hashtbl.hash s end) diff --git a/src/kernel_services/ast_printing/description.ml b/src/kernel_services/ast_printing/description.ml index 6544c2ba0cb..ade7c65cc86 100644 --- a/src/kernel_services/ast_printing/description.ml +++ b/src/kernel_services/ast_printing/description.ml @@ -409,7 +409,7 @@ type order = | A of Datatype.String.Set.t let cmp_order a b = match a , b with - | I a , I b -> Pervasives.compare a b + | I a , I b -> Transitioning.Stdlib.compare a b | I _ , _ -> (-1) | _ , I _ -> 1 | S a , S b -> String.compare a b diff --git a/src/kernel_services/ast_queries/cil_datatype.ml b/src/kernel_services/ast_queries/cil_datatype.ml index a4d1063fa01..17b141196aa 100644 --- a/src/kernel_services/ast_queries/cil_datatype.ml +++ b/src/kernel_services/ast_queries/cil_datatype.ml @@ -1584,7 +1584,7 @@ and compare_toffset off1 off2 = and compare_logic_label l1 l2 = match l1, l2 with | StmtLabel s1 , StmtLabel s2 -> Stmt.compare !s1 !s2 | FormalLabel s1, FormalLabel s2 -> String.compare s1 s2 - | BuiltinLabel l1, BuiltinLabel l2 -> Pervasives.compare l1 l2 + | BuiltinLabel l1, BuiltinLabel l2 -> Transitioning.Stdlib.compare l1 l2 | (StmtLabel _ | FormalLabel _), (FormalLabel _ | BuiltinLabel _) -> -1 | (BuiltinLabel _ | FormalLabel _), (StmtLabel _ | FormalLabel _) -> 1 diff --git a/src/kernel_services/ast_queries/file.ml b/src/kernel_services/ast_queries/file.ml index 0632240c7ca..7621c2488ce 100644 --- a/src/kernel_services/ast_queries/file.ml +++ b/src/kernel_services/ast_queries/file.ml @@ -284,7 +284,7 @@ module DatatypeMachdep = Datatype.Make_with_collections(struct let reprs = [Machdeps.x86_32] let name = "File.Machdep" type t = Cil_types.mach - let compare : t -> t -> int = Pervasives.compare + let compare : t -> t -> int = Transitioning.Stdlib.compare let equal : t -> t -> bool = (=) let hash : t -> int = Hashtbl.hash let copy = Datatype.identity diff --git a/src/kernel_services/ast_queries/logic_typing.ml b/src/kernel_services/ast_queries/logic_typing.ml index 918ca0447b7..3696935c926 100644 --- a/src/kernel_services/ast_queries/logic_typing.ml +++ b/src/kernel_services/ast_queries/logic_typing.ml @@ -457,7 +457,7 @@ module Type_namespace = let reprs = [Typedef] let name = "Logic_typing.type_namespace" type t = type_namespace - let compare : t -> t -> int = Pervasives.compare + let compare : t -> t -> int = Transitioning.Stdlib.compare let equal : t -> t -> bool = (=) let hash : t -> int = Hashtbl.hash end) @@ -3593,7 +3593,7 @@ struct struct type t = string list let compare s1 s2 = - Pervasives.(compare (List.sort compare s1) (List.sort compare s2)) + Transitioning.Stdlib.(compare (List.sort compare s1) (List.sort compare s2)) end) let type_spec old_behaviors loc is_stmt_contract result env s = diff --git a/src/kernel_services/ast_queries/logic_utils.ml b/src/kernel_services/ast_queries/logic_utils.ml index 9ad4de77133..352824e171c 100644 --- a/src/kernel_services/ast_queries/logic_utils.ml +++ b/src/kernel_services/ast_queries/logic_utils.ml @@ -1544,12 +1544,12 @@ let rec compare_term t1 t2 = | TAlignOfE _, _ -> 1 | _, TAlignOfE _ -> -1 | TUnOp (o1,t1), TUnOp(o2,t2) -> - let res = Pervasives.compare o1 o2 in + let res = Transitioning.Stdlib.compare o1 o2 in if res = 0 then compare_term t1 t2 else res | TUnOp _, _ -> 1 | _, TUnOp _ -> -1 | TBinOp(o1,l1,r1), TBinOp(o2,l2,r2) -> - let res = Pervasives.compare o1 o2 in + let res = Transitioning.Stdlib.compare o1 o2 in if res = 0 then let res = compare_term l1 l2 in if res = 0 then compare_term r1 r2 else res @@ -1749,7 +1749,7 @@ and compare_predicate_node p1 p2 = | Papp _, _ -> 1 | _, Papp _ -> -1 | Prel(r1,lt1,rt1), Prel(r2,lt2,rt2) -> - let res = Pervasives.compare r1 r2 in + let res = Transitioning.Stdlib.compare r1 r2 in if res = 0 then let res = compare_term lt1 lt2 in if res = 0 then compare_term rt1 rt2 else res diff --git a/src/libraries/datatype/datatype.ml b/src/libraries/datatype/datatype.ml index 9752b11209c..328b9e1a1e3 100644 --- a/src/libraries/datatype/datatype.ml +++ b/src/libraries/datatype/datatype.ml @@ -1776,7 +1776,7 @@ module Bool = let name = "bool" let reprs = [ true ] let copy = identity - let compare : bool -> bool -> int = Pervasives.compare + let compare : bool -> bool -> int = Transitioning.Stdlib.compare let equal : bool -> bool -> bool = (=) let pretty fmt b = Format.fprintf fmt "%B" b let varname _ = "b" @@ -1790,12 +1790,12 @@ module Int = struct let name = "int" let reprs = [ 2 ] let copy = identity - let compare : int -> int -> int = Pervasives.compare + let compare : int -> int -> int = Transitioning.Stdlib.compare let equal : int -> int -> bool = (=) let pretty fmt n = Format.fprintf fmt "%d" n let varname _ = "n" end) - let compare : int -> int -> int = Pervasives.compare + let compare : int -> int -> int = Transitioning.Stdlib.compare end let int = Int.ty @@ -1848,7 +1848,7 @@ module Float = let name = "float" let reprs = [ 0.1 ] let copy = identity - let compare : float -> float -> int = Pervasives.compare + let compare : float -> float -> int = Transitioning.Stdlib.compare let equal : float -> float -> bool = (=) let pretty fmt f = Format.fprintf fmt "%f" f let varname _ = "f" diff --git a/src/libraries/stdlib/FCHashtbl.ml b/src/libraries/stdlib/FCHashtbl.ml index 4e84f1b3ced..a19c31b5996 100644 --- a/src/libraries/stdlib/FCHashtbl.ml +++ b/src/libraries/stdlib/FCHashtbl.ml @@ -50,7 +50,7 @@ module Make(H: Hashtbl.HashedType) : S with type key = H.t = struct include Hashtbl.Make(H) - let fold_sorted ?(cmp=Pervasives.compare) f h acc = + let fold_sorted ?(cmp=Transitioning.Stdlib.compare) f h acc = let module Aux = struct type t = key let compare = cmp end in let module M = FCMap.Make(Aux) in let add k v m = diff --git a/src/libraries/stdlib/transitioning.ml.in b/src/libraries/stdlib/transitioning.ml.in index 7848ea531cf..5dac32656eb 100644 --- a/src/libraries/stdlib/transitioning.ml.in +++ b/src/libraries/stdlib/transitioning.ml.in @@ -57,6 +57,12 @@ let _: ('a -> bool) -> 'a list -> 'a option = find_opt let _: 'a -> ('a * 'b) list -> 'b option = assoc_opt let _: 'a -> ('a * 'b) list -> 'b option = assq_opt +let stdlib_compare = compare (* Pervasives/Stdlib compare *) + +module Stdlib = struct + let compare = stdlib_compare +end + [@@@ warning "-3"] module String = struct diff --git a/src/libraries/utils/bitvector.ml b/src/libraries/utils/bitvector.ml index a1dfcfa38a4..36657b9600b 100644 --- a/src/libraries/utils/bitvector.ml +++ b/src/libraries/utils/bitvector.ml @@ -223,7 +223,7 @@ let bitwise_op4 size op4 a b c d = let equal = (=);; (* String equality. *) -let compare = Pervasives.compare +let compare = Transitioning.Stdlib.compare let hash = Hashtbl.hash let concat bv1 size1 bv2 size2 = diff --git a/src/libraries/utils/json.mll b/src/libraries/utils/json.mll index 8444a4bc8ed..a2123702f15 100644 --- a/src/libraries/utils/json.mll +++ b/src/libraries/utils/json.mll @@ -37,7 +37,7 @@ type json = type t = json let equal = (=) -let compare = Pervasives.compare +let compare = Transitioning.Stdlib.compare type token = EOF | TRUE | FALSE | NULL | KEY of char | STR of string | INT of string | DEC of string diff --git a/src/libraries/utils/pretty_utils.ml b/src/libraries/utils/pretty_utils.ml index 3ecc2ed1913..f78f4da7009 100644 --- a/src/libraries/utils/pretty_utils.ml +++ b/src/libraries/utils/pretty_utils.ml @@ -48,7 +48,7 @@ let rec pp_print_string_fill out s = Format.fprintf out "%s@ %a" s1 pp_print_string_fill s2 end else Format.pp_print_string out s -type sformat = (unit,Format.formatter,unit) Pervasives.format +type sformat = (unit,Format.formatter,unit) format type 'a formatter = Format.formatter -> 'a -> unit type ('a,'b) formatter2 = Format.formatter -> 'a -> 'b -> unit @@ -180,11 +180,14 @@ let pp_trail pp fmt x = (* --- Margins --- *) (* -------------------------------------------------------------------------- *) +let pervasives_min = min +let pervasives_max = max + type marger = int ref let marger () = ref 0 let add_margin marger ?(margin=0) ?(min=0) ?(max=80) text = let size = String.length text + margin in - let n = Pervasives.min max (Pervasives.max min size) in + let n = pervasives_min max (pervasives_max min size) in if n > !marger then marger := n type align = [ `Center | `Left | `Right ] diff --git a/src/libraries/utils/pretty_utils.mli b/src/libraries/utils/pretty_utils.mli index c0cfa39b1b6..416e56e9d08 100644 --- a/src/libraries/utils/pretty_utils.mli +++ b/src/libraries/utils/pretty_utils.mli @@ -70,7 +70,7 @@ val escape_underscores : string -> string (** {2 pretty printers for standard types} *) (* ********************************************************************** *) -type sformat = (unit,Format.formatter,unit) Pervasives.format +type sformat = (unit,Format.formatter,unit) format type 'a formatter = Format.formatter -> 'a -> unit type ('a,'b) formatter2 = Format.formatter -> 'a -> 'b -> unit diff --git a/src/libraries/utils/rgmap.ml b/src/libraries/utils/rgmap.ml index 054bb4b9cfa..d1c4fd78aee 100644 --- a/src/libraries/utils/rgmap.ml +++ b/src/libraries/utils/rgmap.ml @@ -42,7 +42,7 @@ type 'a entry = int * int * 'a module Wmap = Map.Make (struct type t = int - let compare (a:t) (b:t) = Pervasives.compare a b + let compare (a:t) (b:t) = Transitioning.Stdlib.compare a b end) module Rmap = Map.Make diff --git a/src/plugins/gui/pretty_source.ml b/src/plugins/gui/pretty_source.ml index 5a1f810e04f..c17460dafd9 100644 --- a/src/plugins/gui/pretty_source.ml +++ b/src/plugins/gui/pretty_source.ml @@ -164,8 +164,8 @@ struct if (pe1 = pe2) then 0 else (* most englobing comes first *) - Pervasives.compare pe2 pe1 - else Pervasives.compare pb1 pb2 + Transitioning.Stdlib.compare pe2 pe1 + else Transitioning.Stdlib.compare pb1 pb2 ) arr ; arr diff --git a/src/plugins/gui/warning_manager.ml b/src/plugins/gui/warning_manager.ml index c27f8f1070d..bac5362ceb8 100644 --- a/src/plugins/gui/warning_manager.ml +++ b/src/plugins/gui/warning_manager.ml @@ -34,7 +34,7 @@ type t = module Data = Indexer.Make( struct type t = int*row - let compare (x,_) (y,_) = Pervasives.compare x y + let compare (x,_) (y,_) = Transitioning.Stdlib.compare x y end) let make ~packing ~callback = diff --git a/src/plugins/metrics/metrics_base.ml b/src/plugins/metrics/metrics_base.ml index 9eb22f91a2d..f10bf8fd034 100644 --- a/src/plugins/metrics/metrics_base.ml +++ b/src/plugins/metrics/metrics_base.ml @@ -265,7 +265,7 @@ let get_file_type filename = module VarinfoByName = struct type t = Cil_types.varinfo - let compare v1 v2 = Pervasives.compare v1.vname v2.vname + let compare v1 v2 = Transitioning.Stdlib.compare v1.vname v2.vname end (** Map and sets of varinfos sorted by name (and not by ids) *) diff --git a/src/plugins/obfuscator/obfuscator_kind.ml b/src/plugins/obfuscator/obfuscator_kind.ml index 216651aca09..f4f1fb22e5b 100644 --- a/src/plugins/obfuscator/obfuscator_kind.ml +++ b/src/plugins/obfuscator/obfuscator_kind.ml @@ -69,7 +69,7 @@ include Datatype.Make_with_collections let reprs = [ Global_var ] let hash (k:k) = Hashtbl.hash k let equal (k1:k) k2 = k1 = k2 - let compare (k1:k) k2 = Pervasives.compare k1 k2 + let compare (k1:k) k2 = Transitioning.Stdlib.compare k1 k2 let varname _ = "k" let internal_pretty_code = Datatype.undefined let copy = Datatype.identity diff --git a/src/plugins/qed/export.ml b/src/plugins/qed/export.ml index b36fca33b81..8f7d667899f 100644 --- a/src/plugins/qed/export.ml +++ b/src/plugins/qed/export.ml @@ -828,7 +828,7 @@ struct (fun (s1,e1) (s2,e2) -> match s1,s2 with | true,true | false,false -> - Pervasives.compare (T.weigth e1) (T.weigth e2) + Transitioning.Stdlib.compare (T.weigth e1) (T.weigth e2) | true,false -> (-1) | false,true -> 1 ) sxs in diff --git a/src/plugins/qed/intmap.ml b/src/plugins/qed/intmap.ml index 70ded406022..e6b77689d3a 100644 --- a/src/plugins/qed/intmap.ml +++ b/src/plugins/qed/intmap.ml @@ -211,12 +211,12 @@ let rec compare cmp s t = | Empty , _ -> (-1) | _ , Empty -> 1 | Lf(i,x) , Lf(j,y) -> - let ck = Pervasives.compare i j in + let ck = Transitioning.Stdlib.compare i j in if ck = 0 then cmp x y else ck | Lf _ , _ -> (-1) | _ , Lf _ -> 1 | Br(p,s0,s1) , Br(q,t0,t1) -> - let cp = Pervasives.compare p q in + let cp = Transitioning.Stdlib.compare p q in if cp <> 0 then cp else let c0 = compare cmp s0 t0 in if c0 <> 0 then c0 else diff --git a/src/plugins/qed/kind.ml b/src/plugins/qed/kind.ml index 93d8d7fae87..e9207939eb1 100644 --- a/src/plugins/qed/kind.ml +++ b/src/plugins/qed/kind.ml @@ -177,7 +177,7 @@ let rec compare_tau cfield cadt t1 t2 = | Prop , Prop -> 0 | Prop , _ -> (-1) | _ , Prop -> 1 - | Tvar k , Tvar k' -> Pervasives.compare k k' + | Tvar k , Tvar k' -> Transitioning.Stdlib.compare k k' | Tvar _ , _ -> (-1) | _ , Tvar _ -> 1 | Array(ta,tb) , Array(ta',tb') -> diff --git a/src/plugins/qed/pool.ml b/src/plugins/qed/pool.ml index 868e99b8a57..bdb043a9aad 100644 --- a/src/plugins/qed/pool.ml +++ b/src/plugins/qed/pool.ml @@ -77,9 +77,9 @@ struct let compare x y = let cmp = String.compare x.vbase y.vbase in if cmp <> 0 then cmp else - let cmp = Pervasives.compare x.vrank y.vrank in + let cmp = Transitioning.Stdlib.compare x.vrank y.vrank in if cmp <> 0 then cmp else - Pervasives.compare x.vid y.vid + Transitioning.Stdlib.compare x.vid y.vid (* POOL *) diff --git a/src/plugins/qed/term.ml b/src/plugins/qed/term.ml index 0c05374f3a1..fa6e17a4dde 100644 --- a/src/plugins/qed/term.ml +++ b/src/plugins/qed/term.ml @@ -379,7 +379,7 @@ struct | Constructor -> 1 | Operator _ -> 0 - let cmp_size a b = Pervasives.compare a.size b.size + let cmp_size a b = Transitioning.Stdlib.compare a.size b.size let rank_bind = function Forall -> 0 | Exists -> 1 | Lambda -> 2 let cmp_bind p q = rank_bind p - rank_bind q let cmp_field phi (f,x) (g,y) = @@ -1221,7 +1221,7 @@ struct | _ -> (k,t) :: acc (* sorts monoms by terms *) - let compare_monoms (_,t1) (_,t2) = Pervasives.compare t1.id t2.id + let compare_monoms (_,t1) (_,t2) = Transitioning.Stdlib.compare t1.id t2.id (* factorized monoms *) let fold_monom ts k t = diff --git a/src/plugins/report/classify.ml b/src/plugins/report/classify.ml index f14ae80130e..1d3a931ccf0 100644 --- a/src/plugins/report/classify.ml +++ b/src/plugins/report/classify.ml @@ -242,7 +242,7 @@ let json_of_event e = module EVENTS = Set.Make (struct type t = event - let compare = Pervasives.compare + let compare = Transitioning.Stdlib.compare end) let events_queue = Queue.create () diff --git a/src/plugins/report/csv.ml b/src/plugins/report/csv.ml index 643168a388f..7064555e9a0 100644 --- a/src/plugins/report/csv.ml +++ b/src/plugins/report/csv.ml @@ -66,7 +66,7 @@ let lines () = emitted on statements copied through loop unrolling. This is the desired semantics for now. However, since we compare entire locations, textually identical lines that refer to different expressions are kept separate *) - Extlib.sort_unique Pervasives.compare l + Extlib.sort_unique Transitioning.Stdlib.compare l let output file = let ch = open_out file in diff --git a/src/plugins/value/alarmset.ml b/src/plugins/value/alarmset.ml index 062f57f0517..58e5b96280f 100644 --- a/src/plugins/value/alarmset.ml +++ b/src/plugins/value/alarmset.ml @@ -48,7 +48,7 @@ module Status = struct let reprs = [ True; False; False; Unknown ] let mem_project = Datatype.never_any_project let pretty = pretty_status - let compare (s1:t) (s2:t) = Pervasives.compare s1 s2 + let compare (s1:t) (s2:t) = Transitioning.Stdlib.compare s1 s2 let equal (s1:t) (s2:t) = s1 = s2 let hash (s:t) = Hashtbl.hash s end) diff --git a/src/plugins/value/domains/gauges/gauges_domain.ml b/src/plugins/value/domains/gauges/gauges_domain.ml index ce361f8068a..78284d2e1d4 100644 --- a/src/plugins/value/domains/gauges/gauges_domain.ml +++ b/src/plugins/value/domains/gauges/gauges_domain.ml @@ -502,7 +502,7 @@ module G = struct let compare ii1 ii2 = match ii1, ii2 with | PreciseIteration i1, PreciseIteration i2 -> - Pervasives.compare i1 i2 + Transitioning.Stdlib.compare i1 i2 | MultipleIterations i1, MultipleIterations i2 -> MultipleIterations.compare i1 i2 | PreciseIteration _, MultipleIterations _ -> -1 diff --git a/src/plugins/value/gui_files/gui_callstacks_manager.ml b/src/plugins/value/gui_files/gui_callstacks_manager.ml index d75eefad242..18098708557 100644 --- a/src/plugins/value/gui_files/gui_callstacks_manager.ml +++ b/src/plugins/value/gui_files/gui_callstacks_manager.ml @@ -261,7 +261,7 @@ module Make (Input: Input) = struct module Data = Indexer.Make( struct type t = int * value row - let compare (x,_) (y,_) = Pervasives.compare x y + let compare (x,_) (y,_) = Transitioning.Stdlib.compare x y end) (* This function creates a single GTree that displays per-callstack diff --git a/src/plugins/value/gui_files/gui_red.ml b/src/plugins/value/gui_files/gui_red.ml index 03929af50d5..4b807209ea7 100644 --- a/src/plugins/value/gui_files/gui_red.ml +++ b/src/plugins/value/gui_files/gui_red.ml @@ -108,7 +108,7 @@ type t = module Data = Indexer.Make( struct type t = int*row - let compare (x,_) (y,_) = Pervasives.compare x y + let compare (x,_) (y,_) = Transitioning.Stdlib.compare x y end) let append t message = t.append message diff --git a/src/plugins/value/utils/structure.ml b/src/plugins/value/utils/structure.ml index af63dc0f92d..30f4b3c3863 100644 --- a/src/plugins/value/utils/structure.ml +++ b/src/plugins/value/utils/structure.ml @@ -62,7 +62,7 @@ module Make (X : sig end) = struct then Some ((Obj.magic (Eq : (a,a) eq)) : (a,b) eq) else None - let compare x y = Pervasives.compare x.tag y.tag + let compare x y = Transitioning.Stdlib.compare x.tag y.tag let hash x = x.tag let tag x = x.tag diff --git a/src/plugins/value/utils/value_perf.ml b/src/plugins/value/utils/value_perf.ml index 9476dbbb11f..7015fc9e3f3 100644 --- a/src/plugins/value/utils/value_perf.ml +++ b/src/plugins/value/utils/value_perf.ml @@ -88,7 +88,7 @@ module Call_info = struct (* Sorts call_infos by decreasing execution time. *) let cmp current_time ci1 ci2 = - - (Pervasives.compare (total_duration current_time ci1) (total_duration current_time ci2)) + - (Transitioning.Stdlib.compare (total_duration current_time ci1) (total_duration current_time ci2)) ;; (* From an iteration, filter and sort by call_info, and returns the diff --git a/src/plugins/value/values/numerors/numerors_interval.ml b/src/plugins/value/values/numerors/numerors_interval.ml index bb9f4c20a7d..114b2fba184 100644 --- a/src/plugins/value/values/numerors/numerors_interval.ml +++ b/src/plugins/value/values/numerors/numerors_interval.ml @@ -171,7 +171,7 @@ let compare a b = (a, b) >>+ fun _ -> match a, b with | NaN _, NaN _ -> 0 | NaN _, _ -> 1 | _, NaN _ -> -1 | I (x, y, n), I (x', y', n') -> - let c = Pervasives.compare n n' in + let c = Transitioning.Stdlib.compare n n' in if c = 0 then let c = F.compare x x' in if c = 0 then F.compare y y' diff --git a/src/plugins/value/values/numerors/numerors_utils.ml b/src/plugins/value/values/numerors/numerors_utils.ml index b456540037a..dd45d7afeb7 100644 --- a/src/plugins/value/values/numerors/numerors_utils.ml +++ b/src/plugins/value/values/numerors/numerors_utils.ml @@ -59,7 +59,7 @@ module Precisions = struct | Simple -> -149 | Double -> -1074 | Long_Double -> -16494 | Real -> Pervasives.min_int - let compare a b = Pervasives.compare (get a) (get b) + let compare a b = Transitioning.Stdlib.compare (get a) (get b) let eq a b = compare a b = 0 let max a b = if compare a b <= 0 then b else a diff --git a/src/plugins/value/values/sign_value.ml b/src/plugins/value/values/sign_value.ml index 2a6908fcf33..211ce3cd5b2 100644 --- a/src/plugins/value/values/sign_value.ml +++ b/src/plugins/value/values/sign_value.ml @@ -54,7 +54,7 @@ let empty = { pos = false; zero = false; neg = false } include Datatype.Make(struct type t = signs include Datatype.Serializable_undefined - let compare = Pervasives.compare + let compare = Transitioning.Stdlib.compare let equal = Datatype.from_compare let hash = Hashtbl.hash let reprs = [top] diff --git a/src/plugins/wp/CfgCompiler.ml b/src/plugins/wp/CfgCompiler.ml index 88e5892d9bd..6109ac2d892 100644 --- a/src/plugins/wp/CfgCompiler.ml +++ b/src/plugins/wp/CfgCompiler.ml @@ -440,7 +440,7 @@ struct let pp fmt = function | Node i -> Node.pp fmt i | Assume (i,_) -> Format.fprintf fmt "ass%i" i | Check (i,_) -> Format.fprintf fmt "chk%i" i let equal x y = (tag x) = (tag y) - let compare x y = Pervasives.compare (tag x) (tag y) + let compare x y = Transitioning.Stdlib.compare (tag x) (tag y) let hash x = tag x end in let module G = Graph.Imperative.Digraph.ConcreteBidirectionalLabeled (V)(E) in diff --git a/src/plugins/wp/Conditions.ml b/src/plugins/wp/Conditions.ml index 1fac69012b5..3362fc39f4d 100644 --- a/src/plugins/wp/Conditions.ml +++ b/src/plugins/wp/Conditions.ml @@ -270,7 +270,7 @@ struct | _ -> 2 in let r = rank s1.condition - rank s2.condition in - if r = 0 then Pervasives.compare k2 k1 else r + if r = 0 then Transitioning.Stdlib.compare k2 k1 else r end) type t = Vars.t * SEQ.t diff --git a/src/plugins/wp/Cstring.ml b/src/plugins/wp/Cstring.ml index 66f3ab3afb6..f678abdd424 100644 --- a/src/plugins/wp/Cstring.ml +++ b/src/plugins/wp/Cstring.ml @@ -35,7 +35,7 @@ type cst = module STR = struct type t = cst - let compare = Pervasives.compare (* only comparable types *) + let compare = Transitioning.Stdlib.compare (* only comparable types *) let pretty fmt = function | C_str s -> Format.fprintf fmt "%S" s | W_str _ -> Format.fprintf fmt "\"L<...>\"" diff --git a/src/plugins/wp/Factory.ml b/src/plugins/wp/Factory.ml index bc0f3667d60..bc76ceb0d81 100644 --- a/src/plugins/wp/Factory.ml +++ b/src/plugins/wp/Factory.ml @@ -274,7 +274,7 @@ module COMPILERS = FCMap.Make (struct type t = setup * driver let compare (s,d) (s',d') = - let cmp = Pervasives.compare s s' in + let cmp = Transitioning.Stdlib.compare s s' in if cmp <> 0 then cmp else LogicBuiltins.compare d d' end) diff --git a/src/plugins/wp/LogicBuiltins.ml b/src/plugins/wp/LogicBuiltins.ml index a34105fae01..7e0b7b17c2b 100644 --- a/src/plugins/wp/LogicBuiltins.ml +++ b/src/plugins/wp/LogicBuiltins.ml @@ -43,7 +43,7 @@ type kind = | F of Ctypes.c_float | A (* abstract data *) -(* [LC] kinds can be compared by Pervasives.compare *) +(* [LC] kinds can be compared by Stdlib.compare *) let okind = function | C_int i -> I i @@ -157,14 +157,14 @@ let iter_table f = Hashtbl.iter (fun a sigs -> List.iter (fun (ks,lnk) -> items := (a,ks,lnk)::!items) sigs) (cdriver ()).hlogic ; - List.iter f (List.sort Pervasives.compare !items) + List.iter f (List.sort Transitioning.Stdlib.compare !items) let iter_libs f = let items = ref [] in Hashtbl.iter (fun a libs -> items := (a,libs) :: !items) (cdriver ()).hdeps ; - List.iter f (List.sort Pervasives.compare !items) + List.iter f (List.sort Transitioning.Stdlib.compare !items) let dump () = Log.print_on_output diff --git a/src/plugins/wp/MemTyped.ml b/src/plugins/wp/MemTyped.ml index 410076e90d5..6de0a92ea47 100644 --- a/src/plugins/wp/MemTyped.ml +++ b/src/plugins/wp/MemTyped.ml @@ -651,7 +651,7 @@ let shift l obj k = e_fun (Shift.get obj) [l;k] module LITERAL = struct type t = int * Cstring.cst - let compare (a:t) (b:t) = Pervasives.compare (fst a) (fst b) + let compare (a:t) (b:t) = Transitioning.Stdlib.compare (fst a) (fst b) let pretty fmt (eid,cst) = Format.fprintf fmt "%a@%d" Cstring.pretty cst eid end diff --git a/src/plugins/wp/ProverScript.ml b/src/plugins/wp/ProverScript.ml index 3ccf4f59b68..e628fe6a352 100644 --- a/src/plugins/wp/ProverScript.ml +++ b/src/plugins/wp/ProverScript.ml @@ -47,7 +47,7 @@ struct let sa = stage a in let sb = stage b in if sa = sb - then Pervasives.compare (time a) (time b) + then Transitioning.Stdlib.compare (time a) (time b) else sa - sb let sort script = List.stable_sort compare script diff --git a/src/plugins/wp/ProverWhy3.ml b/src/plugins/wp/ProverWhy3.ml index 4480ea68e99..56cbd3f35d0 100644 --- a/src/plugins/wp/ProverWhy3.ml +++ b/src/plugins/wp/ProverWhy3.ml @@ -314,7 +314,7 @@ type goal = module Goal = struct type t = goal - let compare = Pervasives.compare + let compare = Transitioning.Stdlib.compare let pretty fmt g = Format.fprintf fmt "[%s]%s.%s" g.file g.theory g.goal end diff --git a/src/plugins/wp/Splitter.ml b/src/plugins/wp/Splitter.ml index 9ac78de7720..c7afbd32731 100644 --- a/src/plugins/wp/Splitter.ml +++ b/src/plugins/wp/Splitter.ml @@ -68,7 +68,7 @@ let compare p q = | _ , ELSE _ -> 1 | CASE(s1,k1) , CASE(s2,k2) -> let c = Stmt.compare s1 s2 in - if c = 0 then Pervasives.compare k1 k2 else c + if c = 0 then Transitioning.Stdlib.compare k1 k2 else c | CASE _ , _ -> (-1) | _ , CASE _ -> 1 | DEFAULT s , DEFAULT t -> Stmt.compare s t @@ -80,7 +80,7 @@ let compare p q = | CALL _ , _ -> (-1) | _ , CALL _ -> 1 | ASSERT(ip1,k1,_) , ASSERT(ip2,k2,_) -> - let c = Pervasives.compare ip1.ip_id ip2.ip_id in + let c = Transitioning.Stdlib.compare ip1.ip_id ip2.ip_id in if c = 0 then k1 - k2 else c (* -------------------------------------------------------------------------- *) diff --git a/src/plugins/wp/StmtSemantics.ml b/src/plugins/wp/StmtSemantics.ml index 968c460cb2b..1a9c9791b6c 100644 --- a/src/plugins/wp/StmtSemantics.ml +++ b/src/plugins/wp/StmtSemantics.ml @@ -499,7 +499,7 @@ struct | NoneInfo, NoneInfo -> 0 | NoneInfo, _ -> -1 | _ , NoneInfo -> 1 - | LoopHead i, LoopHead j -> Pervasives.compare j i + | LoopHead i, LoopHead j -> Transitioning.Stdlib.compare j i module Automata = Interpreted_automata.UnrollUnnatural.Version type nodes = { diff --git a/src/plugins/wp/Strategy.ml b/src/plugins/wp/Strategy.ml index b6073824dd1..38f0f7f8141 100644 --- a/src/plugins/wp/Strategy.ml +++ b/src/plugins/wp/Strategy.ml @@ -106,7 +106,7 @@ type strategy = { arguments : argument list ; } and t = strategy -let highest a b = Pervasives.compare b.priority a.priority +let highest a b = Transitioning.Stdlib.compare b.priority a.priority class pool = object diff --git a/src/plugins/wp/VCS.ml b/src/plugins/wp/VCS.ml index a38694fad5d..a06e4d093dd 100644 --- a/src/plugins/wp/VCS.ml +++ b/src/plugins/wp/VCS.ml @@ -366,11 +366,11 @@ let compare p q = in let r = rank q.verdict - rank p.verdict in if r <> 0 then r else - let s = Pervasives.compare p.prover_steps q.prover_steps in + let s = Transitioning.Stdlib.compare p.prover_steps q.prover_steps in if s <> 0 then s else - let t = Pervasives.compare p.prover_time q.prover_time in + let t = Transitioning.Stdlib.compare p.prover_time q.prover_time in if t <> 0 then t else - Pervasives.compare p.solver_time q.solver_time + Transitioning.Stdlib.compare p.solver_time q.solver_time let combine v1 v2 = match v1 , v2 with diff --git a/src/plugins/wp/Warning.ml b/src/plugins/wp/Warning.ml index 56ea8e88b48..e9bc3d515bf 100644 --- a/src/plugins/wp/Warning.ml +++ b/src/plugins/wp/Warning.ml @@ -48,7 +48,7 @@ struct match w1.severe , w2.severe with | true , false -> (-1) | false , true -> 1 - | _ -> Pervasives.compare w1 w2 + | _ -> Transitioning.Stdlib.compare w1 w2 end diff --git a/src/plugins/wp/ctypes.ml b/src/plugins/wp/ctypes.ml index 34c76d1ff2e..04cd9701c91 100644 --- a/src/plugins/wp/ctypes.ml +++ b/src/plugins/wp/ctypes.ml @@ -317,7 +317,7 @@ module AinfoComparable = struct let c = !cmp obj_a obj_b in if c <> 0 then c else match a.arr_flat , b.arr_flat with - | Some a , Some b -> Pervasives.compare a.arr_size b.arr_size + | Some a , Some b -> Transitioning.Stdlib.compare a.arr_size b.arr_size | None , Some _ -> (-1) | Some _ , None -> 1 | None , None -> 0 @@ -574,7 +574,7 @@ and compare_array_ptr_conflated a b = let c = compare_ptr_conflated obj_a obj_b in if c <> 0 then c else match a.arr_flat , b.arr_flat with - | Some a , Some b -> Pervasives.compare a.arr_size b.arr_size + | Some a , Some b -> Transitioning.Stdlib.compare a.arr_size b.arr_size | None , Some _ -> (-1) | Some _ , None -> 1 | None , None -> 0 diff --git a/src/plugins/wp/proof.ml b/src/plugins/wp/proof.ml index 129c0aad1ee..5a314f37dd0 100644 --- a/src/plugins/wp/proof.ml +++ b/src/plugins/wp/proof.ml @@ -225,7 +225,7 @@ let update_hints_for_goal goal hints = try let old_hints,script,qed = Hashtbl.find scriptbase goal in let new_hints = List.sort String.compare hints in - if Pervasives.compare new_hints old_hints <> 0 then + if Transitioning.Stdlib.compare new_hints old_hints <> 0 then begin Hashtbl.replace scriptbase goal (new_hints,script,qed) ; needsave := true ; diff --git a/src/plugins/wp/share/install.ml b/src/plugins/wp/share/install.ml index 334e78760b3..bb0ee0a194c 100644 --- a/src/plugins/wp/share/install.ml +++ b/src/plugins/wp/share/install.ml @@ -43,8 +43,8 @@ let hardcopy inc out = begin let buffer = Bytes.create 1024 in let n = ref 0 in - while (n := Pervasives.input inc buffer 0 1024 ; !n > 0) do - Pervasives.output out buffer 0 !n + while (n := input inc buffer 0 1024 ; !n > 0) do + output out buffer 0 !n done ; flush out ; end diff --git a/src/plugins/wp/wpPropId.ml b/src/plugins/wp/wpPropId.ml index 7c2583caaf6..7e3009c53bb 100644 --- a/src/plugins/wp/wpPropId.ml +++ b/src/plugins/wp/wpPropId.ml @@ -192,7 +192,7 @@ let compare_kind k1 k2 = match k1, k2 with if cmp <> 0 then cmp else Property.compare p1 p2 - | _,_ -> Pervasives.compare (kind_order k1) (kind_order k2) + | _,_ -> Transitioning.Stdlib.compare (kind_order k1) (kind_order k2) let compare_prop_id pid1 pid2 = (* This order of comparison groups together prop_pids with same properties *) @@ -204,7 +204,7 @@ let compare_prop_id pid1 pid2 = let cmp = compare_kind pid2.p_kind pid1.p_kind in if cmp <> 0 then cmp else - Pervasives.compare pid1.p_part pid2.p_part + Transitioning.Stdlib.compare pid1.p_part pid2.p_part module PropId = Datatype.Make_with_collections( -- GitLab From 6961078a3b32d8b5106190c4c727c38058b8edaa Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Fri, 15 Feb 2019 11:48:04 +0100 Subject: [PATCH 030/376] [ocaml] silence spurious warnings about partial applications --- src/plugins/metrics/register_gui.ml | 7 ++++--- src/plugins/occurrence/register_gui.ml | 4 ++-- src/plugins/rte/register.ml | 8 ++++---- src/plugins/wp/TacShift.ml | 2 +- src/plugins/wp/register.ml | 2 +- src/plugins/wp/wpo.ml | 2 +- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/plugins/metrics/register_gui.ml b/src/plugins/metrics/register_gui.ml index f16d7007a7d..38cb84cfccd 100644 --- a/src/plugins/metrics/register_gui.ml +++ b/src/plugins/metrics/register_gui.ml @@ -347,10 +347,11 @@ module ValueCoverageGUI = struct ~markup:(Format.sprintf "%s%% functions reached" (Metrics_base.float_to_string pcent)) ~justify:`LEFT ~packing:box#pack ()); - let _ = Gtk_helper.on_bool box "Highlight results" (fun () -> !highlight) - (fun b -> highlight := b; main_ui#rehighlight ()) + let _ignore = Gtk_helper.on_bool box "Highlight results" + (fun () -> !highlight) + (fun b -> highlight := b; main_ui#rehighlight ()) in - let _ = Gtk_helper.on_bool box "Show columns" + let _ignore = Gtk_helper.on_bool box "Show columns" ~tooltip:"Shows the columns related to dead code in the filetree." (fun () -> !filetree_enabled) (fun b -> filetree_enabled := b; !update_filetree `Visibility) diff --git a/src/plugins/occurrence/register_gui.ml b/src/plugins/occurrence/register_gui.ml index 9fbba556725..3df2230eeac 100644 --- a/src/plugins/occurrence/register_gui.ml +++ b/src/plugins/occurrence/register_gui.ml @@ -71,7 +71,7 @@ let filter_accesses l = let f = consider_access () in List.filter (fun access -> f (Register.classify_accesses access)) l -let _ = +let _ignore = Dynamic.register ~plugin:"Occurrence" ~journalize:false @@ -79,7 +79,7 @@ let _ = (Datatype.func Datatype.bool Datatype.unit) Enabled.set -let _ = +let _ignore = Dynamic.register ~plugin:"Occurrence" ~journalize:false diff --git a/src/plugins/rte/register.ml b/src/plugins/rte/register.ml index ab0d3111c0a..99e58a483d2 100644 --- a/src/plugins/rte/register.ml +++ b/src/plugins/rte/register.ml @@ -63,7 +63,7 @@ let journal_register ?comment is_dyn name ty_arg fctref fct = let ty = Datatype.func ty_arg Datatype.unit in Db.register (Db.Journalize("RteGen." ^ name, ty)) fctref fct; if is_dyn then - let _ = + let _ignore = Dynamic.register ?comment ~plugin:"RteGen" name ty ~journalize:true fct in () @@ -111,7 +111,7 @@ let _ = (* retrieve list of generated rte annotations (not precond) for a given stmt *) -let _ = +let _ignore = Dynamic.register ~comment:"Get the list of annotations previously emitted by RTE for the \ given statement." @@ -123,7 +123,7 @@ let _ = ~journalize:true Generator.get_registered_annotations -let _ = +let _ignore = Dynamic.register ~comment:"Generate RTE annotations corresponding to the given stmt of \ the given function." @@ -134,7 +134,7 @@ let _ = ~journalize:false Visit.get_annotations_stmt -let _ = +let _ignore = Dynamic.register ~comment:"Generate RTE annotations corresponding to the given exp \ of the given stmt in the given function." diff --git a/src/plugins/wp/TacShift.ml b/src/plugins/wp/TacShift.ml index fff37a69094..4a1d714fa8c 100644 --- a/src/plugins/wp/TacShift.ml +++ b/src/plugins/wp/TacShift.ml @@ -84,7 +84,7 @@ let is_shift e = let open Qed.Logic in match F.repr e with | Fun( f , [_;n] ) -> - let _ = select_op f in + let _ignore = select_op f in let _ = select_int n in true | _ -> false diff --git a/src/plugins/wp/register.ml b/src/plugins/wp/register.ml index b8bbb65f08b..33157b91821 100644 --- a/src/plugins/wp/register.ml +++ b/src/plugins/wp/register.ml @@ -732,7 +732,7 @@ let deprecated name = "Dynamic '%s' now is deprecated. Use `Wp.VC` api instead." name let register name ty code = - let _ = + let _ignore = Dynamic.register ~plugin:"Wp" name ty ~journalize:false (*LC: Because of Property is not journalizable. *) (fun x -> deprecated name ; code x) diff --git a/src/plugins/wp/wpo.ml b/src/plugins/wp/wpo.ml index b4ff5124a5c..782b9a5425d 100644 --- a/src/plugins/wp/wpo.ml +++ b/src/plugins/wp/wpo.ml @@ -965,7 +965,7 @@ let get_logfile w prover result = let model = get_model w in DISK.cache_log ~pid:w.po_pid ~model ~prover ~result -let _ = +let _ignore = Dynamic.register ~plugin:"Wp" "Wpo.file_for_log_proof" ~journalize:false (Datatype.func2 WpoType.ty ProverType.ty -- GitLab From d2ce911b24a1ca3bb116596d62ae0cf0c1e50230 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Mon, 18 Feb 2019 13:47:43 +0100 Subject: [PATCH 031/376] [ocaml] add Transitioning.Format module for semantic tags --- Makefile.generating | 11 ++++++++ src/libraries/stdlib/transitioning.ml.in | 36 ++++++++++++++++++++++++ src/libraries/stdlib/transitioning.mli | 18 ++++++++++++ src/libraries/utils/rich_text.ml | 20 ++++++------- src/libraries/utils/rich_text.mli | 6 ++-- src/plugins/gui/pretty_source.ml | 12 +++++--- src/plugins/gui/wtext.ml | 15 ++++++---- src/plugins/metrics/metrics_acsl.ml | 2 +- src/plugins/metrics/metrics_base.ml | 20 ++++++------- src/plugins/metrics/metrics_base.mli | 2 +- src/plugins/metrics/metrics_cilast.ml | 4 +-- 11 files changed, 109 insertions(+), 37 deletions(-) diff --git a/Makefile.generating b/Makefile.generating index a79f857a468..568a02af72e 100644 --- a/Makefile.generating +++ b/Makefile.generating @@ -153,8 +153,16 @@ endif ifeq ($(HAS_OCAML408),yes) DYNLINK_INIT=fun () -> () + FORMAT_STAG=stag + FORMAT_STRING_OF_STAG=match s with\n\ + | Format.String_tag str -> str\n\ + | _ -> raise (Invalid_argument "unsupported tag extension") + FORMAT_STAG_OF_STRING=Format.String_tag s else DYNLINK_INIT=Dynlink.init + FORMAT_STAG=tag + FORMAT_STRING_OF_STAG=s + FORMAT_STAG_OF_STRING=s endif src/libraries/stdlib/transitioning.ml: \ @@ -170,6 +178,9 @@ src/libraries/stdlib/transitioning.ml: \ -e 's/@ASSOC_OPT@/$(ASSOC_OPT)/g' \ -e 's/@ASSQ_OPT@/$(ASSQ_OPT)/g' \ -e 's/@DYNLINK_INIT@/$(DYNLINK_INIT)/g' \ + -e 's/@FORMAT_STAG@/$(FORMAT_STAG)/g' \ + -e 's/@FORMAT_STRING_OF_STAG@/$(FORMAT_STRING_OF_STAG)/g' \ + -e 's/@FORMAT_STAG_OF_STRING@/$(FORMAT_STAG_OF_STRING)/g' \ $< > $@ $(CHMOD_RO) $@ diff --git a/src/libraries/stdlib/transitioning.ml.in b/src/libraries/stdlib/transitioning.ml.in index 5dac32656eb..2d0204a6532 100644 --- a/src/libraries/stdlib/transitioning.ml.in +++ b/src/libraries/stdlib/transitioning.ml.in @@ -93,6 +93,42 @@ module Dynlink = struct let init = @DYNLINK_INIT@ end +module Format = struct + type stag = Format.@FORMAT_STAG@ + let string_of_stag s = @FORMAT_STRING_OF_STAG@ + let stag_of_string s = @FORMAT_STAG_OF_STRING@ + type formatter_stag_functions = { + mark_open_stag : stag -> string; + mark_close_stag : stag -> string; + print_open_stag : stag -> unit; + print_close_stag : stag -> unit; + } + let pp_set_formatter_stag_functions fmt set_formatter_stag_functions = + Format.pp_set_formatter_@FORMAT_STAG@_functions fmt + { + Format.mark_open_@FORMAT_STAG@ = + set_formatter_stag_functions.mark_open_stag; + Format.mark_close_@FORMAT_STAG@ = + set_formatter_stag_functions.mark_close_stag; + Format.print_open_@FORMAT_STAG@ = + set_formatter_stag_functions.print_open_stag; + Format.print_close_@FORMAT_STAG@ = + set_formatter_stag_functions.print_close_stag; + } + let pp_get_formatter_stag_functions fmt () = + let st = Format.pp_get_formatter_@FORMAT_STAG@_functions fmt () in + { + mark_open_stag = st.Format.mark_open_@FORMAT_STAG@; + mark_close_stag = st.Format.mark_close_@FORMAT_STAG@; + print_open_stag = st.Format.print_open_@FORMAT_STAG@; + print_close_stag = st.Format.print_close_@FORMAT_STAG@; + } + let pp_open_stag fmt s = + Format.pp_open_@FORMAT_STAG@ fmt s + let pp_close_stag fmt () = + Format.pp_close_@FORMAT_STAG@ fmt () +end + module Q = struct let round_to_float x exact = diff --git a/src/libraries/stdlib/transitioning.mli b/src/libraries/stdlib/transitioning.mli index 5b542fd7b9f..55a64b4d91b 100644 --- a/src/libraries/stdlib/transitioning.mli +++ b/src/libraries/stdlib/transitioning.mli @@ -73,6 +73,24 @@ module Dynlink: sig val init: unit -> unit end +module Format: sig + type stag + val string_of_stag: stag -> string + val stag_of_string: string -> stag + type formatter_stag_functions = { + mark_open_stag : stag -> string; + mark_close_stag : stag -> string; + print_open_stag : stag -> unit; + print_close_stag : stag -> unit; + } + val pp_set_formatter_stag_functions: + Format.formatter -> formatter_stag_functions -> unit + val pp_get_formatter_stag_functions: + Format.formatter -> unit -> formatter_stag_functions + val pp_open_stag : Format.formatter -> stag -> unit + val pp_close_stag : Format.formatter -> unit -> unit +end + (** {1 Zarith} *) (** Function [Q.to_float] was introduced in Zarith 1.5 *) diff --git a/src/libraries/utils/rich_text.ml b/src/libraries/utils/rich_text.ml index 3a15771b965..cfba39cf308 100644 --- a/src/libraries/utils/rich_text.ml +++ b/src/libraries/utils/rich_text.ml @@ -27,7 +27,7 @@ type tag = { p : int ; (* first position *) q : int ; (* last position (excluded) *) - tag : Format.tag ; + tag : Transitioning.Format.stag ; children : tag list ; } @@ -50,8 +50,8 @@ let tags_at (_,tags) k = lookup [] k tags type env = { text : string ; output : (string -> int -> int -> unit) option ; - open_tag : (Format.tag -> int -> int -> unit) option ; - close_tag : (Format.tag -> int -> int -> unit) option ; + open_tag : (Transitioning.Format.stag -> int -> int -> unit) option ; + close_tag : (Transitioning.Format.stag -> int -> int -> unit) option ; } let signal f tag p q = @@ -86,8 +86,8 @@ let rec output_vbox fmt text k n = end let output_fmt fmt text k n = Format.pp_print_string fmt (String.sub text k n) -let open_tag fmt tag _k _n = Format.pp_open_tag fmt tag -let close_tag fmt _tag _k _n = Format.pp_close_tag fmt () +let open_tag fmt tag _k _n = Transitioning.Format.pp_open_stag fmt tag +let close_tag fmt _tag _k _n = Transitioning.Format.pp_close_stag fmt () let pretty ?vbox fmt message = let open_tag = open_tag fmt in @@ -209,11 +209,11 @@ let create ?indent ?margin () = Format.pp_set_max_indent fmt (max 0 (min k (m-10))) end ; let open Format in - pp_set_formatter_tag_functions fmt { - print_open_tag = push_tag buffer ; - print_close_tag = pop_tag buffer ; - mark_open_tag = no_mark ; - mark_close_tag = no_mark ; + Transitioning.Format.pp_set_formatter_stag_functions fmt { + Transitioning.Format.print_open_stag = push_tag buffer ; + print_close_stag = pop_tag buffer ; + mark_open_stag = no_mark ; + mark_close_stag = no_mark ; } ; pp_set_print_tags fmt true ; pp_set_mark_tags fmt false ; diff --git a/src/libraries/utils/rich_text.mli b/src/libraries/utils/rich_text.mli index 415d3e3ef32..172a9dd3513 100644 --- a/src/libraries/utils/rich_text.mli +++ b/src/libraries/utils/rich_text.mli @@ -31,14 +31,14 @@ val char_at : message -> int -> char val string : message -> string val substring : message -> int -> int -> string -val tags_at : message -> int -> (Format.tag * int * int) list +val tags_at : message -> int -> (Transitioning.Format.stag * int * int) list (** Returns the list of tags at the given position. Inner tags come first, outer tags last. *) val visit : ?output:(string -> int -> int -> unit) -> - ?open_tag:(Format.tag -> int -> int -> unit) -> - ?close_tag:(Format.tag -> int -> int -> unit) -> + ?open_tag:(Transitioning.Format.stag -> int -> int -> unit) -> + ?close_tag:(Transitioning.Format.stag -> int -> int -> unit) -> message -> unit (** Visit the message, with depth-first recursion on tags. All methods are called with text or tag, position and length. *) diff --git a/src/plugins/gui/pretty_source.ml b/src/plugins/gui/pretty_source.ml index c17460dafd9..d7fb0efbdcd 100644 --- a/src/plugins/gui/pretty_source.ml +++ b/src/plugins/gui/pretty_source.ml @@ -274,12 +274,14 @@ let localizable_from_locs state ~file ~line = let buffer_formatter state source = let starts = Stack.create () in let emit_open_tag s = + let s = Transitioning.Format.string_of_stag s in (* Ignore tags that are not ours *) if Extlib.string_prefix "guitag:" s then Stack.push (source#end_iter#offset, Tag.get s) starts ; "" in let emit_close_tag s = + let s = Transitioning.Format.string_of_stag s in (try if Extlib.string_prefix "guitag:" s then let (p,sid) = Stack.pop starts in @@ -292,10 +294,12 @@ let buffer_formatter state source = Format.pp_set_tags gtk_fmt true; Format.pp_set_print_tags gtk_fmt false; Format.pp_set_mark_tags gtk_fmt true; - Format.pp_set_formatter_tag_functions - gtk_fmt {(Format.pp_get_formatter_tag_functions gtk_fmt ()) with - Format.mark_open_tag = emit_open_tag; - Format.mark_close_tag = emit_close_tag;}; + let open Transitioning.Format in + pp_set_formatter_stag_functions + gtk_fmt {(pp_get_formatter_stag_functions gtk_fmt ()) + with + mark_open_stag = emit_open_tag; + mark_close_stag = emit_close_tag;}; Format.pp_set_margin gtk_fmt 79; gtk_fmt diff --git a/src/plugins/gui/wtext.ml b/src/plugins/gui/wtext.ml index 53537274b92..e87caf583e2 100644 --- a/src/plugins/gui/wtext.ml +++ b/src/plugins/gui/wtext.ml @@ -244,6 +244,7 @@ class text ?(autoscroll=false) ?(width=80) ?(indent=60) () = end method private open_tag name = + let name = Transitioning.Format.string_of_stag name in self#flush () ; style <- self#tag name :: style ; "" method private close_tag _name = @@ -254,13 +255,14 @@ class text ?(autoscroll=false) ?(width=80) ?(indent=60) () = | (TAG _ | PLAIN) :: sty -> style <- sty ; "" method fmt = match fmtref with Some fmt -> fmt | None -> + let open Transitioning.Format in let output_string s a b = if b > 0 then Buffer.add_substring text s a b in let fmt = Format.make_formatter output_string self#flush in - let tagger = Format.pp_get_formatter_tag_functions fmt () in - Format.pp_set_formatter_tag_functions fmt + let tagger = pp_get_formatter_stag_functions fmt () in + pp_set_formatter_stag_functions fmt { tagger with - Format.mark_open_tag = self#open_tag ; - Format.mark_close_tag = self#close_tag ; + mark_open_stag = self#open_tag; + mark_close_stag = self#close_tag ; } ; Format.pp_set_print_tags fmt false ; Format.pp_set_mark_tags fmt true ; @@ -306,9 +308,10 @@ class text ?(autoscroll=false) ?(width=80) ?(indent=60) () = begin let sid = hid <- succ hid ; Printf.sprintf ">%X" hid in Hashtbl.add marks sid (fun p q -> Hashtbl.remove marks sid ; f p q) ; - Format.pp_open_tag fmt sid ; + Transitioning.Format.pp_open_stag fmt + (Transitioning.Format.stag_of_string sid) ; let () = pp fmt in - Format.pp_close_tag fmt () ; + Transitioning.Format.pp_close_stag fmt () ; end (* -------------------------------------------------------------------------- *) diff --git a/src/plugins/metrics/metrics_acsl.ml b/src/plugins/metrics/metrics_acsl.ml index ebba36bb403..0e107134a78 100644 --- a/src/plugins/metrics/metrics_acsl.ml +++ b/src/plugins/metrics/metrics_acsl.ml @@ -284,7 +284,7 @@ let dump_acsl_stats fmt = let dump_acsl_stats_html fmt = - Format.pp_set_formatter_tag_functions fmt Metrics_base.html_tag_functions; + Transitioning.Format.pp_set_formatter_stag_functions fmt Metrics_base.html_stag_functions; Format.fprintf fmt "@[<v 0> <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\ \"http://www.w3.org/TR/html4/strict.dtd\">@ \ diff --git a/src/plugins/metrics/metrics_base.ml b/src/plugins/metrics/metrics_base.ml index f10bf8fd034..b55a6772f17 100644 --- a/src/plugins/metrics/metrics_base.ml +++ b/src/plugins/metrics/metrics_base.ml @@ -24,22 +24,22 @@ open Cil_types (* vname, vaddrof *) ;; (* Formatting html with Format.formatters *) -let html_tag_functions = - let mark_open_tag t = Format.sprintf "<%s>" t - and mark_close_tag t = +let html_stag_functions = + let mark_open_stag t = + let t = Transitioning.Format.string_of_stag t in + Format.sprintf "<%s>" t + and mark_close_stag t = + let t = Transitioning.Format.string_of_stag t in try let index = String.index t ' ' in Format.sprintf "</%s>" (String.sub t 0 index) with | Not_found -> Format.sprintf "</%s>" t - and print_open_tag _ = () - and print_close_tag _ = () + and print_open_stag _ = () + and print_close_stag _ = () in - { Format.mark_open_tag = mark_open_tag; - Format.mark_close_tag = mark_close_tag; - Format.print_open_tag = print_open_tag; - Format.print_close_tag = print_close_tag; - } + { Transitioning.Format.mark_open_stag; mark_close_stag; + print_open_stag; print_close_stag; } ;; (* Utility function to have underlines the same length as the title. diff --git a/src/plugins/metrics/metrics_base.mli b/src/plugins/metrics/metrics_base.mli index 6976f2c9c73..9ff77090ef5 100644 --- a/src/plugins/metrics/metrics_base.mli +++ b/src/plugins/metrics/metrics_base.mli @@ -21,7 +21,7 @@ (**************************************************************************) (** Tag functions handling html tags for Format *) -val html_tag_functions : Format.formatter_tag_functions;; +val html_stag_functions : Transitioning.Format.formatter_stag_functions;; (** mk_hdr [level] [ppf] [hdr_strg] produces a title from [hdr_strg] with an underline of the same length. diff --git a/src/plugins/metrics/metrics_cilast.ml b/src/plugins/metrics/metrics_cilast.ml index 6474c0e0619..9ccc80eb231 100644 --- a/src/plugins/metrics/metrics_cilast.ml +++ b/src/plugins/metrics/metrics_cilast.ml @@ -135,7 +135,7 @@ class slocVisitor ~libc : sloc_visitor = object(self) Format.fprintf fmt "%a" self#pp_file_metrics filename) metrics_map method print_stats fmt = - Format.pp_set_formatter_tag_functions fmt Metrics_base.html_tag_functions; + Transitioning.Format.pp_set_formatter_stag_functions fmt Metrics_base.html_stag_functions; Format.pp_set_tags fmt true; let pr_hdr fmt hdr_name = Format.fprintf fmt "@{<th>%s@}" hdr_name in @@ -547,7 +547,7 @@ let pretty_used_files used_files = let dump_html fmt cil_visitor = (* Activate tagging for html *) - Format.pp_set_formatter_tag_functions fmt html_tag_functions; + Transitioning.Format.pp_set_formatter_stag_functions fmt html_stag_functions; Format.pp_set_tags fmt true; let pr_row s fmt n = -- GitLab From 24239c17d0b23726ba4005a1f56c56979b2ca2d1 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Mon, 25 Feb 2019 10:54:05 +0100 Subject: [PATCH 032/376] [ocaml] fix issues following review --- src/kernel_services/abstract_interp/offsetmap.ml | 2 +- src/kernel_services/plugin_entry_points/plugin.ml | 3 +-- src/libraries/stdlib/transitioning.ml.in | 9 ++++++--- src/libraries/stdlib/transitioning.mli | 7 +++++++ src/libraries/utils/pretty_utils.ml | 5 +---- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/kernel_services/abstract_interp/offsetmap.ml b/src/kernel_services/abstract_interp/offsetmap.ml index d605d48d9cc..82625312c80 100644 --- a/src/kernel_services/abstract_interp/offsetmap.ml +++ b/src/kernel_services/abstract_interp/offsetmap.ml @@ -309,7 +309,7 @@ module Make (V : module type of Offsetmap_lattice_with_isotropy) = struct then begin if current_counter = max_int then Kernel.fatal "Offsetmap(%s): internal maximum exeeded" V.name; - counter := pervasives_succ current_counter; + counter := Transitioning.Stdlib.succ current_counter; end; hashed_node diff --git a/src/kernel_services/plugin_entry_points/plugin.ml b/src/kernel_services/plugin_entry_points/plugin.ml index a5c3a0f2f72..bd956deba6c 100644 --- a/src/kernel_services/plugin_entry_points/plugin.ml +++ b/src/kernel_services/plugin_entry_points/plugin.ml @@ -608,7 +608,6 @@ struct let debug_optname = output_mode "Debug" "debug" module Debug = struct - let pervasives_incr = incr (* before 'incr' is shadowed by the one in Int *) include Int(struct let default = !debug_level () @@ -629,7 +628,7 @@ struct (* the level of verbose is at least the level of debug *) if n > Verbose.get () then Verbose.set n; if n = 0 then decr positive_debug_ref - else if old = 0 then pervasives_incr positive_debug_ref); + else if old = 0 then Transitioning.Stdlib.incr positive_debug_ref); if is_kernel () then begin Cmdline.kernel_debug_atleast_ref := (fun n -> get () >= n); match !Cmdline.Kernel_debug_level.value_if_set with diff --git a/src/libraries/stdlib/transitioning.ml.in b/src/libraries/stdlib/transitioning.ml.in index 2d0204a6532..f96a0faf050 100644 --- a/src/libraries/stdlib/transitioning.ml.in +++ b/src/libraries/stdlib/transitioning.ml.in @@ -57,10 +57,13 @@ let _: ('a -> bool) -> 'a list -> 'a option = find_opt let _: 'a -> ('a * 'b) list -> 'b option = assoc_opt let _: 'a -> ('a * 'b) list -> 'b option = assq_opt -let stdlib_compare = compare (* Pervasives/Stdlib compare *) - module Stdlib = struct - let compare = stdlib_compare + (* Pervasives/Stdlib functions *) + let compare = compare + let succ = succ + let incr = incr + let min = min + let max = max end [@@@ warning "-3"] diff --git a/src/libraries/stdlib/transitioning.mli b/src/libraries/stdlib/transitioning.mli index 55a64b4d91b..2da86f65736 100644 --- a/src/libraries/stdlib/transitioning.mli +++ b/src/libraries/stdlib/transitioning.mli @@ -65,14 +65,21 @@ module List: sig val assq_opt: 'a -> ('a * 'b) list -> 'b option (** 4.05 *) end +(** 4.08 *) module Stdlib: sig val compare: 'a -> 'a -> int + val succ: int -> int + val incr: int ref -> unit + val min: 'a -> 'a -> 'a + val max: 'a -> 'a -> 'a end +(** 4.08 *) module Dynlink: sig val init: unit -> unit end +(** 4.08 *) module Format: sig type stag val string_of_stag: stag -> string diff --git a/src/libraries/utils/pretty_utils.ml b/src/libraries/utils/pretty_utils.ml index f78f4da7009..dc501dd587b 100644 --- a/src/libraries/utils/pretty_utils.ml +++ b/src/libraries/utils/pretty_utils.ml @@ -180,14 +180,11 @@ let pp_trail pp fmt x = (* --- Margins --- *) (* -------------------------------------------------------------------------- *) -let pervasives_min = min -let pervasives_max = max - type marger = int ref let marger () = ref 0 let add_margin marger ?(margin=0) ?(min=0) ?(max=80) text = let size = String.length text + margin in - let n = pervasives_min max (pervasives_max min size) in + let n = Transitioning.Stdlib.min max (Transitioning.Stdlib.max min size) in if n > !marger then marger := n type align = [ `Center | `Left | `Right ] -- GitLab From 9ab45e6bc0dbeb0917137c75d439ad55959166e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Mon, 25 Feb 2019 10:46:34 +0100 Subject: [PATCH 033/376] [wp] differenciate report-in and report-out for json --- src/plugins/wp/register.ml | 19 ++++++++++++++----- src/plugins/wp/wpReport.ml | 19 ++++++++++++++----- src/plugins/wp/wpReport.mli | 2 +- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/src/plugins/wp/register.ml b/src/plugins/wp/register.ml index b8bbb65f08b..1eeeeedbfb6 100644 --- a/src/plugins/wp/register.ml +++ b/src/plugins/wp/register.ml @@ -139,13 +139,22 @@ let do_wp_print_for goals = let do_wp_report () = begin - let rfiles = Wp_parameters.Report.get () in - if rfiles <> [] then + let reports = Wp_parameters.Report.get () in + let jreport = Wp_parameters.ReportJson.get () in + if reports <> [] || jreport <> "" then begin let stats = WpReport.fcstat () in - let jfile = Wp_parameters.ReportJson.get () in - if jfile <> "" then WpReport.export_json stats jfile ; - List.iter (WpReport.export stats) rfiles ; + begin + match Transitioning.String.split_on_char ':' jreport with + | [] | [""] -> () + | [joutput] -> + WpReport.export_json stats ~joutput () ; + | [jinput;joutput] -> + WpReport.export_json stats ~jinput ~joutput () ; + | _ -> + Wp_parameters.error "Invalid format for option -wp-report-json" + end ; + List.iter (WpReport.export stats) reports ; end ; if Wp_parameters.MemoryContext.get () then wp_warn_memory_context () diff --git a/src/plugins/wp/wpReport.ml b/src/plugins/wp/wpReport.ml index a14264c93f0..6b319bb4fa5 100644 --- a/src/plugins/wp/wpReport.ml +++ b/src/plugins/wp/wpReport.ml @@ -864,20 +864,29 @@ let export gstat specfile = (* -------------------------------------------------------------------------- *) -let export_json gstat jfile = +let export_json gstat ?jinput ~joutput () = begin - Wp_parameters.feedback "Report '%s'" jfile ; let js = try - if Sys.file_exists jfile - then Json.load_file jfile else `Null + let jfile = match jinput with + | None -> + Wp_parameters.feedback "Report '%s'" joutput ; + joutput + | Some jinput -> + Wp_parameters.feedback "Report in: '%s'" jinput ; + Wp_parameters.feedback "Report out: '%s'" joutput ; + jinput + in + if Sys.file_exists jfile then + Json.load_file jfile + else `Null with Json.Error(file,line,msg) -> let source = Log.source ~file ~line in Wp_parameters.error ~source "Incorrect json file: %s" msg ; `Null in rankify_fcstat gstat js ; - Json.save_file jfile (json_of_fcstat gstat) ; + Json.save_file joutput (json_of_fcstat gstat) ; end diff --git a/src/plugins/wp/wpReport.mli b/src/plugins/wp/wpReport.mli index 6d3563ff35c..01b4c67af6a 100644 --- a/src/plugins/wp/wpReport.mli +++ b/src/plugins/wp/wpReport.mli @@ -47,4 +47,4 @@ type fcstat val fcstat : unit -> fcstat val export : fcstat -> string -> unit -val export_json : fcstat -> string -> unit +val export_json : fcstat -> ?jinput:string -> joutput:string -> unit -> unit -- GitLab From 1b64dfdc87d9f7af4e3c744066e7490cae335f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Mon, 25 Feb 2019 10:18:24 +0100 Subject: [PATCH 034/376] [wp] add LOG in config --- src/plugins/wp/tests/test_config_qualif | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/wp/tests/test_config_qualif b/src/plugins/wp/tests/test_config_qualif index e8a8597428d..c0a4cd6daa6 100644 --- a/src/plugins/wp/tests/test_config_qualif +++ b/src/plugins/wp/tests/test_config_qualif @@ -1,2 +1,3 @@ -CMD: @frama-c@ -no-autoload-plugins -load-module wp -wp -wp-par 1 -wp-steps 1500 -wp-timeout 90 -wp-share ./share -wp-msg-key shell,success-only -wp-report-json @PTEST_FILE@.@PTEST_NUMBER@.report.json -wp-report tests/qualif.report -wp-out @PTEST_FILE@.@PTEST_NUMBER@.out @PTEST_FILE@ +LOG: @PTEST_NAME@.@PTEST_NUMBER@.report.json +CMD: @frama-c@ -no-autoload-plugins -load-module wp -wp -wp-par 1 -wp-steps 1500 -wp-timeout 90 -wp-share ./share -wp-msg-key shell,success-only -wp-report-json @PTEST_DIR@/result_qualif/@PTEST_NAME@.@PTEST_NUMBER@.report.json -wp-report tests/qualif.report -wp-out @PTEST_FILE@.@PTEST_NUMBER@.out @PTEST_FILE@ OPT: -- GitLab From e9a5125f42b87afe7d34a7939fa8cd36bffe5fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Mon, 25 Feb 2019 10:18:55 +0100 Subject: [PATCH 035/376] [wp] move all reports --- .../wp/tests/wp/{ => oracle_qualif}/sharing.c.0.report.json | 0 .../wp/{ => oracle_qualif}/stmtcompiler_test.i.0.report.json | 0 .../wp/{ => oracle_qualif}/stmtcompiler_test_rela.i.0.report.json | 0 .../wp/tests/wp/{ => oracle_qualif}/wp_behav.c.0.report.json | 0 .../wp/tests/wp/{ => oracle_qualif}/wp_behav.c.1.report.json | 0 .../wp/tests/wp/{ => oracle_qualif}/wp_call_pre.c.0.report.json | 0 .../wp/tests/wp/{ => oracle_qualif}/wp_eqb.i.0.report.json | 0 .../wp/tests/wp/{ => oracle_qualif}/wp_strategy.c.0.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/arith.i.0.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/arith.i.1.report.json | 0 .../wp_acsl/{ => oracle_qualif}/assign_array.i.0.report.json | 0 .../wp_acsl/{ => oracle_qualif}/assigns_path.i.0.report.json | 0 .../wp_acsl/{ => oracle_qualif}/assigns_range.i.0.report.json | 0 .../wp_acsl/{ => oracle_qualif}/assigns_range.i.1.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/axioms.i.0.report.json | 0 .../tests/wp_acsl/{ => oracle_qualif}/base_offset.i.0.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/bitwise.i.0.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/bitwise2.i.0.report.json | 0 .../wp_acsl/{ => oracle_qualif}/block_length.i.0.report.json | 0 .../wp_acsl/{ => oracle_qualif}/classify_float.c.0.report.json | 0 .../wp_acsl/{ => oracle_qualif}/classify_float.c.1.report.json | 0 .../wp_acsl/{ => oracle_qualif}/classify_float.c.2.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/cnf.i.0.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/ctor.i.0.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/div_mod.i.0.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/div_mod.i.1.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/div_mod.i.2.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/e_imply.i.0.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/equal.i.0.report.json | 0 .../wp_acsl/{ => oracle_qualif}/float_compare.i.0.report.json | 0 .../tests/wp_acsl/{ => oracle_qualif}/funvar_inv.i.0.report.json | 0 .../{ => oracle_qualif}/implicit_enum_cast.i.0.report.json | 0 .../tests/wp_acsl/{ => oracle_qualif}/init_label.i.0.report.json | 0 .../tests/wp_acsl/{ => oracle_qualif}/init_value.i.0.report.json | 0 .../tests/wp_acsl/{ => oracle_qualif}/init_value.i.1.report.json | 0 .../wp_acsl/{ => oracle_qualif}/init_value_mem.i.0.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/intbool.i.0.report.json | 0 .../wp_acsl/{ => oracle_qualif}/label_escape.i.0.report.json | 0 .../wp_acsl/{ => oracle_qualif}/label_escape.i.1.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/logic.i.0.report.json | 0 .../tests/wp_acsl/{ => oracle_qualif}/looplabels.i.0.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/null.c.0.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/pointer.i.0.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/pointer.i.1.report.json | 0 .../tests/wp_acsl/{ => oracle_qualif}/post_result.i.0.report.json | 0 .../tests/wp_acsl/{ => oracle_qualif}/precedence.i.0.report.json | 0 .../tests/wp_acsl/{ => oracle_qualif}/precedence.i.1.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/range.i.0.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/reads.i.0.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/reads.i.1.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/record.i.0.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/record.i.1.report.json | 0 .../wp_acsl/{ => oracle_qualif}/simpl_is_type.i.0.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/sizeof.i.0.report.json | 0 .../wp_acsl/{ => oracle_qualif}/struct_use_case.i.0.report.json | 0 .../wp_acsl/{ => oracle_qualif}/struct_use_case.i.1.report.json | 0 .../wp/tests/wp_acsl/{ => oracle_qualif}/tset.i.0.report.json | 0 .../tests/wp_acsl/{ => oracle_qualif}/type_guard.i.0.report.json | 0 .../tests/wp_acsl/{ => oracle_qualif}/type_guard.i.1.report.json | 0 .../wp_acsl/{ => oracle_qualif}/unit_bit_test.c.0.report.json | 0 .../tests/wp_acsl/{ => oracle_qualif}/unit_bool.i.0.report.json | 0 .../{ => oracle_qualif}/user_def_type_guard.i.0.report.json | 0 .../{ => oracle_qualif}/user_def_type_guard.i.1.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts0708.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts0843.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts779.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts788.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts986.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts_1174.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts_1176.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts_1360.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts_1462.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts_1586.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts_1588.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts_1601.c.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts_1828.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts_1828.i.1.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts_2040.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts_2079.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/bts_2159.i.0.report.json | 0 .../wp_bts/{ => oracle_qualif}/ergo_typecheck.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/issue-364.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/issue_143.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/issue_143.i.1.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/issue_143.i.2.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/issue_143.i.3.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/issue_198.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/issue_447.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/issue_453.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/issue_494.i.0.report.json | 0 .../wp/tests/wp_bts/{ => oracle_qualif}/issue_508.c.0.report.json | 0 .../wp_bts/{ => oracle_qualif}/nupw-bcl-bts1120.i.0.report.json | 0 .../binary-multiplication-without-overflow.c.0.report.json | 0 .../{ => oracle_qualif}/binary-multiplication.c.0.report.json | 0 .../{ => oracle_qualif}/frama_c_exo1_solved.c.0.report.json | 0 .../{ => oracle_qualif}/frama_c_exo2_solved.c.0.report.json | 0 .../{ => oracle_qualif}/frama_c_exo3_solved.old.c.0.report.json | 0 .../frama_c_exo3_solved.old.v2.c.0.report.json | 0 .../frama_c_exo3_solved.simplified.c.0.report.json | 0 .../{ => oracle_qualif}/frama_c_hashtbl_solved.c.0.report.json | 0 .../wp_gallery/{ => oracle_qualif}/loop-statement.c.0.report.json | 0 .../wp/tests/wp_hoare/{ => oracle_qualif}/byref.i.0.report.json | 0 .../wp/tests/wp_hoare/{ => oracle_qualif}/byref.i.1.report.json | 0 .../wp_hoare/{ => oracle_qualif}/dispatch_var.i.0.report.json | 0 .../wp_hoare/{ => oracle_qualif}/dispatch_var2.i.0.report.json | 0 .../wp_hoare/{ => oracle_qualif}/dispatch_var2.i.1.report.json | 0 .../wp/tests/wp_hoare/{ => oracle_qualif}/isHoare.i.0.report.json | 0 .../tests/wp_hoare/{ => oracle_qualif}/logicarr.i.0.report.json | 0 .../tests/wp_hoare/{ => oracle_qualif}/logicref.i.0.report.json | 0 .../wp_hoare/{ => oracle_qualif}/logicref_simple.i.0.report.json | 0 .../tests/wp_hoare/{ => oracle_qualif}/reference.i.0.report.json | 0 .../{ => oracle_qualif}/reference_and_struct.i.0.report.json | 0 .../wp_hoare/{ => oracle_qualif}/reference_array.i.0.report.json | 0 .../{ => oracle_qualif}/reference_array_simple.i.0.report.json | 0 .../tests/wp_hoare/{ => oracle_qualif}/refguards.i.0.report.json | 0 .../wp/tests/wp_manual/{ => oracle_qualif}/manual.i.0.report.json | 0 .../wp/tests/wp_manual/{ => oracle_qualif}/manual.i.1.report.json | 0 .../wp/tests/wp_manual/{ => oracle_qualif}/manual.i.2.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/abs.i.0.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/abs.i.1.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/abs.i.2.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/asm.i.0.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/bool.i.0.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/bool.i.1.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/copy.i.0.report.json | 0 .../tests/wp_plugin/{ => oracle_qualif}/dynamic.i.0.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/flash.c.0.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/flash.c.1.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/flash.c.2.report.json | 0 .../wp_plugin/{ => oracle_qualif}/float_format.i.0.report.json | 0 .../wp_plugin/{ => oracle_qualif}/float_format.i.1.report.json | 0 .../wp_plugin/{ => oracle_qualif}/float_format.i.2.report.json | 0 .../wp_plugin/{ => oracle_qualif}/float_real.i.0.report.json | 0 .../wp_plugin/{ => oracle_qualif}/float_real.i.1.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/frame.i.0.report.json | 0 .../wp_plugin/{ => oracle_qualif}/ground_real.i.0.report.json | 0 .../tests/wp_plugin/{ => oracle_qualif}/inductive.c.0.report.json | 0 .../wp_plugin/{ => oracle_qualif}/init_const.i.0.report.json | 0 .../{ => oracle_qualif}/init_const_guard.i.0.report.json | 0 .../wp_plugin/{ => oracle_qualif}/init_extern.i.0.report.json | 0 .../wp_plugin/{ => oracle_qualif}/init_valid.i.0.report.json | 0 .../tests/wp_plugin/{ => oracle_qualif}/initarr.i.0.report.json | 0 .../tests/wp_plugin/{ => oracle_qualif}/injector.c.0.report.json | 0 .../tests/wp_plugin/{ => oracle_qualif}/injector.c.1.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/loop.i.0.report.json | 0 .../wp_plugin/{ => oracle_qualif}/loopcurrent.i.0.report.json | 0 .../tests/wp_plugin/{ => oracle_qualif}/loopentry.i.0.report.json | 0 .../tests/wp_plugin/{ => oracle_qualif}/loopextra.i.0.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/mask.i.0.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/nth.i.0.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/nth.i.1.report.json | 0 .../tests/wp_plugin/{ => oracle_qualif}/overarray.i.0.report.json | 0 .../wp_plugin/{ => oracle_qualif}/overassign.i.0.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/params.i.0.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/plet.i.0.report.json | 0 .../tests/wp_plugin/{ => oracle_qualif}/polarity.i.0.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/prenex.i.0.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/repeat.c.0.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/rte.i.0.report.json | 0 .../tests/wp_plugin/{ => oracle_qualif}/sequence.i.0.report.json | 0 .../tests/wp_plugin/{ => oracle_qualif}/sequence.i.1.report.json | 0 .../tests/wp_plugin/{ => oracle_qualif}/sequence.i.2.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/stmt.c.0.report.json | 0 .../tests/wp_plugin/{ => oracle_qualif}/string_c.c.0.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/struct.i.0.report.json | 0 .../wp_plugin/{ => oracle_qualif}/struct_hack.i.0.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/subset.i.0.report.json | 0 .../wp_plugin/{ => oracle_qualif}/subset_fopen.c.0.report.json | 0 .../wp/tests/wp_plugin/{ => oracle_qualif}/trig.i.0.report.json | 0 .../wp_plugin/{ => oracle_qualif}/unsafe-arrays.i.0.report.json | 0 .../tests/wp_plugin/{ => oracle_qualif}/unsigned.i.0.report.json | 0 .../{ => oracle_qualif}/unsupported_init.i.0.report.json | 0 .../wp/tests/wp_store/{ => oracle_qualif}/array.i.0.report.json | 0 .../wp/tests/wp_store/{ => oracle_qualif}/natural.i.0.report.json | 0 .../wp_store/{ => oracle_qualif}/nonaliasing.i.0.report.json | 0 .../wp_store/{ => oracle_qualif}/nonaliasing.i.1.report.json | 0 .../wp/tests/wp_store/{ => oracle_qualif}/struct.i.0.report.json | 0 .../{ => oracle_qualif}/tac_split_quantifiers.i.0.report.json | 0 .../{ => oracle_qualif}/array_initialized.c.0.report.json | 0 .../{ => oracle_qualif}/array_initialized.c.1.report.json | 0 .../wp/tests/wp_typed/{ => oracle_qualif}/avar.i.0.report.json | 0 .../wp_typed/{ => oracle_qualif}/shift_lemma.i.0.report.json | 0 .../{ => oracle_qualif}/struct_array_type.i.0.report.json | 0 .../tests/wp_typed/{ => oracle_qualif}/unit_alloc.i.0.report.json | 0 .../tests/wp_typed/{ => oracle_qualif}/unit_alloc.i.1.report.json | 0 .../wp_typed/{ => oracle_qualif}/unit_bitwise.c.0.report.json | 0 .../wp_typed/{ => oracle_qualif}/unit_bitwise.c.1.report.json | 0 .../tests/wp_typed/{ => oracle_qualif}/unit_call.i.0.report.json | 0 .../tests/wp_typed/{ => oracle_qualif}/unit_cast.i.0.report.json | 0 .../tests/wp_typed/{ => oracle_qualif}/unit_cst.i.0.report.json | 0 .../tests/wp_typed/{ => oracle_qualif}/unit_float.i.0.report.json | 0 .../tests/wp_typed/{ => oracle_qualif}/unit_hard.i.0.report.json | 0 .../tests/wp_typed/{ => oracle_qualif}/unit_ite.i.0.report.json | 0 .../wp_typed/{ => oracle_qualif}/unit_labels.i.0.report.json | 0 .../tests/wp_typed/{ => oracle_qualif}/unit_lemma.i.0.report.json | 0 .../tests/wp_typed/{ => oracle_qualif}/unit_local.c.0.report.json | 0 .../tests/wp_typed/{ => oracle_qualif}/unit_local.c.1.report.json | 0 .../wp_typed/{ => oracle_qualif}/unit_loopscope.i.0.report.json | 0 .../wp_typed/{ => oracle_qualif}/unit_loopscope.i.1.report.json | 0 .../wp_typed/{ => oracle_qualif}/unit_matrix.i.0.report.json | 0 .../wp_typed/{ => oracle_qualif}/unit_string.i.0.report.json | 0 .../tests/wp_typed/{ => oracle_qualif}/unit_tset.i.0.report.json | 0 .../wp_typed/{ => oracle_qualif}/user_bitwise.i.0.report.json | 0 .../wp_typed/{ => oracle_qualif}/user_bitwise.i.1.report.json | 0 .../wp_typed/{ => oracle_qualif}/user_collect.i.0.report.json | 0 .../tests/wp_typed/{ => oracle_qualif}/user_init.i.0.report.json | 0 .../wp_typed/{ => oracle_qualif}/user_injector.i.0.report.json | 0 .../wp_typed/{ => oracle_qualif}/user_injector.i.1.report.json | 0 .../tests/wp_typed/{ => oracle_qualif}/user_rec.i.0.report.json | 0 .../wp_typed/{ => oracle_qualif}/user_string.i.0.report.json | 0 .../tests/wp_typed/{ => oracle_qualif}/user_swap.i.0.report.json | 0 .../tests/wp_typed/{ => oracle_qualif}/user_swap.i.1.report.json | 0 .../wp/tests/wp_usage/{ => oracle_qualif}/caveat2.i.0.report.json | 0 .../wp_usage/{ => oracle_qualif}/caveat_range.i.0.report.json | 0 .../wp_usage/{ => oracle_qualif}/issue-189-bis.i.0.report.json | 0 .../wp_usage/{ => oracle_qualif}/issue-189-bis.i.1.report.json | 0 216 files changed, 0 insertions(+), 0 deletions(-) rename src/plugins/wp/tests/wp/{ => oracle_qualif}/sharing.c.0.report.json (100%) rename src/plugins/wp/tests/wp/{ => oracle_qualif}/stmtcompiler_test.i.0.report.json (100%) rename src/plugins/wp/tests/wp/{ => oracle_qualif}/stmtcompiler_test_rela.i.0.report.json (100%) rename src/plugins/wp/tests/wp/{ => oracle_qualif}/wp_behav.c.0.report.json (100%) rename src/plugins/wp/tests/wp/{ => oracle_qualif}/wp_behav.c.1.report.json (100%) rename src/plugins/wp/tests/wp/{ => oracle_qualif}/wp_call_pre.c.0.report.json (100%) rename src/plugins/wp/tests/wp/{ => oracle_qualif}/wp_eqb.i.0.report.json (100%) rename src/plugins/wp/tests/wp/{ => oracle_qualif}/wp_strategy.c.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/arith.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/arith.i.1.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/assign_array.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/assigns_path.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/assigns_range.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/assigns_range.i.1.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/axioms.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/base_offset.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/bitwise.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/bitwise2.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/block_length.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/classify_float.c.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/classify_float.c.1.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/classify_float.c.2.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/cnf.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/ctor.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/div_mod.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/div_mod.i.1.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/div_mod.i.2.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/e_imply.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/equal.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/float_compare.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/funvar_inv.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/implicit_enum_cast.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/init_label.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/init_value.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/init_value.i.1.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/init_value_mem.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/intbool.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/label_escape.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/label_escape.i.1.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/logic.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/looplabels.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/null.c.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/pointer.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/pointer.i.1.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/post_result.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/precedence.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/precedence.i.1.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/range.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/reads.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/reads.i.1.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/record.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/record.i.1.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/simpl_is_type.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/sizeof.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/struct_use_case.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/struct_use_case.i.1.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/tset.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/type_guard.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/type_guard.i.1.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/unit_bit_test.c.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/unit_bool.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/user_def_type_guard.i.0.report.json (100%) rename src/plugins/wp/tests/wp_acsl/{ => oracle_qualif}/user_def_type_guard.i.1.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts0708.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts0843.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts779.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts788.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts986.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts_1174.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts_1176.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts_1360.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts_1462.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts_1586.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts_1588.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts_1601.c.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts_1828.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts_1828.i.1.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts_2040.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts_2079.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/bts_2159.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/ergo_typecheck.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/issue-364.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/issue_143.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/issue_143.i.1.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/issue_143.i.2.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/issue_143.i.3.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/issue_198.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/issue_447.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/issue_453.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/issue_494.i.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/issue_508.c.0.report.json (100%) rename src/plugins/wp/tests/wp_bts/{ => oracle_qualif}/nupw-bcl-bts1120.i.0.report.json (100%) rename src/plugins/wp/tests/wp_gallery/{ => oracle_qualif}/binary-multiplication-without-overflow.c.0.report.json (100%) rename src/plugins/wp/tests/wp_gallery/{ => oracle_qualif}/binary-multiplication.c.0.report.json (100%) rename src/plugins/wp/tests/wp_gallery/{ => oracle_qualif}/frama_c_exo1_solved.c.0.report.json (100%) rename src/plugins/wp/tests/wp_gallery/{ => oracle_qualif}/frama_c_exo2_solved.c.0.report.json (100%) rename src/plugins/wp/tests/wp_gallery/{ => oracle_qualif}/frama_c_exo3_solved.old.c.0.report.json (100%) rename src/plugins/wp/tests/wp_gallery/{ => oracle_qualif}/frama_c_exo3_solved.old.v2.c.0.report.json (100%) rename src/plugins/wp/tests/wp_gallery/{ => oracle_qualif}/frama_c_exo3_solved.simplified.c.0.report.json (100%) rename src/plugins/wp/tests/wp_gallery/{ => oracle_qualif}/frama_c_hashtbl_solved.c.0.report.json (100%) rename src/plugins/wp/tests/wp_gallery/{ => oracle_qualif}/loop-statement.c.0.report.json (100%) rename src/plugins/wp/tests/wp_hoare/{ => oracle_qualif}/byref.i.0.report.json (100%) rename src/plugins/wp/tests/wp_hoare/{ => oracle_qualif}/byref.i.1.report.json (100%) rename src/plugins/wp/tests/wp_hoare/{ => oracle_qualif}/dispatch_var.i.0.report.json (100%) rename src/plugins/wp/tests/wp_hoare/{ => oracle_qualif}/dispatch_var2.i.0.report.json (100%) rename src/plugins/wp/tests/wp_hoare/{ => oracle_qualif}/dispatch_var2.i.1.report.json (100%) rename src/plugins/wp/tests/wp_hoare/{ => oracle_qualif}/isHoare.i.0.report.json (100%) rename src/plugins/wp/tests/wp_hoare/{ => oracle_qualif}/logicarr.i.0.report.json (100%) rename src/plugins/wp/tests/wp_hoare/{ => oracle_qualif}/logicref.i.0.report.json (100%) rename src/plugins/wp/tests/wp_hoare/{ => oracle_qualif}/logicref_simple.i.0.report.json (100%) rename src/plugins/wp/tests/wp_hoare/{ => oracle_qualif}/reference.i.0.report.json (100%) rename src/plugins/wp/tests/wp_hoare/{ => oracle_qualif}/reference_and_struct.i.0.report.json (100%) rename src/plugins/wp/tests/wp_hoare/{ => oracle_qualif}/reference_array.i.0.report.json (100%) rename src/plugins/wp/tests/wp_hoare/{ => oracle_qualif}/reference_array_simple.i.0.report.json (100%) rename src/plugins/wp/tests/wp_hoare/{ => oracle_qualif}/refguards.i.0.report.json (100%) rename src/plugins/wp/tests/wp_manual/{ => oracle_qualif}/manual.i.0.report.json (100%) rename src/plugins/wp/tests/wp_manual/{ => oracle_qualif}/manual.i.1.report.json (100%) rename src/plugins/wp/tests/wp_manual/{ => oracle_qualif}/manual.i.2.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/abs.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/abs.i.1.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/abs.i.2.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/asm.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/bool.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/bool.i.1.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/copy.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/dynamic.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/flash.c.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/flash.c.1.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/flash.c.2.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/float_format.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/float_format.i.1.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/float_format.i.2.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/float_real.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/float_real.i.1.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/frame.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/ground_real.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/inductive.c.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/init_const.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/init_const_guard.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/init_extern.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/init_valid.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/initarr.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/injector.c.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/injector.c.1.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/loop.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/loopcurrent.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/loopentry.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/loopextra.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/mask.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/nth.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/nth.i.1.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/overarray.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/overassign.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/params.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/plet.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/polarity.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/prenex.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/repeat.c.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/rte.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/sequence.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/sequence.i.1.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/sequence.i.2.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/stmt.c.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/string_c.c.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/struct.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/struct_hack.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/subset.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/subset_fopen.c.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/trig.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/unsafe-arrays.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/unsigned.i.0.report.json (100%) rename src/plugins/wp/tests/wp_plugin/{ => oracle_qualif}/unsupported_init.i.0.report.json (100%) rename src/plugins/wp/tests/wp_store/{ => oracle_qualif}/array.i.0.report.json (100%) rename src/plugins/wp/tests/wp_store/{ => oracle_qualif}/natural.i.0.report.json (100%) rename src/plugins/wp/tests/wp_store/{ => oracle_qualif}/nonaliasing.i.0.report.json (100%) rename src/plugins/wp/tests/wp_store/{ => oracle_qualif}/nonaliasing.i.1.report.json (100%) rename src/plugins/wp/tests/wp_store/{ => oracle_qualif}/struct.i.0.report.json (100%) rename src/plugins/wp/tests/wp_tip/{ => oracle_qualif}/tac_split_quantifiers.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/array_initialized.c.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/array_initialized.c.1.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/avar.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/shift_lemma.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/struct_array_type.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_alloc.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_alloc.i.1.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_bitwise.c.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_bitwise.c.1.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_call.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_cast.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_cst.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_float.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_hard.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_ite.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_labels.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_lemma.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_local.c.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_local.c.1.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_loopscope.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_loopscope.i.1.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_matrix.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_string.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/unit_tset.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/user_bitwise.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/user_bitwise.i.1.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/user_collect.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/user_init.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/user_injector.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/user_injector.i.1.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/user_rec.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/user_string.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/user_swap.i.0.report.json (100%) rename src/plugins/wp/tests/wp_typed/{ => oracle_qualif}/user_swap.i.1.report.json (100%) rename src/plugins/wp/tests/wp_usage/{ => oracle_qualif}/caveat2.i.0.report.json (100%) rename src/plugins/wp/tests/wp_usage/{ => oracle_qualif}/caveat_range.i.0.report.json (100%) rename src/plugins/wp/tests/wp_usage/{ => oracle_qualif}/issue-189-bis.i.0.report.json (100%) rename src/plugins/wp/tests/wp_usage/{ => oracle_qualif}/issue-189-bis.i.1.report.json (100%) diff --git a/src/plugins/wp/tests/wp/sharing.c.0.report.json b/src/plugins/wp/tests/wp/oracle_qualif/sharing.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp/sharing.c.0.report.json rename to src/plugins/wp/tests/wp/oracle_qualif/sharing.c.0.report.json diff --git a/src/plugins/wp/tests/wp/stmtcompiler_test.i.0.report.json b/src/plugins/wp/tests/wp/oracle_qualif/stmtcompiler_test.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp/stmtcompiler_test.i.0.report.json rename to src/plugins/wp/tests/wp/oracle_qualif/stmtcompiler_test.i.0.report.json diff --git a/src/plugins/wp/tests/wp/stmtcompiler_test_rela.i.0.report.json b/src/plugins/wp/tests/wp/oracle_qualif/stmtcompiler_test_rela.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp/stmtcompiler_test_rela.i.0.report.json rename to src/plugins/wp/tests/wp/oracle_qualif/stmtcompiler_test_rela.i.0.report.json diff --git a/src/plugins/wp/tests/wp/wp_behav.c.0.report.json b/src/plugins/wp/tests/wp/oracle_qualif/wp_behav.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp/wp_behav.c.0.report.json rename to src/plugins/wp/tests/wp/oracle_qualif/wp_behav.c.0.report.json diff --git a/src/plugins/wp/tests/wp/wp_behav.c.1.report.json b/src/plugins/wp/tests/wp/oracle_qualif/wp_behav.c.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp/wp_behav.c.1.report.json rename to src/plugins/wp/tests/wp/oracle_qualif/wp_behav.c.1.report.json diff --git a/src/plugins/wp/tests/wp/wp_call_pre.c.0.report.json b/src/plugins/wp/tests/wp/oracle_qualif/wp_call_pre.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp/wp_call_pre.c.0.report.json rename to src/plugins/wp/tests/wp/oracle_qualif/wp_call_pre.c.0.report.json diff --git a/src/plugins/wp/tests/wp/wp_eqb.i.0.report.json b/src/plugins/wp/tests/wp/oracle_qualif/wp_eqb.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp/wp_eqb.i.0.report.json rename to src/plugins/wp/tests/wp/oracle_qualif/wp_eqb.i.0.report.json diff --git a/src/plugins/wp/tests/wp/wp_strategy.c.0.report.json b/src/plugins/wp/tests/wp/oracle_qualif/wp_strategy.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp/wp_strategy.c.0.report.json rename to src/plugins/wp/tests/wp/oracle_qualif/wp_strategy.c.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/arith.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/arith.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/arith.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/arith.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/arith.i.1.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/arith.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/arith.i.1.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/arith.i.1.report.json diff --git a/src/plugins/wp/tests/wp_acsl/assign_array.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/assign_array.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/assign_array.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/assign_array.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/assigns_path.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_path.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/assigns_path.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_path.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/assigns_range.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_range.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/assigns_range.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_range.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/assigns_range.i.1.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_range.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/assigns_range.i.1.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_range.i.1.report.json diff --git a/src/plugins/wp/tests/wp_acsl/axioms.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/axioms.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/axioms.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/axioms.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/base_offset.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/base_offset.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/base_offset.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/base_offset.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/bitwise.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/bitwise.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/bitwise2.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise2.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/bitwise2.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise2.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/block_length.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/block_length.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/block_length.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/block_length.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/classify_float.c.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/classify_float.c.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.c.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/classify_float.c.1.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.c.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/classify_float.c.1.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.c.1.report.json diff --git a/src/plugins/wp/tests/wp_acsl/classify_float.c.2.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.c.2.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/classify_float.c.2.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.c.2.report.json diff --git a/src/plugins/wp/tests/wp_acsl/cnf.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/cnf.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/cnf.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/cnf.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/ctor.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/ctor.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/ctor.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/ctor.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/div_mod.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/div_mod.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/div_mod.i.1.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/div_mod.i.1.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.i.1.report.json diff --git a/src/plugins/wp/tests/wp_acsl/div_mod.i.2.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.i.2.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/div_mod.i.2.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.i.2.report.json diff --git a/src/plugins/wp/tests/wp_acsl/e_imply.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/e_imply.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/e_imply.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/e_imply.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/equal.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/equal.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/equal.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/equal.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/float_compare.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/float_compare.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/float_compare.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/float_compare.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/funvar_inv.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/funvar_inv.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/funvar_inv.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/funvar_inv.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/implicit_enum_cast.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/implicit_enum_cast.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/implicit_enum_cast.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/implicit_enum_cast.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/init_label.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_label.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/init_label.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/init_label.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/init_value.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/init_value.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/init_value.i.1.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/init_value.i.1.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value.i.1.report.json diff --git a/src/plugins/wp/tests/wp_acsl/init_value_mem.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value_mem.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/init_value_mem.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value_mem.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/intbool.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/intbool.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/intbool.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/intbool.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/label_escape.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/label_escape.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/label_escape.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/label_escape.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/label_escape.i.1.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/label_escape.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/label_escape.i.1.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/label_escape.i.1.report.json diff --git a/src/plugins/wp/tests/wp_acsl/logic.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/logic.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/looplabels.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/looplabels.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/looplabels.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/looplabels.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/null.c.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/null.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/null.c.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/null.c.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/pointer.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/pointer.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/pointer.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/pointer.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/pointer.i.1.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/pointer.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/pointer.i.1.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/pointer.i.1.report.json diff --git a/src/plugins/wp/tests/wp_acsl/post_result.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/post_result.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/post_result.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/post_result.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/precedence.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/precedence.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/precedence.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/precedence.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/precedence.i.1.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/precedence.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/precedence.i.1.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/precedence.i.1.report.json diff --git a/src/plugins/wp/tests/wp_acsl/range.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/range.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/range.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/range.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/reads.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/reads.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/reads.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/reads.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/reads.i.1.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/reads.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/reads.i.1.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/reads.i.1.report.json diff --git a/src/plugins/wp/tests/wp_acsl/record.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/record.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/record.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/record.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/record.i.1.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/record.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/record.i.1.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/record.i.1.report.json diff --git a/src/plugins/wp/tests/wp_acsl/simpl_is_type.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/simpl_is_type.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/simpl_is_type.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/simpl_is_type.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/sizeof.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/sizeof.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/sizeof.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/sizeof.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/struct_use_case.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/struct_use_case.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/struct_use_case.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/struct_use_case.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/struct_use_case.i.1.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/struct_use_case.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/struct_use_case.i.1.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/struct_use_case.i.1.report.json diff --git a/src/plugins/wp/tests/wp_acsl/tset.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/tset.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/tset.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/tset.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/type_guard.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/type_guard.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/type_guard.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/type_guard.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/type_guard.i.1.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/type_guard.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/type_guard.i.1.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/type_guard.i.1.report.json diff --git a/src/plugins/wp/tests/wp_acsl/unit_bit_test.c.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bit_test.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/unit_bit_test.c.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bit_test.c.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/unit_bool.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/unit_bool.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/user_def_type_guard.i.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/user_def_type_guard.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/user_def_type_guard.i.0.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/user_def_type_guard.i.0.report.json diff --git a/src/plugins/wp/tests/wp_acsl/user_def_type_guard.i.1.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/user_def_type_guard.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_acsl/user_def_type_guard.i.1.report.json rename to src/plugins/wp/tests/wp_acsl/oracle_qualif/user_def_type_guard.i.1.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts0708.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts0708.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts0708.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts0708.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts0843.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts0843.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts0843.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts0843.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts779.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts779.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts779.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts779.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts788.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts788.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts788.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts788.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts986.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts986.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts986.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts986.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts_1174.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1174.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts_1174.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1174.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts_1176.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1176.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts_1176.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1176.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts_1360.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1360.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts_1360.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1360.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts_1462.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1462.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts_1462.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1462.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts_1586.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1586.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts_1586.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1586.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts_1588.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1588.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts_1588.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1588.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts_1601.c.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1601.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts_1601.c.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1601.c.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts_1828.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1828.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts_1828.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1828.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts_1828.i.1.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1828.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts_1828.i.1.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1828.i.1.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts_2040.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2040.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts_2040.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2040.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts_2079.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2079.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts_2079.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2079.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/bts_2159.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2159.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/bts_2159.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2159.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/ergo_typecheck.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/ergo_typecheck.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/ergo_typecheck.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/ergo_typecheck.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/issue-364.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue-364.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/issue-364.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/issue-364.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/issue_143.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/issue_143.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/issue_143.i.1.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/issue_143.i.1.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.i.1.report.json diff --git a/src/plugins/wp/tests/wp_bts/issue_143.i.2.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.i.2.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/issue_143.i.2.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.i.2.report.json diff --git a/src/plugins/wp/tests/wp_bts/issue_143.i.3.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.i.3.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/issue_143.i.3.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.i.3.report.json diff --git a/src/plugins/wp/tests/wp_bts/issue_198.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_198.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/issue_198.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/issue_198.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/issue_447.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_447.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/issue_447.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/issue_447.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/issue_453.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_453.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/issue_453.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/issue_453.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/issue_494.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_494.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/issue_494.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/issue_494.i.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/issue_508.c.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_508.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/issue_508.c.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/issue_508.c.0.report.json diff --git a/src/plugins/wp/tests/wp_bts/nupw-bcl-bts1120.i.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/nupw-bcl-bts1120.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_bts/nupw-bcl-bts1120.i.0.report.json rename to src/plugins/wp/tests/wp_bts/oracle_qualif/nupw-bcl-bts1120.i.0.report.json diff --git a/src/plugins/wp/tests/wp_gallery/binary-multiplication-without-overflow.c.0.report.json b/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication-without-overflow.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_gallery/binary-multiplication-without-overflow.c.0.report.json rename to src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication-without-overflow.c.0.report.json diff --git a/src/plugins/wp/tests/wp_gallery/binary-multiplication.c.0.report.json b/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_gallery/binary-multiplication.c.0.report.json rename to src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication.c.0.report.json diff --git a/src/plugins/wp/tests/wp_gallery/frama_c_exo1_solved.c.0.report.json b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo1_solved.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_gallery/frama_c_exo1_solved.c.0.report.json rename to src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo1_solved.c.0.report.json diff --git a/src/plugins/wp/tests/wp_gallery/frama_c_exo2_solved.c.0.report.json b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo2_solved.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_gallery/frama_c_exo2_solved.c.0.report.json rename to src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo2_solved.c.0.report.json diff --git a/src/plugins/wp/tests/wp_gallery/frama_c_exo3_solved.old.c.0.report.json b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.old.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_gallery/frama_c_exo3_solved.old.c.0.report.json rename to src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.old.c.0.report.json diff --git a/src/plugins/wp/tests/wp_gallery/frama_c_exo3_solved.old.v2.c.0.report.json b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.old.v2.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_gallery/frama_c_exo3_solved.old.v2.c.0.report.json rename to src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.old.v2.c.0.report.json diff --git a/src/plugins/wp/tests/wp_gallery/frama_c_exo3_solved.simplified.c.0.report.json b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.simplified.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_gallery/frama_c_exo3_solved.simplified.c.0.report.json rename to src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.simplified.c.0.report.json diff --git a/src/plugins/wp/tests/wp_gallery/frama_c_hashtbl_solved.c.0.report.json b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_hashtbl_solved.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_gallery/frama_c_hashtbl_solved.c.0.report.json rename to src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_hashtbl_solved.c.0.report.json diff --git a/src/plugins/wp/tests/wp_gallery/loop-statement.c.0.report.json b/src/plugins/wp/tests/wp_gallery/oracle_qualif/loop-statement.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_gallery/loop-statement.c.0.report.json rename to src/plugins/wp/tests/wp_gallery/oracle_qualif/loop-statement.c.0.report.json diff --git a/src/plugins/wp/tests/wp_hoare/byref.i.0.report.json b/src/plugins/wp/tests/wp_hoare/oracle_qualif/byref.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_hoare/byref.i.0.report.json rename to src/plugins/wp/tests/wp_hoare/oracle_qualif/byref.i.0.report.json diff --git a/src/plugins/wp/tests/wp_hoare/byref.i.1.report.json b/src/plugins/wp/tests/wp_hoare/oracle_qualif/byref.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_hoare/byref.i.1.report.json rename to src/plugins/wp/tests/wp_hoare/oracle_qualif/byref.i.1.report.json diff --git a/src/plugins/wp/tests/wp_hoare/dispatch_var.i.0.report.json b/src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_hoare/dispatch_var.i.0.report.json rename to src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var.i.0.report.json diff --git a/src/plugins/wp/tests/wp_hoare/dispatch_var2.i.0.report.json b/src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var2.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_hoare/dispatch_var2.i.0.report.json rename to src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var2.i.0.report.json diff --git a/src/plugins/wp/tests/wp_hoare/dispatch_var2.i.1.report.json b/src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var2.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_hoare/dispatch_var2.i.1.report.json rename to src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var2.i.1.report.json diff --git a/src/plugins/wp/tests/wp_hoare/isHoare.i.0.report.json b/src/plugins/wp/tests/wp_hoare/oracle_qualif/isHoare.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_hoare/isHoare.i.0.report.json rename to src/plugins/wp/tests/wp_hoare/oracle_qualif/isHoare.i.0.report.json diff --git a/src/plugins/wp/tests/wp_hoare/logicarr.i.0.report.json b/src/plugins/wp/tests/wp_hoare/oracle_qualif/logicarr.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_hoare/logicarr.i.0.report.json rename to src/plugins/wp/tests/wp_hoare/oracle_qualif/logicarr.i.0.report.json diff --git a/src/plugins/wp/tests/wp_hoare/logicref.i.0.report.json b/src/plugins/wp/tests/wp_hoare/oracle_qualif/logicref.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_hoare/logicref.i.0.report.json rename to src/plugins/wp/tests/wp_hoare/oracle_qualif/logicref.i.0.report.json diff --git a/src/plugins/wp/tests/wp_hoare/logicref_simple.i.0.report.json b/src/plugins/wp/tests/wp_hoare/oracle_qualif/logicref_simple.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_hoare/logicref_simple.i.0.report.json rename to src/plugins/wp/tests/wp_hoare/oracle_qualif/logicref_simple.i.0.report.json diff --git a/src/plugins/wp/tests/wp_hoare/reference.i.0.report.json b/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_hoare/reference.i.0.report.json rename to src/plugins/wp/tests/wp_hoare/oracle_qualif/reference.i.0.report.json diff --git a/src/plugins/wp/tests/wp_hoare/reference_and_struct.i.0.report.json b/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_and_struct.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_hoare/reference_and_struct.i.0.report.json rename to src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_and_struct.i.0.report.json diff --git a/src/plugins/wp/tests/wp_hoare/reference_array.i.0.report.json b/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_array.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_hoare/reference_array.i.0.report.json rename to src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_array.i.0.report.json diff --git a/src/plugins/wp/tests/wp_hoare/reference_array_simple.i.0.report.json b/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_array_simple.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_hoare/reference_array_simple.i.0.report.json rename to src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_array_simple.i.0.report.json diff --git a/src/plugins/wp/tests/wp_hoare/refguards.i.0.report.json b/src/plugins/wp/tests/wp_hoare/oracle_qualif/refguards.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_hoare/refguards.i.0.report.json rename to src/plugins/wp/tests/wp_hoare/oracle_qualif/refguards.i.0.report.json diff --git a/src/plugins/wp/tests/wp_manual/manual.i.0.report.json b/src/plugins/wp/tests/wp_manual/oracle_qualif/manual.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_manual/manual.i.0.report.json rename to src/plugins/wp/tests/wp_manual/oracle_qualif/manual.i.0.report.json diff --git a/src/plugins/wp/tests/wp_manual/manual.i.1.report.json b/src/plugins/wp/tests/wp_manual/oracle_qualif/manual.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_manual/manual.i.1.report.json rename to src/plugins/wp/tests/wp_manual/oracle_qualif/manual.i.1.report.json diff --git a/src/plugins/wp/tests/wp_manual/manual.i.2.report.json b/src/plugins/wp/tests/wp_manual/oracle_qualif/manual.i.2.report.json similarity index 100% rename from src/plugins/wp/tests/wp_manual/manual.i.2.report.json rename to src/plugins/wp/tests/wp_manual/oracle_qualif/manual.i.2.report.json diff --git a/src/plugins/wp/tests/wp_plugin/abs.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/abs.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/abs.i.1.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/abs.i.1.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.i.1.report.json diff --git a/src/plugins/wp/tests/wp_plugin/abs.i.2.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.i.2.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/abs.i.2.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.i.2.report.json diff --git a/src/plugins/wp/tests/wp_plugin/asm.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/asm.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/asm.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/asm.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/bool.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/bool.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/bool.i.1.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/bool.i.1.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.i.1.report.json diff --git a/src/plugins/wp/tests/wp_plugin/copy.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/copy.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/copy.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/copy.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/dynamic.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/dynamic.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/dynamic.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/dynamic.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/flash.c.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/flash.c.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.c.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/flash.c.1.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.c.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/flash.c.1.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.c.1.report.json diff --git a/src/plugins/wp/tests/wp_plugin/flash.c.2.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.c.2.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/flash.c.2.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.c.2.report.json diff --git a/src/plugins/wp/tests/wp_plugin/float_format.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/float_format.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/float_format.i.1.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/float_format.i.1.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.i.1.report.json diff --git a/src/plugins/wp/tests/wp_plugin/float_format.i.2.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.i.2.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/float_format.i.2.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.i.2.report.json diff --git a/src/plugins/wp/tests/wp_plugin/float_real.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_real.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/float_real.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/float_real.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/float_real.i.1.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_real.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/float_real.i.1.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/float_real.i.1.report.json diff --git a/src/plugins/wp/tests/wp_plugin/frame.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/frame.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/frame.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/frame.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/ground_real.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/ground_real.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/ground_real.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/ground_real.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/inductive.c.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/inductive.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/inductive.c.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/inductive.c.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/init_const.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_const.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/init_const.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/init_const.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/init_const_guard.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_const_guard.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/init_const_guard.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/init_const_guard.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/init_extern.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_extern.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/init_extern.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/init_extern.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/init_valid.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_valid.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/init_valid.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/init_valid.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/initarr.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/initarr.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/initarr.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/initarr.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/injector.c.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/injector.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/injector.c.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/injector.c.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/injector.c.1.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/injector.c.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/injector.c.1.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/injector.c.1.report.json diff --git a/src/plugins/wp/tests/wp_plugin/loop.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loop.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/loop.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/loop.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/loopcurrent.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopcurrent.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/loopcurrent.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/loopcurrent.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/loopentry.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopentry.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/loopentry.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/loopentry.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/loopextra.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopextra.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/loopextra.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/loopextra.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/mask.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/mask.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/mask.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/mask.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/nth.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/nth.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/nth.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/nth.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/nth.i.1.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/nth.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/nth.i.1.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/nth.i.1.report.json diff --git a/src/plugins/wp/tests/wp_plugin/overarray.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/overarray.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/overarray.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/overarray.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/overassign.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/overassign.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/overassign.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/overassign.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/params.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/params.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/params.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/params.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/plet.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/plet.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/plet.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/plet.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/polarity.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/polarity.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/polarity.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/polarity.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/prenex.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/prenex.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/prenex.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/prenex.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/repeat.c.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/repeat.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/repeat.c.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/repeat.c.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/rte.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/rte.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/rte.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/rte.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/sequence.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/sequence.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/sequence.i.1.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/sequence.i.1.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.i.1.report.json diff --git a/src/plugins/wp/tests/wp_plugin/sequence.i.2.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.i.2.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/sequence.i.2.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.i.2.report.json diff --git a/src/plugins/wp/tests/wp_plugin/stmt.c.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/stmt.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/stmt.c.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/stmt.c.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/string_c.c.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/string_c.c.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.c.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/struct.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/struct.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/struct.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/struct.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/struct_hack.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/struct_hack.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/struct_hack.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/struct_hack.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/subset.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/subset.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/subset.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/subset.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/subset_fopen.c.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/subset_fopen.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/subset_fopen.c.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/subset_fopen.c.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/trig.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/trig.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/trig.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/trig.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/unsafe-arrays.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsafe-arrays.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/unsafe-arrays.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/unsafe-arrays.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/unsigned.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsigned.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/unsigned.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/unsigned.i.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/unsupported_init.i.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsupported_init.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_plugin/unsupported_init.i.0.report.json rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/unsupported_init.i.0.report.json diff --git a/src/plugins/wp/tests/wp_store/array.i.0.report.json b/src/plugins/wp/tests/wp_store/oracle_qualif/array.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_store/array.i.0.report.json rename to src/plugins/wp/tests/wp_store/oracle_qualif/array.i.0.report.json diff --git a/src/plugins/wp/tests/wp_store/natural.i.0.report.json b/src/plugins/wp/tests/wp_store/oracle_qualif/natural.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_store/natural.i.0.report.json rename to src/plugins/wp/tests/wp_store/oracle_qualif/natural.i.0.report.json diff --git a/src/plugins/wp/tests/wp_store/nonaliasing.i.0.report.json b/src/plugins/wp/tests/wp_store/oracle_qualif/nonaliasing.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_store/nonaliasing.i.0.report.json rename to src/plugins/wp/tests/wp_store/oracle_qualif/nonaliasing.i.0.report.json diff --git a/src/plugins/wp/tests/wp_store/nonaliasing.i.1.report.json b/src/plugins/wp/tests/wp_store/oracle_qualif/nonaliasing.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_store/nonaliasing.i.1.report.json rename to src/plugins/wp/tests/wp_store/oracle_qualif/nonaliasing.i.1.report.json diff --git a/src/plugins/wp/tests/wp_store/struct.i.0.report.json b/src/plugins/wp/tests/wp_store/oracle_qualif/struct.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_store/struct.i.0.report.json rename to src/plugins/wp/tests/wp_store/oracle_qualif/struct.i.0.report.json diff --git a/src/plugins/wp/tests/wp_tip/tac_split_quantifiers.i.0.report.json b/src/plugins/wp/tests/wp_tip/oracle_qualif/tac_split_quantifiers.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_tip/tac_split_quantifiers.i.0.report.json rename to src/plugins/wp/tests/wp_tip/oracle_qualif/tac_split_quantifiers.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/array_initialized.c.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/array_initialized.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/array_initialized.c.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/array_initialized.c.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/array_initialized.c.1.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/array_initialized.c.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/array_initialized.c.1.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/array_initialized.c.1.report.json diff --git a/src/plugins/wp/tests/wp_typed/avar.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/avar.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/avar.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/avar.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/shift_lemma.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/shift_lemma.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/shift_lemma.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/shift_lemma.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/struct_array_type.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/struct_array_type.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/struct_array_type.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/struct_array_type.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_alloc.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_alloc.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_alloc.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_alloc.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_alloc.i.1.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_alloc.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_alloc.i.1.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_alloc.i.1.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_bitwise.c.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_bitwise.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_bitwise.c.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_bitwise.c.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_bitwise.c.1.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_bitwise.c.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_bitwise.c.1.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_bitwise.c.1.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_call.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_call.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_call.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_call.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_cast.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cast.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_cast.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cast.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_cst.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cst.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_cst.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cst.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_float.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_float.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_float.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_float.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_hard.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_hard.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_hard.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_hard.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_ite.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_ite.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_ite.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_ite.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_labels.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_labels.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_labels.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_labels.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_lemma.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_lemma.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_lemma.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_lemma.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_local.c.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_local.c.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_local.c.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_local.c.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_local.c.1.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_local.c.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_local.c.1.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_local.c.1.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_loopscope.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_loopscope.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_loopscope.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_loopscope.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_loopscope.i.1.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_loopscope.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_loopscope.i.1.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_loopscope.i.1.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_matrix.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_matrix.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_matrix.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_matrix.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_string.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_string.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_string.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_string.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/unit_tset.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_tset.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/unit_tset.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/unit_tset.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/user_bitwise.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_bitwise.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/user_bitwise.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/user_bitwise.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/user_bitwise.i.1.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_bitwise.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/user_bitwise.i.1.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/user_bitwise.i.1.report.json diff --git a/src/plugins/wp/tests/wp_typed/user_collect.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_collect.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/user_collect.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/user_collect.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/user_init.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/user_init.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/user_injector.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_injector.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/user_injector.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/user_injector.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/user_injector.i.1.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_injector.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/user_injector.i.1.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/user_injector.i.1.report.json diff --git a/src/plugins/wp/tests/wp_typed/user_rec.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_rec.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/user_rec.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/user_rec.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/user_string.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_string.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/user_string.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/user_string.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/user_swap.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_swap.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/user_swap.i.0.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/user_swap.i.0.report.json diff --git a/src/plugins/wp/tests/wp_typed/user_swap.i.1.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_swap.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_typed/user_swap.i.1.report.json rename to src/plugins/wp/tests/wp_typed/oracle_qualif/user_swap.i.1.report.json diff --git a/src/plugins/wp/tests/wp_usage/caveat2.i.0.report.json b/src/plugins/wp/tests/wp_usage/oracle_qualif/caveat2.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_usage/caveat2.i.0.report.json rename to src/plugins/wp/tests/wp_usage/oracle_qualif/caveat2.i.0.report.json diff --git a/src/plugins/wp/tests/wp_usage/caveat_range.i.0.report.json b/src/plugins/wp/tests/wp_usage/oracle_qualif/caveat_range.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_usage/caveat_range.i.0.report.json rename to src/plugins/wp/tests/wp_usage/oracle_qualif/caveat_range.i.0.report.json diff --git a/src/plugins/wp/tests/wp_usage/issue-189-bis.i.0.report.json b/src/plugins/wp/tests/wp_usage/oracle_qualif/issue-189-bis.i.0.report.json similarity index 100% rename from src/plugins/wp/tests/wp_usage/issue-189-bis.i.0.report.json rename to src/plugins/wp/tests/wp_usage/oracle_qualif/issue-189-bis.i.0.report.json diff --git a/src/plugins/wp/tests/wp_usage/issue-189-bis.i.1.report.json b/src/plugins/wp/tests/wp_usage/oracle_qualif/issue-189-bis.i.1.report.json similarity index 100% rename from src/plugins/wp/tests/wp_usage/issue-189-bis.i.1.report.json rename to src/plugins/wp/tests/wp_usage/oracle_qualif/issue-189-bis.i.1.report.json -- GitLab From 7145dca0ba1c912d85357ca8a96da6e268d3cf11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Mon, 25 Feb 2019 11:06:13 +0100 Subject: [PATCH 036/376] [wp] use report/in report/out --- src/plugins/wp/tests/test_config_qualif | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/wp/tests/test_config_qualif b/src/plugins/wp/tests/test_config_qualif index c0a4cd6daa6..dceef0711d4 100644 --- a/src/plugins/wp/tests/test_config_qualif +++ b/src/plugins/wp/tests/test_config_qualif @@ -1,3 +1,3 @@ +CMD: @frama-c@ -no-autoload-plugins -load-module wp -wp -wp-par 1 -wp-steps 1500 -wp-timeout 90 -wp-share ./share -wp-msg-key shell,success-only -wp-report-json @PTEST_DIR@/oracle_qualif/@PTEST_NAME@.@PTEST_NUMBER@.report.json:@PTEST_DIR@/result_qualif/@PTEST_NAME@.@PTEST_NUMBER@.report.json -wp-report tests/qualif.report -wp-out @PTEST_FILE@.@PTEST_NUMBER@.out @PTEST_FILE@ LOG: @PTEST_NAME@.@PTEST_NUMBER@.report.json -CMD: @frama-c@ -no-autoload-plugins -load-module wp -wp -wp-par 1 -wp-steps 1500 -wp-timeout 90 -wp-share ./share -wp-msg-key shell,success-only -wp-report-json @PTEST_DIR@/result_qualif/@PTEST_NAME@.@PTEST_NUMBER@.report.json -wp-report tests/qualif.report -wp-out @PTEST_FILE@.@PTEST_NUMBER@.out @PTEST_FILE@ OPT: -- GitLab From 5eaf63a42d4235a87bbb77ce4abdf7ff5aadfc25 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 25 Feb 2019 11:32:05 +0100 Subject: [PATCH 037/376] [tests] add test case for fixed bug. --- tests/syntax/local-variable.i | 6 ++++++ tests/syntax/oracle/local-variable.res.oracle | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/tests/syntax/local-variable.i b/tests/syntax/local-variable.i index fb40a040b29..52067d1dcec 100644 --- a/tests/syntax/local-variable.i +++ b/tests/syntax/local-variable.i @@ -4,3 +4,9 @@ int main(){ } ; // < NOP inserted } + +void f() { + if (0) { + int b; + } +} diff --git a/tests/syntax/oracle/local-variable.res.oracle b/tests/syntax/oracle/local-variable.res.oracle index a435bc573b6..e7cfa00d9cd 100644 --- a/tests/syntax/oracle/local-variable.res.oracle +++ b/tests/syntax/oracle/local-variable.res.oracle @@ -11,4 +11,9 @@ int main(void) return __retres; } +void f(void) +{ + return; +} + -- GitLab From 3c596215e8688e11d760010ace8cf6ec23f20d55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Mon, 25 Feb 2019 11:40:29 +0100 Subject: [PATCH 038/376] [wp] adding quail reports as oracles --- .../wp/oracle_qualif/sharing.0.report.json | 14 ++ .../stmtcompiler_test.0.report.json | 204 ++++++++++++++++++ .../wp/oracle_qualif/wp_eqb.0.report.json | 14 ++ .../oracle_qualif/assign_array.0.report.json | 18 ++ .../oracle_qualif/assigns_path.0.report.json | 45 ++++ .../oracle_qualif/bitwise2.0.report.json | 42 ++++ .../wp_acsl/oracle_qualif/ctor.0.report.json | 14 ++ .../wp_acsl/oracle_qualif/equal.0.report.json | 86 ++++++++ .../oracle_qualif/float_compare.0.report.json | 39 ++++ .../implicit_enum_cast.0.report.json | 14 ++ .../oracle_qualif/init_label.0.report.json | 41 ++++ .../oracle_qualif/intbool.0.report.json | 10 + .../wp_acsl/oracle_qualif/logic.0.report.json | 138 ++++++++++++ .../wp_acsl/oracle_qualif/null.0.report.json | 33 +++ .../oracle_qualif/sizeof.0.report.json | 20 ++ .../oracle_qualif/unit_bit_test.0.report.json | 38 ++++ .../oracle_qualif/unit_bool.0.report.json | 14 ++ .../oracle_qualif/bts_1462.0.report.json | 64 ++++++ .../oracle_qualif/bts_1586.0.report.json | 39 ++++ .../oracle_qualif/bts_1588.0.report.json | 12 ++ .../oracle_qualif/bts_1601.0.report.json | 45 ++++ .../oracle_qualif/bts_2040.0.report.json | 10 + .../oracle_qualif/bts_2159.0.report.json | 14 ++ .../ergo_typecheck.0.report.json | 36 ++++ .../oracle_qualif/issue-364.0.report.json | 20 ++ .../oracle_qualif/issue_198.0.report.json | 14 ++ .../oracle_qualif/issue_447.0.report.json | 14 ++ .../oracle_qualif/issue_453.0.report.json | 30 +++ .../oracle_qualif/issue_494.0.report.json | 35 +++ .../oracle_qualif/issue_508.0.report.json | 19 ++ .../wp_plugin/oracle_qualif/asm.0.report.json | 22 ++ .../oracle_qualif/copy.0.report.json | 61 ++++++ .../oracle_qualif/frame.0.report.json | 53 +++++ .../oracle_qualif/ground_real.0.report.json | 12 ++ .../oracle_qualif/init_valid.0.report.json | 30 +++ .../oracle_qualif/loopcurrent.0.report.json | 13 ++ .../oracle_qualif/loopentry.0.report.json | 13 ++ .../oracle_qualif/loopextra.0.report.json | 14 ++ .../oracle_qualif/mask.0.report.json | 14 ++ .../oracle_qualif/overarray.0.report.json | 51 +++++ .../oracle_qualif/overassign.0.report.json | 61 ++++++ .../oracle_qualif/params.0.report.json | 14 ++ .../oracle_qualif/plet.0.report.json | 14 ++ .../oracle_qualif/polarity.0.report.json | 10 + .../oracle_qualif/repeat.0.report.json | 122 +++++++++++ .../oracle_qualif/string_c.0.report.json | 193 +++++++++++++++++ .../oracle_qualif/subset.0.report.json | 14 ++ .../oracle_qualif/subset_fopen.0.report.json | 36 ++++ .../oracle_qualif/unsafe-arrays.0.report.json | 24 +++ .../unsupported_init.0.report.json | 16 ++ .../oracle_qualif/array.0.report.json | 16 ++ .../oracle_qualif/natural.0.report.json | 12 ++ .../oracle_qualif/struct.0.report.json | 49 +++++ .../wp_typed/oracle_qualif/avar.0.report.json | 8 + .../oracle_qualif/shift_lemma.0.report.json | 33 +++ .../struct_array_type.0.report.json | 14 ++ .../oracle_qualif/unit_call.0.report.json | 14 ++ .../oracle_qualif/unit_cast.0.report.json | 14 ++ .../oracle_qualif/unit_cst.0.report.json | 11 + .../oracle_qualif/unit_hard.0.report.json | 26 +++ .../oracle_qualif/unit_ite.0.report.json | 10 + .../oracle_qualif/unit_labels.0.report.json | 26 +++ .../oracle_qualif/unit_matrix.0.report.json | 29 +++ .../oracle_qualif/user_collect.0.report.json | 181 ++++++++++++++++ .../oracle_qualif/user_init.0.report.json | 50 +++++ .../oracle_qualif/user_string.0.report.json | 63 ++++++ 66 files changed, 2479 insertions(+) create mode 100644 src/plugins/wp/tests/wp/oracle_qualif/sharing.0.report.json create mode 100644 src/plugins/wp/tests/wp/oracle_qualif/stmtcompiler_test.0.report.json create mode 100644 src/plugins/wp/tests/wp/oracle_qualif/wp_eqb.0.report.json create mode 100644 src/plugins/wp/tests/wp_acsl/oracle_qualif/assign_array.0.report.json create mode 100644 src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_path.0.report.json create mode 100644 src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise2.0.report.json create mode 100644 src/plugins/wp/tests/wp_acsl/oracle_qualif/ctor.0.report.json create mode 100644 src/plugins/wp/tests/wp_acsl/oracle_qualif/equal.0.report.json create mode 100644 src/plugins/wp/tests/wp_acsl/oracle_qualif/float_compare.0.report.json create mode 100644 src/plugins/wp/tests/wp_acsl/oracle_qualif/implicit_enum_cast.0.report.json create mode 100644 src/plugins/wp/tests/wp_acsl/oracle_qualif/init_label.0.report.json create mode 100644 src/plugins/wp/tests/wp_acsl/oracle_qualif/intbool.0.report.json create mode 100644 src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.0.report.json create mode 100644 src/plugins/wp/tests/wp_acsl/oracle_qualif/null.0.report.json create mode 100644 src/plugins/wp/tests/wp_acsl/oracle_qualif/sizeof.0.report.json create mode 100644 src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bit_test.0.report.json create mode 100644 src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.0.report.json create mode 100644 src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1462.0.report.json create mode 100644 src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1586.0.report.json create mode 100644 src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1588.0.report.json create mode 100644 src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1601.0.report.json create mode 100644 src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2040.0.report.json create mode 100644 src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2159.0.report.json create mode 100644 src/plugins/wp/tests/wp_bts/oracle_qualif/ergo_typecheck.0.report.json create mode 100644 src/plugins/wp/tests/wp_bts/oracle_qualif/issue-364.0.report.json create mode 100644 src/plugins/wp/tests/wp_bts/oracle_qualif/issue_198.0.report.json create mode 100644 src/plugins/wp/tests/wp_bts/oracle_qualif/issue_447.0.report.json create mode 100644 src/plugins/wp/tests/wp_bts/oracle_qualif/issue_453.0.report.json create mode 100644 src/plugins/wp/tests/wp_bts/oracle_qualif/issue_494.0.report.json create mode 100644 src/plugins/wp/tests/wp_bts/oracle_qualif/issue_508.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/asm.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/copy.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/frame.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/ground_real.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/init_valid.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/loopcurrent.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/loopentry.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/loopextra.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/mask.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/overarray.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/overassign.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/params.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/plet.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/polarity.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/repeat.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/subset.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/subset_fopen.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/unsafe-arrays.0.report.json create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/unsupported_init.0.report.json create mode 100644 src/plugins/wp/tests/wp_store/oracle_qualif/array.0.report.json create mode 100644 src/plugins/wp/tests/wp_store/oracle_qualif/natural.0.report.json create mode 100644 src/plugins/wp/tests/wp_store/oracle_qualif/struct.0.report.json create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/avar.0.report.json create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/shift_lemma.0.report.json create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/struct_array_type.0.report.json create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/unit_call.0.report.json create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cast.0.report.json create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cst.0.report.json create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/unit_hard.0.report.json create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/unit_ite.0.report.json create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/unit_labels.0.report.json create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/unit_matrix.0.report.json create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/user_collect.0.report.json create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.0.report.json create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/user_string.0.report.json diff --git a/src/plugins/wp/tests/wp/oracle_qualif/sharing.0.report.json b/src/plugins/wp/tests/wp/oracle_qualif/sharing.0.report.json new file mode 100644 index 00000000000..17a701f571c --- /dev/null +++ b/src/plugins/wp/tests/wp/oracle_qualif/sharing.0.report.json @@ -0,0 +1,14 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 13 }, + "wp:main": { "total": 1, "valid": 1, "rank": 13 } }, + "wp:functions": { "f": { "f_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 13 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 13 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 13 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 13 } } } } } diff --git a/src/plugins/wp/tests/wp/oracle_qualif/stmtcompiler_test.0.report.json b/src/plugins/wp/tests/wp/oracle_qualif/stmtcompiler_test.0.report.json new file mode 100644 index 00000000000..23c6014c8c9 --- /dev/null +++ b/src/plugins/wp/tests/wp/oracle_qualif/stmtcompiler_test.0.report.json @@ -0,0 +1,204 @@ +{ "wp:global": { "alt-ergo": { "total": 9, "valid": 1, "unknown": 8, + "rank": 2 }, + "qed": { "total": 18, "valid": 18 }, + "wp:main": { "total": 27, "valid": 19, "unknown": 8, + "rank": 2 } }, + "wp:functions": { "empty": { "empty_assert": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } }, + "one_assign": { "one_assign_assert": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } }, + "one_if": { "one_if_assert": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } }, + "some_seq": { "some_seq_assert_2": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "some_seq_assert": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } } }, + "main_ensures_result": { "main_ensures_result_assert": + { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } } }, + "main": { "main_assert": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } }, + "not_main": { "not_main_assert_bad": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } } }, + "main_assigns_global": { "main_assigns_global_assert_bad": + { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "main_assigns_global_assert_2": + { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "main_assigns_global_assert": + { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "qed": { "total": 2, + "valid": 2 }, + "wp:main": + { "total": 3, + "valid": 2, + "unknown": 1 } } }, + "zloop": { "zloop_assert_bad": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "zloop_assert_3": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "zloop_assert_2": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "zloop_assert": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "zloop_loop_invariant": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 2, + "valid": 1, + "unknown": 1 } }, + "zloop_ensures": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 3, + "unknown": 3 }, + "qed": { "total": 4, + "valid": 4 }, + "wp:main": { "total": 7, + "valid": 4, + "unknown": 3 } } }, + "behavior2": { "behavior2_assert": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } }, + "behavior3": { "behavior3_assert": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } }, + "behavior4": { "behavior4_assert": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } }, + "behavior5": { "behavior5_assert_bad": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } } }, + "if_assert": { "if_assert_assert_missing_return": + { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "if_assert_assert_3": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "if_assert_assert_2": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "if_assert_assert": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 2 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 2 } }, + "wp:section": { "alt-ergo": { "total": 3, + "valid": 1, + "unknown": 2, + "rank": 2 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 4, + "valid": 2, + "unknown": 2, + "rank": 2 } } }, + "compare": { "compare_assert": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } } } } diff --git a/src/plugins/wp/tests/wp/oracle_qualif/wp_eqb.0.report.json b/src/plugins/wp/tests/wp/oracle_qualif/wp_eqb.0.report.json new file mode 100644 index 00000000000..37b6284cd83 --- /dev/null +++ b/src/plugins/wp/tests/wp/oracle_qualif/wp_eqb.0.report.json @@ -0,0 +1,14 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 10 }, + "wp:main": { "total": 1, "valid": 1, "rank": 10 } }, + "wp:functions": { "f": { "f_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 10 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 10 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 10 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 10 } } } } } diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/assign_array.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/assign_array.0.report.json new file mode 100644 index 00000000000..c9b4abc0b34 --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/assign_array.0.report.json @@ -0,0 +1,18 @@ +{ "wp:global": { "qed": { "total": 4, "valid": 4 }, + "wp:main": { "total": 4, "valid": 4 } }, + "wp:functions": { "jobA": { "jobA_assigns": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "wp:section": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } } }, + "jobG": { "jobG_assigns": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "wp:section": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } } } } } diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_path.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_path.0.report.json new file mode 100644 index 00000000000..a3e18b8a1f1 --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_path.0.report.json @@ -0,0 +1,45 @@ +{ "wp:global": { "alt-ergo": { "total": 3, "valid": 3, "rank": 6 }, + "qed": { "total": 6, "valid": 6 }, + "wp:main": { "total": 9, "valid": 9, "rank": 6 } }, + "wp:functions": { "job": { "job_loop_invariant_2": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 6 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 2, + "valid": 2, + "rank": 6 } }, + "job_loop_invariant": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 4 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 2, + "valid": 2, + "rank": 4 } }, + "job_assigns": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "job_loop_assigns": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "job_ensures_A": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 5 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 5 } }, + "job_ensures_N": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 3, + "valid": 3, + "rank": 6 }, + "qed": { "total": 6, + "valid": 6 }, + "wp:main": { "total": 9, + "valid": 9, + "rank": 6 } } } } } diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise2.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise2.0.report.json new file mode 100644 index 00000000000..80f37475140 --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise2.0.report.json @@ -0,0 +1,42 @@ +{ "wp:global": { "qed": { "total": 5, "valid": 5 }, + "wp:main": { "total": 5, "valid": 5 } }, + "wp:functions": { "job1": { "job1_ensures": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } }, + "job1bis": { "job1bis_ensures": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } }, + "job2": { "job2_ensures": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } }, + "job3": { "job3_ensures": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } }, + "job4": { "job4_ensures": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/ctor.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/ctor.0.report.json new file mode 100644 index 00000000000..891942e3737 --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/ctor.0.report.json @@ -0,0 +1,14 @@ +{ "wp:global": { "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 2, "valid": 2 } }, + "wp:axiomatics": { "Event": { "lemma_diff": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "lemma_cons": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } } } } } diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/equal.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/equal.0.report.json new file mode 100644 index 00000000000..5c43681476a --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/equal.0.report.json @@ -0,0 +1,86 @@ +{ "wp:global": { "alt-ergo": { "total": 5, "valid": 5, "rank": 8 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 6, "valid": 6, "rank": 8 } }, + "wp:functions": { "simple_struct": { "simple_struct_ensures": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } }, + "simple_array": { "simple_array_ensures": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 4 }, + "wp:main": + { "total": 1, + "valid": 1, + "rank": 4 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 4 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 4 } } }, + "with_array_struct": { "with_array_struct_ensures": + { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 4 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 4 } }, + "wp:section": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 4 }, + "wp:main": + { "total": 1, + "valid": 1, + "rank": 4 } } }, + "with_ptr_struct": { "with_ptr_struct_ensures": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 2 }, + "wp:main": + { "total": 1, + "valid": 1, + "rank": 2 } }, + "wp:section": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 2 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 2 } } }, + "with_ptr_array": { "with_ptr_array_ensures": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 4 }, + "wp:main": + { "total": 1, + "valid": 1, + "rank": 4 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 4 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 4 } } }, + "with_ptr_and_array_struct": { "with_ptr_and_array_struct_ensures": + { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 8 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 8 } }, + "wp:section": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 8 }, + "wp:main": + { "total": 1, + "valid": 1, + "rank": 8 } } } } } diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/float_compare.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/float_compare.0.report.json new file mode 100644 index 00000000000..8ab9ce87bfc --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/float_compare.0.report.json @@ -0,0 +1,39 @@ +{ "wp:global": { "alt-ergo": { "total": 4, "valid": 4, "rank": 8 }, + "wp:main": { "total": 4, "valid": 4, "rank": 8 } }, + "wp:axiomatics": { "": { "lemma_test_float_compare_greater": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 8 }, + "wp:main": + { "total": 1, + "valid": 1, + "rank": 8 } }, + "lemma_test_float_compare": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 8 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 8 } }, + "lemma_test_double_compare_greater": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 8 }, + "wp:main": + { "total": 1, + "valid": 1, + "rank": 8 } }, + "lemma_test_double_compare": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 8 }, + "wp:main": + { "total": 1, + "valid": 1, + "rank": 8 } }, + "wp:section": { "alt-ergo": { "total": 4, + "valid": 4, + "rank": 8 }, + "wp:main": { "total": 4, + "valid": 4, + "rank": 8 } } } } } diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/implicit_enum_cast.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/implicit_enum_cast.0.report.json new file mode 100644 index 00000000000..ed396bf7e29 --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/implicit_enum_cast.0.report.json @@ -0,0 +1,14 @@ +{ "wp:global": { "qed": { "total": 9, "valid": 9 }, + "wp:main": { "total": 9, "valid": 9 } }, + "wp:functions": { "bar": { "bar_assigns": { "qed": { "total": 8, + "valid": 8 }, + "wp:main": { "total": 8, + "valid": 8 } }, + "bar_ensures": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 9, + "valid": 9 }, + "wp:main": { "total": 9, + "valid": 9 } } } } } diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_label.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_label.0.report.json new file mode 100644 index 00000000000..3d33c8c50aa --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_label.0.report.json @@ -0,0 +1,41 @@ +{ "wp:global": { "alt-ergo": { "total": 2, "valid": 1, "unknown": 1, + "rank": 5 }, + "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 4, "valid": 3, "unknown": 1, + "rank": 5 } }, + "wp:functions": { "main": { "main_requires_OK": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } }, + "job": { "job_ensures_OK": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 5 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 5 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 5 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 5 } } }, + "foreign": { "foreign_ensures_OK": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } }, + "extra": { "extra_ensures_KO": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/intbool.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/intbool.0.report.json new file mode 100644 index 00000000000..4ed4a7c4e63 --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/intbool.0.report.json @@ -0,0 +1,10 @@ +{ "wp:global": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, "valid": 1 } }, + "wp:functions": { "bug": { "bug_ensures": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.0.report.json new file mode 100644 index 00000000000..badcee8deb0 --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.0.report.json @@ -0,0 +1,138 @@ +{ "wp:global": { "alt-ergo": { "total": 18, "valid": 2, "unknown": 16, + "rank": 16 }, + "qed": { "total": 3, "valid": 3 }, + "wp:main": { "total": 21, "valid": 5, "unknown": 16, + "rank": 16 } }, + "wp:functions": { "h": { "h_assigns": { "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "h_ensures": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 3, + "valid": 2, + "unknown": 1 } } }, + "main": { "main_requires_qed_ok_18": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "main_requires_qed_ok_17": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "main_requires_qed_ok_16": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "main_requires_qed_ok_15": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "main_requires_qed_ok_14": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "main_requires_qed_ok_13": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "main_requires_qed_ok_12": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "main_requires_qed_ok_11": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "main_requires_qed_ok_10": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "main_requires_qed_ok_9": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "main_requires_qed_ok_8": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "main_requires_qed_ok_7": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "main_requires_qed_ok_6": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "main_requires_qed_ok_5": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "main_requires_qed_ok_4": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "main_requires_qed_ok_3": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 16 }, + "wp:main": + { "total": 1, + "valid": 1, + "rank": 16 } }, + "main_requires_qed_ok_2": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 16 }, + "wp:main": + { "total": 1, + "valid": 1, + "rank": 16 } }, + "main_requires_qed_ok": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 17, + "valid": 2, + "unknown": 15, + "rank": 16 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 18, + "valid": 3, + "unknown": 15, + "rank": 16 } } } } } diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/null.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/null.0.report.json new file mode 100644 index 00000000000..79fbcb44621 --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/null.0.report.json @@ -0,0 +1,33 @@ +{ "wp:global": { "alt-ergo": { "total": 2, "valid": 2, "rank": 1 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 3, "valid": 3, "rank": 1 } }, + "wp:axiomatics": { "": { "lemma_valid_read_non_null": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 1 }, + "wp:main": + { "total": 1, + "valid": 1, + "rank": 1 } }, + "lemma_valid_non_null": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 1 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 1 } }, + "wp:section": { "alt-ergo": { "total": 2, + "valid": 2, + "rank": 1 }, + "wp:main": { "total": 2, + "valid": 2, + "rank": 1 } } } }, + "wp:functions": { "null_is_zero": { "null_is_zero_ensures": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/sizeof.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/sizeof.0.report.json new file mode 100644 index 00000000000..bd9ed2f8299 --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/sizeof.0.report.json @@ -0,0 +1,20 @@ +{ "wp:global": { "alt-ergo": { "total": 2, "valid": 2, "rank": 1 }, + "wp:main": { "total": 2, "valid": 2, "rank": 1 } }, + "wp:functions": { "foo": { "foo_assert_B": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 1 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 1 } }, + "foo_assert_A": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 1 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 1 } }, + "wp:section": { "alt-ergo": { "total": 2, + "valid": 2, + "rank": 1 }, + "wp:main": { "total": 2, + "valid": 2, + "rank": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bit_test.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bit_test.0.report.json new file mode 100644 index 00000000000..6c8cdc3f855 --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bit_test.0.report.json @@ -0,0 +1,38 @@ +{ "wp:global": { "alt-ergo": { "total": 2, "valid": 1, "unknown": 1, + "rank": 13 }, + "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 4, "valid": 3, "unknown": 1, + "rank": 13 } }, + "wp:functions": { "sum": { "sum_ensures_ko": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "sum_ensures_ok": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 2, + "valid": 1, + "unknown": 1 } } }, + "rotate_left": { "rotate_left_ensures_other_bits": + { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 13 }, + "wp:main": { "total": 1, "valid": 1, + "rank": 13 } }, + "rotate_left_ensures_bit_zero": + { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 13 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 2, + "valid": 2, + "rank": 13 } } } } } diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.0.report.json new file mode 100644 index 00000000000..cce14a76fc5 --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.0.report.json @@ -0,0 +1,14 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 1 }, + "wp:main": { "total": 1, "valid": 1, "rank": 1 } }, + "wp:axiomatics": { "Foo": { "lemma_f_1": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 1 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 1 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1462.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1462.0.report.json new file mode 100644 index 00000000000..0719103e8bc --- /dev/null +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1462.0.report.json @@ -0,0 +1,64 @@ +{ "wp:global": { "alt-ergo": { "total": 3, "valid": 2, "unknown": 1, + "rank": 2 }, + "qed": { "total": 10, "valid": 10 }, + "wp:main": { "total": 13, "valid": 12, "unknown": 1, + "rank": 2 } }, + "wp:functions": { "wrong": { "wrong_assert_consequence_of_false_invariant": + { "alt-ergo": { "total": 1, "valid": 1, + "rank": 2 }, + "wp:main": { "total": 1, "valid": 1, + "rank": 2 } }, + "wrong_loop_invariant_C": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": + { "total": 2, + "valid": 2 } }, + "wrong_loop_invariant_B": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": + { "total": 2, + "valid": 2 } }, + "wrong_loop_invariant_A_KO": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 1, + "unknown": 1 } }, + "wrong_assert_for_value": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 1 }, + "wp:main": + { "total": 1, + "valid": 1, + "rank": 1 } }, + "wrong_loop_assigns": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 3, + "valid": 2, + "unknown": 1, + "rank": 2 }, + "qed": { "total": 6, + "valid": 6 }, + "wp:main": { "total": 9, + "valid": 8, + "unknown": 1, + "rank": 2 } } }, + "local": { "local_loop_invariant": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "local_loop_assigns": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "wp:section": { "qed": { "total": 4, + "valid": 4 }, + "wp:main": { "total": 4, + "valid": 4 } } } } } diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1586.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1586.0.report.json new file mode 100644 index 00000000000..c8f7254db67 --- /dev/null +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1586.0.report.json @@ -0,0 +1,39 @@ +{ "wp:global": { "alt-ergo": { "total": 2, "unknown": 2 }, + "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 4, "valid": 2, "unknown": 2 } }, + "wp:functions": { "compute_bizarre": { "compute_bizarre_Bizarre_ensures_TRANS": + { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } }, + "compute_normal": { "compute_normal_Normal_ensures_TRANS": + { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } }, + "main_bizarre_KO": { "main_bizarre_KO_assert_FALSE": + { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } } }, + "main_normal_KO": { "main_normal_KO_assert_FALSE": + { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1588.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1588.0.report.json new file mode 100644 index 00000000000..20f18a7e95a --- /dev/null +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1588.0.report.json @@ -0,0 +1,12 @@ +{ "wp:global": { "qed": { "total": 3, "valid": 3 }, + "wp:main": { "total": 3, "valid": 3 } }, + "wp:functions": { "f": { "f_assert_a1": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_loop_invariant_l1_2": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "wp:section": { "qed": { "total": 3, "valid": 3 }, + "wp:main": { "total": 3, + "valid": 3 } } } } } diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1601.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1601.0.report.json new file mode 100644 index 00000000000..406e1c61d89 --- /dev/null +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1601.0.report.json @@ -0,0 +1,45 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 5 }, + "qed": { "total": 7, "valid": 7 }, + "wp:main": { "total": 8, "valid": 8, "rank": 5 } }, + "wp:functions": { "foo": { "foo_assert_7": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "foo_assert_6": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "foo_assert_5": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "foo_assert_4": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "foo_assert_3": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "foo_assert_2": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "foo_assert": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 5 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 5 } }, + "foo_basic_ensures": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 5 }, + "qed": { "total": 7, + "valid": 7 }, + "wp:main": { "total": 8, + "valid": 8, + "rank": 5 } } } } } diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2040.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2040.0.report.json new file mode 100644 index 00000000000..576a872d9da --- /dev/null +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2040.0.report.json @@ -0,0 +1,10 @@ +{ "wp:global": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, "valid": 1 } }, + "wp:functions": { "call": { "call_assert": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2159.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2159.0.report.json new file mode 100644 index 00000000000..d88f27e56ce --- /dev/null +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2159.0.report.json @@ -0,0 +1,14 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 16 }, + "wp:main": { "total": 1, "valid": 1, "rank": 16 } }, + "wp:functions": { "job": { "job_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 16 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 16 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 16 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 16 } } } } } diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/ergo_typecheck.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/ergo_typecheck.0.report.json new file mode 100644 index 00000000000..414c3cf94d8 --- /dev/null +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/ergo_typecheck.0.report.json @@ -0,0 +1,36 @@ +{ "wp:global": { "qed": { "total": 8, "valid": 8 }, + "wp:main": { "total": 8, "valid": 8 } }, + "wp:functions": { "f": { "f_assigns": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_ensures_var_unit4": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_ensures_var_unit3": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_ensures_var_unit2": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_ensures_var_unit1": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_ensures_var_unit0": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_ensures_var_inline": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_ensures_var_divded": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 8, "valid": 8 }, + "wp:main": { "total": 8, + "valid": 8 } } } } } diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue-364.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue-364.0.report.json new file mode 100644 index 00000000000..cd95b6d3b70 --- /dev/null +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue-364.0.report.json @@ -0,0 +1,20 @@ +{ "wp:global": { "alt-ergo": { "total": 2, "valid": 2, "rank": 8 }, + "wp:main": { "total": 2, "valid": 2, "rank": 8 } }, + "wp:functions": { "main": { "main_assert_OVER": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 8 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 8 } }, + "main_assert_ZERO": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 6 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 6 } }, + "wp:section": { "alt-ergo": { "total": 2, + "valid": 2, + "rank": 8 }, + "wp:main": { "total": 2, + "valid": 2, + "rank": 8 } } } } } diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_198.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_198.0.report.json new file mode 100644 index 00000000000..8add84a6b5d --- /dev/null +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_198.0.report.json @@ -0,0 +1,14 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 2 }, + "wp:main": { "total": 1, "valid": 1, "rank": 2 } }, + "wp:axiomatics": { "": { "lemma_broken": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 2 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 2 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 2 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 2 } } } } } diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_447.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_447.0.report.json new file mode 100644 index 00000000000..f93f1005578 --- /dev/null +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_447.0.report.json @@ -0,0 +1,14 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 1 }, + "wp:main": { "total": 1, "valid": 1, "rank": 1 } }, + "wp:axiomatics": { "": { "lemma_foo": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 1 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 1 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_453.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_453.0.report.json new file mode 100644 index 00000000000..6deccb7f511 --- /dev/null +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_453.0.report.json @@ -0,0 +1,30 @@ +{ "wp:global": { "qed": { "total": 6, "valid": 6 }, + "wp:main": { "total": 6, "valid": 6 } }, + "wp:functions": { "f1": { "f1_assigns": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f1_loop_assigns": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f1_ensures_Sincr": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 3, "valid": 3 }, + "wp:main": { "total": 3, + "valid": 3 } } }, + "f2": { "f2_assigns": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f2_loop_assigns": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f2_ensures_Sincr": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 3, "valid": 3 }, + "wp:main": { "total": 3, + "valid": 3 } } } } } diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_494.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_494.0.report.json new file mode 100644 index 00000000000..d2c13e606a0 --- /dev/null +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_494.0.report.json @@ -0,0 +1,35 @@ +{ "wp:global": { "alt-ergo": { "total": 3, "valid": 1, "unknown": 2, + "rank": 3 }, + "wp:main": { "total": 3, "valid": 1, "unknown": 2, + "rank": 3 } }, + "wp:functions": { "f": { "f_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 3 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 3 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 3 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 3 } } }, + "job_ko_fixed": { "job_ko_fixed_assert_Wrong": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } } }, + "job_ko_success": { "job_ko_success_assert_Wrong": + { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_508.0.report.json b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_508.0.report.json new file mode 100644 index 00000000000..3c5b3035ee9 --- /dev/null +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_508.0.report.json @@ -0,0 +1,19 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 15 }, + "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 3, "valid": 3, "rank": 15 } }, + "wp:functions": { "add": { "add_assigns": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 15 }, + "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 3, + "valid": 3, + "rank": 15 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 15 }, + "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 3, + "valid": 3, + "rank": 15 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/asm.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/asm.0.report.json new file mode 100644 index 00000000000..f12a169da4e --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/asm.0.report.json @@ -0,0 +1,22 @@ +{ "wp:global": { "alt-ergo": { "total": 2, "unknown": 2 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 3, "valid": 1, "unknown": 2 } }, + "wp:functions": { "main": { "main_assert_KO": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "main_assert_OK": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "main_assigns": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 2, + "unknown": 2 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 3, + "valid": 1, + "unknown": 2 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/copy.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/copy.0.report.json new file mode 100644 index 00000000000..e77f053555a --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/copy.0.report.json @@ -0,0 +1,61 @@ +{ "wp:global": { "alt-ergo": { "total": 6, "valid": 6, "rank": 39 }, + "qed": { "total": 4, "valid": 4 }, + "wp:main": { "total": 10, "valid": 10, "rank": 39 } }, + "wp:functions": { "copy": { "copy_assert_B": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 39 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 39 } }, + "copy_assert_A": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 32 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 32 } }, + "copy_loop_invariant_Copy": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 8 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 8 } }, + "copy_loop_invariant_Range": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 5 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 5 } }, + "copy_assigns": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "copy_loop_assigns": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 23 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 2, + "valid": 2, + "rank": 23 } }, + "copy_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 6 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 6 } }, + "wp:section": { "alt-ergo": { "total": 6, + "valid": 6, + "rank": 39 }, + "qed": { "total": 4, + "valid": 4 }, + "wp:main": { "total": 10, + "valid": 10, + "rank": 39 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/frame.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/frame.0.report.json new file mode 100644 index 00000000000..993d6f80087 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/frame.0.report.json @@ -0,0 +1,53 @@ +{ "wp:global": { "alt-ergo": { "total": 4, "unknown": 4 }, + "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 6, "valid": 2, "unknown": 4 } }, + "wp:functions": { "local": { "local_ensures_KO": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "local_ensures_FRAMED": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 2, + "valid": 1, + "unknown": 1 } } }, + "global": { "global_ensures_KO": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } } }, + "localref": { "localref_assert_FRAMED": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "localref_ensures_KO": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 2, + "valid": 1, + "unknown": 1 } } }, + "alias": { "alias_ensures_KO": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/ground_real.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/ground_real.0.report.json new file mode 100644 index 00000000000..9a8167e262c --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/ground_real.0.report.json @@ -0,0 +1,12 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 0 }, + "wp:main": { "total": 1, "valid": 1, "rank": 0 } }, + "wp:axiomatics": { "": { "lemma_R": { "alt-ergo": { "total": 1, "valid": 1, + "rank": 0 }, + "wp:main": { "total": 1, "valid": 1, + "rank": 0 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 0 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 0 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_valid.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_valid.0.report.json new file mode 100644 index 00000000000..a0b3ada7192 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_valid.0.report.json @@ -0,0 +1,30 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "unknown": 1 }, + "qed": { "total": 3, "valid": 3 }, + "wp:main": { "total": 4, "valid": 3, "unknown": 1 } }, + "wp:functions": { "validA": { "validA_assert_OK_2": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "validA_assert_OK": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } } }, + "validB": { "validB_assert_KO": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "validB_assert_OK": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 2, + "valid": 1, + "unknown": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopcurrent.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopcurrent.0.report.json new file mode 100644 index 00000000000..a4b1808ed99 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopcurrent.0.report.json @@ -0,0 +1,13 @@ +{ "wp:global": { "qed": { "total": 4, "valid": 4 }, + "wp:main": { "total": 4, "valid": 4 } }, + "wp:functions": { "f": { "f_loop_invariant_2": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "f_loop_invariant": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "wp:section": { "qed": { "total": 4, "valid": 4 }, + "wp:main": { "total": 4, + "valid": 4 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopentry.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopentry.0.report.json new file mode 100644 index 00000000000..a4b1808ed99 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopentry.0.report.json @@ -0,0 +1,13 @@ +{ "wp:global": { "qed": { "total": 4, "valid": 4 }, + "wp:main": { "total": 4, "valid": 4 } }, + "wp:functions": { "f": { "f_loop_invariant_2": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "f_loop_invariant": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "wp:section": { "qed": { "total": 4, "valid": 4 }, + "wp:main": { "total": 4, + "valid": 4 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopextra.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopextra.0.report.json new file mode 100644 index 00000000000..371ffd8abf6 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopextra.0.report.json @@ -0,0 +1,14 @@ +{ "wp:global": { "qed": { "total": 3, "valid": 3 }, + "wp:main": { "total": 3, "valid": 3 } }, + "wp:functions": { "f": { "f_assert_3": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_assert_2": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_assert": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 3, "valid": 3 }, + "wp:main": { "total": 3, + "valid": 3 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/mask.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/mask.0.report.json new file mode 100644 index 00000000000..b6fbb01b2b7 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/mask.0.report.json @@ -0,0 +1,14 @@ +{ "wp:global": { "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 2, "valid": 2 } }, + "wp:functions": { "compute": { "compute_ensures_B": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "compute_ensures_A": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/overarray.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/overarray.0.report.json new file mode 100644 index 00000000000..dbda73ffedd --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/overarray.0.report.json @@ -0,0 +1,51 @@ +{ "wp:global": { "alt-ergo": { "total": 4, "unknown": 4 }, + "qed": { "total": 8, "valid": 8 }, + "wp:main": { "total": 12, "valid": 8, "unknown": 4 } }, + "wp:functions": { "f1_ok": { "f1_ok_assigns": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "wp:section": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } } }, + "f2_ok": { "f2_ok_assigns": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "wp:section": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } } }, + "f3_ok": { "f3_ok_assigns": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "wp:section": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } } }, + "f4_ok": { "f4_ok_assigns": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "wp:section": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } } }, + "f5_ko": { "f5_ko_assigns": { "alt-ergo": { "total": 2, + "unknown": 2 }, + "wp:main": { "total": 2, + "unknown": 2 } }, + "wp:section": { "alt-ergo": { "total": 2, + "unknown": 2 }, + "wp:main": { "total": 2, + "unknown": 2 } } }, + "f6_ko": { "f6_ko_assigns": { "alt-ergo": { "total": 2, + "unknown": 2 }, + "wp:main": { "total": 2, + "unknown": 2 } }, + "wp:section": { "alt-ergo": { "total": 2, + "unknown": 2 }, + "wp:main": { "total": 2, + "unknown": 2 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/overassign.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/overassign.0.report.json new file mode 100644 index 00000000000..71511e374d5 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/overassign.0.report.json @@ -0,0 +1,61 @@ +{ "wp:global": { "alt-ergo": { "total": 8, "valid": 4, "unknown": 4, + "rank": 6 }, + "qed": { "total": 4, "valid": 4 }, + "wp:main": { "total": 12, "valid": 8, "unknown": 4, + "rank": 6 } }, + "wp:functions": { "f1_ok": { "f1_ok_assigns": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "wp:section": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } } }, + "f2_ok": { "f2_ok_assigns": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "wp:section": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } } }, + "f3_ok": { "f3_ok_assigns": { "alt-ergo": { "total": 2, + "valid": 2, + "rank": 6 }, + "wp:main": { "total": 2, + "valid": 2, + "rank": 6 } }, + "wp:section": { "alt-ergo": { "total": 2, + "valid": 2, + "rank": 6 }, + "wp:main": { "total": 2, + "valid": 2, + "rank": 6 } } }, + "f4_ok": { "f4_ok_assigns": { "alt-ergo": { "total": 2, + "valid": 2, + "rank": 5 }, + "wp:main": { "total": 2, + "valid": 2, + "rank": 5 } }, + "wp:section": { "alt-ergo": { "total": 2, + "valid": 2, + "rank": 5 }, + "wp:main": { "total": 2, + "valid": 2, + "rank": 5 } } }, + "f5_ko": { "f5_ko_assigns": { "alt-ergo": { "total": 2, + "unknown": 2 }, + "wp:main": { "total": 2, + "unknown": 2 } }, + "wp:section": { "alt-ergo": { "total": 2, + "unknown": 2 }, + "wp:main": { "total": 2, + "unknown": 2 } } }, + "f6_ko": { "f6_ko_assigns": { "alt-ergo": { "total": 2, + "unknown": 2 }, + "wp:main": { "total": 2, + "unknown": 2 } }, + "wp:section": { "alt-ergo": { "total": 2, + "unknown": 2 }, + "wp:main": { "total": 2, + "unknown": 2 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/params.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/params.0.report.json new file mode 100644 index 00000000000..3b66b225e19 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/params.0.report.json @@ -0,0 +1,14 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 1 }, + "wp:main": { "total": 1, "valid": 1, "rank": 1 } }, + "wp:axiomatics": { "": { "lemma_lem": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 1 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 1 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/plet.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/plet.0.report.json new file mode 100644 index 00000000000..91af25677a2 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/plet.0.report.json @@ -0,0 +1,14 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 3 }, + "wp:main": { "total": 1, "valid": 1, "rank": 3 } }, + "wp:axiomatics": { "Test": { "lemma_GOAL": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 3 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 3 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 3 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 3 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/polarity.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/polarity.0.report.json new file mode 100644 index 00000000000..77c7cca1040 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/polarity.0.report.json @@ -0,0 +1,10 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "unknown": 1 }, + "wp:main": { "total": 1, "unknown": 1 } }, + "wp:functions": { "f": { "f_assert": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/repeat.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/repeat.0.report.json new file mode 100644 index 00000000000..96cd0a3fb5d --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/repeat.0.report.json @@ -0,0 +1,122 @@ +{ "wp:global": { "alt-ergo": { "total": 5, "valid": 5, "rank": 12 }, + "qed": { "total": 42, "valid": 42 }, + "wp:main": { "total": 47, "valid": 47, "rank": 12 } }, + "wp:functions": { "master": { "master_assigns": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "master_ensures": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 3, + "valid": 3 }, + "wp:main": { "total": 3, + "valid": 3 } } }, + "unroll": { "unroll_loop_invariant": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": + { "total": 2, + "valid": 2 } }, + "unroll_assigns": { "qed": { "total": 22, + "valid": 22 }, + "wp:main": { "total": 22, + "valid": 22 } }, + "unroll_ensures": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 25, + "valid": 25 }, + "wp:main": { "total": 25, + "valid": 25 } } }, + "induction": { "induction_loop_invariant_2": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 12 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 12 } }, + "induction_loop_invariant": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 5 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 5 } }, + "induction_assigns": { "qed": { "total": 3, + "valid": 3 }, + "wp:main": + { "total": 3, + "valid": 3 } }, + "induction_loop_assigns": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "induction_ensures": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 2, + "valid": 2, + "rank": 12 }, + "qed": { "total": 7, + "valid": 7 }, + "wp:main": { "total": 9, + "valid": 9, + "rank": 12 } } }, + "shifted": { "shifted_loop_invariant_2": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 12 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 12 } }, + "shifted_loop_invariant": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 5 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 5 } }, + "shifted_assigns": { "qed": { "total": 4, + "valid": 4 }, + "wp:main": { "total": 4, + "valid": 4 } }, + "shifted_loop_assigns": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "shifted_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 11 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 11 } }, + "wp:section": { "alt-ergo": { "total": 3, + "valid": 3, + "rank": 12 }, + "qed": { "total": 7, + "valid": 7 }, + "wp:main": { "total": 10, + "valid": 10, + "rank": 12 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json new file mode 100644 index 00000000000..910cff1aa78 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json @@ -0,0 +1,193 @@ +{ "wp:global": { "alt-ergo": { "total": 21, "valid": 21, "rank": 81 }, + "qed": { "total": 23, "valid": 23 }, + "wp:main": { "total": 44, "valid": 44, "rank": 81 } }, + "wp:functions": { "memcpy": { "memcpy_loop_invariant_no_eva_2": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 62 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 62 } }, + "memcpy_loop_invariant_no_eva": { "alt-ergo": + { "total": 2, + "valid": 2, + "rank": 16 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 16 } }, + "memcpy_loop_variant": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 16 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 2, + "valid": 2, + "rank": 16 } }, + "memcpy_assigns": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "memcpy_loop_assigns": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 40 }, + "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 3, + "valid": 3, + "rank": 40 } }, + "memcpy_ensures_result_ptr": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "memcpy_ensures_copied_contents": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 48 }, + "wp:main": + { "total": 1, + "valid": 1, + "rank": 48 } }, + "wp:section": { "alt-ergo": { "total": 6, + "valid": 6, + "rank": 62 }, + "qed": { "total": 6, + "valid": 6 }, + "wp:main": { "total": 12, + "valid": 12, + "rank": 62 } } }, + "memmove": { "memmove_loop_invariant_no_eva_6": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 54 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 54 } }, + "memmove_loop_invariant_no_eva_5": { "alt-ergo": + { "total": 2, + "valid": 2, + "rank": 39 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 39 } }, + "memmove_loop_invariant_no_eva_4": { "alt-ergo": + { "total": 2, + "valid": 2, + "rank": 18 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 18 } }, + "memmove_loop_invariant_no_eva_3": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 81 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 81 } }, + "memmove_loop_invariant_no_eva_2": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 38 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 38 } }, + "memmove_loop_invariant_no_eva": { "alt-ergo": + { "total": 2, + "valid": 2, + "rank": 18 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 18 } }, + "memmove_loop_variant_2": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 18 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 18 } }, + "memmove_loop_variant": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 18 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 18 } }, + "memmove_assigns": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 6 }, + "qed": { "total": 7, + "valid": 7 }, + "wp:main": { "total": 8, + "valid": 8, + "rank": 6 } }, + "memmove_loop_assigns_2": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 48 }, + "qed": { "total": 2, + "valid": 2 }, + "wp:main": + { "total": 3, + "valid": 3, + "rank": 48 } }, + "memmove_loop_assigns": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 57 }, + "qed": { "total": 2, + "valid": 2 }, + "wp:main": + { "total": 3, + "valid": 3, + "rank": 57 } }, + "memmove_ensures_result_ptr": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "memmove_ensures_copied_contents": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 63 }, + "wp:main": + { "total": 1, + "valid": 1, + "rank": 63 } }, + "wp:section": { "alt-ergo": { "total": 15, + "valid": 15, + "rank": 81 }, + "qed": { "total": 17, + "valid": 17 }, + "wp:main": { "total": 32, + "valid": 32, + "rank": 81 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/subset.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/subset.0.report.json new file mode 100644 index 00000000000..72d2a74fbb8 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/subset.0.report.json @@ -0,0 +1,14 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 24 }, + "wp:main": { "total": 1, "valid": 1, "rank": 24 } }, + "wp:functions": { "mem": { "mem_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 24 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 24 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 24 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 24 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/subset_fopen.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/subset_fopen.0.report.json new file mode 100644 index 00000000000..1902a622817 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/subset_fopen.0.report.json @@ -0,0 +1,36 @@ +{ "wp:global": { "alt-ergo": { "total": 2, "valid": 1, "unknown": 1, + "rank": 20 }, + "qed": { "total": 3, "valid": 3 }, + "wp:main": { "total": 5, "valid": 4, "unknown": 1, + "rank": 20 } }, + "wp:functions": { "f": { "f_assert_Ok_E": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 20 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 20 } }, + "f_assert_Ok_D": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_assert_Ok_C": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_assert_Ok_B": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_assert_Ok_A": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 2, + "valid": 1, + "unknown": 1, + "rank": 20 }, + "qed": { "total": 3, "valid": 3 }, + "wp:main": { "total": 5, + "valid": 4, + "unknown": 1, + "rank": 20 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsafe-arrays.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsafe-arrays.0.report.json new file mode 100644 index 00000000000..b967bd53ad6 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsafe-arrays.0.report.json @@ -0,0 +1,24 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 5 }, + "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 3, "valid": 3, "rank": 5 } }, + "wp:functions": { "f": { "f_ensures_INDIRP": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 5 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 5 } }, + "f_ensures_STRUCT": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_ensures_ARRAYS": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 5 }, + "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 3, + "valid": 3, + "rank": 5 } } } } } diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsupported_init.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsupported_init.0.report.json new file mode 100644 index 00000000000..8d566a55f49 --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsupported_init.0.report.json @@ -0,0 +1,16 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "unknown": 1 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 2, "valid": 1, "unknown": 1 } }, + "wp:functions": { "f": { "cp_requires_r1": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "f_assert_a1": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 2, + "valid": 1, + "unknown": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_store/oracle_qualif/array.0.report.json b/src/plugins/wp/tests/wp_store/oracle_qualif/array.0.report.json new file mode 100644 index 00000000000..c86162e95a5 --- /dev/null +++ b/src/plugins/wp/tests/wp_store/oracle_qualif/array.0.report.json @@ -0,0 +1,16 @@ +{ "wp:global": { "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 2, "valid": 2 } }, + "wp:functions": { "g": { "g_ensures_P_addr_shift_qed_ok": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "g_ensures_P_startof_qed_ok": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } } } } } diff --git a/src/plugins/wp/tests/wp_store/oracle_qualif/natural.0.report.json b/src/plugins/wp/tests/wp_store/oracle_qualif/natural.0.report.json new file mode 100644 index 00000000000..c8fc7843294 --- /dev/null +++ b/src/plugins/wp/tests/wp_store/oracle_qualif/natural.0.report.json @@ -0,0 +1,12 @@ +{ "wp:global": { "qed": { "total": 3, "valid": 3 }, + "wp:main": { "total": 3, "valid": 3 } }, + "wp:functions": { "f": { "f_assigns": { "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "f_ensures_qed_ok": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 3, "valid": 3 }, + "wp:main": { "total": 3, + "valid": 3 } } } } } diff --git a/src/plugins/wp/tests/wp_store/oracle_qualif/struct.0.report.json b/src/plugins/wp/tests/wp_store/oracle_qualif/struct.0.report.json new file mode 100644 index 00000000000..aa80bc9b418 --- /dev/null +++ b/src/plugins/wp/tests/wp_store/oracle_qualif/struct.0.report.json @@ -0,0 +1,49 @@ +{ "wp:global": { "alt-ergo": { "total": 3, "valid": 3, "rank": 10 }, + "qed": { "total": 3, "valid": 3 }, + "wp:main": { "total": 6, "valid": 6, "rank": 10 } }, + "wp:functions": { "g": { "g_assigns": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "g_ensures": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } } }, + "f": { "g_requires": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 5 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 5 } }, + "f_assert_qed_ok": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 5 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 2, + "valid": 2, + "rank": 5 } } }, + "main": { "main_ensures_Q_qed_ok": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 10 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 10 } }, + "main_ensures_P_qed_ok": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 10 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 10 } }, + "wp:section": { "alt-ergo": { "total": 2, + "valid": 2, + "rank": 10 }, + "wp:main": { "total": 2, + "valid": 2, + "rank": 10 } } } } } diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/avar.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/avar.0.report.json new file mode 100644 index 00000000000..4497f6d5e8d --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/avar.0.report.json @@ -0,0 +1,8 @@ +{ "wp:global": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, "valid": 1 } }, + "wp:functions": { "g": { "f_requires": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/shift_lemma.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/shift_lemma.0.report.json new file mode 100644 index 00000000000..57fb10b1504 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/shift_lemma.0.report.json @@ -0,0 +1,33 @@ +{ "wp:global": { "alt-ergo": { "total": 3, "valid": 3, "rank": 6 }, + "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 5, "valid": 5, "rank": 6 } }, + "wp:functions": { "f": { "f_assert_5": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 3 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 3 } }, + "f_assert_4": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_assert_3": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_assert_2": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 6 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 6 } }, + "f_assert": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 4 }, + "wp:main": { "total": 1, "valid": 1, + "rank": 4 } }, + "wp:section": { "alt-ergo": { "total": 3, + "valid": 3, + "rank": 6 }, + "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 5, + "valid": 5, + "rank": 6 } } } } } diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/struct_array_type.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/struct_array_type.0.report.json new file mode 100644 index 00000000000..dccb3ae9170 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/struct_array_type.0.report.json @@ -0,0 +1,14 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 4 }, + "wp:main": { "total": 1, "valid": 1, "rank": 4 } }, + "wp:functions": { "f": { "f_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 4 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 4 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 4 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 4 } } } } } diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_call.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_call.0.report.json new file mode 100644 index 00000000000..a01a9ebd006 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_call.0.report.json @@ -0,0 +1,14 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 1 }, + "wp:main": { "total": 1, "valid": 1, "rank": 1 } }, + "wp:functions": { "job": { "job_assert": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 1 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 1 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cast.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cast.0.report.json new file mode 100644 index 00000000000..82596921df3 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cast.0.report.json @@ -0,0 +1,14 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 5 }, + "wp:main": { "total": 1, "valid": 1, "rank": 5 } }, + "wp:functions": { "f": { "f_assert_OUT": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 5 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 5 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 5 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 5 } } } } } diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cst.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cst.0.report.json new file mode 100644 index 00000000000..f7399a08a68 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cst.0.report.json @@ -0,0 +1,11 @@ +{ "wp:global": { "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 2, "valid": 2 } }, + "wp:functions": { "f": { "f_ensures_B": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "f_ensures_A": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } } } } } diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_hard.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_hard.0.report.json new file mode 100644 index 00000000000..94fcb00c3cb --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_hard.0.report.json @@ -0,0 +1,26 @@ +{ "wp:global": { "alt-ergo": { "total": 1, "unknown": 1 }, + "qed": { "total": 2, "valid": 2 }, + "wp:main": { "total": 3, "valid": 2, "unknown": 1 } }, + "wp:functions": { "main": { "main_requires_r_is_q1_ko": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "main_requires_q_is_66F0": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "main_requires_p_is_33FF": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 3, + "valid": 2, + "unknown": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_ite.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_ite.0.report.json new file mode 100644 index 00000000000..015bc871fc4 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_ite.0.report.json @@ -0,0 +1,10 @@ +{ "wp:global": { "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 1, "valid": 1 } }, + "wp:functions": { "check": { "check_ensures": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_labels.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_labels.0.report.json new file mode 100644 index 00000000000..0c477e292bc --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_labels.0.report.json @@ -0,0 +1,26 @@ +{ "wp:global": { "alt-ergo": { "total": 3, "valid": 3, "rank": 6 }, + "wp:main": { "total": 3, "valid": 3, "rank": 6 } }, + "wp:functions": { "duplet": { "duplet_assert_PJ": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 6 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 6 } }, + "duplet_assert_PI": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 6 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 6 } }, + "duplet_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 6 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 6 } }, + "wp:section": { "alt-ergo": { "total": 3, + "valid": 3, + "rank": 6 }, + "wp:main": { "total": 3, + "valid": 3, + "rank": 6 } } } } } diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_matrix.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_matrix.0.report.json new file mode 100644 index 00000000000..468e2635821 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_matrix.0.report.json @@ -0,0 +1,29 @@ +{ "wp:global": { "alt-ergo": { "total": 2, "valid": 1, "unknown": 1, + "rank": 3 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 3, "valid": 2, "unknown": 1, + "rank": 3 } }, + "wp:functions": { "make": { "make_ensures_KO": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "make_ensures_OK2": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "make_ensures_OK1": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 3 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 3 } }, + "wp:section": { "alt-ergo": { "total": 2, + "valid": 1, + "unknown": 1, + "rank": 3 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 3, + "valid": 2, + "unknown": 1, + "rank": 3 } } } } } diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_collect.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_collect.0.report.json new file mode 100644 index 00000000000..c9e63bb2e44 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_collect.0.report.json @@ -0,0 +1,181 @@ +{ "wp:global": { "alt-ergo": { "total": 15, "valid": 15, "rank": 13 }, + "qed": { "total": 17, "valid": 17 }, + "wp:main": { "total": 32, "valid": 32, "rank": 13 } }, + "wp:functions": { "job": { "job_assigns": { "qed": { "total": 3, + "valid": 3 }, + "wp:main": { "total": 3, + "valid": 3 } }, + "job_ensures_P": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "job_ensures_K": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 5, + "valid": 5 }, + "wp:main": { "total": 5, + "valid": 5 } } }, + "job2": { "job2_assigns": { "qed": { "total": 3, + "valid": 3 }, + "wp:main": { "total": 3, + "valid": 3 } }, + "job2_ensures_Q": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "job2_ensures_K": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 5, + "valid": 5 }, + "wp:main": { "total": 5, + "valid": 5 } } }, + "job3": { "job3_assigns": { "qed": { "total": 3, + "valid": 3 }, + "wp:main": { "total": 3, + "valid": 3 } }, + "job3_ensures_Q": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 5 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 5 } }, + "job3_ensures_K": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 5 }, + "qed": { "total": 4, + "valid": 4 }, + "wp:main": { "total": 5, + "valid": 5, + "rank": 5 } } }, + "caller": { "job_requires_2": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 4 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 4 } }, + "job_requires": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 2 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 2 } }, + "caller_ensures_P2": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 9 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 9 } }, + "caller_ensures_P1": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 9 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 9 } }, + "caller_ensures_K": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 4, + "valid": 4, + "rank": 9 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 5, + "valid": 5, + "rank": 9 } } }, + "caller2": { "job2_requires_2": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 4 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 4 } }, + "job2_requires": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 2 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 2 } }, + "caller2_ensures_R": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 13 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 13 } }, + "caller2_ensures_Q2": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 13 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 13 } }, + "caller2_ensures_Q1": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 13 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 13 } }, + "caller2_ensures_K": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 5, + "valid": 5, + "rank": 13 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 6, + "valid": 6, + "rank": 13 } } }, + "caller3": { "job3_requires_2": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 4 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 4 } }, + "job3_requires": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 2 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 2 } }, + "caller3_ensures_R": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 13 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 13 } }, + "caller3_ensures_Q2": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 13 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 13 } }, + "caller3_ensures_Q1": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 13 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 13 } }, + "caller3_ensures_K": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 5, + "valid": 5, + "rank": 13 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 6, + "valid": 6, + "rank": 13 } } } } } diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.0.report.json new file mode 100644 index 00000000000..ab542867843 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.0.report.json @@ -0,0 +1,50 @@ +{ "wp:global": { "alt-ergo": { "total": 4, "valid": 4, "rank": 19 }, + "qed": { "total": 4, "valid": 4 }, + "wp:main": { "total": 8, "valid": 8, "rank": 19 } }, + "wp:functions": { "init": { "init_loop_invariant_Partial": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 9 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 9 } }, + "init_loop_invariant_Range": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 5 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 5 } }, + "init_assigns": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "init_loop_assigns": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 19 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 2, + "valid": 2, + "rank": 19 } }, + "init_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 7 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 7 } }, + "wp:section": { "alt-ergo": { "total": 4, + "valid": 4, + "rank": 19 }, + "qed": { "total": 4, + "valid": 4 }, + "wp:main": { "total": 8, + "valid": 8, + "rank": 19 } } } } } diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_string.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_string.0.report.json new file mode 100644 index 00000000000..98742804d93 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_string.0.report.json @@ -0,0 +1,63 @@ +{ "wp:global": { "alt-ergo": { "total": 5, "valid": 5, "rank": 34 }, + "qed": { "total": 8, "valid": 8 }, + "wp:main": { "total": 13, "valid": 13, "rank": 34 } }, + "wp:functions": { "strlen": { "strlen_assert_END": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 19 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 19 } }, + "strlen_loop_invariant_ZERO": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 11 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 11 } }, + "strlen_loop_invariant_RANGE": { "alt-ergo": + { "total": 2, + "valid": 2, + "rank": 34 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 34 } }, + "strlen_loop_invariant_BASE": { "qed": + { "total": 2, + "valid": 2 }, + "wp:main": + { "total": 2, + "valid": 2 } }, + "strlen_loop_variant": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 14 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 2, + "valid": 2, + "rank": 14 } }, + "strlen_assigns": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "strlen_loop_assigns": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "strlen_ensures": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "wp:section": { "alt-ergo": { "total": 5, + "valid": 5, + "rank": 34 }, + "qed": { "total": 8, + "valid": 8 }, + "wp:main": { "total": 13, + "valid": 13, + "rank": 34 } } } } } -- GitLab From 36416057dc030136a710c649aa5fa89941acabfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Mon, 25 Feb 2019 11:45:01 +0100 Subject: [PATCH 039/376] [wp] validating output of all tests --- src/plugins/wp/tests/wp/oracle_qualif/sharing.res.oracle | 3 ++- .../wp/tests/wp/oracle_qualif/stmtcompiler_test.res.oracle | 3 ++- .../wp/tests/wp/oracle_qualif/wp_behav.0.res.oracle | 5 +++-- .../wp/tests/wp/oracle_qualif/wp_behav.1.res.oracle | 3 ++- .../wp/tests/wp/oracle_qualif/wp_call_pre.res.oracle | 3 ++- src/plugins/wp/tests/wp/oracle_qualif/wp_eqb.res.oracle | 5 +++-- .../wp/tests/wp/oracle_qualif/wp_strategy.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/arith.0.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/arith.1.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/assign_array.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/assigns_path.res.oracle | 3 ++- .../tests/wp_acsl/oracle_qualif/assigns_range.0.res.oracle | 3 ++- .../tests/wp_acsl/oracle_qualif/assigns_range.1.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/axioms.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/base_offset.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/bitwise.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/bitwise2.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/block_length.res.oracle | 3 ++- .../wp_acsl/oracle_qualif/classify_float.0.res.oracle | 5 +++-- .../wp_acsl/oracle_qualif/classify_float.1.res.oracle | 3 ++- .../wp_acsl/oracle_qualif/classify_float.2.res.oracle | 3 ++- src/plugins/wp/tests/wp_acsl/oracle_qualif/cnf.res.oracle | 3 ++- src/plugins/wp/tests/wp_acsl/oracle_qualif/ctor.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/div_mod.0.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/div_mod.1.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/div_mod.2.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/e_imply.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/equal.res.oracle | 7 ++++--- .../tests/wp_acsl/oracle_qualif/float_compare.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/funvar_inv.res.oracle | 3 ++- .../wp_acsl/oracle_qualif/implicit_enum_cast.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/init_label.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/init_value.0.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/init_value.1.res.oracle | 3 ++- .../tests/wp_acsl/oracle_qualif/init_value_mem.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/intbool.res.oracle | 3 ++- .../tests/wp_acsl/oracle_qualif/label_escape.0.res.oracle | 3 ++- .../tests/wp_acsl/oracle_qualif/label_escape.1.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/logic.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/looplabels.res.oracle | 3 ++- src/plugins/wp/tests/wp_acsl/oracle_qualif/null.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/pointer.0.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/pointer.1.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/post_result.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/precedence.0.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/precedence.1.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/range.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/reads.0.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/reads.1.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/record.0.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/record.1.res.oracle | 3 ++- .../tests/wp_acsl/oracle_qualif/simpl_is_type.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/sizeof.res.oracle | 3 ++- .../wp_acsl/oracle_qualif/struct_use_case.0.res.oracle | 3 ++- .../wp_acsl/oracle_qualif/struct_use_case.1.res.oracle | 3 ++- src/plugins/wp/tests/wp_acsl/oracle_qualif/tset.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/type_guard.0.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/type_guard.1.res.oracle | 3 ++- .../tests/wp_acsl/oracle_qualif/unit_bit_test.res.oracle | 3 ++- .../wp/tests/wp_acsl/oracle_qualif/unit_bool.res.oracle | 3 ++- .../wp_acsl/oracle_qualif/user_def_type_guard.0.res.oracle | 3 ++- .../wp_acsl/oracle_qualif/user_def_type_guard.1.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/bts0708.res.oracle | 6 ++++-- .../wp/tests/wp_bts/oracle_qualif/bts0843.res.oracle | 5 +++-- .../wp/tests/wp_bts/oracle_qualif/bts779.res.oracle | 5 +++-- .../wp/tests/wp_bts/oracle_qualif/bts788.res.oracle | 5 +++-- .../wp/tests/wp_bts/oracle_qualif/bts986.res.oracle | 5 +++-- .../wp/tests/wp_bts/oracle_qualif/bts_1174.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/bts_1176.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/bts_1360.res.oracle | 5 +++-- .../wp/tests/wp_bts/oracle_qualif/bts_1462.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/bts_1586.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/bts_1588.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/bts_1601.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/bts_1828.0.res.oracle | 5 +++-- .../wp/tests/wp_bts/oracle_qualif/bts_1828.1.res.oracle | 5 +++-- .../wp/tests/wp_bts/oracle_qualif/bts_2040.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/bts_2079.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/bts_2159.res.oracle | 5 +++-- .../tests/wp_bts/oracle_qualif/ergo_typecheck.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/issue-364.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/issue_143.0.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/issue_143.1.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/issue_143.2.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/issue_143.3.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/issue_198.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/issue_447.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/issue_453.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/issue_494.res.oracle | 3 ++- .../wp/tests/wp_bts/oracle_qualif/issue_508.res.oracle | 5 +++-- .../tests/wp_bts/oracle_qualif/nupw-bcl-bts1120.res.oracle | 3 ++- .../binary-multiplication-without-overflow.res.oracle | 6 ++++-- .../oracle_qualif/binary-multiplication.res.oracle | 6 ++++-- .../oracle_qualif/frama_c_exo1_solved.res.oracle | 6 ++++-- .../oracle_qualif/frama_c_exo2_solved.res.oracle | 6 ++++-- .../oracle_qualif/frama_c_exo3_solved.old.res.oracle | 6 ++++-- .../oracle_qualif/frama_c_exo3_solved.old.v2.res.oracle | 6 ++++-- .../frama_c_exo3_solved.simplified.res.oracle | 6 ++++-- .../oracle_qualif/frama_c_hashtbl_solved.res.oracle | 6 ++++-- .../wp_gallery/oracle_qualif/loop-statement.res.oracle | 3 ++- .../wp/tests/wp_hoare/oracle_qualif/byref.0.res.oracle | 3 ++- .../wp/tests/wp_hoare/oracle_qualif/byref.1.res.oracle | 3 ++- .../tests/wp_hoare/oracle_qualif/dispatch_var.res.oracle | 3 ++- .../wp_hoare/oracle_qualif/dispatch_var2.0.res.oracle | 3 ++- .../wp_hoare/oracle_qualif/dispatch_var2.1.res.oracle | 3 ++- .../wp/tests/wp_hoare/oracle_qualif/isHoare.res.oracle | 3 ++- .../wp/tests/wp_hoare/oracle_qualif/logicarr.res.oracle | 3 ++- .../wp/tests/wp_hoare/oracle_qualif/logicref.res.oracle | 3 ++- .../wp_hoare/oracle_qualif/logicref_simple.res.oracle | 3 ++- .../wp/tests/wp_hoare/oracle_qualif/reference.res.oracle | 3 ++- .../wp_hoare/oracle_qualif/reference_and_struct.res.oracle | 3 ++- .../wp_hoare/oracle_qualif/reference_array.res.oracle | 7 ++++--- .../oracle_qualif/reference_array_simple.res.oracle | 3 ++- .../wp/tests/wp_hoare/oracle_qualif/refguards.res.oracle | 3 ++- .../wp/tests/wp_manual/oracle_qualif/manual.0.res.oracle | 3 ++- .../wp/tests/wp_manual/oracle_qualif/manual.1.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/abs.0.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/abs.1.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/abs.2.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/asm.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/bool.0.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/bool.1.res.oracle | 5 +++-- .../wp/tests/wp_plugin/oracle_qualif/copy.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/dynamic.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/flash.0.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/flash.1.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/flash.2.res.oracle | 3 ++- .../wp_plugin/oracle_qualif/float_format.0.res.oracle | 3 ++- .../wp_plugin/oracle_qualif/float_format.1.res.oracle | 3 ++- .../wp_plugin/oracle_qualif/float_format.2.res.oracle | 3 ++- .../tests/wp_plugin/oracle_qualif/float_real.0.res.oracle | 3 ++- .../tests/wp_plugin/oracle_qualif/float_real.1.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/frame.res.oracle | 3 ++- .../tests/wp_plugin/oracle_qualif/ground_real.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/inductive.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/init_const.res.oracle | 3 ++- .../wp_plugin/oracle_qualif/init_const_guard.res.oracle | 3 ++- .../tests/wp_plugin/oracle_qualif/init_extern.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/init_valid.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/initarr.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/injector.0.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/injector.1.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/loop.res.oracle | 3 ++- .../tests/wp_plugin/oracle_qualif/loopcurrent.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/loopentry.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/loopextra.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/mask.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/nth.0.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/nth.1.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/overarray.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/overassign.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/params.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/plet.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/polarity.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/prenex.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/repeat.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/rte.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/sequence.0.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/sequence.1.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/sequence.2.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/stmt.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/string_c.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/struct.res.oracle | 3 ++- .../tests/wp_plugin/oracle_qualif/struct_hack.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/subset.res.oracle | 5 +++-- .../tests/wp_plugin/oracle_qualif/subset_fopen.res.oracle | 5 +++-- .../wp/tests/wp_plugin/oracle_qualif/trig.res.oracle | 3 ++- .../tests/wp_plugin/oracle_qualif/unsafe-arrays.res.oracle | 3 ++- .../wp/tests/wp_plugin/oracle_qualif/unsigned.res.oracle | 3 ++- .../wp_plugin/oracle_qualif/unsupported_init.res.oracle | 3 ++- .../wp/tests/wp_store/oracle_qualif/array.res.oracle | 3 ++- .../wp/tests/wp_store/oracle_qualif/natural.res.oracle | 3 ++- .../tests/wp_store/oracle_qualif/nonaliasing.0.res.oracle | 3 ++- .../tests/wp_store/oracle_qualif/nonaliasing.1.res.oracle | 3 ++- .../wp/tests/wp_store/oracle_qualif/struct.res.oracle | 5 +++-- .../wp_tip/oracle_qualif/tac_split_quantifiers.res.oracle | 3 ++- .../wp_typed/oracle_qualif/array_initialized.0.res.oracle | 5 +++-- .../wp_typed/oracle_qualif/array_initialized.1.res.oracle | 5 +++-- .../wp/tests/wp_typed/oracle_qualif/avar.res.oracle | 3 ++- .../wp/tests/wp_typed/oracle_qualif/shift_lemma.res.oracle | 3 ++- .../wp_typed/oracle_qualif/struct_array_type.res.oracle | 5 +++-- .../tests/wp_typed/oracle_qualif/unit_alloc.0.res.oracle | 3 ++- .../tests/wp_typed/oracle_qualif/unit_alloc.1.res.oracle | 3 ++- .../tests/wp_typed/oracle_qualif/unit_bitwise.0.res.oracle | 7 ++++--- .../tests/wp_typed/oracle_qualif/unit_bitwise.1.res.oracle | 3 ++- .../wp/tests/wp_typed/oracle_qualif/unit_call.res.oracle | 3 ++- .../wp/tests/wp_typed/oracle_qualif/unit_cast.res.oracle | 5 +++-- .../wp/tests/wp_typed/oracle_qualif/unit_cst.res.oracle | 3 ++- .../wp/tests/wp_typed/oracle_qualif/unit_float.res.oracle | 3 ++- .../wp/tests/wp_typed/oracle_qualif/unit_hard.res.oracle | 3 ++- .../wp/tests/wp_typed/oracle_qualif/unit_ite.res.oracle | 3 ++- .../wp/tests/wp_typed/oracle_qualif/unit_labels.res.oracle | 3 ++- .../wp/tests/wp_typed/oracle_qualif/unit_lemma.res.oracle | 3 ++- .../tests/wp_typed/oracle_qualif/unit_local.0.res.oracle | 5 +++-- .../tests/wp_typed/oracle_qualif/unit_local.1.res.oracle | 7 ++++--- .../wp_typed/oracle_qualif/unit_loopscope.0.res.oracle | 3 ++- .../wp_typed/oracle_qualif/unit_loopscope.1.res.oracle | 3 ++- .../wp/tests/wp_typed/oracle_qualif/unit_matrix.res.oracle | 3 ++- .../wp/tests/wp_typed/oracle_qualif/unit_string.res.oracle | 3 ++- .../wp/tests/wp_typed/oracle_qualif/unit_tset.res.oracle | 3 ++- .../tests/wp_typed/oracle_qualif/user_bitwise.0.res.oracle | 3 ++- .../tests/wp_typed/oracle_qualif/user_bitwise.1.res.oracle | 3 ++- .../tests/wp_typed/oracle_qualif/user_collect.res.oracle | 3 ++- .../wp/tests/wp_typed/oracle_qualif/user_init.res.oracle | 3 ++- .../wp_typed/oracle_qualif/user_injector.0.res.oracle | 3 ++- .../wp_typed/oracle_qualif/user_injector.1.res.oracle | 3 ++- .../wp/tests/wp_typed/oracle_qualif/user_rec.res.oracle | 3 ++- .../wp/tests/wp_typed/oracle_qualif/user_string.res.oracle | 5 +++-- .../wp/tests/wp_typed/oracle_qualif/user_swap.0.res.oracle | 3 ++- .../wp/tests/wp_typed/oracle_qualif/user_swap.1.res.oracle | 3 ++- .../wp/tests/wp_usage/oracle_qualif/caveat2.res.oracle | 3 ++- .../tests/wp_usage/oracle_qualif/caveat_range.res.oracle | 3 ++- .../wp_usage/oracle_qualif/issue-189-bis.0.res.oracle | 3 ++- .../wp_usage/oracle_qualif/issue-189-bis.1.res.oracle | 3 ++- 214 files changed, 476 insertions(+), 253 deletions(-) diff --git a/src/plugins/wp/tests/wp/oracle_qualif/sharing.res.oracle b/src/plugins/wp/tests/wp/oracle_qualif/sharing.res.oracle index 981c1640a08..44d2cc9df1b 100644 --- a/src/plugins/wp/tests/wp/oracle_qualif/sharing.res.oracle +++ b/src/plugins/wp/tests/wp/oracle_qualif/sharing.res.oracle @@ -8,7 +8,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp/sharing.c.0.report.json' +[wp] Report in: 'tests/wp/oracle_qualif/sharing.0.report.json' +[wp] Report out: 'tests/wp/result_qualif/sharing.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - 1 (48..60) 1 100% diff --git a/src/plugins/wp/tests/wp/oracle_qualif/stmtcompiler_test.res.oracle b/src/plugins/wp/tests/wp/oracle_qualif/stmtcompiler_test.res.oracle index d3b2208c9f1..0c1f65eaa9e 100644 --- a/src/plugins/wp/tests/wp/oracle_qualif/stmtcompiler_test.res.oracle +++ b/src/plugins/wp/tests/wp/oracle_qualif/stmtcompiler_test.res.oracle @@ -40,7 +40,8 @@ [wp] Proved goals: 19 / 27 Qed: 18 Alt-Ergo: 1 (unsuccess: 8) -[wp] Report 'tests/wp/stmtcompiler_test.i.0.report.json' +[wp] Report in: 'tests/wp/oracle_qualif/stmtcompiler_test.0.report.json' +[wp] Report out: 'tests/wp/result_qualif/stmtcompiler_test.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success empty 1 - 1 100% diff --git a/src/plugins/wp/tests/wp/oracle_qualif/wp_behav.0.res.oracle b/src/plugins/wp/tests/wp/oracle_qualif/wp_behav.0.res.oracle index 78a9e8c0f3f..157a14e1b00 100644 --- a/src/plugins/wp/tests/wp/oracle_qualif/wp_behav.0.res.oracle +++ b/src/plugins/wp/tests/wp/oracle_qualif/wp_behav.0.res.oracle @@ -55,12 +55,13 @@ [wp] Proved goals: 32 / 38 Qed: 30 Alt-Ergo: 2 (unsuccess: 6) -[wp] Report 'tests/wp/wp_behav.c.0.report.json' +[wp] Report in: 'tests/wp/oracle_qualif/wp_behav.0.report.json' +[wp] Report out: 'tests/wp/result_qualif/wp_behav.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 5 - 5 100% min 4 - 4 100% -bhv 2 1 (8..20) 3 100% +bhv 2 1 (4..16) 3 100% stmt_contract 3 - 3 100% stmt_contract_label 2 - 2 100% stmt_contract_assigns 5 - 5 100% diff --git a/src/plugins/wp/tests/wp/oracle_qualif/wp_behav.1.res.oracle b/src/plugins/wp/tests/wp/oracle_qualif/wp_behav.1.res.oracle index bc1f4d8ead0..cd60d0cd973 100644 --- a/src/plugins/wp/tests/wp/oracle_qualif/wp_behav.1.res.oracle +++ b/src/plugins/wp/tests/wp/oracle_qualif/wp_behav.1.res.oracle @@ -18,7 +18,8 @@ [wp] [Alt-Ergo] Goal typed_stmt_contract_assigns_ko_ensures_qed_ko : Unsuccess [wp] Proved goals: 0 / 8 Alt-Ergo: 0 (unsuccess: 8) -[wp] Report 'tests/wp/wp_behav.c.1.report.json' +[wp] Report in: 'tests/wp/oracle_qualif/wp_behav.1.report.json' +[wp] Report out: 'tests/wp/result_qualif/wp_behav.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - - 3 0.0% diff --git a/src/plugins/wp/tests/wp/oracle_qualif/wp_call_pre.res.oracle b/src/plugins/wp/tests/wp/oracle_qualif/wp_call_pre.res.oracle index a61b5e65e10..fee194ce70a 100644 --- a/src/plugins/wp/tests/wp/oracle_qualif/wp_call_pre.res.oracle +++ b/src/plugins/wp/tests/wp/oracle_qualif/wp_call_pre.res.oracle @@ -21,7 +21,8 @@ [wp] Proved goals: 10 / 10 Qed: 9 Alt-Ergo: 1 -[wp] Report 'tests/wp/wp_call_pre.c.0.report.json' +[wp] Report in: 'tests/wp/oracle_qualif/wp_call_pre.0.report.json' +[wp] Report out: 'tests/wp/result_qualif/wp_call_pre.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success double_call 1 1 (4..16) 2 100% diff --git a/src/plugins/wp/tests/wp/oracle_qualif/wp_eqb.res.oracle b/src/plugins/wp/tests/wp/oracle_qualif/wp_eqb.res.oracle index e838815abc1..7854eff46a0 100644 --- a/src/plugins/wp/tests/wp/oracle_qualif/wp_eqb.res.oracle +++ b/src/plugins/wp/tests/wp/oracle_qualif/wp_eqb.res.oracle @@ -8,8 +8,9 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp/wp_eqb.i.0.report.json' +[wp] Report in: 'tests/wp/oracle_qualif/wp_eqb.0.report.json' +[wp] Report out: 'tests/wp/result_qualif/wp_eqb.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -f - 1 (32..44) 1 100% +f - 1 (36..48) 1 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp/oracle_qualif/wp_strategy.res.oracle b/src/plugins/wp/tests/wp/oracle_qualif/wp_strategy.res.oracle index 71f60a87453..84aee82ec3f 100644 --- a/src/plugins/wp/tests/wp/oracle_qualif/wp_strategy.res.oracle +++ b/src/plugins/wp/tests/wp/oracle_qualif/wp_strategy.res.oracle @@ -39,7 +39,8 @@ [wp] Proved goals: 17 / 25 Qed: 17 Alt-Ergo: 0 (unsuccess: 8) -[wp] Report 'tests/wp/wp_strategy.c.0.report.json' +[wp] Report in: 'tests/wp/oracle_qualif/wp_strategy.0.report.json' +[wp] Report out: 'tests/wp/result_qualif/wp_strategy.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success bts0513 - - 2 0.0% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/arith.0.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/arith.0.res.oracle index e9dcd2c5a7a..a3a8108a43b 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/arith.0.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/arith.0.res.oracle @@ -31,7 +31,8 @@ [wp] Proved goals: 24 / 24 Qed: 21 Alt-Ergo: 3 -[wp] Report 'tests/wp_acsl/arith.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/arith.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/arith.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Lemma 20 1 (1..8) 21 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/arith.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/arith.1.res.oracle index 67dde50a424..799cfbbb52f 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/arith.1.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/arith.1.res.oracle @@ -7,7 +7,8 @@ [wp] [Alt-Ergo] Goal typed_cast_sgn_usgn_ensures_qed_ko_KO : Unsuccess [wp] Proved goals: 0 / 1 Alt-Ergo: 0 (unsuccess: 1) -[wp] Report 'tests/wp_acsl/arith.i.1.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/arith.1.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/arith.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success cast_sgn_usgn - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/assign_array.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/assign_array.res.oracle index cb994356b5b..77221b177c2 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/assign_array.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/assign_array.res.oracle @@ -10,7 +10,8 @@ [wp] [Qed] Goal typed_jobG_assigns_normal : Valid [wp] Proved goals: 4 / 4 Qed: 4 -[wp] Report 'tests/wp_acsl/assign_array.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/assign_array.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/assign_array.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success jobA 2 - 2 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_path.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_path.res.oracle index 898e9cdc2f9..41dc0500286 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_path.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_path.res.oracle @@ -16,7 +16,8 @@ [wp] Proved goals: 9 / 9 Qed: 6 Alt-Ergo: 3 -[wp] Report 'tests/wp_acsl/assigns_path.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/assigns_path.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/assigns_path.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job 6 3 (20..32) 9 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_range.0.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_range.0.res.oracle index c2e202de26b..9c8b4033d74 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_range.0.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_range.0.res.oracle @@ -24,7 +24,8 @@ [wp] Proved goals: 17 / 17 Qed: 12 Alt-Ergo: 5 -[wp] Report 'tests/wp_acsl/assigns_range.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/assigns_range.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/assigns_range.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success call_assigns_all 12 2 (8..20) 14 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_range.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_range.1.res.oracle index 62dbc55d245..82f100d322f 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_range.1.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/assigns_range.1.res.oracle @@ -12,7 +12,8 @@ [wp] [Alt-Ergo] Goal typed_call_assigns_t4_assigns_normal : Unsuccess [wp] Proved goals: 0 / 6 Alt-Ergo: 0 (unsuccess: 6) -[wp] Report 'tests/wp_acsl/assigns_range.i.1.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/assigns_range.1.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/assigns_range.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success call_assigns_t1 - - 2 0.0% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/axioms.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/axioms.res.oracle index 1af8a459bfd..2b8385a1071 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/axioms.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/axioms.res.oracle @@ -17,7 +17,8 @@ [wp] Proved goals: 8 / 10 Qed: 3 Alt-Ergo: 5 (unsuccess: 2) -[wp] Report 'tests/wp_acsl/axioms.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/axioms.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/axioms.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 3 5 (104..128) 10 80.0% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/base_offset.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/base_offset.res.oracle index 4db477821a2..b27b33bf634 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/base_offset.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/base_offset.res.oracle @@ -10,7 +10,8 @@ [wp] Proved goals: 3 / 3 Qed: 2 Alt-Ergo: 1 -[wp] Report 'tests/wp_acsl/base_offset.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/base_offset.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/base_offset.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 2 1 (8..20) 3 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise.res.oracle index 74ff28899fe..8cc292011a2 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise.res.oracle @@ -36,7 +36,8 @@ [wp] Proved goals: 26 / 29 Qed: 25 Alt-Ergo: 1 (unsuccess: 3) -[wp] Report 'tests/wp_acsl/bitwise.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/bitwise.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/bitwise.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success band 8 - 8 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise2.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise2.res.oracle index 9a78b68f273..f7415f64fd8 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise2.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise2.res.oracle @@ -11,7 +11,8 @@ [wp] [Qed] Goal typed_job4_ensures : Valid [wp] Proved goals: 5 / 5 Qed: 5 -[wp] Report 'tests/wp_acsl/bitwise2.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/bitwise2.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/bitwise2.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job1 1 - 1 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/block_length.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/block_length.res.oracle index 6033f7105e7..390d53bf041 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/block_length.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/block_length.res.oracle @@ -16,7 +16,8 @@ [wp] [Qed] Goal typed_f_ensures_Pts1 : Valid [wp] Proved goals: 10 / 10 Qed: 10 -[wp] Report 'tests/wp_acsl/block_length.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/block_length.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/block_length.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 10 - 10 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.0.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.0.res.oracle index 354a7ea0d71..18381fdbb21 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.0.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.0.res.oracle @@ -9,8 +9,9 @@ [wp] Proved goals: 3 / 3 Qed: 0 Alt-Ergo: 3 -[wp] Report 'tests/wp_acsl/classify_float.c.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/classify_float.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/classify_float.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success -Lemma - 3 (1..12) 3 100% +Lemma - 3 (4..16) 3 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.1.res.oracle index 611902c7719..7c556d41418 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.1.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.1.res.oracle @@ -9,7 +9,8 @@ [wp] Proved goals: 3 / 3 Qed: 0 alt-ergo: 3 -[wp] Report 'tests/wp_acsl/classify_float.c.1.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/classify_float.1.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/classify_float.1.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Lemma - - 3 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.2.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.2.res.oracle index 9c3208e5ffa..8b1d5a84d04 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.2.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.2.res.oracle @@ -12,7 +12,8 @@ [wp] Proved goals: 3 / 3 Qed: 0 Coq: 3 -[wp] Report 'tests/wp_acsl/classify_float.c.2.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/classify_float.2.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/classify_float.2.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Lemma - - 3 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/cnf.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/cnf.res.oracle index bc588e84733..7f42f9cb837 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/cnf.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/cnf.res.oracle @@ -303,7 +303,8 @@ [wp] Proved goals: 43 / 43 Qed: 11 Alt-Ergo: 32 -[wp] Report 'tests/wp_acsl/cnf.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/cnf.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/cnf.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 11 32 (336..384) 43 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/ctor.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/ctor.res.oracle index deffb65d657..23662c229a1 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/ctor.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/ctor.res.oracle @@ -7,7 +7,8 @@ [wp] [Qed] Goal typed_lemma_diff : Valid [wp] Proved goals: 2 / 2 Qed: 2 -[wp] Report 'tests/wp_acsl/ctor.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/ctor.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/ctor.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Axiomatic Event 2 - 2 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.0.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.0.res.oracle index 1e773b52273..700bf043119 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.0.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.0.res.oracle @@ -29,7 +29,8 @@ [wp] Proved goals: 22 / 22 Qed: 0 Alt-Ergo: 22 -[wp] Report 'tests/wp_acsl/div_mod.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/div_mod.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/div_mod.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - 22 (8..20) 22 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.1.res.oracle index 6e34345f147..282eb4ee097 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.1.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.1.res.oracle @@ -29,7 +29,8 @@ [wp] Proved goals: 22 / 22 Qed: 0 alt-ergo: 22 -[wp] Report 'tests/wp_acsl/div_mod.i.1.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/div_mod.1.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/div_mod.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - - 22 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.2.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.2.res.oracle index 3d3ad3145f0..0a7e3253df5 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.2.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.2.res.oracle @@ -8,7 +8,8 @@ [wp] [Alt-Ergo] Goal typed_f_ensures_m7_mod_0_x_ko : Unsuccess [wp] Proved goals: 0 / 2 Alt-Ergo: 0 (unsuccess: 2) -[wp] Report 'tests/wp_acsl/div_mod.i.2.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/div_mod.2.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/div_mod.2.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - - 2 0.0% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/e_imply.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/e_imply.res.oracle index e7b1cca13f1..5f939cfa006 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/e_imply.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/e_imply.res.oracle @@ -50,7 +50,8 @@ [wp] Proved goals: 119 / 119 Qed: 8 Alt-Ergo: 111 -[wp] Report 'tests/wp_acsl/e_imply.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/e_imply.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/e_imply.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Lemma - 77 (8..20) 77 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/equal.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/equal.res.oracle index 445532eb63d..365e6a88d35 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/equal.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/equal.res.oracle @@ -13,13 +13,14 @@ [wp] Proved goals: 6 / 6 Qed: 1 Alt-Ergo: 5 -[wp] Report 'tests/wp_acsl/equal.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/equal.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/equal.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success simple_struct 1 - 1 100% simple_array - 1 (12..24) 1 100% with_array_struct - 1 (12..24) 1 100% -with_ptr_struct - 1 (8..20) 1 100% +with_ptr_struct - 1 (4..16) 1 100% with_ptr_array - 1 (12..24) 1 100% -with_ptr_and_array_struct - 1 (24..36) 1 100% +with_ptr_and_array_struct - 1 (28..40) 1 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/float_compare.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/float_compare.res.oracle index 828ad921cb7..d0b001c2edc 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/float_compare.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/float_compare.res.oracle @@ -10,7 +10,8 @@ [wp] Proved goals: 4 / 4 Qed: 0 Alt-Ergo: 4 -[wp] Report 'tests/wp_acsl/float_compare.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/float_compare.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/float_compare.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Lemma - 4 (28..40) 4 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/funvar_inv.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/funvar_inv.res.oracle index 4710a979b9f..8a073f77487 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/funvar_inv.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/funvar_inv.res.oracle @@ -9,7 +9,8 @@ [wp] [Qed] Goal typed_ref_g_loop_assigns : Valid [wp] Proved goals: 3 / 3 Qed: 3 -[wp] Report 'tests/wp_acsl/funvar_inv.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/funvar_inv.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/funvar_inv.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 1 - 1 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/implicit_enum_cast.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/implicit_enum_cast.res.oracle index 33a7efd8bc0..122f044fbd9 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/implicit_enum_cast.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/implicit_enum_cast.res.oracle @@ -15,7 +15,8 @@ [wp] [Qed] Goal typed_bar_assigns_normal_part5 : Valid [wp] Proved goals: 9 / 9 Qed: 9 -[wp] Report 'tests/wp_acsl/implicit_enum_cast.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/implicit_enum_cast.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/implicit_enum_cast.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success bar 9 - 9 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_label.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_label.res.oracle index b4b67bf6b9f..acfc1883f38 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_label.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_label.res.oracle @@ -13,7 +13,8 @@ [wp] Proved goals: 3 / 4 Qed: 2 Alt-Ergo: 1 (unsuccess: 1) -[wp] Report 'tests/wp_acsl/init_label.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/init_label.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/init_label.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success main 1 - 1 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value.0.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value.0.res.oracle index 0619f73d418..696cfec4377 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value.0.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value.0.res.oracle @@ -31,7 +31,8 @@ [wp] Proved goals: 24 / 24 Qed: 17 Alt-Ergo: 7 -[wp] Report 'tests/wp_acsl/init_value.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/init_value.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/init_value.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success main 14 6 (28..40) 20 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value.1.res.oracle index ab90d518152..1a296d83d67 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value.1.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value.1.res.oracle @@ -24,7 +24,8 @@ [wp] [Alt-Ergo] Goal typed_main_ko_requires_qed_ko_indirect_init_union_t : Unsuccess [wp] Proved goals: 0 / 18 Alt-Ergo: 0 (unsuccess: 18) -[wp] Report 'tests/wp_acsl/init_value.i.1.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/init_value.1.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/init_value.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success main_ko - - 9 0.0% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value_mem.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value_mem.res.oracle index aeadf11adb3..5a8aa566288 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value_mem.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/init_value_mem.res.oracle @@ -9,7 +9,8 @@ [wp] Proved goals: 2 / 2 Qed: 0 Alt-Ergo: 2 -[wp] Report 'tests/wp_acsl/init_value_mem.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/init_value_mem.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/init_value_mem.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success main - 2 (36..48) 2 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/intbool.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/intbool.res.oracle index aa952f48265..296bd09f245 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/intbool.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/intbool.res.oracle @@ -7,7 +7,8 @@ [wp] [Qed] Goal typed_bug_ensures : Valid [wp] Proved goals: 1 / 1 Qed: 1 -[wp] Report 'tests/wp_acsl/intbool.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/intbool.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/intbool.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success bug 1 - 1 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/label_escape.0.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/label_escape.0.res.oracle index 8d0656392ab..e067872acde 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/label_escape.0.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/label_escape.0.res.oracle @@ -7,7 +7,8 @@ [wp] [Qed] Goal typed_g_assert_qed_ok_ok : Valid [wp] Proved goals: 1 / 1 Qed: 1 -[wp] Report 'tests/wp_acsl/label_escape.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/label_escape.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/label_escape.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success g 1 - 1 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/label_escape.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/label_escape.1.res.oracle index 32bbae5f36c..d304a79b974 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/label_escape.1.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/label_escape.1.res.oracle @@ -7,7 +7,8 @@ [wp] [Alt-Ergo] Goal typed_f_assert_qed_ko_oracle_ko : Unsuccess [wp] Proved goals: 0 / 1 Alt-Ergo: 0 (unsuccess: 1) -[wp] Report 'tests/wp_acsl/label_escape.i.1.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/label_escape.1.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/label_escape.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.res.oracle index 26b176ac8f2..a5be47ac219 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.res.oracle @@ -65,7 +65,8 @@ [wp] Proved goals: 5 / 21 Qed: 3 Alt-Ergo: 2 (unsuccess: 16) -[wp] Report 'tests/wp_acsl/logic.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/logic.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/logic.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success h 2 - 3 66.7% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/looplabels.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/looplabels.res.oracle index 26c8030d9da..7ce65969029 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/looplabels.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/looplabels.res.oracle @@ -15,7 +15,8 @@ [wp] Proved goals: 8 / 8 Qed: 3 Alt-Ergo: 5 -[wp] Report 'tests/wp_acsl/looplabels.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/looplabels.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/looplabels.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success copy 3 5 (256..304) 8 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/null.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/null.res.oracle index 1d6e4b7c5b2..8ff84050d33 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/null.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/null.res.oracle @@ -10,7 +10,8 @@ [wp] Proved goals: 3 / 3 Qed: 1 Alt-Ergo: 2 -[wp] Report 'tests/wp_acsl/null.c.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/null.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/null.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Lemma - 2 (1..12) 2 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/pointer.0.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/pointer.0.res.oracle index b319d2b2537..4476b69cd15 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/pointer.0.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/pointer.0.res.oracle @@ -18,7 +18,8 @@ [wp] Proved goals: 3 / 9 Qed: 3 Alt-Ergo: 0 (unsuccess: 6) -[wp] Report 'tests/wp_acsl/pointer.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/pointer.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/pointer.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success array 3 - 3 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/pointer.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/pointer.1.res.oracle index 77732b04cfe..116c8aee7c9 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/pointer.1.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/pointer.1.res.oracle @@ -18,7 +18,8 @@ [wp] Proved goals: 3 / 9 Qed: 3 Alt-Ergo: 0 (unsuccess: 6) -[wp] Report 'tests/wp_acsl/pointer.i.1.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/pointer.1.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/pointer.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success array 3 - 3 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/post_result.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/post_result.res.oracle index 4df28dabcef..6ab33eacbf5 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/post_result.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/post_result.res.oracle @@ -9,7 +9,8 @@ [wp] Proved goals: 1 / 2 Qed: 1 Alt-Ergo: 0 (unsuccess: 1) -[wp] Report 'tests/wp_acsl/post_result.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/post_result.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/post_result.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success correct 1 - 1 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/precedence.0.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/precedence.0.res.oracle index 6326d96688a..8e7baea94bb 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/precedence.0.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/precedence.0.res.oracle @@ -95,7 +95,8 @@ [wp] Proved goals: 52 / 52 Qed: 51 Alt-Ergo: 1 -[wp] Report 'tests/wp_acsl/precedence.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/precedence.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/precedence.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success predicate 29 1 (4..16) 30 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/precedence.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/precedence.1.res.oracle index d8de2ea9bac..364ef5d90af 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/precedence.1.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/precedence.1.res.oracle @@ -79,7 +79,8 @@ [wp] [Alt-Ergo] Goal typed_predicate_ensures_ko_l_assoc_naming : Unsuccess [wp] Proved goals: 0 / 37 Alt-Ergo: 0 (unsuccess: 37) -[wp] Report 'tests/wp_acsl/precedence.i.1.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/precedence.1.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/precedence.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success predicate - - 23 0.0% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/range.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/range.res.oracle index cf9b98a9f72..9b09be20007 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/range.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/range.res.oracle @@ -10,7 +10,8 @@ [wp] [Qed] Goal typed_test_call_val_assigns_q_requires_HQ_ok : Valid [wp] Proved goals: 4 / 4 Qed: 4 -[wp] Report 'tests/wp_acsl/range.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/range.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/range.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success test 4 - 4 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/reads.0.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/reads.0.res.oracle index f5b9a542056..5c3ff3a3d69 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/reads.0.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/reads.0.res.oracle @@ -14,7 +14,8 @@ [wp] Proved goals: 5 / 7 Qed: 3 Alt-Ergo: 2 (unsuccess: 2) -[wp] Report 'tests/wp_acsl/reads.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/reads.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/reads.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - 1 (12..24) 1 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/reads.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/reads.1.res.oracle index ccb9ad6d07a..bd1c8449cde 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/reads.1.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/reads.1.res.oracle @@ -9,7 +9,8 @@ [wp] [Alt-Ergo] Goal typed_modifies_y_ensures_qed_ko_H_KO : Unsuccess [wp] Proved goals: 0 / 3 Alt-Ergo: 0 (unsuccess: 3) -[wp] Report 'tests/wp_acsl/reads.i.1.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/reads.1.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/reads.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success modifies_y - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/record.0.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/record.0.res.oracle index a2ea10ac9b8..e62b365166b 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/record.0.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/record.0.res.oracle @@ -18,7 +18,8 @@ [wp] Proved goals: 11 / 11 Qed: 9 Alt-Ergo: 2 -[wp] Report 'tests/wp_acsl/record.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/record.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/record.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 9 2 (12..24) 11 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/record.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/record.1.res.oracle index b5fa183f53f..a798b27a5de 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/record.1.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/record.1.res.oracle @@ -7,7 +7,8 @@ [wp] [Alt-Ergo] Goal typed_f_ensures_KP5_qed_ko : Unsuccess [wp] Proved goals: 0 / 1 Alt-Ergo: 0 (unsuccess: 1) -[wp] Report 'tests/wp_acsl/record.i.1.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/record.1.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/record.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/simpl_is_type.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/simpl_is_type.res.oracle index 715daac305c..815120bdc30 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/simpl_is_type.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/simpl_is_type.res.oracle @@ -22,7 +22,8 @@ [wp] Proved goals: 15 / 15 Qed: 6 Alt-Ergo: 9 -[wp] Report 'tests/wp_acsl/simpl_is_type.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/simpl_is_type.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/simpl_is_type.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 3 6 (88..112) 9 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/sizeof.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/sizeof.res.oracle index f8ee684c72d..f907ba3b6ba 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/sizeof.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/sizeof.res.oracle @@ -9,7 +9,8 @@ [wp] Proved goals: 2 / 2 Qed: 0 Alt-Ergo: 2 -[wp] Report 'tests/wp_acsl/sizeof.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/sizeof.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/sizeof.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success foo - 2 (1..12) 2 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/struct_use_case.0.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/struct_use_case.0.res.oracle index ef676363288..68251eed9cb 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/struct_use_case.0.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/struct_use_case.0.res.oracle @@ -9,7 +9,8 @@ [wp] Proved goals: 2 / 2 Qed: 1 Alt-Ergo: 1 -[wp] Report 'tests/wp_acsl/struct_use_case.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/struct_use_case.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/struct_use_case.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - 1 (16..28) 1 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/struct_use_case.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/struct_use_case.1.res.oracle index dce325df60f..9951d3d26eb 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/struct_use_case.1.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/struct_use_case.1.res.oracle @@ -8,7 +8,8 @@ [wp] [Alt-Ergo] Goal typed_caveat_g_ensures_ko : Unsuccess [wp] Proved goals: 0 / 2 Alt-Ergo: 0 (unsuccess: 2) -[wp] Report 'tests/wp_acsl/struct_use_case.i.1.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/struct_use_case.1.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/struct_use_case.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/tset.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/tset.res.oracle index 9c5c4e8af59..d85af980df8 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/tset.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/tset.res.oracle @@ -10,7 +10,8 @@ [wp] Proved goals: 4 / 4 Qed: 2 Alt-Ergo: 2 -[wp] Report 'tests/wp_acsl/tset.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/tset.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/tset.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Lemma 2 2 (4..16) 4 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/type_guard.0.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/type_guard.0.res.oracle index 3ba6b703c8f..a63cc1b831a 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/type_guard.0.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/type_guard.0.res.oracle @@ -8,7 +8,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_acsl/type_guard.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/type_guard.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/type_guard.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - 1 (12..24) 1 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/type_guard.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/type_guard.1.res.oracle index 25cc92fe77c..93bcefeddd9 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/type_guard.1.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/type_guard.1.res.oracle @@ -7,7 +7,8 @@ [wp] [Alt-Ergo] Goal typed_f_ensures_qed_ko : Unsuccess [wp] Proved goals: 0 / 1 Alt-Ergo: 0 (unsuccess: 1) -[wp] Report 'tests/wp_acsl/type_guard.i.1.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/type_guard.1.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/type_guard.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bit_test.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bit_test.res.oracle index d5c9648c9d9..284ab16fc04 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bit_test.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bit_test.res.oracle @@ -11,7 +11,8 @@ [wp] Proved goals: 3 / 4 Qed: 2 Alt-Ergo: 1 (unsuccess: 1) -[wp] Report 'tests/wp_acsl/unit_bit_test.c.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/unit_bit_test.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/unit_bit_test.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success sum 1 - 2 50.0% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.res.oracle index 285de12567f..6822d60dd5b 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.res.oracle @@ -7,7 +7,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_acsl/unit_bool.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/unit_bool.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/unit_bool.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Axiomatic Foo - 1 (1..12) 1 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/user_def_type_guard.0.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/user_def_type_guard.0.res.oracle index e3c4552cbe9..d6277a5e6bf 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/user_def_type_guard.0.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/user_def_type_guard.0.res.oracle @@ -8,7 +8,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_acsl/user_def_type_guard.i.0.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/user_def_type_guard.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/user_def_type_guard.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - 1 (12..24) 1 100% diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/user_def_type_guard.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/user_def_type_guard.1.res.oracle index e25eb05dbab..105df712f0f 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/user_def_type_guard.1.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/user_def_type_guard.1.res.oracle @@ -7,7 +7,8 @@ [wp] [Alt-Ergo] Goal typed_f_ensures_qed_ko : Unsuccess [wp] Proved goals: 0 / 1 Alt-Ergo: 0 (unsuccess: 1) -[wp] Report 'tests/wp_acsl/user_def_type_guard.i.1.report.json' +[wp] Report in: 'tests/wp_acsl/oracle_qualif/user_def_type_guard.1.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/user_def_type_guard.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts0708.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts0708.res.oracle index 7c13800bcbd..cb7876bede3 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts0708.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts0708.res.oracle @@ -8,7 +8,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_bts/bts0708.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts0708.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts0708.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - 1 (4..16) 1 100% @@ -20,7 +21,8 @@ f - 1 (4..16) 1 100% [wp] Proved goals: 2 / 2 Qed: 0 Alt-Ergo: 2 -[wp] Report 'tests/wp_bts/bts0708.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts0708.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts0708.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - 2 (4..16) 2 100% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts0843.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts0843.res.oracle index a0f8a4094b8..c121fa495ee 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts0843.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts0843.res.oracle @@ -11,9 +11,10 @@ [wp] Proved goals: 4 / 4 Qed: 2 Alt-Ergo: 2 -[wp] Report 'tests/wp_bts/bts0843.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts0843.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts0843.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f3 1 - 1 100% -g3 1 2 (8..20) 3 100% +g3 1 2 (12..24) 3 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts779.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts779.res.oracle index 57d0e72ba57..07a66659080 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts779.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts779.res.oracle @@ -9,8 +9,9 @@ [wp] Proved goals: 1 / 2 Qed: 0 Alt-Ergo: 1 (unsuccess: 1) -[wp] Report 'tests/wp_bts/bts779.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts779.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts779.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -f - 1 (12..24) 2 50.0% +f - 1 (16..28) 2 50.0% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts788.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts788.res.oracle index a85d715c3e1..45805894c54 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts788.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts788.res.oracle @@ -10,8 +10,9 @@ [wp] Proved goals: 3 / 3 Qed: 1 Alt-Ergo: 2 -[wp] Report 'tests/wp_bts/bts788.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts788.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts788.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -main 1 2 (8..20) 3 100% +main 1 2 (12..24) 3 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts986.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts986.res.oracle index d1038d209ce..e7516bcc0d4 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts986.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts986.res.oracle @@ -8,8 +8,9 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_bts/bts986.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts986.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts986.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -f - 1 (8..20) 1 100% +f - 1 (12..24) 1 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1174.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1174.res.oracle index cb41d88104f..d6e73f126e8 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1174.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1174.res.oracle @@ -9,7 +9,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 Coq: 1 -[wp] Report 'tests/wp_bts/bts_1174.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts_1174.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts_1174.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job - - 1 100% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1176.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1176.res.oracle index fb5eda64c69..3b2380fd578 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1176.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1176.res.oracle @@ -7,7 +7,8 @@ [wp] [Qed] Goal typed_f_assert_qed_ok : Valid [wp] Proved goals: 1 / 1 Qed: 1 -[wp] Report 'tests/wp_bts/bts_1176.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts_1176.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts_1176.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 1 - 1 100% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1360.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1360.res.oracle index 1c324eef37b..294ec76d1a5 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1360.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1360.res.oracle @@ -18,9 +18,10 @@ [wp] Proved goals: 9 / 10 Qed: 8 Alt-Ergo: 1 (unsuccess: 1) -[wp] Report 'tests/wp_bts/bts_1360.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts_1360.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts_1360.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success foo_wrong 4 - 5 80.0% -foo_correct 4 1 (12..24) 5 100% +foo_correct 4 1 (16..28) 5 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1462.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1462.res.oracle index d5c0104b187..d02f6600d10 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1462.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1462.res.oracle @@ -20,7 +20,8 @@ [wp] Proved goals: 12 / 13 Qed: 10 Alt-Ergo: 2 (unsuccess: 1) -[wp] Report 'tests/wp_bts/bts_1462.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts_1462.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts_1462.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success wrong 6 2 (4..16) 9 88.9% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1586.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1586.res.oracle index 300282b34a9..943498ad33b 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1586.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1586.res.oracle @@ -11,7 +11,8 @@ [wp] Proved goals: 2 / 4 Qed: 2 Alt-Ergo: 0 (unsuccess: 2) -[wp] Report 'tests/wp_bts/bts_1586.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts_1586.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts_1586.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success compute_bizarre 1 - 1 100% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1588.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1588.res.oracle index 6a9e1f868ab..38088c7cf01 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1588.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1588.res.oracle @@ -13,7 +13,8 @@ [wp] [Qed] Goal typed_f_assert_a1 : Valid [wp] Proved goals: 3 / 3 Qed: 3 -[wp] Report 'tests/wp_bts/bts_1588.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts_1588.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts_1588.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 3 - 3 100% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1601.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1601.res.oracle index 8ab82c08dc1..5cb16f6a76e 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1601.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1601.res.oracle @@ -15,7 +15,8 @@ [wp] Proved goals: 8 / 8 Qed: 7 Alt-Ergo: 1 -[wp] Report 'tests/wp_bts/bts_1601.c.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts_1601.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts_1601.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success foo 7 1 (16..28) 8 100% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1828.0.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1828.0.res.oracle index c1f6dc0e2ae..16f842993b4 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1828.0.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1828.0.res.oracle @@ -13,10 +13,11 @@ [wp] Proved goals: 4 / 6 Qed: 3 Alt-Ergo: 1 (unsuccess: 2) -[wp] Report 'tests/wp_bts/bts_1828.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts_1828.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts_1828.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -local_frame - 1 (8..20) 1 100% +local_frame - 1 (4..16) 1 100% global_frame 3 - 5 60.0% ------------------------------------------------------------- [wp] Warning: Memory model hypotheses for function 'global_frame': diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1828.1.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1828.1.res.oracle index c751f5eeda1..53e9e1ea9f7 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1828.1.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_1828.1.res.oracle @@ -13,10 +13,11 @@ [wp] Proved goals: 6 / 6 Qed: 5 Alt-Ergo: 1 -[wp] Report 'tests/wp_bts/bts_1828.i.1.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts_1828.1.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts_1828.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -local_frame - 1 (8..20) 1 100% +local_frame - 1 (4..16) 1 100% global_frame 5 - 5 100% ------------------------------------------------------------- [wp] Warning: Memory model hypotheses for function 'global_frame': diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2040.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2040.res.oracle index 2eba18f8727..f9e05af007b 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2040.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2040.res.oracle @@ -7,7 +7,8 @@ [wp] [Qed] Goal typed_call_assert : Valid [wp] Proved goals: 1 / 1 Qed: 1 -[wp] Report 'tests/wp_bts/bts_2040.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts_2040.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts_2040.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success call 1 - 1 100% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2079.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2079.res.oracle index 1677f2005a8..8cfc20cb4a0 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2079.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2079.res.oracle @@ -8,7 +8,8 @@ [wp] [Qed] Goal typed_main_ensures_Eval_Q : Valid [wp] Proved goals: 2 / 2 Qed: 2 -[wp] Report 'tests/wp_bts/bts_2079.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts_2079.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts_2079.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success main 2 - 2 100% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2159.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2159.res.oracle index 5957c25a991..50ac59f33c4 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2159.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/bts_2159.res.oracle @@ -8,8 +8,9 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_bts/bts_2159.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/bts_2159.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/bts_2159.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -job - 1 (56..68) 1 100% +job - 1 (56..80) 1 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/ergo_typecheck.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/ergo_typecheck.res.oracle index adbf79dec6e..16dfd1723cf 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/ergo_typecheck.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/ergo_typecheck.res.oracle @@ -14,7 +14,8 @@ [wp] [Qed] Goal typed_f_assigns : Valid [wp] Proved goals: 8 / 8 Qed: 8 -[wp] Report 'tests/wp_bts/ergo_typecheck.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/ergo_typecheck.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/ergo_typecheck.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 8 - 8 100% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue-364.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue-364.res.oracle index 9dadbafaa24..2257d0da19c 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue-364.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue-364.res.oracle @@ -9,7 +9,8 @@ [wp] Proved goals: 2 / 2 Qed: 0 Alt-Ergo: 2 -[wp] Report 'tests/wp_bts/issue-364.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/issue-364.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/issue-364.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success main - 2 (28..40) 2 100% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.0.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.0.res.oracle index 57e70441a4b..cf47b28f62f 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.0.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.0.res.oracle @@ -8,7 +8,8 @@ [wp] Proved goals: 2 / 2 Qed: 0 Alt-Ergo: 2 -[wp] Report 'tests/wp_bts/issue_143.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/issue_143.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/issue_143.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Axiomatic A - 1 (1..12) 1 100% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.1.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.1.res.oracle index 573e4b2c89b..2da222911d1 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.1.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.1.res.oracle @@ -16,7 +16,8 @@ Alt-Ergo: 0 (failed: 2) Coq: 0 (failed: 2) alt-ergo: 0 (failed: 2) -[wp] Report 'tests/wp_bts/issue_143.i.1.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/issue_143.1.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/issue_143.1.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Axiomatic A - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.2.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.2.res.oracle index 2ebb69cf3ce..a8efd0f899e 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.2.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.2.res.oracle @@ -9,7 +9,8 @@ Command './tests/inexistant-prover' not found [wp] Proved goals: 0 / 2 Alt-Ergo: 0 (failed: 2) -[wp] Report 'tests/wp_bts/issue_143.i.2.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/issue_143.2.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/issue_143.2.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Axiomatic A - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.3.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.3.res.oracle index 5ea347ae63a..87bd09a92c1 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.3.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.3.res.oracle @@ -10,7 +10,8 @@ Command './tests/inexistant-prover' not found [wp] Proved goals: 0 / 2 Coq: 0 (failed: 2) -[wp] Report 'tests/wp_bts/issue_143.i.3.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/issue_143.3.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/issue_143.3.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Axiomatic A - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_198.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_198.res.oracle index e99621a4bbb..41fbe2f345b 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_198.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_198.res.oracle @@ -7,7 +7,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_bts/issue_198.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/issue_198.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/issue_198.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Lemma - 1 (4..16) 1 100% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_447.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_447.res.oracle index 51a96c4ae5d..7ed8bcd4eff 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_447.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_447.res.oracle @@ -7,7 +7,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_bts/issue_447.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/issue_447.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/issue_447.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Lemma - 1 (1..12) 1 100% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_453.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_453.res.oracle index ac1e7341c07..95860c42514 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_453.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_453.res.oracle @@ -12,7 +12,8 @@ [wp] [Qed] Goal typed_f2_assigns : Valid [wp] Proved goals: 6 / 6 Qed: 6 -[wp] Report 'tests/wp_bts/issue_453.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/issue_453.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/issue_453.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f1 3 - 3 100% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_494.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_494.res.oracle index 0bdfc3c7769..ca1ca40b8f9 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_494.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_494.res.oracle @@ -10,7 +10,8 @@ [wp] Proved goals: 1 / 3 Qed: 0 Alt-Ergo: 1 (unsuccess: 2) -[wp] Report 'tests/wp_bts/issue_494.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/issue_494.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/issue_494.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - 1 (8..20) 1 100% diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_508.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_508.res.oracle index e91fa5af173..12cb9521f41 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_508.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_508.res.oracle @@ -10,8 +10,9 @@ [wp] Proved goals: 3 / 3 Qed: 2 Alt-Ergo: 1 -[wp] Report 'tests/wp_bts/issue_508.c.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/issue_508.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/issue_508.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -add 2 1 (52..64) 3 100% +add 2 1 (56..68) 3 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/nupw-bcl-bts1120.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/nupw-bcl-bts1120.res.oracle index 1588ce4deb1..ac5a5264006 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/nupw-bcl-bts1120.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/nupw-bcl-bts1120.res.oracle @@ -20,7 +20,8 @@ [wp] [Qed] Goal typed_unreachable_smt_with_contract_call_f_with_precond_requires_ok : Valid [wp] Proved goals: 8 / 8 Qed: 8 -[wp] Report 'tests/wp_bts/nupw-bcl-bts1120.i.0.report.json' +[wp] Report in: 'tests/wp_bts/oracle_qualif/nupw-bcl-bts1120.0.report.json' +[wp] Report out: 'tests/wp_bts/result_qualif/nupw-bcl-bts1120.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success g 6 - 6 100% diff --git a/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication-without-overflow.res.oracle b/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication-without-overflow.res.oracle index 54c0e393099..396326b005b 100644 --- a/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication-without-overflow.res.oracle +++ b/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication-without-overflow.res.oracle @@ -17,7 +17,8 @@ [wp] Proved goals: 10 / 10 Qed: 3 alt-ergo: 7 -[wp] Report 'tests/wp_gallery/binary-multiplication-without-overflow.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/binary-multiplication-without-overflow.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/binary-multiplication-without-overflow.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Axiomatic mult 1 - 1 100% @@ -45,7 +46,8 @@ BinaryMultiplication 2 - 9 100% [wp] Proved goals: 11 / 14 Qed: 0 alt-ergo: 11 -[wp] Report 'tests/wp_gallery/binary-multiplication-without-overflow.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/binary-multiplication-without-overflow.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/binary-multiplication-without-overflow.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Axiomatic mult 1 - 1 100% diff --git a/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication.res.oracle b/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication.res.oracle index dd5a5577e64..72aefff35c4 100644 --- a/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication.res.oracle +++ b/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication.res.oracle @@ -21,7 +21,8 @@ [wp] Proved goals: 14 / 14 Qed: 3 alt-ergo: 11 -[wp] Report 'tests/wp_gallery/binary-multiplication.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/binary-multiplication.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/binary-multiplication.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Axiomatic mult 1 - 3 100% @@ -49,7 +50,8 @@ BinaryMultiplication 2 - 11 100% [wp] Proved goals: 11 / 14 Qed: 0 alt-ergo: 11 -[wp] Report 'tests/wp_gallery/binary-multiplication.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/binary-multiplication.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/binary-multiplication.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Axiomatic mult 1 - 3 100% diff --git a/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo1_solved.res.oracle b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo1_solved.res.oracle index ce302571214..04777edf3a4 100644 --- a/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo1_solved.res.oracle +++ b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo1_solved.res.oracle @@ -17,7 +17,8 @@ [wp] Proved goals: 10 / 10 Qed: 6 Alt-Ergo: 4 -[wp] Report 'tests/wp_gallery/frama_c_exo1_solved.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/frama_c_exo1_solved.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/frama_c_exo1_solved.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success exo1 6 4 (176..224) 10 100% @@ -43,7 +44,8 @@ exo1 6 4 (176..224) 10 100% [wp] Proved goals: 9 / 15 Qed: 0 Alt-Ergo: 9 -[wp] Report 'tests/wp_gallery/frama_c_exo1_solved.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/frama_c_exo1_solved.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/frama_c_exo1_solved.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success exo1 6 9 (176..224) 15 100% diff --git a/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo2_solved.res.oracle b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo2_solved.res.oracle index f2115310be1..6a66fec80b6 100644 --- a/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo2_solved.res.oracle +++ b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo2_solved.res.oracle @@ -29,7 +29,8 @@ [wp] Proved goals: 22 / 22 Qed: 9 Alt-Ergo: 13 -[wp] Report 'tests/wp_gallery/frama_c_exo2_solved.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/frama_c_exo2_solved.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/frama_c_exo2_solved.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success max_subarray 9 13 (272..320) 22 100% @@ -63,7 +64,8 @@ max_subarray 9 13 (272..320) 22 100% [wp] Proved goals: 14 / 23 Qed: 0 Alt-Ergo: 14 -[wp] Report 'tests/wp_gallery/frama_c_exo2_solved.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/frama_c_exo2_solved.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/frama_c_exo2_solved.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success max_subarray 9 14 (272..320) 23 100% diff --git a/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.old.res.oracle b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.old.res.oracle index 1ff95155e5e..ec2a4c65cdc 100644 --- a/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.old.res.oracle +++ b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.old.res.oracle @@ -41,7 +41,8 @@ [wp] Proved goals: 34 / 34 Qed: 18 Alt-Ergo: 16 -[wp] Report 'tests/wp_gallery/frama_c_exo3_solved.old.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.old.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/frama_c_exo3_solved.old.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success equal_elements 18 16 (672..768) 34 100% @@ -110,7 +111,8 @@ equal_elements 18 16 (672..768) 34 100% [wp] Proved goals: 32 / 50 Qed: 11 Alt-Ergo: 21 -[wp] Report 'tests/wp_gallery/frama_c_exo3_solved.old.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.old.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/frama_c_exo3_solved.old.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success equal_elements 29 21 (672..768) 50 100% diff --git a/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.old.v2.res.oracle b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.old.v2.res.oracle index 6de56a443e7..a89ecabb491 100644 --- a/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.old.v2.res.oracle +++ b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.old.v2.res.oracle @@ -42,7 +42,8 @@ [wp] Proved goals: 35 / 35 Qed: 17 Alt-Ergo: 18 -[wp] Report 'tests/wp_gallery/frama_c_exo3_solved.old.v2.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.old.v2.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/frama_c_exo3_solved.old.v2.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success equal_elements 17 18 (288..336) 35 100% @@ -112,7 +113,8 @@ equal_elements 17 18 (288..336) 35 100% [wp] Proved goals: 34 / 51 Qed: 11 Alt-Ergo: 23 -[wp] Report 'tests/wp_gallery/frama_c_exo3_solved.old.v2.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.old.v2.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/frama_c_exo3_solved.old.v2.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success equal_elements 28 23 (288..336) 51 100% diff --git a/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.simplified.res.oracle b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.simplified.res.oracle index 8abf274c23d..bd1ae53be93 100644 --- a/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.simplified.res.oracle +++ b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.simplified.res.oracle @@ -33,7 +33,8 @@ [wp] Proved goals: 26 / 26 Qed: 16 Alt-Ergo: 10 -[wp] Report 'tests/wp_gallery/frama_c_exo3_solved.simplified.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.simplified.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/frama_c_exo3_solved.simplified.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success pair 16 10 (104..128) 26 100% @@ -79,7 +80,8 @@ pair 16 10 (104..128) 26 100% [wp] Proved goals: 19 / 35 Qed: 4 Alt-Ergo: 15 -[wp] Report 'tests/wp_gallery/frama_c_exo3_solved.simplified.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/frama_c_exo3_solved.simplified.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/frama_c_exo3_solved.simplified.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success pair 20 15 (104..128) 35 100% diff --git a/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_hashtbl_solved.res.oracle b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_hashtbl_solved.res.oracle index 10e32d116c6..73e10138773 100644 --- a/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_hashtbl_solved.res.oracle +++ b/src/plugins/wp/tests/wp_gallery/oracle_qualif/frama_c_hashtbl_solved.res.oracle @@ -110,7 +110,8 @@ [wp] Proved goals: 102 / 102 Qed: 69 Alt-Ergo: 33 -[wp] Report 'tests/wp_gallery/frama_c_hashtbl_solved.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/frama_c_hashtbl_solved.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/frama_c_hashtbl_solved.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success eq_string 11 4 (48..60) 15 100% @@ -274,7 +275,8 @@ mem_binding 18 8 (192..240) 26 100% [wp] Proved goals: 74 / 143 Qed: 16 Alt-Ergo: 58 -[wp] Report 'tests/wp_gallery/frama_c_hashtbl_solved.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/frama_c_hashtbl_solved.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/frama_c_hashtbl_solved.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success eq_string 11 7 (112..136) 18 100% diff --git a/src/plugins/wp/tests/wp_gallery/oracle_qualif/loop-statement.res.oracle b/src/plugins/wp/tests/wp_gallery/oracle_qualif/loop-statement.res.oracle index 26816b946bc..38e6e69735b 100644 --- a/src/plugins/wp/tests/wp_gallery/oracle_qualif/loop-statement.res.oracle +++ b/src/plugins/wp/tests/wp_gallery/oracle_qualif/loop-statement.res.oracle @@ -22,7 +22,8 @@ [wp] Proved goals: 15 / 15 Qed: 11 Alt-Ergo: 4 -[wp] Report 'tests/wp_gallery/loop-statement.c.0.report.json' +[wp] Report in: 'tests/wp_gallery/oracle_qualif/loop-statement.0.report.json' +[wp] Report out: 'tests/wp_gallery/result_qualif/loop-statement.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Axiomatic Ploop - 1 (176..200) 1 100% diff --git a/src/plugins/wp/tests/wp_hoare/oracle_qualif/byref.0.res.oracle b/src/plugins/wp/tests/wp_hoare/oracle_qualif/byref.0.res.oracle index d0b99a55052..7f355b798b9 100644 --- a/src/plugins/wp/tests/wp_hoare/oracle_qualif/byref.0.res.oracle +++ b/src/plugins/wp/tests/wp_hoare/oracle_qualif/byref.0.res.oracle @@ -19,7 +19,8 @@ [wp] Proved goals: 11 / 12 Qed: 11 Alt-Ergo: 0 (unsuccess: 1) -[wp] Report 'tests/wp_hoare/byref.i.0.report.json' +[wp] Report in: 'tests/wp_hoare/oracle_qualif/byref.0.report.json' +[wp] Report out: 'tests/wp_hoare/result_qualif/byref.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 2 - 2 100% diff --git a/src/plugins/wp/tests/wp_hoare/oracle_qualif/byref.1.res.oracle b/src/plugins/wp/tests/wp_hoare/oracle_qualif/byref.1.res.oracle index f6c7d899a1f..023df532017 100644 --- a/src/plugins/wp/tests/wp_hoare/oracle_qualif/byref.1.res.oracle +++ b/src/plugins/wp/tests/wp_hoare/oracle_qualif/byref.1.res.oracle @@ -18,7 +18,8 @@ [wp] [Qed] Goal typed_ref_wrong_without_ref_call_f_requires : Valid [wp] Proved goals: 12 / 12 Qed: 12 -[wp] Report 'tests/wp_hoare/byref.i.1.report.json' +[wp] Report in: 'tests/wp_hoare/oracle_qualif/byref.1.report.json' +[wp] Report out: 'tests/wp_hoare/result_qualif/byref.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 2 - 2 100% diff --git a/src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var.res.oracle b/src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var.res.oracle index 9f3c90d052e..e18208021cc 100644 --- a/src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var.res.oracle +++ b/src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var.res.oracle @@ -84,7 +84,8 @@ [wp] [Qed] Goal typed_ref_ref_bd_assigns : Valid [wp] Proved goals: 78 / 78 Qed: 78 -[wp] Report 'tests/wp_hoare/dispatch_var.i.0.report.json' +[wp] Report in: 'tests/wp_hoare/oracle_qualif/dispatch_var.0.report.json' +[wp] Report out: 'tests/wp_hoare/result_qualif/dispatch_var.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success call_ref_ctr 4 - 4 100% diff --git a/src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var2.0.res.oracle b/src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var2.0.res.oracle index d0dfe75fac5..989780bb736 100644 --- a/src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var2.0.res.oracle +++ b/src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var2.0.res.oracle @@ -40,7 +40,8 @@ [wp] [Qed] Goal typed_ref_reset_assigns : Valid [wp] Proved goals: 34 / 34 Qed: 34 -[wp] Report 'tests/wp_hoare/dispatch_var2.i.0.report.json' +[wp] Report in: 'tests/wp_hoare/oracle_qualif/dispatch_var2.0.report.json' +[wp] Report out: 'tests/wp_hoare/result_qualif/dispatch_var2.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success reset 2 - 2 100% diff --git a/src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var2.1.res.oracle b/src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var2.1.res.oracle index a161e9ffe1a..1f12910a8ff 100644 --- a/src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var2.1.res.oracle +++ b/src/plugins/wp/tests/wp_hoare/oracle_qualif/dispatch_var2.1.res.oracle @@ -40,7 +40,8 @@ [wp] [Qed] Goal typed_ref_reset_assigns : Valid [wp] Proved goals: 34 / 34 Qed: 34 -[wp] Report 'tests/wp_hoare/dispatch_var2.i.1.report.json' +[wp] Report in: 'tests/wp_hoare/oracle_qualif/dispatch_var2.1.report.json' +[wp] Report out: 'tests/wp_hoare/result_qualif/dispatch_var2.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success reset 2 - 2 100% diff --git a/src/plugins/wp/tests/wp_hoare/oracle_qualif/isHoare.res.oracle b/src/plugins/wp/tests/wp_hoare/oracle_qualif/isHoare.res.oracle index 9a06ba323da..2c4e686d006 100644 --- a/src/plugins/wp/tests/wp_hoare/oracle_qualif/isHoare.res.oracle +++ b/src/plugins/wp/tests/wp_hoare/oracle_qualif/isHoare.res.oracle @@ -7,7 +7,8 @@ [wp] [Qed] Goal typed_ref_cmp_invalid_addr_as_int_ensures_ok : Valid [wp] Proved goals: 1 / 1 Qed: 1 -[wp] Report 'tests/wp_hoare/isHoare.i.0.report.json' +[wp] Report in: 'tests/wp_hoare/oracle_qualif/isHoare.0.report.json' +[wp] Report out: 'tests/wp_hoare/result_qualif/isHoare.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success cmp_invalid_addr_as_int 1 - 1 100% diff --git a/src/plugins/wp/tests/wp_hoare/oracle_qualif/logicarr.res.oracle b/src/plugins/wp/tests/wp_hoare/oracle_qualif/logicarr.res.oracle index 47e4dd7697a..48086704159 100644 --- a/src/plugins/wp/tests/wp_hoare/oracle_qualif/logicarr.res.oracle +++ b/src/plugins/wp/tests/wp_hoare/oracle_qualif/logicarr.res.oracle @@ -10,7 +10,8 @@ [wp] Proved goals: 3 / 3 Qed: 0 Alt-Ergo: 3 -[wp] Report 'tests/wp_hoare/logicarr.i.0.report.json' +[wp] Report in: 'tests/wp_hoare/oracle_qualif/logicarr.0.report.json' +[wp] Report out: 'tests/wp_hoare/result_qualif/logicarr.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job - 3 (64..88) 3 100% diff --git a/src/plugins/wp/tests/wp_hoare/oracle_qualif/logicref.res.oracle b/src/plugins/wp/tests/wp_hoare/oracle_qualif/logicref.res.oracle index f2a287c6cab..92d91196a20 100644 --- a/src/plugins/wp/tests/wp_hoare/oracle_qualif/logicref.res.oracle +++ b/src/plugins/wp/tests/wp_hoare/oracle_qualif/logicref.res.oracle @@ -12,7 +12,8 @@ [wp] Proved goals: 5 / 5 Qed: 4 Alt-Ergo: 1 -[wp] Report 'tests/wp_hoare/logicref.i.0.report.json' +[wp] Report in: 'tests/wp_hoare/oracle_qualif/logicref.0.report.json' +[wp] Report out: 'tests/wp_hoare/result_qualif/logicref.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success fvrange_n 2 1 (96..120) 3 100% diff --git a/src/plugins/wp/tests/wp_hoare/oracle_qualif/logicref_simple.res.oracle b/src/plugins/wp/tests/wp_hoare/oracle_qualif/logicref_simple.res.oracle index 8233499c143..c815416dfcb 100644 --- a/src/plugins/wp/tests/wp_hoare/oracle_qualif/logicref_simple.res.oracle +++ b/src/plugins/wp/tests/wp_hoare/oracle_qualif/logicref_simple.res.oracle @@ -16,7 +16,8 @@ [wp] Proved goals: 9 / 9 Qed: 5 Alt-Ergo: 4 -[wp] Report 'tests/wp_hoare/logicref_simple.i.0.report.json' +[wp] Report in: 'tests/wp_hoare/oracle_qualif/logicref_simple.0.report.json' +[wp] Report out: 'tests/wp_hoare/result_qualif/logicref_simple.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success fsimple 1 1 (8..20) 2 100% diff --git a/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference.res.oracle b/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference.res.oracle index 0dd9bdf4efe..4644bd595c5 100644 --- a/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference.res.oracle +++ b/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference.res.oracle @@ -30,7 +30,8 @@ [wp] Proved goals: 21 / 23 Qed: 21 Alt-Ergo: 0 (unsuccess: 2) -[wp] Report 'tests/wp_hoare/reference.i.0.report.json' +[wp] Report in: 'tests/wp_hoare/oracle_qualif/reference.0.report.json' +[wp] Report out: 'tests/wp_hoare/result_qualif/reference.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success g 7 - 7 100% diff --git a/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_and_struct.res.oracle b/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_and_struct.res.oracle index 67424143d7c..602cb3ba09c 100644 --- a/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_and_struct.res.oracle +++ b/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_and_struct.res.oracle @@ -39,7 +39,8 @@ [wp] Proved goals: 32 / 32 Qed: 27 Alt-Ergo: 5 -[wp] Report 'tests/wp_hoare/reference_and_struct.i.0.report.json' +[wp] Report in: 'tests/wp_hoare/oracle_qualif/reference_and_struct.0.report.json' +[wp] Report out: 'tests/wp_hoare/result_qualif/reference_and_struct.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success reset 2 - 2 100% diff --git a/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_array.res.oracle b/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_array.res.oracle index 9b452f762f8..048fdb55f65 100644 --- a/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_array.res.oracle +++ b/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_array.res.oracle @@ -43,12 +43,13 @@ [wp] Proved goals: 36 / 36 Qed: 24 Alt-Ergo: 12 -[wp] Report 'tests/wp_hoare/reference_array.i.0.report.json' +[wp] Report in: 'tests/wp_hoare/oracle_qualif/reference_array.0.report.json' +[wp] Report out: 'tests/wp_hoare/result_qualif/reference_array.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success reset_1_5 3 1 (16..28) 4 100% -load_1_5 3 1 (12..24) 4 100% -add_1_5 3 1 (12..24) 4 100% +load_1_5 3 1 (16..28) 4 100% +add_1_5 3 1 (16..28) 4 100% calls_on_array_dim_1 5 3 (8..20) 8 100% calls_on_array_dim_2_to_1 5 3 (8..20) 8 100% calls_on_array_dim_2 5 3 (4..16) 8 100% diff --git a/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_array_simple.res.oracle b/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_array_simple.res.oracle index bcc5f4a414b..4e5bda55247 100644 --- a/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_array_simple.res.oracle +++ b/src/plugins/wp/tests/wp_hoare/oracle_qualif/reference_array_simple.res.oracle @@ -9,7 +9,8 @@ [wp] [Qed] Goal typed_ref_call_f3_ensures : Valid [wp] Proved goals: 3 / 3 Qed: 3 -[wp] Report 'tests/wp_hoare/reference_array_simple.i.0.report.json' +[wp] Report in: 'tests/wp_hoare/oracle_qualif/reference_array_simple.0.report.json' +[wp] Report out: 'tests/wp_hoare/result_qualif/reference_array_simple.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success call_f1 1 - 1 100% diff --git a/src/plugins/wp/tests/wp_hoare/oracle_qualif/refguards.res.oracle b/src/plugins/wp/tests/wp_hoare/oracle_qualif/refguards.res.oracle index b183563a0de..dfe7c1cee8a 100644 --- a/src/plugins/wp/tests/wp_hoare/oracle_qualif/refguards.res.oracle +++ b/src/plugins/wp/tests/wp_hoare/oracle_qualif/refguards.res.oracle @@ -16,7 +16,8 @@ [wp] Proved goals: 8 / 9 Qed: 7 Alt-Ergo: 1 (unsuccess: 1) -[wp] Report 'tests/wp_hoare/refguards.i.0.report.json' +[wp] Report in: 'tests/wp_hoare/oracle_qualif/refguards.0.report.json' +[wp] Report out: 'tests/wp_hoare/result_qualif/refguards.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 1 - 1 100% diff --git a/src/plugins/wp/tests/wp_manual/oracle_qualif/manual.0.res.oracle b/src/plugins/wp/tests/wp_manual/oracle_qualif/manual.0.res.oracle index 86b06c6e37c..d8f446952e2 100644 --- a/src/plugins/wp/tests/wp_manual/oracle_qualif/manual.0.res.oracle +++ b/src/plugins/wp/tests/wp_manual/oracle_qualif/manual.0.res.oracle @@ -11,7 +11,8 @@ [wp] Proved goals: 2 / 2 Qed: 1 Alt-Ergo: 1 -[wp] Report 'tests/wp_manual/manual.i.0.report.json' +[wp] Report in: 'tests/wp_manual/oracle_qualif/manual.0.report.json' +[wp] Report out: 'tests/wp_manual/result_qualif/manual.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success swap 1 1 (12..24) 2 100% diff --git a/src/plugins/wp/tests/wp_manual/oracle_qualif/manual.1.res.oracle b/src/plugins/wp/tests/wp_manual/oracle_qualif/manual.1.res.oracle index 7380ed072cd..1782d6f5cbd 100644 --- a/src/plugins/wp/tests/wp_manual/oracle_qualif/manual.1.res.oracle +++ b/src/plugins/wp/tests/wp_manual/oracle_qualif/manual.1.res.oracle @@ -17,7 +17,8 @@ [wp] Proved goals: 8 / 8 Qed: 5 Alt-Ergo: 3 -[wp] Report 'tests/wp_manual/manual.i.1.report.json' +[wp] Report in: 'tests/wp_manual/oracle_qualif/manual.1.report.json' +[wp] Report out: 'tests/wp_manual/result_qualif/manual.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success swap 5 3 (16..28) 8 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.0.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.0.res.oracle index 1e817d3077d..dad1045f7f1 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.0.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.0.res.oracle @@ -8,7 +8,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_plugin/abs.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/abs.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/abs.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success abs - 1 (4..16) 1 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.1.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.1.res.oracle index da2e3b662c9..10af4e85904 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.1.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.1.res.oracle @@ -9,7 +9,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 Coq: 1 -[wp] Report 'tests/wp_plugin/abs.i.1.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/abs.1.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/abs.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success abs - - 1 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.2.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.2.res.oracle index 45650ee45ad..a1093f1b486 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.2.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.2.res.oracle @@ -8,7 +8,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 alt-ergo: 1 -[wp] Report 'tests/wp_plugin/abs.i.2.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/abs.2.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/abs.2.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success abs - - 1 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/asm.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/asm.res.oracle index 95ecc4413a6..4ea3ccfbe02 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/asm.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/asm.res.oracle @@ -10,7 +10,8 @@ [wp] Proved goals: 1 / 3 Qed: 1 Alt-Ergo: 0 (unsuccess: 2) -[wp] Report 'tests/wp_plugin/asm.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/asm.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/asm.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success main 1 - 3 33.3% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.0.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.0.res.oracle index 9b576523536..8361dfbe06c 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.0.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.0.res.oracle @@ -14,7 +14,8 @@ [wp] Proved goals: 3 / 7 Qed: 2 Alt-Ergo: 1 (unsuccess: 4) -[wp] Report 'tests/wp_plugin/bool.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/bool.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/bool.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.1.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.1.res.oracle index 6bcbed6d8bc..04c1d1900f3 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.1.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.1.res.oracle @@ -14,11 +14,12 @@ [wp] Proved goals: 7 / 7 Qed: 2 Alt-Ergo: 5 -[wp] Report 'tests/wp_plugin/bool.i.1.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/bool.1.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/bool.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job - 1 (12..24) 1 100% -bor_bool - 2 (12..24) 2 100% +bor_bool - 2 (8..20) 2 100% band_bool 1 1 (20..32) 2 100% bxor_bool 1 1 (8..20) 2 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/copy.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/copy.res.oracle index 7f5deafd0c1..257e195abe6 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/copy.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/copy.res.oracle @@ -17,7 +17,8 @@ [wp] Proved goals: 10 / 10 Qed: 4 Alt-Ergo: 6 -[wp] Report 'tests/wp_plugin/copy.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/copy.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/copy.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success copy 4 6 (288..336) 10 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/dynamic.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/dynamic.res.oracle index 30dcd6fe79e..fd19084848e 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/dynamic.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/dynamic.res.oracle @@ -59,7 +59,8 @@ [wp] Proved goals: 50 / 51 Qed: 47 Alt-Ergo: 3 (unsuccess: 1) -[wp] Report 'tests/wp_plugin/dynamic.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/dynamic.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/dynamic.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success call 2 2 (56..80) 4 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.0.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.0.res.oracle index 3b6766f3873..c940f2f2578 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.0.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.0.res.oracle @@ -13,7 +13,8 @@ [wp] Proved goals: 1 / 6 Qed: 1 Alt-Ergo: 0 (unsuccess: 5) -[wp] Report 'tests/wp_plugin/flash.c.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/flash.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/flash.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job 1 - 6 16.7% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.1.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.1.res.oracle index 0526455b58b..76f1cf10976 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.1.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.1.res.oracle @@ -15,7 +15,8 @@ [wp] Proved goals: 6 / 6 Qed: 1 Alt-Ergo: 5 -[wp] Report 'tests/wp_plugin/flash.c.1.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/flash.1.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/flash.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job 1 5 (88..112) 6 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.2.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.2.res.oracle index 93ab36295ed..43d789adfdc 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.2.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/flash.2.res.oracle @@ -12,7 +12,8 @@ [wp] [Qed] Goal typed_flash_job_ensures_WriteValues : Valid [wp] Proved goals: 6 / 6 Qed: 6 -[wp] Report 'tests/wp_plugin/flash.c.2.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/flash.2.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/flash.2.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job 6 - 6 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.0.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.0.res.oracle index e99bbe52581..410aec2eb75 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.0.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.0.res.oracle @@ -11,7 +11,8 @@ [wp] [Coq] Goal typed_output_ensures_KO : Unsuccess [wp] Proved goals: 0 / 1 Coq: 0 (unsuccess: 1) -[wp] Report 'tests/wp_plugin/float_format.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/float_format.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/float_format.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success output - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.1.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.1.res.oracle index 4abab0bd7af..a4124a02b3e 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.1.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.1.res.oracle @@ -10,7 +10,8 @@ [wp] [Alt-Ergo] Goal typed_output_ensures_KO : Unsuccess [wp] Proved goals: 0 / 1 Alt-Ergo: 0 (unsuccess: 1) -[wp] Report 'tests/wp_plugin/float_format.i.1.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/float_format.1.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/float_format.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success output - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.2.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.2.res.oracle index 2559e2a4b9d..f2836be71fc 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.2.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.2.res.oracle @@ -10,7 +10,8 @@ [wp] [alt-ergo] Goal typed_output_ensures_KO : Unsuccess [wp] Proved goals: 0 / 1 alt-ergo: 0 (unsuccess: 1) -[wp] Report 'tests/wp_plugin/float_format.i.2.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/float_format.2.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/float_format.2.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success output - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_real.0.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_real.0.res.oracle index 37401296885..5200a07c448 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_real.0.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_real.0.res.oracle @@ -11,7 +11,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_plugin/float_real.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/float_real.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/float_real.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success dequal - 1 (12..24) 1 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_real.1.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_real.1.res.oracle index 635a026579a..5ff495a8da3 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_real.1.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_real.1.res.oracle @@ -10,7 +10,8 @@ [wp] [Alt-Ergo] Goal typed_dequal_ensures : Unsuccess [wp] Proved goals: 0 / 1 Alt-Ergo: 0 (unsuccess: 1) -[wp] Report 'tests/wp_plugin/float_real.i.1.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/float_real.1.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/float_real.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success dequal - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/frame.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/frame.res.oracle index 1d743b2e6bb..09ce81e04f0 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/frame.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/frame.res.oracle @@ -13,7 +13,8 @@ [wp] Proved goals: 2 / 6 Qed: 2 Alt-Ergo: 0 (unsuccess: 4) -[wp] Report 'tests/wp_plugin/frame.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/frame.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/frame.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success local 1 - 2 50.0% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/ground_real.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/ground_real.res.oracle index c34aa5aa74d..fddcff86c50 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/ground_real.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/ground_real.res.oracle @@ -7,7 +7,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_plugin/ground_real.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/ground_real.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/ground_real.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Lemma - 1 (1..8) 1 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/inductive.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/inductive.res.oracle index fdb495c5357..44b0803a513 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/inductive.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/inductive.res.oracle @@ -10,7 +10,8 @@ [wp] Proved goals: 2 / 2 Qed: 0 Coq: 2 -[wp] Report 'tests/wp_plugin/inductive.c.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/inductive.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/inductive.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Lemma - - 2 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_const.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_const.res.oracle index 483dc58e36e..b16a952d48e 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_const.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_const.res.oracle @@ -11,7 +11,8 @@ [wp] Proved goals: 2 / 4 Qed: 2 Alt-Ergo: 0 (unsuccess: 2) -[wp] Report 'tests/wp_plugin/init_const.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/init_const.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/init_const.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success fA - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_const_guard.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_const_guard.res.oracle index 7fa9591a61b..2f6b498eb88 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_const_guard.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_const_guard.res.oracle @@ -14,7 +14,8 @@ [wp] Proved goals: 6 / 7 Qed: 4 Alt-Ergo: 2 (unsuccess: 1) -[wp] Report 'tests/wp_plugin/init_const_guard.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/init_const_guard.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/init_const_guard.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 3 1 (16..28) 4 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_extern.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_extern.res.oracle index ec5da8c77e1..66d00763f16 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_extern.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_extern.res.oracle @@ -11,7 +11,8 @@ [wp] Proved goals: 1 / 3 Qed: 1 Alt-Ergo: 0 (unsuccess: 2) -[wp] Report 'tests/wp_plugin/init_extern.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/init_extern.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/init_extern.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 1 - 3 33.3% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_valid.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_valid.res.oracle index 0eda5beada3..8ba6d1158dc 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_valid.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/init_valid.res.oracle @@ -11,7 +11,8 @@ [wp] Proved goals: 3 / 4 Qed: 3 Alt-Ergo: 0 (unsuccess: 1) -[wp] Report 'tests/wp_plugin/init_valid.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/init_valid.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/init_valid.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success validA 2 - 2 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/initarr.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/initarr.res.oracle index fdaf378128c..ca355f5d5cd 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/initarr.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/initarr.res.oracle @@ -9,7 +9,8 @@ [wp] Proved goals: 2 / 2 Qed: 0 Alt-Ergo: 2 -[wp] Report 'tests/wp_plugin/initarr.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/initarr.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/initarr.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job - 2 (40..52) 2 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/injector.0.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/injector.0.res.oracle index 7cbec9994f8..5bfd4b969d1 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/injector.0.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/injector.0.res.oracle @@ -19,7 +19,8 @@ [wp] [Qed] Goal typed_f_SUCCESS_ensures_qed_ok_4 : Valid [wp] Proved goals: 13 / 13 Qed: 13 -[wp] Report 'tests/wp_plugin/injector.c.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/injector.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/injector.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 13 - 13 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/injector.1.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/injector.1.res.oracle index 7bf755e5732..6ae999d7186 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/injector.1.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/injector.1.res.oracle @@ -10,7 +10,8 @@ [wp] [Alt-Ergo] Goal typed_f_ko_1_ensures_qed_ko_3 : Unsuccess [wp] Proved goals: 0 / 4 Alt-Ergo: 0 (unsuccess: 4) -[wp] Report 'tests/wp_plugin/injector.c.1.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/injector.1.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/injector.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - - 4 0.0% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/loop.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loop.res.oracle index 66d473a27d5..74f07f5036c 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/loop.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loop.res.oracle @@ -16,7 +16,8 @@ [wp] Proved goals: 8 / 9 Qed: 3 Alt-Ergo: 5 (unsuccess: 1) -[wp] Report 'tests/wp_plugin/loop.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/loop.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/loop.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success init 3 5 (104..128) 9 88.9% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopcurrent.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopcurrent.res.oracle index 0eb100dcd2f..7de8fa06743 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopcurrent.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopcurrent.res.oracle @@ -12,7 +12,8 @@ [wp] [Qed] Goal typed_f_loop_invariant_2_established : Valid [wp] Proved goals: 4 / 4 Qed: 4 -[wp] Report 'tests/wp_plugin/loopcurrent.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/loopcurrent.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/loopcurrent.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 4 - 4 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopentry.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopentry.res.oracle index 42b8084aefb..52c22ca6ebd 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopentry.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopentry.res.oracle @@ -12,7 +12,8 @@ [wp] [Qed] Goal typed_f_loop_invariant_2_established : Valid [wp] Proved goals: 4 / 4 Qed: 4 -[wp] Report 'tests/wp_plugin/loopentry.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/loopentry.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/loopentry.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 4 - 4 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopextra.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopextra.res.oracle index 3ff1c5aa732..bdc927c48c2 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopextra.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/loopextra.res.oracle @@ -13,7 +13,8 @@ [wp] [Qed] Goal typed_f_assert_3 : Valid [wp] Proved goals: 3 / 3 Qed: 3 -[wp] Report 'tests/wp_plugin/loopextra.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/loopextra.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/loopextra.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 3 - 3 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/mask.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/mask.res.oracle index e0af8eb5379..646eb1516ce 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/mask.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/mask.res.oracle @@ -8,7 +8,8 @@ [wp] [Qed] Goal typed_compute_ensures_B : Valid [wp] Proved goals: 2 / 2 Qed: 2 -[wp] Report 'tests/wp_plugin/mask.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/mask.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/mask.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success compute 2 - 2 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/nth.0.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/nth.0.res.oracle index 6fc49b800d3..1dc1b577aae 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/nth.0.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/nth.0.res.oracle @@ -9,7 +9,8 @@ [wp] Proved goals: 3 / 3 Qed: 1 Alt-Ergo: 2 -[wp] Report 'tests/wp_plugin/nth.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/nth.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/nth.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Axiomatic Nth 1 2 (72..96) 3 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/nth.1.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/nth.1.res.oracle index 053a73d1166..6f80bff20c4 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/nth.1.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/nth.1.res.oracle @@ -10,7 +10,8 @@ [wp] Proved goals: 4 / 4 Qed: 1 alt-ergo: 3 -[wp] Report 'tests/wp_plugin/nth.i.1.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/nth.1.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/nth.1.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Axiomatic Nth 1 - 4 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/overarray.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/overarray.res.oracle index 09dcba792d0..863d5beb28b 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/overarray.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/overarray.res.oracle @@ -19,7 +19,8 @@ [wp] Proved goals: 8 / 12 Qed: 8 Alt-Ergo: 0 (unsuccess: 4) -[wp] Report 'tests/wp_plugin/overarray.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/overarray.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/overarray.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f1_ok 2 - 2 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/overassign.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/overassign.res.oracle index 35e9b6933aa..388a727ed98 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/overassign.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/overassign.res.oracle @@ -19,7 +19,8 @@ [wp] Proved goals: 8 / 12 Qed: 4 Alt-Ergo: 4 (unsuccess: 4) -[wp] Report 'tests/wp_plugin/overassign.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/overassign.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/overassign.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f1_ok 2 - 2 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/params.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/params.res.oracle index 10ae7236816..f2386c16780 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/params.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/params.res.oracle @@ -7,7 +7,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_plugin/params.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/params.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/params.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Lemma - 1 (1..12) 1 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/plet.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/plet.res.oracle index dfed13cf9c8..9bf2920a577 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/plet.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/plet.res.oracle @@ -7,7 +7,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_plugin/plet.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/plet.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/plet.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Axiomatic Test - 1 (8..20) 1 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/polarity.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/polarity.res.oracle index 32502e791d3..f857fec4d7e 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/polarity.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/polarity.res.oracle @@ -10,7 +10,8 @@ [wp] [Alt-Ergo] Goal typed_f_assert : Unsuccess (Stronger) [wp] Proved goals: 0 / 1 Alt-Ergo: 0 (unsuccess: 1) -[wp] Report 'tests/wp_plugin/polarity.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/polarity.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/polarity.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/prenex.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/prenex.res.oracle index f5023a17dc2..0ad90b19749 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/prenex.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/prenex.res.oracle @@ -19,7 +19,8 @@ [wp] Proved goals: 12 / 12 Qed: 7 Alt-Ergo: 5 -[wp] Report 'tests/wp_plugin/prenex.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/prenex.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/prenex.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success diag 7 5 (64..88) 12 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/repeat.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/repeat.res.oracle index c1c8354536c..a9577c59998 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/repeat.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/repeat.res.oracle @@ -56,7 +56,8 @@ [wp] Proved goals: 47 / 47 Qed: 42 Alt-Ergo: 5 -[wp] Report 'tests/wp_plugin/repeat.c.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/repeat.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/repeat.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success master 3 - 3 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/rte.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/rte.res.oracle index 3749d98a6ad..5bc109acf7a 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/rte.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/rte.res.oracle @@ -19,7 +19,8 @@ [wp] Proved goals: 1 / 6 Qed: 1 Alt-Ergo: 0 (unsuccess: 5) -[wp] Report 'tests/wp_plugin/rte.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/rte.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/rte.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job 1 - 5 20.0% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.0.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.0.res.oracle index 5a6a837e1f4..a9fb5006c56 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.0.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.0.res.oracle @@ -46,7 +46,8 @@ [wp] Proved goals: 39 / 39 Qed: 25 Alt-Ergo: 14 -[wp] Report 'tests/wp_plugin/sequence.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/sequence.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/sequence.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success no_calls 5 5 (8..20) 10 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.1.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.1.res.oracle index 1c817abc79d..e2333a2acdc 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.1.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.1.res.oracle @@ -41,7 +41,8 @@ [wp] Proved goals: 34 / 34 Qed: 22 alt-ergo: 12 -[wp] Report 'tests/wp_plugin/sequence.i.1.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/sequence.1.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/sequence.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success no_calls 2 - 5 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.2.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.2.res.oracle index 06f3a95d39e..5841b9f41a0 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.2.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.2.res.oracle @@ -5,5 +5,6 @@ [wp] Warning: Missing RTE guards [wp] 0 goal scheduled [wp] Proved goals: 0 / 0 -[wp] Report 'tests/wp_plugin/sequence.i.2.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/sequence.2.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/sequence.2.report.json' ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/stmt.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/stmt.res.oracle index b891bec1a72..5e34d21ac61 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/stmt.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/stmt.res.oracle @@ -25,7 +25,8 @@ [wp] [Qed] Goal typed_h_assert_2 : Valid [wp] Proved goals: 10 / 10 Qed: 10 -[wp] Report 'tests/wp_plugin/stmt.c.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/stmt.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/stmt.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 5 - 5 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.res.oracle index cd836f893d9..deeda948d38 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.res.oracle @@ -51,7 +51,8 @@ [wp] Proved goals: 44 / 44 Qed: 23 Alt-Ergo: 21 -[wp] Report 'tests/wp_plugin/string_c.c.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/string_c.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/string_c.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success memcpy 6 6 (864..960) 12 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/struct.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/struct.res.oracle index 5d5925a673e..71fab82397e 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/struct.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/struct.res.oracle @@ -24,7 +24,8 @@ [wp] [Qed] Goal typed_id_ensures_qed_ok_P2 : Valid [wp] Proved goals: 18 / 18 Qed: 18 -[wp] Report 'tests/wp_plugin/struct.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/struct.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/struct.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success id 2 - 2 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/struct_hack.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/struct_hack.res.oracle index 14cfd26a072..1ee633fed3a 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/struct_hack.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/struct_hack.res.oracle @@ -23,7 +23,8 @@ [wp] Proved goals: 10 / 10 Qed: 6 Alt-Ergo: 4 -[wp] Report 'tests/wp_plugin/struct_hack.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/struct_hack.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/struct_hack.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f0 3 2 (24..36) 5 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/subset.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/subset.res.oracle index bf2ffa73ad3..326d5fff53c 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/subset.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/subset.res.oracle @@ -8,8 +8,9 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_plugin/subset.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/subset.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/subset.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -mem - 1 (128..152) 1 100% +mem - 1 (120..144) 1 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/subset_fopen.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/subset_fopen.res.oracle index b6125143bf1..0c8d87d6a6b 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/subset_fopen.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/subset_fopen.res.oracle @@ -12,8 +12,9 @@ [wp] Proved goals: 4 / 5 Qed: 3 Alt-Ergo: 1 (unsuccess: 1) -[wp] Report 'tests/wp_plugin/subset_fopen.c.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/subset_fopen.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/subset_fopen.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -f 3 1 (80..104) 5 80.0% +f 3 1 (88..112) 5 80.0% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/trig.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/trig.res.oracle index 2c19f508dd4..afd697426f5 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/trig.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/trig.res.oracle @@ -11,7 +11,8 @@ [wp] Proved goals: 3 / 4 Qed: 1 Alt-Ergo: 2 (unsuccess: 1) -[wp] Report 'tests/wp_plugin/trig.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/trig.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/trig.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success foo 1 2 (48..60) 4 75.0% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsafe-arrays.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsafe-arrays.res.oracle index 6ce8eaf3651..5c821da84d4 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsafe-arrays.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsafe-arrays.res.oracle @@ -10,7 +10,8 @@ [wp] Proved goals: 3 / 3 Qed: 2 Alt-Ergo: 1 -[wp] Report 'tests/wp_plugin/unsafe-arrays.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/unsafe-arrays.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/unsafe-arrays.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 2 1 (16..28) 3 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsigned.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsigned.res.oracle index 8a4e9399f45..7cae1e5971d 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsigned.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsigned.res.oracle @@ -7,7 +7,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 Script: 1 -[wp] Report 'tests/wp_plugin/unsigned.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/unsigned.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/unsigned.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Lemma - - (4..16) 1 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsupported_init.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsupported_init.res.oracle index b8aa2126915..fa61ef3d94b 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsupported_init.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/unsupported_init.res.oracle @@ -12,7 +12,8 @@ [wp] Proved goals: 1 / 2 Qed: 1 Alt-Ergo: 0 (unsuccess: 1) -[wp] Report 'tests/wp_plugin/unsupported_init.i.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/unsupported_init.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/unsupported_init.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 1 - 2 50.0% diff --git a/src/plugins/wp/tests/wp_store/oracle_qualif/array.res.oracle b/src/plugins/wp/tests/wp_store/oracle_qualif/array.res.oracle index 1106baba2b2..a59963da14d 100644 --- a/src/plugins/wp/tests/wp_store/oracle_qualif/array.res.oracle +++ b/src/plugins/wp/tests/wp_store/oracle_qualif/array.res.oracle @@ -8,7 +8,8 @@ [wp] [Qed] Goal typed_g_ensures_P_addr_shift_qed_ok : Valid [wp] Proved goals: 2 / 2 Qed: 2 -[wp] Report 'tests/wp_store/array.i.0.report.json' +[wp] Report in: 'tests/wp_store/oracle_qualif/array.0.report.json' +[wp] Report out: 'tests/wp_store/result_qualif/array.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success g 2 - 2 100% diff --git a/src/plugins/wp/tests/wp_store/oracle_qualif/natural.res.oracle b/src/plugins/wp/tests/wp_store/oracle_qualif/natural.res.oracle index 66190d57ab9..bf77aed24b2 100644 --- a/src/plugins/wp/tests/wp_store/oracle_qualif/natural.res.oracle +++ b/src/plugins/wp/tests/wp_store/oracle_qualif/natural.res.oracle @@ -9,7 +9,8 @@ [wp] [Qed] Goal typed_f_assigns_part2 : Valid [wp] Proved goals: 3 / 3 Qed: 3 -[wp] Report 'tests/wp_store/natural.i.0.report.json' +[wp] Report in: 'tests/wp_store/oracle_qualif/natural.0.report.json' +[wp] Report out: 'tests/wp_store/result_qualif/natural.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 3 - 3 100% diff --git a/src/plugins/wp/tests/wp_store/oracle_qualif/nonaliasing.0.res.oracle b/src/plugins/wp/tests/wp_store/oracle_qualif/nonaliasing.0.res.oracle index 3dc493d3e12..009ad490235 100644 --- a/src/plugins/wp/tests/wp_store/oracle_qualif/nonaliasing.0.res.oracle +++ b/src/plugins/wp/tests/wp_store/oracle_qualif/nonaliasing.0.res.oracle @@ -9,7 +9,8 @@ [wp] Proved goals: 2 / 2 Qed: 0 Alt-Ergo: 2 -[wp] Report 'tests/wp_store/nonaliasing.i.0.report.json' +[wp] Report in: 'tests/wp_store/oracle_qualif/nonaliasing.0.report.json' +[wp] Report out: 'tests/wp_store/result_qualif/nonaliasing.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - 2 (24..36) 2 100% diff --git a/src/plugins/wp/tests/wp_store/oracle_qualif/nonaliasing.1.res.oracle b/src/plugins/wp/tests/wp_store/oracle_qualif/nonaliasing.1.res.oracle index c491cb3a4d4..ef2e7cc9a81 100644 --- a/src/plugins/wp/tests/wp_store/oracle_qualif/nonaliasing.1.res.oracle +++ b/src/plugins/wp/tests/wp_store/oracle_qualif/nonaliasing.1.res.oracle @@ -8,7 +8,8 @@ [wp] [Alt-Ergo] Goal typed_f_ensures_qed_ko_Q_oracle_ko : Unsuccess [wp] Proved goals: 0 / 2 Alt-Ergo: 0 (unsuccess: 2) -[wp] Report 'tests/wp_store/nonaliasing.i.1.report.json' +[wp] Report in: 'tests/wp_store/oracle_qualif/nonaliasing.1.report.json' +[wp] Report out: 'tests/wp_store/result_qualif/nonaliasing.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - - 2 0.0% diff --git a/src/plugins/wp/tests/wp_store/oracle_qualif/struct.res.oracle b/src/plugins/wp/tests/wp_store/oracle_qualif/struct.res.oracle index f024426f2ef..1978be6ecd1 100644 --- a/src/plugins/wp/tests/wp_store/oracle_qualif/struct.res.oracle +++ b/src/plugins/wp/tests/wp_store/oracle_qualif/struct.res.oracle @@ -13,10 +13,11 @@ [wp] Proved goals: 6 / 6 Qed: 3 Alt-Ergo: 3 -[wp] Report 'tests/wp_store/struct.i.0.report.json' +[wp] Report in: 'tests/wp_store/oracle_qualif/struct.0.report.json' +[wp] Report out: 'tests/wp_store/result_qualif/struct.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success g 2 - 2 100% -f 1 1 (20..32) 2 100% +f 1 1 (16..28) 2 100% main - 2 (36..48) 2 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_tip/oracle_qualif/tac_split_quantifiers.res.oracle b/src/plugins/wp/tests/wp_tip/oracle_qualif/tac_split_quantifiers.res.oracle index c11cdf6e713..066b6e99fb7 100644 --- a/src/plugins/wp/tests/wp_tip/oracle_qualif/tac_split_quantifiers.res.oracle +++ b/src/plugins/wp/tests/wp_tip/oracle_qualif/tac_split_quantifiers.res.oracle @@ -10,7 +10,8 @@ [wp] [Tactical] Goal typed_split_ensures_Hyp_Forall_And : Unsuccess [wp] [Tactical] Goal typed_split_ensures_Hyp_Forall_Or_bis : Unsuccess [wp] Proved goals: 0 / 5 -[wp] Report 'tests/wp_tip/tac_split_quantifiers.i.0.report.json' +[wp] Report in: 'tests/wp_tip/oracle_qualif/tac_split_quantifiers.0.report.json' +[wp] Report out: 'tests/wp_tip/result_qualif/tac_split_quantifiers.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success split - - 5 0.0% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/array_initialized.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/array_initialized.0.res.oracle index 55bc508f1a9..dce5ad05602 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/array_initialized.0.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/array_initialized.0.res.oracle @@ -14,12 +14,13 @@ [wp] Proved goals: 5 / 5 Qed: 1 Alt-Ergo: 4 -[wp] Report 'tests/wp_typed/array_initialized.c.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/array_initialized.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/array_initialized.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success main1 - 1 (1..12) 1 100% main2 - 1 (96..120) 1 100% main3 1 - 1 100% -main_pointer - 1 (36..48) 1 100% +main_pointer - 1 (40..52) 1 100% simpl - 1 (16..28) 1 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/array_initialized.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/array_initialized.1.res.oracle index 87594e50f05..71bf98b2365 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/array_initialized.1.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/array_initialized.1.res.oracle @@ -14,12 +14,13 @@ [wp] Proved goals: 5 / 5 Qed: 1 Alt-Ergo: 4 -[wp] Report 'tests/wp_typed/array_initialized.c.1.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/array_initialized.1.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/array_initialized.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success main1 - 1 (16..28) 1 100% main2 - 1 (112..136) 1 100% main3 1 - 1 100% -main_pointer - 1 (72..96) 1 100% +main_pointer - 1 (64..88) 1 100% simpl - 1 (16..28) 1 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/avar.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/avar.res.oracle index ea8b44d41a6..1ab64635715 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/avar.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/avar.res.oracle @@ -9,7 +9,8 @@ [wp] [Qed] Goal typed_g_call_f_requires : Valid [wp] Proved goals: 1 / 1 Qed: 1 -[wp] Report 'tests/wp_typed/avar.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/avar.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/avar.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success g 1 - 1 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/shift_lemma.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/shift_lemma.res.oracle index bc4d77cc431..2c09f2a29b7 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/shift_lemma.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/shift_lemma.res.oracle @@ -12,7 +12,8 @@ [wp] Proved goals: 5 / 5 Qed: 2 Alt-Ergo: 3 -[wp] Report 'tests/wp_typed/shift_lemma.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/shift_lemma.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/shift_lemma.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 2 3 (20..32) 5 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/struct_array_type.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/struct_array_type.res.oracle index 2ef7db89cdd..d2f900f731b 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/struct_array_type.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/struct_array_type.res.oracle @@ -8,8 +8,9 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_typed/struct_array_type.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/struct_array_type.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/struct_array_type.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -f - 1 (8..20) 1 100% +f - 1 (12..24) 1 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_alloc.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_alloc.0.res.oracle index afbfa61d8da..62e63ecccc1 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_alloc.0.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_alloc.0.res.oracle @@ -14,7 +14,8 @@ [wp] Proved goals: 7 / 7 Qed: 4 Alt-Ergo: 3 -[wp] Report 'tests/wp_typed/unit_alloc.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_alloc.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_alloc.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job 2 2 (20..32) 4 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_alloc.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_alloc.1.res.oracle index 7a194c5adbf..8042ad8094d 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_alloc.1.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_alloc.1.res.oracle @@ -14,7 +14,8 @@ [wp] Proved goals: 7 / 7 Qed: 4 Alt-Ergo: 3 -[wp] Report 'tests/wp_typed/unit_alloc.i.1.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_alloc.1.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_alloc.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job 2 2 (20..32) 4 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_bitwise.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_bitwise.0.res.oracle index a595a3d3871..fe4620e5d8a 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_bitwise.0.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_bitwise.0.res.oracle @@ -68,10 +68,11 @@ [wp] Proved goals: 61 / 61 Qed: 41 Alt-Ergo: 20 -[wp] Report 'tests/wp_typed/unit_bitwise.c.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_bitwise.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_bitwise.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success -Lemma 10 8 (28..40) 18 100% +Lemma 10 8 (32..44) 18 100% ------------------------------------------------------------- Functions WP Alt-Ergo Total Success band_int 2 - 2 100% @@ -99,7 +100,7 @@ bor_uchar 1 - 1 100% bxor_uchar 1 1 (12..24) 2 100% bnot_uchar 1 - 1 100% lshift_uchar 1 - 1 100% -rshift_uchar - 1 (24..36) 1 100% +rshift_uchar - 1 (20..32) 1 100% band1_ushort 1 1 (12..24) 2 100% band1_ulong 1 1 (12..24) 2 100% cast 8 - 8 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_bitwise.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_bitwise.1.res.oracle index 07921fa2d8e..537c54ddc92 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_bitwise.1.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_bitwise.1.res.oracle @@ -10,7 +10,8 @@ [wp] [Alt-Ergo] Goal typed_cast_assert_ko : Unsuccess [wp] Proved goals: 0 / 4 Alt-Ergo: 0 (unsuccess: 4) -[wp] Report 'tests/wp_typed/unit_bitwise.c.1.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_bitwise.1.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_bitwise.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success band_int - - 1 0.0% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_call.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_call.res.oracle index 73abc007aa2..2c2a8a3c9af 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_call.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_call.res.oracle @@ -10,7 +10,8 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_typed/unit_call.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_call.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_call.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job - 1 (1..12) 1 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cast.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cast.res.oracle index 67b88136c1a..b3a20993756 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cast.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cast.res.oracle @@ -10,8 +10,9 @@ [wp] Proved goals: 1 / 1 Qed: 0 Alt-Ergo: 1 -[wp] Report 'tests/wp_typed/unit_cast.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_cast.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_cast.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -f - 1 (20..32) 1 100% +f - 1 (16..28) 1 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cst.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cst.res.oracle index 0bc7e2733a3..92af795f9ed 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cst.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_cst.res.oracle @@ -8,7 +8,8 @@ [wp] [Qed] Goal typed_f_ensures_B : Valid [wp] Proved goals: 2 / 2 Qed: 2 -[wp] Report 'tests/wp_typed/unit_cst.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_cst.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_cst.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 2 - 2 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_float.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_float.res.oracle index 8e9d20e5c73..419e4dca2d7 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_float.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_float.res.oracle @@ -15,7 +15,8 @@ [wp] [Qed] Goal typed_main_ensures_VAR_D : Valid [wp] Proved goals: 6 / 6 Qed: 6 -[wp] Report 'tests/wp_typed/unit_float.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_float.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_float.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success main 6 - 6 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_hard.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_hard.res.oracle index 911633abb53..de308aaa970 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_hard.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_hard.res.oracle @@ -10,7 +10,8 @@ [wp] Proved goals: 2 / 3 Qed: 2 Alt-Ergo: 0 (unsuccess: 1) -[wp] Report 'tests/wp_typed/unit_hard.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_hard.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_hard.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success main 2 - 3 66.7% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_ite.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_ite.res.oracle index 2bf33e40c9f..0953d5b7dff 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_ite.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_ite.res.oracle @@ -7,7 +7,8 @@ [wp] [Qed] Goal typed_check_ensures : Valid [wp] Proved goals: 1 / 1 Qed: 1 -[wp] Report 'tests/wp_typed/unit_ite.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_ite.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_ite.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success check 1 - 1 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_labels.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_labels.res.oracle index 7e46e25582e..de344cecde4 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_labels.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_labels.res.oracle @@ -10,7 +10,8 @@ [wp] Proved goals: 3 / 3 Qed: 0 Alt-Ergo: 3 -[wp] Report 'tests/wp_typed/unit_labels.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_labels.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_labels.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success duplet - 3 (20..32) 3 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_lemma.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_lemma.res.oracle index 20ba906fa59..862caecbcc6 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_lemma.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_lemma.res.oracle @@ -12,7 +12,8 @@ [wp] Proved goals: 5 / 6 Qed: 0 Alt-Ergo: 5 (unsuccess: 1) -[wp] Report 'tests/wp_typed/unit_lemma.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_lemma.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_lemma.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success Lemma - 1 (1..12) 2 50.0% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_local.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_local.0.res.oracle index 7227cb987de..7b03321d59e 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_local.0.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_local.0.res.oracle @@ -10,9 +10,10 @@ [wp] Proved goals: 3 / 3 Qed: 2 Alt-Ergo: 1 -[wp] Report 'tests/wp_typed/unit_local.c.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_local.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_local.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -foo 1 1 (16..28) 2 100% +foo 1 1 (20..32) 2 100% bar 1 - 1 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_local.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_local.1.res.oracle index 3d3c8a01300..8fabfa0574c 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_local.1.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_local.1.res.oracle @@ -10,9 +10,10 @@ [wp] Proved goals: 3 / 3 Qed: 0 Alt-Ergo: 3 -[wp] Report 'tests/wp_typed/unit_local.c.1.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_local.1.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_local.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -foo - 2 (20..32) 2 100% -bar - 1 (20..32) 1 100% +foo - 2 (24..36) 2 100% +bar - 1 (24..36) 1 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_loopscope.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_loopscope.0.res.oracle index 5bc492834ba..57cb79e4e5a 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_loopscope.0.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_loopscope.0.res.oracle @@ -11,7 +11,8 @@ [wp] Proved goals: 1 / 2 Qed: 1 Alt-Ergo: 0 (unsuccess: 1) -[wp] Report 'tests/wp_typed/unit_loopscope.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_loopscope.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_loopscope.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 1 - 2 50.0% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_loopscope.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_loopscope.1.res.oracle index 36b4aa5e260..b4265807aa1 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_loopscope.1.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_loopscope.1.res.oracle @@ -11,7 +11,8 @@ [wp] Proved goals: 1 / 2 Qed: 1 Alt-Ergo: 0 (unsuccess: 1) -[wp] Report 'tests/wp_typed/unit_loopscope.i.1.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_loopscope.1.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_loopscope.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f 1 - 2 50.0% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_matrix.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_matrix.res.oracle index de8017ed01f..919588fef2e 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_matrix.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_matrix.res.oracle @@ -10,7 +10,8 @@ [wp] Proved goals: 2 / 3 Qed: 1 Alt-Ergo: 1 (unsuccess: 1) -[wp] Report 'tests/wp_typed/unit_matrix.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_matrix.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_matrix.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success make 1 1 (8..20) 3 66.7% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_string.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_string.res.oracle index 93cfd59ec4c..083278e533f 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_string.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_string.res.oracle @@ -13,7 +13,8 @@ [wp] Proved goals: 6 / 6 Qed: 0 Alt-Ergo: 6 -[wp] Report 'tests/wp_typed/unit_string.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_string.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_string.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success f - 6 (128..152) 6 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_tset.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_tset.res.oracle index 27f38791eab..ea315d4efb9 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_tset.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/unit_tset.res.oracle @@ -8,7 +8,8 @@ [wp] [Qed] Goal typed_complex_assigns : Valid [wp] Proved goals: 2 / 2 Qed: 2 -[wp] Report 'tests/wp_typed/unit_tset.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/unit_tset.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/unit_tset.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success complex 2 - 2 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_bitwise.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_bitwise.0.res.oracle index fd7d9e0c8a0..f402d529b83 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_bitwise.0.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_bitwise.0.res.oracle @@ -19,7 +19,8 @@ [wp] Proved goals: 12 / 12 Qed: 1 Alt-Ergo: 11 -[wp] Report 'tests/wp_typed/user_bitwise.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/user_bitwise.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/user_bitwise.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success rl1 1 1 (48..60) 2 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_bitwise.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_bitwise.1.res.oracle index d070510e463..c19aec44bf2 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_bitwise.1.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_bitwise.1.res.oracle @@ -5,5 +5,6 @@ [wp] Warning: Missing RTE guards [wp] 0 goal scheduled [wp] Proved goals: 0 / 0 -[wp] Report 'tests/wp_typed/user_bitwise.i.1.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/user_bitwise.1.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/user_bitwise.1.report.json' ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_collect.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_collect.res.oracle index 849e9f492f0..8676944fb53 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_collect.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_collect.res.oracle @@ -39,7 +39,8 @@ [wp] Proved goals: 32 / 32 Qed: 17 Alt-Ergo: 15 -[wp] Report 'tests/wp_typed/user_collect.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/user_collect.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/user_collect.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job 5 - 5 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.res.oracle index 4f2b39175f7..6f23e12122e 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.res.oracle @@ -15,7 +15,8 @@ [wp] Proved goals: 8 / 8 Qed: 4 Alt-Ergo: 4 -[wp] Report 'tests/wp_typed/user_init.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/user_init.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/user_init.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success init 4 4 (80..104) 8 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_injector.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_injector.0.res.oracle index 6f0d6cc19cc..f4bd7a31924 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_injector.0.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_injector.0.res.oracle @@ -26,7 +26,8 @@ [wp] [Qed] Goal typed_job_assigns_normal_part9 : Valid [wp] Proved goals: 20 / 20 Qed: 20 -[wp] Report 'tests/wp_typed/user_injector.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/user_injector.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/user_injector.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job 20 - 20 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_injector.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_injector.1.res.oracle index c2931cef0f2..fcb48c244ad 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_injector.1.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_injector.1.res.oracle @@ -22,7 +22,8 @@ [wp] [Qed] Goal typed_ref_job_assigns_normal_part6 : Valid [wp] Proved goals: 16 / 16 Qed: 16 -[wp] Report 'tests/wp_typed/user_injector.i.1.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/user_injector.1.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/user_injector.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job 16 - 16 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_rec.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_rec.res.oracle index 5661eb3f32c..74907ae5953 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_rec.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_rec.res.oracle @@ -25,7 +25,8 @@ [wp] Proved goals: 18 / 18 Qed: 3 Alt-Ergo: 15 -[wp] Report 'tests/wp_typed/user_rec.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/user_rec.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/user_rec.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success F1 1 5 (24..36) 6 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_string.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_string.res.oracle index cf3e048e553..53c11f170b9 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_string.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_string.res.oracle @@ -20,8 +20,9 @@ [wp] Proved goals: 13 / 13 Qed: 8 Alt-Ergo: 5 -[wp] Report 'tests/wp_typed/user_string.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/user_string.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/user_string.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -strlen 8 5 (192..240) 13 100% +strlen 8 5 (208..256) 13 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_swap.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_swap.0.res.oracle index 356adba6493..dce97b342db 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_swap.0.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_swap.0.res.oracle @@ -14,7 +14,8 @@ [wp] Proved goals: 7 / 7 Qed: 6 Alt-Ergo: 1 -[wp] Report 'tests/wp_typed/user_swap.i.0.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/user_swap.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/user_swap.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success swap 3 1 (16..28) 4 100% diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_swap.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_swap.1.res.oracle index 906d590a10f..a7c01546b43 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_swap.1.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_swap.1.res.oracle @@ -12,7 +12,8 @@ [wp] [Qed] Goal typed_ref_swap_assigns : Valid [wp] Proved goals: 6 / 6 Qed: 6 -[wp] Report 'tests/wp_typed/user_swap.i.1.report.json' +[wp] Report in: 'tests/wp_typed/oracle_qualif/user_swap.1.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/user_swap.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success swap 3 - 3 100% diff --git a/src/plugins/wp/tests/wp_usage/oracle_qualif/caveat2.res.oracle b/src/plugins/wp/tests/wp_usage/oracle_qualif/caveat2.res.oracle index eb0898c7235..76a422fc787 100644 --- a/src/plugins/wp/tests/wp_usage/oracle_qualif/caveat2.res.oracle +++ b/src/plugins/wp/tests/wp_usage/oracle_qualif/caveat2.res.oracle @@ -17,7 +17,8 @@ [wp] Proved goals: 9 / 9 Qed: 6 Alt-Ergo: 3 -[wp] Report 'tests/wp_usage/caveat2.i.0.report.json' +[wp] Report in: 'tests/wp_usage/oracle_qualif/caveat2.0.report.json' +[wp] Report out: 'tests/wp_usage/result_qualif/caveat2.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job 6 3 (20..32) 9 100% diff --git a/src/plugins/wp/tests/wp_usage/oracle_qualif/caveat_range.res.oracle b/src/plugins/wp/tests/wp_usage/oracle_qualif/caveat_range.res.oracle index fbb344e827f..fb74863e504 100644 --- a/src/plugins/wp/tests/wp_usage/oracle_qualif/caveat_range.res.oracle +++ b/src/plugins/wp/tests/wp_usage/oracle_qualif/caveat_range.res.oracle @@ -19,7 +19,8 @@ [wp] Proved goals: 12 / 12 Qed: 7 Alt-Ergo: 5 -[wp] Report 'tests/wp_usage/caveat_range.i.0.report.json' +[wp] Report in: 'tests/wp_usage/oracle_qualif/caveat_range.0.report.json' +[wp] Report out: 'tests/wp_usage/result_qualif/caveat_range.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success reset 7 5 (48..60) 12 100% diff --git a/src/plugins/wp/tests/wp_usage/oracle_qualif/issue-189-bis.0.res.oracle b/src/plugins/wp/tests/wp_usage/oracle_qualif/issue-189-bis.0.res.oracle index 9e0dd0e1713..0e1dae6a162 100644 --- a/src/plugins/wp/tests/wp_usage/oracle_qualif/issue-189-bis.0.res.oracle +++ b/src/plugins/wp/tests/wp_usage/oracle_qualif/issue-189-bis.0.res.oracle @@ -37,7 +37,8 @@ [wp] Proved goals: 30 / 30 Qed: 20 Alt-Ergo: 10 -[wp] Report 'tests/wp_usage/issue-189-bis.i.0.report.json' +[wp] Report in: 'tests/wp_usage/oracle_qualif/issue-189-bis.0.report.json' +[wp] Report out: 'tests/wp_usage/result_qualif/issue-189-bis.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success memcpy_alias_vars 10 5 (544..640) 15 100% diff --git a/src/plugins/wp/tests/wp_usage/oracle_qualif/issue-189-bis.1.res.oracle b/src/plugins/wp/tests/wp_usage/oracle_qualif/issue-189-bis.1.res.oracle index 94fca76c2fe..03bd04b5525 100644 --- a/src/plugins/wp/tests/wp_usage/oracle_qualif/issue-189-bis.1.res.oracle +++ b/src/plugins/wp/tests/wp_usage/oracle_qualif/issue-189-bis.1.res.oracle @@ -17,7 +17,8 @@ [wp] Proved goals: 10 / 10 Qed: 7 Alt-Ergo: 3 -[wp] Report 'tests/wp_usage/issue-189-bis.i.1.report.json' +[wp] Report in: 'tests/wp_usage/oracle_qualif/issue-189-bis.1.report.json' +[wp] Report out: 'tests/wp_usage/result_qualif/issue-189-bis.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success memcpy_context_vars 7 3 (96..120) 10 100% -- GitLab From fed4d85ba4fefe3e218eb2b3fd793fcfa4054f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Mon, 25 Feb 2019 13:24:17 +0100 Subject: [PATCH 040/376] [wp] better test config --- src/plugins/wp/tests/test_config_qualif | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/wp/tests/test_config_qualif b/src/plugins/wp/tests/test_config_qualif index dceef0711d4..2a730001132 100644 --- a/src/plugins/wp/tests/test_config_qualif +++ b/src/plugins/wp/tests/test_config_qualif @@ -1,3 +1,3 @@ -CMD: @frama-c@ -no-autoload-plugins -load-module wp -wp -wp-par 1 -wp-steps 1500 -wp-timeout 90 -wp-share ./share -wp-msg-key shell,success-only -wp-report-json @PTEST_DIR@/oracle_qualif/@PTEST_NAME@.@PTEST_NUMBER@.report.json:@PTEST_DIR@/result_qualif/@PTEST_NAME@.@PTEST_NUMBER@.report.json -wp-report tests/qualif.report -wp-out @PTEST_FILE@.@PTEST_NUMBER@.out @PTEST_FILE@ +CMD: @frama-c@ -no-autoload-plugins -load-module wp -wp -wp-par 1 -wp-steps 1500 -wp-timeout 90 -wp-share ./share -wp-msg-key shell,success-only -wp-report-json @PTEST_DIR@/oracle@PTEST_CONFIG@/@PTEST_NAME@.@PTEST_NUMBER@.report.json:@PTEST_DIR@/result@PTEST_CONFIG@/@PTEST_NAME@.@PTEST_NUMBER@.report.json -wp-report tests/qualif.report -wp-out @PTEST_FILE@.@PTEST_NUMBER@.out @PTEST_FILE@ LOG: @PTEST_NAME@.@PTEST_NUMBER@.report.json OPT: -- GitLab From da2a1ea99c9eabb2d4e63537c35aebbd104d162b Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Mon, 25 Feb 2019 13:44:51 +0100 Subject: [PATCH 041/376] [WP/tests] updating report oracle for string_c --- .../wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json index 910cff1aa78..47905d279b0 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json @@ -36,12 +36,12 @@ "memcpy_loop_assigns": { "alt-ergo": { "total": 1, "valid": 1, - "rank": 40 }, + "rank": 43 }, "qed": { "total": 2, "valid": 2 }, "wp:main": { "total": 3, "valid": 3, - "rank": 40 } }, + "rank": 43 } }, "memcpy_ensures_result_ptr": { "qed": { "total": 1, "valid": 1 }, -- GitLab From 19da8753c0f25cf0ab32d51979d4d39ba19548ef Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Mon, 25 Feb 2019 14:08:05 +0100 Subject: [PATCH 042/376] [wp] better test config --- src/plugins/wp/tests/test_config_qualif | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/wp/tests/test_config_qualif b/src/plugins/wp/tests/test_config_qualif index 2a730001132..fa33fc6becf 100644 --- a/src/plugins/wp/tests/test_config_qualif +++ b/src/plugins/wp/tests/test_config_qualif @@ -1,3 +1,3 @@ -CMD: @frama-c@ -no-autoload-plugins -load-module wp -wp -wp-par 1 -wp-steps 1500 -wp-timeout 90 -wp-share ./share -wp-msg-key shell,success-only -wp-report-json @PTEST_DIR@/oracle@PTEST_CONFIG@/@PTEST_NAME@.@PTEST_NUMBER@.report.json:@PTEST_DIR@/result@PTEST_CONFIG@/@PTEST_NAME@.@PTEST_NUMBER@.report.json -wp-report tests/qualif.report -wp-out @PTEST_FILE@.@PTEST_NUMBER@.out @PTEST_FILE@ +CMD: @frama-c@ -no-autoload-plugins -load-module wp -wp -wp-par 1 -wp-steps 1500 -wp-timeout 90 -wp-share ./share -wp-msg-key shell,success-only -wp-report-json @PTEST_DIR@/oracle@PTEST_CONFIG@/@PTEST_NAME@.@PTEST_NUMBER@.report.json:@PTEST_DIR@/result@PTEST_CONFIG@/@PTEST_NAME@.@PTEST_NUMBER@.report.json -wp-report tests/qualif.report -wp-out @PTEST_DIR@/result@PTEST_CONFIG@/@PTEST_NAME@.@PTEST_NUMBER@.out @PTEST_FILE@ LOG: @PTEST_NAME@.@PTEST_NUMBER@.report.json OPT: -- GitLab From 788d88a7a0cac7c9e89364a9715bb21df778c4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 25 Feb 2019 11:38:19 +0100 Subject: [PATCH 043/376] [Kernel] Fix: rejects more gotos that bypass the initialization of a VLA. Also inspects the VLA initializations of the destination block, even if it is not a block opened by the jump. --- src/kernel_services/analysis/destructors.ml | 17 ++++++++++++++++- tests/syntax/oracle/vla_goto3.res.oracle | 3 +++ tests/syntax/vla_goto3.i | 10 ++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 tests/syntax/oracle/vla_goto3.res.oracle create mode 100644 tests/syntax/vla_goto3.i diff --git a/src/kernel_services/analysis/destructors.ml b/src/kernel_services/analysis/destructors.ml index 366440d2a58..6e9b5379c30 100644 --- a/src/kernel_services/analysis/destructors.ml +++ b/src/kernel_services/analysis/destructors.ml @@ -219,8 +219,23 @@ class vis flag = object(self) Kernel_function.pretty (Extlib.the self#current_kf) in let treat_succ_open kind s succ = + (* The jump must not bypass a vla initialization in the opened blocks. *) let blocks = Kernel_function.blocks_opened_by_edge s succ in - List.iter (fun b -> inspect_local_vars kind b succ b.blocals) blocks + if blocks <> [] + then List.iter (fun b -> inspect_local_vars kind b succ b.blocals) blocks + else begin + (* If there is no opened block, check that the jump does not bypass a + vla initialization in the destination block. [s] is in this block. *) + let block = Kernel_function.find_enclosing_block succ in + (* Does the definition of variable [v] dominates the statement [s]? *) + let dominate_s v = + v.vdefined && Dominators.dominates (Cil.find_def_stmt block v) s + in + (* Only consider variables defined after statement [s]. *) + let lvs = List.filter (fun v -> not (dominate_s v)) block.blocals in + (* Check that they are not defined before statement [succ]. *) + inspect_local_vars kind block succ lvs + end in let treat_jump_open k s = List.iter (treat_succ_open k s) s.succs in match s.skind with diff --git a/tests/syntax/oracle/vla_goto3.res.oracle b/tests/syntax/oracle/vla_goto3.res.oracle new file mode 100644 index 00000000000..6278462c8d2 --- /dev/null +++ b/tests/syntax/oracle/vla_goto3.res.oracle @@ -0,0 +1,3 @@ +[kernel] Parsing tests/syntax/vla_goto3.i (no preprocessing) +[kernel] User Error: tests/syntax/vla_goto3.i:5, cannot jump from goto statement bypassing initialization of variable vla, declared at tests/syntax/vla_goto3.i:6 +[kernel] Frama-C aborted: invalid user input. diff --git a/tests/syntax/vla_goto3.i b/tests/syntax/vla_goto3.i new file mode 100644 index 00000000000..53ffedf5381 --- /dev/null +++ b/tests/syntax/vla_goto3.i @@ -0,0 +1,10 @@ +volatile int nondet; + +int main () { + int i = 42; + if (nondet) goto end; // Invalid goto, as it skips the initialization of vla. + char vla[i]; + if (nondet) return 1; + end: + return 0; +} -- GitLab From eca3a6e5d1634a3401a6394c99bda200611dcfbe Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Fri, 22 Feb 2019 18:45:50 +0100 Subject: [PATCH 044/376] [ACSL] initial treatment of variable scopes under at --- src/kernel_internals/typing/cabs2cil.ml | 45 +++++++++++++++++-- .../ast_queries/logic_typing.ml | 27 +++++++++-- .../ast_queries/logic_typing.mli | 9 +++- src/plugins/aorai/data_for_aorai.ml | 2 +- 4 files changed, 74 insertions(+), 9 deletions(-) diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index cccda3a9169..8725e512b03 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -841,6 +841,21 @@ let env : (string, envdata * location) H.t = H.create 307 (* We also keep a global environment. This is always a subset of the env *) let genv : (string, envdata * location) H.t = H.create 307 +let label_env = Datatype.String.Hashtbl.create 307 + +let add_label_env lab = + let add_if_absent v (d,_) map = + match d with + | EnvVar vi when not (Datatype.String.Map.mem v map) -> + Datatype.String.Map.add v vi map + | _ -> map + in + let lab_env = H.fold add_if_absent env Datatype.String.Map.empty in + Datatype.String.Hashtbl.add label_env lab lab_env + +let remove_label_env lab = + Datatype.String.Hashtbl.remove label_env lab + (* In the scope we keep the original name, so we can remove them from the * hash table easily *) type undoScope = @@ -1021,6 +1036,7 @@ let constrExprId = ref 0 let startFile () = + Datatype.String.Hashtbl.clear label_env; H.clear env; H.clear genv; H.clear alphaTable; @@ -3719,9 +3735,27 @@ struct let anonCompFieldName = anonCompFieldName let conditionalConversion = logicConditionalConversion let find_macro _ = raise Not_found - let find_var x = match H.find env x with - | EnvVar vi, _ -> cvar_to_lvar vi - | _ -> raise Not_found + let find_var ?label ~var = + let find_from_curr_env test = + match H.find env var with + | EnvVar vi, _ when test vi -> cvar_to_lvar vi + | _ -> raise Not_found + in + match label with + | None -> find_from_curr_env (fun _ -> true) + | Some "Here" | Some "Old" | Some "Post" -> + (* the last two labels can only be found in contracts and refer + to the pre/post state of the contracts: all local variables + in scope at current point are also in scope in the labels. *) + find_from_curr_env (fun _ -> true) + | Some "Pre" -> + find_from_curr_env (fun vi -> vi.vformal || vi.vglob) + | Some "Init" -> find_from_curr_env (fun vi -> vi.vglob) + | Some lab -> + cvar_to_lvar + (Datatype.String.Map.find var + (Datatype.String.Hashtbl.find label_env lab)) + let find_enum_tag x = match H.find env x with | EnvEnum item,_ -> dummy_exp (Const (CEnum item)), typeOf item.eival @@ -3764,6 +3798,8 @@ module Ltyping = Logic_typing.Make (C_logic_env) let startLoop iswhile = incr C_logic_env.nb_loop; + add_label_env "LoopEntry"; + add_label_env "LoopCurrent"; continues := (if iswhile then While (ref "") else NotWhile (ref "")) :: !continues; enter_break_env () @@ -3771,6 +3807,8 @@ let startLoop iswhile = let exitLoop () = decr C_logic_env.nb_loop; exit_break_env (); + remove_label_env "LoopEntry"; + remove_label_env "LoopCurrent"; match !continues with | [] -> Kernel.error ~once:true ~current:true "exit Loop not in a loop" | _ :: rest -> continues := rest @@ -9663,6 +9701,7 @@ and doStatement local_env (s : A.statement) : chunk = | A.LABEL (l, s, loc) -> let loc' = convLoc loc in CurrentLoc.set loc'; + add_label_env l; C_logic_env.add_current_label l; (* Lookup the label because it might have been locally defined *) let chunk = diff --git a/src/kernel_services/ast_queries/logic_typing.ml b/src/kernel_services/ast_queries/logic_typing.ml index 918ca0447b7..b0e2522c5bc 100644 --- a/src/kernel_services/ast_queries/logic_typing.ml +++ b/src/kernel_services/ast_queries/logic_typing.ml @@ -326,6 +326,26 @@ module Lenv = struct *) } + let string_of_current_label env = + Extlib.opt_bind ( + function + | FormalLabel _ -> None + | BuiltinLabel Init -> Some "Init" + | BuiltinLabel Pre -> Some "Pre" + | BuiltinLabel Old -> Some "Old" + | BuiltinLabel Post -> Some "Post" + | BuiltinLabel Here -> Some "Here" + | BuiltinLabel LoopCurrent -> Some "LoopCurrent" + | BuiltinLabel LoopEntry -> Some "LoopEntry" + | StmtLabel s -> + (match + List.find_opt (function Label (_,_,b) -> b | _ -> false) !s.labels + with + | None -> None + | Some (Label (lab,_,_)) -> Some lab + | Some _ -> None)) + env.current_logic_label + let fresh_var env name kind typ = let name = let exists name = @@ -468,7 +488,7 @@ type typing_context = { anonCompFieldName : string; conditionalConversion : typ -> typ -> typ; find_macro : string -> lexpr; - find_var : string -> logic_var; + find_var : ?label:string -> var:string -> logic_var; find_enum_tag : string -> exp * typ; find_comp_field: compinfo -> string -> offset; find_type : type_namespace -> string -> typ; @@ -633,7 +653,7 @@ module Make val anonCompFieldName : string val conditionalConversion : typ -> typ -> typ val find_macro : string -> lexpr - val find_var : string -> logic_var + val find_var : ?label:string -> var:string -> logic_var val find_enum_tag : string -> exp * typ val find_comp_field: compinfo -> string -> offset val find_type : type_namespace -> string -> typ @@ -2512,7 +2532,8 @@ struct | _ -> old_val lv) with Not_found -> try - let info = ctxt.find_var x in + let label = Lenv.string_of_current_label env in + let info = ctxt.find_var ?label ~var:x in (match info.lv_origin with | Some lv -> check_current_label loc env; diff --git a/src/kernel_services/ast_queries/logic_typing.mli b/src/kernel_services/ast_queries/logic_typing.mli index a05bd2a0ebb..11a48ce5cd5 100644 --- a/src/kernel_services/ast_queries/logic_typing.mli +++ b/src/kernel_services/ast_queries/logic_typing.mli @@ -97,7 +97,11 @@ type typing_context = { anonCompFieldName : string; conditionalConversion : typ -> typ -> typ; find_macro : string -> Logic_ptree.lexpr; - find_var : string -> logic_var; + find_var : ?label:string -> var:string -> logic_var; + (** the label argument is a C label (obeying the restrictions + of which label can be present in a \at). If present, the scope for + searching local C variables is the one of the statement with + the corresponding label. *) find_enum_tag : string -> exp * typ; find_comp_field: compinfo -> string -> offset; find_type : type_namespace -> string -> typ; @@ -245,7 +249,8 @@ module Make val anonCompFieldName : string val conditionalConversion : typ -> typ -> typ val find_macro : string -> Logic_ptree.lexpr - val find_var : string -> logic_var + val find_var : ?label:string -> var:string -> logic_var + (** see corresponding field in {!Logic_typing.typing_context}. *) val find_enum_tag : string -> exp * typ val find_type : type_namespace -> string -> typ val find_comp_field: compinfo -> string -> offset diff --git a/src/plugins/aorai/data_for_aorai.ml b/src/plugins/aorai/data_for_aorai.ml index b2933c2f6e1..f5faca352f8 100644 --- a/src/plugins/aorai/data_for_aorai.ml +++ b/src/plugins/aorai/data_for_aorai.ml @@ -652,7 +652,7 @@ struct let conditionalConversion = Cabs2cil.logicConditionalConversion let is_loop () = false let find_macro _ = raise Not_found - let find_var _ = raise Not_found + let find_var ?label:_ ~var:_ = raise Not_found let find_enum_tag _ = raise Not_found (*let find_comp_type ~kind:_ _ = raise Not_found*) let find_comp_field info s = -- GitLab From 2d0409a60347c769f08b48b3ea11cd9213f3e9e4 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 25 Feb 2019 15:10:51 +0100 Subject: [PATCH 045/376] [ACSL] Make `Logic_interp` aware of local variables scopes Note: at some point, it might be useful to make `term` and `pred` take a `kinstr` as argument to have a better scope for typechecking. --- src/kernel_services/analysis/logic_interp.ml | 52 +++++++++++++++---- .../ast_data/kernel_function.ml | 6 +++ .../ast_data/kernel_function.mli | 8 +++ 3 files changed, 56 insertions(+), 10 deletions(-) diff --git a/src/kernel_services/analysis/logic_interp.ml b/src/kernel_services/analysis/logic_interp.ml index 8a82bb7009c..e8af8bc2a58 100644 --- a/src/kernel_services/analysis/logic_interp.ml +++ b/src/kernel_services/analysis/logic_interp.ml @@ -27,14 +27,43 @@ open Cil_datatype exception Error of Cil_types.location * string exception Unbound of string -let find_var kf x = +let find_var kf kinstr ?label ~var = let vi = - try Globals.Vars.find_from_astinfo x (VLocal kf) + try + let vi = Globals.Vars.find_from_astinfo var (VLocal kf) in + (match kinstr with + | Kglobal -> vi (* don't refine search: the Kglobal here + does not indicate the function contract, but merely + the fact that we do not have any information about + the targeted program point. Hence, no scope check + can be performed or we might reject many legitimate + terms and predicates. + *) + | Kstmt stmt -> + let scope = + match label with + | None | Some "Here" | Some "Post" | Some "Old" -> stmt + | Some "Pre" -> raise Not_found (* no local variable in scope. *) + | Some "Init" -> raise Not_found (* no local variable in scope. *) + | Some "LoopEntry" | Some "LoopCurrent" -> + if not (Kernel_function.stmt_in_loop kf stmt) then + Kernel.fatal + "Use of LoopEntry or LoopCurrent outside of a loop"; + Kernel_function.find_enclosing_loop kf stmt + | Some l -> + (try let s = Kernel_function.find_label kf l in !s + with Not_found -> + Kernel.fatal + "Use of label %s that does not exist in function %a" + l Kernel_function.pretty kf) + in + if Kernel_function.var_is_in_scope scope vi then vi + else raise Not_found) with Not_found -> try - Globals.Vars.find_from_astinfo x (VFormal kf) + Globals.Vars.find_from_astinfo var (VFormal kf) with Not_found -> - Globals.Vars.find_from_astinfo x VGlobal + Globals.Vars.find_from_astinfo var VGlobal in cvar_to_lvar vi @@ -46,18 +75,21 @@ let find_var kf x = module DefaultLT (X: sig val kf: Kernel_function.t - val in_loop: bool (* Only useful for code annotations *) + val kinstr: Cil_types.kinstr end) = Logic_typing.Make (struct let anonCompFieldName = Cabs2cil.anonCompFieldName let conditionalConversion = Cabs2cil.logicConditionalConversion - let is_loop () = X.in_loop + let is_loop () = + match X.kinstr with + | Kglobal -> false + | Kstmt s -> Kernel_function.stmt_in_loop X.kf s let find_macro _ = raise Not_found - let find_var x = find_var X.kf x + let find_var ?label ~var = find_var X.kf X.kinstr ?label ~var let find_enum_tag x = try @@ -118,7 +150,7 @@ let code_annot kf stmt s = sync_typedefs (); let module LT = DefaultLT(struct let kf = kf - let in_loop = Kernel_function.stmt_in_loop kf stmt + let kinstr = Kstmt stmt end) in let loc = Stmt.loc stmt in let pa = @@ -141,7 +173,7 @@ let term kf ?(loc=Location.unknown) ?(env=default_term_env ()) s = sync_typedefs (); let module LT = DefaultLT(struct let kf = kf - let in_loop = false (* unused *) + let kinstr = Kglobal end) in let pa_expr = Extlib.opt_map snd (Logic_lexer.lexpr (fst loc, s)) in let parse pa_expr = LT.term env pa_expr in @@ -156,7 +188,7 @@ let predicate kf ?(loc=Location.unknown) ?(env=default_term_env ()) s = sync_typedefs (); let module LT = DefaultLT(struct let kf = kf - let in_loop = false (* unused *) + let kinstr = Kglobal end) in let pa_expr = Extlib.opt_map snd (Logic_lexer.lexpr (fst loc, s)) in let parse pa_expr = LT.predicate env pa_expr in diff --git a/src/kernel_services/ast_data/kernel_function.ml b/src/kernel_services/ast_data/kernel_function.ml index 1d7d7d982b0..8e876e4d23b 100644 --- a/src/kernel_services/ast_data/kernel_function.ml +++ b/src/kernel_services/ast_data/kernel_function.ml @@ -425,6 +425,12 @@ let find_syntactic_callsites kf = try CallSites.find table kf with Not_found -> [] +let var_is_in_scope stmt vi = + let blocks = find_all_enclosing_blocks stmt in + List.exists + (fun b -> List.exists (Cil_datatype.Varinfo.equal vi) b.blocals) + blocks + (* ************************************************************************* *) (** {2 Checkers} *) (* ************************************************************************* *) diff --git a/src/kernel_services/ast_data/kernel_function.mli b/src/kernel_services/ast_data/kernel_function.mli index d6700783c49..18c1dac1287 100644 --- a/src/kernel_services/ast_data/kernel_function.mli +++ b/src/kernel_services/ast_data/kernel_function.mli @@ -127,6 +127,14 @@ val find_syntactic_callsites : t -> (t * stmt) list [stmt]. @since Carbon-20110201 *) +val var_is_in_scope: stmt -> varinfo -> bool + (** [var_is_in_scope kf stmt vi] returns [true] iff the local variable [vi] + is syntactically visible from statement [stmt] in function [kf]. Note + that on the contrary to {!Globals.Syntactic_search.find_in_scope}, the + variable is searched according to its [vid], not its [vorig_name]. + + @since Frama-C+dev *) + (* ************************************************************************* *) (** {2 Checkers} *) (* ************************************************************************* *) -- GitLab From d8a33fa477277310cbfe64f6241f683ecfbc67b0 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 25 Feb 2019 17:14:06 +0100 Subject: [PATCH 046/376] [ACSL] fixes cabs2cil/logic_typing communication on label environment More precisely, ensures that the statement returned by `find_label l` actually contains label `l` --- src/kernel_internals/typing/cabs2cil.ml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index 8725e512b03..82e1679d6b5 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -1519,13 +1519,13 @@ struct try ref (H.find labels s) with Not_found when List.mem s !label_current -> - let my_ref = - ref - (mkEmptyStmt - (* just a placeholder that will never be used. no need to - check for ghost status here. *) - ~ghost:false ~valid_sid ~loc:(cabslu "_find_label") ()) + (* just a placeholder that will never be used. no need to + check for ghost status here. *) + let my_stmt = + mkEmptyStmt ~ghost:false ~valid_sid ~loc:(cabslu "_find_label") () in + my_stmt.labels <- [Label(s,cabslu "_find_label",true)]; + let my_ref = ref my_stmt in addGoto s my_ref; my_ref end -- GitLab From bd1fc51a6b63130d66c2cde1e2594c5e5802f1d8 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 25 Feb 2019 17:16:41 +0100 Subject: [PATCH 047/376] [tests] tests for new semantics of `\at` wrt local variables --- tests/spec/at.c | 29 ++++++++++++++++++++++++++ tests/spec/oracle/at.res.oracle | 36 +++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) diff --git a/tests/spec/at.c b/tests/spec/at.c index b18cc464836..9be4a3153eb 100644 --- a/tests/spec/at.c +++ b/tests/spec/at.c @@ -22,6 +22,35 @@ int f(int y) { return x; } +void test () { + int x = 0; + L1: { + int x = 1; + L2: + // assert below speaks about two distinct x. + /*@ assert \at(&x, L1) != \at(&x,L2); */ + x = 2; + } +} + +void ko (int z) { + L: { + int y = 0; + // assert below should not typecheck: y is not in scope at L (nor at Pre) + //@ assert KO: \at(y,L) == 0; + //@ assert KO: \at(y,Pre) == 0; + //@ assert KO: \at(z,Init) == 0; // at Init, only globals are in scope + //@ assert OK: \at (x,Init) == 0; + //@ assert OK: \at(z,Pre) == 0; + } + while (x>0) { + int i = 1; + x--; + //@ assert KO: \at(i,LoopCurrent) == 1; + //@ assert OK: \at(z,LoopCurrent) == \at(z,Pre); + } +} + /* Local Variables: compile-command: "PPCHOME=../.. LC_ALL=C make at" diff --git a/tests/spec/oracle/at.res.oracle b/tests/spec/oracle/at.res.oracle index 31284982e1e..8194269ad90 100644 --- a/tests/spec/oracle/at.res.oracle +++ b/tests/spec/oracle/at.res.oracle @@ -1,4 +1,12 @@ [kernel] Parsing tests/spec/at.c (with preprocessing) +[kernel:annot-error] tests/spec/at.c:40: Warning: + unbound logic variable y. Ignoring code annotation +[kernel:annot-error] tests/spec/at.c:41: Warning: + unbound logic variable y. Ignoring code annotation +[kernel:annot-error] tests/spec/at.c:42: Warning: + unbound logic variable z. Ignoring code annotation +[kernel:annot-error] tests/spec/at.c:49: Warning: + unbound logic variable i. Ignoring code annotation /* Generated by Frama-C */ int x; /*@ @@ -28,4 +36,32 @@ int f(int y) return x; } +void test(void) +{ + int x_0 = 0; + L1: + { + int x_1 = 1; + L2: /*@ assert \at(&x_0,L1) ≢ \at(&x_1,L2); */ ; + x_1 = 2; + } + return; +} + +void ko(int z) +{ + L: + { + int y = 0; + /*@ assert OK: \at(x,Init) ≡ 0; */ ; + /*@ assert OK: \at(z,Pre) ≡ 0; */ ; + } + while (x > 0) { + int i = 1; + x --; + /*@ assert OK: \at(z,LoopCurrent) ≡ \at(z,Pre); */ ; + } + return; +} + -- GitLab From bf1f15106f2bbdb18745f3ff118177bbd21cf1ec Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 25 Feb 2019 18:31:12 +0100 Subject: [PATCH 048/376] [ptests] Allows arobases in options of ptests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Juste use `@@` as in `Format` 😛 --- ptests/ptests.ml | 22 +++++++++++++--------- tests/rte/twofunc3.c | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ptests/ptests.ml b/ptests/ptests.ml index 61d3b38decb..d99f688a4ac 100644 --- a/ptests/ptests.ml +++ b/ptests/ptests.ml @@ -493,7 +493,7 @@ end = struct end -let macro_regex = Str.regexp "\\([^@]*\\)@\\([^@]+\\)@\\(.*\\)" +let macro_regex = Str.regexp "\\([^@]*\\)@\\([^@]*\\)@\\(.*\\)" type execnow = { @@ -585,15 +585,19 @@ let replace_macros macros s = let rest = Str.matched_group 3 s in let new_n = Str.group_end 1 in let n, new_s = - try - if !verbosity >= 2 then lock_printf "macro is %s\n%!" macro; - let replacement = StringMap.find macro macros in - if !verbosity >= 1 then - lock_printf "replacement for %s is %s\n%!" macro replacement; - new_n, - String.sub s 0 n ^ start ^ replacement ^ rest - with + if macro = "" then begin + new_n + 1, String.sub s 0 new_n ^ "@" ^ rest + end else begin + try + if !verbosity >= 2 then lock_printf "macro is %s\n%!" macro; + let replacement = StringMap.find macro macros in + if !verbosity >= 1 then + lock_printf "replacement for %s is %s\n%!" macro replacement; + new_n, + String.sub s 0 n ^ start ^ replacement ^ rest + with | Not_found -> Str.group_end 2 + 1, s + end in if !verbosity >= 2 then lock_printf "new string is %s\n%!" new_s; let new_acc = ptest_file_matched, new_s in diff --git a/tests/rte/twofunc3.c b/tests/rte/twofunc3.c index b7102aaf708..fab3e66a5ab 100644 --- a/tests/rte/twofunc3.c +++ b/tests/rte/twofunc3.c @@ -1,6 +1,6 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/rte_api/rte_get_annot.cmxs - OPT: -load-module @PTEST_DIR@/rte_api/rte_get_annot -journal-disable + OPT: -rte-select @@all -load-module @PTEST_DIR@/rte_api/rte_get_annot -journal-disable */ -- GitLab From 3518e275f32bfb19c1a273b7ebcfa131c0672c26 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 25 Feb 2019 18:54:59 +0100 Subject: [PATCH 049/376] [devman] document ptests update --- doc/developer/advance.tex | 12 ++++++++++-- doc/developer/changes.tex | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/developer/advance.tex b/doc/developer/advance.tex index 143998fb5ba..f6889b211e8 100644 --- a/doc/developer/advance.tex +++ b/doc/developer/advance.tex @@ -1062,8 +1062,8 @@ or line. Once such a directive has been encountered, each occurrence of \texttt{@macro-name@} in a \texttt{CMD}, \texttt{LOG}, \texttt{OPT}, \texttt{STDOPT} or \texttt{EXECNOW} directive at this configuration level - or in any level below it will be replaced by \texttt{content}. Existing - pre-defined macros are listed in section~\ref{sec:ptests-macros}. + or in any level below it will be replaced by \texttt{content}. Existing + pre-defined macros are listed in section~\ref{sec:ptests-macros}. \item The \texttt{FILEREG}\sscodeidxdef{Test}{Directive}{FILEREG} directive contains a regular expression indicating which files in the directory containing the current test suite are actually part of @@ -1072,6 +1072,14 @@ or configuration file. \end{itemize} +\begin{important} +\paragraph{\texttt{@} in the text of a directive} +As mentioned above, \texttt{@} is recognized by \ptests as the beginning of +a macro. If you need to have a literal \texttt{@} in the text of the directive +itself, it needs to be doubled, {\it i.e.} \texttt{@@} will be translated as +\texttt{@}. +\end{important} + \begin{important} \textbf{Summary: ordering of test executions} diff --git a/doc/developer/changes.tex b/doc/developer/changes.tex index 9cea38cf333..6e3243e90cf 100644 --- a/doc/developer/changes.tex +++ b/doc/developer/changes.tex @@ -7,6 +7,7 @@ This chapter summarizes the major changes in this documentation between each \section*{Frama-C+dev} \begin{itemize} +\item \textbf{Testing}: Document of usage \texttt{@@} in a directive \item \textbf{Logging Services}: Document \texttt{error} and \texttt{failure} behaviors. \item \textbf{ACSL Extensions}: New extension categories, for global and plain code annotations \end{itemize} -- GitLab From 282c53872b17a52d132fc975ba03d01b1630f0a1 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 25 Feb 2019 18:57:32 +0100 Subject: [PATCH 050/376] =?UTF-8?q?[devman]=20fixes=20example=20of=20ACSL?= =?UTF-8?q?=20extension=20(and=20Makefile=20`check`=20rule=20=F0=9F=98=9E)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/developer/Makefile | 2 +- doc/developer/examples/acsl_extension.ml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/developer/Makefile b/doc/developer/Makefile index ab52d0e4172..4ce9e948e29 100644 --- a/doc/developer/Makefile +++ b/doc/developer/Makefile @@ -49,7 +49,7 @@ else -load-script ./examples/acsl_extension \ -load-script ./hello_world/hello_world.ml \ | tee check.log - if grep -e "user error" check.log; then \ + if grep -e "User Error" check.log; then \ echo "Examples script do not compile with current Frama-C."; \ echo "Please examine check.log and make appropriate changes"; \ exit 1; \ diff --git a/doc/developer/examples/acsl_extension.ml b/doc/developer/examples/acsl_extension.ml index b4848615dd5..9c677e00200 100644 --- a/doc/developer/examples/acsl_extension.ml +++ b/doc/developer/examples/acsl_extension.ml @@ -14,4 +14,4 @@ let type_foo ~typing_context ~loc:_loc l = in Ext_terms res -let () = Logic_typing.register_behavior_extension "foo" type_foo +let () = Logic_typing.register_behavior_extension "foo" false type_foo -- GitLab From fe56d1e0b557666d0e270b9e64b1a040fccb8ad3 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 25 Feb 2019 19:19:11 +0100 Subject: [PATCH 051/376] [devman] fixes version in Change section + doc `status` flag in ACSL extensions --- doc/developer/advance.tex | 11 ++++++++++- doc/developer/changes.tex | 5 +++++ src/kernel_services/ast_queries/logic_typing.mli | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/developer/advance.tex b/doc/developer/advance.tex index f6889b211e8..d6dceaa1bf7 100644 --- a/doc/developer/advance.tex +++ b/doc/developer/advance.tex @@ -3926,7 +3926,7 @@ the corresponding list is traversed normally by the visitor (see section~\ref{adv:visitors}). In order for the extension to be recognized by the parser, it must be -registered by one of the following functions, depending on its category: +registered by one of the following functions, depending on its category. \begin{itemize} \item \texttt{Logic\_typing.register\_behavior\_extension}% \scodeidx{Logic\_typing}{register\_behavior\_extension} @@ -3941,6 +3941,15 @@ registered by one of the following functions, depending on its category: \item \texttt{Logic\_typing.register\_code\_annot\_next\_both\_extension}% \scodeidx{Logic\_typing}{register\_code\_annot\_next\_loop\_extension} \end{itemize} + +Each function takes three arguments: +\begin{itemize} +\item \texttt{kw} the name of the extension, +\item \texttt{status}, a boolean flag indicating whether the extended annotation + may have a validity status, and +\item \texttt{f} the type-checking function itself. +\end{itemize} + After a call to the appropriate registration function, a clause of the form \verb|kw e1,...,en;|, where each \verb|ei| can be any syntactically valid ACSL term or predicate, diff --git a/doc/developer/changes.tex b/doc/developer/changes.tex index 6e3243e90cf..41a4ee2c9fc 100644 --- a/doc/developer/changes.tex +++ b/doc/developer/changes.tex @@ -7,7 +7,12 @@ This chapter summarizes the major changes in this documentation between each \section*{Frama-C+dev} \begin{itemize} +\item \textbf{ACSL Extension}: Document new \texttt{status} flag for registration functions \item \textbf{Testing}: Document of usage \texttt{@@} in a directive +\end{itemize} + +\section*{18.0 Argon} +\begin{itemize} \item \textbf{Logging Services}: Document \texttt{error} and \texttt{failure} behaviors. \item \textbf{ACSL Extensions}: New extension categories, for global and plain code annotations \end{itemize} diff --git a/src/kernel_services/ast_queries/logic_typing.mli b/src/kernel_services/ast_queries/logic_typing.mli index a05bd2a0ebb..c204d9df8e2 100644 --- a/src/kernel_services/ast_queries/logic_typing.mli +++ b/src/kernel_services/ast_queries/logic_typing.mli @@ -172,6 +172,7 @@ type typing_context = { @since Carbon-20101201 @modify Silicon-20161101 change type of the function + @Frama-C+dev add [status] argument *) val register_behavior_extension: string -> bool -> -- GitLab From 6ba8d720ff9b4e8ced028d90730a122abd1b7169 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Tue, 26 Feb 2019 09:14:31 +0100 Subject: [PATCH 052/376] =?UTF-8?q?[compat]=20Compatibility=20with=20older?= =?UTF-8?q?=20OCaml=20versions=20=F0=9F=91=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/kernel_services/ast_queries/logic_typing.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kernel_services/ast_queries/logic_typing.ml b/src/kernel_services/ast_queries/logic_typing.ml index b0e2522c5bc..bf8a537c651 100644 --- a/src/kernel_services/ast_queries/logic_typing.ml +++ b/src/kernel_services/ast_queries/logic_typing.ml @@ -339,7 +339,8 @@ module Lenv = struct | BuiltinLabel LoopEntry -> Some "LoopEntry" | StmtLabel s -> (match - List.find_opt (function Label (_,_,b) -> b | _ -> false) !s.labels + Transitioning.List.find_opt + (function Label (_,_,b) -> b | _ -> false) !s.labels with | None -> None | Some (Label (lab,_,_)) -> Some lab -- GitLab From 491be84f6eec4c684632f6efd57a03786b634fc7 Mon Sep 17 00:00:00 2001 From: Nikolai Kosmatov <nikolai.kosmatov@cea.fr> Date: Fri, 22 Feb 2019 17:15:25 +0100 Subject: [PATCH 053/376] [extlib] add recursive mkdir function (fixes #425) --- src/kernel_services/plugin_entry_points/plugin.ml | 2 +- src/libraries/stdlib/extlib.ml | 12 ++++++++++++ src/libraries/stdlib/extlib.mli | 11 +++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/kernel_services/plugin_entry_points/plugin.ml b/src/kernel_services/plugin_entry_points/plugin.ml index bd956deba6c..1ba3d14939c 100644 --- a/src/kernel_services/plugin_entry_points/plugin.ml +++ b/src/kernel_services/plugin_entry_points/plugin.ml @@ -325,7 +325,7 @@ struct let mk_dir d = try - Unix.mkdir d 0o755; + Extlib.mkdir ~parents:true d 0o755; L.warning "creating %s directory `%s'" O.option_name d; d with Unix.Unix_error _ -> diff --git a/src/libraries/stdlib/extlib.ml b/src/libraries/stdlib/extlib.ml index c24744c1154..df326129833 100644 --- a/src/libraries/stdlib/extlib.ml +++ b/src/libraries/stdlib/extlib.ml @@ -343,6 +343,18 @@ let try_finally ~finally f x = hence interrupting the process, might not work: child processes still need to run some daemons, such as [flush_all] which is registered by default. *) +let rec mkdir ?(parents=false) name perm = + try Unix.mkdir name perm + with + | Unix.Unix_error (Unix.ENOENT,_,_) when parents -> + let parent_name = Filename.dirname name in + if name <> parent_name then + begin + mkdir ~parents parent_name perm; + Unix.mkdir name perm + end + | e -> raise e + let pid = Unix.getpid () let safe_at_exit f = at_exit diff --git a/src/libraries/stdlib/extlib.mli b/src/libraries/stdlib/extlib.mli index 389a34fc00d..89d1cc38c08 100644 --- a/src/libraries/stdlib/extlib.mli +++ b/src/libraries/stdlib/extlib.mli @@ -331,6 +331,17 @@ val try_finally: finally:(unit -> unit) -> ('a -> 'b) -> 'a -> 'b (** System commands *) (* ************************************************************************* *) +val mkdir : ?parents:bool -> string -> Unix.file_perm -> unit + (** [mkdir ?parents name perm] creates directory [name] with permission + [perm]. If [parents] is true, recursively create parent directories + if needed. [parents] defaults to false. + Note that this function may create some of the parent directories + and then fail to create the children, e.g. if [perm] does not allow + user execution of the created directory. This will leave the filesystem + in a modified state before raising an exception. + @raise [Unix.Unix_error] if cannot create [name] or its parents. + @since Frama-C+dev *) + val safe_at_exit : (unit -> unit) -> unit (** Register function to call with [Pervasives.at_exit], but only for non-child process (fork). The order of execution is preserved -- GitLab From 55c3a5eff018c370e6587625b4158c2c68b6bb34 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Tue, 26 Feb 2019 09:16:06 +0100 Subject: [PATCH 054/376] remove unused function --- src/kernel_services/abstract_interp/offsetmap.ml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/kernel_services/abstract_interp/offsetmap.ml b/src/kernel_services/abstract_interp/offsetmap.ml index 82625312c80..507f88fe4c8 100644 --- a/src/kernel_services/abstract_interp/offsetmap.ml +++ b/src/kernel_services/abstract_interp/offsetmap.ml @@ -22,7 +22,6 @@ open Abstract_interp -let pervasives_succ = succ (* This module uses Bigints everywhere. Set up some notations *) let pretty_int = Int.pretty let ( =~ ) = Integer.equal -- GitLab From a6dab9bbf68462bbe0fa073c05ccbf1506d96829 Mon Sep 17 00:00:00 2001 From: Yaelle Vincont <yaelle.vincont@cea.fr> Date: Fri, 22 Feb 2019 16:10:28 +0100 Subject: [PATCH 055/376] [obfuscator] do not obfuscate stdlib and builtins --- src/plugins/obfuscator/obfuscate.ml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/plugins/obfuscator/obfuscate.ml b/src/plugins/obfuscator/obfuscate.ml index 213f983d1f4..41145d204d6 100644 --- a/src/plugins/obfuscator/obfuscate.ml +++ b/src/plugins/obfuscator/obfuscate.ml @@ -38,7 +38,8 @@ class visitor = object method! vglob_aux = function | GType (ty,_) -> - ty.tname <- Dictionary.fresh Obfuscator_kind.Type ty.tname; + if not (Cil.typeHasAttribute "fc_stdlib" ty.ttype) then + ty.tname <- Dictionary.fresh Obfuscator_kind.Type ty.tname; Cil.DoChildren | GVarDecl (v, _) | GVar (v, _, _) | GFun ({svar = v}, _) | GFunDecl (_, v, _) when Cil.is_unused_builtin v -> @@ -83,10 +84,13 @@ class visitor = object if Varinfo.Hashtbl.mem varinfos_visited vi then Cil.SkipChildren else begin - if Cil.isFunctionType vi.vtype then begin - if vi.vname <> "main" then - vi.vname <- Dictionary.fresh Obfuscator_kind.Function vi.vname - end else begin + if Cil.isFunctionType vi.vtype then + try + if vi.vname <> "main" + && Kernel_function.is_definition (Globals.Functions.get vi) then + vi.vname <- Dictionary.fresh Obfuscator_kind.Function vi.vname + with Not_found -> assert false + else begin let add = if vi.vglob then Dictionary.fresh Obfuscator_kind.Global_var else if vi.vformal then Dictionary.fresh Obfuscator_kind.Formal_var -- GitLab From bdb21972b24dbac4b7760d4b525308c4f9655bf8 Mon Sep 17 00:00:00 2001 From: Yaelle Vincont <yaelle.vincont@cea.fr> Date: Fri, 22 Feb 2019 16:39:28 +0100 Subject: [PATCH 056/376] [obfuscator] obfuscate logic types and constructors --- src/kernel_services/ast_data/cil_types.mli | 4 ++-- src/plugins/obfuscator/obfuscate.ml | 4 ++-- src/plugins/obfuscator/obfuscator_kind.ml | 8 +++++++- src/plugins/obfuscator/obfuscator_kind.mli | 2 ++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/kernel_services/ast_data/cil_types.mli b/src/kernel_services/ast_data/cil_types.mli index c550806aaab..f0eb6d86d0a 100644 --- a/src/kernel_services/ast_data/cil_types.mli +++ b/src/kernel_services/ast_data/cil_types.mli @@ -1487,7 +1487,7 @@ and logic_body = (** Description of a logic type. @plugin development guide *) and logic_type_info = { - lt_name: string; + mutable lt_name: string; lt_params : string list; (** type parameters*) mutable lt_def: logic_type_def option; (** definition of the type. None for abstract types. *) @@ -1528,7 +1528,7 @@ and logic_var = { (** Description of a constructor of a logic sum-type. @plugin development guide *) and logic_ctor_info = - { ctor_name: string; (** name of the constructor. *) + { mutable ctor_name: string; (** name of the constructor. *) ctor_type: logic_type_info; (** type to which the constructor belongs. *) ctor_params: logic_type list (** types of the parameters of the constructor. *) diff --git a/src/plugins/obfuscator/obfuscate.ml b/src/plugins/obfuscator/obfuscate.ml index 41145d204d6..f602d521aaa 100644 --- a/src/plugins/obfuscator/obfuscate.ml +++ b/src/plugins/obfuscator/obfuscate.ml @@ -161,11 +161,11 @@ class visitor = object Cil.DoChildren method! vlogic_type_info_decl lti = - warn "logic type" lti.lt_name; + lti.lt_name <- Dictionary.fresh Obfuscator_kind.Logic_type lti.lt_name ; Cil.DoChildren method! vlogic_ctor_info_decl lci = - warn "logic constructor" lci.ctor_name; + lci.ctor_name <- Dictionary.fresh Obfuscator_kind.Logic_constructor lci.ctor_name ; Cil.DoChildren method! vattr = function diff --git a/src/plugins/obfuscator/obfuscator_kind.ml b/src/plugins/obfuscator/obfuscator_kind.ml index f4f1fb22e5b..47633a9a28a 100644 --- a/src/plugins/obfuscator/obfuscator_kind.ml +++ b/src/plugins/obfuscator/obfuscator_kind.ml @@ -33,7 +33,9 @@ type k = | Logic_var | Predicate | Type - + | Logic_type + | Logic_constructor + let name_of_kind = function | Behavior -> "behavior" | Enum -> "enum" @@ -47,6 +49,8 @@ let name_of_kind = function | Logic_var -> "logic variable" | Predicate -> "predicate" | Type -> "type" + | Logic_type -> "logic type" + | Logic_constructor -> "logic constructor" let prefix = function | Behavior -> "B" @@ -61,6 +65,8 @@ let prefix = function | Logic_var -> "LV" | Predicate -> "P" | Type -> "T" + | Logic_type -> "LT" + | Logic_constructor -> "LC" include Datatype.Make_with_collections (struct diff --git a/src/plugins/obfuscator/obfuscator_kind.mli b/src/plugins/obfuscator/obfuscator_kind.mli index 0aa33ec5223..25685566b88 100644 --- a/src/plugins/obfuscator/obfuscator_kind.mli +++ b/src/plugins/obfuscator/obfuscator_kind.mli @@ -33,6 +33,8 @@ type k = | Logic_var | Predicate | Type + | Logic_type + | Logic_constructor include Datatype.S_with_collections with type t = k val prefix: t -> string -- GitLab From f57decc362a5172286287cc85d89132aba2356a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 25 Feb 2019 09:10:41 +0100 Subject: [PATCH 057/376] [obfuscator] Do not obfuscate builtin logic types and constructors. --- src/plugins/obfuscator/obfuscate.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/obfuscator/obfuscate.ml b/src/plugins/obfuscator/obfuscate.ml index f602d521aaa..5eb3a8bf65f 100644 --- a/src/plugins/obfuscator/obfuscate.ml +++ b/src/plugins/obfuscator/obfuscate.ml @@ -161,11 +161,15 @@ class visitor = object Cil.DoChildren method! vlogic_type_info_decl lti = - lti.lt_name <- Dictionary.fresh Obfuscator_kind.Logic_type lti.lt_name ; + if not (Logic_env.is_builtin_logic_type lti.lt_name) + then lti.lt_name <- Dictionary.fresh Obfuscator_kind.Logic_type lti.lt_name ; Cil.DoChildren method! vlogic_ctor_info_decl lci = - lci.ctor_name <- Dictionary.fresh Obfuscator_kind.Logic_constructor lci.ctor_name ; + if not (Logic_env.is_builtin_logic_ctor lci.ctor_name) + then + lci.ctor_name <- + Dictionary.fresh Obfuscator_kind.Logic_constructor lci.ctor_name ; Cil.DoChildren method! vattr = function -- GitLab From 50dc43d90d5bb1bb61d42a0facd3272f124e5d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 25 Feb 2019 14:28:59 +0100 Subject: [PATCH 058/376] [obfuscator] Do not obfuscate functions with attribute FC_BUILTIN or fc_stdlib. Instead of all functons with no definition. --- src/plugins/obfuscator/obfuscate.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/obfuscator/obfuscate.ml b/src/plugins/obfuscator/obfuscate.ml index 5eb3a8bf65f..1226530bf22 100644 --- a/src/plugins/obfuscator/obfuscate.ml +++ b/src/plugins/obfuscator/obfuscate.ml @@ -87,7 +87,9 @@ class visitor = object if Cil.isFunctionType vi.vtype then try if vi.vname <> "main" - && Kernel_function.is_definition (Globals.Functions.get vi) then + && not (Cil.is_builtin vi) + && not (Cil.is_special_builtin vi.vname) + && not (Cil.hasAttribute "fc_stdlib" vi.vattr) then vi.vname <- Dictionary.fresh Obfuscator_kind.Function vi.vname with Not_found -> assert false else begin -- GitLab From a1419d2aa149ef232ebe4f7c9c8ca79a9fb2c19c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 25 Feb 2019 15:46:03 +0100 Subject: [PATCH 059/376] [obfuscator] Adds some tests. --- tests/misc/{obfuscate.i => obfuscate.c} | 13 ++++++++++ tests/misc/oracle/obfuscate.res.oracle | 32 +++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 2 deletions(-) rename tests/misc/{obfuscate.i => obfuscate.c} (73%) diff --git a/tests/misc/obfuscate.i b/tests/misc/obfuscate.c similarity index 73% rename from tests/misc/obfuscate.i rename to tests/misc/obfuscate.c index 044b97cb3c9..ade70e66898 100644 --- a/tests/misc/obfuscate.i +++ b/tests/misc/obfuscate.c @@ -46,3 +46,16 @@ int logic(int f1) int main(int* p) { if ("ti\rti" == "ti\rti") f(p); } + +/* Obfuscate logic types and logic constructors. */ +/*@ type t = T | F; */ + +#include "stdint.h" + +/* Do not obfuscate builtins and stdlib types and functions. */ +int builtin_and_stdlib () { + int32_t x = 42; + Frama_C_show_each(x); + /*@ assert \true; */ + return 1; +} diff --git a/tests/misc/oracle/obfuscate.res.oracle b/tests/misc/oracle/obfuscate.res.oracle index 6ba918f0252..efd7abd9fba 100644 --- a/tests/misc/oracle/obfuscate.res.oracle +++ b/tests/misc/oracle/obfuscate.res.oracle @@ -1,4 +1,7 @@ -[kernel] Parsing tests/misc/obfuscate.i (no preprocessing) +[kernel] Parsing tests/misc/obfuscate.c (with preprocessing) +[obfuscator] Warning: unobfuscated attribute name `fc_stdlib' +[obfuscator] Warning: unobfuscated attribute parameter name `stdint.h' +[obfuscator] Warning: unobfuscated attribute name `missingproto' /* *********************************** */ /* start of dictionary for obfuscation */ /* *********************************** */ @@ -12,11 +15,17 @@ #define F1 my_func #define F2 f #define F3 logic +#define F4 builtin_and_stdlib // global variables #define G1 my_var // labels #define L1 end #define L2 end +// logic constructors +#define LC1 T +#define LC2 F +// logic types +#define LT1 t // logic variables #define LV1 I #define LV2 x @@ -29,6 +38,8 @@ #define V2 __retres #define V3 V1 #define V4 __retres +#define V5 x +#define V6 __retres // formal variables #define f1 p #define f2 f1 @@ -47,6 +58,7 @@ /* ********************************************************* */ /* Generated by Frama-C */ +#include "stdint.h" enum T1 { E1 = 0, E2 = 1, @@ -54,7 +66,8 @@ enum T1 { }; int G1 = 0; /*@ global invariant LV1: G1 ≥ 0; - */ + +*/ /*@ requires G1 > 0; ensures G1 > \old(G1); ensures ∀ ℤ LV2; LV2 ≡ LV2; @@ -102,4 +115,19 @@ int main(int *f3) return V4; } +/*@ type LT1 = LC1 | LC2; + +*/ +extern int ( /* missing proto */ Frama_C_show_each)(); + +int F4(void) +{ + int V6; + int32_t V5 = 42; + Frama_C_show_each(V5); + /*@ assert \true; */ ; + V6 = 1; + return V6; +} + -- GitLab From e1f3d06cc653e25af59c94959a349c63e2e0cb6d Mon Sep 17 00:00:00 2001 From: Julien Signoles <julien.signoles@cea.fr> Date: Tue, 26 Feb 2019 09:54:07 +0100 Subject: [PATCH 060/376] changelog --- Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index d95a4f95aa1..7ebb7055d60 100644 --- a/Changelog +++ b/Changelog @@ -17,6 +17,7 @@ Open Source Release <next-release> ################################## +-* Obfuscator [2019/02/26] Obfuscate logic types and logic constructors. - Eva [2019/01/10] Improved precision on nested loops (by postponing the widening on inner loops according to -eva-widening-period). - Kernel [2019/01/03] Add attributes for loop statements to allow -- GitLab From dea55f7cd1bf87f9a36a5c1f954fd96bbafea52e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 26 Feb 2019 17:29:04 +0100 Subject: [PATCH 061/376] =?UTF-8?q?[obfuscator]=20Removes=20an=20unnecessa?= =?UTF-8?q?ry=20try=E2=80=A6=20with.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/obfuscator/obfuscate.ml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/plugins/obfuscator/obfuscate.ml b/src/plugins/obfuscator/obfuscate.ml index 1226530bf22..eba13df1132 100644 --- a/src/plugins/obfuscator/obfuscate.ml +++ b/src/plugins/obfuscator/obfuscate.ml @@ -84,14 +84,13 @@ class visitor = object if Varinfo.Hashtbl.mem varinfos_visited vi then Cil.SkipChildren else begin - if Cil.isFunctionType vi.vtype then - try - if vi.vname <> "main" - && not (Cil.is_builtin vi) - && not (Cil.is_special_builtin vi.vname) - && not (Cil.hasAttribute "fc_stdlib" vi.vattr) then - vi.vname <- Dictionary.fresh Obfuscator_kind.Function vi.vname - with Not_found -> assert false + if Cil.isFunctionType vi.vtype then begin + if vi.vname <> "main" + && not (Cil.is_builtin vi) + && not (Cil.is_special_builtin vi.vname) + && not (Cil.hasAttribute "fc_stdlib" vi.vattr) then + vi.vname <- Dictionary.fresh Obfuscator_kind.Function vi.vname + end else begin let add = if vi.vglob then Dictionary.fresh Obfuscator_kind.Global_var -- GitLab From 584e02429585c366a5361b6dada4fc67d3fa6863 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 28 Feb 2019 19:36:18 +0100 Subject: [PATCH 062/376] [Cil] Improved behavior of transient block --- src/kernel_services/ast_queries/cil.ml | 31 ++++++++--- src/kernel_services/ast_queries/cil.mli | 7 ++- .../syntax/oracle/transient_block.res.oracle | 31 +++++++++++ tests/syntax/transient_block.i | 14 +++++ tests/syntax/transient_block.ml | 51 +++++++++++++++++++ 5 files changed, 124 insertions(+), 10 deletions(-) create mode 100644 tests/syntax/oracle/transient_block.res.oracle create mode 100644 tests/syntax/transient_block.i create mode 100644 tests/syntax/transient_block.ml diff --git a/src/kernel_services/ast_queries/cil.ml b/src/kernel_services/ast_queries/cil.ml index 027a3758727..c7297ce634b 100644 --- a/src/kernel_services/ast_queries/cil.ml +++ b/src/kernel_services/ast_queries/cil.ml @@ -2150,10 +2150,25 @@ let assertEmptyQueue vis = let vis_tmp_attr = "FRAMAC_VIS_TMP_ATTR" +let wkey_transient = Kernel.register_warn_category "transient-block" +let () = Kernel.set_warn_status wkey_transient Log.Winactive + let transient_block b = - if b.blocals <> [] then + if b.blocals <> [] then begin + if List.exists + (function + | { skind = Instr (Local_init (v,_,_)) } -> + not (List.exists (Cil_datatype.Varinfo.equal v) b.blocals) + | _ -> false) + b.bstmts + then Kernel.fatal "Attempting to mark as transient a block that declares local variables"; + Kernel.warning + ~wkey:wkey_transient + "ignoring request to mark transient a block with local variables:@\n%a" + Cil_datatype.Block.pretty b + end else b.battrs <- addAttribute (Attr (vis_tmp_attr,[])) b.battrs; b let block_of_transient b = @@ -4546,7 +4561,7 @@ let isCharConstPtrType t = | Ltype ({lt_name = "typetag"},[]) -> true | Ltype (tdef,_) as ty when is_unrollable_ltdef tdef -> isTypeTagType (unroll_ltdef ty) - | _ -> false + | _ -> false let getReturnType t = match unrollType t with @@ -4682,7 +4697,7 @@ let isCharConstPtrType t = | Ctype typ -> begin match unrollType typ with | TPtr (t, _) -> typeTermOffset (Ctype t) off - | _ -> + | _ -> Kernel.fatal ~current:true "typeOfTermLval: Mem on a non-pointer" end @@ -4690,7 +4705,7 @@ let isCharConstPtrType t = Kernel.fatal ~current:true "typeOfTermLval: Mem on a logic type" | Ltype (s,_) as ty when is_unrollable_ltdef s -> type_of_pointed (unroll_ltdef ty) - | Ltype (s,_) -> + | Ltype (s,_) -> Kernel.fatal ~current:true "typeOfTermLval: Mem on a non-C type (%s)" s.lt_name | Lvar s -> @@ -4715,7 +4730,7 @@ let isCharConstPtrType t = "typeTermOffset: Attribute on a logic type" | Ltype (s,_) as ty when is_unrollable_ltdef s -> putAttributes (unroll_ltdef ty) - | Ltype (s,_) -> + | Ltype (s,_) -> Kernel.fatal ~current:true "typeTermOffset: Attribute on a non-C type (%s)" s.lt_name | Lvar s -> @@ -4744,8 +4759,8 @@ let isCharConstPtrType t = | Linteger | Lreal -> Kernel.fatal ~current:true "typeTermOffset: Index on a logic type" | Ltype (s,_) as ty when is_unrollable_ltdef s -> elt_type (unroll_ltdef ty) - | Ltype (s,_) -> - Kernel.fatal ~current:true "typeTermOffset: Index on a non-C type (%s)" s.lt_name + | Ltype (s,_) -> + Kernel.fatal ~current:true "typeTermOffset: Index on a non-C type (%s)" s.lt_name | Lvar s -> Kernel.fatal ~current:true "typeTermOffset: Index on a non-C type ('%s)" s | Larrow _ -> Kernel.fatal ~current:true "typeTermOffset: Index on a function type" in @@ -4765,7 +4780,7 @@ let isCharConstPtrType t = | Linteger | Lreal -> Kernel.fatal ~current:true "typeTermOffset: Field on a logic type" | Ltype (s,_) as ty when is_unrollable_ltdef s -> elt_type (unroll_ltdef ty) - | Ltype (s,_) -> + | Ltype (s,_) -> Kernel.fatal ~current:true "typeTermOffset: Field on a non-C type (%s)" s.lt_name | Lvar s -> Kernel.fatal ~current:true "typeTermOffset: Field on a non-C type ('%s)" s | Larrow _ -> Kernel.fatal ~current:true "typeTermOffset: Field on a function type" diff --git a/src/kernel_services/ast_queries/cil.mli b/src/kernel_services/ast_queries/cil.mli index 799986722ec..4a48a303c96 100644 --- a/src/kernel_services/ast_queries/cil.mli +++ b/src/kernel_services/ast_queries/cil.mli @@ -2045,12 +2045,15 @@ val visitCilBlock: cilVisitor -> block -> block might prevent it (e.g. if the preceding statement is a statement contract or a slicing/pragma annotation, or if there are labels involved). Use that whenever you're creating a block in order to hold multiple statements - as a result of visiting a single statement. + as a result of visiting a single statement. If the block contains local + variables, it will not be marked as transient, since removing it will + change the scope of those variables. @raise Fatal error if the given block attempts to declare local variables - (in which case it can't be marked as transient anyways). + and contain definitions of local variables that are not part of the block. @since Phosphorus-20170501-beta1 + @modify Frama-C+dev: do not raise fatal as soon as the block has locals *) val transient_block: block -> block diff --git a/tests/syntax/oracle/transient_block.res.oracle b/tests/syntax/oracle/transient_block.res.oracle new file mode 100644 index 00000000000..0073c7bf559 --- /dev/null +++ b/tests/syntax/oracle/transient_block.res.oracle @@ -0,0 +1,31 @@ +[kernel] Parsing tests/syntax/transient_block.i (no preprocessing) +[kernel] Failure: Attempting to mark as transient a block that declares local variables +[kernel] transient_block fatal error on int x = 1; as expected +[kernel:transient-block] Warning: + ignoring request to mark transient a block with local variables: + { + int y; + int y = 0; + x = 2; + } +/* Generated by Frama-C */ +void f(void) +{ + return; +} + +int main(void) +{ + int __retres; + int x = 1; + { + int y; + int y = 0; + x = 2; + } + f(); + __retres = 0; + return __retres; +} + + diff --git a/tests/syntax/transient_block.i b/tests/syntax/transient_block.i new file mode 100644 index 00000000000..bfc8874399c --- /dev/null +++ b/tests/syntax/transient_block.i @@ -0,0 +1,14 @@ +/* run.config + EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs + OPT: -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs -kernel-warn-key transient-block=active +*/ + +void f(void) { } + +int main () { + + int x = 1; + x = 2; + f(); + +} diff --git a/tests/syntax/transient_block.ml b/tests/syntax/transient_block.ml new file mode 100644 index 00000000000..0bf3ce8e4aa --- /dev/null +++ b/tests/syntax/transient_block.ml @@ -0,0 +1,51 @@ +open Cil_types + +class vis prj = object(self) + inherit Visitor.frama_c_copy prj + + val mutable my_var = None + + method private create_block create s instr = + let s1 = Cil.mkStmtOneInstr ~valid_sid:true instr in + let b = Cil.mkBlock [s1] in + if create then begin + let f = Cil.get_fundec self#behavior (Extlib.the self#current_func) in + let y = Cil.makeLocalVar f ~scope:b "y" (TInt(IInt,[])) in + my_var <- Some y; + let loc = Cil_datatype.Location.unknown in + let s2 = + Cil.mkStmtOneInstr ~valid_sid:true + (Local_init(y,AssignInit(SingleInit(Cil.zero ~loc)),loc)) + in + b.bstmts <- s2 :: b.bstmts; + let b = Cil.transient_block b in + s.skind <- Block b; + end; + Cil.JustCopy + + method! vstmt_aux s = + match s.skind with + | Instr (Local_init _ as instr) -> + (try + self#create_block true s instr + with Log.AbortFatal _ -> + Kernel.feedback "transient_block fatal error on %a as expected" + Printer.pp_instr instr; + let f = Cil.get_fundec self#behavior (Extlib.the self#current_func) in + let y = Extlib.the my_var in + f.slocals <- + List.filter + (fun v -> not (Cil_datatype.Varinfo.equal v y)) f.slocals; + Cil.DoChildren) + | Instr (Set ((Var { vorig_name = "x" }, NoOffset),_,_) as instr) -> + self#create_block true s instr + | Instr (Call _ as instr) -> self#create_block false s instr + | _ -> Cil.DoChildren +end + +let main () = + Ast.compute (); + let prj = File.create_project_from_visitor "test" (fun prj -> new vis prj) in + File.pretty_ast ~prj () + +let () = Db.Main.extend main -- GitLab From 1cc4e488d1b7ca94f277c51bad7f77dda63b6268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Mon, 4 Mar 2019 10:09:02 +0100 Subject: [PATCH 063/376] [gui] add split pane utilities --- src/plugins/gui/gtk_helper.ml | 14 ++------------ src/plugins/gui/wbox.ml | 16 +++++++++++++++- src/plugins/gui/wbox.mli | 19 ++++++++++++------- src/plugins/gui/wutil.ml | 17 +++++++++++++++++ src/plugins/gui/wutil.mli | 5 +++++ 5 files changed, 51 insertions(+), 20 deletions(-) diff --git a/src/plugins/gui/gtk_helper.ml b/src/plugins/gui/gtk_helper.ml index 63bbcd3c9f4..550c62ee06f 100644 --- a/src/plugins/gui/gtk_helper.ml +++ b/src/plugins/gui/gtk_helper.ml @@ -497,20 +497,10 @@ let on_combo (* ------------------------------------------------------------------------ *) let save_paned_ratio key (paned:GPack.paned) = - let paned_min_pos = paned#min_position in - let paned_max_pos = paned#max_position in - let length = paned_max_pos - paned_min_pos in - let ratio = if length = 0 then 0.5 - else (float_of_int paned#position)/.(float_of_int length) - in + let ratio = Wutil.get_pane_ratio paned in Configuration.set key (Configuration.ConfFloat ratio) -let place_paned (paned:GPack.paned) factor = - let paned_min_pos = paned#min_position in - let offset = - int_of_float (float (paned#max_position - paned_min_pos)*.factor) - in - paned#set_position (paned_min_pos + offset) +let place_paned = Wutil.set_pane_ratio let old_gtk_compat f x = try f x with Not_found -> () diff --git a/src/plugins/gui/wbox.ml b/src/plugins/gui/wbox.ml index 593d2c11a6a..a00525e95e8 100644 --- a/src/plugins/gui/wbox.ml +++ b/src/plugins/gui/wbox.ml @@ -78,7 +78,7 @@ let vgroup (ws : widget list) = let box = GPack.vbox ~show:true ~homogeneous:true () in List.iter (fun w -> box#pack ~expand:false w#coerce) ws ; new Wutil.gobj_widget box - + let (<|>) xs ys = if ys = [] then xs else (xs @ (ToEnd::ys)) let toolbar xs ys = hbox (xs <|> ys) @@ -96,3 +96,17 @@ let panel ?top ?left ?right ?bottom center = | Some t , None -> vbox [ h t ; hv middle ] | None , Some t -> vbox [ hv middle ; w t ] | Some a , Some b -> vbox [ h a ; hv middle ; h b ] + +let split ~dir ?get ?set w1 w2 = + let pane = GPack.paned dir () in + pane#add1 w1#coerce ; + pane#add2 w2#coerce ; + begin match get with None -> () | Some fget -> + Wutil.set_pane_ratio pane (fget()) + end ; + begin match set with None -> () | Some fset -> + let callback _ = + fset (Wutil.get_pane_ratio pane) ; false in + ignore (pane#event#connect#button_release ~callback) ; + end ; + new Wutil.gobj_widget pane diff --git a/src/plugins/gui/wbox.mli b/src/plugins/gui/wbox.mli index 3cf819eb36a..b0b3c142f44 100644 --- a/src/plugins/gui/wbox.mli +++ b/src/plugins/gui/wbox.mli @@ -52,12 +52,12 @@ val label : ?fill:bool -> ?style:style -> ?align:align -> ?padding:int -> string Default: [~fill:false ~style:`Label ~align:`Left ~padding:0] *) -(** [hbox] and [vbox] can be used to created nested boxes. - Typically, local scope opening can be used, typically: +(** [hbox] and [vbox] can be used to created nested boxes. + Typically, local scope opening can be used, typically: [Wbox.(hbox [ w A ; w B ; w C ])], - where [A], [B] and [C] are widgets, or boxes. + where [A], [B] and [C] are widgets, or boxes. - Notice that nested boxes can {i generally} be packed using default + Notice that nested boxes can {i generally} be packed using default [W] mode, even if they contains horizontal or vertical widgets. *) val hbox : box list -> widget (** Pack a list of boxes horizontally. *) @@ -69,16 +69,21 @@ val hgroup : widget list -> widget (** Pack a list of widgets vertically, with all widgets stuck to the same width *) val vgroup : widget list -> widget -(** The first list is packed to the left side of the toolbar. +(** The first list is packed to the left side of the toolbar. The second list is packed to the right side of the toolbar. *) val toolbar : box list -> box list -> widget -(** The first list is packed to the top of the sidebar. +(** The first list is packed to the top of the sidebar. The second list is packed to the bottom of the sidebar. *) val sidebar : box list -> box list -> widget (** Helper to create a full featured window: - [~top] is layout as a toolbar, [left] and [right] as sidebars, and [bottom] as a status bar. + [~top] is layout as a toolbar, [left] and [right] as sidebars, and [bottom] as a status bar. The main (non-optional) widget is centered with full expansion in both directions. *) val panel : ?top:widget -> ?left:widget -> ?right:widget -> ?bottom:widget -> #widget -> widget +val split : + dir:[`HORIZONTAL|`VERTICAL] -> + ?get:(unit -> float) -> + ?set:(float -> unit) -> + widget -> widget -> widget diff --git a/src/plugins/gui/wutil.ml b/src/plugins/gui/wutil.ml index 42ee0a7912a..7836b767e86 100644 --- a/src/plugins/gui/wutil.ml +++ b/src/plugins/gui/wutil.ml @@ -81,6 +81,23 @@ let later f = let prio = Glib.int_of_priority `LOW in ignore (Glib.Idle.add ~prio for_idle) +(* -------------------------------------------------------------------------- *) +(* --- Ratio --- *) +(* -------------------------------------------------------------------------- *) + +let get_pane_ratio (paned:GPack.paned) = + let paned_min_pos = paned#min_position in + let paned_max_pos = paned#max_position in + let length = paned_max_pos - paned_min_pos in + if length = 0 then 0.5 + else (float_of_int paned#position)/.(float_of_int length) + +let set_pane_ratio (paned:GPack.paned) ratio = + let paned_min_pos = paned#min_position in + let offset = + int_of_float (float (paned#max_position - paned_min_pos) *. ratio) + in paned#set_position (paned_min_pos + offset) + (* -------------------------------------------------------------------------- *) (* --- Widget & Signals --- *) (* -------------------------------------------------------------------------- *) diff --git a/src/plugins/gui/wutil.mli b/src/plugins/gui/wutil.mli index aa07048eedd..390967dbcb3 100644 --- a/src/plugins/gui/wutil.mli +++ b/src/plugins/gui/wutil.mli @@ -43,6 +43,11 @@ val set_small_font : #GObj.widget -> unit val set_bold_font : #GObj.widget -> unit val to_utf8 : string -> string +(** {2 Ratios} *) + +val get_pane_ratio : GPack.paned -> float +val set_pane_ratio : GPack.paned -> float -> unit + (** {2 Timing} *) val later : (unit -> unit) -> unit -- GitLab From 534deeb3a954e7aa63c02457cd94d5d26d5f21aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 11 Feb 2019 13:26:39 +0100 Subject: [PATCH 064/376] Makes frama-c compile with the current lablgtk3 branch. --- Makefile | 6 +++--- configure.in | 15 +++++++++++---- share/Makefile.config.in | 9 +++++++-- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index be71d63e14e..06fec2f4a69 100644 --- a/Makefile +++ b/Makefile @@ -684,7 +684,7 @@ STARTUP_CMX=$(STARTUP_CMO:.cmo=.cmx) WTOOLKIT= \ wutil widget wbox wfile wpane wpalette wtext wtable -ifeq ($(strip $(GTKSOURCEVIEW)),lablgtk3.sourceview3) +ifeq ("$(LABLGTK_VERSION)","3") src/plugins/gui/GSourceView.ml: src/plugins/gui/GSourceView3.ml.in $(CP) $< $@ @@ -1299,7 +1299,7 @@ bin/viewer.byte$(EXE): $(filter-out $(GRAPH_GUICMO),$(ALL_GUI_CMO)) \ $(GEN_BYTE_LIBS) \ $(PLUGIN_DYN_CMO_LIST) $(PLUGIN_DYN_GUI_CMO_LIST) $(PRINT_LINKING) $@ - $(OCAMLC) $(BLINKFLAGS) -o $@ $(BYTE_LIBS) \ + $(OCAMLC) $(BLINKFLAGS) $(THREAD) -o $@ $(BYTE_LIBS) \ $(CMO) \ $(filter-out \ $(patsubst $(PLUGIN_GUI_LIB_DIR)/%,$(PLUGIN_LIB_DIR)/%,\ @@ -1313,7 +1313,7 @@ bin/viewer.opt$(EXE): $(filter-out $(GRAPH_GUICMX),$(ALL_GUI_CMX)) \ $(PLUGIN_DYN_CMX_LIST) $(PLUGIN_DYN_GUI_CMX_LIST) \ $(PLUGIN_CMX_LIST) $(PLUGIN_GUI_CMX_LIST) $(PRINT_LINKING) $@ - $(OCAMLOPT) $(OLINKFLAGS) -o $@ $(OPT_LIBS) \ + $(OCAMLOPT) $(OLINKFLAGS) $(THREAD) -o $@ $(OPT_LIBS) \ $(CMX) \ $(filter-out \ $(patsubst $(PLUGIN_GUI_LIB_DIR)/%,$(PLUGIN_LIB_DIR)/%,\ diff --git a/configure.in b/configure.in index f3c6e60e52c..8abb2c18788 100644 --- a/configure.in +++ b/configure.in @@ -940,12 +940,17 @@ REQUIRE_LABLGTK="$REQUIRE_LABLGTK$REQUIRE_GNOMECANVAS" USE_LABLGTK="$USE_LABLGTK$USE_GNOMECANVAS" LABLGTK_PATH="" +SOURCEVIEW_PATH="" if test "$ENABLE_LABLGTK3" = "yes"; then LABLGTK_PATH=`ocamlfind query lablgtk3 | tr -d '\\r\\n'`; fi -if test "$LABLGTK_PATH" = ""; then +if test "$LABLGTK_PATH" != ""; then + SOURCEVIEW_PATH=`ocamlfind query lablgtk3-sourceview3 | tr -d '\\r\\n'`; +fi + +if test "$SOURCEVIEW_PATH" = ""; then LABLGTK_VERSION=2 LABLGTK_PATH=`ocamlfind query lablgtk2 | tr -d '\\r\\n'` if test "$LABLGTK_PATH" = "" -o \ @@ -957,6 +962,7 @@ if test "$LABLGTK_PATH" = ""; then echo "Ocamlfind -> using $LABLGTK_PATH" LABLGTKPATH_FOR_CONFIGURE=$LABLGTK_PATH fi; + SOURCEVIEW_PATH=$LABLGTK_PATH; else LABLGTK_VERSION=3 echo "ocamlfind -> using $LABLGTK_PATH" @@ -964,8 +970,8 @@ else fi configure_library([GTKSOURCEVIEW], - [$LABLGTKPATH_FOR_CONFIGURE/lablgtksourceview2.$LIB_SUFFIX, - $LABLGTKPATH_FOR_CONFIGURE/lablgtksourceview3.$LIB_SUFFIX], + [$SOURCEVIEW_PATH/lablgtksourceview2.$LIB_SUFFIX, + $SOURCEVIEW_PATH/lablgtk3_sourceview3.$LIB_SUFFIX], [lablgtksourceview not found], no) @@ -975,7 +981,8 @@ configure_library([GNOMECANVAS], no) configure_library([LABLGTK], - [$LABLGTKPATH_FOR_CONFIGURE/lablgtk.$LIB_SUFFIX], + [$LABLGTKPATH_FOR_CONFIGURE/lablgtk.$LIB_SUFFIX, + $LABLGTKPATH_FOR_CONFIGURE/lablgtk3.$LIB_SUFFIX], [$LABLGTKPATH_FOR_CONFIGURE/lablgtk.$LIB_SUFFIX not found.], no) diff --git a/share/Makefile.config.in b/share/Makefile.config.in index 38ae166ad90..af34cfa5a5c 100644 --- a/share/Makefile.config.in +++ b/share/Makefile.config.in @@ -109,8 +109,13 @@ LABLGTK ?= lablgtk@LABLGTK_VERSION@ # lablgtksourceview HAS_GTKSOURCEVIEW ?=@HAS_GTKSOURCEVIEW@ -GTKSOURCEVIEW:=\ - $(patsubst lablgtk%,$(LABLGTK).%,$(basename $(notdir @GTKSOURCEVIEW@))) +LABLGTK_VERSION ?=@LABLGTK_VERSION@ +ifeq ("$(LABLGTK_VERSION)","3") + GTKSOURCEVIEW:=lablgtk3-sourceview3 +else + GTKSOURCEVIEW:=\ + $(patsubst lablgtk%,$(LABLGTK).%,$(basename $(notdir @GTKSOURCEVIEW@))) +endif # lablgnomecanvas HAS_GNOMECANVAS ?=@HAS_GNOMECANVAS@ -- GitLab From e7aa956c5de72ab2003b4ce4b27e9d5013a63610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Mon, 4 Mar 2019 10:22:25 +0100 Subject: [PATCH 065/376] [gui] scroll utility --- src/plugins/gui/wbox.ml | 8 ++++++++ src/plugins/gui/wbox.mli | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/plugins/gui/wbox.ml b/src/plugins/gui/wbox.ml index a00525e95e8..575431003da 100644 --- a/src/plugins/gui/wbox.ml +++ b/src/plugins/gui/wbox.ml @@ -110,3 +110,11 @@ let split ~dir ?get ?set w1 w2 = ignore (pane#event#connect#button_release ~callback) ; end ; new Wutil.gobj_widget pane + +let scroll ?(hpolicy=`AUTOMATIC) ?(vpolicy=`AUTOMATIC) w = + let scrolled = GBin.scrolled_window ~vpolicy ~hpolicy () in + scrolled#add_with_viewport w#coerce ; + new Wutil.gobj_widget scrolled + +let hscroll w = scroll ~vpolicy:`NEVER w +let vscroll w = scroll ~hpolicy:`NEVER w diff --git a/src/plugins/gui/wbox.mli b/src/plugins/gui/wbox.mli index b0b3c142f44..b9e2912d6c4 100644 --- a/src/plugins/gui/wbox.mli +++ b/src/plugins/gui/wbox.mli @@ -87,3 +87,15 @@ val split : ?get:(unit -> float) -> ?set:(float -> unit) -> widget -> widget -> widget + +(** default policy is AUTOMATIC *) +val scroll: + ?hpolicy:[`AUTOMATIC|`ALWAYS|`NEVER] -> + ?vpolicy:[`AUTOMATIC|`ALWAYS|`NEVER] -> + widget -> widget + +(** Same as [scroll ~vpolicy:`NEVER] *) +val hscroll : widget -> widget + +(** Same as [scroll ~volicy:`NEVER] *) +val vscroll : widget -> widget -- GitLab From e2db9b8b19991d1f38f791e72cdd9cf2300380cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Mon, 4 Mar 2019 10:45:45 +0100 Subject: [PATCH 066/376] [gui] use configure pattern for splitters --- src/plugins/gui/gtk_helper.ml | 27 ++++++++++++++++----------- src/plugins/gui/gtk_helper.mli | 15 ++++++++------- src/plugins/gui/wbox.ml | 29 +++++++++++++++++++---------- src/plugins/gui/wbox.mli | 12 +++++++++--- 4 files changed, 52 insertions(+), 31 deletions(-) diff --git a/src/plugins/gui/gtk_helper.ml b/src/plugins/gui/gtk_helper.ml index 550c62ee06f..0c3551ccbb0 100644 --- a/src/plugins/gui/gtk_helper.ml +++ b/src/plugins/gui/gtk_helper.ml @@ -121,6 +121,11 @@ module Configuration = struct widget#set init ; widget#connect (set_bool key) + let config_float ~key ~default widget = + let init = find_float ~default key in + widget#set init ; + widget#connect (set_float key) + let config_values ~key ~default ~values widget = begin let of_string s = fst (List.find (fun e -> snd e = s) values) in @@ -366,7 +371,7 @@ let on_bool ?tooltip ?use_markup (container:GPack.box) label get set = let container = GPack.hbox ~packing:container#pack () in do_tooltip ?tooltip container; let button = - GButton.check_button ~packing:container#pack ~active:!result () + GButton.check_button ~packing:container#pack ~active:!result () in ignore (mk_label ?use_markup container ~xalign:0. label); ignore (button#connect#toggled ~callback:(fun () -> set button#active)); @@ -428,7 +433,7 @@ let on_string ?tooltip ?use_markup ?(validator=(fun _ -> true)) ?width ignore (entry#event#connect#focus_out ~callback); ignore (entry#connect#activate ~callback:(fun () -> ignore (callback ()))); ignore (mk_label ?use_markup ~xalign:0. container label); - (fun () -> + (fun () -> if not (Gobject.Property.get entry#as_widget GtkBase.Widget.P.has_focus) then entry#set_text (get ())) @@ -440,7 +445,7 @@ let on_string_set ?tooltip ?use_markup ?width (container:GPack.box) label get se ignore (entry#event#connect#focus_out ~callback); ignore (entry#connect#activate ~callback:(fun () -> ignore (callback ()))); ignore (mk_label ?use_markup ~xalign:0. container (label ^ " (list)")); - (fun () -> + (fun () -> if not (Gobject.Property.get entry#as_widget GtkBase.Widget.P.has_focus) then entry#set_text (get())) @@ -713,7 +718,7 @@ class type host = object method private set_reset: (unit -> unit) -> unit end -class error_manager ?reset (o_parent:GWindow.window_skel) : host = +class error_manager ?reset (o_parent:GWindow.window_skel) : host = object (self: #host) val mutable f_reset = match reset with @@ -859,11 +864,11 @@ let open_in_external_viewer ?(line=1) (file : Datatype.Filepath.t) = ignore (Sys.command cmd) exception Too_many_events -let refresh_gui () = +let refresh_gui () = let counter = ref 0 in - try - while Glib.Main.iteration false do - if !counter >= 10 then raise Too_many_events + try + while Glib.Main.iteration false do + if !counter >= 10 then raise Too_many_events else incr counter done with Too_many_events -> () @@ -906,7 +911,7 @@ let source_files_chooser (main_ui: source_files_chooser_host) defaults f = ~packing:(hbox#pack ~expand:true ~fill:true) () in - Configuration.use_string "last_opened_dir" + Configuration.use_string "last_opened_dir" (fun s -> ignore (filechooser#set_current_folder s)); filechooser#set_select_multiple true; filechooser#add_filter (accepted_source_files ()); @@ -1033,8 +1038,8 @@ let graph_window_through_dot ~parent ~title dot_formatter = let fmt = Format.formatter_of_out_channel (open_out temp_file) in dot_formatter fmt; Format.pp_print_flush fmt (); - let view = - snd + let view = + snd (Dgraph.DGraphContainer.Dot.from_dot_with_commands ~packing temp_file) in view diff --git a/src/plugins/gui/gtk_helper.mli b/src/plugins/gui/gtk_helper.mli index 37c82a18e9a..776e4d3560d 100644 --- a/src/plugins/gui/gtk_helper.mli +++ b/src/plugins/gui/gtk_helper.mli @@ -95,7 +95,7 @@ module Configuration: sig val set_int: string -> int -> unit (** Sets a ConfigInt *) - + val find_bool : ?default:bool -> string -> bool (** Same as {find_int}. *) @@ -127,13 +127,13 @@ module Configuration: sig (** Helpers to connect widgets to configuration values. The configuration value is first pushed to the widget using method [#set], or the [~default] value is used instead. - + Then, a callback is registered into the widget via [#connect] such that subsequent - values from user's action are saved back into the + values from user's action are saved back into the configuration file. *) - (** Abstract interface to the connected widget. + (** Abstract interface to the connected widget. This API is consistent with the [Widget] ones. *) class type ['a] selector = object @@ -142,15 +142,16 @@ module Configuration: sig method connect : ('a -> unit) -> unit (** Register a callback invoked by the widget each time the value is edited. *) end - + val config_int : key:string -> default:int -> int #selector -> unit val config_bool : key:string -> default:bool -> bool #selector -> unit val config_string : key:string -> default:string -> string #selector -> unit + val config_float : key:string -> default:float -> float #selector -> unit val config_values : key:string -> default:'a -> values:('a * string) list -> 'a #selector -> unit - (** The [values] field is used as a dictionary of available values. + (** The [values] field is used as a dictionary of available values. They are compared with [Pervasives.(=)]. *) - + end (* ************************************************************************** *) diff --git a/src/plugins/gui/wbox.ml b/src/plugins/gui/wbox.ml index 575431003da..b15c784631b 100644 --- a/src/plugins/gui/wbox.ml +++ b/src/plugins/gui/wbox.ml @@ -97,19 +97,28 @@ let panel ?top ?left ?right ?bottom center = | None , Some t -> vbox [ hv middle ; w t ] | Some a , Some b -> vbox [ h a ; hv middle ; h b ] -let split ~dir ?get ?set w1 w2 = +class type splitter = + object + inherit Wutil.widget + method get : float + method set : float -> unit + method connect : (float -> unit) -> unit + end + +let split ~dir w1 w2 = let pane = GPack.paned dir () in pane#add1 w1#coerce ; pane#add2 w2#coerce ; - begin match get with None -> () | Some fget -> - Wutil.set_pane_ratio pane (fget()) - end ; - begin match set with None -> () | Some fset -> - let callback _ = - fset (Wutil.get_pane_ratio pane) ; false in - ignore (pane#event#connect#button_release ~callback) ; - end ; - new Wutil.gobj_widget pane + let splitter = + object + inherit (Wutil.gobj_widget pane) + method get = Wutil.get_pane_ratio pane + method set = Wutil.set_pane_ratio pane + method connect f = + let callback _ = f (Wutil.get_pane_ratio pane) ; false in + ignore (pane#event#connect#button_release ~callback) + end + in (splitter :> splitter) let scroll ?(hpolicy=`AUTOMATIC) ?(vpolicy=`AUTOMATIC) w = let scrolled = GBin.scrolled_window ~vpolicy ~hpolicy () in diff --git a/src/plugins/gui/wbox.mli b/src/plugins/gui/wbox.mli index b9e2912d6c4..822f9641f99 100644 --- a/src/plugins/gui/wbox.mli +++ b/src/plugins/gui/wbox.mli @@ -82,11 +82,17 @@ val sidebar : box list -> box list -> widget The main (non-optional) widget is centered with full expansion in both directions. *) val panel : ?top:widget -> ?left:widget -> ?right:widget -> ?bottom:widget -> #widget -> widget +class type splitter = + object + inherit Wutil.widget + method get : float + method set : float -> unit + method connect : (float -> unit) -> unit + end + val split : dir:[`HORIZONTAL|`VERTICAL] -> - ?get:(unit -> float) -> - ?set:(float -> unit) -> - widget -> widget -> widget + widget -> widget -> splitter (** default policy is AUTOMATIC *) val scroll: -- GitLab From 9d042a411511a3e1943e137e1128ef33b293caad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Mon, 4 Mar 2019 10:46:13 +0100 Subject: [PATCH 067/376] [wp/gui] insert a splitter for palette --- src/plugins/wp/GuiGoal.ml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/wp/GuiGoal.ml b/src/plugins/wp/GuiGoal.ml index 9ba3bf0cc94..eb3a8695830 100644 --- a/src/plugins/wp/GuiGoal.ml +++ b/src/plugins/wp/GuiGoal.ml @@ -82,12 +82,7 @@ class pane (proverpane : GuiConfig.provers) = let composer = new GuiComposer.composer printer in let browser = new GuiComposer.browser printer in let layout = new Wutil.layout in - let scroll_palette = - GBin.scrolled_window ~vpolicy:`AUTOMATIC ~hpolicy:`NEVER () - in - let scroll_palette_widget = new Wutil.gobj_widget scroll_palette in let palette = new Wpalette.panel () in - let () = scroll_palette#add_with_viewport palette#coerce in let help = new Widget.button ~label:"Tactics" ~border:false ~tooltip:"List Available Tactics" () in let delete = new Widget.button @@ -122,7 +117,12 @@ class pane (proverpane : GuiConfig.provers) = w play_script ; w save_script ; w ~padding:6 icon ; h ~padding:6 status ] [ w help ; w delete ]) in - layout#populate (Wbox.panel ~top:toolbar ~right:scroll_palette_widget text) ; + let content = Wbox.split ~dir:`HORIZONTAL + text#widget (Wbox.scroll palette#widget) in + Wutil.later (fun () -> + Config.config_float ~key:"GuiGoal.palette" ~default:0.8 content + ); + layout#populate (Wbox.panel ~top:toolbar content#widget) ; provers <- VCS.([ new GuiProver.prover ~console:text ~prover:AltErgo ] @ List.map -- GitLab From e4de9160a54c099a59cb2094cbc8b8130f06664f Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Thu, 21 Feb 2019 13:55:54 +0100 Subject: [PATCH 068/376] [WP/test] adding a test initializing multidimentianal arrays --- .../wp_typed/oracle/user_init.0.res.oracle | 777 ++++++++++++++++++ .../wp_typed/oracle/user_init.1.res.oracle | 777 ++++++++++++++++++ .../oracle_qualif/user_init.0.report.json | 217 ++++- .../oracle_qualif/user_init.i.0.report.json | 217 ++++- .../oracle_qualif/user_init.res.oracle | 59 +- src/plugins/wp/tests/wp_typed/user_init.i | 60 ++ 6 files changed, 2095 insertions(+), 12 deletions(-) diff --git a/src/plugins/wp/tests/wp_typed/oracle/user_init.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle/user_init.0.res.oracle index 6002f927642..7b2ee670197 100644 --- a/src/plugins/wp/tests/wp_typed/oracle/user_init.0.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle/user_init.0.res.oracle @@ -2,6 +2,8 @@ [kernel] Parsing tests/wp_typed/user_init.i (no preprocessing) [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' +[wp] [CFG] Goal init_t1_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_exits : Valid (Unreachable) [wp] Warning: Missing RTE guards ------------------------------------------------------------ Function init @@ -116,3 +118,778 @@ Effect at line 12 Prove: true. ------------------------------------------------------------ +------------------------------------------------------------ + Function init_t1 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/user_init.i, line 16) in 'init_t1': +Assume { + Type: is_uint32(i_1). + (* Goal *) + When: (0 <= i) /\ (i <= 9). + (* Invariant 'Partial' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < i_1) -> (t1_0[i_2] = v))). + (* Invariant 'Range' *) + Have: (0 <= i_1) /\ (i_1 <= 10). + (* Else *) + Have: 10 <= i_1. +} +Prove: t1_0[i] = v. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 23): +Assume { + Type: is_uint32(i). + (* Goal *) + When: (0 <= i_1) /\ (i_1 < to_uint32(1 + i)). + (* Invariant 'Partial' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < i) -> (t1_0[i_2] = v))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. +} +Prove: t1_0[i <- v][i_1] = v. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 23): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 22): +Assume { + Type: is_uint32(i). + (* Invariant 'Partial' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> (t1_0[i_1] = v))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. +} +Prove: to_uint32(1 + i) <= 10. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 22): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 24): +Prove: true. + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 18) in 'init_t1' (1/2): +Effect at line 26 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 18) in 'init_t1' (2/2): +Effect at line 26 +Prove: true. + +------------------------------------------------------------ +------------------------------------------------------------ + Function init_t2 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/user_init.i, line 30) in 'init_t2': +Assume { + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns ... *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_1[i_3][i_2] = t2_0[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> (t2_0[i_3][i_2] = v))))). +} +Prove: t2_0[i][i_1] = v. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 39): +Let m = t2_0[i]. +Assume { + Type: is_uint32(i). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_1[i_4][i_3] = t2_2[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_2[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_0[i_4][i_3] = t2_2[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (m[i_3] = v))). +} +Prove: m[0] = t2_0[i_1][i_2]. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 39): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 38): +Assume { + Type: is_uint32(i). + (* Loop assigns ... *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns ... *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (t2_2[i][i_1] = v))). +} +Prove: to_uint32(1 + i) <= 10. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 38): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 44): +Let m = t2_0[i]. +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Goal *) + When: (0 <= i_1) /\ (i_1 < to_uint32(1 + j)). + (* Loop assigns ... *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_1[i_3][i_2] = t2_2[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> + ((i_2 <= 19) -> (t2_2[i_3][i_2] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns ... *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_0[i_3][i_2] = t2_2[i_3][i_2])))))). + (* Invariant 'Previous_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> + ((i_2 <= 19) -> (t2_0[i_3][i_2] = t2_2[i_3][i_2]))))). + (* Invariant 'Partial_j' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < j) -> (m[i_2] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: m[j <- v][i_1] = v. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 44): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Previous_i' (file tests/wp_typed/user_init.i, line 45): +Let m = t2_0[i]. +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Goal *) + When: (0 <= i_1) /\ (i_1 < i) /\ (0 <= i_2) /\ (i_2 <= 19). + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_0[i_4][i_3] = t2_1[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 < j) -> (m[i_3] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: t2_0[i <- m[j <- v]][i_1][i_2] = t2_1[i_1][i_2]. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Previous_i' (file tests/wp_typed/user_init.i, line 45): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 43): +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Loop assigns ... *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns ... *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (t2_2[i][i_1] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: to_uint32(1 + j) <= 20. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 43): +Prove: true. + +------------------------------------------------------------ + +Goal Assertion 'j' (file tests/wp_typed/user_init.i, line 50): +Prove: true. + +------------------------------------------------------------ + +Goal Assertion 'i' (file tests/wp_typed/user_init.i, line 53): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 37) (1/3): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 37) (2/3): +Effect at line 41 +Assume { + Type: is_uint32(i). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (t2_2[i][i_3] = v))). +} +Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> false))))) \/ + (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ + (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ + (i_5 <= 19))))))). + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 37) (3/3): +Effect at line 47 +Assume { + Type: is_uint32(i). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (t2_2[i][i_3] = v))). +} +Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> false))))) \/ + (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ + (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ + (i_5 <= 19))))))). + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 42) (1/3): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 42) (2/3): +Effect at line 47 +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 < j) -> (t2_2[i][i_3] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> false))))) \/ + (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ + (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ + (i_5 <= 19))))))). + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 42) (3/3): +Effect at line 48 +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Goal *) + When: (0 <= i) /\ (0 <= j) /\ (i <= 9) /\ (j <= 19). + (* Loop assigns ... *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: i <= 10. + (* Loop assigns ... *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (t2_2[i][i_1] = v))). + (* Invariant 'Range_j' *) + Have: j <= 20. +} +Prove: exists i_2,i_1 : Z. (i_2 <= i) /\ (i_1 <= j) /\ (0 <= i_1) /\ + (j <= i_1) /\ (0 <= i_2) /\ (i <= i_2) /\ (i_2 <= 9) /\ (i_1 <= 19). + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 32) in 'init_t2' (1/2): +Effect at line 41 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 32) in 'init_t2' (2/2): +Effect at line 41 +Assume { + Have: 0 <= i_2. + Have: 0 <= i_3. + Have: i_2 <= 9. + Have: i_3 <= 19. + Have: 0 <= i. + Have: 0 <= i_1. + Have: i <= 9. + Have: i_1 <= 19. + (* Loop assigns ... *) + Have: forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> + ((i_4 <= 19) -> + (((i_4 < 0) \/ (i_5 < 0) \/ (10 <= i_5) \/ (20 <= i_4)) -> + (t2_0[i_5][i_4] = t2_1[i_5][i_4])))))). +} +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ + (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). + +------------------------------------------------------------ +------------------------------------------------------------ + Function init_t2_bis +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/user_init.i, line 57) in 'init_t2_bis': +Assume { + Type: is_sint32(v). + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns ... *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_1[i_3][i_2] = t2_0[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> (t2_0[i_3][i_2] = v))))). +} +Prove: t2_0[i][i_1] = v. + +------------------------------------------------------------ + +Goal Exit-condition (file tests/wp_typed/user_init.i, line 59) in 'init_t2_bis': +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Loop assigns ... *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Exit Effects *) + Have: (forall i_1 : Z. ((i_1 != i) -> (t2_2[i_1] = t2_1[i_1]))) /\ + (forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> + (((i_1 < 0) \/ (20 <= i_1)) -> (t2_2[i][i_1] = t2_1[i][i_1]))))). +} +Prove: false. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 66): +Let m = t2_0[i]. +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_1[i_4][i_3] = t2_2[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (m[i_3] = v))). + (* Call Effects *) + Have: (forall i_3 : Z. ((i_3 != i) -> (t2_2[i_3] = t2_0[i_3]))) /\ + (forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> + (((i_3 < 0) \/ (20 <= i_3)) -> (t2_2[i][i_3] = m[i_3]))))). +} +Prove: m[0] = t2_0[i_1][i_2]. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 66): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 65): +Let m = t2_2[i]. +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Loop assigns ... *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (m[i_1] = v))). + (* Call Effects *) + Have: (forall i_1 : Z. ((i_1 != i) -> (t2_1[i_1] = t2_2[i_1]))) /\ + (forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> + (((i_1 < 0) \/ (20 <= i_1)) -> (t2_1[i][i_1] = m[i_1]))))). +} +Prove: to_uint32(1 + i) <= 10. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 65): +Prove: true. + +------------------------------------------------------------ + +Goal Assertion 'i' (file tests/wp_typed/user_init.i, line 71): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 64) (1/3): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 64) (2/3): +Effect at line 68 +Let m = t2_2[i]. +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (m[i_3] = v))). + (* Call Effects *) + Have: (forall i_3 : Z. ((i_3 != i) -> (t2_1[i_3] = t2_2[i_3]))) /\ + (forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> + (((i_3 < 0) \/ (20 <= i_3)) -> (t2_1[i][i_3] = m[i_3]))))). +} +Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> false))))) \/ + (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ + (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ + (i_5 <= 19))))))). + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 64) (3/3): +Call Effect at line 69 +Let m = t2_2[i]. +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns ... *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_0[i_3][i_2] = t2_1[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> + ((i_2 <= 19) -> (t2_1[i_3][i_2] = v))))). + (* Invariant 'Range_i' *) + Have: i <= 10. + (* Call 'init' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> (m[i_2] = v))). + (* Call Effects *) + Have: (forall i_2 : Z. ((i_2 != i) -> (t2_1[i_2] = t2_2[i_2]))) /\ + (forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> + (((i_2 < 0) \/ (20 <= i_2)) -> (t2_1[i][i_2] = m[i_2]))))). +} +Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (0 <= i_2) /\ + (i_1 <= i_2) /\ (0 <= i_3) /\ (i <= i_3) /\ (i_3 <= 9) /\ (i_2 <= 19). + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (1/3): +Effect at line 68 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (2/3): +Effect at line 68 +Assume { + Have: 0 <= i_2. + Have: 0 <= i_3. + Have: i_2 <= 9. + Have: i_3 <= 19. + Have: 0 <= i. + Have: 0 <= i_1. + Have: i <= 9. + Have: i_1 <= 19. + (* Loop assigns ... *) + Have: forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> + ((i_4 <= 19) -> + (((i_4 < 0) \/ (i_5 < 0) \/ (10 <= i_5) \/ (20 <= i_4)) -> + (t2_0[i_5][i_4] = t2_1[i_5][i_4])))))). +} +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ + (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (3/3): +Call Effect at line 69 +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns ... *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_0[i_3][i_2] = t2_1[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> + ((i_2 <= 19) -> (t2_1[i_3][i_2] = v))))). + (* Invariant 'Range_i' *) + Have: i <= 10. + (* Exit Effects *) + Have: (forall i_2 : Z. ((i_2 != i) -> (t2_2[i_2] = t2_1[i_2]))) /\ + (forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> + (((i_2 < 0) \/ (20 <= i_2)) -> (t2_2[i][i_2] = t2_1[i][i_2]))))). +} +Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (0 <= i_2) /\ + (i_1 <= i_2) /\ (0 <= i_3) /\ (i <= i_3) /\ (i_3 <= 9) /\ (i_2 <= 19). + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (1/2): +Effect at line 68 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (2/2): +Effect at line 68 +Assume { + Have: 0 <= i_2. + Have: 0 <= i_3. + Have: i_2 <= 9. + Have: i_3 <= 19. + Have: 0 <= i. + Have: 0 <= i_1. + Have: i <= 9. + Have: i_1 <= 19. + (* Loop assigns ... *) + Have: forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> + ((i_4 <= 19) -> + (((i_4 < 0) \/ (i_5 < 0) \/ (10 <= i_5) \/ (20 <= i_4)) -> + (t2_0[i_5][i_4] = t2_1[i_5][i_4])))))). +} +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ + (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). + +------------------------------------------------------------ + +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 1) in 'init'' in 'init_t2_bis' at call 'init' (file tests/wp_typed/user_init.i, line 69) +: +Prove: true. + +------------------------------------------------------------ + +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 2) in 'init'' in 'init_t2_bis' at call 'init' (file tests/wp_typed/user_init.i, line 69) +: +Prove: true. + +------------------------------------------------------------ diff --git a/src/plugins/wp/tests/wp_typed/oracle/user_init.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle/user_init.1.res.oracle index 69788521bcf..fa09d252394 100644 --- a/src/plugins/wp/tests/wp_typed/oracle/user_init.1.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle/user_init.1.res.oracle @@ -2,6 +2,8 @@ [kernel] Parsing tests/wp_typed/user_init.i (no preprocessing) [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' +[wp] [CFG] Goal init_t1_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_exits : Valid (Unreachable) [wp] Warning: Missing RTE guards ------------------------------------------------------------ Function init @@ -116,3 +118,778 @@ Effect at line 12 Prove: true. ------------------------------------------------------------ +------------------------------------------------------------ + Function init_t1 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/user_init.i, line 16) in 'init_t1': +Assume { + Type: is_uint32(i_1). + (* Goal *) + When: (0 <= i) /\ (i <= 9). + (* Invariant 'Partial' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < i_1) -> (t1_0[i_2] = v))). + (* Invariant 'Range' *) + Have: (0 <= i_1) /\ (i_1 <= 10). + (* Else *) + Have: 10 <= i_1. +} +Prove: t1_0[i] = v. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 23): +Assume { + Type: is_uint32(i). + (* Goal *) + When: (0 <= i_1) /\ (i_1 < to_uint32(1 + i)). + (* Invariant 'Partial' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < i) -> (t1_0[i_2] = v))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. +} +Prove: t1_0[i <- v][i_1] = v. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 23): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 22): +Assume { + Type: is_uint32(i). + (* Invariant 'Partial' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> (t1_0[i_1] = v))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. +} +Prove: to_uint32(1 + i) <= 10. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 22): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 24): +Prove: true. + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 18) in 'init_t1' (1/2): +Effect at line 26 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 18) in 'init_t1' (2/2): +Effect at line 26 +Prove: true. + +------------------------------------------------------------ +------------------------------------------------------------ + Function init_t2 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/user_init.i, line 30) in 'init_t2': +Assume { + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns ... *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_1[i_3][i_2] = t2_0[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> (t2_0[i_3][i_2] = v))))). +} +Prove: t2_0[i][i_1] = v. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 39): +Let m = t2_0[i]. +Assume { + Type: is_uint32(i). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_1[i_4][i_3] = t2_2[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_2[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_0[i_4][i_3] = t2_2[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (m[i_3] = v))). +} +Prove: m[0] = t2_0[i_1][i_2]. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 39): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 38): +Assume { + Type: is_uint32(i). + (* Loop assigns ... *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns ... *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (t2_2[i][i_1] = v))). +} +Prove: to_uint32(1 + i) <= 10. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 38): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 44): +Let m = t2_0[i]. +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Goal *) + When: (0 <= i_1) /\ (i_1 < to_uint32(1 + j)). + (* Loop assigns ... *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_1[i_3][i_2] = t2_2[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> + ((i_2 <= 19) -> (t2_2[i_3][i_2] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns ... *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_0[i_3][i_2] = t2_2[i_3][i_2])))))). + (* Invariant 'Previous_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> + ((i_2 <= 19) -> (t2_0[i_3][i_2] = t2_2[i_3][i_2]))))). + (* Invariant 'Partial_j' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < j) -> (m[i_2] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: m[j <- v][i_1] = v. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 44): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Previous_i' (file tests/wp_typed/user_init.i, line 45): +Let m = t2_0[i]. +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Goal *) + When: (0 <= i_1) /\ (i_1 < i) /\ (0 <= i_2) /\ (i_2 <= 19). + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_0[i_4][i_3] = t2_1[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 < j) -> (m[i_3] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: t2_0[i <- m[j <- v]][i_1][i_2] = t2_1[i_1][i_2]. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Previous_i' (file tests/wp_typed/user_init.i, line 45): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 43): +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Loop assigns ... *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns ... *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (t2_2[i][i_1] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: to_uint32(1 + j) <= 20. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 43): +Prove: true. + +------------------------------------------------------------ + +Goal Assertion 'j' (file tests/wp_typed/user_init.i, line 50): +Prove: true. + +------------------------------------------------------------ + +Goal Assertion 'i' (file tests/wp_typed/user_init.i, line 53): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 37) (1/3): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 37) (2/3): +Effect at line 41 +Assume { + Type: is_uint32(i). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (t2_2[i][i_3] = v))). +} +Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> false))))) \/ + (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ + (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ + (i_5 <= 19))))))). + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 37) (3/3): +Effect at line 47 +Assume { + Type: is_uint32(i). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (t2_2[i][i_3] = v))). +} +Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> false))))) \/ + (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ + (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ + (i_5 <= 19))))))). + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 42) (1/3): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 42) (2/3): +Effect at line 47 +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 < j) -> (t2_2[i][i_3] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> false))))) \/ + (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ + (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ + (i_5 <= 19))))))). + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 42) (3/3): +Effect at line 48 +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Goal *) + When: (0 <= i) /\ (0 <= j) /\ (i <= 9) /\ (j <= 19). + (* Loop assigns ... *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: i <= 10. + (* Loop assigns ... *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (t2_2[i][i_1] = v))). + (* Invariant 'Range_j' *) + Have: j <= 20. +} +Prove: exists i_2,i_1 : Z. (i_2 <= i) /\ (i_1 <= j) /\ (0 <= i_1) /\ + (j <= i_1) /\ (0 <= i_2) /\ (i <= i_2) /\ (i_2 <= 9) /\ (i_1 <= 19). + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 32) in 'init_t2' (1/2): +Effect at line 41 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 32) in 'init_t2' (2/2): +Effect at line 41 +Assume { + Have: 0 <= i_2. + Have: 0 <= i_3. + Have: i_2 <= 9. + Have: i_3 <= 19. + Have: 0 <= i. + Have: 0 <= i_1. + Have: i <= 9. + Have: i_1 <= 19. + (* Loop assigns ... *) + Have: forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> + ((i_4 <= 19) -> + (((i_4 < 0) \/ (i_5 < 0) \/ (10 <= i_5) \/ (20 <= i_4)) -> + (t2_0[i_5][i_4] = t2_1[i_5][i_4])))))). +} +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ + (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). + +------------------------------------------------------------ +------------------------------------------------------------ + Function init_t2_bis +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/user_init.i, line 57) in 'init_t2_bis': +Assume { + Type: is_sint32(v). + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns ... *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_1[i_3][i_2] = t2_0[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> (t2_0[i_3][i_2] = v))))). +} +Prove: t2_0[i][i_1] = v. + +------------------------------------------------------------ + +Goal Exit-condition (file tests/wp_typed/user_init.i, line 59) in 'init_t2_bis': +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Loop assigns ... *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Exit Effects *) + Have: (forall i_1 : Z. ((i_1 != i) -> (t2_2[i_1] = t2_1[i_1]))) /\ + (forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> + (((i_1 < 0) \/ (20 <= i_1)) -> (t2_2[i][i_1] = t2_1[i][i_1]))))). +} +Prove: false. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 66): +Let m = t2_0[i]. +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_1[i_4][i_3] = t2_2[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (m[i_3] = v))). + (* Call Effects *) + Have: (forall i_3 : Z. ((i_3 != i) -> (t2_2[i_3] = t2_0[i_3]))) /\ + (forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> + (((i_3 < 0) \/ (20 <= i_3)) -> (t2_2[i][i_3] = m[i_3]))))). +} +Prove: m[0] = t2_0[i_1][i_2]. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 66): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 65): +Let m = t2_2[i]. +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Loop assigns ... *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (m[i_1] = v))). + (* Call Effects *) + Have: (forall i_1 : Z. ((i_1 != i) -> (t2_1[i_1] = t2_2[i_1]))) /\ + (forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> + (((i_1 < 0) \/ (20 <= i_1)) -> (t2_1[i][i_1] = m[i_1]))))). +} +Prove: to_uint32(1 + i) <= 10. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 65): +Prove: true. + +------------------------------------------------------------ + +Goal Assertion 'i' (file tests/wp_typed/user_init.i, line 71): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 64) (1/3): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 64) (2/3): +Effect at line 68 +Let m = t2_2[i]. +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). + (* Loop assigns ... *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (m[i_3] = v))). + (* Call Effects *) + Have: (forall i_3 : Z. ((i_3 != i) -> (t2_1[i_3] = t2_2[i_3]))) /\ + (forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> + (((i_3 < 0) \/ (20 <= i_3)) -> (t2_1[i][i_3] = m[i_3]))))). +} +Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> false))))) \/ + (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ + (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ + (i_5 <= 19))))))). + +------------------------------------------------------------ + +Goal Loop assigns (file tests/wp_typed/user_init.i, line 64) (3/3): +Call Effect at line 69 +Let m = t2_2[i]. +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns ... *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_0[i_3][i_2] = t2_1[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> + ((i_2 <= 19) -> (t2_1[i_3][i_2] = v))))). + (* Invariant 'Range_i' *) + Have: i <= 10. + (* Call 'init' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> (m[i_2] = v))). + (* Call Effects *) + Have: (forall i_2 : Z. ((i_2 != i) -> (t2_1[i_2] = t2_2[i_2]))) /\ + (forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> + (((i_2 < 0) \/ (20 <= i_2)) -> (t2_1[i][i_2] = m[i_2]))))). +} +Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (0 <= i_2) /\ + (i_1 <= i_2) /\ (0 <= i_3) /\ (i <= i_3) /\ (i_3 <= 9) /\ (i_2 <= 19). + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (1/3): +Effect at line 68 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (2/3): +Effect at line 68 +Assume { + Have: 0 <= i_2. + Have: 0 <= i_3. + Have: i_2 <= 9. + Have: i_3 <= 19. + Have: 0 <= i. + Have: 0 <= i_1. + Have: i <= 9. + Have: i_1 <= 19. + (* Loop assigns ... *) + Have: forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> + ((i_4 <= 19) -> + (((i_4 < 0) \/ (i_5 < 0) \/ (10 <= i_5) \/ (20 <= i_4)) -> + (t2_0[i_5][i_4] = t2_1[i_5][i_4])))))). +} +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ + (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (3/3): +Call Effect at line 69 +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns ... *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_0[i_3][i_2] = t2_1[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> + ((i_2 <= 19) -> (t2_1[i_3][i_2] = v))))). + (* Invariant 'Range_i' *) + Have: i <= 10. + (* Exit Effects *) + Have: (forall i_2 : Z. ((i_2 != i) -> (t2_2[i_2] = t2_1[i_2]))) /\ + (forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> + (((i_2 < 0) \/ (20 <= i_2)) -> (t2_2[i][i_2] = t2_1[i][i_2]))))). +} +Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (0 <= i_2) /\ + (i_1 <= i_2) /\ (0 <= i_3) /\ (i <= i_3) /\ (i_3 <= 9) /\ (i_2 <= 19). + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (1/2): +Effect at line 68 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (2/2): +Effect at line 68 +Assume { + Have: 0 <= i_2. + Have: 0 <= i_3. + Have: i_2 <= 9. + Have: i_3 <= 19. + Have: 0 <= i. + Have: 0 <= i_1. + Have: i <= 9. + Have: i_1 <= 19. + (* Loop assigns ... *) + Have: forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> + ((i_4 <= 19) -> + (((i_4 < 0) \/ (i_5 < 0) \/ (10 <= i_5) \/ (20 <= i_4)) -> + (t2_0[i_5][i_4] = t2_1[i_5][i_4])))))). +} +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ + (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). + +------------------------------------------------------------ + +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 1) in 'init'' in 'init_t2_bis' at call 'init' (file tests/wp_typed/user_init.i, line 69) +: +Prove: true. + +------------------------------------------------------------ + +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 2) in 'init'' in 'init_t2_bis' at call 'init' (file tests/wp_typed/user_init.i, line 69) +: +Prove: true. + +------------------------------------------------------------ diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.0.report.json index ab542867843..7bfbab0fa17 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.0.report.json +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.0.report.json @@ -1,6 +1,8 @@ -{ "wp:global": { "alt-ergo": { "total": 4, "valid": 4, "rank": 19 }, - "qed": { "total": 4, "valid": 4 }, - "wp:main": { "total": 8, "valid": 8, "rank": 19 } }, +{ "wp:global": { "alt-ergo": { "total": 27, "valid": 16, "unknown": 11, + "rank": 19 }, + "qed": { "total": 27, "valid": 27 }, + "wp:main": { "total": 54, "valid": 43, "unknown": 11, + "rank": 19 } }, "wp:functions": { "init": { "init_loop_invariant_Partial": { "alt-ergo": { "total": 1, "valid": 1, @@ -47,4 +49,211 @@ "valid": 4 }, "wp:main": { "total": 8, "valid": 8, - "rank": 19 } } } } } + "rank": 19 } } }, + "init_t1": { "init_t1_loop_invariant_Partial": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 4 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 4 } }, + "init_t1_loop_invariant_Range": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 2 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 2 } }, + "init_t1_assigns": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "init_t1_loop_assigns": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "init_t1_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 3 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 3 } }, + "wp:section": { "alt-ergo": { "total": 3, + "valid": 3, + "rank": 4 }, + "qed": { "total": 5, + "valid": 5 }, + "wp:main": { "total": 8, + "valid": 8, + "rank": 4 } } }, + "init_t2": { "init_t2_assert_i": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "init_t2_assert_j": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "init_t2_loop_invariant_Previous_i": + { "alt-ergo": { "total": 1, "valid": 1, + "rank": 5 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 2, "valid": 2, + "rank": 5 } }, + "init_t2_loop_invariant_Partial_j": + { "alt-ergo": { "total": 1, "valid": 1, + "rank": 8 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 2, "valid": 2, + "rank": 8 } }, + "init_t2_loop_invariant_Range_j": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 3 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 3 } }, + "init_t2_loop_invariant_Partial_i": + { "alt-ergo": { "total": 1, "valid": 1, + "rank": 11 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 2, "valid": 2, + "rank": 11 } }, + "init_t2_loop_invariant_Range_i": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 2 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 2 } }, + "init_t2_assigns": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 2, + "valid": 1, + "unknown": 1 } }, + "init_t2_loop_assigns_2": { "alt-ergo": + { "total": 2, + "unknown": 2 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 3, + "valid": 1, + "unknown": 2 } }, + "init_t2_loop_assigns": { "alt-ergo": + { "total": 2, + "unknown": 2 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 3, + "valid": 1, + "unknown": 2 } }, + "init_t2_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 2 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 2 } }, + "wp:section": { "alt-ergo": { "total": 11, + "valid": 6, + "unknown": 5, + "rank": 11 }, + "qed": { "total": 10, + "valid": 10 }, + "wp:main": { "total": 21, + "valid": 16, + "unknown": 5, + "rank": 11 } } }, + "init_t2_bis": { "init_requires_2": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "init_requires": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "init_t2_bis_assert_i": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "init_t2_bis_loop_invariant_Partial_i": + { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 10 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 2, "valid": 2, + "rank": 10 } }, + "init_t2_bis_loop_invariant_Range_i": + { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 3 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 2, "valid": 2, + "rank": 3 } }, + "init_t2_bis_assigns": { "alt-ergo": + { "total": 3, + "unknown": 3 }, + "qed": + { "total": 2, + "valid": 2 }, + "wp:main": + { "total": 5, + "valid": 2, + "unknown": 3 } }, + "init_t2_bis_loop_assigns": { "alt-ergo": + { "total": 2, + "unknown": 2 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 3, + "valid": 1, + "unknown": 2 } }, + "init_t2_bis_exits": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "init_t2_bis_ensures": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 3 }, + "wp:main": + { "total": 1, + "valid": 1, + "rank": 3 } }, + "wp:section": { "alt-ergo": { "total": 9, + "valid": 3, + "unknown": 6, + "rank": 10 }, + "qed": { "total": 8, + "valid": 8 }, + "wp:main": { "total": 17, + "valid": 11, + "unknown": 6, + "rank": 10 } } } } } diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.i.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.i.0.report.json index 1651d4db136..0b74bede002 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.i.0.report.json +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.i.0.report.json @@ -1,6 +1,8 @@ -{ "wp:global": { "alt-ergo": { "total": 4, "valid": 4, "rank": 19 }, - "qed": { "total": 4, "valid": 4 }, - "wp:main": { "total": 8, "valid": 8, "rank": 19 } }, +{ "wp:global": { "alt-ergo": { "total": 27, "valid": 16, "unknown": 11, + "rank": 19 }, + "qed": { "total": 27, "valid": 27 }, + "wp:main": { "total": 54, "valid": 43, "unknown": 11, + "rank": 19 } }, "wp:functions": { "init": { "init_loop_invariant_Partial": { "alt-ergo": { "total": 1, "valid": 1, @@ -47,4 +49,211 @@ "valid": 4 }, "wp:main": { "total": 8, "valid": 8, - "rank": 19 } } } } } + "rank": 19 } } }, + "init_t1": { "init_t1_loop_invariant_Partial": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 4 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 4 } }, + "init_t1_loop_invariant_Range": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 2 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 2 } }, + "init_t1_assigns": { "qed": { "total": 2, + "valid": 2 }, + "wp:main": { "total": 2, + "valid": 2 } }, + "init_t1_loop_assigns": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "init_t1_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 3 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 3 } }, + "wp:section": { "alt-ergo": { "total": 3, + "valid": 3, + "rank": 4 }, + "qed": { "total": 5, + "valid": 5 }, + "wp:main": { "total": 8, + "valid": 8, + "rank": 4 } } }, + "init_t2": { "init_t2_assert_i": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "init_t2_assert_j": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "init_t2_loop_invariant_Previous_i": + { "alt-ergo": { "total": 1, "valid": 1, + "rank": 5 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 2, "valid": 2, + "rank": 5 } }, + "init_t2_loop_invariant_Partial_j": + { "alt-ergo": { "total": 1, "valid": 1, + "rank": 8 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 2, "valid": 2, + "rank": 8 } }, + "init_t2_loop_invariant_Range_j": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 3 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 3 } }, + "init_t2_loop_invariant_Partial_i": + { "alt-ergo": { "total": 1, "valid": 1, + "rank": 11 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 2, "valid": 2, + "rank": 11 } }, + "init_t2_loop_invariant_Range_i": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 2 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 2, + "valid": 2, + "rank": 2 } }, + "init_t2_assigns": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 2, + "valid": 1, + "unknown": 1 } }, + "init_t2_loop_assigns_2": { "alt-ergo": + { "total": 2, + "unknown": 2 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 3, + "valid": 1, + "unknown": 2 } }, + "init_t2_loop_assigns": { "alt-ergo": + { "total": 2, + "unknown": 2 }, + "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 3, + "valid": 1, + "unknown": 2 } }, + "init_t2_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 2 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 2 } }, + "wp:section": { "alt-ergo": { "total": 11, + "valid": 6, + "unknown": 5, + "rank": 11 }, + "qed": { "total": 10, + "valid": 10 }, + "wp:main": { "total": 21, + "valid": 16, + "unknown": 5, + "rank": 11 } } }, + "init_t2_bis": { "init_requires_2": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "init_requires": { "qed": { "total": 1, + "valid": 1 }, + "wp:main": { "total": 1, + "valid": 1 } }, + "init_t2_bis_assert_i": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "init_t2_bis_loop_invariant_Partial_i": + { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 10 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 2, "valid": 2, + "rank": 10 } }, + "init_t2_bis_loop_invariant_Range_i": + { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 3 }, + "qed": { "total": 1, "valid": 1 }, + "wp:main": { "total": 2, "valid": 2, + "rank": 3 } }, + "init_t2_bis_assigns": { "alt-ergo": + { "total": 3, + "unknown": 3 }, + "qed": + { "total": 2, + "valid": 2 }, + "wp:main": + { "total": 5, + "valid": 2, + "unknown": 3 } }, + "init_t2_bis_loop_assigns": { "alt-ergo": + { "total": 2, + "unknown": 2 }, + "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 3, + "valid": 1, + "unknown": 2 } }, + "init_t2_bis_exits": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "init_t2_bis_ensures": { "alt-ergo": + { "total": 1, + "valid": 1, + "rank": 3 }, + "wp:main": + { "total": 1, + "valid": 1, + "rank": 3 } }, + "wp:section": { "alt-ergo": { "total": 9, + "valid": 3, + "unknown": 6, + "rank": 10 }, + "qed": { "total": 8, + "valid": 8 }, + "wp:main": { "total": 17, + "valid": 11, + "unknown": 6, + "rank": 10 } } } } } diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.res.oracle index 6f23e12122e..4166c7752ea 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.res.oracle @@ -2,8 +2,10 @@ [kernel] Parsing tests/wp_typed/user_init.i (no preprocessing) [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' +[wp] [CFG] Goal init_t1_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_exits : Valid (Unreachable) [wp] Warning: Missing RTE guards -[wp] 8 goals scheduled +[wp] 54 goals scheduled [wp] [Alt-Ergo] Goal typed_init_ensures : Valid [wp] [Alt-Ergo] Goal typed_init_loop_invariant_Partial_preserved : Valid [wp] [Qed] Goal typed_init_loop_invariant_Partial_established : Valid @@ -12,12 +14,61 @@ [wp] [Qed] Goal typed_init_loop_assigns_part1 : Valid [wp] [Alt-Ergo] Goal typed_init_loop_assigns_part2 : Valid [wp] [Qed] Goal typed_init_assigns : Valid -[wp] Proved goals: 8 / 8 - Qed: 4 - Alt-Ergo: 4 +[wp] [Alt-Ergo] Goal typed_init_t1_ensures : Valid +[wp] [Alt-Ergo] Goal typed_init_t1_loop_invariant_Partial_preserved : Valid +[wp] [Qed] Goal typed_init_t1_loop_invariant_Partial_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t1_loop_invariant_Range_preserved : Valid +[wp] [Qed] Goal typed_init_t1_loop_invariant_Range_established : Valid +[wp] [Qed] Goal typed_init_t1_loop_assigns : Valid +[wp] [Qed] Goal typed_init_t1_assigns_part1 : Valid +[wp] [Qed] Goal typed_init_t1_assigns_part2 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_ensures : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_loop_invariant_Partial_i_preserved : Valid +[wp] [Qed] Goal typed_init_t2_loop_invariant_Partial_i_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_loop_invariant_Range_i_preserved : Valid +[wp] [Qed] Goal typed_init_t2_loop_invariant_Range_i_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_loop_invariant_Partial_j_preserved : Valid +[wp] [Qed] Goal typed_init_t2_loop_invariant_Partial_j_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_loop_invariant_Previous_i_preserved : Valid +[wp] [Qed] Goal typed_init_t2_loop_invariant_Previous_i_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_loop_invariant_Range_j_preserved : Valid +[wp] [Qed] Goal typed_init_t2_loop_invariant_Range_j_established : Valid +[wp] [Qed] Goal typed_init_t2_assert_j : Valid +[wp] [Qed] Goal typed_init_t2_assert_i : Valid +[wp] [Qed] Goal typed_init_t2_loop_assigns_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_loop_assigns_part2 : Unsuccess +[wp] [Alt-Ergo] Goal typed_init_t2_loop_assigns_part3 : Unsuccess +[wp] [Qed] Goal typed_init_t2_loop_assigns_2_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_loop_assigns_2_part2 : Unsuccess +[wp] [Alt-Ergo] Goal typed_init_t2_loop_assigns_2_part3 : Unsuccess +[wp] [Qed] Goal typed_init_t2_assigns_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_assigns_part2 : Unsuccess +[wp] [Alt-Ergo] Goal typed_init_t2_bis_ensures : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_exits : Unsuccess +[wp] [Alt-Ergo] Goal typed_init_t2_bis_loop_invariant_Partial_i_preserved : Valid +[wp] [Qed] Goal typed_init_t2_bis_loop_invariant_Partial_i_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_loop_invariant_Range_i_preserved : Valid +[wp] [Qed] Goal typed_init_t2_bis_loop_invariant_Range_i_established : Valid +[wp] [Qed] Goal typed_init_t2_bis_assert_i : Valid +[wp] [Qed] Goal typed_init_t2_bis_loop_assigns_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_loop_assigns_part2 : Unsuccess +[wp] [Alt-Ergo] Goal typed_init_t2_bis_loop_assigns_part3 : Unsuccess +[wp] [Qed] Goal typed_init_t2_bis_assigns_exit_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_assigns_exit_part2 : Unsuccess +[wp] [Alt-Ergo] Goal typed_init_t2_bis_assigns_exit_part3 : Unsuccess +[wp] [Qed] Goal typed_init_t2_bis_assigns_normal_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_assigns_normal_part2 : Unsuccess +[wp] [Qed] Goal typed_init_t2_bis_call_init_requires : Valid +[wp] [Qed] Goal typed_init_t2_bis_call_init_requires_2 : Valid +[wp] Proved goals: 43 / 54 + Qed: 27 + Alt-Ergo: 16 (unsuccess: 11) [wp] Report in: 'tests/wp_typed/oracle_qualif/user_init.0.report.json' [wp] Report out: 'tests/wp_typed/result_qualif/user_init.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success init 4 4 (80..104) 8 100% +init_t1 5 3 (12..24) 8 100% +init_t2 10 6 (40..52) 21 76.2% +init_t2_bis 8 3 (36..48) 17 64.7% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_typed/user_init.i b/src/plugins/wp/tests/wp_typed/user_init.i index a7ab761501f..416a94e97e0 100644 --- a/src/plugins/wp/tests/wp_typed/user_init.i +++ b/src/plugins/wp/tests/wp_typed/user_init.i @@ -11,3 +11,63 @@ void init( int * a , int n , int v ) */ for (int i = 0 ; i < n ; i++) a[i] = v ; } +//------------------------- +int t1[10]; +/*@ ensures \forall integer k; 0 <= k < 10 ==> t1[k] == v ; + @ exits \false; + @ assigns t1[0..9] ; +*/ +void init_t1(int v) { + unsigned i; + /*@ loop invariant Range: 0 <= i <= 10 ; + @ loop invariant Partial: \forall integer k ; 0 <= k < i ==> t1[k] ≡ v ; + @ loop assigns i,t1[0..9] ; + */ + for (i = 0 ; i < 10 ; i++) t1[i] = v ; +} +//------------------------- +int t2[10][20]; +/*@ ensures \forall integer k, l; 0 <= k < 10 && 0 <= l < 20 ==> t2[k][l] == v; + @ exits \false; + @ assigns t2[0..9][0..19]; + */ +void init_t2(int v) { + + unsigned i,j; + /*@ loop assigns i, j, t2[0..9][0..19]; + @ loop invariant Range_i: 0 <= i <= 10 ; + @ loop invariant Partial_i: \forall integer k,l; 0 <= k < i && 0 <= l < 20 ==> t2[k][l] == v; + */ + for(i = 0; i <= 9; i++) { + /*@ loop assigns j, t2[0..9][0..19]; + @ loop invariant Range_j: 0 <= j <= 20 ; + @ loop invariant Partial_j: \forall integer l; 0 <= l < j ==> t2[i][l] == v; + @ loop invariant Previous_i: \forall integer k,l; 0 <= k < i && 0 <= l < 20 ==> t2[k][l] == \at(t2[k][l], LoopEntry); + */ + for(j = 0; j <= 19; j++) { + t2[i][j] = v; + } + //@ assert j: j==20; + ; + } + //@ assert i: i==10; + ; +} +//------------------------- +/*@ ensures \forall integer k, l; 0 <= k < 10 && 0 <= l < 20 ==> t2[k][l] == v; + @ assigns t2[0..9][0..19]; + @ exits \false; + */ +void init_t2_bis(int v) { + + unsigned i; + /*@ loop assigns i, t2[0..9][0..19]; + @ loop invariant Range_i: 0 <= i <= 10 ; + @ loop invariant Partial_i: \forall integer k,l; 0 <= k < i && 0 <= l < 20 ==> t2[k][l] == v; + */ + for(i = 0; i <= 9; i++) { + init(&t2[i][0], 20, v); + } + //@ assert i: i==10; + ; +} -- GitLab From c1bfc28c37dea037754b324871f34ca80104579b Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Thu, 28 Feb 2019 14:21:48 +0100 Subject: [PATCH 069/376] [WP/test] adding a test initializing multidimentianal arrays --- .../wp_typed/oracle/user_init.0.res.oracle | 1820 ++++++++++++++--- .../wp_typed/oracle/user_init.1.res.oracle | 1820 ++++++++++++++--- .../oracle_qualif/user_init.0.res.oracle | 115 ++ .../oracle_qualif/user_init.1.res.oracle | 32 + .../oracle_qualif/user_init.2.res.oracle | 56 + .../oracle_qualif/user_init.res.oracle | 74 - src/plugins/wp/tests/wp_typed/user_init.i | 123 +- 7 files changed, 3268 insertions(+), 772 deletions(-) create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.0.res.oracle create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.1.res.oracle create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.2.res.oracle delete mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.res.oracle diff --git a/src/plugins/wp/tests/wp_typed/oracle/user_init.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle/user_init.0.res.oracle index 7b2ee670197..3981469580e 100644 --- a/src/plugins/wp/tests/wp_typed/oracle/user_init.0.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle/user_init.0.res.oracle @@ -2,14 +2,18 @@ [kernel] Parsing tests/wp_typed/user_init.i (no preprocessing) [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' +[wp] [CFG] Goal init_exits : Valid (Unreachable) [wp] [CFG] Goal init_t1_exits : Valid (Unreachable) -[wp] [CFG] Goal init_t2_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_v1_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_v2_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_v3_exits : Valid (Unreachable) [wp] Warning: Missing RTE guards +[wp] Computing [100 goals...] ------------------------------------------------------------ Function init ------------------------------------------------------------ -Goal Post-condition (file tests/wp_typed/user_init.i, line 3) in 'init': +Goal Post-condition (file tests/wp_typed/user_init.i, line 10) in 'init': Let a_1 = shift_sint32(a, 0). Assume { Type: is_sint32(i) /\ is_sint32(n). @@ -31,7 +35,7 @@ Prove: havoc(Mint_undef_0, Mint_0, a_1, i)[shift_sint32(a, i_1)] = v. ------------------------------------------------------------ -Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 9): +Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 17): Let a_1 = shift_sint32(a, 0). Let a_2 = havoc(Mint_undef_0, Mint_0, a_1, n). Assume { @@ -54,12 +58,12 @@ Prove: a_2[shift_sint32(a, i) <- v][shift_sint32(a, i_1)] = v. ------------------------------------------------------------ -Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 9): +Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 17): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 8): +Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 16): Let a_1 = shift_sint32(a, 0). Assume { Type: is_sint32(i) /\ is_sint32(n) /\ is_sint32(1 + i). @@ -79,18 +83,18 @@ Prove: (-1) <= i. ------------------------------------------------------------ -Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 8): +Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 16): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 10) (1/2): +Goal Loop assigns 'Zone' (1/2): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 10) (2/2): -Effect at line 12 +Goal Loop assigns 'Zone' (2/2): +Effect at line 20 Let a_1 = shift_sint32(a, 0). Let a_2 = shift_sint32(a, i). Assume { @@ -113,8 +117,18 @@ Prove: included(a_2, 1, a_1, n). ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 4) in 'init': -Effect at line 12 +Goal Assigns (file tests/wp_typed/user_init.i, line 9) in 'init': +Effect at line 20 +Prove: true. + +------------------------------------------------------------ + +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 20): +Prove: true. + +------------------------------------------------------------ + +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 20): Prove: true. ------------------------------------------------------------ @@ -122,7 +136,7 @@ Prove: true. Function init_t1 ------------------------------------------------------------ -Goal Post-condition (file tests/wp_typed/user_init.i, line 16) in 'init_t1': +Goal Post-condition (file tests/wp_typed/user_init.i, line 24) in 'init_t1': Assume { Type: is_uint32(i_1). (* Goal *) @@ -134,78 +148,1150 @@ Assume { (* Else *) Have: 10 <= i_1. } -Prove: t1_0[i] = v. +Prove: t1_0[i] = v. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 32): +Assume { + Type: is_uint32(i). + (* Goal *) + When: (0 <= i_1) /\ (i_1 < to_uint32(1 + i)). + (* Invariant 'Partial' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < i) -> (t1_0[i_2] = v))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. +} +Prove: t1_0[i <- v][i_1] = v. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 32): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 31): +Assume { + Type: is_uint32(i). + (* Invariant 'Partial' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> (t1_0[i_1] = v))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. +} +Prove: to_uint32(1 + i) <= 10. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 31): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns 'Zone': +Prove: true. + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 26) in 'init_t1' (1/2): +Effect at line 35 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 26) in 'init_t1' (2/2): +Effect at line 35 +Prove: true. + +------------------------------------------------------------ + +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 35): +Assume { + Type: is_uint32(i). + (* Invariant 'Partial' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> (t1_0[i_1] = v))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. +} +Prove: i < to_uint32(1 + i). + +------------------------------------------------------------ + +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 35): +Prove: true. + +------------------------------------------------------------ +------------------------------------------------------------ + Function init_t2_bis_v1 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/user_init.i, line 125) in 'init_t2_bis_v1': +Let a = global(G_t2_48). +Assume { + Type: is_uint32(i_2) /\ is_sint32(v). + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns 'lack,Zone' *) + Have: forall a_1 : addr. + ((forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (shift_sint32(shift_A20_sint32(a, i_4), i_3) != a_1)))))) -> + (Mint_1[a_1] = Mint_0[a_1])). + (* Invariant 'Partial' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i_2) -> + ((i_3 <= 19) -> + (Mint_0[shift_sint32(shift_A20_sint32(a, i_4), i_3)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i_2) /\ (i_2 <= 10). + (* Else *) + Have: 10 <= i_2. +} +Prove: Mint_0[shift_sint32(shift_A20_sint32(a, i), i_1)] = v. + +------------------------------------------------------------ + +Goal Exit-condition (file tests/wp_typed/user_init.i, line 127) in 'init_t2_bis_v1': +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 134): +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Let a_2 = shift_sint32(a_1, 0). +Let a_3 = havoc(Mint_undef_0, Mint_0, a_2, 20). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). + (* Loop assigns 'lack,Zone' *) + Have: forall a_4 : addr. + ((forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (shift_sint32(shift_A20_sint32(a, i_4), i_3) != a_4)))))) -> + (Mint_1[a_4] = Mint_0[a_4])). + (* Invariant 'Partial' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> + (Mint_0[shift_sint32(shift_A20_sint32(a, i_4), i_3)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> + (a_3[shift_sint32(a_1, i_3)] = v))). +} +Prove: a_3[shift_sint32(shift_A20_sint32(a, i_1), i_2)] = Mint_undef_0[a_2]. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 134): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 133): +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Loop assigns 'lack,Zone' *) + Have: forall a_2 : addr. + ((forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (shift_sint32(shift_A20_sint32(a, i_2), i_1) != a_2)))))) -> + (Mint_0[a_2] = Mint_1[a_2])). + (* Invariant 'Partial' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> + (Mint_1[shift_sint32(shift_A20_sint32(a, i_2), i_1)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> + (havoc(Mint_undef_0, Mint_1, shift_sint32(a_1, 0), 20) + [shift_sint32(a_1, i_1)] = v))). +} +Prove: to_uint32(1 + i) <= 10. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 133): +Prove: true. + +------------------------------------------------------------ + +Goal Assertion 'Offset' (file tests/wp_typed/user_init.i, line 139): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone' (1/3): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone' (2/3): +Effect at line 137 +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). + (* Loop assigns 'lack,Zone' *) + Have: forall a_2 : addr. + ((forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (shift_sint32(shift_A20_sint32(a, i_4), i_3) != a_2)))))) -> + (Mint_0[a_2] = Mint_1[a_2])). + (* Invariant 'Partial' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> + (Mint_1[shift_sint32(shift_A20_sint32(a, i_4), i_3)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> + (havoc(Mint_undef_0, Mint_1, shift_sint32(a_1, 0), 20) + [shift_sint32(a_1, i_3)] = v))). +} +Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> false))))) \/ + (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ + (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ + (i_5 <= 19))))))). + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone' (3/3): +Call Effect at line 138 +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns 'lack,Zone' *) + Have: forall a_2 : addr. + ((forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (shift_sint32(shift_A20_sint32(a, i_3), i_2) != a_2)))))) -> + (Mint_0[a_2] = Mint_1[a_2])). + (* Invariant 'Partial' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> + ((i_2 <= 19) -> + (Mint_1[shift_sint32(shift_A20_sint32(a, i_3), i_2)] = v))))). + (* Invariant 'Range' *) + Have: i <= 10. + (* Call 'init' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> + (havoc(Mint_undef_0, Mint_1, shift_sint32(a_1, 0), 20) + [shift_sint32(a_1, i_2)] = v))). +} +Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (0 <= i_2) /\ + (i_1 <= i_2) /\ (0 <= i_3) /\ (i <= i_3) /\ (i_3 <= 9) /\ (i_2 <= 19). + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v1' (1/3): +Effect at line 137 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v1' (2/3): +Effect at line 137 +Assume { + Have: 0 <= i_2. + Have: 0 <= i_3. + Have: i_2 <= 9. + Have: i_3 <= 19. + Have: 0 <= i. + Have: 0 <= i_1. + Have: i <= 9. + Have: i_1 <= 19. + (* Loop assigns 'lack,Zone' *) + Have: forall a : addr. + ((forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> + ((i_4 <= 19) -> + (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))))) -> + (Mint_0[a] = Mint_1[a])). +} +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ + (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v1' (3/3): +Call Effect at line 138 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v1' (1/2): +Effect at line 137 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v1' (2/2): +Effect at line 137 +Assume { + Have: 0 <= i_2. + Have: 0 <= i_3. + Have: i_2 <= 9. + Have: i_3 <= 19. + Have: 0 <= i. + Have: 0 <= i_1. + Have: i <= 9. + Have: i_1 <= 19. + (* Loop assigns 'lack,Zone' *) + Have: forall a : addr. + ((forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> + ((i_4 <= 19) -> + (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))))) -> + (Mint_0[a] = Mint_1[a])). +} +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ + (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). + +------------------------------------------------------------ + +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 137): +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Loop assigns 'lack,Zone' *) + Have: forall a_2 : addr. + ((forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (shift_sint32(shift_A20_sint32(a, i_2), i_1) != a_2)))))) -> + (Mint_0[a_2] = Mint_1[a_2])). + (* Invariant 'Partial' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> + (Mint_1[shift_sint32(shift_A20_sint32(a, i_2), i_1)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> + (havoc(Mint_undef_0, Mint_1, shift_sint32(a_1, 0), 20) + [shift_sint32(a_1, i_1)] = v))). +} +Prove: i < to_uint32(1 + i). + +------------------------------------------------------------ + +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 137): +Prove: true. + +------------------------------------------------------------ + +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 7) in 'init'' in 'init_t2_bis_v1' at call 'init' (file tests/wp_typed/user_init.i, line 138) +: +Prove: true. + +------------------------------------------------------------ + +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 8) in 'init'' in 'init_t2_bis_v1' at call 'init' (file tests/wp_typed/user_init.i, line 138) +: +Prove: true. + +------------------------------------------------------------ +------------------------------------------------------------ + Function init_t2_bis_v2 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/user_init.i, line 143) in 'init_t2_bis_v2': +Let a = global(G_t2_48). +Assume { + Type: is_uint32(i_2) /\ is_sint32(v). + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns 'lack,Zone' *) + Have: forall a_1 : addr. + ((forall i_4,i_3 : Z. ((0 <= i_4) -> ((i_4 <= 9) -> + (shift_sint32(shift_A20_sint32(a, i_4), i_3) != a_1)))) -> + (Mint_1[a_1] = Mint_0[a_1])). + (* Invariant 'Partial' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i_2) -> + ((i_3 <= 19) -> + (Mint_0[shift_sint32(shift_A20_sint32(a, i_4), i_3)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i_2) /\ (i_2 <= 10). + (* Else *) + Have: 10 <= i_2. +} +Prove: Mint_0[shift_sint32(shift_A20_sint32(a, i), i_1)] = v. + +------------------------------------------------------------ + +Goal Exit-condition (file tests/wp_typed/user_init.i, line 145) in 'init_t2_bis_v2': +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 152): +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Let a_2 = shift_sint32(a_1, 0). +Let a_3 = havoc(Mint_undef_0, Mint_0, a_2, 20). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). + (* Loop assigns 'lack,Zone' *) + Have: forall a_4 : addr. + ((forall i_4,i_3 : Z. ((0 <= i_4) -> ((i_4 <= 9) -> + (shift_sint32(shift_A20_sint32(a, i_4), i_3) != a_4)))) -> + (Mint_1[a_4] = Mint_0[a_4])). + (* Invariant 'Partial' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> + (Mint_0[shift_sint32(shift_A20_sint32(a, i_4), i_3)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> + (a_3[shift_sint32(a_1, i_3)] = v))). +} +Prove: a_3[shift_sint32(shift_A20_sint32(a, i_1), i_2)] = Mint_undef_0[a_2]. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 152): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 151): +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Loop assigns 'lack,Zone' *) + Have: forall a_2 : addr. + ((forall i_2,i_1 : Z. ((0 <= i_2) -> ((i_2 <= 9) -> + (shift_sint32(shift_A20_sint32(a, i_2), i_1) != a_2)))) -> + (Mint_0[a_2] = Mint_1[a_2])). + (* Invariant 'Partial' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> + (Mint_1[shift_sint32(shift_A20_sint32(a, i_2), i_1)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> + (havoc(Mint_undef_0, Mint_1, shift_sint32(a_1, 0), 20) + [shift_sint32(a_1, i_1)] = v))). +} +Prove: to_uint32(1 + i) <= 10. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 151): +Prove: true. + +------------------------------------------------------------ + +Goal Assertion 'Offset_i' (file tests/wp_typed/user_init.i, line 157): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone' (1/3): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone' (2/3): +Effect at line 155 +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i_2). +Assume { + Have: 0 <= i. + Have: i <= 9. + Type: is_uint32(i_2) /\ is_sint32(v). + (* Goal *) + When: (0 <= i_3) /\ (0 <= i_4) /\ (i_3 <= 9) /\ (i_4 <= 19). + (* Loop assigns 'lack,Zone' *) + Have: forall a_2 : addr. + ((forall i_6,i_5 : Z. ((0 <= i_6) -> ((i_6 <= 9) -> + (shift_sint32(shift_A20_sint32(a, i_6), i_5) != a_2)))) -> + (Mint_0[a_2] = Mint_1[a_2])). + (* Invariant 'Partial' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> + ((i_5 <= 19) -> + (Mint_1[shift_sint32(shift_A20_sint32(a, i_6), i_5)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i_2) /\ (i_2 <= 10). + (* Then *) + Have: i_2 <= 9. + (* Call 'init' *) + Have: forall i_5 : Z. ((0 <= i_5) -> ((i_5 <= 19) -> + (havoc(Mint_undef_0, Mint_1, shift_sint32(a_1, 0), 20) + [shift_sint32(a_1, i_5)] = v))). +} +Prove: exists i_6,i_5 : Z. (i_6 <= i) /\ (i_5 <= i_1) /\ (i_1 <= i_5) /\ + (0 <= i_6) /\ (i <= i_6) /\ (i_6 <= 9). + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone' (3/3): +Call Effect at line 156 +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns 'lack,Zone' *) + Have: forall a_2 : addr. + ((forall i_3,i_2 : Z. ((0 <= i_3) -> ((i_3 <= 9) -> + (shift_sint32(shift_A20_sint32(a, i_3), i_2) != a_2)))) -> + (Mint_0[a_2] = Mint_1[a_2])). + (* Invariant 'Partial' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> + ((i_2 <= 19) -> + (Mint_1[shift_sint32(shift_A20_sint32(a, i_3), i_2)] = v))))). + (* Invariant 'Range' *) + Have: i <= 10. + (* Call 'init' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> + (havoc(Mint_undef_0, Mint_1, shift_sint32(a_1, 0), 20) + [shift_sint32(a_1, i_2)] = v))). +} +Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (i_1 <= i_2) /\ + (0 <= i_3) /\ (i <= i_3) /\ (i_3 <= 9). + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v2' (1/3): +Effect at line 155 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v2' (2/3): +Effect at line 155 +Assume { + Have: 0 <= i_2. + Have: 0 <= i_3. + Have: i_2 <= 9. + Have: i_3 <= 19. + Have: 0 <= i. + Have: i <= 9. + (* Loop assigns 'lack,Zone' *) + Have: forall a : addr. + ((forall i_5,i_4 : Z. ((0 <= i_5) -> ((i_5 <= 9) -> + (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))) -> + (Mint_0[a] = Mint_1[a])). +} +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ + (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9). + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v2' (3/3): +Call Effect at line 156 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v2' (1/2): +Effect at line 155 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v2' (2/2): +Effect at line 155 +Assume { + Have: 0 <= i_2. + Have: 0 <= i_3. + Have: i_2 <= 9. + Have: i_3 <= 19. + Have: 0 <= i. + Have: i <= 9. + (* Loop assigns 'lack,Zone' *) + Have: forall a : addr. + ((forall i_5,i_4 : Z. ((0 <= i_5) -> ((i_5 <= 9) -> + (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))) -> + (Mint_0[a] = Mint_1[a])). +} +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ + (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9). + +------------------------------------------------------------ + +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 155): +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Loop assigns 'lack,Zone' *) + Have: forall a_2 : addr. + ((forall i_2,i_1 : Z. ((0 <= i_2) -> ((i_2 <= 9) -> + (shift_sint32(shift_A20_sint32(a, i_2), i_1) != a_2)))) -> + (Mint_0[a_2] = Mint_1[a_2])). + (* Invariant 'Partial' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> + (Mint_1[shift_sint32(shift_A20_sint32(a, i_2), i_1)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> + (havoc(Mint_undef_0, Mint_1, shift_sint32(a_1, 0), 20) + [shift_sint32(a_1, i_1)] = v))). +} +Prove: i < to_uint32(1 + i). + +------------------------------------------------------------ + +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 155): +Prove: true. + +------------------------------------------------------------ + +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 7) in 'init'' in 'init_t2_bis_v2' at call 'init' (file tests/wp_typed/user_init.i, line 156) +: +Prove: true. + +------------------------------------------------------------ + +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 8) in 'init'' in 'init_t2_bis_v2' at call 'init' (file tests/wp_typed/user_init.i, line 156) +: +Prove: true. + +------------------------------------------------------------ +------------------------------------------------------------ + Function init_t2_v1 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/user_init.i, line 39) in 'init_t2_v1': +Assume { + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_1[i_3][i_2] = t2_0[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> (t2_0[i_3][i_2] = v))))). +} +Prove: t2_0[i][i_1] = v. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 48): +Let m = t2_0[i]. +Assume { + Type: is_uint32(i). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_1[i_4][i_3] = t2_2[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_2[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_0[i_4][i_3] = t2_2[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (m[i_3] = v))). +} +Prove: m[0] = t2_0[i_1][i_2]. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 48): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 47): +Assume { + Type: is_uint32(i). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (t2_2[i][i_1] = v))). +} +Prove: to_uint32(1 + i) <= 10. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 47): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 54): +Let m = t2_0[i]. +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Goal *) + When: (0 <= i_1) /\ (i_1 < to_uint32(1 + j)). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_1[i_3][i_2] = t2_2[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> + ((i_2 <= 19) -> (t2_2[i_3][i_2] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_0[i_3][i_2] = t2_2[i_3][i_2])))))). + (* Invariant 'Previous_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> + ((i_2 <= 19) -> (t2_0[i_3][i_2] = t2_2[i_3][i_2]))))). + (* Invariant 'Partial_j' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < j) -> (m[i_2] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: m[j <- v][i_1] = v. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 54): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Previous_i' (file tests/wp_typed/user_init.i, line 55): +Let m = t2_0[i]. +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Goal *) + When: (0 <= i_1) /\ (i_1 < i) /\ (0 <= i_2) /\ (i_2 <= 19). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_0[i_4][i_3] = t2_1[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 < j) -> (m[i_3] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: t2_0[i <- m[j <- v]][i_1][i_2] = t2_1[i_1][i_2]. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Previous_i' (file tests/wp_typed/user_init.i, line 55): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 53): +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (t2_2[i][i_1] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: to_uint32(1 + j) <= 20. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 53): +Prove: true. + +------------------------------------------------------------ + +Goal Assertion 'Last_j' (file tests/wp_typed/user_init.i, line 61): +Prove: true. + +------------------------------------------------------------ + +Goal Assertion 'Last_i' (file tests/wp_typed/user_init.i, line 64): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone_i' (1/3): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone_i' (2/3): +Effect at line 51 +Assume { + Type: is_uint32(i). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (t2_2[i][i_3] = v))). +} +Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> false))))) \/ + (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ + (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ + (i_5 <= 19))))))). ------------------------------------------------------------ -Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 23): +Goal Loop assigns 'lack,Zone_i' (3/3): +Effect at line 58 Assume { Type: is_uint32(i). (* Goal *) - When: (0 <= i_1) /\ (i_1 < to_uint32(1 + i)). - (* Invariant 'Partial' *) - Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < i) -> (t1_0[i_2] = v))). - (* Invariant 'Range' *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (t2_2[i][i_3] = v))). } -Prove: t1_0[i <- v][i_1] = v. +Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> false))))) \/ + (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ + (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ + (i_5 <= 19))))))). ------------------------------------------------------------ -Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 23): +Goal Loop assigns 'lack,Zone_j' (1/3): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 22): +Goal Loop assigns 'lack,Zone_j' (2/3): +Effect at line 58 Assume { - Type: is_uint32(i). - (* Invariant 'Partial' *) - Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> (t1_0[i_1] = v))). - (* Invariant 'Range' *) + Type: is_uint32(i) /\ is_uint32(j). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 < j) -> (t2_2[i][i_3] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. } -Prove: to_uint32(1 + i) <= 10. +Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> false))))) \/ + (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ + (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ + (i_5 <= 19))))))). ------------------------------------------------------------ -Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 22): -Prove: true. +Goal Loop assigns 'lack,Zone_j' (3/3): +Effect at line 59 +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Goal *) + When: (0 <= i) /\ (0 <= j) /\ (i <= 9) /\ (j <= 19). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: i <= 10. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (t2_2[i][i_1] = v))). + (* Invariant 'Range_j' *) + Have: j <= 20. +} +Prove: exists i_2,i_1 : Z. (i_2 <= i) /\ (i_1 <= j) /\ (0 <= i_1) /\ + (j <= i_1) /\ (0 <= i_2) /\ (i <= i_2) /\ (i_2 <= 9) /\ (i_1 <= 19). ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 24): +Goal Assigns 'lack' in 'init_t2_v1' (1/2): +Effect at line 51 Prove: true. ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 18) in 'init_t1' (1/2): -Effect at line 26 +Goal Assigns 'lack' in 'init_t2_v1' (2/2): +Effect at line 51 +Assume { + Have: 0 <= i_2. + Have: 0 <= i_3. + Have: i_2 <= 9. + Have: i_3 <= 19. + Have: 0 <= i. + Have: 0 <= i_1. + Have: i <= 9. + Have: i_1 <= 19. + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> + ((i_4 <= 19) -> + (((i_4 < 0) \/ (i_5 < 0) \/ (10 <= i_5) \/ (20 <= i_4)) -> + (t2_0[i_5][i_4] = t2_1[i_5][i_4])))))). +} +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ + (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). + +------------------------------------------------------------ + +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 51): +Assume { + Type: is_uint32(i). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (t2_2[i][i_1] = v))). +} +Prove: i < to_uint32(1 + i). + +------------------------------------------------------------ + +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 51): Prove: true. ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 18) in 'init_t1' (2/2): -Effect at line 26 +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 58): +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (t2_2[i][i_1] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: j < to_uint32(1 + j). + +------------------------------------------------------------ + +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 58): Prove: true. ------------------------------------------------------------ ------------------------------------------------------------ - Function init_t2 + Function init_t2_v2 ------------------------------------------------------------ -Goal Post-condition (file tests/wp_typed/user_init.i, line 30) in 'init_t2': +Goal Post-condition (file tests/wp_typed/user_init.i, line 68) in 'init_t2_v2': Assume { (* Goal *) When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> - (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> (t2_1[i_3][i_2] = t2_0[i_3][i_2])))))). (* Invariant 'Partial_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> @@ -215,16 +1301,15 @@ Prove: t2_0[i][i_1] = v. ------------------------------------------------------------ -Goal Preservation of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 39): +Goal Preservation of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 77): Let m = t2_0[i]. Assume { Type: is_uint32(i). (* Goal *) When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + ((i_3 <= 19) -> (((i_4 < 0) \/ (10 <= i_4)) -> (t2_1[i_4][i_3] = t2_2[i_4][i_3])))))). (* Invariant 'Partial_i' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> @@ -233,10 +1318,9 @@ Assume { Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_j' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + ((i_3 <= 19) -> (((i_4 < 0) \/ (10 <= i_4)) -> (t2_0[i_4][i_3] = t2_2[i_4][i_3])))))). (* Invariant 'Previous_i' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> @@ -248,18 +1332,17 @@ Prove: m[0] = t2_0[i_1][i_2]. ------------------------------------------------------------ -Goal Establishment of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 39): +Goal Establishment of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 77): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 38): +Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 76): Assume { Type: is_uint32(i). - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> - (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). (* Invariant 'Partial_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> @@ -268,10 +1351,9 @@ Assume { Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_j' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> - (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). (* Invariant 'Previous_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> @@ -283,21 +1365,20 @@ Prove: to_uint32(1 + i) <= 10. ------------------------------------------------------------ -Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 38): +Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 76): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 44): +Goal Preservation of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 83): Let m = t2_0[i]. Assume { Type: is_uint32(i) /\ is_uint32(j). (* Goal *) When: (0 <= i_1) /\ (i_1 < to_uint32(1 + j)). - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> - (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> (t2_1[i_3][i_2] = t2_2[i_3][i_2])))))). (* Invariant 'Partial_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> @@ -306,10 +1387,9 @@ Assume { Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_j' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> - (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> (t2_0[i_3][i_2] = t2_2[i_3][i_2])))))). (* Invariant 'Previous_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> @@ -325,21 +1405,20 @@ Prove: m[j <- v][i_1] = v. ------------------------------------------------------------ -Goal Establishment of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 44): +Goal Establishment of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 83): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Previous_i' (file tests/wp_typed/user_init.i, line 45): +Goal Preservation of Invariant 'Previous_i' (file tests/wp_typed/user_init.i, line 84): Let m = t2_0[i]. Assume { Type: is_uint32(i) /\ is_uint32(j). (* Goal *) When: (0 <= i_1) /\ (i_1 < i) /\ (0 <= i_2) /\ (i_2 <= 19). - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + ((i_3 <= 19) -> (((i_4 < 0) \/ (10 <= i_4)) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). (* Invariant 'Partial_i' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> @@ -348,10 +1427,9 @@ Assume { Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_j' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + ((i_3 <= 19) -> (((i_4 < 0) \/ (10 <= i_4)) -> (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). (* Invariant 'Previous_i' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> @@ -367,18 +1445,17 @@ Prove: t2_0[i <- m[j <- v]][i_1][i_2] = t2_1[i_1][i_2]. ------------------------------------------------------------ -Goal Establishment of Invariant 'Previous_i' (file tests/wp_typed/user_init.i, line 45): +Goal Establishment of Invariant 'Previous_i' (file tests/wp_typed/user_init.i, line 84): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 43): +Goal Preservation of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 82): Assume { Type: is_uint32(i) /\ is_uint32(j). - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> - (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). (* Invariant 'Partial_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> @@ -387,10 +1464,9 @@ Assume { Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_j' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> - (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). (* Invariant 'Previous_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> @@ -406,172 +1482,157 @@ Prove: to_uint32(1 + j) <= 20. ------------------------------------------------------------ -Goal Establishment of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 43): +Goal Establishment of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 82): Prove: true. ------------------------------------------------------------ -Goal Assertion 'j' (file tests/wp_typed/user_init.i, line 50): +Goal Assertion 'Last_j' (file tests/wp_typed/user_init.i, line 90): Prove: true. ------------------------------------------------------------ -Goal Assertion 'i' (file tests/wp_typed/user_init.i, line 53): +Goal Assertion 'Last_i' (file tests/wp_typed/user_init.i, line 93): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 37) (1/3): +Goal Loop assigns 'tactic,Zone_i' (1/3): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 37) (2/3): -Effect at line 41 +Goal Loop assigns 'tactic,Zone_i' (2/3): +Effect at line 80 Assume { - Type: is_uint32(i). + Have: 0 <= i. + Have: i <= 9. + Type: is_uint32(i_2). (* Goal *) - When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). - (* Loop assigns ... *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> - (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + When: (0 <= i_3) /\ (0 <= i_4) /\ (i_3 <= 9) /\ (i_4 <= 19). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 <= 9) -> + ((i_5 <= 19) -> (((i_6 < 0) \/ (10 <= i_6)) -> + (t2_0[i_6][i_5] = t2_1[i_6][i_5])))))). (* Invariant 'Partial_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> + ((i_5 <= 19) -> (t2_1[i_6][i_5] = v))))). (* Invariant 'Range_i' *) - Have: (0 <= i) /\ (i <= 10). + Have: (0 <= i_2) /\ (i_2 <= 10). (* Then *) - Have: i <= 9. - (* Loop assigns ... *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> - (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + Have: i_2 <= 9. + (* Loop assigns 'tactic,Zone_j' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 <= 9) -> + ((i_5 <= 19) -> (((i_6 < 0) \/ (10 <= i_6)) -> + (t2_2[i_6][i_5] = t2_1[i_6][i_5])))))). (* Invariant 'Previous_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> + ((i_5 <= 19) -> (t2_2[i_6][i_5] = t2_1[i_6][i_5]))))). (* Invariant 'Partial_j' *) - Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (t2_2[i][i_3] = v))). + Have: forall i_5 : Z. ((0 <= i_5) -> ((i_5 <= 19) -> + (t2_2[i_2][i_5] = v))). } -Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> false))))) \/ - (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ - (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ - (i_5 <= 19))))))). +Prove: exists i_6,i_5 : Z. (i_6 <= i) /\ (i_5 <= i_1) /\ (i_1 <= i_5) /\ + (0 <= i_6) /\ (i <= i_6) /\ (i_6 <= 9). ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 37) (3/3): -Effect at line 47 +Goal Loop assigns 'tactic,Zone_i' (3/3): +Effect at line 87 Assume { - Type: is_uint32(i). + Have: 0 <= i. + Have: i <= 9. + Type: is_uint32(i_2). (* Goal *) - When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). - (* Loop assigns ... *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> - (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + When: (0 <= i_3) /\ (0 <= i_4) /\ (i_3 <= 9) /\ (i_4 <= 19). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 <= 9) -> + ((i_5 <= 19) -> (((i_6 < 0) \/ (10 <= i_6)) -> + (t2_0[i_6][i_5] = t2_1[i_6][i_5])))))). (* Invariant 'Partial_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> + ((i_5 <= 19) -> (t2_1[i_6][i_5] = v))))). (* Invariant 'Range_i' *) - Have: (0 <= i) /\ (i <= 10). + Have: (0 <= i_2) /\ (i_2 <= 10). (* Then *) - Have: i <= 9. - (* Loop assigns ... *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> - (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + Have: i_2 <= 9. + (* Loop assigns 'tactic,Zone_j' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 <= 9) -> + ((i_5 <= 19) -> (((i_6 < 0) \/ (10 <= i_6)) -> + (t2_2[i_6][i_5] = t2_1[i_6][i_5])))))). (* Invariant 'Previous_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> + ((i_5 <= 19) -> (t2_2[i_6][i_5] = t2_1[i_6][i_5]))))). (* Invariant 'Partial_j' *) - Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (t2_2[i][i_3] = v))). + Have: forall i_5 : Z. ((0 <= i_5) -> ((i_5 <= 19) -> + (t2_2[i_2][i_5] = v))). } -Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> false))))) \/ - (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ - (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ - (i_5 <= 19))))))). +Prove: exists i_6,i_5 : Z. (i_6 <= i) /\ (i_5 <= i_1) /\ (i_1 <= i_5) /\ + (0 <= i_6) /\ (i <= i_6) /\ (i_6 <= 9). ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 42) (1/3): +Goal Loop assigns 'tactic,Zone_j' (1/3): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 42) (2/3): -Effect at line 47 +Goal Loop assigns 'tactic,Zone_j' (2/3): +Effect at line 87 Assume { - Type: is_uint32(i) /\ is_uint32(j). + Have: 0 <= i. + Have: i <= 9. + Type: is_uint32(i_2) /\ is_uint32(j). (* Goal *) - When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). - (* Loop assigns ... *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> - (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + When: (0 <= i_3) /\ (0 <= i_4) /\ (i_3 <= 9) /\ (i_4 <= 19). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 <= 9) -> + ((i_5 <= 19) -> (((i_6 < 0) \/ (10 <= i_6)) -> + (t2_0[i_6][i_5] = t2_1[i_6][i_5])))))). (* Invariant 'Partial_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> + ((i_5 <= 19) -> (t2_1[i_6][i_5] = v))))). (* Invariant 'Range_i' *) - Have: (0 <= i) /\ (i <= 10). + Have: (0 <= i_2) /\ (i_2 <= 10). (* Then *) - Have: i <= 9. - (* Loop assigns ... *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> - (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + Have: i_2 <= 9. + (* Loop assigns 'tactic,Zone_j' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 <= 9) -> + ((i_5 <= 19) -> (((i_6 < 0) \/ (10 <= i_6)) -> + (t2_2[i_6][i_5] = t2_1[i_6][i_5])))))). (* Invariant 'Previous_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> + ((i_5 <= 19) -> (t2_2[i_6][i_5] = t2_1[i_6][i_5]))))). (* Invariant 'Partial_j' *) - Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 < j) -> (t2_2[i][i_3] = v))). + Have: forall i_5 : Z. ((0 <= i_5) -> ((i_5 < j) -> (t2_2[i_2][i_5] = v))). (* Invariant 'Range_j' *) Have: (0 <= j) /\ (j <= 20). (* Then *) Have: j <= 19. } -Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> false))))) \/ - (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ - (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ - (i_5 <= 19))))))). +Prove: exists i_6,i_5 : Z. (i_6 <= i) /\ (i_5 <= i_1) /\ (i_1 <= i_5) /\ + (0 <= i_6) /\ (i <= i_6) /\ (i_6 <= 9). ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 42) (3/3): -Effect at line 48 +Goal Loop assigns 'tactic,Zone_j' (3/3): +Effect at line 88 Assume { Type: is_uint32(i) /\ is_uint32(j). (* Goal *) When: (0 <= i) /\ (0 <= j) /\ (i <= 9) /\ (j <= 19). - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> - (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). (* Invariant 'Partial_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). (* Invariant 'Range_i' *) Have: i <= 10. - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_j' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> - (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). (* Invariant 'Previous_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> @@ -581,53 +1642,118 @@ Assume { (* Invariant 'Range_j' *) Have: j <= 20. } -Prove: exists i_2,i_1 : Z. (i_2 <= i) /\ (i_1 <= j) /\ (0 <= i_1) /\ - (j <= i_1) /\ (0 <= i_2) /\ (i <= i_2) /\ (i_2 <= 9) /\ (i_1 <= 19). +Prove: exists i_2,i_1 : Z. (i_2 <= i) /\ (i_1 <= j) /\ (j <= i_1) /\ + (0 <= i_2) /\ (i <= i_2) /\ (i_2 <= 9). ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 32) in 'init_t2' (1/2): -Effect at line 41 +Goal Assigns 'tactic' in 'init_t2_v2' (1/2): +Effect at line 80 Prove: true. ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 32) in 'init_t2' (2/2): -Effect at line 41 +Goal Assigns 'tactic' in 'init_t2_v2' (2/2): +Effect at line 80 Assume { Have: 0 <= i_2. Have: 0 <= i_3. Have: i_2 <= 9. Have: i_3 <= 19. Have: 0 <= i. - Have: 0 <= i_1. Have: i <= 9. - Have: i_1 <= 19. - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> - ((i_4 <= 19) -> - (((i_4 < 0) \/ (i_5 < 0) \/ (10 <= i_5) \/ (20 <= i_4)) -> + ((i_4 <= 19) -> (((i_5 < 0) \/ (10 <= i_5)) -> (t2_0[i_5][i_4] = t2_1[i_5][i_4])))))). } -Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ - (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ + (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9). + +------------------------------------------------------------ + +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 80): +Assume { + Type: is_uint32(i). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'tactic,Zone_j' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (t2_2[i][i_1] = v))). +} +Prove: i < to_uint32(1 + i). + +------------------------------------------------------------ + +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 80): +Prove: true. + +------------------------------------------------------------ + +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 87): +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'tactic,Zone_j' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (t2_2[i][i_1] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: j < to_uint32(1 + j). + +------------------------------------------------------------ + +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 87): +Prove: true. ------------------------------------------------------------ ------------------------------------------------------------ - Function init_t2_bis + Function init_t2_v3 ------------------------------------------------------------ -Goal Post-condition (file tests/wp_typed/user_init.i, line 57) in 'init_t2_bis': +Goal Post-condition (file tests/wp_typed/user_init.i, line 97) in 'init_t2_v3': Assume { - Type: is_sint32(v). (* Goal *) When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). - (* Loop assigns ... *) + (* Loop assigns 'lack,Zone_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> - (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> (t2_1[i_3][i_2] = t2_0[i_3][i_2])))))). - (* Invariant 'Partial_i' *) + (* Invariant 'lack,Partial_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> ((i_2 <= 19) -> (t2_0[i_3][i_2] = v))))). } @@ -635,261 +1761,275 @@ Prove: t2_0[i][i_1] = v. ------------------------------------------------------------ -Goal Exit-condition (file tests/wp_typed/user_init.i, line 59) in 'init_t2_bis': +Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 105): Assume { - Type: is_uint32(i) /\ is_sint32(v). - (* Loop assigns ... *) + Type: is_uint32(i). + (* Loop assigns 'lack,Zone_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> - (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). - (* Invariant 'Partial_i' *) + (* Invariant 'lack,Partial_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. - (* Exit Effects *) - Have: (forall i_1 : Z. ((i_1 != i) -> (t2_2[i_1] = t2_1[i_1]))) /\ - (forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> - (((i_1 < 0) \/ (20 <= i_1)) -> (t2_2[i][i_1] = t2_1[i][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (v_1[i_1] = v))). } -Prove: false. +Prove: to_uint32(1 + i) <= 10. ------------------------------------------------------------ -Goal Preservation of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 66): -Let m = t2_0[i]. +Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 105): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'lack,Partial_i' (file tests/wp_typed/user_init.i, line 106): Assume { - Type: is_uint32(i) /\ is_sint32(v). + Type: is_uint32(i). (* Goal *) When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). - (* Loop assigns ... *) + (* Loop assigns 'lack,Zone_i' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> - (t2_1[i_4][i_3] = t2_2[i_4][i_3])))))). - (* Invariant 'Partial_i' *) + ((i_3 <= 19) -> (((i_4 < 0) \/ (10 <= i_4)) -> + (t2_1[i_4][i_3] = t2_0[i_4][i_3])))))). + (* Invariant 'lack,Partial_i' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_2[i_4][i_3] = v))))). + ((i_3 <= 19) -> (t2_0[i_4][i_3] = v_1))))). (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. - (* Call 'init' *) - Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (m[i_3] = v))). - (* Call Effects *) - Have: (forall i_3 : Z. ((i_3 != i) -> (t2_2[i_3] = t2_0[i_3]))) /\ - (forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> - (((i_3 < 0) \/ (20 <= i_3)) -> (t2_2[i][i_3] = m[i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (v[i_3] = v_1))). } -Prove: m[0] = t2_0[i_1][i_2]. +Prove: t2_0[i <- v][i_1][i_2] = v[0]. ------------------------------------------------------------ -Goal Establishment of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 66): +Goal Establishment of Invariant 'lack,Partial_i' (file tests/wp_typed/user_init.i, line 106): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 65): -Let m = t2_2[i]. +Goal Preservation of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 112): Assume { - Type: is_uint32(i) /\ is_sint32(v). - (* Loop assigns ... *) + Type: is_uint32(i_1) /\ is_uint32(j). + (* Goal *) + When: (0 <= i) /\ (i < to_uint32(1 + j)). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> + (t2_0[i_3][i_2] = t2_1[i_3][i_2])))))). + (* Invariant 'lack,Partial_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i_1) -> + ((i_2 <= 19) -> (t2_1[i_3][i_2] = v_1))))). + (* Invariant 'Range_i' *) + Have: (0 <= i_1) /\ (i_1 <= 10). + (* Then *) + Have: i_1 <= 9. + (* Invariant 'Partial_j' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < j) -> (v[i_2] = v_1))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: v[j <- v_1][i] = v_1. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 112): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 111): +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Loop assigns 'lack,Zone_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> - (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). - (* Invariant 'Partial_i' *) + (* Invariant 'lack,Partial_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. - (* Call 'init' *) - Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (m[i_1] = v))). - (* Call Effects *) - Have: (forall i_1 : Z. ((i_1 != i) -> (t2_1[i_1] = t2_2[i_1]))) /\ - (forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> - (((i_1 < 0) \/ (20 <= i_1)) -> (t2_1[i][i_1] = m[i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (v_1[i_1] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. } -Prove: to_uint32(1 + i) <= 10. +Prove: to_uint32(1 + j) <= 20. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 111): +Prove: true. ------------------------------------------------------------ -Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 65): +Goal Assertion 'Last_j' (file tests/wp_typed/user_init.i, line 118): Prove: true. ------------------------------------------------------------ -Goal Assertion 'i' (file tests/wp_typed/user_init.i, line 71): +Goal Assertion 'Last_i' (file tests/wp_typed/user_init.i, line 121): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 64) (1/3): +Goal Loop assigns 'lack,Zone_i' (1/3): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 64) (2/3): -Effect at line 68 -Let m = t2_2[i]. +Goal Loop assigns 'lack,Zone_i' (2/3): +Effect at line 109 Assume { - Type: is_uint32(i) /\ is_sint32(v). + Have: 0 <= i. + Have: i <= 9. + Type: is_uint32(i_2). (* Goal *) - When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). - (* Loop assigns ... *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> - (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). - (* Invariant 'Partial_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + When: (0 <= i_3) /\ (0 <= i_4) /\ (i_3 <= 9) /\ (i_4 <= 19). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 <= 9) -> + ((i_5 <= 19) -> (((i_6 < 0) \/ (10 <= i_6)) -> + (t2_0[i_6][i_5] = t2_1[i_6][i_5])))))). + (* Invariant 'lack,Partial_i' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> + ((i_5 <= 19) -> (t2_1[i_6][i_5] = v))))). (* Invariant 'Range_i' *) - Have: (0 <= i) /\ (i <= 10). + Have: (0 <= i_2) /\ (i_2 <= 10). (* Then *) - Have: i <= 9. - (* Call 'init' *) - Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (m[i_3] = v))). - (* Call Effects *) - Have: (forall i_3 : Z. ((i_3 != i) -> (t2_1[i_3] = t2_2[i_3]))) /\ - (forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> - (((i_3 < 0) \/ (20 <= i_3)) -> (t2_1[i][i_3] = m[i_3]))))). + Have: i_2 <= 9. + (* Invariant 'Partial_j' *) + Have: forall i_5 : Z. ((0 <= i_5) -> ((i_5 <= 19) -> (v_1[i_5] = v))). } -Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> false))))) \/ - (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ - (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ - (i_5 <= 19))))))). +Prove: exists i_6,i_5 : Z. (i_6 <= i) /\ (i_5 <= i_1) /\ (i_1 <= i_5) /\ + (0 <= i_6) /\ (i <= i_6) /\ (i_6 <= 9). ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 64) (3/3): -Call Effect at line 69 -Let m = t2_2[i]. +Goal Loop assigns 'lack,Zone_i' (3/3): +Effect at line 115 Assume { - Type: is_uint32(i) /\ is_sint32(v). + Type: is_uint32(i). (* Goal *) When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). - (* Loop assigns ... *) + (* Loop assigns 'lack,Zone_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> - (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> (t2_0[i_3][i_2] = t2_1[i_3][i_2])))))). - (* Invariant 'Partial_i' *) + (* Invariant 'lack,Partial_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> ((i_2 <= 19) -> (t2_1[i_3][i_2] = v))))). (* Invariant 'Range_i' *) Have: i <= 10. - (* Call 'init' *) - Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> (m[i_2] = v))). - (* Call Effects *) - Have: (forall i_2 : Z. ((i_2 != i) -> (t2_1[i_2] = t2_2[i_2]))) /\ - (forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> - (((i_2 < 0) \/ (20 <= i_2)) -> (t2_1[i][i_2] = m[i_2]))))). + (* Invariant 'Partial_j' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> (v_1[i_2] = v))). } -Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (0 <= i_2) /\ - (i_1 <= i_2) /\ (0 <= i_3) /\ (i <= i_3) /\ (i_3 <= 9) /\ (i_2 <= 19). +Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (i_1 <= i_2) /\ + (0 <= i_3) /\ (i <= i_3) /\ (i_3 <= 9). + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone_j' (1/2): +Prove: true. ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (1/3): -Effect at line 68 +Goal Loop assigns 'lack,Zone_j' (2/2): +Effect at line 115 Prove: true. ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (2/3): -Effect at line 68 +Goal Assigns 'lack' in 'init_t2_v3' (1/2): +Effect at line 109 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_v3' (2/2): +Effect at line 109 Assume { Have: 0 <= i_2. Have: 0 <= i_3. Have: i_2 <= 9. Have: i_3 <= 19. Have: 0 <= i. - Have: 0 <= i_1. Have: i <= 9. - Have: i_1 <= 19. - (* Loop assigns ... *) + (* Loop assigns 'lack,Zone_i' *) Have: forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> - ((i_4 <= 19) -> - (((i_4 < 0) \/ (i_5 < 0) \/ (10 <= i_5) \/ (20 <= i_4)) -> + ((i_4 <= 19) -> (((i_5 < 0) \/ (10 <= i_5)) -> (t2_0[i_5][i_4] = t2_1[i_5][i_4])))))). } -Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ - (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ + (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9). ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (3/3): -Call Effect at line 69 +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 109): Assume { - Type: is_uint32(i) /\ is_sint32(v). - (* Goal *) - When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). - (* Loop assigns ... *) - Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> - (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> - (t2_0[i_3][i_2] = t2_1[i_3][i_2])))))). - (* Invariant 'Partial_i' *) - Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> - ((i_2 <= 19) -> (t2_1[i_3][i_2] = v))))). + Type: is_uint32(i). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'lack,Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). (* Invariant 'Range_i' *) - Have: i <= 10. - (* Exit Effects *) - Have: (forall i_2 : Z. ((i_2 != i) -> (t2_2[i_2] = t2_1[i_2]))) /\ - (forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> - (((i_2 < 0) \/ (20 <= i_2)) -> (t2_2[i][i_2] = t2_1[i][i_2]))))). + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (v_1[i_1] = v))). } -Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (0 <= i_2) /\ - (i_1 <= i_2) /\ (0 <= i_3) /\ (i <= i_3) /\ (i_3 <= 9) /\ (i_2 <= 19). +Prove: i < to_uint32(1 + i). ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (1/2): -Effect at line 68 +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 109): Prove: true. ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (2/2): -Effect at line 68 +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 115): Assume { - Have: 0 <= i_2. - Have: 0 <= i_3. - Have: i_2 <= 9. - Have: i_3 <= 19. - Have: 0 <= i. - Have: 0 <= i_1. + Type: is_uint32(i) /\ is_uint32(j). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'lack,Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) Have: i <= 9. - Have: i_1 <= 19. - (* Loop assigns ... *) - Have: forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> - ((i_4 <= 19) -> - (((i_4 < 0) \/ (i_5 < 0) \/ (10 <= i_5) \/ (20 <= i_4)) -> - (t2_0[i_5][i_4] = t2_1[i_5][i_4])))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (v_1[i_1] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. } -Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ - (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). - ------------------------------------------------------------- - -Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 1) in 'init'' in 'init_t2_bis' at call 'init' (file tests/wp_typed/user_init.i, line 69) -: -Prove: true. +Prove: j < to_uint32(1 + j). ------------------------------------------------------------ -Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 2) in 'init'' in 'init_t2_bis' at call 'init' (file tests/wp_typed/user_init.i, line 69) -: +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 115): Prove: true. ------------------------------------------------------------ diff --git a/src/plugins/wp/tests/wp_typed/oracle/user_init.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle/user_init.1.res.oracle index fa09d252394..04c72c68990 100644 --- a/src/plugins/wp/tests/wp_typed/oracle/user_init.1.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle/user_init.1.res.oracle @@ -2,14 +2,18 @@ [kernel] Parsing tests/wp_typed/user_init.i (no preprocessing) [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' +[wp] [CFG] Goal init_exits : Valid (Unreachable) [wp] [CFG] Goal init_t1_exits : Valid (Unreachable) -[wp] [CFG] Goal init_t2_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_v1_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_v2_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_v3_exits : Valid (Unreachable) [wp] Warning: Missing RTE guards +[wp] Computing [100 goals...] ------------------------------------------------------------ Function init ------------------------------------------------------------ -Goal Post-condition (file tests/wp_typed/user_init.i, line 3) in 'init': +Goal Post-condition (file tests/wp_typed/user_init.i, line 10) in 'init': Let a_1 = shift_sint32(a, 0). Assume { Type: is_sint32(i) /\ is_sint32(n). @@ -31,7 +35,7 @@ Prove: havoc(Mint_undef_0, Mint_0, a_1, i)[shift_sint32(a, i_1)] = v. ------------------------------------------------------------ -Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 9): +Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 17): Let a_1 = shift_sint32(a, 0). Let a_2 = havoc(Mint_undef_0, Mint_0, a_1, n). Assume { @@ -54,12 +58,12 @@ Prove: a_2[shift_sint32(a, i) <- v][shift_sint32(a, i_1)] = v. ------------------------------------------------------------ -Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 9): +Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 17): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 8): +Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 16): Let a_1 = shift_sint32(a, 0). Assume { Type: is_sint32(i) /\ is_sint32(n) /\ is_sint32(1 + i). @@ -79,18 +83,18 @@ Prove: (-1) <= i. ------------------------------------------------------------ -Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 8): +Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 16): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 10) (1/2): +Goal Loop assigns 'Zone' (1/2): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 10) (2/2): -Effect at line 12 +Goal Loop assigns 'Zone' (2/2): +Effect at line 20 Let a_1 = shift_sint32(a, 0). Let a_2 = shift_sint32(a, i). Assume { @@ -113,8 +117,18 @@ Prove: included(a_2, 1, a_1, n). ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 4) in 'init': -Effect at line 12 +Goal Assigns (file tests/wp_typed/user_init.i, line 9) in 'init': +Effect at line 20 +Prove: true. + +------------------------------------------------------------ + +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 20): +Prove: true. + +------------------------------------------------------------ + +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 20): Prove: true. ------------------------------------------------------------ @@ -122,7 +136,7 @@ Prove: true. Function init_t1 ------------------------------------------------------------ -Goal Post-condition (file tests/wp_typed/user_init.i, line 16) in 'init_t1': +Goal Post-condition (file tests/wp_typed/user_init.i, line 24) in 'init_t1': Assume { Type: is_uint32(i_1). (* Goal *) @@ -134,78 +148,1150 @@ Assume { (* Else *) Have: 10 <= i_1. } -Prove: t1_0[i] = v. +Prove: t1_0[i] = v. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 32): +Assume { + Type: is_uint32(i). + (* Goal *) + When: (0 <= i_1) /\ (i_1 < to_uint32(1 + i)). + (* Invariant 'Partial' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < i) -> (t1_0[i_2] = v))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. +} +Prove: t1_0[i <- v][i_1] = v. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 32): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 31): +Assume { + Type: is_uint32(i). + (* Invariant 'Partial' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> (t1_0[i_1] = v))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. +} +Prove: to_uint32(1 + i) <= 10. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 31): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns 'Zone': +Prove: true. + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 26) in 'init_t1' (1/2): +Effect at line 35 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns (file tests/wp_typed/user_init.i, line 26) in 'init_t1' (2/2): +Effect at line 35 +Prove: true. + +------------------------------------------------------------ + +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 35): +Assume { + Type: is_uint32(i). + (* Invariant 'Partial' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> (t1_0[i_1] = v))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. +} +Prove: i < to_uint32(1 + i). + +------------------------------------------------------------ + +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 35): +Prove: true. + +------------------------------------------------------------ +------------------------------------------------------------ + Function init_t2_bis_v1 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/user_init.i, line 125) in 'init_t2_bis_v1': +Let a = global(G_t2_48). +Assume { + Type: is_uint32(i_2) /\ is_sint32(v). + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns 'lack,Zone' *) + Have: forall a_1 : addr. + ((forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (shift_sint32(shift_A20_sint32(a, i_4), i_3) != a_1)))))) -> + (Mint_1[a_1] = Mint_0[a_1])). + (* Invariant 'Partial' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i_2) -> + ((i_3 <= 19) -> + (Mint_0[shift_sint32(shift_A20_sint32(a, i_4), i_3)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i_2) /\ (i_2 <= 10). + (* Else *) + Have: 10 <= i_2. +} +Prove: Mint_0[shift_sint32(shift_A20_sint32(a, i), i_1)] = v. + +------------------------------------------------------------ + +Goal Exit-condition (file tests/wp_typed/user_init.i, line 127) in 'init_t2_bis_v1': +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 134): +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Let a_2 = shift_sint32(a_1, 0). +Let a_3 = havoc(Mint_undef_0, Mint_0, a_2, 20). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). + (* Loop assigns 'lack,Zone' *) + Have: forall a_4 : addr. + ((forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (shift_sint32(shift_A20_sint32(a, i_4), i_3) != a_4)))))) -> + (Mint_1[a_4] = Mint_0[a_4])). + (* Invariant 'Partial' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> + (Mint_0[shift_sint32(shift_A20_sint32(a, i_4), i_3)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> + (a_3[shift_sint32(a_1, i_3)] = v))). +} +Prove: a_3[shift_sint32(shift_A20_sint32(a, i_1), i_2)] = Mint_undef_0[a_2]. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 134): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 133): +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Loop assigns 'lack,Zone' *) + Have: forall a_2 : addr. + ((forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (shift_sint32(shift_A20_sint32(a, i_2), i_1) != a_2)))))) -> + (Mint_0[a_2] = Mint_1[a_2])). + (* Invariant 'Partial' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> + (Mint_1[shift_sint32(shift_A20_sint32(a, i_2), i_1)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> + (havoc(Mint_undef_0, Mint_1, shift_sint32(a_1, 0), 20) + [shift_sint32(a_1, i_1)] = v))). +} +Prove: to_uint32(1 + i) <= 10. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 133): +Prove: true. + +------------------------------------------------------------ + +Goal Assertion 'Offset' (file tests/wp_typed/user_init.i, line 139): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone' (1/3): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone' (2/3): +Effect at line 137 +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). + (* Loop assigns 'lack,Zone' *) + Have: forall a_2 : addr. + ((forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (shift_sint32(shift_A20_sint32(a, i_4), i_3) != a_2)))))) -> + (Mint_0[a_2] = Mint_1[a_2])). + (* Invariant 'Partial' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> + (Mint_1[shift_sint32(shift_A20_sint32(a, i_4), i_3)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> + (havoc(Mint_undef_0, Mint_1, shift_sint32(a_1, 0), 20) + [shift_sint32(a_1, i_3)] = v))). +} +Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> false))))) \/ + (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ + (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ + (i_5 <= 19))))))). + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone' (3/3): +Call Effect at line 138 +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns 'lack,Zone' *) + Have: forall a_2 : addr. + ((forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (shift_sint32(shift_A20_sint32(a, i_3), i_2) != a_2)))))) -> + (Mint_0[a_2] = Mint_1[a_2])). + (* Invariant 'Partial' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> + ((i_2 <= 19) -> + (Mint_1[shift_sint32(shift_A20_sint32(a, i_3), i_2)] = v))))). + (* Invariant 'Range' *) + Have: i <= 10. + (* Call 'init' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> + (havoc(Mint_undef_0, Mint_1, shift_sint32(a_1, 0), 20) + [shift_sint32(a_1, i_2)] = v))). +} +Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (0 <= i_2) /\ + (i_1 <= i_2) /\ (0 <= i_3) /\ (i <= i_3) /\ (i_3 <= 9) /\ (i_2 <= 19). + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v1' (1/3): +Effect at line 137 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v1' (2/3): +Effect at line 137 +Assume { + Have: 0 <= i_2. + Have: 0 <= i_3. + Have: i_2 <= 9. + Have: i_3 <= 19. + Have: 0 <= i. + Have: 0 <= i_1. + Have: i <= 9. + Have: i_1 <= 19. + (* Loop assigns 'lack,Zone' *) + Have: forall a : addr. + ((forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> + ((i_4 <= 19) -> + (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))))) -> + (Mint_0[a] = Mint_1[a])). +} +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ + (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v1' (3/3): +Call Effect at line 138 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v1' (1/2): +Effect at line 137 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v1' (2/2): +Effect at line 137 +Assume { + Have: 0 <= i_2. + Have: 0 <= i_3. + Have: i_2 <= 9. + Have: i_3 <= 19. + Have: 0 <= i. + Have: 0 <= i_1. + Have: i <= 9. + Have: i_1 <= 19. + (* Loop assigns 'lack,Zone' *) + Have: forall a : addr. + ((forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> + ((i_4 <= 19) -> + (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))))) -> + (Mint_0[a] = Mint_1[a])). +} +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ + (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). + +------------------------------------------------------------ + +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 137): +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Loop assigns 'lack,Zone' *) + Have: forall a_2 : addr. + ((forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (shift_sint32(shift_A20_sint32(a, i_2), i_1) != a_2)))))) -> + (Mint_0[a_2] = Mint_1[a_2])). + (* Invariant 'Partial' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> + (Mint_1[shift_sint32(shift_A20_sint32(a, i_2), i_1)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> + (havoc(Mint_undef_0, Mint_1, shift_sint32(a_1, 0), 20) + [shift_sint32(a_1, i_1)] = v))). +} +Prove: i < to_uint32(1 + i). + +------------------------------------------------------------ + +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 137): +Prove: true. + +------------------------------------------------------------ + +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 7) in 'init'' in 'init_t2_bis_v1' at call 'init' (file tests/wp_typed/user_init.i, line 138) +: +Prove: true. + +------------------------------------------------------------ + +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 8) in 'init'' in 'init_t2_bis_v1' at call 'init' (file tests/wp_typed/user_init.i, line 138) +: +Prove: true. + +------------------------------------------------------------ +------------------------------------------------------------ + Function init_t2_bis_v2 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/user_init.i, line 143) in 'init_t2_bis_v2': +Let a = global(G_t2_48). +Assume { + Type: is_uint32(i_2) /\ is_sint32(v). + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns 'lack,Zone' *) + Have: forall a_1 : addr. + ((forall i_4,i_3 : Z. ((0 <= i_4) -> ((i_4 <= 9) -> + (shift_sint32(shift_A20_sint32(a, i_4), i_3) != a_1)))) -> + (Mint_1[a_1] = Mint_0[a_1])). + (* Invariant 'Partial' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i_2) -> + ((i_3 <= 19) -> + (Mint_0[shift_sint32(shift_A20_sint32(a, i_4), i_3)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i_2) /\ (i_2 <= 10). + (* Else *) + Have: 10 <= i_2. +} +Prove: Mint_0[shift_sint32(shift_A20_sint32(a, i), i_1)] = v. + +------------------------------------------------------------ + +Goal Exit-condition (file tests/wp_typed/user_init.i, line 145) in 'init_t2_bis_v2': +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 152): +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Let a_2 = shift_sint32(a_1, 0). +Let a_3 = havoc(Mint_undef_0, Mint_0, a_2, 20). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). + (* Loop assigns 'lack,Zone' *) + Have: forall a_4 : addr. + ((forall i_4,i_3 : Z. ((0 <= i_4) -> ((i_4 <= 9) -> + (shift_sint32(shift_A20_sint32(a, i_4), i_3) != a_4)))) -> + (Mint_1[a_4] = Mint_0[a_4])). + (* Invariant 'Partial' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> + (Mint_0[shift_sint32(shift_A20_sint32(a, i_4), i_3)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> + (a_3[shift_sint32(a_1, i_3)] = v))). +} +Prove: a_3[shift_sint32(shift_A20_sint32(a, i_1), i_2)] = Mint_undef_0[a_2]. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 152): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 151): +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Loop assigns 'lack,Zone' *) + Have: forall a_2 : addr. + ((forall i_2,i_1 : Z. ((0 <= i_2) -> ((i_2 <= 9) -> + (shift_sint32(shift_A20_sint32(a, i_2), i_1) != a_2)))) -> + (Mint_0[a_2] = Mint_1[a_2])). + (* Invariant 'Partial' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> + (Mint_1[shift_sint32(shift_A20_sint32(a, i_2), i_1)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> + (havoc(Mint_undef_0, Mint_1, shift_sint32(a_1, 0), 20) + [shift_sint32(a_1, i_1)] = v))). +} +Prove: to_uint32(1 + i) <= 10. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 151): +Prove: true. + +------------------------------------------------------------ + +Goal Assertion 'Offset_i' (file tests/wp_typed/user_init.i, line 157): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone' (1/3): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone' (2/3): +Effect at line 155 +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i_2). +Assume { + Have: 0 <= i. + Have: i <= 9. + Type: is_uint32(i_2) /\ is_sint32(v). + (* Goal *) + When: (0 <= i_3) /\ (0 <= i_4) /\ (i_3 <= 9) /\ (i_4 <= 19). + (* Loop assigns 'lack,Zone' *) + Have: forall a_2 : addr. + ((forall i_6,i_5 : Z. ((0 <= i_6) -> ((i_6 <= 9) -> + (shift_sint32(shift_A20_sint32(a, i_6), i_5) != a_2)))) -> + (Mint_0[a_2] = Mint_1[a_2])). + (* Invariant 'Partial' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> + ((i_5 <= 19) -> + (Mint_1[shift_sint32(shift_A20_sint32(a, i_6), i_5)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i_2) /\ (i_2 <= 10). + (* Then *) + Have: i_2 <= 9. + (* Call 'init' *) + Have: forall i_5 : Z. ((0 <= i_5) -> ((i_5 <= 19) -> + (havoc(Mint_undef_0, Mint_1, shift_sint32(a_1, 0), 20) + [shift_sint32(a_1, i_5)] = v))). +} +Prove: exists i_6,i_5 : Z. (i_6 <= i) /\ (i_5 <= i_1) /\ (i_1 <= i_5) /\ + (0 <= i_6) /\ (i <= i_6) /\ (i_6 <= 9). + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone' (3/3): +Call Effect at line 156 +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns 'lack,Zone' *) + Have: forall a_2 : addr. + ((forall i_3,i_2 : Z. ((0 <= i_3) -> ((i_3 <= 9) -> + (shift_sint32(shift_A20_sint32(a, i_3), i_2) != a_2)))) -> + (Mint_0[a_2] = Mint_1[a_2])). + (* Invariant 'Partial' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> + ((i_2 <= 19) -> + (Mint_1[shift_sint32(shift_A20_sint32(a, i_3), i_2)] = v))))). + (* Invariant 'Range' *) + Have: i <= 10. + (* Call 'init' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> + (havoc(Mint_undef_0, Mint_1, shift_sint32(a_1, 0), 20) + [shift_sint32(a_1, i_2)] = v))). +} +Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (i_1 <= i_2) /\ + (0 <= i_3) /\ (i <= i_3) /\ (i_3 <= 9). + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v2' (1/3): +Effect at line 155 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v2' (2/3): +Effect at line 155 +Assume { + Have: 0 <= i_2. + Have: 0 <= i_3. + Have: i_2 <= 9. + Have: i_3 <= 19. + Have: 0 <= i. + Have: i <= 9. + (* Loop assigns 'lack,Zone' *) + Have: forall a : addr. + ((forall i_5,i_4 : Z. ((0 <= i_5) -> ((i_5 <= 9) -> + (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))) -> + (Mint_0[a] = Mint_1[a])). +} +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ + (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9). + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v2' (3/3): +Call Effect at line 156 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v2' (1/2): +Effect at line 155 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_bis_v2' (2/2): +Effect at line 155 +Assume { + Have: 0 <= i_2. + Have: 0 <= i_3. + Have: i_2 <= 9. + Have: i_3 <= 19. + Have: 0 <= i. + Have: i <= 9. + (* Loop assigns 'lack,Zone' *) + Have: forall a : addr. + ((forall i_5,i_4 : Z. ((0 <= i_5) -> ((i_5 <= 9) -> + (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))) -> + (Mint_0[a] = Mint_1[a])). +} +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ + (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9). + +------------------------------------------------------------ + +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 155): +Let a = global(G_t2_48). +Let a_1 = shift_A20_sint32(a, i). +Assume { + Type: is_uint32(i) /\ is_sint32(v). + (* Loop assigns 'lack,Zone' *) + Have: forall a_2 : addr. + ((forall i_2,i_1 : Z. ((0 <= i_2) -> ((i_2 <= 9) -> + (shift_sint32(shift_A20_sint32(a, i_2), i_1) != a_2)))) -> + (Mint_0[a_2] = Mint_1[a_2])). + (* Invariant 'Partial' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> + (Mint_1[shift_sint32(shift_A20_sint32(a, i_2), i_1)] = v))))). + (* Invariant 'Range' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Call 'init' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> + (havoc(Mint_undef_0, Mint_1, shift_sint32(a_1, 0), 20) + [shift_sint32(a_1, i_1)] = v))). +} +Prove: i < to_uint32(1 + i). + +------------------------------------------------------------ + +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 155): +Prove: true. + +------------------------------------------------------------ + +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 7) in 'init'' in 'init_t2_bis_v2' at call 'init' (file tests/wp_typed/user_init.i, line 156) +: +Prove: true. + +------------------------------------------------------------ + +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 8) in 'init'' in 'init_t2_bis_v2' at call 'init' (file tests/wp_typed/user_init.i, line 156) +: +Prove: true. + +------------------------------------------------------------ +------------------------------------------------------------ + Function init_t2_v1 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/user_init.i, line 39) in 'init_t2_v1': +Assume { + (* Goal *) + When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_1[i_3][i_2] = t2_0[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> (t2_0[i_3][i_2] = v))))). +} +Prove: t2_0[i][i_1] = v. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 48): +Let m = t2_0[i]. +Assume { + Type: is_uint32(i). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_1[i_4][i_3] = t2_2[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_2[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_0[i_4][i_3] = t2_2[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (m[i_3] = v))). +} +Prove: m[0] = t2_0[i_1][i_2]. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 48): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 47): +Assume { + Type: is_uint32(i). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (t2_2[i][i_1] = v))). +} +Prove: to_uint32(1 + i) <= 10. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 47): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 54): +Let m = t2_0[i]. +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Goal *) + When: (0 <= i_1) /\ (i_1 < to_uint32(1 + j)). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_1[i_3][i_2] = t2_2[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> + ((i_2 <= 19) -> (t2_2[i_3][i_2] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> + (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + (t2_0[i_3][i_2] = t2_2[i_3][i_2])))))). + (* Invariant 'Previous_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> + ((i_2 <= 19) -> (t2_0[i_3][i_2] = t2_2[i_3][i_2]))))). + (* Invariant 'Partial_j' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < j) -> (m[i_2] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: m[j <- v][i_1] = v. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 54): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Previous_i' (file tests/wp_typed/user_init.i, line 55): +Let m = t2_0[i]. +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Goal *) + When: (0 <= i_1) /\ (i_1 < i) /\ (0 <= i_2) /\ (i_2 <= 19). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_0[i_4][i_3] = t2_1[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 < j) -> (m[i_3] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: t2_0[i <- m[j <- v]][i_1][i_2] = t2_1[i_1][i_2]. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Previous_i' (file tests/wp_typed/user_init.i, line 55): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 53): +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (t2_2[i][i_1] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: to_uint32(1 + j) <= 20. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 53): +Prove: true. + +------------------------------------------------------------ + +Goal Assertion 'Last_j' (file tests/wp_typed/user_init.i, line 61): +Prove: true. + +------------------------------------------------------------ + +Goal Assertion 'Last_i' (file tests/wp_typed/user_init.i, line 64): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone_i' (1/3): +Prove: true. + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone_i' (2/3): +Effect at line 51 +Assume { + Type: is_uint32(i). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (t2_2[i][i_3] = v))). +} +Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> false))))) \/ + (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ + (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ + (i_5 <= 19))))))). ------------------------------------------------------------ -Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 23): +Goal Loop assigns 'lack,Zone_i' (3/3): +Effect at line 58 Assume { Type: is_uint32(i). (* Goal *) - When: (0 <= i_1) /\ (i_1 < to_uint32(1 + i)). - (* Invariant 'Partial' *) - Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < i) -> (t1_0[i_2] = v))). - (* Invariant 'Range' *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (t2_2[i][i_3] = v))). } -Prove: t1_0[i <- v][i_1] = v. +Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> false))))) \/ + (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ + (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ + (i_5 <= 19))))))). ------------------------------------------------------------ -Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 23): +Goal Loop assigns 'lack,Zone_j' (1/3): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 22): +Goal Loop assigns 'lack,Zone_j' (2/3): +Effect at line 58 Assume { - Type: is_uint32(i). - (* Invariant 'Partial' *) - Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> (t1_0[i_1] = v))). - (* Invariant 'Range' *) + Type: is_uint32(i) /\ is_uint32(j). + (* Goal *) + When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Partial_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + (* Invariant 'Previous_i' *) + Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> + ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 < j) -> (t2_2[i][i_3] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. } -Prove: to_uint32(1 + i) <= 10. +Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> false))))) \/ + (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> + ((i_3 <= 19) -> + (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ + (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ + (i_5 <= 19))))))). ------------------------------------------------------------ -Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 22): -Prove: true. +Goal Loop assigns 'lack,Zone_j' (3/3): +Effect at line 59 +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Goal *) + When: (0 <= i) /\ (0 <= j) /\ (i <= 9) /\ (j <= 19). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: i <= 10. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (t2_2[i][i_1] = v))). + (* Invariant 'Range_j' *) + Have: j <= 20. +} +Prove: exists i_2,i_1 : Z. (i_2 <= i) /\ (i_1 <= j) /\ (0 <= i_1) /\ + (j <= i_1) /\ (0 <= i_2) /\ (i <= i_2) /\ (i_2 <= 9) /\ (i_1 <= 19). ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 24): +Goal Assigns 'lack' in 'init_t2_v1' (1/2): +Effect at line 51 Prove: true. ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 18) in 'init_t1' (1/2): -Effect at line 26 +Goal Assigns 'lack' in 'init_t2_v1' (2/2): +Effect at line 51 +Assume { + Have: 0 <= i_2. + Have: 0 <= i_3. + Have: i_2 <= 9. + Have: i_3 <= 19. + Have: 0 <= i. + Have: 0 <= i_1. + Have: i <= 9. + Have: i_1 <= 19. + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> + ((i_4 <= 19) -> + (((i_4 < 0) \/ (i_5 < 0) \/ (10 <= i_5) \/ (20 <= i_4)) -> + (t2_0[i_5][i_4] = t2_1[i_5][i_4])))))). +} +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ + (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). + +------------------------------------------------------------ + +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 51): +Assume { + Type: is_uint32(i). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (t2_2[i][i_1] = v))). +} +Prove: i < to_uint32(1 + i). + +------------------------------------------------------------ + +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 51): Prove: true. ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 18) in 'init_t1' (2/2): -Effect at line 26 +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 58): +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'lack,Zone_j' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> + (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (t2_2[i][i_1] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: j < to_uint32(1 + j). + +------------------------------------------------------------ + +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 58): Prove: true. ------------------------------------------------------------ ------------------------------------------------------------ - Function init_t2 + Function init_t2_v2 ------------------------------------------------------------ -Goal Post-condition (file tests/wp_typed/user_init.i, line 30) in 'init_t2': +Goal Post-condition (file tests/wp_typed/user_init.i, line 68) in 'init_t2_v2': Assume { (* Goal *) When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> - (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> (t2_1[i_3][i_2] = t2_0[i_3][i_2])))))). (* Invariant 'Partial_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> @@ -215,16 +1301,15 @@ Prove: t2_0[i][i_1] = v. ------------------------------------------------------------ -Goal Preservation of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 39): +Goal Preservation of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 77): Let m = t2_0[i]. Assume { Type: is_uint32(i). (* Goal *) When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + ((i_3 <= 19) -> (((i_4 < 0) \/ (10 <= i_4)) -> (t2_1[i_4][i_3] = t2_2[i_4][i_3])))))). (* Invariant 'Partial_i' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> @@ -233,10 +1318,9 @@ Assume { Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_j' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + ((i_3 <= 19) -> (((i_4 < 0) \/ (10 <= i_4)) -> (t2_0[i_4][i_3] = t2_2[i_4][i_3])))))). (* Invariant 'Previous_i' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> @@ -248,18 +1332,17 @@ Prove: m[0] = t2_0[i_1][i_2]. ------------------------------------------------------------ -Goal Establishment of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 39): +Goal Establishment of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 77): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 38): +Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 76): Assume { Type: is_uint32(i). - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> - (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). (* Invariant 'Partial_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> @@ -268,10 +1351,9 @@ Assume { Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_j' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> - (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). (* Invariant 'Previous_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> @@ -283,21 +1365,20 @@ Prove: to_uint32(1 + i) <= 10. ------------------------------------------------------------ -Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 38): +Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 76): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 44): +Goal Preservation of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 83): Let m = t2_0[i]. Assume { Type: is_uint32(i) /\ is_uint32(j). (* Goal *) When: (0 <= i_1) /\ (i_1 < to_uint32(1 + j)). - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> - (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> (t2_1[i_3][i_2] = t2_2[i_3][i_2])))))). (* Invariant 'Partial_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> @@ -306,10 +1387,9 @@ Assume { Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_j' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> - (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> (t2_0[i_3][i_2] = t2_2[i_3][i_2])))))). (* Invariant 'Previous_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> @@ -325,21 +1405,20 @@ Prove: m[j <- v][i_1] = v. ------------------------------------------------------------ -Goal Establishment of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 44): +Goal Establishment of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 83): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Previous_i' (file tests/wp_typed/user_init.i, line 45): +Goal Preservation of Invariant 'Previous_i' (file tests/wp_typed/user_init.i, line 84): Let m = t2_0[i]. Assume { Type: is_uint32(i) /\ is_uint32(j). (* Goal *) When: (0 <= i_1) /\ (i_1 < i) /\ (0 <= i_2) /\ (i_2 <= 19). - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + ((i_3 <= 19) -> (((i_4 < 0) \/ (10 <= i_4)) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). (* Invariant 'Partial_i' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> @@ -348,10 +1427,9 @@ Assume { Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_j' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> + ((i_3 <= 19) -> (((i_4 < 0) \/ (10 <= i_4)) -> (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). (* Invariant 'Previous_i' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> @@ -367,18 +1445,17 @@ Prove: t2_0[i <- m[j <- v]][i_1][i_2] = t2_1[i_1][i_2]. ------------------------------------------------------------ -Goal Establishment of Invariant 'Previous_i' (file tests/wp_typed/user_init.i, line 45): +Goal Establishment of Invariant 'Previous_i' (file tests/wp_typed/user_init.i, line 84): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 43): +Goal Preservation of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 82): Assume { Type: is_uint32(i) /\ is_uint32(j). - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> - (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). (* Invariant 'Partial_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> @@ -387,10 +1464,9 @@ Assume { Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_j' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> - (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). (* Invariant 'Previous_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> @@ -406,172 +1482,157 @@ Prove: to_uint32(1 + j) <= 20. ------------------------------------------------------------ -Goal Establishment of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 43): +Goal Establishment of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 82): Prove: true. ------------------------------------------------------------ -Goal Assertion 'j' (file tests/wp_typed/user_init.i, line 50): +Goal Assertion 'Last_j' (file tests/wp_typed/user_init.i, line 90): Prove: true. ------------------------------------------------------------ -Goal Assertion 'i' (file tests/wp_typed/user_init.i, line 53): +Goal Assertion 'Last_i' (file tests/wp_typed/user_init.i, line 93): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 37) (1/3): +Goal Loop assigns 'tactic,Zone_i' (1/3): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 37) (2/3): -Effect at line 41 +Goal Loop assigns 'tactic,Zone_i' (2/3): +Effect at line 80 Assume { - Type: is_uint32(i). + Have: 0 <= i. + Have: i <= 9. + Type: is_uint32(i_2). (* Goal *) - When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). - (* Loop assigns ... *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> - (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + When: (0 <= i_3) /\ (0 <= i_4) /\ (i_3 <= 9) /\ (i_4 <= 19). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 <= 9) -> + ((i_5 <= 19) -> (((i_6 < 0) \/ (10 <= i_6)) -> + (t2_0[i_6][i_5] = t2_1[i_6][i_5])))))). (* Invariant 'Partial_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> + ((i_5 <= 19) -> (t2_1[i_6][i_5] = v))))). (* Invariant 'Range_i' *) - Have: (0 <= i) /\ (i <= 10). + Have: (0 <= i_2) /\ (i_2 <= 10). (* Then *) - Have: i <= 9. - (* Loop assigns ... *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> - (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + Have: i_2 <= 9. + (* Loop assigns 'tactic,Zone_j' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 <= 9) -> + ((i_5 <= 19) -> (((i_6 < 0) \/ (10 <= i_6)) -> + (t2_2[i_6][i_5] = t2_1[i_6][i_5])))))). (* Invariant 'Previous_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> + ((i_5 <= 19) -> (t2_2[i_6][i_5] = t2_1[i_6][i_5]))))). (* Invariant 'Partial_j' *) - Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (t2_2[i][i_3] = v))). + Have: forall i_5 : Z. ((0 <= i_5) -> ((i_5 <= 19) -> + (t2_2[i_2][i_5] = v))). } -Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> false))))) \/ - (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ - (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ - (i_5 <= 19))))))). +Prove: exists i_6,i_5 : Z. (i_6 <= i) /\ (i_5 <= i_1) /\ (i_1 <= i_5) /\ + (0 <= i_6) /\ (i <= i_6) /\ (i_6 <= 9). ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 37) (3/3): -Effect at line 47 +Goal Loop assigns 'tactic,Zone_i' (3/3): +Effect at line 87 Assume { - Type: is_uint32(i). + Have: 0 <= i. + Have: i <= 9. + Type: is_uint32(i_2). (* Goal *) - When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). - (* Loop assigns ... *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> - (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + When: (0 <= i_3) /\ (0 <= i_4) /\ (i_3 <= 9) /\ (i_4 <= 19). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 <= 9) -> + ((i_5 <= 19) -> (((i_6 < 0) \/ (10 <= i_6)) -> + (t2_0[i_6][i_5] = t2_1[i_6][i_5])))))). (* Invariant 'Partial_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> + ((i_5 <= 19) -> (t2_1[i_6][i_5] = v))))). (* Invariant 'Range_i' *) - Have: (0 <= i) /\ (i <= 10). + Have: (0 <= i_2) /\ (i_2 <= 10). (* Then *) - Have: i <= 9. - (* Loop assigns ... *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> - (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + Have: i_2 <= 9. + (* Loop assigns 'tactic,Zone_j' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 <= 9) -> + ((i_5 <= 19) -> (((i_6 < 0) \/ (10 <= i_6)) -> + (t2_2[i_6][i_5] = t2_1[i_6][i_5])))))). (* Invariant 'Previous_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> + ((i_5 <= 19) -> (t2_2[i_6][i_5] = t2_1[i_6][i_5]))))). (* Invariant 'Partial_j' *) - Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (t2_2[i][i_3] = v))). + Have: forall i_5 : Z. ((0 <= i_5) -> ((i_5 <= 19) -> + (t2_2[i_2][i_5] = v))). } -Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> false))))) \/ - (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ - (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ - (i_5 <= 19))))))). +Prove: exists i_6,i_5 : Z. (i_6 <= i) /\ (i_5 <= i_1) /\ (i_1 <= i_5) /\ + (0 <= i_6) /\ (i <= i_6) /\ (i_6 <= 9). ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 42) (1/3): +Goal Loop assigns 'tactic,Zone_j' (1/3): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 42) (2/3): -Effect at line 47 +Goal Loop assigns 'tactic,Zone_j' (2/3): +Effect at line 87 Assume { - Type: is_uint32(i) /\ is_uint32(j). + Have: 0 <= i. + Have: i <= 9. + Type: is_uint32(i_2) /\ is_uint32(j). (* Goal *) - When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). - (* Loop assigns ... *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> - (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). + When: (0 <= i_3) /\ (0 <= i_4) /\ (i_3 <= 9) /\ (i_4 <= 19). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 <= 9) -> + ((i_5 <= 19) -> (((i_6 < 0) \/ (10 <= i_6)) -> + (t2_0[i_6][i_5] = t2_1[i_6][i_5])))))). (* Invariant 'Partial_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> + ((i_5 <= 19) -> (t2_1[i_6][i_5] = v))))). (* Invariant 'Range_i' *) - Have: (0 <= i) /\ (i <= 10). + Have: (0 <= i_2) /\ (i_2 <= 10). (* Then *) - Have: i <= 9. - (* Loop assigns ... *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> - (t2_2[i_4][i_3] = t2_1[i_4][i_3])))))). + Have: i_2 <= 9. + (* Loop assigns 'tactic,Zone_j' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 <= 9) -> + ((i_5 <= 19) -> (((i_6 < 0) \/ (10 <= i_6)) -> + (t2_2[i_6][i_5] = t2_1[i_6][i_5])))))). (* Invariant 'Previous_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_2[i_4][i_3] = t2_1[i_4][i_3]))))). + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> + ((i_5 <= 19) -> (t2_2[i_6][i_5] = t2_1[i_6][i_5]))))). (* Invariant 'Partial_j' *) - Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 < j) -> (t2_2[i][i_3] = v))). + Have: forall i_5 : Z. ((0 <= i_5) -> ((i_5 < j) -> (t2_2[i_2][i_5] = v))). (* Invariant 'Range_j' *) Have: (0 <= j) /\ (j <= 20). (* Then *) Have: j <= 19. } -Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> false))))) \/ - (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ - (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ - (i_5 <= 19))))))). +Prove: exists i_6,i_5 : Z. (i_6 <= i) /\ (i_5 <= i_1) /\ (i_1 <= i_5) /\ + (0 <= i_6) /\ (i <= i_6) /\ (i_6 <= 9). ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 42) (3/3): -Effect at line 48 +Goal Loop assigns 'tactic,Zone_j' (3/3): +Effect at line 88 Assume { Type: is_uint32(i) /\ is_uint32(j). (* Goal *) When: (0 <= i) /\ (0 <= j) /\ (i <= 9) /\ (j <= 19). - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> - (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). (* Invariant 'Partial_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). (* Invariant 'Range_i' *) Have: i <= 10. - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_j' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> - (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). (* Invariant 'Previous_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> @@ -581,53 +1642,118 @@ Assume { (* Invariant 'Range_j' *) Have: j <= 20. } -Prove: exists i_2,i_1 : Z. (i_2 <= i) /\ (i_1 <= j) /\ (0 <= i_1) /\ - (j <= i_1) /\ (0 <= i_2) /\ (i <= i_2) /\ (i_2 <= 9) /\ (i_1 <= 19). +Prove: exists i_2,i_1 : Z. (i_2 <= i) /\ (i_1 <= j) /\ (j <= i_1) /\ + (0 <= i_2) /\ (i <= i_2) /\ (i_2 <= 9). ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 32) in 'init_t2' (1/2): -Effect at line 41 +Goal Assigns 'tactic' in 'init_t2_v2' (1/2): +Effect at line 80 Prove: true. ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 32) in 'init_t2' (2/2): -Effect at line 41 +Goal Assigns 'tactic' in 'init_t2_v2' (2/2): +Effect at line 80 Assume { Have: 0 <= i_2. Have: 0 <= i_3. Have: i_2 <= 9. Have: i_3 <= 19. Have: 0 <= i. - Have: 0 <= i_1. Have: i <= 9. - Have: i_1 <= 19. - (* Loop assigns ... *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> - ((i_4 <= 19) -> - (((i_4 < 0) \/ (i_5 < 0) \/ (10 <= i_5) \/ (20 <= i_4)) -> + ((i_4 <= 19) -> (((i_5 < 0) \/ (10 <= i_5)) -> (t2_0[i_5][i_4] = t2_1[i_5][i_4])))))). } -Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ - (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ + (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9). + +------------------------------------------------------------ + +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 80): +Assume { + Type: is_uint32(i). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'tactic,Zone_j' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (t2_2[i][i_1] = v))). +} +Prove: i < to_uint32(1 + i). + +------------------------------------------------------------ + +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 80): +Prove: true. + +------------------------------------------------------------ + +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 87): +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Loop assigns 'tactic,Zone_j' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_2[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'Previous_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_2[i_2][i_1] = t2_1[i_2][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (t2_2[i][i_1] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: j < to_uint32(1 + j). + +------------------------------------------------------------ + +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 87): +Prove: true. ------------------------------------------------------------ ------------------------------------------------------------ - Function init_t2_bis + Function init_t2_v3 ------------------------------------------------------------ -Goal Post-condition (file tests/wp_typed/user_init.i, line 57) in 'init_t2_bis': +Goal Post-condition (file tests/wp_typed/user_init.i, line 97) in 'init_t2_v3': Assume { - Type: is_sint32(v). (* Goal *) When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). - (* Loop assigns ... *) + (* Loop assigns 'lack,Zone_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> - (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> (t2_1[i_3][i_2] = t2_0[i_3][i_2])))))). - (* Invariant 'Partial_i' *) + (* Invariant 'lack,Partial_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> ((i_2 <= 19) -> (t2_0[i_3][i_2] = v))))). } @@ -635,261 +1761,275 @@ Prove: t2_0[i][i_1] = v. ------------------------------------------------------------ -Goal Exit-condition (file tests/wp_typed/user_init.i, line 59) in 'init_t2_bis': +Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 105): Assume { - Type: is_uint32(i) /\ is_sint32(v). - (* Loop assigns ... *) + Type: is_uint32(i). + (* Loop assigns 'lack,Zone_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> - (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). - (* Invariant 'Partial_i' *) + (* Invariant 'lack,Partial_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. - (* Exit Effects *) - Have: (forall i_1 : Z. ((i_1 != i) -> (t2_2[i_1] = t2_1[i_1]))) /\ - (forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> - (((i_1 < 0) \/ (20 <= i_1)) -> (t2_2[i][i_1] = t2_1[i][i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (v_1[i_1] = v))). } -Prove: false. +Prove: to_uint32(1 + i) <= 10. ------------------------------------------------------------ -Goal Preservation of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 66): -Let m = t2_0[i]. +Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 105): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'lack,Partial_i' (file tests/wp_typed/user_init.i, line 106): Assume { - Type: is_uint32(i) /\ is_sint32(v). + Type: is_uint32(i). (* Goal *) When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). - (* Loop assigns ... *) + (* Loop assigns 'lack,Zone_i' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> - (t2_1[i_4][i_3] = t2_2[i_4][i_3])))))). - (* Invariant 'Partial_i' *) + ((i_3 <= 19) -> (((i_4 < 0) \/ (10 <= i_4)) -> + (t2_1[i_4][i_3] = t2_0[i_4][i_3])))))). + (* Invariant 'lack,Partial_i' *) Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_2[i_4][i_3] = v))))). + ((i_3 <= 19) -> (t2_0[i_4][i_3] = v_1))))). (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. - (* Call 'init' *) - Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (m[i_3] = v))). - (* Call Effects *) - Have: (forall i_3 : Z. ((i_3 != i) -> (t2_2[i_3] = t2_0[i_3]))) /\ - (forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> - (((i_3 < 0) \/ (20 <= i_3)) -> (t2_2[i][i_3] = m[i_3]))))). + (* Invariant 'Partial_j' *) + Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (v[i_3] = v_1))). } -Prove: m[0] = t2_0[i_1][i_2]. +Prove: t2_0[i <- v][i_1][i_2] = v[0]. ------------------------------------------------------------ -Goal Establishment of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 66): +Goal Establishment of Invariant 'lack,Partial_i' (file tests/wp_typed/user_init.i, line 106): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 65): -Let m = t2_2[i]. +Goal Preservation of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 112): Assume { - Type: is_uint32(i) /\ is_sint32(v). - (* Loop assigns ... *) + Type: is_uint32(i_1) /\ is_uint32(j). + (* Goal *) + When: (0 <= i) /\ (i < to_uint32(1 + j)). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> + (t2_0[i_3][i_2] = t2_1[i_3][i_2])))))). + (* Invariant 'lack,Partial_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i_1) -> + ((i_2 <= 19) -> (t2_1[i_3][i_2] = v_1))))). + (* Invariant 'Range_i' *) + Have: (0 <= i_1) /\ (i_1 <= 10). + (* Then *) + Have: i_1 <= 9. + (* Invariant 'Partial_j' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < j) -> (v[i_2] = v_1))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. +} +Prove: v[j <- v_1][i] = v_1. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 112): +Prove: true. + +------------------------------------------------------------ + +Goal Preservation of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 111): +Assume { + Type: is_uint32(i) /\ is_uint32(j). + (* Loop assigns 'lack,Zone_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> - (((i_1 < 0) \/ (i_2 < 0) \/ (10 <= i_2) \/ (20 <= i_1)) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). - (* Invariant 'Partial_i' *) + (* Invariant 'lack,Partial_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. - (* Call 'init' *) - Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (m[i_1] = v))). - (* Call Effects *) - Have: (forall i_1 : Z. ((i_1 != i) -> (t2_1[i_1] = t2_2[i_1]))) /\ - (forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> - (((i_1 < 0) \/ (20 <= i_1)) -> (t2_1[i][i_1] = m[i_1]))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (v_1[i_1] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. } -Prove: to_uint32(1 + i) <= 10. +Prove: to_uint32(1 + j) <= 20. + +------------------------------------------------------------ + +Goal Establishment of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 111): +Prove: true. ------------------------------------------------------------ -Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 65): +Goal Assertion 'Last_j' (file tests/wp_typed/user_init.i, line 118): Prove: true. ------------------------------------------------------------ -Goal Assertion 'i' (file tests/wp_typed/user_init.i, line 71): +Goal Assertion 'Last_i' (file tests/wp_typed/user_init.i, line 121): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 64) (1/3): +Goal Loop assigns 'lack,Zone_i' (1/3): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 64) (2/3): -Effect at line 68 -Let m = t2_2[i]. +Goal Loop assigns 'lack,Zone_i' (2/3): +Effect at line 109 Assume { - Type: is_uint32(i) /\ is_sint32(v). + Have: 0 <= i. + Have: i <= 9. + Type: is_uint32(i_2). (* Goal *) - When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 <= 9) /\ (i_2 <= 19). - (* Loop assigns ... *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (((i_3 < 0) \/ (i_4 < 0) \/ (10 <= i_4) \/ (20 <= i_3)) -> - (t2_0[i_4][i_3] = t2_1[i_4][i_3])))))). - (* Invariant 'Partial_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_1[i_4][i_3] = v))))). + When: (0 <= i_3) /\ (0 <= i_4) /\ (i_3 <= 9) /\ (i_4 <= 19). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 <= 9) -> + ((i_5 <= 19) -> (((i_6 < 0) \/ (10 <= i_6)) -> + (t2_0[i_6][i_5] = t2_1[i_6][i_5])))))). + (* Invariant 'lack,Partial_i' *) + Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> + ((i_5 <= 19) -> (t2_1[i_6][i_5] = v))))). (* Invariant 'Range_i' *) - Have: (0 <= i) /\ (i <= 10). + Have: (0 <= i_2) /\ (i_2 <= 10). (* Then *) - Have: i <= 9. - (* Call 'init' *) - Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (m[i_3] = v))). - (* Call Effects *) - Have: (forall i_3 : Z. ((i_3 != i) -> (t2_1[i_3] = t2_2[i_3]))) /\ - (forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> - (((i_3 < 0) \/ (20 <= i_3)) -> (t2_1[i][i_3] = m[i_3]))))). + Have: i_2 <= 9. + (* Invariant 'Partial_j' *) + Have: forall i_5 : Z. ((0 <= i_5) -> ((i_5 <= 19) -> (v_1[i_5] = v))). } -Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> false))))) \/ - (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> - (exists i_6,i_5 : Z. (0 <= i_5) /\ (i_3 <= i_5) /\ (0 <= i_6) /\ - (i_4 <= i_6) /\ (i_5 <= i_3) /\ (i_6 <= i_4) /\ (i_6 <= 9) /\ - (i_5 <= 19))))))). +Prove: exists i_6,i_5 : Z. (i_6 <= i) /\ (i_5 <= i_1) /\ (i_1 <= i_5) /\ + (0 <= i_6) /\ (i <= i_6) /\ (i_6 <= 9). ------------------------------------------------------------ -Goal Loop assigns (file tests/wp_typed/user_init.i, line 64) (3/3): -Call Effect at line 69 -Let m = t2_2[i]. +Goal Loop assigns 'lack,Zone_i' (3/3): +Effect at line 115 Assume { - Type: is_uint32(i) /\ is_sint32(v). + Type: is_uint32(i). (* Goal *) When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). - (* Loop assigns ... *) + (* Loop assigns 'lack,Zone_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> - (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> + ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> (t2_0[i_3][i_2] = t2_1[i_3][i_2])))))). - (* Invariant 'Partial_i' *) + (* Invariant 'lack,Partial_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> ((i_2 <= 19) -> (t2_1[i_3][i_2] = v))))). (* Invariant 'Range_i' *) Have: i <= 10. - (* Call 'init' *) - Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> (m[i_2] = v))). - (* Call Effects *) - Have: (forall i_2 : Z. ((i_2 != i) -> (t2_1[i_2] = t2_2[i_2]))) /\ - (forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> - (((i_2 < 0) \/ (20 <= i_2)) -> (t2_1[i][i_2] = m[i_2]))))). + (* Invariant 'Partial_j' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> (v_1[i_2] = v))). } -Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (0 <= i_2) /\ - (i_1 <= i_2) /\ (0 <= i_3) /\ (i <= i_3) /\ (i_3 <= 9) /\ (i_2 <= 19). +Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (i_1 <= i_2) /\ + (0 <= i_3) /\ (i <= i_3) /\ (i_3 <= 9). + +------------------------------------------------------------ + +Goal Loop assigns 'lack,Zone_j' (1/2): +Prove: true. ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (1/3): -Effect at line 68 +Goal Loop assigns 'lack,Zone_j' (2/2): +Effect at line 115 Prove: true. ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (2/3): -Effect at line 68 +Goal Assigns 'lack' in 'init_t2_v3' (1/2): +Effect at line 109 +Prove: true. + +------------------------------------------------------------ + +Goal Assigns 'lack' in 'init_t2_v3' (2/2): +Effect at line 109 Assume { Have: 0 <= i_2. Have: 0 <= i_3. Have: i_2 <= 9. Have: i_3 <= 19. Have: 0 <= i. - Have: 0 <= i_1. Have: i <= 9. - Have: i_1 <= 19. - (* Loop assigns ... *) + (* Loop assigns 'lack,Zone_i' *) Have: forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> - ((i_4 <= 19) -> - (((i_4 < 0) \/ (i_5 < 0) \/ (10 <= i_5) \/ (20 <= i_4)) -> + ((i_4 <= 19) -> (((i_5 < 0) \/ (10 <= i_5)) -> (t2_0[i_5][i_4] = t2_1[i_5][i_4])))))). } -Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ - (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). +Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ + (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9). ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (3/3): -Call Effect at line 69 +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 109): Assume { - Type: is_uint32(i) /\ is_sint32(v). - (* Goal *) - When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). - (* Loop assigns ... *) - Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> - (((i_2 < 0) \/ (i_3 < 0) \/ (10 <= i_3) \/ (20 <= i_2)) -> - (t2_0[i_3][i_2] = t2_1[i_3][i_2])))))). - (* Invariant 'Partial_i' *) - Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> - ((i_2 <= 19) -> (t2_1[i_3][i_2] = v))))). + Type: is_uint32(i). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'lack,Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). (* Invariant 'Range_i' *) - Have: i <= 10. - (* Exit Effects *) - Have: (forall i_2 : Z. ((i_2 != i) -> (t2_2[i_2] = t2_1[i_2]))) /\ - (forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> - (((i_2 < 0) \/ (20 <= i_2)) -> (t2_2[i][i_2] = t2_1[i][i_2]))))). + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (v_1[i_1] = v))). } -Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (0 <= i_2) /\ - (i_1 <= i_2) /\ (0 <= i_3) /\ (i <= i_3) /\ (i_3 <= 9) /\ (i_2 <= 19). +Prove: i < to_uint32(1 + i). ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (1/2): -Effect at line 68 +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 109): Prove: true. ------------------------------------------------------------ -Goal Assigns (file tests/wp_typed/user_init.i, line 58) in 'init_t2_bis' (2/2): -Effect at line 68 +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 115): Assume { - Have: 0 <= i_2. - Have: 0 <= i_3. - Have: i_2 <= 9. - Have: i_3 <= 19. - Have: 0 <= i. - Have: 0 <= i_1. + Type: is_uint32(i) /\ is_uint32(j). + (* Loop assigns 'lack,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). + (* Invariant 'lack,Partial_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> + ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) Have: i <= 9. - Have: i_1 <= 19. - (* Loop assigns ... *) - Have: forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> - ((i_4 <= 19) -> - (((i_4 < 0) \/ (i_5 < 0) \/ (10 <= i_5) \/ (20 <= i_4)) -> - (t2_0[i_5][i_4] = t2_1[i_5][i_4])))))). + (* Invariant 'Partial_j' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (v_1[i_1] = v))). + (* Invariant 'Range_j' *) + Have: (0 <= j) /\ (j <= 20). + (* Then *) + Have: j <= 19. } -Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ - (i_1 <= i_4) /\ (0 <= i_5) /\ (i <= i_5) /\ (i_5 <= 9) /\ (i_4 <= 19). - ------------------------------------------------------------- - -Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 1) in 'init'' in 'init_t2_bis' at call 'init' (file tests/wp_typed/user_init.i, line 69) -: -Prove: true. +Prove: j < to_uint32(1 + j). ------------------------------------------------------------ -Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 2) in 'init'' in 'init_t2_bis' at call 'init' (file tests/wp_typed/user_init.i, line 69) -: +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 115): Prove: true. ------------------------------------------------------------ diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.0.res.oracle new file mode 100644 index 00000000000..ea38a9018b4 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.0.res.oracle @@ -0,0 +1,115 @@ +# frama-c -wp -wp-timeout 90 -wp-steps 1500 [...] +[kernel] Parsing tests/wp_typed/user_init.i (no preprocessing) +[wp] Running WP plugin... +[wp] Loading driver 'share/wp.driver' +[wp] [CFG] Goal init_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t1_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_v1_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_v2_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_v3_exits : Valid (Unreachable) +[wp] Warning: Missing RTE guards +[wp] 89 goals scheduled +[wp] [Alt-Ergo] Goal typed_init_ensures : Valid +[wp] [Alt-Ergo] Goal typed_init_loop_invariant_Partial_preserved : Valid +[wp] [Qed] Goal typed_init_loop_invariant_Partial_established : Valid +[wp] [Alt-Ergo] Goal typed_init_loop_invariant_Range_preserved : Valid +[wp] [Qed] Goal typed_init_loop_invariant_Range_established : Valid +[wp] [Qed] Goal typed_init_loop_assigns_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_loop_assigns_part2 : Valid +[wp] [Qed] Goal typed_init_assigns : Valid +[wp] [Qed] Goal typed_init_loop_variant_decrease : Valid +[wp] [Qed] Goal typed_init_loop_variant_positive : Valid +[wp] [Alt-Ergo] Goal typed_init_t1_ensures : Valid +[wp] [Alt-Ergo] Goal typed_init_t1_loop_invariant_Partial_preserved : Valid +[wp] [Qed] Goal typed_init_t1_loop_invariant_Partial_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t1_loop_invariant_Range_preserved : Valid +[wp] [Qed] Goal typed_init_t1_loop_invariant_Range_established : Valid +[wp] [Qed] Goal typed_init_t1_loop_assigns : Valid +[wp] [Qed] Goal typed_init_t1_assigns_part1 : Valid +[wp] [Qed] Goal typed_init_t1_assigns_part2 : Valid +[wp] [Alt-Ergo] Goal typed_init_t1_loop_variant_decrease : Valid +[wp] [Qed] Goal typed_init_t1_loop_variant_positive : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_v1_ensures : Valid +[wp] [Qed] Goal typed_init_t2_bis_v1_exits : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_v1_loop_invariant_Partial_preserved : Valid +[wp] [Qed] Goal typed_init_t2_bis_v1_loop_invariant_Partial_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_v1_loop_invariant_Range_preserved : Valid +[wp] [Qed] Goal typed_init_t2_bis_v1_loop_invariant_Range_established : Valid +[wp] [Qed] Goal typed_init_t2_bis_v1_assert_Offset : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_v1_loop_variant_decrease : Valid +[wp] [Qed] Goal typed_init_t2_bis_v1_loop_variant_positive : Valid +[wp] [Qed] Goal typed_init_t2_bis_v1_call_init_requires : Valid +[wp] [Qed] Goal typed_init_t2_bis_v1_call_init_requires_2 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_v2_ensures : Valid +[wp] [Qed] Goal typed_init_t2_bis_v2_exits : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_v2_loop_invariant_Partial_preserved : Valid +[wp] [Qed] Goal typed_init_t2_bis_v2_loop_invariant_Partial_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_v2_loop_invariant_Range_preserved : Valid +[wp] [Qed] Goal typed_init_t2_bis_v2_loop_invariant_Range_established : Valid +[wp] [Qed] Goal typed_init_t2_bis_v2_assert_Offset_i : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_v2_loop_variant_decrease : Valid +[wp] [Qed] Goal typed_init_t2_bis_v2_loop_variant_positive : Valid +[wp] [Qed] Goal typed_init_t2_bis_v2_call_init_requires : Valid +[wp] [Qed] Goal typed_init_t2_bis_v2_call_init_requires_2 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v1_ensures : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v1_loop_invariant_Partial_i_preserved : Valid +[wp] [Qed] Goal typed_init_t2_v1_loop_invariant_Partial_i_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v1_loop_invariant_Range_i_preserved : Valid +[wp] [Qed] Goal typed_init_t2_v1_loop_invariant_Range_i_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v1_loop_invariant_Partial_j_preserved : Valid +[wp] [Qed] Goal typed_init_t2_v1_loop_invariant_Partial_j_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v1_loop_invariant_Previous_i_preserved : Valid +[wp] [Qed] Goal typed_init_t2_v1_loop_invariant_Previous_i_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v1_loop_invariant_Range_j_preserved : Valid +[wp] [Qed] Goal typed_init_t2_v1_loop_invariant_Range_j_established : Valid +[wp] [Qed] Goal typed_init_t2_v1_assert_Last_j : Valid +[wp] [Qed] Goal typed_init_t2_v1_assert_Last_i : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v1_loop_variant_decrease : Valid +[wp] [Qed] Goal typed_init_t2_v1_loop_variant_positive : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v1_loop_variant_2_decrease : Valid +[wp] [Qed] Goal typed_init_t2_v1_loop_variant_2_positive : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v2_ensures : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v2_loop_invariant_Partial_i_preserved : Valid +[wp] [Qed] Goal typed_init_t2_v2_loop_invariant_Partial_i_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v2_loop_invariant_Range_i_preserved : Valid +[wp] [Qed] Goal typed_init_t2_v2_loop_invariant_Range_i_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v2_loop_invariant_Partial_j_preserved : Valid +[wp] [Qed] Goal typed_init_t2_v2_loop_invariant_Partial_j_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v2_loop_invariant_Previous_i_preserved : Valid +[wp] [Qed] Goal typed_init_t2_v2_loop_invariant_Previous_i_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v2_loop_invariant_Range_j_preserved : Valid +[wp] [Qed] Goal typed_init_t2_v2_loop_invariant_Range_j_established : Valid +[wp] [Qed] Goal typed_init_t2_v2_assert_Last_j : Valid +[wp] [Qed] Goal typed_init_t2_v2_assert_Last_i : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v2_loop_variant_decrease : Valid +[wp] [Qed] Goal typed_init_t2_v2_loop_variant_positive : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v2_loop_variant_2_decrease : Valid +[wp] [Qed] Goal typed_init_t2_v2_loop_variant_2_positive : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v3_ensures : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_invariant_Range_i_preserved : Valid +[wp] [Qed] Goal typed_init_t2_v3_loop_invariant_Range_i_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_invariant_Partial_j_preserved : Valid +[wp] [Qed] Goal typed_init_t2_v3_loop_invariant_Partial_j_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_invariant_Range_j_preserved : Valid +[wp] [Qed] Goal typed_init_t2_v3_loop_invariant_Range_j_established : Valid +[wp] [Qed] Goal typed_init_t2_v3_assert_Last_j : Valid +[wp] [Qed] Goal typed_init_t2_v3_assert_Last_i : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_variant_decrease : Valid +[wp] [Qed] Goal typed_init_t2_v3_loop_variant_positive : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_variant_2_decrease : Valid +[wp] [Qed] Goal typed_init_t2_v3_loop_variant_2_positive : Valid +[wp] Proved goals: 89 / 89 + Qed: 51 + Alt-Ergo: 38 +[wp] Report in: 'tests/wp_typed/oracle_qualif/user_init.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/user_init.0.report.json' +------------------------------------------------------------- +Functions WP Alt-Ergo Total Success +init 6 4 (80..104) 10 100% +init_t1 6 4 (12..24) 10 100% +init_t2_v1 9 8 (40..52) 17 100% +init_t2_v2 9 8 (32..44) 17 100% +init_t2_v3 7 6 (16..28) 13 100% +init_t2_bis_v1 7 4 (208..256) 11 100% +init_t2_bis_v2 7 4 (192..240) 11 100% +------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.1.res.oracle new file mode 100644 index 00000000000..77c6f534fe6 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.1.res.oracle @@ -0,0 +1,32 @@ +# frama-c -wp -wp-timeout 90 -wp-steps 1500 [...] +[kernel] Parsing tests/wp_typed/user_init.i (no preprocessing) +[wp] Running WP plugin... +[wp] Loading driver 'share/wp.driver' +[wp] [CFG] Goal init_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t1_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_v1_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_v2_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_v3_exits : Valid (Unreachable) +[wp] Warning: Missing RTE guards +[wp] 8 goals scheduled +[wp] [Qed] Goal typed_init_t2_v2_loop_assigns_part1 : Valid +[wp] Warning: creating session directory `tests/wp_typed/result_qualif/user_init-session/test-1' +[wp] Warning: creating session directory `tests/wp_typed/result_qualif/user_init-session/test-1/wp' +[wp] [Tactical] Goal typed_init_t2_v2_loop_assigns_part2 : Valid +[wp] [Tactical] Goal typed_init_t2_v2_loop_assigns_part3 : Valid +[wp] [Qed] Goal typed_init_t2_v2_loop_assigns_2_part1 : Valid +[wp] [Tactical] Goal typed_init_t2_v2_loop_assigns_2_part2 : Valid +[wp] [Tactical] Goal typed_init_t2_v2_loop_assigns_2_part3 : Valid +[wp] [Tactical] Goal typed_init_t2_v2_assigns_part1 : Valid +[wp] [Tactical] Goal typed_init_t2_v2_assigns_part2 : Valid +[wp] Proved goals: 8 / 8 + Qed: 3 + Alt-Ergo: 0 (unsuccess: 5) + Script: 5 +[wp] Updated session with 5 new valid scripts. +[wp] Report in: 'tests/wp_typed/oracle_qualif/user_init.1.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/user_init.1.report.json' +------------------------------------------------------------- +Functions WP Alt-Ergo Total Success +init_t2_v2 3 - (16..28) 8 100% +------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.2.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.2.res.oracle new file mode 100644 index 00000000000..910fde6d48c --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.2.res.oracle @@ -0,0 +1,56 @@ +# frama-c -wp -wp-timeout 90 -wp-steps 300 [...] +[kernel] Parsing tests/wp_typed/user_init.i (no preprocessing) +[wp] Running WP plugin... +[wp] Loading driver 'share/wp.driver' +[wp] [CFG] Goal init_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t1_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_v1_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_v2_exits : Valid (Unreachable) +[wp] [CFG] Goal init_t2_v3_exits : Valid (Unreachable) +[wp] Warning: Missing RTE guards +[wp] 33 goals scheduled +[wp] [Qed] Goal typed_init_t2_bis_v1_loop_assigns_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_v1_loop_assigns_part2 : Unsuccess +[wp] [Alt-Ergo] Goal typed_init_t2_bis_v1_loop_assigns_part3 : Unsuccess +[wp] [Qed] Goal typed_init_t2_bis_v1_assigns_exit_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_v1_assigns_exit_part2 : Unsuccess +[wp] [Qed] Goal typed_init_t2_bis_v1_assigns_exit_part3 : Valid +[wp] [Qed] Goal typed_init_t2_bis_v1_assigns_normal_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_v1_assigns_normal_part2 : Unsuccess +[wp] [Qed] Goal typed_init_t2_bis_v2_loop_assigns_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_v2_loop_assigns_part2 : Unsuccess +[wp] [Alt-Ergo] Goal typed_init_t2_bis_v2_loop_assigns_part3 : Unsuccess +[wp] [Qed] Goal typed_init_t2_bis_v2_assigns_exit_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_v2_assigns_exit_part2 : Unsuccess +[wp] [Qed] Goal typed_init_t2_bis_v2_assigns_exit_part3 : Valid +[wp] [Qed] Goal typed_init_t2_bis_v2_assigns_normal_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_bis_v2_assigns_normal_part2 : Unsuccess +[wp] [Qed] Goal typed_init_t2_v1_loop_assigns_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v1_loop_assigns_part2 : Unsuccess +[wp] [Alt-Ergo] Goal typed_init_t2_v1_loop_assigns_part3 : Unsuccess +[wp] [Qed] Goal typed_init_t2_v1_loop_assigns_2_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v1_loop_assigns_2_part2 : Unsuccess +[wp] [Alt-Ergo] Goal typed_init_t2_v1_loop_assigns_2_part3 : Unsuccess +[wp] [Qed] Goal typed_init_t2_v1_assigns_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v1_assigns_part2 : Unsuccess +[wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_invariant_lack_Partial_i_preserved : Unsuccess +[wp] [Qed] Goal typed_init_t2_v3_loop_invariant_lack_Partial_i_established : Valid +[wp] [Qed] Goal typed_init_t2_v3_loop_assigns_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_assigns_part2 : Unsuccess +[wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_assigns_part3 : Unsuccess +[wp] [Qed] Goal typed_init_t2_v3_loop_assigns_2_part1 : Valid +[wp] [Qed] Goal typed_init_t2_v3_loop_assigns_2_part2 : Valid +[wp] [Qed] Goal typed_init_t2_v3_assigns_part1 : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v3_assigns_part2 : Unsuccess +[wp] Proved goals: 16 / 33 + Qed: 16 + Alt-Ergo: 0 (unsuccess: 17) +[wp] Report in: 'tests/wp_typed/oracle_qualif/user_init.2.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/user_init.2.report.json' +------------------------------------------------------------- +Functions WP Alt-Ergo Total Success +init_t2_v1 3 - 8 37.5% +init_t2_v3 5 - 9 55.6% +init_t2_bis_v1 4 - 8 50.0% +init_t2_bis_v2 4 - 8 50.0% +------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.res.oracle deleted file mode 100644 index 4166c7752ea..00000000000 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.res.oracle +++ /dev/null @@ -1,74 +0,0 @@ -# frama-c -wp -wp-timeout 90 -wp-steps 1500 [...] -[kernel] Parsing tests/wp_typed/user_init.i (no preprocessing) -[wp] Running WP plugin... -[wp] Loading driver 'share/wp.driver' -[wp] [CFG] Goal init_t1_exits : Valid (Unreachable) -[wp] [CFG] Goal init_t2_exits : Valid (Unreachable) -[wp] Warning: Missing RTE guards -[wp] 54 goals scheduled -[wp] [Alt-Ergo] Goal typed_init_ensures : Valid -[wp] [Alt-Ergo] Goal typed_init_loop_invariant_Partial_preserved : Valid -[wp] [Qed] Goal typed_init_loop_invariant_Partial_established : Valid -[wp] [Alt-Ergo] Goal typed_init_loop_invariant_Range_preserved : Valid -[wp] [Qed] Goal typed_init_loop_invariant_Range_established : Valid -[wp] [Qed] Goal typed_init_loop_assigns_part1 : Valid -[wp] [Alt-Ergo] Goal typed_init_loop_assigns_part2 : Valid -[wp] [Qed] Goal typed_init_assigns : Valid -[wp] [Alt-Ergo] Goal typed_init_t1_ensures : Valid -[wp] [Alt-Ergo] Goal typed_init_t1_loop_invariant_Partial_preserved : Valid -[wp] [Qed] Goal typed_init_t1_loop_invariant_Partial_established : Valid -[wp] [Alt-Ergo] Goal typed_init_t1_loop_invariant_Range_preserved : Valid -[wp] [Qed] Goal typed_init_t1_loop_invariant_Range_established : Valid -[wp] [Qed] Goal typed_init_t1_loop_assigns : Valid -[wp] [Qed] Goal typed_init_t1_assigns_part1 : Valid -[wp] [Qed] Goal typed_init_t1_assigns_part2 : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_ensures : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_loop_invariant_Partial_i_preserved : Valid -[wp] [Qed] Goal typed_init_t2_loop_invariant_Partial_i_established : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_loop_invariant_Range_i_preserved : Valid -[wp] [Qed] Goal typed_init_t2_loop_invariant_Range_i_established : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_loop_invariant_Partial_j_preserved : Valid -[wp] [Qed] Goal typed_init_t2_loop_invariant_Partial_j_established : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_loop_invariant_Previous_i_preserved : Valid -[wp] [Qed] Goal typed_init_t2_loop_invariant_Previous_i_established : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_loop_invariant_Range_j_preserved : Valid -[wp] [Qed] Goal typed_init_t2_loop_invariant_Range_j_established : Valid -[wp] [Qed] Goal typed_init_t2_assert_j : Valid -[wp] [Qed] Goal typed_init_t2_assert_i : Valid -[wp] [Qed] Goal typed_init_t2_loop_assigns_part1 : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_loop_assigns_part2 : Unsuccess -[wp] [Alt-Ergo] Goal typed_init_t2_loop_assigns_part3 : Unsuccess -[wp] [Qed] Goal typed_init_t2_loop_assigns_2_part1 : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_loop_assigns_2_part2 : Unsuccess -[wp] [Alt-Ergo] Goal typed_init_t2_loop_assigns_2_part3 : Unsuccess -[wp] [Qed] Goal typed_init_t2_assigns_part1 : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_assigns_part2 : Unsuccess -[wp] [Alt-Ergo] Goal typed_init_t2_bis_ensures : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_bis_exits : Unsuccess -[wp] [Alt-Ergo] Goal typed_init_t2_bis_loop_invariant_Partial_i_preserved : Valid -[wp] [Qed] Goal typed_init_t2_bis_loop_invariant_Partial_i_established : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_bis_loop_invariant_Range_i_preserved : Valid -[wp] [Qed] Goal typed_init_t2_bis_loop_invariant_Range_i_established : Valid -[wp] [Qed] Goal typed_init_t2_bis_assert_i : Valid -[wp] [Qed] Goal typed_init_t2_bis_loop_assigns_part1 : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_bis_loop_assigns_part2 : Unsuccess -[wp] [Alt-Ergo] Goal typed_init_t2_bis_loop_assigns_part3 : Unsuccess -[wp] [Qed] Goal typed_init_t2_bis_assigns_exit_part1 : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_bis_assigns_exit_part2 : Unsuccess -[wp] [Alt-Ergo] Goal typed_init_t2_bis_assigns_exit_part3 : Unsuccess -[wp] [Qed] Goal typed_init_t2_bis_assigns_normal_part1 : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_bis_assigns_normal_part2 : Unsuccess -[wp] [Qed] Goal typed_init_t2_bis_call_init_requires : Valid -[wp] [Qed] Goal typed_init_t2_bis_call_init_requires_2 : Valid -[wp] Proved goals: 43 / 54 - Qed: 27 - Alt-Ergo: 16 (unsuccess: 11) -[wp] Report in: 'tests/wp_typed/oracle_qualif/user_init.0.report.json' -[wp] Report out: 'tests/wp_typed/result_qualif/user_init.0.report.json' -------------------------------------------------------------- -Functions WP Alt-Ergo Total Success -init 4 4 (80..104) 8 100% -init_t1 5 3 (12..24) 8 100% -init_t2 10 6 (40..52) 21 76.2% -init_t2_bis 8 3 (36..48) 17 64.7% -------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_typed/user_init.i b/src/plugins/wp/tests/wp_typed/user_init.i index 416a94e97e0..06f597c3d3a 100644 --- a/src/plugins/wp/tests/wp_typed/user_init.i +++ b/src/plugins/wp/tests/wp_typed/user_init.i @@ -1,13 +1,21 @@ +/* run.config_qualif + EXECNOW: rm -rf @PTEST_DIR@/result@PTEST_CONFIG@/@PTEST_NAME@-session/ + OPT: -wp-prop=-lack,-tactic + OPT: -wp-prop=tactic -wp-auto=wp:split -session @PTEST_DIR@/result@PTEST_CONFIG@/@PTEST_NAME@-session/test-@PTEST_NUMBER@ + OPT: -wp-prop=lack -wp-steps 300 + */ /*@ requires \valid(a+(0..n-1)) ; @ requires n >= 0 ; - @ ensures \forall int k ; 0 <= k < n ==> a[k] == v ; @ assigns a[0..n-1] ; + @ ensures \forall int k ; 0 <= k < n ==> a[k] == v ; + @ exits \false; */ void init( int * a , int n , int v ) { - /*@ loop invariant Range: 0 <= i <= n ; + /*@ loop assigns Zone: i,a[0..n-1] ; + @ loop invariant Range: 0 <= i <= n ; @ loop invariant Partial: \forall int k ; 0 <= k < i ==> a[k] == v ; - @ loop assigns i,a[0..n-1] ; + @ loop variant Decr_i: n - i ; */ for (int i = 0 ; i < n ; i++) a[i] = v ; } @@ -19,9 +27,10 @@ int t1[10]; */ void init_t1(int v) { unsigned i; - /*@ loop invariant Range: 0 <= i <= 10 ; + /*@ loop assigns Zone: i,t1[0..9] ; + @ loop invariant Range: 0 <= i <= 10 ; @ loop invariant Partial: \forall integer k ; 0 <= k < i ==> t1[k] ≡ v ; - @ loop assigns i,t1[0..9] ; + @ loop variant Decr: 10 - i ; */ for (i = 0 ; i < 10 ; i++) t1[i] = v ; } @@ -29,45 +38,123 @@ void init_t1(int v) { int t2[10][20]; /*@ ensures \forall integer k, l; 0 <= k < 10 && 0 <= l < 20 ==> t2[k][l] == v; @ exits \false; - @ assigns t2[0..9][0..19]; + @ assigns lack: t2[0..9][0..19]; */ -void init_t2(int v) { +void init_t2_v1(int v) { unsigned i,j; - /*@ loop assigns i, j, t2[0..9][0..19]; + /*@ loop assigns lack: Zone_i: i, j, t2[0..9][0..19]; @ loop invariant Range_i: 0 <= i <= 10 ; @ loop invariant Partial_i: \forall integer k,l; 0 <= k < i && 0 <= l < 20 ==> t2[k][l] == v; - */ + @ loop variant Decr_i: 10 - i ; + */ for(i = 0; i <= 9; i++) { - /*@ loop assigns j, t2[0..9][0..19]; + /*@ loop assigns lack: Zone_j: j, t2[0..9][0..19]; @ loop invariant Range_j: 0 <= j <= 20 ; @ loop invariant Partial_j: \forall integer l; 0 <= l < j ==> t2[i][l] == v; @ loop invariant Previous_i: \forall integer k,l; 0 <= k < i && 0 <= l < 20 ==> t2[k][l] == \at(t2[k][l], LoopEntry); + @ loop variant Decr_j: 20 - j ; */ for(j = 0; j <= 19; j++) { t2[i][j] = v; } - //@ assert j: j==20; + //@ assert Last_j: j==20; ; } - //@ assert i: i==10; + //@ assert Last_i: i==10; ; } //------------------------- /*@ ensures \forall integer k, l; 0 <= k < 10 && 0 <= l < 20 ==> t2[k][l] == v; - @ assigns t2[0..9][0..19]; @ exits \false; + @ assigns tactic: t2[..][..]; */ -void init_t2_bis(int v) { +void init_t2_v2(int v) { - unsigned i; - /*@ loop assigns i, t2[0..9][0..19]; + unsigned i,j; + /*@ loop assigns tactic: Zone_i: i, j, t2[..][..]; @ loop invariant Range_i: 0 <= i <= 10 ; @ loop invariant Partial_i: \forall integer k,l; 0 <= k < i && 0 <= l < 20 ==> t2[k][l] == v; + @ loop variant Decr_i: 10 - i ; */ for(i = 0; i <= 9; i++) { - init(&t2[i][0], 20, v); + /*@ loop assigns tactic: Zone_j: j, t2[..][..]; + @ loop invariant Range_j: 0 <= j <= 20 ; + @ loop invariant Partial_j: \forall integer l; 0 <= l < j ==> t2[i][l] == v; + @ loop invariant Previous_i: \forall integer k,l; 0 <= k < i && 0 <= l < 20 ==> t2[k][l] == \at(t2[k][l], LoopEntry); + @ loop variant Decr_j: 20 - j ; + */ + for(j = 0; j <= 19; j++) { + t2[i][j] = v; + } + //@ assert Last_j: j==20; + ; } - //@ assert i: i==10; + //@ assert Last_i: i==10; ; } +//------------------------- +/*@ ensures \forall integer k, l; 0 <= k < 10 && 0 <= l < 20 ==> t2[k][l] == v; + @ exits \false; + @ assigns lack: t2[..][..]; + */ +void init_t2_v3(int v) { + + unsigned i,j; + /*@ loop assigns lack: Zone_i: i, j, t2[..][..]; + @ loop invariant Range_i: 0 <= i <= 10 ; + @ loop invariant lack: Partial_i: \forall integer k,l; 0 <= k < i && 0 <= l < 20 ==> t2[k][l] == v; + @ loop variant V_i: 10 - i ; + */ + for(i = 0; i <= 9; i++) { + /*@ loop assigns lack: Zone_j: j, t2[i][..]; + @ loop invariant Range_j: 0 <= j <= 20 ; + @ loop invariant Partial_j: \forall integer l; 0 <= l < j ==> t2[i][l] == v; + @ loop variant Decr_j: 20 - j ; + */ + for(j = 0; j <= 19; j++) { + t2[i][j] = v; + } + //@ assert Last_j: j==20; + ; + } + //@ assert Last_i: i==10; + ; +} +//------------------------- +/*@ ensures \forall integer k, l; 0 <= k < 10 && 0 <= l < 20 ==> t2[k][l] == v; + @ assigns lack: t2[0..9][0..19]; + @ exits \false; + */ +void init_t2_bis_v1(int v) { + + unsigned i; + /*@ loop assigns lack: Zone: i, t2[0..9][0..19]; + @ loop invariant Range: 0 <= i <= 10 ; + @ loop invariant Partial: \forall integer k,l; 0 <= k < i && 0 <= l < 20 ==> t2[k][l] == v; + @ loop variant Decr: 10 - i ; + */ + for(i = 0; i <= 9; i++) { + init(&t2[i][0], 20, v); + //@ assert Offset: &t2[i][0] == &t2[0][0] + 20*i; + } +} +//------------------------- +/*@ ensures \forall integer k, l; 0 <= k < 10 && 0 <= l < 20 ==> t2[k][l] == v; + @ assigns lack: t2[..][..]; + @ exits \false; + */ +void init_t2_bis_v2(int v) { + + unsigned i; + /*@ loop assigns lack: Zone: i, t2[..][..]; + @ loop invariant Range: 0 <= i <= 10 ; + @ loop invariant Partial: \forall integer k,l; 0 <= k < i && 0 <= l < 20 ==> t2[k][l] == v; + @ loop variant Decr: 10 - i ; + */ + for(i = 0; i <= 9; i++) { + init(&t2[i][0], 20, v); + //@ assert Offset_i: &t2[i][0] == &t2[0][0] + 20*i; + ; + } +} -- GitLab From 0c2c3df6ec13d9a63bef21ba309b9d3659bb17a2 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Fri, 1 Mar 2019 10:11:03 +0100 Subject: [PATCH 070/376] [WP/test] adding a test initializing multidimentianal arrays --- .../wp_typed/oracle/user_init.0.res.oracle | 345 ++++++++++-------- .../wp_typed/oracle/user_init.1.res.oracle | 345 ++++++++++-------- .../oracle_qualif/user_init.0.res.oracle | 12 +- .../oracle_qualif/user_init.1.res.oracle | 33 +- .../oracle_qualif/user_init.2.res.oracle | 27 +- src/plugins/wp/tests/wp_typed/user_init.i | 22 +- 6 files changed, 416 insertions(+), 368 deletions(-) diff --git a/src/plugins/wp/tests/wp_typed/oracle/user_init.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle/user_init.0.res.oracle index 3981469580e..86999a74131 100644 --- a/src/plugins/wp/tests/wp_typed/oracle/user_init.0.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle/user_init.0.res.oracle @@ -231,7 +231,7 @@ Prove: true. Function init_t2_bis_v1 ------------------------------------------------------------ -Goal Post-condition (file tests/wp_typed/user_init.i, line 125) in 'init_t2_bis_v1': +Goal Post-condition (file tests/wp_typed/user_init.i, line 127) in 'init_t2_bis_v1': Let a = global(G_t2_48). Assume { Type: is_uint32(i_2) /\ is_sint32(v). @@ -256,12 +256,12 @@ Prove: Mint_0[shift_sint32(shift_A20_sint32(a, i), i_1)] = v. ------------------------------------------------------------ -Goal Exit-condition (file tests/wp_typed/user_init.i, line 127) in 'init_t2_bis_v1': +Goal Exit-condition (file tests/wp_typed/user_init.i, line 129) in 'init_t2_bis_v1': Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 134): +Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 136): Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Let a_2 = shift_sint32(a_1, 0). @@ -292,12 +292,12 @@ Prove: a_3[shift_sint32(shift_A20_sint32(a, i_1), i_2)] = Mint_undef_0[a_2]. ------------------------------------------------------------ -Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 134): +Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 136): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 133): +Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 135): Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Assume { @@ -325,12 +325,12 @@ Prove: to_uint32(1 + i) <= 10. ------------------------------------------------------------ -Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 133): +Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 135): Prove: true. ------------------------------------------------------------ -Goal Assertion 'Offset' (file tests/wp_typed/user_init.i, line 139): +Goal Assertion 'Offset' (file tests/wp_typed/user_init.i, line 141): Prove: true. ------------------------------------------------------------ @@ -341,7 +341,7 @@ Prove: true. ------------------------------------------------------------ Goal Loop assigns 'lack,Zone' (2/3): -Effect at line 137 +Effect at line 139 Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Assume { @@ -378,7 +378,7 @@ Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> ------------------------------------------------------------ Goal Loop assigns 'lack,Zone' (3/3): -Call Effect at line 138 +Call Effect at line 140 Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Assume { @@ -408,13 +408,13 @@ Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (0 <= i_2) /\ ------------------------------------------------------------ Goal Assigns 'lack' in 'init_t2_bis_v1' (1/3): -Effect at line 137 +Effect at line 139 Prove: true. ------------------------------------------------------------ Goal Assigns 'lack' in 'init_t2_bis_v1' (2/3): -Effect at line 137 +Effect at line 139 Assume { Have: 0 <= i_2. Have: 0 <= i_3. @@ -437,19 +437,19 @@ Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ ------------------------------------------------------------ Goal Assigns 'lack' in 'init_t2_bis_v1' (3/3): -Call Effect at line 138 +Call Effect at line 140 Prove: true. ------------------------------------------------------------ Goal Assigns 'lack' in 'init_t2_bis_v1' (1/2): -Effect at line 137 +Effect at line 139 Prove: true. ------------------------------------------------------------ Goal Assigns 'lack' in 'init_t2_bis_v1' (2/2): -Effect at line 137 +Effect at line 139 Assume { Have: 0 <= i_2. Have: 0 <= i_3. @@ -471,7 +471,7 @@ Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ ------------------------------------------------------------ -Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 137): +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 139): Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Assume { @@ -499,18 +499,18 @@ Prove: i < to_uint32(1 + i). ------------------------------------------------------------ -Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 137): +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 139): Prove: true. ------------------------------------------------------------ -Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 7) in 'init'' in 'init_t2_bis_v1' at call 'init' (file tests/wp_typed/user_init.i, line 138) +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 7) in 'init'' in 'init_t2_bis_v1' at call 'init' (file tests/wp_typed/user_init.i, line 140) : Prove: true. ------------------------------------------------------------ -Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 8) in 'init'' in 'init_t2_bis_v1' at call 'init' (file tests/wp_typed/user_init.i, line 138) +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 8) in 'init'' in 'init_t2_bis_v1' at call 'init' (file tests/wp_typed/user_init.i, line 140) : Prove: true. @@ -519,13 +519,13 @@ Prove: true. Function init_t2_bis_v2 ------------------------------------------------------------ -Goal Post-condition (file tests/wp_typed/user_init.i, line 143) in 'init_t2_bis_v2': +Goal Post-condition (file tests/wp_typed/user_init.i, line 145) in 'init_t2_bis_v2': Let a = global(G_t2_48). Assume { Type: is_uint32(i_2) /\ is_sint32(v). (* Goal *) When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). - (* Loop assigns 'lack,Zone' *) + (* Loop assigns 'tactic,Zone' *) Have: forall a_1 : addr. ((forall i_4,i_3 : Z. ((0 <= i_4) -> ((i_4 <= 9) -> (shift_sint32(shift_A20_sint32(a, i_4), i_3) != a_1)))) -> @@ -543,12 +543,12 @@ Prove: Mint_0[shift_sint32(shift_A20_sint32(a, i), i_1)] = v. ------------------------------------------------------------ -Goal Exit-condition (file tests/wp_typed/user_init.i, line 145) in 'init_t2_bis_v2': +Goal Exit-condition (file tests/wp_typed/user_init.i, line 147) in 'init_t2_bis_v2': Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 152): +Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 154): Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Let a_2 = shift_sint32(a_1, 0). @@ -557,7 +557,7 @@ Assume { Type: is_uint32(i) /\ is_sint32(v). (* Goal *) When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). - (* Loop assigns 'lack,Zone' *) + (* Loop assigns 'tactic,Zone' *) Have: forall a_4 : addr. ((forall i_4,i_3 : Z. ((0 <= i_4) -> ((i_4 <= 9) -> (shift_sint32(shift_A20_sint32(a, i_4), i_3) != a_4)))) -> @@ -578,17 +578,17 @@ Prove: a_3[shift_sint32(shift_A20_sint32(a, i_1), i_2)] = Mint_undef_0[a_2]. ------------------------------------------------------------ -Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 152): +Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 154): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 151): +Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 153): Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). - (* Loop assigns 'lack,Zone' *) + (* Loop assigns 'tactic,Zone' *) Have: forall a_2 : addr. ((forall i_2,i_1 : Z. ((0 <= i_2) -> ((i_2 <= 9) -> (shift_sint32(shift_A20_sint32(a, i_2), i_1) != a_2)))) -> @@ -610,23 +610,23 @@ Prove: to_uint32(1 + i) <= 10. ------------------------------------------------------------ -Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 151): +Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 153): Prove: true. ------------------------------------------------------------ -Goal Assertion 'Offset_i' (file tests/wp_typed/user_init.i, line 157): +Goal Assertion 'Offset_i' (file tests/wp_typed/user_init.i, line 159): Prove: true. ------------------------------------------------------------ -Goal Loop assigns 'lack,Zone' (1/3): +Goal Loop assigns 'tactic,Zone' (1/3): Prove: true. ------------------------------------------------------------ -Goal Loop assigns 'lack,Zone' (2/3): -Effect at line 155 +Goal Loop assigns 'tactic,Zone' (2/3): +Effect at line 157 Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i_2). Assume { @@ -635,7 +635,7 @@ Assume { Type: is_uint32(i_2) /\ is_sint32(v). (* Goal *) When: (0 <= i_3) /\ (0 <= i_4) /\ (i_3 <= 9) /\ (i_4 <= 19). - (* Loop assigns 'lack,Zone' *) + (* Loop assigns 'tactic,Zone' *) Have: forall a_2 : addr. ((forall i_6,i_5 : Z. ((0 <= i_6) -> ((i_6 <= 9) -> (shift_sint32(shift_A20_sint32(a, i_6), i_5) != a_2)))) -> @@ -658,15 +658,15 @@ Prove: exists i_6,i_5 : Z. (i_6 <= i) /\ (i_5 <= i_1) /\ (i_1 <= i_5) /\ ------------------------------------------------------------ -Goal Loop assigns 'lack,Zone' (3/3): -Call Effect at line 156 +Goal Loop assigns 'tactic,Zone' (3/3): +Call Effect at line 158 Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). (* Goal *) When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). - (* Loop assigns 'lack,Zone' *) + (* Loop assigns 'tactic,Zone' *) Have: forall a_2 : addr. ((forall i_3,i_2 : Z. ((0 <= i_3) -> ((i_3 <= 9) -> (shift_sint32(shift_A20_sint32(a, i_3), i_2) != a_2)))) -> @@ -687,14 +687,14 @@ Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (i_1 <= i_2) /\ ------------------------------------------------------------ -Goal Assigns 'lack' in 'init_t2_bis_v2' (1/3): -Effect at line 155 +Goal Assigns 'tactic' in 'init_t2_bis_v2' (1/3): +Effect at line 157 Prove: true. ------------------------------------------------------------ -Goal Assigns 'lack' in 'init_t2_bis_v2' (2/3): -Effect at line 155 +Goal Assigns 'tactic' in 'init_t2_bis_v2' (2/3): +Effect at line 157 Assume { Have: 0 <= i_2. Have: 0 <= i_3. @@ -702,7 +702,7 @@ Assume { Have: i_3 <= 19. Have: 0 <= i. Have: i <= 9. - (* Loop assigns 'lack,Zone' *) + (* Loop assigns 'tactic,Zone' *) Have: forall a : addr. ((forall i_5,i_4 : Z. ((0 <= i_5) -> ((i_5 <= 9) -> (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))) -> @@ -713,20 +713,20 @@ Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ ------------------------------------------------------------ -Goal Assigns 'lack' in 'init_t2_bis_v2' (3/3): -Call Effect at line 156 +Goal Assigns 'tactic' in 'init_t2_bis_v2' (3/3): +Call Effect at line 158 Prove: true. ------------------------------------------------------------ -Goal Assigns 'lack' in 'init_t2_bis_v2' (1/2): -Effect at line 155 +Goal Assigns 'tactic' in 'init_t2_bis_v2' (1/2): +Effect at line 157 Prove: true. ------------------------------------------------------------ -Goal Assigns 'lack' in 'init_t2_bis_v2' (2/2): -Effect at line 155 +Goal Assigns 'tactic' in 'init_t2_bis_v2' (2/2): +Effect at line 157 Assume { Have: 0 <= i_2. Have: 0 <= i_3. @@ -734,7 +734,7 @@ Assume { Have: i_3 <= 19. Have: 0 <= i. Have: i <= 9. - (* Loop assigns 'lack,Zone' *) + (* Loop assigns 'tactic,Zone' *) Have: forall a : addr. ((forall i_5,i_4 : Z. ((0 <= i_5) -> ((i_5 <= 9) -> (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))) -> @@ -745,12 +745,12 @@ Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ ------------------------------------------------------------ -Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 155): +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 157): Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). - (* Loop assigns 'lack,Zone' *) + (* Loop assigns 'tactic,Zone' *) Have: forall a_2 : addr. ((forall i_2,i_1 : Z. ((0 <= i_2) -> ((i_2 <= 9) -> (shift_sint32(shift_A20_sint32(a, i_2), i_1) != a_2)))) -> @@ -772,18 +772,18 @@ Prove: i < to_uint32(1 + i). ------------------------------------------------------------ -Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 155): +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 157): Prove: true. ------------------------------------------------------------ -Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 7) in 'init'' in 'init_t2_bis_v2' at call 'init' (file tests/wp_typed/user_init.i, line 156) +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 7) in 'init'' in 'init_t2_bis_v2' at call 'init' (file tests/wp_typed/user_init.i, line 158) : Prove: true. ------------------------------------------------------------ -Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 8) in 'init'' in 'init_t2_bis_v2' at call 'init' (file tests/wp_typed/user_init.i, line 156) +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 8) in 'init'' in 'init_t2_bis_v2' at call 'init' (file tests/wp_typed/user_init.i, line 158) : Prove: true. @@ -1745,124 +1745,143 @@ Prove: true. Function init_t2_v3 ------------------------------------------------------------ -Goal Post-condition (file tests/wp_typed/user_init.i, line 97) in 'init_t2_v3': +Goal Post-condition (file tests/wp_typed/user_init.i, line 99) in 'init_t2_v3': Assume { + Type: is_sint32(v). (* Goal *) - When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). - (* Loop assigns 'lack,Zone_i' *) - Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> - (t2_1[i_3][i_2] = t2_0[i_3][i_2])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> (t2_0[i_3][i_2] = v))))). + When: (0 <= i) /\ (i <= 9). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_1[i_2][i_1] = t2_0[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 9) -> + P_MemSet20(t2_0[i_1], 20, v))). } -Prove: t2_0[i][i_1] = v. +Prove: P_MemSet20(t2_0[i], 20, v). ------------------------------------------------------------ -Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 105): +Goal Preservation of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 108): Assume { - Type: is_uint32(i). - (* Loop assigns 'lack,Zone_i' *) - Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> - (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> - ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + Type: IsArray1_sint32(v) /\ is_uint32(i) /\ is_sint32(v_1) /\ + IsArray1_sint32(t2_0[i]). + (* Goal *) + When: (0 <= i_1) /\ (i_1 < to_uint32(1 + i)). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> + (t2_1[i_3][i_2] = t2_0[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < i) -> + P_MemSet20(t2_0[i_2], 20, v_1))). (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. (* Invariant 'Partial_j' *) - Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (v_1[i_1] = v))). + Have: P_MemSet20(v, 20, v_1). } -Prove: to_uint32(1 + i) <= 10. +Prove: P_MemSet20(t2_0[i <- v][i_1], 20, v_1). ------------------------------------------------------------ -Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 105): +Goal Establishment of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 108): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'lack,Partial_i' (file tests/wp_typed/user_init.i, line 106): +Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 107): Assume { - Type: is_uint32(i). - (* Goal *) - When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). - (* Loop assigns 'lack,Zone_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> (((i_4 < 0) \/ (10 <= i_4)) -> - (t2_1[i_4][i_3] = t2_0[i_4][i_3])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_0[i_4][i_3] = v_1))))). + Type: IsArray1_sint32(v) /\ is_uint32(i) /\ is_sint32(v_1) /\ + IsArray1_sint32(t2_0[i]). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_1[i_2][i_1] = t2_0[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> + P_MemSet20(t2_0[i_1], 20, v_1))). (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. (* Invariant 'Partial_j' *) - Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (v[i_3] = v_1))). + Have: P_MemSet20(v, 20, v_1). } -Prove: t2_0[i <- v][i_1][i_2] = v[0]. +Prove: to_uint32(1 + i) <= 10. ------------------------------------------------------------ -Goal Establishment of Invariant 'lack,Partial_i' (file tests/wp_typed/user_init.i, line 106): +Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 107): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 112): +Goal Preservation of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 114): +Let m = v[j <- v_1]. Assume { - Type: is_uint32(i_1) /\ is_uint32(j). - (* Goal *) - When: (0 <= i) /\ (i < to_uint32(1 + j)). - (* Loop assigns 'lack,Zone_i' *) - Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> - (t2_0[i_3][i_2] = t2_1[i_3][i_2])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i_1) -> - ((i_2 <= 19) -> (t2_1[i_3][i_2] = v_1))))). + Type: IsArray1_sint32(v) /\ is_uint32(i) /\ is_uint32(j) /\ + is_sint32(v_1) /\ IsArray1_sint32(t2_0[i]) /\ IsArray1_sint32(m). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_1[i_2][i_1] = t2_0[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> + P_MemSet20(t2_0[i_1], 20, v_1))). (* Invariant 'Range_i' *) - Have: (0 <= i_1) /\ (i_1 <= 10). + Have: (0 <= i) /\ (i <= 10). (* Then *) - Have: i_1 <= 9. + Have: i <= 9. (* Invariant 'Partial_j' *) - Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < j) -> (v[i_2] = v_1))). + Have: P_MemSet20(v, j, v_1). (* Invariant 'Range_j' *) Have: (0 <= j) /\ (j <= 20). (* Then *) Have: j <= 19. } -Prove: v[j <- v_1][i] = v_1. +Prove: P_MemSet20(m, to_uint32(1 + j), v_1). ------------------------------------------------------------ -Goal Establishment of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 112): -Prove: true. +Goal Establishment of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 114): +Let m = t2_0[i]. +Assume { + Type: is_uint32(i) /\ is_sint32(v) /\ IsArray1_sint32(m). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_1[i_2][i_1] = t2_0[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> + P_MemSet20(t2_0[i_1], 20, v))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. +} +Prove: P_MemSet20(m, 0, v). ------------------------------------------------------------ -Goal Preservation of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 111): +Goal Preservation of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 113): Assume { - Type: is_uint32(i) /\ is_uint32(j). - (* Loop assigns 'lack,Zone_i' *) + Type: IsArray1_sint32(v) /\ is_uint32(i) /\ is_uint32(j) /\ + is_sint32(v_1) /\ IsArray1_sint32(t2_0[i]). + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> - (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> - ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (t2_1[i_2][i_1] = t2_0[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> + P_MemSet20(t2_0[i_1], 20, v_1))). (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. (* Invariant 'Partial_j' *) - Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (v_1[i_1] = v))). + Have: P_MemSet20(v, j, v_1). (* Invariant 'Range_j' *) Have: (0 <= j) /\ (j <= 20). (* Then *) @@ -1872,95 +1891,97 @@ Prove: to_uint32(1 + j) <= 20. ------------------------------------------------------------ -Goal Establishment of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 111): +Goal Establishment of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 113): Prove: true. ------------------------------------------------------------ -Goal Assertion 'Last_j' (file tests/wp_typed/user_init.i, line 118): +Goal Assertion 'Last_j' (file tests/wp_typed/user_init.i, line 120): Prove: true. ------------------------------------------------------------ -Goal Assertion 'Last_i' (file tests/wp_typed/user_init.i, line 121): +Goal Assertion 'Last_i' (file tests/wp_typed/user_init.i, line 123): Prove: true. ------------------------------------------------------------ -Goal Loop assigns 'lack,Zone_i' (1/3): +Goal Loop assigns 'tactic,Zone_i' (1/3): Prove: true. ------------------------------------------------------------ -Goal Loop assigns 'lack,Zone_i' (2/3): -Effect at line 109 +Goal Loop assigns 'tactic,Zone_i' (2/3): +Effect at line 111 Assume { Have: 0 <= i. Have: i <= 9. - Type: is_uint32(i_2). + Type: IsArray1_sint32(v) /\ is_uint32(i_2) /\ is_sint32(v_1) /\ + IsArray1_sint32(t2_0[i_2]). (* Goal *) When: (0 <= i_3) /\ (0 <= i_4) /\ (i_3 <= 9) /\ (i_4 <= 19). - (* Loop assigns 'lack,Zone_i' *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 <= 9) -> ((i_5 <= 19) -> (((i_6 < 0) \/ (10 <= i_6)) -> - (t2_0[i_6][i_5] = t2_1[i_6][i_5])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> - ((i_5 <= 19) -> (t2_1[i_6][i_5] = v))))). + (t2_1[i_6][i_5] = t2_0[i_6][i_5])))))). + (* Invariant 'Partial_i' *) + Have: forall i_5 : Z. ((0 <= i_5) -> ((i_5 < i_2) -> + P_MemSet20(t2_0[i_5], 20, v_1))). (* Invariant 'Range_i' *) Have: (0 <= i_2) /\ (i_2 <= 10). (* Then *) Have: i_2 <= 9. (* Invariant 'Partial_j' *) - Have: forall i_5 : Z. ((0 <= i_5) -> ((i_5 <= 19) -> (v_1[i_5] = v))). + Have: P_MemSet20(v, 20, v_1). } Prove: exists i_6,i_5 : Z. (i_6 <= i) /\ (i_5 <= i_1) /\ (i_1 <= i_5) /\ (0 <= i_6) /\ (i <= i_6) /\ (i_6 <= 9). ------------------------------------------------------------ -Goal Loop assigns 'lack,Zone_i' (3/3): -Effect at line 115 +Goal Loop assigns 'tactic,Zone_i' (3/3): +Effect at line 117 Assume { - Type: is_uint32(i). + Type: IsArray1_sint32(v) /\ is_uint32(i) /\ is_sint32(v_1) /\ + IsArray1_sint32(t2_0[i]). (* Goal *) When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). - (* Loop assigns 'lack,Zone_i' *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> - (t2_0[i_3][i_2] = t2_1[i_3][i_2])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> - ((i_2 <= 19) -> (t2_1[i_3][i_2] = v))))). + (t2_1[i_3][i_2] = t2_0[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < i) -> + P_MemSet20(t2_0[i_2], 20, v_1))). (* Invariant 'Range_i' *) Have: i <= 10. (* Invariant 'Partial_j' *) - Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> (v_1[i_2] = v))). + Have: P_MemSet20(v, 20, v_1). } Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (i_1 <= i_2) /\ (0 <= i_3) /\ (i <= i_3) /\ (i_3 <= 9). ------------------------------------------------------------ -Goal Loop assigns 'lack,Zone_j' (1/2): +Goal Loop assigns 'tactic,Zone_j' (1/2): Prove: true. ------------------------------------------------------------ -Goal Loop assigns 'lack,Zone_j' (2/2): -Effect at line 115 +Goal Loop assigns 'tactic,Zone_j' (2/2): +Effect at line 117 Prove: true. ------------------------------------------------------------ -Goal Assigns 'lack' in 'init_t2_v3' (1/2): -Effect at line 109 +Goal Assigns 'tactic' in 'init_t2_v3' (1/2): +Effect at line 111 Prove: true. ------------------------------------------------------------ -Goal Assigns 'lack' in 'init_t2_v3' (2/2): -Effect at line 109 +Goal Assigns 'tactic' in 'init_t2_v3' (2/2): +Effect at line 111 Assume { Have: 0 <= i_2. Have: 0 <= i_3. @@ -1968,7 +1989,7 @@ Assume { Have: i_3 <= 19. Have: 0 <= i. Have: i <= 9. - (* Loop assigns 'lack,Zone_i' *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> ((i_4 <= 19) -> (((i_5 < 0) \/ (10 <= i_5)) -> (t2_0[i_5][i_4] = t2_1[i_5][i_4])))))). @@ -1978,48 +1999,50 @@ Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ ------------------------------------------------------------ -Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 109): +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 111): Assume { - Type: is_uint32(i). - (* Loop assigns 'lack,Zone_i' *) + Type: IsArray1_sint32(v) /\ is_uint32(i) /\ is_sint32(v_1) /\ + IsArray1_sint32(t2_0[i]). + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> - (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> - ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (t2_1[i_2][i_1] = t2_0[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> + P_MemSet20(t2_0[i_1], 20, v_1))). (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. (* Invariant 'Partial_j' *) - Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (v_1[i_1] = v))). + Have: P_MemSet20(v, 20, v_1). } Prove: i < to_uint32(1 + i). ------------------------------------------------------------ -Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 109): +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 111): Prove: true. ------------------------------------------------------------ -Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 115): +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 117): Assume { - Type: is_uint32(i) /\ is_uint32(j). - (* Loop assigns 'lack,Zone_i' *) + Type: IsArray1_sint32(v) /\ is_uint32(i) /\ is_uint32(j) /\ + is_sint32(v_1) /\ IsArray1_sint32(t2_0[i]). + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> - (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> - ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (t2_1[i_2][i_1] = t2_0[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> + P_MemSet20(t2_0[i_1], 20, v_1))). (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. (* Invariant 'Partial_j' *) - Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (v_1[i_1] = v))). + Have: P_MemSet20(v, j, v_1). (* Invariant 'Range_j' *) Have: (0 <= j) /\ (j <= 20). (* Then *) @@ -2029,7 +2052,7 @@ Prove: j < to_uint32(1 + j). ------------------------------------------------------------ -Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 115): +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 117): Prove: true. ------------------------------------------------------------ diff --git a/src/plugins/wp/tests/wp_typed/oracle/user_init.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle/user_init.1.res.oracle index 04c72c68990..847496eab27 100644 --- a/src/plugins/wp/tests/wp_typed/oracle/user_init.1.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle/user_init.1.res.oracle @@ -231,7 +231,7 @@ Prove: true. Function init_t2_bis_v1 ------------------------------------------------------------ -Goal Post-condition (file tests/wp_typed/user_init.i, line 125) in 'init_t2_bis_v1': +Goal Post-condition (file tests/wp_typed/user_init.i, line 127) in 'init_t2_bis_v1': Let a = global(G_t2_48). Assume { Type: is_uint32(i_2) /\ is_sint32(v). @@ -256,12 +256,12 @@ Prove: Mint_0[shift_sint32(shift_A20_sint32(a, i), i_1)] = v. ------------------------------------------------------------ -Goal Exit-condition (file tests/wp_typed/user_init.i, line 127) in 'init_t2_bis_v1': +Goal Exit-condition (file tests/wp_typed/user_init.i, line 129) in 'init_t2_bis_v1': Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 134): +Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 136): Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Let a_2 = shift_sint32(a_1, 0). @@ -292,12 +292,12 @@ Prove: a_3[shift_sint32(shift_A20_sint32(a, i_1), i_2)] = Mint_undef_0[a_2]. ------------------------------------------------------------ -Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 134): +Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 136): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 133): +Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 135): Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Assume { @@ -325,12 +325,12 @@ Prove: to_uint32(1 + i) <= 10. ------------------------------------------------------------ -Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 133): +Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 135): Prove: true. ------------------------------------------------------------ -Goal Assertion 'Offset' (file tests/wp_typed/user_init.i, line 139): +Goal Assertion 'Offset' (file tests/wp_typed/user_init.i, line 141): Prove: true. ------------------------------------------------------------ @@ -341,7 +341,7 @@ Prove: true. ------------------------------------------------------------ Goal Loop assigns 'lack,Zone' (2/3): -Effect at line 137 +Effect at line 139 Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Assume { @@ -378,7 +378,7 @@ Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> ------------------------------------------------------------ Goal Loop assigns 'lack,Zone' (3/3): -Call Effect at line 138 +Call Effect at line 140 Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Assume { @@ -408,13 +408,13 @@ Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (0 <= i_2) /\ ------------------------------------------------------------ Goal Assigns 'lack' in 'init_t2_bis_v1' (1/3): -Effect at line 137 +Effect at line 139 Prove: true. ------------------------------------------------------------ Goal Assigns 'lack' in 'init_t2_bis_v1' (2/3): -Effect at line 137 +Effect at line 139 Assume { Have: 0 <= i_2. Have: 0 <= i_3. @@ -437,19 +437,19 @@ Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ ------------------------------------------------------------ Goal Assigns 'lack' in 'init_t2_bis_v1' (3/3): -Call Effect at line 138 +Call Effect at line 140 Prove: true. ------------------------------------------------------------ Goal Assigns 'lack' in 'init_t2_bis_v1' (1/2): -Effect at line 137 +Effect at line 139 Prove: true. ------------------------------------------------------------ Goal Assigns 'lack' in 'init_t2_bis_v1' (2/2): -Effect at line 137 +Effect at line 139 Assume { Have: 0 <= i_2. Have: 0 <= i_3. @@ -471,7 +471,7 @@ Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ ------------------------------------------------------------ -Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 137): +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 139): Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Assume { @@ -499,18 +499,18 @@ Prove: i < to_uint32(1 + i). ------------------------------------------------------------ -Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 137): +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 139): Prove: true. ------------------------------------------------------------ -Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 7) in 'init'' in 'init_t2_bis_v1' at call 'init' (file tests/wp_typed/user_init.i, line 138) +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 7) in 'init'' in 'init_t2_bis_v1' at call 'init' (file tests/wp_typed/user_init.i, line 140) : Prove: true. ------------------------------------------------------------ -Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 8) in 'init'' in 'init_t2_bis_v1' at call 'init' (file tests/wp_typed/user_init.i, line 138) +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 8) in 'init'' in 'init_t2_bis_v1' at call 'init' (file tests/wp_typed/user_init.i, line 140) : Prove: true. @@ -519,13 +519,13 @@ Prove: true. Function init_t2_bis_v2 ------------------------------------------------------------ -Goal Post-condition (file tests/wp_typed/user_init.i, line 143) in 'init_t2_bis_v2': +Goal Post-condition (file tests/wp_typed/user_init.i, line 145) in 'init_t2_bis_v2': Let a = global(G_t2_48). Assume { Type: is_uint32(i_2) /\ is_sint32(v). (* Goal *) When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). - (* Loop assigns 'lack,Zone' *) + (* Loop assigns 'tactic,Zone' *) Have: forall a_1 : addr. ((forall i_4,i_3 : Z. ((0 <= i_4) -> ((i_4 <= 9) -> (shift_sint32(shift_A20_sint32(a, i_4), i_3) != a_1)))) -> @@ -543,12 +543,12 @@ Prove: Mint_0[shift_sint32(shift_A20_sint32(a, i), i_1)] = v. ------------------------------------------------------------ -Goal Exit-condition (file tests/wp_typed/user_init.i, line 145) in 'init_t2_bis_v2': +Goal Exit-condition (file tests/wp_typed/user_init.i, line 147) in 'init_t2_bis_v2': Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 152): +Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 154): Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Let a_2 = shift_sint32(a_1, 0). @@ -557,7 +557,7 @@ Assume { Type: is_uint32(i) /\ is_sint32(v). (* Goal *) When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). - (* Loop assigns 'lack,Zone' *) + (* Loop assigns 'tactic,Zone' *) Have: forall a_4 : addr. ((forall i_4,i_3 : Z. ((0 <= i_4) -> ((i_4 <= 9) -> (shift_sint32(shift_A20_sint32(a, i_4), i_3) != a_4)))) -> @@ -578,17 +578,17 @@ Prove: a_3[shift_sint32(shift_A20_sint32(a, i_1), i_2)] = Mint_undef_0[a_2]. ------------------------------------------------------------ -Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 152): +Goal Establishment of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 154): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 151): +Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 153): Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). - (* Loop assigns 'lack,Zone' *) + (* Loop assigns 'tactic,Zone' *) Have: forall a_2 : addr. ((forall i_2,i_1 : Z. ((0 <= i_2) -> ((i_2 <= 9) -> (shift_sint32(shift_A20_sint32(a, i_2), i_1) != a_2)))) -> @@ -610,23 +610,23 @@ Prove: to_uint32(1 + i) <= 10. ------------------------------------------------------------ -Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 151): +Goal Establishment of Invariant 'Range' (file tests/wp_typed/user_init.i, line 153): Prove: true. ------------------------------------------------------------ -Goal Assertion 'Offset_i' (file tests/wp_typed/user_init.i, line 157): +Goal Assertion 'Offset_i' (file tests/wp_typed/user_init.i, line 159): Prove: true. ------------------------------------------------------------ -Goal Loop assigns 'lack,Zone' (1/3): +Goal Loop assigns 'tactic,Zone' (1/3): Prove: true. ------------------------------------------------------------ -Goal Loop assigns 'lack,Zone' (2/3): -Effect at line 155 +Goal Loop assigns 'tactic,Zone' (2/3): +Effect at line 157 Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i_2). Assume { @@ -635,7 +635,7 @@ Assume { Type: is_uint32(i_2) /\ is_sint32(v). (* Goal *) When: (0 <= i_3) /\ (0 <= i_4) /\ (i_3 <= 9) /\ (i_4 <= 19). - (* Loop assigns 'lack,Zone' *) + (* Loop assigns 'tactic,Zone' *) Have: forall a_2 : addr. ((forall i_6,i_5 : Z. ((0 <= i_6) -> ((i_6 <= 9) -> (shift_sint32(shift_A20_sint32(a, i_6), i_5) != a_2)))) -> @@ -658,15 +658,15 @@ Prove: exists i_6,i_5 : Z. (i_6 <= i) /\ (i_5 <= i_1) /\ (i_1 <= i_5) /\ ------------------------------------------------------------ -Goal Loop assigns 'lack,Zone' (3/3): -Call Effect at line 156 +Goal Loop assigns 'tactic,Zone' (3/3): +Call Effect at line 158 Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). (* Goal *) When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). - (* Loop assigns 'lack,Zone' *) + (* Loop assigns 'tactic,Zone' *) Have: forall a_2 : addr. ((forall i_3,i_2 : Z. ((0 <= i_3) -> ((i_3 <= 9) -> (shift_sint32(shift_A20_sint32(a, i_3), i_2) != a_2)))) -> @@ -687,14 +687,14 @@ Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (i_1 <= i_2) /\ ------------------------------------------------------------ -Goal Assigns 'lack' in 'init_t2_bis_v2' (1/3): -Effect at line 155 +Goal Assigns 'tactic' in 'init_t2_bis_v2' (1/3): +Effect at line 157 Prove: true. ------------------------------------------------------------ -Goal Assigns 'lack' in 'init_t2_bis_v2' (2/3): -Effect at line 155 +Goal Assigns 'tactic' in 'init_t2_bis_v2' (2/3): +Effect at line 157 Assume { Have: 0 <= i_2. Have: 0 <= i_3. @@ -702,7 +702,7 @@ Assume { Have: i_3 <= 19. Have: 0 <= i. Have: i <= 9. - (* Loop assigns 'lack,Zone' *) + (* Loop assigns 'tactic,Zone' *) Have: forall a : addr. ((forall i_5,i_4 : Z. ((0 <= i_5) -> ((i_5 <= 9) -> (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))) -> @@ -713,20 +713,20 @@ Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ ------------------------------------------------------------ -Goal Assigns 'lack' in 'init_t2_bis_v2' (3/3): -Call Effect at line 156 +Goal Assigns 'tactic' in 'init_t2_bis_v2' (3/3): +Call Effect at line 158 Prove: true. ------------------------------------------------------------ -Goal Assigns 'lack' in 'init_t2_bis_v2' (1/2): -Effect at line 155 +Goal Assigns 'tactic' in 'init_t2_bis_v2' (1/2): +Effect at line 157 Prove: true. ------------------------------------------------------------ -Goal Assigns 'lack' in 'init_t2_bis_v2' (2/2): -Effect at line 155 +Goal Assigns 'tactic' in 'init_t2_bis_v2' (2/2): +Effect at line 157 Assume { Have: 0 <= i_2. Have: 0 <= i_3. @@ -734,7 +734,7 @@ Assume { Have: i_3 <= 19. Have: 0 <= i. Have: i <= 9. - (* Loop assigns 'lack,Zone' *) + (* Loop assigns 'tactic,Zone' *) Have: forall a : addr. ((forall i_5,i_4 : Z. ((0 <= i_5) -> ((i_5 <= 9) -> (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))) -> @@ -745,12 +745,12 @@ Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ ------------------------------------------------------------ -Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 155): +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 157): Let a = global(G_t2_48). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). - (* Loop assigns 'lack,Zone' *) + (* Loop assigns 'tactic,Zone' *) Have: forall a_2 : addr. ((forall i_2,i_1 : Z. ((0 <= i_2) -> ((i_2 <= 9) -> (shift_sint32(shift_A20_sint32(a, i_2), i_1) != a_2)))) -> @@ -772,18 +772,18 @@ Prove: i < to_uint32(1 + i). ------------------------------------------------------------ -Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 155): +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 157): Prove: true. ------------------------------------------------------------ -Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 7) in 'init'' in 'init_t2_bis_v2' at call 'init' (file tests/wp_typed/user_init.i, line 156) +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 7) in 'init'' in 'init_t2_bis_v2' at call 'init' (file tests/wp_typed/user_init.i, line 158) : Prove: true. ------------------------------------------------------------ -Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 8) in 'init'' in 'init_t2_bis_v2' at call 'init' (file tests/wp_typed/user_init.i, line 156) +Goal Instance of 'Pre-condition (file tests/wp_typed/user_init.i, line 8) in 'init'' in 'init_t2_bis_v2' at call 'init' (file tests/wp_typed/user_init.i, line 158) : Prove: true. @@ -1745,124 +1745,143 @@ Prove: true. Function init_t2_v3 ------------------------------------------------------------ -Goal Post-condition (file tests/wp_typed/user_init.i, line 97) in 'init_t2_v3': +Goal Post-condition (file tests/wp_typed/user_init.i, line 99) in 'init_t2_v3': Assume { + Type: is_sint32(v). (* Goal *) - When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). - (* Loop assigns 'lack,Zone_i' *) - Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> - (t2_1[i_3][i_2] = t2_0[i_3][i_2])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> (t2_0[i_3][i_2] = v))))). + When: (0 <= i) /\ (i <= 9). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_1[i_2][i_1] = t2_0[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 9) -> + P_MemSet20(t2_0[i_1], 20, v))). } -Prove: t2_0[i][i_1] = v. +Prove: P_MemSet20(t2_0[i], 20, v). ------------------------------------------------------------ -Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 105): +Goal Preservation of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 108): Assume { - Type: is_uint32(i). - (* Loop assigns 'lack,Zone_i' *) - Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> - ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> - (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> - ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + Type: IsArray1_sint32(v) /\ is_uint32(i) /\ is_sint32(v_1) /\ + IsArray1_sint32(t2_0[i]). + (* Goal *) + When: (0 <= i_1) /\ (i_1 < to_uint32(1 + i)). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> + ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> + (t2_1[i_3][i_2] = t2_0[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < i) -> + P_MemSet20(t2_0[i_2], 20, v_1))). (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. (* Invariant 'Partial_j' *) - Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (v_1[i_1] = v))). + Have: P_MemSet20(v, 20, v_1). } -Prove: to_uint32(1 + i) <= 10. +Prove: P_MemSet20(t2_0[i <- v][i_1], 20, v_1). ------------------------------------------------------------ -Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 105): +Goal Establishment of Invariant 'Partial_i' (file tests/wp_typed/user_init.i, line 108): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'lack,Partial_i' (file tests/wp_typed/user_init.i, line 106): +Goal Preservation of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 107): Assume { - Type: is_uint32(i). - (* Goal *) - When: (0 <= i_1) /\ (0 <= i_2) /\ (i_1 < to_uint32(1 + i)) /\ (i_2 <= 19). - (* Loop assigns 'lack,Zone_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> - ((i_3 <= 19) -> (((i_4 < 0) \/ (10 <= i_4)) -> - (t2_1[i_4][i_3] = t2_0[i_4][i_3])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 < i) -> - ((i_3 <= 19) -> (t2_0[i_4][i_3] = v_1))))). + Type: IsArray1_sint32(v) /\ is_uint32(i) /\ is_sint32(v_1) /\ + IsArray1_sint32(t2_0[i]). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_1[i_2][i_1] = t2_0[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> + P_MemSet20(t2_0[i_1], 20, v_1))). (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. (* Invariant 'Partial_j' *) - Have: forall i_3 : Z. ((0 <= i_3) -> ((i_3 <= 19) -> (v[i_3] = v_1))). + Have: P_MemSet20(v, 20, v_1). } -Prove: t2_0[i <- v][i_1][i_2] = v[0]. +Prove: to_uint32(1 + i) <= 10. ------------------------------------------------------------ -Goal Establishment of Invariant 'lack,Partial_i' (file tests/wp_typed/user_init.i, line 106): +Goal Establishment of Invariant 'Range_i' (file tests/wp_typed/user_init.i, line 107): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 112): +Goal Preservation of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 114): +Let m = v[j <- v_1]. Assume { - Type: is_uint32(i_1) /\ is_uint32(j). - (* Goal *) - When: (0 <= i) /\ (i < to_uint32(1 + j)). - (* Loop assigns 'lack,Zone_i' *) - Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> - ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> - (t2_0[i_3][i_2] = t2_1[i_3][i_2])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i_1) -> - ((i_2 <= 19) -> (t2_1[i_3][i_2] = v_1))))). + Type: IsArray1_sint32(v) /\ is_uint32(i) /\ is_uint32(j) /\ + is_sint32(v_1) /\ IsArray1_sint32(t2_0[i]) /\ IsArray1_sint32(m). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_1[i_2][i_1] = t2_0[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> + P_MemSet20(t2_0[i_1], 20, v_1))). (* Invariant 'Range_i' *) - Have: (0 <= i_1) /\ (i_1 <= 10). + Have: (0 <= i) /\ (i <= 10). (* Then *) - Have: i_1 <= 9. + Have: i <= 9. (* Invariant 'Partial_j' *) - Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < j) -> (v[i_2] = v_1))). + Have: P_MemSet20(v, j, v_1). (* Invariant 'Range_j' *) Have: (0 <= j) /\ (j <= 20). (* Then *) Have: j <= 19. } -Prove: v[j <- v_1][i] = v_1. +Prove: P_MemSet20(m, to_uint32(1 + j), v_1). ------------------------------------------------------------ -Goal Establishment of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 112): -Prove: true. +Goal Establishment of Invariant 'Partial_j' (file tests/wp_typed/user_init.i, line 114): +Let m = t2_0[i]. +Assume { + Type: is_uint32(i) /\ is_sint32(v) /\ IsArray1_sint32(m). + (* Loop assigns 'tactic,Zone_i' *) + Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> + ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> + (t2_1[i_2][i_1] = t2_0[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> + P_MemSet20(t2_0[i_1], 20, v))). + (* Invariant 'Range_i' *) + Have: (0 <= i) /\ (i <= 10). + (* Then *) + Have: i <= 9. +} +Prove: P_MemSet20(m, 0, v). ------------------------------------------------------------ -Goal Preservation of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 111): +Goal Preservation of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 113): Assume { - Type: is_uint32(i) /\ is_uint32(j). - (* Loop assigns 'lack,Zone_i' *) + Type: IsArray1_sint32(v) /\ is_uint32(i) /\ is_uint32(j) /\ + is_sint32(v_1) /\ IsArray1_sint32(t2_0[i]). + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> - (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> - ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (t2_1[i_2][i_1] = t2_0[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> + P_MemSet20(t2_0[i_1], 20, v_1))). (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. (* Invariant 'Partial_j' *) - Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (v_1[i_1] = v))). + Have: P_MemSet20(v, j, v_1). (* Invariant 'Range_j' *) Have: (0 <= j) /\ (j <= 20). (* Then *) @@ -1872,95 +1891,97 @@ Prove: to_uint32(1 + j) <= 20. ------------------------------------------------------------ -Goal Establishment of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 111): +Goal Establishment of Invariant 'Range_j' (file tests/wp_typed/user_init.i, line 113): Prove: true. ------------------------------------------------------------ -Goal Assertion 'Last_j' (file tests/wp_typed/user_init.i, line 118): +Goal Assertion 'Last_j' (file tests/wp_typed/user_init.i, line 120): Prove: true. ------------------------------------------------------------ -Goal Assertion 'Last_i' (file tests/wp_typed/user_init.i, line 121): +Goal Assertion 'Last_i' (file tests/wp_typed/user_init.i, line 123): Prove: true. ------------------------------------------------------------ -Goal Loop assigns 'lack,Zone_i' (1/3): +Goal Loop assigns 'tactic,Zone_i' (1/3): Prove: true. ------------------------------------------------------------ -Goal Loop assigns 'lack,Zone_i' (2/3): -Effect at line 109 +Goal Loop assigns 'tactic,Zone_i' (2/3): +Effect at line 111 Assume { Have: 0 <= i. Have: i <= 9. - Type: is_uint32(i_2). + Type: IsArray1_sint32(v) /\ is_uint32(i_2) /\ is_sint32(v_1) /\ + IsArray1_sint32(t2_0[i_2]). (* Goal *) When: (0 <= i_3) /\ (0 <= i_4) /\ (i_3 <= 9) /\ (i_4 <= 19). - (* Loop assigns 'lack,Zone_i' *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 <= 9) -> ((i_5 <= 19) -> (((i_6 < 0) \/ (10 <= i_6)) -> - (t2_0[i_6][i_5] = t2_1[i_6][i_5])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_6,i_5 : Z. ((0 <= i_5) -> ((0 <= i_6) -> ((i_6 < i_2) -> - ((i_5 <= 19) -> (t2_1[i_6][i_5] = v))))). + (t2_1[i_6][i_5] = t2_0[i_6][i_5])))))). + (* Invariant 'Partial_i' *) + Have: forall i_5 : Z. ((0 <= i_5) -> ((i_5 < i_2) -> + P_MemSet20(t2_0[i_5], 20, v_1))). (* Invariant 'Range_i' *) Have: (0 <= i_2) /\ (i_2 <= 10). (* Then *) Have: i_2 <= 9. (* Invariant 'Partial_j' *) - Have: forall i_5 : Z. ((0 <= i_5) -> ((i_5 <= 19) -> (v_1[i_5] = v))). + Have: P_MemSet20(v, 20, v_1). } Prove: exists i_6,i_5 : Z. (i_6 <= i) /\ (i_5 <= i_1) /\ (i_1 <= i_5) /\ (0 <= i_6) /\ (i <= i_6) /\ (i_6 <= 9). ------------------------------------------------------------ -Goal Loop assigns 'lack,Zone_i' (3/3): -Effect at line 115 +Goal Loop assigns 'tactic,Zone_i' (3/3): +Effect at line 117 Assume { - Type: is_uint32(i). + Type: IsArray1_sint32(v) /\ is_uint32(i) /\ is_sint32(v_1) /\ + IsArray1_sint32(t2_0[i]). (* Goal *) When: (0 <= i) /\ (0 <= i_1) /\ (i <= 9) /\ (i_1 <= 19). - (* Loop assigns 'lack,Zone_i' *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 <= 9) -> ((i_2 <= 19) -> (((i_3 < 0) \/ (10 <= i_3)) -> - (t2_0[i_3][i_2] = t2_1[i_3][i_2])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_3,i_2 : Z. ((0 <= i_2) -> ((0 <= i_3) -> ((i_3 < i) -> - ((i_2 <= 19) -> (t2_1[i_3][i_2] = v))))). + (t2_1[i_3][i_2] = t2_0[i_3][i_2])))))). + (* Invariant 'Partial_i' *) + Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 < i) -> + P_MemSet20(t2_0[i_2], 20, v_1))). (* Invariant 'Range_i' *) Have: i <= 10. (* Invariant 'Partial_j' *) - Have: forall i_2 : Z. ((0 <= i_2) -> ((i_2 <= 19) -> (v_1[i_2] = v))). + Have: P_MemSet20(v, 20, v_1). } Prove: exists i_3,i_2 : Z. (i_3 <= i) /\ (i_2 <= i_1) /\ (i_1 <= i_2) /\ (0 <= i_3) /\ (i <= i_3) /\ (i_3 <= 9). ------------------------------------------------------------ -Goal Loop assigns 'lack,Zone_j' (1/2): +Goal Loop assigns 'tactic,Zone_j' (1/2): Prove: true. ------------------------------------------------------------ -Goal Loop assigns 'lack,Zone_j' (2/2): -Effect at line 115 +Goal Loop assigns 'tactic,Zone_j' (2/2): +Effect at line 117 Prove: true. ------------------------------------------------------------ -Goal Assigns 'lack' in 'init_t2_v3' (1/2): -Effect at line 109 +Goal Assigns 'tactic' in 'init_t2_v3' (1/2): +Effect at line 111 Prove: true. ------------------------------------------------------------ -Goal Assigns 'lack' in 'init_t2_v3' (2/2): -Effect at line 109 +Goal Assigns 'tactic' in 'init_t2_v3' (2/2): +Effect at line 111 Assume { Have: 0 <= i_2. Have: 0 <= i_3. @@ -1968,7 +1989,7 @@ Assume { Have: i_3 <= 19. Have: 0 <= i. Have: i <= 9. - (* Loop assigns 'lack,Zone_i' *) + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> ((i_4 <= 19) -> (((i_5 < 0) \/ (10 <= i_5)) -> (t2_0[i_5][i_4] = t2_1[i_5][i_4])))))). @@ -1978,48 +1999,50 @@ Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ ------------------------------------------------------------ -Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 109): +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 111): Assume { - Type: is_uint32(i). - (* Loop assigns 'lack,Zone_i' *) + Type: IsArray1_sint32(v) /\ is_uint32(i) /\ is_sint32(v_1) /\ + IsArray1_sint32(t2_0[i]). + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> - (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> - ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (t2_1[i_2][i_1] = t2_0[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> + P_MemSet20(t2_0[i_1], 20, v_1))). (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. (* Invariant 'Partial_j' *) - Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 19) -> (v_1[i_1] = v))). + Have: P_MemSet20(v, 20, v_1). } Prove: i < to_uint32(1 + i). ------------------------------------------------------------ -Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 109): +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 111): Prove: true. ------------------------------------------------------------ -Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 115): +Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 117): Assume { - Type: is_uint32(i) /\ is_uint32(j). - (* Loop assigns 'lack,Zone_i' *) + Type: IsArray1_sint32(v) /\ is_uint32(i) /\ is_uint32(j) /\ + is_sint32(v_1) /\ IsArray1_sint32(t2_0[i]). + (* Loop assigns 'tactic,Zone_i' *) Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 <= 9) -> ((i_1 <= 19) -> (((i_2 < 0) \/ (10 <= i_2)) -> - (t2_0[i_2][i_1] = t2_1[i_2][i_1])))))). - (* Invariant 'lack,Partial_i' *) - Have: forall i_2,i_1 : Z. ((0 <= i_1) -> ((0 <= i_2) -> ((i_2 < i) -> - ((i_1 <= 19) -> (t2_1[i_2][i_1] = v))))). + (t2_1[i_2][i_1] = t2_0[i_2][i_1])))))). + (* Invariant 'Partial_i' *) + Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < i) -> + P_MemSet20(t2_0[i_1], 20, v_1))). (* Invariant 'Range_i' *) Have: (0 <= i) /\ (i <= 10). (* Then *) Have: i <= 9. (* Invariant 'Partial_j' *) - Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 < j) -> (v_1[i_1] = v))). + Have: P_MemSet20(v, j, v_1). (* Invariant 'Range_j' *) Have: (0 <= j) /\ (j <= 20). (* Then *) @@ -2029,7 +2052,7 @@ Prove: j < to_uint32(1 + j). ------------------------------------------------------------ -Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 115): +Goal Positivity of Loop variant at loop (file tests/wp_typed/user_init.i, line 117): Prove: true. ------------------------------------------------------------ diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.0.res.oracle index ea38a9018b4..476ee7df2e4 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.0.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.0.res.oracle @@ -8,7 +8,7 @@ [wp] [CFG] Goal init_t2_v2_exits : Valid (Unreachable) [wp] [CFG] Goal init_t2_v3_exits : Valid (Unreachable) [wp] Warning: Missing RTE guards -[wp] 89 goals scheduled +[wp] 91 goals scheduled [wp] [Alt-Ergo] Goal typed_init_ensures : Valid [wp] [Alt-Ergo] Goal typed_init_loop_invariant_Partial_preserved : Valid [wp] [Qed] Goal typed_init_loop_invariant_Partial_established : Valid @@ -86,10 +86,12 @@ [wp] [Alt-Ergo] Goal typed_init_t2_v2_loop_variant_2_decrease : Valid [wp] [Qed] Goal typed_init_t2_v2_loop_variant_2_positive : Valid [wp] [Alt-Ergo] Goal typed_init_t2_v3_ensures : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_invariant_Partial_i_preserved : Valid +[wp] [Qed] Goal typed_init_t2_v3_loop_invariant_Partial_i_established : Valid [wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_invariant_Range_i_preserved : Valid [wp] [Qed] Goal typed_init_t2_v3_loop_invariant_Range_i_established : Valid [wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_invariant_Partial_j_preserved : Valid -[wp] [Qed] Goal typed_init_t2_v3_loop_invariant_Partial_j_established : Valid +[wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_invariant_Partial_j_established : Valid [wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_invariant_Range_j_preserved : Valid [wp] [Qed] Goal typed_init_t2_v3_loop_invariant_Range_j_established : Valid [wp] [Qed] Goal typed_init_t2_v3_assert_Last_j : Valid @@ -98,9 +100,9 @@ [wp] [Qed] Goal typed_init_t2_v3_loop_variant_positive : Valid [wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_variant_2_decrease : Valid [wp] [Qed] Goal typed_init_t2_v3_loop_variant_2_positive : Valid -[wp] Proved goals: 89 / 89 +[wp] Proved goals: 91 / 91 Qed: 51 - Alt-Ergo: 38 + Alt-Ergo: 40 [wp] Report in: 'tests/wp_typed/oracle_qualif/user_init.0.report.json' [wp] Report out: 'tests/wp_typed/result_qualif/user_init.0.report.json' ------------------------------------------------------------- @@ -109,7 +111,7 @@ init 6 4 (80..104) 10 100% init_t1 6 4 (12..24) 10 100% init_t2_v1 9 8 (40..52) 17 100% init_t2_v2 9 8 (32..44) 17 100% -init_t2_v3 7 6 (16..28) 13 100% +init_t2_v3 7 8 (28..40) 15 100% init_t2_bis_v1 7 4 (208..256) 11 100% init_t2_bis_v2 7 4 (192..240) 11 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.1.res.oracle index 77c6f534fe6..ef5a6f0f00a 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.1.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.1.res.oracle @@ -8,10 +8,18 @@ [wp] [CFG] Goal init_t2_v2_exits : Valid (Unreachable) [wp] [CFG] Goal init_t2_v3_exits : Valid (Unreachable) [wp] Warning: Missing RTE guards -[wp] 8 goals scheduled +[wp] 23 goals scheduled +[wp] [Qed] Goal typed_init_t2_bis_v2_loop_assigns_part1 : Valid +[wp] Warning: creating session directory `tests/wp_typed/result_qualif/user_init-session-1' +[wp] Warning: creating session directory `tests/wp_typed/result_qualif/user_init-session-1/wp' +[wp] [Tactical] Goal typed_init_t2_bis_v2_loop_assigns_part2 : Valid +[wp] [Tactical] Goal typed_init_t2_bis_v2_loop_assigns_part3 : Valid +[wp] [Tactical] Goal typed_init_t2_bis_v2_assigns_exit_part1 : Valid +[wp] [Tactical] Goal typed_init_t2_bis_v2_assigns_exit_part2 : Valid +[wp] [Qed] Goal typed_init_t2_bis_v2_assigns_exit_part3 : Valid +[wp] [Tactical] Goal typed_init_t2_bis_v2_assigns_normal_part1 : Valid +[wp] [Tactical] Goal typed_init_t2_bis_v2_assigns_normal_part2 : Valid [wp] [Qed] Goal typed_init_t2_v2_loop_assigns_part1 : Valid -[wp] Warning: creating session directory `tests/wp_typed/result_qualif/user_init-session/test-1' -[wp] Warning: creating session directory `tests/wp_typed/result_qualif/user_init-session/test-1/wp' [wp] [Tactical] Goal typed_init_t2_v2_loop_assigns_part2 : Valid [wp] [Tactical] Goal typed_init_t2_v2_loop_assigns_part3 : Valid [wp] [Qed] Goal typed_init_t2_v2_loop_assigns_2_part1 : Valid @@ -19,14 +27,23 @@ [wp] [Tactical] Goal typed_init_t2_v2_loop_assigns_2_part3 : Valid [wp] [Tactical] Goal typed_init_t2_v2_assigns_part1 : Valid [wp] [Tactical] Goal typed_init_t2_v2_assigns_part2 : Valid -[wp] Proved goals: 8 / 8 - Qed: 3 - Alt-Ergo: 0 (unsuccess: 5) - Script: 5 -[wp] Updated session with 5 new valid scripts. +[wp] [Qed] Goal typed_init_t2_v3_loop_assigns_part1 : Valid +[wp] [Tactical] Goal typed_init_t2_v3_loop_assigns_part2 : Valid +[wp] [Tactical] Goal typed_init_t2_v3_loop_assigns_part3 : Valid +[wp] [Qed] Goal typed_init_t2_v3_loop_assigns_2_part1 : Valid +[wp] [Tactical] Goal typed_init_t2_v3_loop_assigns_2_part2 : Valid +[wp] [Tactical] Goal typed_init_t2_v3_assigns_part1 : Valid +[wp] [Tactical] Goal typed_init_t2_v3_assigns_part2 : Valid +[wp] Proved goals: 23 / 23 + Qed: 11 + Alt-Ergo: 0 (unsuccess: 12) + Script: 12 +[wp] Updated session with 12 new valid scripts. [wp] Report in: 'tests/wp_typed/oracle_qualif/user_init.1.report.json' [wp] Report out: 'tests/wp_typed/result_qualif/user_init.1.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success init_t2_v2 3 - (16..28) 8 100% +init_t2_v3 4 - (20..32) 7 100% +init_t2_bis_v2 4 - (28..40) 8 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.2.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.2.res.oracle index 910fde6d48c..17ce10c2bdd 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.2.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/user_init.2.res.oracle @@ -8,7 +8,7 @@ [wp] [CFG] Goal init_t2_v2_exits : Valid (Unreachable) [wp] [CFG] Goal init_t2_v3_exits : Valid (Unreachable) [wp] Warning: Missing RTE guards -[wp] 33 goals scheduled +[wp] 16 goals scheduled [wp] [Qed] Goal typed_init_t2_bis_v1_loop_assigns_part1 : Valid [wp] [Alt-Ergo] Goal typed_init_t2_bis_v1_loop_assigns_part2 : Unsuccess [wp] [Alt-Ergo] Goal typed_init_t2_bis_v1_loop_assigns_part3 : Unsuccess @@ -17,14 +17,6 @@ [wp] [Qed] Goal typed_init_t2_bis_v1_assigns_exit_part3 : Valid [wp] [Qed] Goal typed_init_t2_bis_v1_assigns_normal_part1 : Valid [wp] [Alt-Ergo] Goal typed_init_t2_bis_v1_assigns_normal_part2 : Unsuccess -[wp] [Qed] Goal typed_init_t2_bis_v2_loop_assigns_part1 : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_bis_v2_loop_assigns_part2 : Unsuccess -[wp] [Alt-Ergo] Goal typed_init_t2_bis_v2_loop_assigns_part3 : Unsuccess -[wp] [Qed] Goal typed_init_t2_bis_v2_assigns_exit_part1 : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_bis_v2_assigns_exit_part2 : Unsuccess -[wp] [Qed] Goal typed_init_t2_bis_v2_assigns_exit_part3 : Valid -[wp] [Qed] Goal typed_init_t2_bis_v2_assigns_normal_part1 : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_bis_v2_assigns_normal_part2 : Unsuccess [wp] [Qed] Goal typed_init_t2_v1_loop_assigns_part1 : Valid [wp] [Alt-Ergo] Goal typed_init_t2_v1_loop_assigns_part2 : Unsuccess [wp] [Alt-Ergo] Goal typed_init_t2_v1_loop_assigns_part3 : Unsuccess @@ -33,24 +25,13 @@ [wp] [Alt-Ergo] Goal typed_init_t2_v1_loop_assigns_2_part3 : Unsuccess [wp] [Qed] Goal typed_init_t2_v1_assigns_part1 : Valid [wp] [Alt-Ergo] Goal typed_init_t2_v1_assigns_part2 : Unsuccess -[wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_invariant_lack_Partial_i_preserved : Unsuccess -[wp] [Qed] Goal typed_init_t2_v3_loop_invariant_lack_Partial_i_established : Valid -[wp] [Qed] Goal typed_init_t2_v3_loop_assigns_part1 : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_assigns_part2 : Unsuccess -[wp] [Alt-Ergo] Goal typed_init_t2_v3_loop_assigns_part3 : Unsuccess -[wp] [Qed] Goal typed_init_t2_v3_loop_assigns_2_part1 : Valid -[wp] [Qed] Goal typed_init_t2_v3_loop_assigns_2_part2 : Valid -[wp] [Qed] Goal typed_init_t2_v3_assigns_part1 : Valid -[wp] [Alt-Ergo] Goal typed_init_t2_v3_assigns_part2 : Unsuccess -[wp] Proved goals: 16 / 33 - Qed: 16 - Alt-Ergo: 0 (unsuccess: 17) +[wp] Proved goals: 7 / 16 + Qed: 7 + Alt-Ergo: 0 (unsuccess: 9) [wp] Report in: 'tests/wp_typed/oracle_qualif/user_init.2.report.json' [wp] Report out: 'tests/wp_typed/result_qualif/user_init.2.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success init_t2_v1 3 - 8 37.5% -init_t2_v3 5 - 9 55.6% init_t2_bis_v1 4 - 8 50.0% -init_t2_bis_v2 4 - 8 50.0% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_typed/user_init.i b/src/plugins/wp/tests/wp_typed/user_init.i index 06f597c3d3a..a34d4664bb4 100644 --- a/src/plugins/wp/tests/wp_typed/user_init.i +++ b/src/plugins/wp/tests/wp_typed/user_init.i @@ -1,7 +1,7 @@ /* run.config_qualif - EXECNOW: rm -rf @PTEST_DIR@/result@PTEST_CONFIG@/@PTEST_NAME@-session/ + EXECNOW: rm -rf @PTEST_DIR@/result@PTEST_CONFIG@/@PTEST_NAME@-session-1/ OPT: -wp-prop=-lack,-tactic - OPT: -wp-prop=tactic -wp-auto=wp:split -session @PTEST_DIR@/result@PTEST_CONFIG@/@PTEST_NAME@-session/test-@PTEST_NUMBER@ + OPT: -wp-prop=tactic -wp-auto=wp:split -session @PTEST_DIR@/result@PTEST_CONFIG@/@PTEST_NAME@-session-@PTEST_NUMBER@ OPT: -wp-prop=lack -wp-steps 300 */ /*@ requires \valid(a+(0..n-1)) ; @@ -94,22 +94,24 @@ void init_t2_v2(int v) { ; } //------------------------- -/*@ ensures \forall integer k, l; 0 <= k < 10 && 0 <= l < 20 ==> t2[k][l] == v; +//@ predicate MemSet20(int t2[20], integer n, integer v) = n <= 20 && \forall integer k ; 0 <= k < n ==> t2[k] == v; + +/*@ ensures \forall integer k; 0 <= k < 10 ==> MemSet20(t2[k], 20, v); @ exits \false; - @ assigns lack: t2[..][..]; + @ assigns tactic: t2[..][..]; */ void init_t2_v3(int v) { unsigned i,j; - /*@ loop assigns lack: Zone_i: i, j, t2[..][..]; + /*@ loop assigns tactic: Zone_i: i, j, t2[..][..]; @ loop invariant Range_i: 0 <= i <= 10 ; - @ loop invariant lack: Partial_i: \forall integer k,l; 0 <= k < i && 0 <= l < 20 ==> t2[k][l] == v; + @ loop invariant Partial_i: \forall integer k; 0 <= k < i ==> MemSet20(t2[k], 20, v); @ loop variant V_i: 10 - i ; */ for(i = 0; i <= 9; i++) { - /*@ loop assigns lack: Zone_j: j, t2[i][..]; + /*@ loop assigns tactic: Zone_j: j, t2[i][..]; @ loop invariant Range_j: 0 <= j <= 20 ; - @ loop invariant Partial_j: \forall integer l; 0 <= l < j ==> t2[i][l] == v; + @ loop invariant Partial_j: MemSet20(t2[i], j, v); @ loop variant Decr_j: 20 - j ; */ for(j = 0; j <= 19; j++) { @@ -141,13 +143,13 @@ void init_t2_bis_v1(int v) { } //------------------------- /*@ ensures \forall integer k, l; 0 <= k < 10 && 0 <= l < 20 ==> t2[k][l] == v; - @ assigns lack: t2[..][..]; + @ assigns tactic: t2[..][..]; @ exits \false; */ void init_t2_bis_v2(int v) { unsigned i; - /*@ loop assigns lack: Zone: i, t2[..][..]; + /*@ loop assigns tactic: Zone: i, t2[..][..]; @ loop invariant Range: 0 <= i <= 10 ; @ loop invariant Partial: \forall integer k,l; 0 <= k < i && 0 <= l < 20 ==> t2[k][l] == v; @ loop variant Decr: 10 - i ; -- GitLab From d4b4e077488a4cbdf21b95950d149f59cc6ef0c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 4 Mar 2019 14:44:04 +0100 Subject: [PATCH 071/376] [Gui] Fixes the lablgtk3 support. --- src/plugins/gui/wbox.ml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/gui/wbox.ml b/src/plugins/gui/wbox.ml index b15c784631b..df6f6d12252 100644 --- a/src/plugins/gui/wbox.ml +++ b/src/plugins/gui/wbox.ml @@ -121,6 +121,10 @@ let split ~dir w1 w2 = in (splitter :> splitter) let scroll ?(hpolicy=`AUTOMATIC) ?(vpolicy=`AUTOMATIC) w = + (* Explicit conversion needed for lablgtk3, as policy_type has been extended + with another constructor but we still export the lablgtk2 type. *) + let vpolicy = (vpolicy :> Gtk.Tags.policy_type) in + let hpolicy = (hpolicy :> Gtk.Tags.policy_type) in let scrolled = GBin.scrolled_window ~vpolicy ~hpolicy () in scrolled#add_with_viewport w#coerce ; new Wutil.gobj_widget scrolled -- GitLab From 261d88500355a36759af84b5aee245f239795e88 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 4 Mar 2019 11:08:21 +0100 Subject: [PATCH 072/376] [opam] update dependencies wrt lablgtk3 --- opam/opam | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/opam/opam b/opam/opam index 1a4556250e9..3b5bfd175e4 100644 --- a/opam/opam +++ b/opam/opam @@ -66,7 +66,8 @@ build: [ ["autoconf"] {pinned} ["./configure" "--prefix" prefix "--disable-gui" { !conf-gtksourceview:installed | - !conf-gnomecanvas:installed } + ( !conf-gnomecanvas:installed & + !lablgtk3:installed) } "--mandir=%{man}%" ] [make "-j%{jobs}%"] @@ -88,9 +89,9 @@ depends: [ "ocamlfind" # needed beyond build stage, used by -load-module "zarith" "conf-autoconf" { build } - "lablgtk" { >= "2.18.2" } #for ocaml >= 4.02.1 + ( ( "lablgtk" { >= "2.18.2" } & "conf-gnomecanvas" ) + | ( "lablgtk3" { >= "3.0.beta4" } & "lablgtk3-sourceview3")) "conf-gtksourceview" - "conf-gnomecanvas" "alt-ergo" "conf-graphviz" { post } ] -- GitLab From 8541a3da997c5e50aa297d76e57030527737960b Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Tue, 19 Feb 2019 10:50:39 +0100 Subject: [PATCH 073/376] [kernel] fix initialization of built-ins in a visitor-created project Actually `create_from_visitor` was correct, but its sibling `init_project_from_visitor` wasn't if not called from `create_from_visitor` and is (erroneously?) exported in `file.mli` --- src/kernel_services/ast_queries/file.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/kernel_services/ast_queries/file.ml b/src/kernel_services/ast_queries/file.ml index 7621c2488ce..3e49d89eeee 100644 --- a/src/kernel_services/ast_queries/file.ml +++ b/src/kernel_services/ast_queries/file.ml @@ -1600,7 +1600,7 @@ let init_project_from_visitor ?(reorder=false) prj then Kernel.fatal "Visitor does not copy or does not operate on correct project."; - Project.on prj (fun () -> Cil.initCIL (fun () -> ()) (get_machdep ())) (); + Project.on prj init_cil (); let old_ast = Ast.get () in let ast = visitFramacFileCopy vis old_ast in let finalize ast = @@ -1637,7 +1637,6 @@ let create_project_from_visitor ?reorder ?(last=true) prj_name visitor = Project.copy ~selection:(Parameter_state.get_reset_selection ()) ~src:temp prj; Project.remove ~project:temp (); - Project.on prj init_cil (); prepare_from_visitor ?reorder prj visitor; prj -- GitLab From a75a0407a58b399d60da8c596236cdb3d1a41009 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Mon, 4 Mar 2019 15:52:40 +0100 Subject: [PATCH 074/376] [Makefile] add check for incompatible ocp-indent version --- Makefile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index be71d63e14e..50088960cb1 100644 --- a/Makefile +++ b/Makefile @@ -1754,12 +1754,24 @@ indent: $(INDENT_TARGET) lint: $(LINT_TARGET) +check-ocp-indent-version: + if command -v ocp-indent >/dev/null; then \ + $(eval ocp_version_major := $(shell ocp-indent --version | $(SED) -E "s/^([0-9]+)\.[0-9]+\..*/\1/")) \ + $(eval ocp_version_minor := $(shell ocp-indent --version | $(SED) -E "s/^[0-9]+\.([0-9]+)\..*/\1/")) \ + if [ "$(ocp_version_major)" -gt 1 -o "$(ocp_version_minor)" -gt 7 ]; then \ + echo "error: ocp-indent <1.7.0 required for linting (got $(ocp_version_major).$(ocp_version_minor))"; \ + exit 1; \ + fi; \ + else \ + exit 1; \ + fi; + fix-syntax: $(FIX_SYNTAX_TARGET) -$(INDENT_TARGET): %.indent: % +$(INDENT_TARGET): %.indent: % check-ocp-indent-version ocp-indent -i $< -$(LINT_TARGET): %.lint: % +$(LINT_TARGET): %.lint: % check-ocp-indent-version # See SO 1825552 on mixing grep and \t (and cry) # For OK_NL, we have three cases: # - for empty files, the computation boils down to 0 - 0 == 0 -- GitLab From 534da3f030a53416cd2c0d1028158aafc604b882 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@cea.fr> Date: Tue, 5 Mar 2019 09:07:49 +0100 Subject: [PATCH 075/376] Update Changelog --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index 7ebb7055d60..cf1998a40a5 100644 --- a/Changelog +++ b/Changelog @@ -17,6 +17,8 @@ Open Source Release <next-release> ################################## +-* Kernel [2019/03/05] Better detection of invalid goto in presence of VLA + (fixes #@499) -* Obfuscator [2019/02/26] Obfuscate logic types and logic constructors. - Eva [2019/01/10] Improved precision on nested loops (by postponing the widening on inner loops according to -eva-widening-period). -- GitLab From 22f8f9e4dbf24ec9bd00b07c0028797973762bfc Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Fri, 4 Jan 2019 11:23:24 +0100 Subject: [PATCH 076/376] [kernel] better handling of backjump gotos when inserting destructors Fixes #545 When deciding which variables must be destructed, we not only have to take into account the blocks that are closed by the current edge, but also the block that contains both the goto and its target: in the case of a backjump, we have to call the destructor of the variables that are jumped over --- src/kernel_services/analysis/destructors.ml | 36 ++++++++++++++----- .../ast_data/kernel_function.ml | 23 ++++++++++++ .../ast_data/kernel_function.mli | 8 +++++ .../vla_goto_same_block_above.res.oracle | 31 ++++++++++++++++ tests/syntax/vla_goto_same_block_above.i | 8 +++++ 5 files changed, 97 insertions(+), 9 deletions(-) create mode 100644 tests/syntax/oracle/vla_goto_same_block_above.res.oracle create mode 100644 tests/syntax/vla_goto_same_block_above.i diff --git a/src/kernel_services/analysis/destructors.ml b/src/kernel_services/analysis/destructors.ml index 6e9b5379c30..4b038045296 100644 --- a/src/kernel_services/analysis/destructors.ml +++ b/src/kernel_services/analysis/destructors.ml @@ -162,12 +162,7 @@ class vis flag = object(self) Cil.DoChildrenPost post method! vstmt_aux s = - let inspect_closed_blocks b = - (* blocks are sorted from innermost to outermost. The fold_left - will give us the list in appropriate order for add_destructors - which expects variable from oldest to newest. - *) - let vars = List.fold_left (fun acc b -> b.blocals @ acc) [] b in + let insert_destructors vars = let has_destructors, stmts = add_destructors vars in if has_destructors then begin flag:=true; @@ -184,6 +179,29 @@ class vis flag = object(self) end; Cil.SkipChildren in + let vars_from_blocks blocks = + List.fold_left (fun acc b -> b.blocals @ acc) [] blocks + in + let vars_from_edge s succ = + let closed_blocks = Kernel_function.blocks_closed_by_edge s succ in + (* blocks are sorted from innermost to outermost. The fold_left + will give us the list in appropriate order for add_destructors + which expects variable from oldest to newest. + *) + let current_block = Kernel_function.common_block s succ in + let vars = vars_from_blocks closed_blocks in + (* for the common block, we have to check whether we are backjumping + over some definitions in the middle of the block, that is + definitions that dominate s but not its successor. + *) + let is_backjump_var v = + v.vdefined && + let def = Cil.find_def_stmt current_block v in + Dominators.dominates def s && not (Dominators.dominates def succ) + in + let current_vars = List.filter is_backjump_var current_block.blocals in + current_vars @ vars + in let abort_if_non_trivial_type kind v = if Cil.hasAttribute Cabs2cil.frama_c_destructor v.vattr then Kernel.abort @@ -210,8 +228,7 @@ class vis flag = object(self) in let treat_jump_close s = match s.succs with - | [ succ ] -> - inspect_closed_blocks (Kernel_function.blocks_closed_by_edge s succ) + | [ succ ] -> insert_destructors (vars_from_edge s succ) | _ -> Kernel.fatal ~current:true "%a in function %a is expected to have a single successor" @@ -254,7 +271,8 @@ class vis flag = object(self) | Switch _ -> treat_jump_open "switch" s; Cil.DoChildren (* jump outside of the function: all currently opened blocks are closed. *) | Return _ | Throw _ -> - inspect_closed_blocks (Kernel_function.find_all_enclosing_blocks s) + insert_destructors + (vars_from_blocks (Kernel_function.find_all_enclosing_blocks s)) (* no jump yet, visit children *) | _ -> Cil.DoChildren diff --git a/src/kernel_services/ast_data/kernel_function.ml b/src/kernel_services/ast_data/kernel_function.ml index 8e876e4d23b..2081ea170f6 100644 --- a/src/kernel_services/ast_data/kernel_function.ml +++ b/src/kernel_services/ast_data/kernel_function.ml @@ -211,6 +211,29 @@ let find_all_enclosing_blocks s = let table = compute () in let (_,_,b) = Datatype.Int.Hashtbl.find table s.sid in b +let common_block s1 s2 = + let kf1 = find_englobing_kf s1 in + let kf2 = find_englobing_kf s2 in + if not (equal kf1 kf2) then + Kernel.fatal + "cannot find a common block for statements occurring \ + in two distinct functions"; + let b1 = find_all_enclosing_blocks s1 in + let b2 = find_all_enclosing_blocks s2 in + let rec aux last l1 l2 = + match l1,l2 with + | [], _ | _, [] -> last + | b1 :: l1, b2 :: l2 when b1 == b2 -> aux b1 l1 l2 + | _ :: _, _ :: _ -> last + in + match List.rev b1, List.rev b2 with + | [], _ | _, [] -> + Kernel.fatal "Statement not contained in any block" + | b1 :: l1, b2 :: l2 when b1 == b2 -> aux b1 l1 l2 + | _ :: _, _ :: _ -> + Kernel.fatal + "Statements do not share their function body as outermost common block" + let () = Globals.find_all_enclosing_blocks := find_all_enclosing_blocks let stmt_in_loop kf stmt = diff --git a/src/kernel_services/ast_data/kernel_function.mli b/src/kernel_services/ast_data/kernel_function.mli index 18c1dac1287..2ad53533773 100644 --- a/src/kernel_services/ast_data/kernel_function.mli +++ b/src/kernel_services/ast_data/kernel_function.mli @@ -108,6 +108,14 @@ val blocks_opened_by_edge: stmt -> stmt -> block list @raise Invalid_argument if [s2] is not a successor of [s1] in the cfg. @since Magnesium-20151001 *) +val common_block: stmt -> stmt -> block +(** [common_block s1 s2] returns the innermost block that contains + both [s1] and [s2], provided the statements belong to the same function. + raises a fatal error if this is not the case. + + @since Frama-C+dev +*) + val stmt_in_loop: t -> stmt -> bool (** [stmt_in_loop kf stmt] is [true] iff [stmt] strictly occurs in a loop of [kf]. diff --git a/tests/syntax/oracle/vla_goto_same_block_above.res.oracle b/tests/syntax/oracle/vla_goto_same_block_above.res.oracle new file mode 100644 index 00000000000..c1d5f999515 --- /dev/null +++ b/tests/syntax/oracle/vla_goto_same_block_above.res.oracle @@ -0,0 +1,31 @@ +[kernel] Parsing tests/syntax/vla_goto_same_block_above.i (no preprocessing) +/* Generated by Frama-C */ +int volatile nondet; +/*@ assigns \nothing; + frees p; */ + __attribute__((__FC_BUILTIN__)) void __fc_vla_free(void *p); + +/*@ assigns \result; + assigns \result \from \nothing; + allocates \result; */ + __attribute__((__FC_BUILTIN__)) void *__fc_vla_alloc(unsigned int size); + +int main(void) +{ + int __retres; + unsigned int __lengthof_vla; + int i = 42; + toto: ; + /*@ assert alloca_bounds: 0 < sizeof(char) * i ≤ 4294967295; */ ; + __lengthof_vla = (unsigned int)i; + char *vla = __fc_vla_alloc(sizeof(char) * __lengthof_vla); + if (nondet) { + __fc_vla_free((void *)vla); + goto toto; + } + __retres = 0; + __fc_vla_free((void *)vla); + return __retres; +} + + diff --git a/tests/syntax/vla_goto_same_block_above.i b/tests/syntax/vla_goto_same_block_above.i new file mode 100644 index 00000000000..01a7654b191 --- /dev/null +++ b/tests/syntax/vla_goto_same_block_above.i @@ -0,0 +1,8 @@ +volatile int nondet ; +int main() { + int i = 42 ; + toto : ; + char vla[i] ; + if (nondet) goto toto ; + return 0 ; +} -- GitLab From e5bdff4bc9e8c20b25e7bdd3ecb56d0051ddea9e Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Fri, 4 Jan 2019 11:35:44 +0100 Subject: [PATCH 077/376] [tests] more tests related to #545 --- .../vla_goto_same_block_above.res.oracle | 33 +++++++++++++++++++ tests/syntax/vla_goto_same_block_above.i | 16 +++++++++ 2 files changed, 49 insertions(+) diff --git a/tests/syntax/oracle/vla_goto_same_block_above.res.oracle b/tests/syntax/oracle/vla_goto_same_block_above.res.oracle index c1d5f999515..9d5bd2d88c8 100644 --- a/tests/syntax/oracle/vla_goto_same_block_above.res.oracle +++ b/tests/syntax/oracle/vla_goto_same_block_above.res.oracle @@ -28,4 +28,37 @@ int main(void) return __retres; } +int f(void) +{ + int __retres; + unsigned int __lengthof_vla; + int i = 42; + if (nondet) toto: ; + /*@ assert alloca_bounds: 0 < sizeof(char) * i ≤ 4294967295; */ ; + __lengthof_vla = (unsigned int)i; + char *vla = __fc_vla_alloc(sizeof(char) * __lengthof_vla); + if (nondet) { + __fc_vla_free((void *)vla); + goto toto; + } + __retres = 0; + __fc_vla_free((void *)vla); + return __retres; +} + +int g(void) +{ + int __retres; + unsigned int __lengthof_vla; + int i = 42; + /*@ assert alloca_bounds: 0 < sizeof(char) * i ≤ 4294967295; */ ; + __lengthof_vla = (unsigned int)i; + char *vla = __fc_vla_alloc(sizeof(char) * __lengthof_vla); + if (nondet) toto: ; + if (nondet) goto toto; + __retres = 0; + __fc_vla_free((void *)vla); + return __retres; +} + diff --git a/tests/syntax/vla_goto_same_block_above.i b/tests/syntax/vla_goto_same_block_above.i index 01a7654b191..11704dbc2a7 100644 --- a/tests/syntax/vla_goto_same_block_above.i +++ b/tests/syntax/vla_goto_same_block_above.i @@ -6,3 +6,19 @@ int main() { if (nondet) goto toto ; return 0 ; } + +int f() { + int i = 42 ; + if (nondet) { toto : ; } + char vla[i] ; + if (nondet) goto toto ; + return 0 ; +} + +int g() { + int i = 42 ; + char vla[i] ; + if (nondet) { toto : ; } + if (nondet) goto toto ; + return 0 ; +} -- GitLab From 2630d543a64f121657172c7e2d5f9215f6b6d6dd Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Fri, 4 Jan 2019 15:00:53 +0100 Subject: [PATCH 078/376] [kernel] better handling of ill-formed goto jumping over vla dual of issue #545 --- src/kernel_services/analysis/destructors.ml | 93 ++++++++++++++++--- .../vla_goto_same_block_below.res.oracle | 3 + tests/syntax/vla_goto_same_block_below.i | 15 +++ 3 files changed, 96 insertions(+), 15 deletions(-) create mode 100644 tests/syntax/oracle/vla_goto_same_block_below.res.oracle create mode 100644 tests/syntax/vla_goto_same_block_below.i diff --git a/src/kernel_services/analysis/destructors.ml b/src/kernel_services/analysis/destructors.ml index 4b038045296..63b6f95e1b1 100644 --- a/src/kernel_services/analysis/destructors.ml +++ b/src/kernel_services/analysis/destructors.ml @@ -22,6 +22,71 @@ open Cil_types +let find_stmt_in_block b s = + let has_stmt l = + List.exists (fun (s',_,_,_,_) -> Cil_datatype.Stmt.equal s s') l + in + let rec aux = function + | [] -> + Kernel.fatal "statement %a is not inside block@\n%a" + Printer.pp_stmt s Printer.pp_block b + | s' :: _ when Cil_datatype.Stmt.equal s s' -> s' + | { skind = UnspecifiedSequence l } as s':: _ when has_stmt l -> s' + | _ :: l -> aux l + in aux b.bstmts + +let find_stmt_of_block outer inner = + let rec is_stmt_of_block s = + match s.skind with + | Block b -> b == inner + | If (_,b1,b2,_) -> b1 == inner || b2 == inner + | Switch (_,b,_,_) -> b == inner + | Loop (_,b,_,_,_) -> b == inner + | UnspecifiedSequence l -> is_stmt_of_unspecified l + | TryCatch (b, l, _) -> + b == inner || List.exists (fun (_,b) -> b == inner) l + | TryFinally (b1,b2,_) -> b1 == inner || b2 == inner + | TryExcept (b1,_,b2,_) -> b1 == inner || b2 == inner + | _ -> false + and is_stmt_of_unspecified l = + List.exists (fun (s,_,_,_,_) -> is_stmt_of_block s) l + in + try + List.find is_stmt_of_block outer.bstmts + with Not_found -> + Kernel.fatal "inner block@\n%a@\nis not a direct child of outer block@\n%a" + Printer.pp_block inner Printer.pp_block outer + +let find_direct_enclosing b s = + let blocks = Kernel_function.find_all_enclosing_blocks s in + let rec aux prev l = + match l, prev with + | [], _ -> + Kernel.fatal "statement %a is not part of block@\n%a" + Printer.pp_stmt s Printer.pp_block b + | b' :: _, None when b' == b -> find_stmt_in_block b s + | b' :: _, Some prev when b' == b -> find_stmt_of_block b prev + | b' :: l, _ -> aux (Some b') l + in + aux None blocks + +let is_between b s1 s2 s3 = + let s1 = find_direct_enclosing b s1 in + let s2 = find_direct_enclosing b s2 in + let s3 = find_direct_enclosing b s3 in + let rec aux has_s1 l = + match l with + | [] -> + Kernel.fatal + "Unexpected end of block while looking for %a" + Printer.pp_stmt s3 + | s :: l when Cil_datatype.Stmt.equal s s1 -> aux true l + | s :: _ when Cil_datatype.Stmt.equal s s2 -> has_s1 + | s :: _ when Cil_datatype.Stmt.equal s s3 -> false + | _ :: l -> aux has_s1 l + in + aux false b.bstmts + let add_destructor (_, l as acc) var = let loc = var.vdecl in match Cil.findAttribute Cabs2cil.frama_c_destructor var.vattr with @@ -226,6 +291,14 @@ class vis flag = object(self) let inspect_local_vars kind b s lv = List.iter (check_def_domination kind b s) lv in + let inspect_var_current_block kind b s succ v = + if v.vdefined then begin + let def = Cil.find_def_stmt b v in + if is_between b s def succ then + (* we are forward-jumping over def *) + abort_if_non_trivial_type kind v + end else abort_if_non_trivial_type kind v + in let treat_jump_close s = match s.succs with | [ succ ] -> insert_destructors (vars_from_edge s succ) @@ -238,21 +311,11 @@ class vis flag = object(self) let treat_succ_open kind s succ = (* The jump must not bypass a vla initialization in the opened blocks. *) let blocks = Kernel_function.blocks_opened_by_edge s succ in - if blocks <> [] - then List.iter (fun b -> inspect_local_vars kind b succ b.blocals) blocks - else begin - (* If there is no opened block, check that the jump does not bypass a - vla initialization in the destination block. [s] is in this block. *) - let block = Kernel_function.find_enclosing_block succ in - (* Does the definition of variable [v] dominates the statement [s]? *) - let dominate_s v = - v.vdefined && Dominators.dominates (Cil.find_def_stmt block v) s - in - (* Only consider variables defined after statement [s]. *) - let lvs = List.filter (fun v -> not (dominate_s v)) block.blocals in - (* Check that they are not defined before statement [succ]. *) - inspect_local_vars kind block succ lvs - end + let current_block = Kernel_function.common_block s succ in + List.iter (fun b -> inspect_local_vars kind b succ b.blocals) blocks; + List.iter + (inspect_var_current_block kind current_block s succ) + current_block.blocals in let treat_jump_open k s = List.iter (treat_succ_open k s) s.succs in match s.skind with diff --git a/tests/syntax/oracle/vla_goto_same_block_below.res.oracle b/tests/syntax/oracle/vla_goto_same_block_below.res.oracle new file mode 100644 index 00000000000..b61b6e96000 --- /dev/null +++ b/tests/syntax/oracle/vla_goto_same_block_below.res.oracle @@ -0,0 +1,3 @@ +[kernel] Parsing tests/syntax/vla_goto_same_block_below.i (no preprocessing) +[kernel] User Error: tests/syntax/vla_goto_same_block_below.i:6, cannot jump from goto statement bypassing initialization of variable vla, declared at tests/syntax/vla_goto_same_block_below.i:9 +[kernel] Frama-C aborted: invalid user input. diff --git a/tests/syntax/vla_goto_same_block_below.i b/tests/syntax/vla_goto_same_block_below.i new file mode 100644 index 00000000000..3e163f3bb82 --- /dev/null +++ b/tests/syntax/vla_goto_same_block_below.i @@ -0,0 +1,15 @@ +volatile int nondet ; + +int main() { + +int i = 42; +if (nondet) goto toto; // KO: we are jumping over + // a constructor/destructor definition + +char vla[i]; + +toto: ; + +return 0; + +} -- GitLab From 7a56dbbc49fc6115d32aae7c8b56d678c0c153e8 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 4 Mar 2019 19:24:49 +0100 Subject: [PATCH 079/376] [kernel] export new auxiliary functions in Kernel_function --- src/kernel_services/analysis/destructors.ml | 67 +------------------ .../ast_data/kernel_function.ml | 65 ++++++++++++++++++ .../ast_data/kernel_function.mli | 23 ++++++- 3 files changed, 88 insertions(+), 67 deletions(-) diff --git a/src/kernel_services/analysis/destructors.ml b/src/kernel_services/analysis/destructors.ml index 63b6f95e1b1..bf294953575 100644 --- a/src/kernel_services/analysis/destructors.ml +++ b/src/kernel_services/analysis/destructors.ml @@ -22,71 +22,6 @@ open Cil_types -let find_stmt_in_block b s = - let has_stmt l = - List.exists (fun (s',_,_,_,_) -> Cil_datatype.Stmt.equal s s') l - in - let rec aux = function - | [] -> - Kernel.fatal "statement %a is not inside block@\n%a" - Printer.pp_stmt s Printer.pp_block b - | s' :: _ when Cil_datatype.Stmt.equal s s' -> s' - | { skind = UnspecifiedSequence l } as s':: _ when has_stmt l -> s' - | _ :: l -> aux l - in aux b.bstmts - -let find_stmt_of_block outer inner = - let rec is_stmt_of_block s = - match s.skind with - | Block b -> b == inner - | If (_,b1,b2,_) -> b1 == inner || b2 == inner - | Switch (_,b,_,_) -> b == inner - | Loop (_,b,_,_,_) -> b == inner - | UnspecifiedSequence l -> is_stmt_of_unspecified l - | TryCatch (b, l, _) -> - b == inner || List.exists (fun (_,b) -> b == inner) l - | TryFinally (b1,b2,_) -> b1 == inner || b2 == inner - | TryExcept (b1,_,b2,_) -> b1 == inner || b2 == inner - | _ -> false - and is_stmt_of_unspecified l = - List.exists (fun (s,_,_,_,_) -> is_stmt_of_block s) l - in - try - List.find is_stmt_of_block outer.bstmts - with Not_found -> - Kernel.fatal "inner block@\n%a@\nis not a direct child of outer block@\n%a" - Printer.pp_block inner Printer.pp_block outer - -let find_direct_enclosing b s = - let blocks = Kernel_function.find_all_enclosing_blocks s in - let rec aux prev l = - match l, prev with - | [], _ -> - Kernel.fatal "statement %a is not part of block@\n%a" - Printer.pp_stmt s Printer.pp_block b - | b' :: _, None when b' == b -> find_stmt_in_block b s - | b' :: _, Some prev when b' == b -> find_stmt_of_block b prev - | b' :: l, _ -> aux (Some b') l - in - aux None blocks - -let is_between b s1 s2 s3 = - let s1 = find_direct_enclosing b s1 in - let s2 = find_direct_enclosing b s2 in - let s3 = find_direct_enclosing b s3 in - let rec aux has_s1 l = - match l with - | [] -> - Kernel.fatal - "Unexpected end of block while looking for %a" - Printer.pp_stmt s3 - | s :: l when Cil_datatype.Stmt.equal s s1 -> aux true l - | s :: _ when Cil_datatype.Stmt.equal s s2 -> has_s1 - | s :: _ when Cil_datatype.Stmt.equal s s3 -> false - | _ :: l -> aux has_s1 l - in - aux false b.bstmts - let add_destructor (_, l as acc) var = let loc = var.vdecl in match Cil.findAttribute Cabs2cil.frama_c_destructor var.vattr with @@ -294,7 +229,7 @@ class vis flag = object(self) let inspect_var_current_block kind b s succ v = if v.vdefined then begin let def = Cil.find_def_stmt b v in - if is_between b s def succ then + if Kernel_function.is_between b s def succ then (* we are forward-jumping over def *) abort_if_non_trivial_type kind v end else abort_if_non_trivial_type kind v diff --git a/src/kernel_services/ast_data/kernel_function.ml b/src/kernel_services/ast_data/kernel_function.ml index 2081ea170f6..35ee82a3805 100644 --- a/src/kernel_services/ast_data/kernel_function.ml +++ b/src/kernel_services/ast_data/kernel_function.ml @@ -211,6 +211,71 @@ let find_all_enclosing_blocks s = let table = compute () in let (_,_,b) = Datatype.Int.Hashtbl.find table s.sid in b +let find_stmt_in_block b s = + let has_stmt l = + List.exists (fun (s',_,_,_,_) -> Cil_datatype.Stmt.equal s s') l + in + let rec aux = function + | [] -> + Kernel.fatal "statement %a is not inside block@\n%a" + Cil_printer.pp_stmt s Cil_printer.pp_block b + | s' :: _ when Cil_datatype.Stmt.equal s s' -> s' + | { skind = UnspecifiedSequence l } as s':: _ when has_stmt l -> s' + | _ :: l -> aux l + in aux b.bstmts + +let find_stmt_of_block outer inner = + let rec is_stmt_of_block s = + match s.skind with + | Block b -> b == inner + | If (_,b1,b2,_) -> b1 == inner || b2 == inner + | Switch (_,b,_,_) -> b == inner + | Loop (_,b,_,_,_) -> b == inner + | UnspecifiedSequence l -> is_stmt_of_unspecified l + | TryCatch (b, l, _) -> + b == inner || List.exists (fun (_,b) -> b == inner) l + | TryFinally (b1,b2,_) -> b1 == inner || b2 == inner + | TryExcept (b1,_,b2,_) -> b1 == inner || b2 == inner + | _ -> false + and is_stmt_of_unspecified l = + List.exists (fun (s,_,_,_,_) -> is_stmt_of_block s) l + in + try + List.find is_stmt_of_block outer.bstmts + with Not_found -> + Kernel.fatal "inner block@\n%a@\nis not a direct child of outer block@\n%a" + Cil_printer.pp_block inner Cil_printer.pp_block outer + +let find_enclosing_stmt_in_block b s = + let blocks = find_all_enclosing_blocks s in + let rec aux prev l = + match l, prev with + | [], _ -> + Kernel.fatal "statement %a is not part of block@\n%a" + Cil_printer.pp_stmt s Cil_printer.pp_block b + | b' :: _, None when b' == b -> find_stmt_in_block b s + | b' :: _, Some prev when b' == b -> find_stmt_of_block b prev + | b' :: l, _ -> aux (Some b') l + in + aux None blocks + +let is_between b s1 s2 s3 = + let s1 = find_enclosing_stmt_in_block b s1 in + let s2 = find_enclosing_stmt_in_block b s2 in + let s3 = find_enclosing_stmt_in_block b s3 in + let rec aux has_s1 l = + match l with + | [] -> + Kernel.fatal + "Unexpected end of block while looking for %a" + Cil_printer.pp_stmt s3 + | s :: l when Cil_datatype.Stmt.equal s s1 -> aux true l + | s :: _ when Cil_datatype.Stmt.equal s s2 -> has_s1 + | s :: _ when Cil_datatype.Stmt.equal s s3 -> false + | _ :: l -> aux has_s1 l + in + aux false b.bstmts + let common_block s1 s2 = let kf1 = find_englobing_kf s1 in let kf2 = find_englobing_kf s2 in diff --git a/src/kernel_services/ast_data/kernel_function.mli b/src/kernel_services/ast_data/kernel_function.mli index 2ad53533773..dc999bb6dc8 100644 --- a/src/kernel_services/ast_data/kernel_function.mli +++ b/src/kernel_services/ast_data/kernel_function.mli @@ -117,7 +117,7 @@ val common_block: stmt -> stmt -> block *) val stmt_in_loop: t -> stmt -> bool - (** [stmt_in_loop kf stmt] is [true] iff [stmt] strictly + (** [stmt_in_loop kf stmt] is [true] iff [stmt] strictly occurs in a loop of [kf]. @since Oxygen-20120901 *) @@ -143,6 +143,27 @@ val var_is_in_scope: stmt -> varinfo -> bool @since Frama-C+dev *) +val find_enclosing_stmt_in_block: block -> stmt -> stmt + (** [find_enclosing_stmt_in_block b s] returns the statements [s'] + inside [b.bstmts] that contains [s]. It might be [s] itself, but also + an inner block (recursively) containing [s]. + + @raise AbortFatal if [b] is not equal to [find_enclosing_block s] + @since Frama-C+dev + *) + +val is_between: block -> stmt -> stmt -> stmt -> bool +(** [is_between b s1 s2 s3] returns [true] if the statement [s2] appears + between [s1] and [s3] inside the [b.bstmts] list. All three statements + must actually occur in [b.bstmts], either directly or indirectly + (see {!Kernel_function.find_enclosing_stmt_in_block}). + + @raise AbortFatal if pre-conditions are not met. + + @since Frama-C+dev +*) + + (* ************************************************************************* *) (** {2 Checkers} *) (* ************************************************************************* *) -- GitLab From 30cee39507a77014922ba1295d9e72eca436e49a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 25 Feb 2019 17:15:07 +0100 Subject: [PATCH 080/376] [Kernel] New assertion kind: Assert or Check. Asserts are both evaluated and used as hypotheses afterwards. Checks are only evaluated, but are not used as hypotheses: they must not affect the analyses. --- src/kernel_internals/parsing/logic_lexer.mll | 1 + src/kernel_internals/parsing/logic_parser.mly | 8 ++- src/kernel_internals/typing/cabs2cil.ml | 4 +- src/kernel_internals/typing/cfg.ml | 8 ++- src/kernel_internals/typing/oneret.ml | 2 +- .../analysis/interpreted_automata.ml | 5 +- src/kernel_services/analysis/logic_interp.ml | 2 +- src/kernel_services/ast_data/alarms.ml | 2 +- src/kernel_services/ast_data/annotations.ml | 10 +++- src/kernel_services/ast_data/annotations.mli | 6 ++ src/kernel_services/ast_data/cil_types.mli | 8 ++- src/kernel_services/ast_data/property.ml | 11 ++-- .../ast_printing/cil_printer.ml | 7 ++- .../ast_printing/cil_types_debug.ml | 8 ++- .../ast_printing/description.ml | 20 +++++-- .../ast_printing/logic_print.ml | 9 ++- src/kernel_services/ast_queries/cil.ml | 4 +- .../ast_queries/cil_datatype.ml | 2 +- src/kernel_services/ast_queries/filecheck.ml | 2 +- .../ast_queries/logic_typing.ml | 7 ++- .../ast_queries/logic_utils.ml | 12 ++-- .../ast_queries/logic_utils.mli | 1 + .../ast_transformations/filter.ml | 2 +- src/kernel_services/parsetree/logic_ptree.mli | 4 +- src/plugins/scope/datascope.ml | 4 +- src/plugins/value/alarmset.ml | 2 +- src/plugins/value/engine/transfer_logic.ml | 59 ++++++++++--------- src/plugins/value/gui_files/gui_red.ml | 2 +- src/plugins/value/gui_files/register_gui.ml | 4 +- src/plugins/value/legacy/eval_annots.ml | 7 ++- src/plugins/wp/wpAnnot.ml | 4 +- src/plugins/wp/wpPropId.ml | 4 +- tests/syntax/syntactic_hook.ml | 2 +- 33 files changed, 151 insertions(+), 82 deletions(-) diff --git a/src/kernel_internals/parsing/logic_lexer.mll b/src/kernel_internals/parsing/logic_lexer.mll index c02a1269642..f06f0573b63 100644 --- a/src/kernel_internals/parsing/logic_lexer.mll +++ b/src/kernel_internals/parsing/logic_lexer.mll @@ -94,6 +94,7 @@ "breaks", BREAKS, false; "case", CASE, true; "char", CHAR, true; + "check", CHECK, false; "complete", COMPLETE, false; "const", CONST, true; "continues", CONTINUES, false; diff --git a/src/kernel_internals/parsing/logic_parser.mly b/src/kernel_internals/parsing/logic_parser.mly index 489cf83599c..4f81bcc7f24 100644 --- a/src/kernel_internals/parsing/logic_parser.mly +++ b/src/kernel_internals/parsing/logic_parser.mly @@ -247,7 +247,7 @@ %token ALLOCATION STATIC REGISTER AUTOMATIC DYNAMIC UNALLOCATED %token ALLOCABLE FREEABLE FRESH %token DOLLAR QUESTION MINUS PLUS STAR AMP SLASH PERCENT LSQUARE RSQUARE EOF -%token GLOBAL INVARIANT VARIANT DECREASES FOR LABEL ASSERT SEMICOLON NULL EMPTY +%token GLOBAL INVARIANT VARIANT DECREASES FOR LABEL ASSERT CHECK SEMICOLON NULL EMPTY %token REQUIRES ENSURES ALLOCATES FREES ASSIGNS LOOP NOTHING SLICE IMPACT PRAGMA FROM %token <string> EXT_CODE_ANNOT EXT_GLOBAL EXT_CONTRACT %token EXITS BREAKS CONTINUES RETURNS @@ -1430,6 +1430,7 @@ beg_pragma_or_code_annotation: | SLICE {} | FOR {} | ASSERT {} +| CHECK {} | INVARIANT {} | EXT_CODE_ANNOT {} ; @@ -1442,7 +1443,9 @@ pragma_or_code_annotation: code_annotation: | ASSERT full_lexpr SEMICOLON - { fun bhvs -> AAssert (bhvs,$2) } + { fun bhvs -> AAssert (bhvs,Assert,$2) } +| CHECK full_lexpr SEMICOLON + { fun bhvs -> AAssert (bhvs,Check,$2) } | INVARIANT full_lexpr SEMICOLON { fun bhvs -> AInvariant (bhvs,false,$2) } | EXT_CODE_ANNOT grammar_extension SEMICOLON { fun bhvs -> @@ -1837,6 +1840,7 @@ is_acsl_decl_or_code_annot: | EXT_GLOBAL { $1 } | ASSUMES { "assumes" } | ASSERT { "assert" } +| CHECK { "check" } | GLOBAL { "global" } | IMPACT { "impact" } | INDUCTIVE { "inductive" } diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index eb3177307c5..320b570ab51 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -8605,7 +8605,7 @@ and createLocal ghost ((_, sto, _, _) as specs) let alloca_bounds = Logic_const.pand ~loc:castloc (pos_size, max_size) in let alloca_bounds = { alloca_bounds with pred_name = ["alloca_bounds"] } in let annot = - Logic_const.new_code_annotation (AAssert ([], alloca_bounds)) + Logic_const.new_code_annotation (AAssert ([], Assert, alloca_bounds)) in (mkStmtOneInstr ~ghost ~valid_sid (Code_annot (annot, castloc)), @@ -9125,7 +9125,7 @@ and doDecl local_env (isglobal: bool) : A.definition -> chunk = function let pfalse = { pfalse with pred_name = ["missing_return"] } in let assert_false () = let annot = - Logic_const.new_code_annotation (AAssert ([], pfalse)) + Logic_const.new_code_annotation (AAssert ([], Assert, pfalse)) in Cil.mkStmt ~ghost ~valid_sid (Instr(Code_annot(annot,loc))) in diff --git a/src/kernel_internals/typing/cfg.ml b/src/kernel_internals/typing/cfg.ml index f306e079834..2d52020ae40 100644 --- a/src/kernel_internals/typing/cfg.ml +++ b/src/kernel_internals/typing/cfg.ml @@ -474,7 +474,9 @@ let xform_switch_block ?(keepSwitch=false) b = xform_switch_stmt rest break_dest cont_dest label_index 0 | p -> - let a = Logic_const.new_code_annotation (AAssert ([],p)) in + let a = + Logic_const.new_code_annotation (AAssert ([], Assert, p)) + in let assertion = mkStmt (Instr(Code_annot(a,l))) in popn popstack; assertion:: s :: @@ -495,7 +497,9 @@ let xform_switch_block ?(keepSwitch=false) b = xform_switch_stmt rest break_dest cont_dest label_index 0 | p -> - let a = Logic_const.new_code_annotation (AAssert([],p)) in + let a = + Logic_const.new_code_annotation (AAssert ([], Assert, p)) + in let assertion = mkStmt (Instr(Code_annot(a,l))) in popn popstack; assertion :: s :: diff --git a/src/kernel_internals/typing/oneret.ml b/src/kernel_internals/typing/oneret.ml index 7f2887414b8..ec872584b89 100644 --- a/src/kernel_internals/typing/oneret.ml +++ b/src/kernel_internals/typing/oneret.ml @@ -315,7 +315,7 @@ let oneret ?(callback: callback option) (f: fundec) : unit = match !returns_assert with | { pred_content = Ptrue } -> [s; sg] | p -> - let a = Logic_const.new_code_annotation (AAssert ([],p)) in + let a = Logic_const.new_code_annotation (AAssert ([],Assert,p)) in let sta = mkStmt (Instr (Code_annot (a,loc))) in if callback<>None then ( let gclause = sta , a in diff --git a/src/kernel_services/analysis/interpreted_automata.ml b/src/kernel_services/analysis/interpreted_automata.ml index 7038bbce318..fd73d9c1eb2 100644 --- a/src/kernel_services/analysis/interpreted_automata.ml +++ b/src/kernel_services/analysis/interpreted_automata.ml @@ -206,7 +206,7 @@ let variant_predicate stmt v = Logic_const.pand ~loc (pred1, pred2) let supported_annotation annot = match annot.annot_content with - | AAssert ([], _) + | AAssert ([], _, _) | AInvariant ([], _, _) | AVariant (_, None) -> true | _ -> false (* TODO *) @@ -216,7 +216,8 @@ let code_annot = Annotations.code_annot ~filter:supported_annotation let make_annotation kf stmt annot labels = let kind, pred = match annot.annot_content with - | AAssert ([], pred) -> Assert, pred + | AAssert ([], Cil_types.Assert, pred) -> Assert, pred + | AAssert ([], Cil_types.Check, pred) -> Check, pred | AInvariant ([], _, pred) -> Invariant, pred | AVariant (v, None) -> Assert, variant_predicate stmt v | _ -> assert false diff --git a/src/kernel_services/analysis/logic_interp.ml b/src/kernel_services/analysis/logic_interp.ml index e8af8bc2a58..0baf4c9f58f 100644 --- a/src/kernel_services/analysis/logic_interp.ml +++ b/src/kernel_services/analysis/logic_interp.ml @@ -947,7 +947,7 @@ to function contracts." (* to preserve the effect of the statement *) pragmas := { !pragmas with stmt = Stmt.Set.add ki !pragmas.stmt} - | AAssert (_behav,pred) -> + | AAssert (_behav,_,pred) -> (* to preserve the interpretation of the assertion *) get_zone_from_pred ki pred; | AInvariant (_behav,true,pred) -> (* loop invariant *) diff --git a/src/kernel_services/ast_data/alarms.ml b/src/kernel_services/ast_data/alarms.ml index a33a5047ef4..248d57078c0 100644 --- a/src/kernel_services/ast_data/alarms.ml +++ b/src/kernel_services/ast_data/alarms.ml @@ -669,7 +669,7 @@ let to_annot_aux kinstr ?(loc=Kinstr.loc kinstr) alarm = (* Kernel.debug "registering alarm %a" D.pretty alarm;*) let add alarm = let pred = create_predicate ~loc alarm in - Logic_const.new_code_annotation (AAssert([], pred)) + Logic_const.new_code_annotation (AAssert([], Assert, pred)) in try let by_emitter = State.find kinstr in diff --git a/src/kernel_services/ast_data/annotations.ml b/src/kernel_services/ast_data/annotations.ml index 8051b863e0d..684fcea7ce2 100644 --- a/src/kernel_services/ast_data/annotations.ml +++ b/src/kernel_services/ast_data/annotations.ml @@ -1072,8 +1072,8 @@ let add_code_annot emitter ?kf stmt ca = let kf = find_englobing_kf ?kf stmt in let convert a = match a.annot_content with - | AAssert(l, p) -> - let a = { a with annot_content=AAssert(l,extend_name emitter p) } in + | AAssert(l, kind, p) -> + let a = { a with annot_content=AAssert(l,kind,extend_name emitter p) } in a, Property.ip_of_code_annot kf stmt a | AInvariant(l, b, p) -> let a={a with annot_content=AInvariant(l,b,extend_name emitter p)} in @@ -1270,7 +1270,11 @@ let add_code_annot emitter ?kf stmt ca = Code_annots.add stmt tbl let add_assert e ?kf stmt a = - let a = Logic_const.new_code_annotation (AAssert ([],a)) in + let a = Logic_const.new_code_annotation (AAssert ([],Assert,a)) in + add_code_annot e ?kf stmt a + +let add_check e ?kf stmt a = + let a = Logic_const.new_code_annotation (AAssert ([],Check,a)) in add_code_annot e ?kf stmt a (** {3 Adding globals} *) diff --git a/src/kernel_services/ast_data/annotations.mli b/src/kernel_services/ast_data/annotations.mli index 3252d40e661..8e23a13514b 100644 --- a/src/kernel_services/ast_data/annotations.mli +++ b/src/kernel_services/ast_data/annotations.mli @@ -281,6 +281,12 @@ val add_assert: provided, the function runs faster. @plugin development guide *) +val add_check: + Emitter.t -> ?kf:kernel_function -> stmt -> predicate -> unit +(** Add a checking assertion attached to the given statement. If [kf] is + provided, the function runs faster. + @plugin development guide *) + val add_global: Emitter.t -> global_annotation -> unit (** Add a new global annotation into the program. *) diff --git a/src/kernel_services/ast_data/cil_types.mli b/src/kernel_services/ast_data/cil_types.mli index f0eb6d86d0a..9ca6bee8460 100644 --- a/src/kernel_services/ast_data/cil_types.mli +++ b/src/kernel_services/ast_data/cil_types.mli @@ -1739,11 +1739,17 @@ and pragma = | Slice_pragma of slice_pragma | Impact_pragma of impact_pragma +(** Kind of an assertion: + - an assert is both evaluated and used as hypothesis afterwards; + - a check is only evaluated, but is not used as an hypothesis: it does not + affect the analyses. *) +and assertion_kind = Assert | Check + (** all annotations that can be found in the code. This type shares the name of its constructors with {!Logic_ptree.code_annot}. *) and code_annotation_node = - | AAssert of string list * predicate + | AAssert of string list * assertion_kind * predicate (** assertion to be checked. The list of strings is the list of behaviors to which this assertion applies. *) diff --git a/src/kernel_services/ast_data/property.ml b/src/kernel_services/ast_data/property.ml index ccba7c4f34b..2b35d02c825 100644 --- a/src/kernel_services/ast_data/property.ml +++ b/src/kernel_services/ast_data/property.ml @@ -628,7 +628,7 @@ let rec short_pretty fmt p = match p with | IPDisjoint (kf,_,_,_) -> Format.fprintf fmt "disjoint clause in function %a" Kernel_function.pretty kf - | IPCodeAnnot (_,_,{ annot_content = AAssert (_, { pred_name = name :: _ })}) -> + | IPCodeAnnot (_,_,{ annot_content = AAssert (_, _, { pred_name = name :: _ })}) -> Format.pp_print_string fmt name | IPCodeAnnot(_,_,{annot_content = AInvariant (_,_, { pred_name = name :: _ })})-> @@ -845,7 +845,7 @@ struct let pp_code_annot_names fmt ca = match ca.annot_content with - | AAssert(for_bhv,named_pred) | AInvariant(for_bhv,_,named_pred) -> + | AAssert(for_bhv,_,named_pred) | AInvariant(for_bhv,_,named_pred) -> let pp_for_bhv fmt l = match l with | [] -> () @@ -907,7 +907,8 @@ struct Format.asprintf "%sextended%a" (extended_loc_prefix le) pp_names [name] | IPCodeAnnot (kf,_, ca) -> let name = match ca.annot_content with - | AAssert _ -> "assert" + | AAssert (_, Assert, _) -> "assert" + | AAssert (_, Check, _) -> "check" | AInvariant (_,true,_) -> "loop_inv" | AInvariant _ -> "inv" | APragma _ -> "pragma" @@ -1094,8 +1095,10 @@ struct | IPCodeAnnot (kf,stmt, { annot_content = AExtended(_,_,(_,clause,_,_,_)) } ) -> [ K kf ; A clause ; S stmt ] - | IPCodeAnnot (kf,_, { annot_content = AAssert(_,p) } ) -> + | IPCodeAnnot (kf,_, { annot_content = AAssert(_,Assert,p) } ) -> [K kf ; A "assert" ; P p ] + | IPCodeAnnot (kf,_, { annot_content = AAssert(_,Check,p) } ) -> + [K kf ; A "check" ; P p ] | IPCodeAnnot (kf,_, { annot_content = AInvariant(_,true,p) } ) -> [K kf ; A "loop_invariant" ; P p ] | IPCodeAnnot (kf,_, { annot_content = AInvariant(_,false,p) } ) -> diff --git a/src/kernel_services/ast_printing/cil_printer.ml b/src/kernel_services/ast_printing/cil_printer.ml index 794e1cc8d4f..99ae17d4e4a 100644 --- a/src/kernel_services/ast_printing/cil_printer.ml +++ b/src/kernel_services/ast_printing/cil_printer.ml @@ -2887,11 +2887,16 @@ class cil_printer () = object (self) (Pretty_utils.pp_list ~sep:",@ " pp_print_string) l in match ca.annot_content with - | AAssert (behav,p) -> + | AAssert (behav,Assert,p) -> fprintf fmt "@[%a%a@ %a;@]" pp_for_behavs behav self#pp_acsl_keyword "assert" self#predicate p + | AAssert (behav,Check,p) -> + fprintf fmt "@[%a%a@ %a;@]" + pp_for_behavs behav + self#pp_acsl_keyword "check" + self#predicate p | APragma (Slice_pragma sp) -> fprintf fmt "@[%a@ %a;@]" self#pp_acsl_keyword "slice pragma" diff --git a/src/kernel_services/ast_printing/cil_types_debug.ml b/src/kernel_services/ast_printing/cil_types_debug.ml index 029bb8bf79a..c1c21886248 100644 --- a/src/kernel_services/ast_printing/cil_types_debug.ml +++ b/src/kernel_services/ast_printing/cil_types_debug.ml @@ -922,9 +922,13 @@ and pp_pragma pp_term fmt = function | Slice_pragma(term) -> Format.fprintf fmt "Slice_pragma(%a)" (pp_slice_pragma pp_term) term | Impact_pragma(term) -> Format.fprintf fmt "Impact_pragma(%a)" (pp_impact_pragma pp_term) term +and pp_assertion_kind fmt = function + | Assert -> Format.pp_print_string fmt "Assert" + | Check -> Format.pp_print_string fmt "Check" + and pp_code_annotation_node fmt = function - | AAssert(string_list,predicate) -> - Format.fprintf fmt "AAssert(%a,%a)" (pp_list pp_string) string_list pp_predicate predicate + | AAssert(string_list,kind,predicate) -> + Format.fprintf fmt "AAssert(%a,%a,%a)" (pp_list pp_string) string_list pp_assertion_kind kind pp_predicate predicate | AStmtSpec(string_list,spec) -> Format.fprintf fmt "AStmtSpec(%a,%a)" (pp_list pp_string) string_list pp_spec spec | AInvariant(string_list,bool,predicate) -> diff --git a/src/kernel_services/ast_printing/description.ml b/src/kernel_services/ast_printing/description.ml index ade7c65cc86..df0de122d9a 100644 --- a/src/kernel_services/ast_printing/description.ml +++ b/src/kernel_services/ast_printing/description.ml @@ -112,7 +112,10 @@ let pp_named fmt nx = let pp_code_annot fmt ca = match ca.annot_content with - | AAssert(bs,np) -> Format.fprintf fmt "assertion%a%a" pp_for bs pp_named np + | AAssert(bs,Assert,np) -> + Format.fprintf fmt "assertion%a%a" pp_for bs pp_named np + | AAssert(bs,Check,np) -> + Format.fprintf fmt "check%a%a" pp_for bs pp_named np | AInvariant(bs,_,np) -> Format.fprintf fmt "invariant%a%a" pp_for bs pp_named np | AAssigns(bs,_) -> Format.fprintf fmt "assigns%a" pp_for bs @@ -250,11 +253,16 @@ let rec pp_prop kfopt kiopt kloc fmt = function pp_bhvs bs (pp_opt kiopt (pp_kinstr kloc)) ki (pp_opt kiopt pp_active) active - | IPCodeAnnot(_,_,{annot_content=AAssert(bs,np)}) -> + | IPCodeAnnot(_,_,{annot_content=AAssert(bs,Assert,np)}) -> Format.fprintf fmt "Assertion%a%a%a" pp_for bs pp_named np (pp_kloc kloc) np.pred_loc + | IPCodeAnnot(_,_,{annot_content=AAssert(bs,Check,np)}) -> + Format.fprintf fmt "Check%a%a%a" + pp_for bs + pp_named np + (pp_kloc kloc) np.pred_loc | IPCodeAnnot(_,_,{annot_content=AInvariant(bs,_,np)}) -> Format.fprintf fmt "Invariant%a%a%a" pp_for bs @@ -348,13 +356,15 @@ let to_string pp elt = Buffer.contents b let code_annot_kind_and_node code_annot = match code_annot.annot_content with - | AAssert (_, {pred_content; pred_name}) -> + | AAssert (_, kind, {pred_content; pred_name}) -> let kind = match Alarms.find code_annot with | Some alarm -> Alarms.get_name alarm | None -> if List.exists ((=) "missing_return") pred_name then "missing_return" - else "user assertion" + else match kind with + | Assert -> "user assertion" + | Check -> "user check" in Some (kind, to_string Printer.pp_predicate_node pred_content) | AInvariant (_, _, {pred_content}) -> @@ -456,7 +466,7 @@ let for_order k = function | [] -> [I k] | bs -> I (succ k) :: named_order bs let annot_order = function - | {annot_content=AAssert(bs,np)} -> + | {annot_content=AAssert(bs,_kind,np)} -> for_order 0 bs @ named_order np.pred_name | {annot_content=AInvariant(bs,_,np)} -> for_order 2 bs @ named_order np.pred_name diff --git a/src/kernel_services/ast_printing/logic_print.ml b/src/kernel_services/ast_printing/logic_print.ml index 1de61b50372..e74712d1ab3 100644 --- a/src/kernel_services/ast_printing/logic_print.ml +++ b/src/kernel_services/ast_printing/logic_print.ml @@ -466,6 +466,10 @@ let print_pragma fmt p = | Slice_pragma p -> fprintf fmt "slice@ pragma@ %a;" print_slice_pragma p | Impact_pragma p -> fprintf fmt "impact@ pragma@ %a;" print_impact_pragma p +let print_assertion_kind fmt = function + | Assert -> pp_print_string fmt "assert" + | Check -> pp_print_string fmt "check" + let print_extension fmt (name, ext) = fprintf fmt "%s %a" name (pp_list ~sep:",@ " print_lexpr) ext @@ -474,8 +478,9 @@ let print_code_annot fmt ca = (pp_list ~pre:"for@ " ~sep:",@ " ~suf:":@ " pp_print_string) fmt bhvs in match ca with - AAssert(bhvs,e) -> - fprintf fmt "%aassert@ %a;" print_behaviors bhvs print_lexpr e + AAssert(bhvs,kind,e) -> + fprintf fmt "%a%a@ %a;" + print_behaviors bhvs print_assertion_kind kind print_lexpr e | AStmtSpec (bhvs,s) -> fprintf fmt "%a%a" print_behaviors bhvs diff --git a/src/kernel_services/ast_queries/cil.ml b/src/kernel_services/ast_queries/cil.ml index 027a3758727..23e9a642239 100644 --- a/src/kernel_services/ast_queries/cil.ml +++ b/src/kernel_services/ast_queries/cil.ml @@ -3113,9 +3113,9 @@ and childrenSpec vis s = let vSpec s = visitCilFunspec vis s in let change_content annot = { ca with annot_content = annot } in match ca.annot_content with - AAssert (behav,p) -> + AAssert (behav,kind,p) -> let p' = vPred p in if p' != p then - change_content (AAssert (behav,p')) + change_content (AAssert (behav,kind,p')) else ca | APragma (Impact_pragma t) -> let t' = visitCilImpactPragma vis t in diff --git a/src/kernel_services/ast_queries/cil_datatype.ml b/src/kernel_services/ast_queries/cil_datatype.ml index 17b141196aa..49792655353 100644 --- a/src/kernel_services/ast_queries/cil_datatype.ml +++ b/src/kernel_services/ast_queries/cil_datatype.ml @@ -2178,7 +2178,7 @@ module Code_annotation = struct end) let loc ca = match ca.annot_content with - | AAssert(_,{pred_loc=loc}) + | AAssert(_,_,{pred_loc=loc}) | AInvariant(_,_,{pred_loc=loc}) | AVariant({term_loc=loc},_) -> Some loc | AAssigns _ | AAllocation _ | APragma _ | AExtended _ diff --git a/src/kernel_services/ast_queries/filecheck.ml b/src/kernel_services/ast_queries/filecheck.ml index 3b292cce667..af3f16c4a27 100644 --- a/src/kernel_services/ast_queries/filecheck.ml +++ b/src/kernel_services/ast_queries/filecheck.ml @@ -648,7 +648,7 @@ class check ?(is_normalized=true) what : Visitor.frama_c_visitor = names of statement contracts. *) if is_normalized then begin match ca.annot_content with - | AAssert(bhvs,_) | AStmtSpec(bhvs,_) | AInvariant (bhvs,_,_) + | AAssert(bhvs,_,_) | AStmtSpec(bhvs,_) | AInvariant (bhvs,_,_) | AAssigns(bhvs,_) | AAllocation(bhvs,_) | AExtended (bhvs,_,_) -> List.iter (fun b -> diff --git a/src/kernel_services/ast_queries/logic_typing.ml b/src/kernel_services/ast_queries/logic_typing.ml index a5a205947e2..e281a3b8920 100644 --- a/src/kernel_services/ast_queries/logic_typing.ml +++ b/src/kernel_services/ast_queries/logic_typing.ml @@ -3777,9 +3777,12 @@ struct let code_annot loc current_behaviors current_return_type ca = let source = fst loc in let annot = match ca with - | AAssert (behav,p) -> + | AAssert (behav,Assert,p) -> check_behavior_names loc current_behaviors behav; - Cil_types.AAssert (behav,predicate (code_annot_env()) p) + Cil_types.AAssert (behav, Cil_types.Assert, predicate (code_annot_env()) p) + | AAssert (behav,Check,p) -> + check_behavior_names loc current_behaviors behav; + Cil_types.AAssert (behav, Cil_types.Check, predicate (code_annot_env()) p) | APragma (Impact_pragma sp) -> Cil_types.APragma (Cil_types.Impact_pragma (impact_pragma (code_annot_env()) sp)) | APragma (Slice_pragma sp) -> diff --git a/src/kernel_services/ast_queries/logic_utils.ml b/src/kernel_services/ast_queries/logic_utils.ml index 352824e171c..c99bcaee9a1 100644 --- a/src/kernel_services/ast_queries/logic_utils.ml +++ b/src/kernel_services/ast_queries/logic_utils.ml @@ -1021,8 +1021,8 @@ let is_same_extension (_,e1,_,s1,c1) (_,e2,_,s2,c2) = let is_same_code_annotation (ca1:code_annotation) (ca2:code_annotation) = match ca1.annot_content, ca2.annot_content with - | AAssert(l1,p1), AAssert(l2,p2) -> - is_same_list (=) l1 l2 && is_same_predicate p1 p2 + | AAssert(l1,k1,p1), AAssert(l2,k2,p2) -> + is_same_list (=) l1 l2 && k1 = k2 && is_same_predicate p1 p2 | AStmtSpec (l1,s1), AStmtSpec (l2,s2) -> is_same_list (=) l1 l2 && is_same_spec s1 s2 | AInvariant(l1,b1,p1), AInvariant(l2,b2,p2) -> @@ -2057,7 +2057,11 @@ let lhost_c_type thost = | _ -> assert false) | TResult ty -> ty -let is_assert ca = match ca.annot_content with AAssert _ -> true | _ -> false +let is_assert ca = + match ca.annot_content with AAssert (_, Assert, _) -> true | _ -> false + +let is_check ca = + match ca.annot_content with AAssert (_, Check, _) -> true | _ -> false let is_contract ca = match ca.annot_content with AStmtSpec _ -> true | _ -> false @@ -2101,7 +2105,7 @@ let is_loop_annot s = let is_trivial_annotation a = match a.annot_content with - | AAssert (_,a) -> is_trivially_true a + | AAssert (_,_,a) -> is_trivially_true a | APragma _ | AStmtSpec _ | AInvariant _ | AVariant _ | AAssigns _| AAllocation _ | AExtended _ -> false diff --git a/src/kernel_services/ast_queries/logic_utils.mli b/src/kernel_services/ast_queries/logic_utils.mli index c5c7be4b017..20f930b2b2f 100644 --- a/src/kernel_services/ast_queries/logic_utils.mli +++ b/src/kernel_services/ast_queries/logic_utils.mli @@ -380,6 +380,7 @@ val clear_funspec: funspec -> unit a particular kind of annotations associated to a statement. *) val is_assert : code_annotation -> bool +val is_check : code_annotation -> bool val is_contract : code_annotation -> bool val is_stmt_invariant : code_annotation -> bool val is_loop_invariant : code_annotation -> bool diff --git a/src/kernel_services/ast_transformations/filter.ml b/src/kernel_services/ast_transformations/filter.ml index 50fcb567f70..53907e6dc53 100644 --- a/src/kernel_services/ast_transformations/filter.ml +++ b/src/kernel_services/ast_transformations/filter.ml @@ -447,7 +447,7 @@ end = struct Printer.pp_code_annotation v; ChangeTo (Logic_const.new_code_annotation - (AAssert ([], + (AAssert ([], Assert, { pred_name = []; pred_loc = Cil_datatype.Location.unknown; pred_content = Ptrue}))) end diff --git a/src/kernel_services/parsetree/logic_ptree.mli b/src/kernel_services/parsetree/logic_ptree.mli index 3b97808c2aa..3461d6bd82a 100644 --- a/src/kernel_services/parsetree/logic_ptree.mli +++ b/src/kernel_services/parsetree/logic_ptree.mli @@ -334,11 +334,13 @@ and pragma = | Slice_pragma of slice_pragma | Impact_pragma of impact_pragma +and assertion_kind = Assert | Check + (** all annotations that can be found in the code. This type shares the name of its constructors with {!Cil_types.code_annotation_node}. *) type code_annot = - | AAssert of string list * lexpr + | AAssert of string list * assertion_kind * lexpr (** assertion to be checked. The list of strings is the list of behaviors to which this assertion applies. *) diff --git a/src/plugins/scope/datascope.ml b/src/plugins/scope/datascope.ml index b64f3530965..007449cd839 100644 --- a/src/plugins/scope/datascope.ml +++ b/src/plugins/scope/datascope.ml @@ -488,7 +488,7 @@ let add_proven_annot (ca, stmt_ca) (ca_because, stmt_because) acc = let check_stmt_annots (ca, stmt_ca) stmt acc = let check _ annot acc = match ca.annot_content, annot.annot_content with - | AAssert (_, p'), AAssert (_, p) -> + | AAssert (_, Assert, p'), AAssert (_, _, p) -> if Logic_utils.is_same_predicate_node p.pred_content p'.pred_content then let acc, added = add_proven_annot (annot, stmt) (ca, stmt_ca) acc in if added then @@ -574,7 +574,7 @@ class check_annot_visitor = object(self) Cil.get_original_stmt self#behavior (Extlib.the self#current_stmt) in begin match annot.annot_content with - | AAssert (_, _) -> + | AAssert _ -> R.debug ~level:2 "[check] annot %d at stmt %d in %a : %a@." annot.annot_id stmt.sid Kernel_function.pretty kf Printer.pp_code_annotation annot; diff --git a/src/plugins/value/alarmset.ml b/src/plugins/value/alarmset.ml index 58e5b96280f..0dc0cb5b874 100644 --- a/src/plugins/value/alarmset.ml +++ b/src/plugins/value/alarmset.ml @@ -216,7 +216,7 @@ let local_printer: Printer.extensible_printer = method! code_annotation fmt ca = temporaries <- Cil_datatype.Varinfo.Set.empty; match ca.annot_content with - | AAssert(_, p) -> + | AAssert (_, _, p) -> (* ignore the ACSL name *) Format.fprintf fmt "@[<v>@[assert@ %a;@]" self#predicate_node p.pred_content; (* print temporary variables information *) diff --git a/src/plugins/value/engine/transfer_logic.ml b/src/plugins/value/engine/transfer_logic.ml index c9e1050abf3..304e26b6d01 100644 --- a/src/plugins/value/engine/transfer_logic.ml +++ b/src/plugins/value/engine/transfer_logic.ml @@ -580,7 +580,8 @@ module Make let code_annotation_text ca = match ca.annot_content with - | AAssert _ -> "assertion" + | AAssert (_, Assert, _) -> "assertion" + | AAssert (_, Check, _) -> "check" | AInvariant _ -> "loop invariant" | APragma _ | AVariant _ | AAssigns _ | AAllocation _ | AStmtSpec _ | AExtended _ -> @@ -599,7 +600,7 @@ module Make let interp_annot ~limit ~record kf ab stmt code_annot ~initial_state states = let ips = Property.ip_of_code_annot kf stmt code_annot in let source, _ = code_annotation_loc code_annot stmt in - let aux_interp code_annot behav p = + let aux_interp ~reduce code_annot behav p = let text = code_annotation_text code_annot in let in_behavior = match behav with @@ -636,38 +637,41 @@ module Make msg_status status ~once:true ~source "%s%a got status %s." text Description.pp_named p message in + let reduce_state here res accstateset = + match res, in_behavior with + | _, `Unknown -> + (* Cannot conclude because behavior might be inactive *) + States.add here accstateset + + | Alarmset.False, `True -> (* Dead/invalid branch *) + accstateset + + | (Alarmset.Unknown | Alarmset.True), `True -> + let env = here_env ~pre:initial_state ~here in + (* Reduce by p if it is a disjunction, or if it did not + evaluate to True *) + let reduce = res = Alarmset.Unknown in + let reduced_states = + split_disjunction_and_reduce ~reduce ~limit env here p + in + fst (States.merge reduced_states ~into:accstateset) + in let reduced_states = States.fold (fun (here: Domain.t) accstateset -> let env = here_env ~pre:initial_state ~here in let res = Domain.evaluate_predicate env here p in - (* if record [holds], emit statuses in the Kernel, - and print a message *) + (* if [record] holds, emit kernel status and print a message *) if record then emit res; - match res, in_behavior with - | _, `Unknown -> - (* Cannot conclude because behavior might be inactive *) - States.add here accstateset - - | Alarmset.False, `True -> (* Dead/invalid branch *) - accstateset - - | (Alarmset.Unknown | Alarmset.True), `True -> - let env = here_env ~pre:initial_state ~here in - (* Reduce by p if it is a disjunction, or if it did not - evaluate to True *) - let reduce = res = Alarmset.Unknown in - let reduced_states = - split_disjunction_and_reduce ~reduce ~limit env here p - in - fst (States.merge reduced_states ~into:accstateset) - ) states States.empty + (* if [reduce] holds, reduce the state. *) + if reduce then reduce_state here res accstateset else accstateset) + states States.empty in (* States resulting from disjunctions are reversed compared to the 'nice' ordering *) - States.reorder reduced_states + if reduce then States.reorder reduced_states else states in - let aux code_annot behav p = + let aux code_annot ~reduce behav p = if ignore_predicate p then states else if States.is_empty states then ( @@ -680,11 +684,12 @@ module Make end; states ) else - aux_interp code_annot behav p + aux_interp ~reduce code_annot behav p in match code_annot.annot_content with - | AAssert (behav,p) - | AInvariant (behav, true, p) -> aux code_annot behav p + | AAssert (behav, Check, p) -> aux ~reduce:false code_annot behav p + | AAssert (behav, Assert, p) + | AInvariant (behav, true, p) -> aux ~reduce:true code_annot behav p | APragma _ | AInvariant (_, false, _) | AVariant _ | AAssigns _ | AAllocation _ | AExtended _ diff --git a/src/plugins/value/gui_files/gui_red.ml b/src/plugins/value/gui_files/gui_red.ml index 4b807209ea7..a5d78c61b30 100644 --- a/src/plugins/value/gui_files/gui_red.ml +++ b/src/plugins/value/gui_files/gui_red.ml @@ -69,7 +69,7 @@ type red_alarm = { let get_predicate ca = match ca.annot_content with - | AAssert (_, p) -> { p with pred_name = [] } + | AAssert (_, _, p) -> { p with pred_name = [] } | _ -> assert false let make_red_alarm function_name ki alarm callstacks = diff --git a/src/plugins/value/gui_files/register_gui.ml b/src/plugins/value/gui_files/register_gui.ml index 08eabb21cd9..80d4d7ebce2 100644 --- a/src/plugins/value/gui_files/register_gui.ml +++ b/src/plugins/value/gui_files/register_gui.ml @@ -454,7 +454,7 @@ module Select (Eval: Eval) = struct let lv = (Var vi, NoOffset) in select_lv main_ui (GL_Stmt (kf, stmt)) lv | PIP (IPCodeAnnot (kf, stmt, - ({annot_content = AAssert (_, p) | AInvariant (_, true, p)} as ca)) as ip) -> + ({annot_content = AAssert (_, _, p) | AInvariant (_, true, p)} as ca)) as ip) -> begin let loc = GL_Stmt (kf, stmt) in let alarm_or_property = @@ -623,7 +623,7 @@ let add_keybord_shortcut_evaluate main_ui = select (find_loc kf fdec bl) end | PIP (Property.IPCodeAnnot (kf, stmt, - {annot_content = AAssert (_, _) | AInvariant (_, true, _)} )) -> + {annot_content = AAssert _ | AInvariant (_, true, _)} )) -> select (Some (GL_Stmt (kf, stmt))) | PIP (Property.IPPredicate (_, kf, Kglobal, _) as ip) -> select (Gui_eval.classify_pre_post kf ip) diff --git a/src/plugins/value/legacy/eval_annots.ml b/src/plugins/value/legacy/eval_annots.ml index e81cf164105..6b2e6787241 100644 --- a/src/plugins/value/legacy/eval_annots.ml +++ b/src/plugins/value/legacy/eval_annots.ml @@ -29,7 +29,8 @@ let has_requires spec = let code_annotation_text ca = match ca.annot_content with - | AAssert _ -> "assertion" + | AAssert (_, Assert, _) -> "assertion" + | AAssert (_, Check, _) -> "check" | AInvariant _ -> "loop invariant" | APragma _ | AVariant _ | AAssigns _ | AAllocation _ | AStmtSpec _ | AExtended _ -> @@ -202,7 +203,7 @@ let mark_green_and_red () = currently skipped during evaluation. *) if contains_c_at ca || (Alarms.find ca <> None) then match ca.annot_content with - | AAssert (_, p) | AInvariant (_, true, p) -> + | AAssert (_, _, p) | AInvariant (_, true, p) -> let loc = code_annotation_loc ca stmt in Cil.CurrentLoc.set loc; let kf = Kernel_function.find_englobing_kf stmt in @@ -245,7 +246,7 @@ let mark_invalid_initializers () = | None -> () | Some _ -> match ca.annot_content with - | AAssert (_, p) -> + | AAssert (_, _, p) -> let ip = Property.ip_of_code_annot_single kf first_stmt ca in (* Evaluate in a fully empty state. Only predicates that do not depend on the memory will result in 'False' *) diff --git a/src/plugins/wp/wpAnnot.ml b/src/plugins/wp/wpAnnot.ml index 81744b579a9..3535467b513 100644 --- a/src/plugins/wp/wpAnnot.ml +++ b/src/plugins/wp/wpAnnot.ml @@ -902,7 +902,7 @@ let get_stmt_annots config v s = Printer.pp_code_annotation a; acc end - | AAssert (b_list,p) -> + | AAssert (b_list,_,p) -> let kf = config.kf in let acc = match is_annot_for_config config v s b_list with | TBRno -> acc @@ -1385,7 +1385,7 @@ let get_id_prop_strategies ~model ?(assigns=WithAssigns) p = match p with | Property.IPCodeAnnot (kf,_,ca) -> let bhvs = match ca.annot_content with - | AAssert (l, _) | AInvariant (l, _, _) | AAssigns (l, _) -> l + | AAssert (l, _, _) | AInvariant (l, _, _) | AAssigns (l, _) -> l | _ -> [] in get_strategies assigns kf model bhvs None (IdProp p) | Property.IPAssigns (kf, _, Property.Id_loop _, _) diff --git a/src/plugins/wp/wpPropId.ml b/src/plugins/wp/wpPropId.ml index 7e3009c53bb..da2f5d78db1 100644 --- a/src/plugins/wp/wpPropId.ml +++ b/src/plugins/wp/wpPropId.ml @@ -420,7 +420,7 @@ let ident_names names = | _ as n -> '\"' <> (String.get n 0) ) names let code_annot_names ca = match ca.annot_content with - | AAssert (_, named_pred) -> "@assert"::(ident_names named_pred.pred_name) + | AAssert (_, _, named_pred) -> "@assert"::(ident_names named_pred.pred_name) | AInvariant (_,_,named_pred) -> "@invariant"::(ident_names named_pred.pred_name) | AVariant (term, _) -> "@variant"::(ident_names term.term_name) | AExtended(_,_,(_,name,_,_,_)) -> [Printf.sprintf "@%s" name] @@ -588,7 +588,7 @@ let assigns_hints hs froms = List.iter (fun ({it_content=t},_) -> term_hints hs t) froms let annot_hints hs = function - | AAssert(bs,ipred) | AInvariant(bs,_,ipred) -> + | AAssert(bs,_,ipred) | AInvariant(bs,_,ipred) -> List.iter (add_hint hs) (ident_names ipred.pred_name) ; List.iter (add_hint hs) bs | AAssigns(bs,Writes froms) -> diff --git a/tests/syntax/syntactic_hook.ml b/tests/syntax/syntactic_hook.ml index e731d80478a..c6a5d1f3517 100644 --- a/tests/syntax/syntactic_hook.ml +++ b/tests/syntax/syntactic_hook.ml @@ -13,7 +13,7 @@ class visit = object [{ stmt_ghost = false; stmt_node = CODE_ANNOT( - AAssert([], + AAssert([], Assert, { lexpr_node = PLat ({ lexpr_node = PLtrue; lexpr_loc = loc},"Pre"); lexpr_loc = loc}), loc)}; -- GitLab From 6820597409140532a2e72156dc32f94e1a302d4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 26 Feb 2019 11:03:12 +0100 Subject: [PATCH 081/376] [Gui] In the property filter, separates user assertions and user checks. --- src/plugins/gui/property_navigator.ml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/plugins/gui/property_navigator.ml b/src/plugins/gui/property_navigator.ml index a859ed50bd7..8ada692acfd 100644 --- a/src/plugins/gui/property_navigator.ml +++ b/src/plugins/gui/property_navigator.ml @@ -112,6 +112,7 @@ module Refreshers: sig val assigns: check val from: check val user_assertions: check + val user_checks: check val rte: check val invariant: check val variant: check @@ -239,6 +240,8 @@ struct ~hint:"Show functional dependencies in function assigns" let user_assertions = add ~name:"User assertions" ~hint:"Show user assertions" () + let user_checks = + add ~name:"User checks" ~hint:"Show user checks" () (* Function called when RTEs are enabled or disabled. *) let set_rte = ref (fun _b -> ()) let rte = add ~set:(fun b -> !set_rte b) ~name:"RTEs" @@ -360,6 +363,7 @@ struct assigns.add hb; from.add hb; user_assertions.add hb; + user_checks.add hb; rte.add hb; invariant.add hb; variant.add hb; @@ -630,10 +634,15 @@ let make_panel (main_ui:main_window_extension_points) = | Property.IPLemma _ -> lemmas.get () | Property.IPComplete _ -> complete_disjoint.get () | Property.IPDisjoint _ -> complete_disjoint.get () - | Property.IPCodeAnnot(_,_,({annot_content = AAssert _} as ca)) -> - (match Alarms.find ca with - | None -> user_assertions.get () - | Some a -> rte.get () && active_alarm a) + | Property.IPCodeAnnot(_,_,({annot_content = AAssert (_, kind, _)} as ca)) -> + begin + match Alarms.find ca with + | Some a -> rte.get () && active_alarm a + | None -> + match kind with + | Assert -> user_assertions.get () + | Check -> user_checks.get () + end | Property.IPCodeAnnot(_,_,{annot_content = AInvariant _}) -> invariant.get () | Property.IPCodeAnnot(_,_,{annot_content = APragma p}) -> -- GitLab From 9e4c15a5752bff8753bbc8fd917b9be2720676d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 26 Feb 2019 11:33:17 +0100 Subject: [PATCH 082/376] [wp] Do not add check annotations as hypotheses. --- src/plugins/wp/wpAnnot.ml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/plugins/wp/wpAnnot.ml b/src/plugins/wp/wpAnnot.ml index 3535467b513..49d002429d5 100644 --- a/src/plugins/wp/wpAnnot.ml +++ b/src/plugins/wp/wpAnnot.ml @@ -902,18 +902,20 @@ let get_stmt_annots config v s = Printer.pp_code_annotation a; acc end - | AAssert (b_list,_,p) -> + | AAssert (b_list, kind, p) -> let kf = config.kf in let acc = match is_annot_for_config config v s b_list with | TBRno -> acc | TBRhyp -> - let b_acc = - WpStrategy.add_prop_assert b_acc WpStrategy.Ahyp kf s a p - in (b_acc, (a_acc, e_acc)) + if kind = Check then acc + else + let b_acc = + WpStrategy.add_prop_assert b_acc WpStrategy.Ahyp kf s a p + in (b_acc, (a_acc, e_acc)) | TBRok | TBRpart -> let id = WpPropId.mk_assert_id config.kf s a in let kind = - if Wp_parameters.Assert_check_only.get () then + if kind = Check || Wp_parameters.Assert_check_only.get () then WpStrategy.Agoal else WpStrategy.Aboth (goal_to_select config id) -- GitLab From aceb64d182a76e94f1e09b112e2de2a7961e08df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Wed, 27 Feb 2019 09:59:27 +0100 Subject: [PATCH 083/376] [Eva] Adds a test of check assertions. Checks must never reduce the states of the analysis, nor lead to bottom. --- tests/value/logic.c | 21 ++++++++++++ tests/value/oracle/logic.res.oracle | 50 ++++++++++++++++++++++------- 2 files changed, 59 insertions(+), 12 deletions(-) diff --git a/tests/value/logic.c b/tests/value/logic.c index bf9938b5823..9ba0bf437d4 100644 --- a/tests/value/logic.c +++ b/tests/value/logic.c @@ -288,6 +288,26 @@ void min_max () { //@ assert d == \min(a, b); } +/* Tests assert and check assertions. */ +void check_and_assert () { + int x; + x = v; + /*@ assert x == 42; */ + Frama_C_show_each_42(x); + /*@ check x == 42; */ + x = v; + /*@ check x == 42; */ + Frama_C_show_each_imprecise(x); + /*@ assert x == 42; */ + if (v) { + /*@ assert x == 0; */ + Frama_C_show_each_unreachable(x); /* The assert led to bottom. */ + } else { + /*@ check x == 0; */ + Frama_C_show_each_reachable(x); /* A check should never lead to bottom. */ + } +} + void main () { eq_tsets(); eq_char(); @@ -300,4 +320,5 @@ void main () { float_sign(); min_max(); assign_tsets(); + check_and_assert (); } diff --git a/tests/value/oracle/logic.res.oracle b/tests/value/oracle/logic.res.oracle index 07c802ebd74..6a192e2ee74 100644 --- a/tests/value/oracle/logic.res.oracle +++ b/tests/value/oracle/logic.res.oracle @@ -14,7 +14,7 @@ arr_ptr[0..2] ∈ {0} arr_ptr_arr[0..5] ∈ {0} [eva] computing for function eq_tsets <- main. - Called from tests/value/logic.c:292. + Called from tests/value/logic.c:312. [eva] tests/value/logic.c:103: cannot evaluate ACSL term, unsupported ACSL construct: == operation on non-supported type set<_#8> [eva:alarm] tests/value/logic.c:103: Warning: assertion got status unknown. @@ -56,20 +56,20 @@ [eva] Recording results for eq_tsets [eva] Done for function eq_tsets [eva] computing for function eq_char <- main. - Called from tests/value/logic.c:293. + Called from tests/value/logic.c:313. [eva] tests/value/logic.c:149: Frama_C_show_each: {-126} [eva] tests/value/logic.c:150: assertion got status valid. [eva] tests/value/logic.c:151: assertion got status valid. [eva] Recording results for eq_char [eva] Done for function eq_char [eva] computing for function casts <- main. - Called from tests/value/logic.c:294. + Called from tests/value/logic.c:314. [eva] tests/value/logic.c:155: assertion got status valid. [eva] tests/value/logic.c:156: assertion got status valid. [eva] Recording results for casts [eva] Done for function casts [eva] computing for function empty_tset <- main. - Called from tests/value/logic.c:295. + Called from tests/value/logic.c:315. [eva] computing for function f_empty_tset <- empty_tset <- main. Called from tests/value/logic.c:166. [eva] using specification for function f_empty_tset @@ -82,7 +82,7 @@ [eva] Recording results for empty_tset [eva] Done for function empty_tset [eva] computing for function reduce_by_equal <- main. - Called from tests/value/logic.c:296. + Called from tests/value/logic.c:316. [eva:alarm] tests/value/logic.c:172: Warning: accessing out of bounds index. assert 0 ≤ v; [eva:alarm] tests/value/logic.c:172: Warning: @@ -92,7 +92,7 @@ [eva] Recording results for reduce_by_equal [eva] Done for function reduce_by_equal [eva] computing for function alarms <- main. - Called from tests/value/logic.c:297. + Called from tests/value/logic.c:317. [eva:alarm] tests/value/logic.c:182: Warning: assertion 'ASSUME' got status unknown. [eva:alarm] tests/value/logic.c:184: Warning: @@ -124,7 +124,7 @@ [eva] Recording results for alarms [eva] Done for function alarms [eva] computing for function cond_in_lval <- main. - Called from tests/value/logic.c:298. + Called from tests/value/logic.c:318. [eva] computing for function select_like <- cond_in_lval <- main. Called from tests/value/logic.c:228. [eva] using specification for function select_like @@ -152,7 +152,7 @@ [eva] Recording results for cond_in_lval [eva] Done for function cond_in_lval [eva] computing for function pred <- main. - Called from tests/value/logic.c:299. + Called from tests/value/logic.c:319. [eva] tests/value/logic.c:90: assertion got status valid. [eva] tests/value/logic.c:91: assertion got status valid. [eva] tests/value/logic.c:31: @@ -201,7 +201,7 @@ [eva] Recording results for pred [eva] Done for function pred [eva] computing for function float_sign <- main. - Called from tests/value/logic.c:300. + Called from tests/value/logic.c:320. [eva] tests/value/logic.c:251: assertion got status valid. [eva] tests/value/logic.c:252: assertion got status valid. [eva] tests/value/logic.c:253: assertion got status valid. @@ -210,7 +210,7 @@ [eva] Recording results for float_sign [eva] Done for function float_sign [eva] computing for function min_max <- main. - Called from tests/value/logic.c:301. + Called from tests/value/logic.c:321. [eva] computing for function Frama_C_interval <- min_max <- main. Called from tests/value/logic.c:274. [eva] using specification for function Frama_C_interval @@ -235,16 +235,32 @@ [eva] Recording results for min_max [eva] Done for function min_max [eva] computing for function assign_tsets <- main. - Called from tests/value/logic.c:302. + Called from tests/value/logic.c:322. [eva] computing for function assign_tsets_aux <- assign_tsets <- main. Called from tests/value/logic.c:269. [eva] using specification for function assign_tsets_aux [eva] Done for function assign_tsets_aux [eva] Recording results for assign_tsets [eva] Done for function assign_tsets +[eva] computing for function check_and_assert <- main. + Called from tests/value/logic.c:323. +[eva:alarm] tests/value/logic.c:295: Warning: assertion got status unknown. +[eva] tests/value/logic.c:296: Frama_C_show_each_42: {42} +[eva] tests/value/logic.c:297: check got status valid. +[eva:alarm] tests/value/logic.c:299: Warning: check got status unknown. +[eva] tests/value/logic.c:300: + Frama_C_show_each_imprecise: [-2147483648..2147483647] +[eva:alarm] tests/value/logic.c:301: Warning: assertion got status unknown. +[eva:alarm] tests/value/logic.c:303: Warning: + assertion got status invalid (stopping propagation). +[eva:alarm] tests/value/logic.c:306: Warning: + check got status invalid (stopping propagation). +[eva] tests/value/logic.c:307: Frama_C_show_each_reachable: {42} +[eva] Recording results for check_and_assert +[eva] Done for function check_and_assert [eva] Recording results for main [eva] done for function main -[scope:rm_asserts] removing 4 assertion(s) +[scope:rm_asserts] removing 5 assertion(s) [eva] ====== VALUES COMPUTED ====== [eva:final-states] Values at end of function alarms: x_0 ∈ {1} @@ -258,6 +274,8 @@ [4..5] ∈ [--..--] [eva:final-states] Values at end of function casts: +[eva:final-states] Values at end of function check_and_assert: + x_0 ∈ {42} [eva:final-states] Values at end of function eq_char: c ∈ {-126} [eva:final-states] Values at end of function eq_tsets: @@ -330,6 +348,8 @@ [from] Done for function assign_tsets [from] Computing for function casts [from] Done for function casts +[from] Computing for function check_and_assert +[from] Done for function check_and_assert [from] Computing for function eq_char [from] Done for function eq_char [from] Computing for function eq_tsets @@ -376,6 +396,8 @@ arr_ptr_arr{[1]; [4..5]} FROM \nothing [from] Function casts: NO EFFECTS +[from] Function check_and_assert: + NO EFFECTS [from] Function eq_char: NO EFFECTS [from] Function eq_tsets: @@ -426,6 +448,10 @@ \nothing [inout] Inputs for function casts: \nothing +[inout] Out (internal) for function check_and_assert: + x_0 +[inout] Inputs for function check_and_assert: + v [inout] Out (internal) for function eq_char: c [inout] Inputs for function eq_char: -- GitLab From c70ccbbe76d8814d103dca797f3c591c066a8fb0 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Wed, 27 Feb 2019 17:17:46 +0100 Subject: [PATCH 084/376] [Eva] improve message for check of invalid properties --- src/plugins/value/engine/transfer_logic.ml | 2 +- tests/value/oracle/logic.res.oracle | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/value/engine/transfer_logic.ml b/src/plugins/value/engine/transfer_logic.ml index 304e26b6d01..79b128e2dfa 100644 --- a/src/plugins/value/engine/transfer_logic.ml +++ b/src/plugins/value/engine/transfer_logic.ml @@ -629,7 +629,7 @@ module Make "valid" | Alarmset.False, `True -> change_status Property_status.False_if_reachable; - "invalid (stopping propagation)" + "invalid" ^ (if reduce then " (stopping propagation)" else "") | Alarmset.False, `Unknown -> change_status Property_status.False_if_reachable; "invalid" diff --git a/tests/value/oracle/logic.res.oracle b/tests/value/oracle/logic.res.oracle index 6a192e2ee74..1920a84df5e 100644 --- a/tests/value/oracle/logic.res.oracle +++ b/tests/value/oracle/logic.res.oracle @@ -253,8 +253,7 @@ [eva:alarm] tests/value/logic.c:301: Warning: assertion got status unknown. [eva:alarm] tests/value/logic.c:303: Warning: assertion got status invalid (stopping propagation). -[eva:alarm] tests/value/logic.c:306: Warning: - check got status invalid (stopping propagation). +[eva:alarm] tests/value/logic.c:306: Warning: check got status invalid. [eva] tests/value/logic.c:307: Frama_C_show_each_reachable: {42} [eva] Recording results for check_and_assert [eva] Done for function check_and_assert -- GitLab From efebd7aec36656f4bd8cce2dd4847d24bc0b6000 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Mon, 4 Mar 2019 14:51:13 +0100 Subject: [PATCH 085/376] [WP,EVA] adds a test related to property dependencies --- src/plugins/wp/tests/wp_acsl/checks.i | 19 +++++ .../tests/wp_acsl/oracle/checks.0.res.oracle | 75 +++++++++++++++++++ .../tests/wp_acsl/oracle/checks.1.res.oracle | 18 +++++ .../tests/wp_acsl/oracle/checks.2.res.oracle | 28 +++++++ .../wp_acsl/oracle_qualif/checks.res.oracle | 50 +++++++++++++ 5 files changed, 190 insertions(+) create mode 100644 src/plugins/wp/tests/wp_acsl/checks.i create mode 100644 src/plugins/wp/tests/wp_acsl/oracle/checks.0.res.oracle create mode 100644 src/plugins/wp/tests/wp_acsl/oracle/checks.1.res.oracle create mode 100644 src/plugins/wp/tests/wp_acsl/oracle/checks.2.res.oracle create mode 100644 src/plugins/wp/tests/wp_acsl/oracle_qualif/checks.res.oracle diff --git a/src/plugins/wp/tests/wp_acsl/checks.i b/src/plugins/wp/tests/wp_acsl/checks.i new file mode 100644 index 00000000000..1a1174504f7 --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/checks.i @@ -0,0 +1,19 @@ +/* run.config + OPT: -eva -load-module scope,eva,report -then -report + OPT: -wp-prop=@check + OPT: -wp-prop=@assert +*/ +/* run.config_qualif + OPT: -load-module report -wp-steps 5 -then -report +*/ + +// note: eva and wp gives the same reporting + +//@ axiomatic A { predicate P reads \nothing ; } +void main() { + //@check c1: P; + //@assert a1: P; + //@check c2: P; + //@assert a2: P; + ; +} diff --git a/src/plugins/wp/tests/wp_acsl/oracle/checks.0.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle/checks.0.res.oracle new file mode 100644 index 00000000000..a99ec33e26d --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle/checks.0.res.oracle @@ -0,0 +1,75 @@ +# frama-c -wp [...] +[kernel] Parsing tests/wp_acsl/checks.i (no preprocessing) +[wp] Running WP plugin... +[wp] Loading driver 'share/wp.driver' +[wp] Warning: Missing RTE guards +------------------------------------------------------------ + Function main +------------------------------------------------------------ + +Goal Check 'c1' (file tests/wp_acsl/checks.i, line 14): +Prove: P_P. + +------------------------------------------------------------ + +Goal Assertion 'a1' (file tests/wp_acsl/checks.i, line 15): +Prove: P_P. + +------------------------------------------------------------ + +Goal Check 'c2' (file tests/wp_acsl/checks.i, line 16): +Prove: true. + +------------------------------------------------------------ + +Goal Assertion 'a2' (file tests/wp_acsl/checks.i, line 17): +Prove: true. + +------------------------------------------------------------ +[eva] Analyzing a complete application starting at main +[eva] Computing initial state +[eva] Initial state computed +[eva:initial-state] Values of globals at initialization + +[eva:alarm] tests/wp_acsl/checks.i:14: Warning: check 'c1' got status unknown. +[eva:alarm] tests/wp_acsl/checks.i:15: Warning: + assertion 'a1' got status unknown. +[eva:alarm] tests/wp_acsl/checks.i:16: Warning: check 'c2' got status unknown. +[eva:alarm] tests/wp_acsl/checks.i:17: Warning: + assertion 'a2' got status unknown. +[eva] done for function main +[scope:rm_asserts] removing 2 assertion(s) +[eva] ====== VALUES COMPUTED ====== +[eva:final-states] Values at end of function main: + +[report] Computing properties status... +-------------------------------------------------------------------------------- +--- Global Properties +-------------------------------------------------------------------------------- + +[ Valid ] Axiomatic 'A' + by Frama-C kernel. + +-------------------------------------------------------------------------------- +--- Properties of Function 'main' +-------------------------------------------------------------------------------- + +[ - ] Check 'c1' (file tests/wp_acsl/checks.i, line 14) + tried with Eva. +[ - ] Assertion 'a1' (file tests/wp_acsl/checks.i, line 15) + tried with Eva. +[ Partial ] Check 'c2' (file tests/wp_acsl/checks.i, line 16) + By RedundantAlarms, with pending: + - Assertion 'a1' (file tests/wp_acsl/checks.i, line 15) +[ Partial ] Assertion 'a2' (file tests/wp_acsl/checks.i, line 17) + By RedundantAlarms, with pending: + - Assertion 'a1' (file tests/wp_acsl/checks.i, line 15) + +-------------------------------------------------------------------------------- +--- Status Report Summary +-------------------------------------------------------------------------------- + 1 Completely validated + 2 Locally validated + 2 To be validated + 5 Total +-------------------------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_acsl/oracle/checks.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle/checks.1.res.oracle new file mode 100644 index 00000000000..6de4c095087 --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle/checks.1.res.oracle @@ -0,0 +1,18 @@ +# frama-c -wp [...] +[kernel] Parsing tests/wp_acsl/checks.i (no preprocessing) +[wp] Running WP plugin... +[wp] Loading driver 'share/wp.driver' +[wp] Warning: Missing RTE guards +------------------------------------------------------------ + Function main +------------------------------------------------------------ + +Goal Check 'c1' (file tests/wp_acsl/checks.i, line 14): +Prove: P_P. + +------------------------------------------------------------ + +Goal Check 'c2' (file tests/wp_acsl/checks.i, line 16): +Prove: true. + +------------------------------------------------------------ diff --git a/src/plugins/wp/tests/wp_acsl/oracle/checks.2.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle/checks.2.res.oracle new file mode 100644 index 00000000000..669139a5ea8 --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle/checks.2.res.oracle @@ -0,0 +1,28 @@ +# frama-c -wp [...] +[kernel] Parsing tests/wp_acsl/checks.i (no preprocessing) +[wp] Running WP plugin... +[wp] Loading driver 'share/wp.driver' +[wp] Warning: Missing RTE guards +------------------------------------------------------------ + Function main +------------------------------------------------------------ + +Goal Check 'c1' (file tests/wp_acsl/checks.i, line 14): +Prove: P_P. + +------------------------------------------------------------ + +Goal Assertion 'a1' (file tests/wp_acsl/checks.i, line 15): +Prove: P_P. + +------------------------------------------------------------ + +Goal Check 'c2' (file tests/wp_acsl/checks.i, line 16): +Prove: true. + +------------------------------------------------------------ + +Goal Assertion 'a2' (file tests/wp_acsl/checks.i, line 17): +Prove: true. + +------------------------------------------------------------ diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/checks.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/checks.res.oracle new file mode 100644 index 00000000000..7f27fd0f13f --- /dev/null +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/checks.res.oracle @@ -0,0 +1,50 @@ +# frama-c -wp -wp-timeout 90 -wp-steps 5 [...] +[kernel] Parsing tests/wp_acsl/checks.i (no preprocessing) +[wp] Running WP plugin... +[wp] Loading driver 'share/wp.driver' +[wp] Warning: Missing RTE guards +[wp] 4 goals scheduled +[wp] [Alt-Ergo] Goal typed_main_check_c1 : Unsuccess +[wp] [Alt-Ergo] Goal typed_main_assert_a1 : Unsuccess +[wp] [Qed] Goal typed_main_check_c2 : Valid +[wp] [Qed] Goal typed_main_assert_a2 : Valid +[wp] Proved goals: 2 / 4 + Qed: 2 + Alt-Ergo: 0 (unsuccess: 2) +[wp] Report in: 'tests/wp_acsl/oracle_qualif/checks.0.report.json' +[wp] Report out: 'tests/wp_acsl/result_qualif/checks.0.report.json' +------------------------------------------------------------- +Functions WP Alt-Ergo Total Success +main 2 - 4 50.0% +------------------------------------------------------------- +[report] Computing properties status... +-------------------------------------------------------------------------------- +--- Global Properties +-------------------------------------------------------------------------------- + +[ Valid ] Axiomatic 'A' + by Frama-C kernel. + +-------------------------------------------------------------------------------- +--- Properties of Function 'main' +-------------------------------------------------------------------------------- + +[ - ] Check 'c1' (file tests/wp_acsl/checks.i, line 14) + tried with Wp.typed. +[ - ] Assertion 'a1' (file tests/wp_acsl/checks.i, line 15) + tried with Wp.typed. +[ Partial ] Check 'c2' (file tests/wp_acsl/checks.i, line 16) + By Wp.typed, with pending: + - Assertion 'a1' (file tests/wp_acsl/checks.i, line 15) +[ Partial ] Assertion 'a2' (file tests/wp_acsl/checks.i, line 17) + By Wp.typed, with pending: + - Assertion 'a1' (file tests/wp_acsl/checks.i, line 15) + +-------------------------------------------------------------------------------- +--- Status Report Summary +-------------------------------------------------------------------------------- + 1 Completely validated + 2 Locally validated + 2 To be validated + 5 Total +-------------------------------------------------------------------------------- -- GitLab From 93d8d0ee23e6e2c299435440cbfb0ff0246695b8 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Mon, 4 Mar 2019 14:57:03 +0100 Subject: [PATCH 086/376] [wp] code annot names for -wp-prop option --- src/plugins/wp/wpPropId.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/wp/wpPropId.ml b/src/plugins/wp/wpPropId.ml index da2f5d78db1..c20fbae10bf 100644 --- a/src/plugins/wp/wpPropId.ml +++ b/src/plugins/wp/wpPropId.ml @@ -420,7 +420,8 @@ let ident_names names = | _ as n -> '\"' <> (String.get n 0) ) names let code_annot_names ca = match ca.annot_content with - | AAssert (_, _, named_pred) -> "@assert"::(ident_names named_pred.pred_name) + | AAssert (_, Check, named_pred) -> "@check"::(ident_names named_pred.pred_name) + | AAssert (_, Assert, named_pred) -> "@assert"::(ident_names named_pred.pred_name) | AInvariant (_,_,named_pred) -> "@invariant"::(ident_names named_pred.pred_name) | AVariant (term, _) -> "@variant"::(ident_names term.term_name) | AExtended(_,_,(_,name,_,_,_)) -> [Printf.sprintf "@%s" name] -- GitLab From 2c94b9114810ed0346b5119dbe79e45b28b98ad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 4 Mar 2019 16:04:39 +0100 Subject: [PATCH 087/376] [wp] The selection of check assertions complies with option -wp-prop. --- .../wp/tests/wp_acsl/oracle/checks.2.res.oracle | 10 ---------- src/plugins/wp/wpAnnot.ml | 15 +++++++-------- src/plugins/wp/wp_parameters.ml | 2 +- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/src/plugins/wp/tests/wp_acsl/oracle/checks.2.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle/checks.2.res.oracle index 669139a5ea8..db600bf51f7 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle/checks.2.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle/checks.2.res.oracle @@ -7,21 +7,11 @@ Function main ------------------------------------------------------------ -Goal Check 'c1' (file tests/wp_acsl/checks.i, line 14): -Prove: P_P. - ------------------------------------------------------------- - Goal Assertion 'a1' (file tests/wp_acsl/checks.i, line 15): Prove: P_P. ------------------------------------------------------------ -Goal Check 'c2' (file tests/wp_acsl/checks.i, line 16): -Prove: true. - ------------------------------------------------------------- - Goal Assertion 'a2' (file tests/wp_acsl/checks.i, line 17): Prove: true. diff --git a/src/plugins/wp/wpAnnot.ml b/src/plugins/wp/wpAnnot.ml index 49d002429d5..5369d46e449 100644 --- a/src/plugins/wp/wpAnnot.ml +++ b/src/plugins/wp/wpAnnot.ml @@ -914,14 +914,13 @@ let get_stmt_annots config v s = in (b_acc, (a_acc, e_acc)) | TBRok | TBRpart -> let id = WpPropId.mk_assert_id config.kf s a in - let kind = - if kind = Check || Wp_parameters.Assert_check_only.get () then - WpStrategy.Agoal - else - WpStrategy.Aboth (goal_to_select config id) - in - let b_acc = WpStrategy.add_prop_assert b_acc kind kf s a p in - (b_acc, (a_acc, e_acc)) + let check = kind = Check || Wp_parameters.Assert_check_only.get () + and goal = goal_to_select config id in + if check && not goal then acc + else + let kind = WpStrategy.(if check then Agoal else Aboth goal) in + let b_acc = WpStrategy.add_prop_assert b_acc kind kf s a p in + (b_acc, (a_acc, e_acc)) in acc | AAllocation (_b_list, _frees_allocates) -> (* [PB] TODO *) acc diff --git a/src/plugins/wp/wp_parameters.ml b/src/plugins/wp/wp_parameters.ml index 9222639296b..bd5be9fa57d 100644 --- a/src/plugins/wp/wp_parameters.ml +++ b/src/plugins/wp/wp_parameters.ml @@ -100,7 +100,7 @@ module Properties = let arg_name = "p,..." let help = "Select properties having the one of the given tagnames (defaults to all properties).\n\ You may also replace the tagname by '@category' for the selection of all properties of the given category.\n\ - Accepted categories are: lemmas, requires, assigns, ensures, exits, complete_behaviors, disjoint_behaviors assert, invariant, variant, breaks, continues, returns.\n\ + Accepted categories are: lemmas, requires, assigns, ensures, exits, complete_behaviors, disjoint_behaviors, assert, check, invariant, variant, breaks, continues, returns.\n\ Starts by a minus character to remove properties from the selection." end) let () = on_reset Properties.clear -- GitLab From ca5b8000fd9d84c17201b9d37762510d450fa8fa Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Tue, 5 Mar 2019 10:17:09 +0100 Subject: [PATCH 088/376] [wp/manual] The selection of check assertions complies with option -wp-prop. --- src/plugins/wp/doc/manual/wp_plugin.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/wp/doc/manual/wp_plugin.tex b/src/plugins/wp/doc/manual/wp_plugin.tex index 6d1d1a3a70c..40d9d63d4db 100644 --- a/src/plugins/wp/doc/manual/wp_plugin.tex +++ b/src/plugins/wp/doc/manual/wp_plugin.tex @@ -754,7 +754,7 @@ interface of the programmatic API. \texttt{@<category>} of properties. \\ Recognized categories are: \texttt{@lemma}, \texttt{@requires}, \texttt{@assigns}, - \texttt{@ensures}, \texttt{@exits}, \texttt{@assert}, + \texttt{@ensures}, \texttt{@exits}, \texttt{@assert}, \texttt{@check}, \texttt{@invariant}, \texttt{@variant}, \texttt{@breaks}, \texttt{@continues}, \texttt{@returns}, \\ \texttt{\mbox{@complete\_behaviors}}, \texttt{\mbox{@disjoint\_behaviors}}. -- GitLab From 6d4ade579be6b3601d97f041f3ea7b93fb3a383d Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Wed, 6 Mar 2019 20:00:31 +0100 Subject: [PATCH 089/376] [Makefile] avoid copying cmx if only bytecode is available Thanks to Mehdi Dogguy for pointing the issue and suggesting the patch, applied to the Debian Frama-C package. --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 81d95150b29..d007948e544 100644 --- a/Makefile +++ b/Makefile @@ -1959,15 +1959,19 @@ install:: install-lib if [ -d "$(FRAMAC_PLUGIN)" ]; then \ $(CP) $(PLUGIN_DYN_CMI_LIST) $(PLUGIN_META_LIST) \ $(FRAMAC_PLUGINDIR); \ - $(CP) $(PLUGIN_DYN_CMO_LIST) $(PLUGIN_DYN_CMX_LIST) \ - $(FRAMAC_PLUGINDIR)/top; \ + $(CP) $(PLUGIN_DYN_CMO_LIST) $(FRAMAC_PLUGINDIR)/top; \ + if [ "$(OCAMLBEST)" = "opt" ]; then \ + $(CP) $(PLUGIN_DYN_CMX_LIST) $(FRAMAC_PLUGINDIR)/top; \ + fi; \ fi $(PRINT_INSTALL) gui plug-ins if [ -d "$(FRAMAC_PLUGIN_GUI)" -a "$(PLUGIN_DYN_GUI_EXISTS)" = "yes" ]; \ then \ $(CP) $(patsubst %.cma,%.cmi,$(PLUGIN_DYN_GUI_CMO_LIST:.cmo=.cmi)) \ - $(PLUGIN_DYN_GUI_CMO_LIST) $(PLUGIN_DYN_GUI_CMX_LIST) \ - $(FRAMAC_PLUGINDIR)/gui; \ + $(PLUGIN_DYN_GUI_CMO_LIST) $(FRAMAC_PLUGINDIR)/gui; \ + if [ "$(OCAMLBEST)" = "opt" ]; then \ + $(CP) $(PLUGIN_DYN_GUI_CMX_LIST) $(FRAMAC_PLUGINDIR)/gui; \ + fi; \ fi $(PRINT_INSTALL) man pages $(CP) man/frama-c.1 $(MANDIR)/man1/frama-c.1 -- GitLab From 20d55c3b9552ecbefe532e0d05fcf13b9eb76264 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@cea.fr> Date: Thu, 7 Mar 2019 09:00:36 +0100 Subject: [PATCH 090/376] Update Changelog --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index cf1998a40a5..fc3cf71fb0f 100644 --- a/Changelog +++ b/Changelog @@ -17,6 +17,8 @@ Open Source Release <next-release> ################################## +-* Makefile [2019/03/07] Do not attempt to install .cmx on bytecode-only + architectures. Patch by M. Dogguy backported from Debian package -* Kernel [2019/03/05] Better detection of invalid goto in presence of VLA (fixes #@499) -* Obfuscator [2019/02/26] Obfuscate logic types and logic constructors. -- GitLab From 47914d501fcd5a8f9f5a1f125ba381e32a7d572a Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Wed, 6 Mar 2019 16:19:49 +0100 Subject: [PATCH 091/376] [printer] ensures labels are not put on declarations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #617 Technically, the C standard distinguishes between declarations and statements, and only the latter may have labels attached to them. Thus, printing a label directly over a `Local_init` will result in ill-formed C code. In order to avoid that, we add a dummy nop (aka `;`) in-between. A first version was done in !1518, but failed to take into account `UnspecifiedSequence` whose first element happens to be a `Local_init` 😠--- .../ast_printing/cil_printer.ml | 12 +++++-- tests/syntax/label_decl.i | 9 +++++ tests/syntax/oracle/label_decl.res.oracle | 33 +++++++++++++++++++ 3 files changed, 51 insertions(+), 3 deletions(-) diff --git a/src/kernel_services/ast_printing/cil_printer.ml b/src/kernel_services/ast_printing/cil_printer.ml index 794e1cc8d4f..a5248ccff98 100644 --- a/src/kernel_services/ast_printing/cil_printer.ml +++ b/src/kernel_services/ast_printing/cil_printer.ml @@ -418,6 +418,13 @@ let extract_acsl_list t = let is_cfg_block = function Stmt_block _ -> false | Then_with_else | Other | Body -> true +let rec has_unprotected_local_init s = + match s.skind with + | Instr (Local_init _) -> true + | UnspecifiedSequence((s,_,_,_,_) :: _) -> has_unprotected_local_init s + | Block { bscoping = false; bstmts = s :: _ } -> has_unprotected_local_init s + | _ -> false + class cil_printer () = object (self) val mutable logic_printer_enabled = true @@ -1020,9 +1027,8 @@ class cil_printer () = object (self) method stmt_labels fmt (s:stmt) = let suf = - match s.skind with - | Instr (Local_init _) -> format_of_string ";@]@ " - | _ -> format_of_string "@]@ " + if has_unprotected_local_init s then format_of_string ";@]@ " + else format_of_string "@]@ " in if s.labels <> [] then Pretty_utils.pp_list diff --git a/tests/syntax/label_decl.i b/tests/syntax/label_decl.i index a35c2dce800..f47ca2a64a6 100644 --- a/tests/syntax/label_decl.i +++ b/tests/syntax/label_decl.i @@ -2,8 +2,17 @@ MACRO: TMP @PTEST_DIR@/result/@PTEST_NAME@.i OPT: -print -then -print -ocode @TMP@ -then @TMP@ -print -ocode="" */ +struct s { int i; }; + +void s_cp (struct s *p, struct s v) { *p = v; } + void main(void) { int i = 0; label: if (i); + + struct s y; + + if ((i < 0) || (i >= 256)) + s_cp(&y, (struct s){1}); } diff --git a/tests/syntax/oracle/label_decl.res.oracle b/tests/syntax/oracle/label_decl.res.oracle index 9335e7b2570..00c3bd3ef4d 100644 --- a/tests/syntax/oracle/label_decl.res.oracle +++ b/tests/syntax/oracle/label_decl.res.oracle @@ -1,20 +1,53 @@ [kernel] Parsing tests/syntax/label_decl.i (no preprocessing) /* Generated by Frama-C */ +struct s { + int i ; +}; +void s_cp(struct s *p, struct s v) +{ + *p = v; + return; +} + void main(void) { + struct s y; int i = 0; label:; int tmp = i; + if (i < 0) goto _LOR; + else + if (i >= 256) { + _LOR:; struct s __constr_expr_0 = {.i = 1}; + s_cp(& y,__constr_expr_0); + } return; } [kernel] Parsing tests/syntax/result/label_decl.i (no preprocessing) /* Generated by Frama-C */ +struct s { + int i ; +}; +void s_cp(struct s *p, struct s v) +{ + *p = v; + return; +} + void main(void) { + struct s y; int i = 0; label: ; int tmp = i; + if (i < 0) goto _LOR; + else + if (i >= 256) { + _LOR: ; + struct s __constr_expr_0 = {.i = 1}; + s_cp(& y,__constr_expr_0); + } return; } -- GitLab From c06f0185eac2f7ec2605c3437fc4bdfdfaf338de Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Thu, 7 Mar 2019 18:09:18 +0100 Subject: [PATCH 092/376] [Eva] add wkey for signed overflow warning --- src/plugins/value/engine/evaluation.ml | 3 +- src/plugins/value/value_parameters.ml | 1 + src/plugins/value/value_parameters.mli | 3 + tests/idct/oracle/ieee_1180_1990.res.oracle | 88 ++++++++++---------- tests/sparecode/oracle/bts927.0.res.oracle | 3 +- tests/value/oracle/overflow.1.res.oracle | 12 ++- tests/value/oracle/recol.0.res.oracle | 6 +- tests/value/oracle/recol.1.res.oracle | 6 +- tests/value/oracle/volatilestruct.res.oracle | 4 +- 9 files changed, 72 insertions(+), 54 deletions(-) diff --git a/src/plugins/value/engine/evaluation.ml b/src/plugins/value/engine/evaluation.ml index abc4b8f7c02..bf0c38fa2cc 100644 --- a/src/plugins/value/engine/evaluation.ml +++ b/src/plugins/value/engine/evaluation.ml @@ -455,7 +455,8 @@ module Make else let v = Value.rewrap_integer range value in if range.Eval_typ.i_signed && not (Value.equal value v) - then Value_util.warning_once_current "2's complement assumed for overflow"; + then Value_parameters.warning ~wkey:Value_parameters.wkey_signed_overflow + ~current:true ~once:true "2's complement assumed for overflow"; return v let restrict_float ?(reduce=false) ~assume_finite expr fkind value = diff --git a/src/plugins/value/value_parameters.ml b/src/plugins/value/value_parameters.ml index 7eda5b6c514..4c5bb46a708 100644 --- a/src/plugins/value/value_parameters.ml +++ b/src/plugins/value/value_parameters.ml @@ -96,6 +96,7 @@ let wkey_missing_loop_unroll = register_warn_category "missing-loop-unroll" let () = set_warn_status wkey_missing_loop_unroll Log.Winactive let wkey_missing_loop_unroll_for = register_warn_category "missing-loop-unroll:for" let () = set_warn_status wkey_missing_loop_unroll_for Log.Winactive +let wkey_signed_overflow = register_warn_category "signed-overflow" module ForceValues = WithOutput diff --git a/src/plugins/value/value_parameters.mli b/src/plugins/value/value_parameters.mli index 66b79243da3..8d1356a799a 100644 --- a/src/plugins/value/value_parameters.mli +++ b/src/plugins/value/value_parameters.mli @@ -188,6 +188,9 @@ val wkey_missing_loop_unroll : warn_category (** Warning category used to identify for loops without unroll annotations *) val wkey_missing_loop_unroll_for : warn_category +(** Warning category for signed overflows *) +val wkey_signed_overflow : warn_category + (** Debug category used to print information about invalid pointer comparisons*) val dkey_pointer_comparison: category diff --git a/tests/idct/oracle/ieee_1180_1990.res.oracle b/tests/idct/oracle/ieee_1180_1990.res.oracle index 288eef68b4c..701da61a7a2 100644 --- a/tests/idct/oracle/ieee_1180_1990.res.oracle +++ b/tests/idct/oracle/ieee_1180_1990.res.oracle @@ -66,9 +66,11 @@ accessing uninitialized left-value. assert \initialized(&tmp1[i][j]); [eva:alarm] tests/idct/idct.c:150: Warning: accessing uninitialized left-value. assert \initialized(&tmp1[i][j]); -[eva] tests/idct/idct.c:141: Warning: 2's complement assumed for overflow +[eva:signed-overflow] tests/idct/idct.c:141: Warning: + 2's complement assumed for overflow [eva] tests/idct/idct.c:125: starting to merge loop iterations -[eva] tests/idct/idct.c:163: Warning: 2's complement assumed for overflow +[eva:signed-overflow] tests/idct/idct.c:163: Warning: + 2's complement assumed for overflow [eva:alarm] tests/idct/idct.c:163: Warning: accessing uninitialized left-value. assert \initialized(&tmp2[k][j]); [eva] tests/idct/idct.c:162: starting to merge loop iterations @@ -77,7 +79,8 @@ accessing uninitialized left-value. assert \initialized(&tmp1[i][j]); [eva:alarm] tests/idct/idct.c:166: Warning: accessing uninitialized left-value. assert \initialized(&tmp1[i][j]); -[eva] tests/idct/idct.c:176: Warning: 2's complement assumed for overflow +[eva:signed-overflow] tests/idct/idct.c:176: Warning: + 2's complement assumed for overflow [eva:alarm] tests/idct/idct.c:176: Warning: accessing uninitialized left-value. assert \initialized(&tmp1[i][j]); [eva:alarm] tests/idct/idct.c:178: Warning: @@ -116,7 +119,7 @@ [eva] tests/idct/ieee_1180_1990.c:84: starting to merge loop iterations [eva] computing for function IEEE_1180_1990_rand <- IEEE_1180_1990_mkbk <- main. Called from tests/idct/ieee_1180_1990.c:85. -[eva] tests/idct/ieee_1180_1990.c:69: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:69: Warning: 2's complement assumed for overflow [eva] Recording results for IEEE_1180_1990_rand [eva] Done for function IEEE_1180_1990_rand @@ -339,12 +342,13 @@ [eva] Done for function IEEE_1180_1990_idctf [eva] computing for function idct <- main. Called from tests/idct/ieee_1180_1990.c:214. -[eva] tests/idct/idct.c:129: Warning: 2's complement assumed for overflow +[eva:signed-overflow] tests/idct/idct.c:129: Warning: + 2's complement assumed for overflow [eva:alarm] tests/idct/idct.c:129: Warning: accessing uninitialized left-value. assert \initialized(&(*(m1 + k))[j]); [eva] Recording results for idct [eva] Done for function idct -[eva] tests/idct/ieee_1180_1990.c:218: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:218: Warning: 2's complement assumed for overflow [eva:alarm] tests/idct/ieee_1180_1990.c:218: Warning: accessing uninitialized left-value. assert \initialized(&m3[j][k]); @@ -352,21 +356,21 @@ accessing uninitialized left-value. assert \initialized(&m4[j][k]); [eva:alarm] tests/idct/ieee_1180_1990.c:219: Warning: accessing uninitialized left-value. assert \initialized(&res[0].pme[j][k]); -[eva] tests/idct/ieee_1180_1990.c:220: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:220: Warning: 2's complement assumed for overflow -[eva] tests/idct/ieee_1180_1990.c:230: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:230: Warning: 2's complement assumed for overflow [eva:alarm] tests/idct/ieee_1180_1990.c:231: Warning: accessing uninitialized left-value. assert \initialized(&res[0].pmse[j][k]); [eva] tests/idct/ieee_1180_1990.c:216: starting to merge loop iterations -[eva] tests/idct/ieee_1180_1990.c:219: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:219: Warning: 2's complement assumed for overflow -[eva] tests/idct/ieee_1180_1990.c:231: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:231: Warning: 2's complement assumed for overflow [eva] tests/idct/ieee_1180_1990.c:215: starting to merge loop iterations [eva] tests/idct/ieee_1180_1990.c:234: starting to merge loop iterations [eva] tests/idct/ieee_1180_1990.c:233: starting to merge loop iterations -[eva] tests/idct/ieee_1180_1990.c:235: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:235: Warning: 2's complement assumed for overflow [eva] computing for function IEEE_1180_1990_dctf <- main. Called from tests/idct/ieee_1180_1990.c:236. @@ -380,7 +384,7 @@ Called from tests/idct/ieee_1180_1990.c:238. [eva] Recording results for idct [eva] Done for function idct -[eva] tests/idct/ieee_1180_1990.c:242: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:242: Warning: 2's complement assumed for overflow [eva:alarm] tests/idct/ieee_1180_1990.c:242: Warning: accessing uninitialized left-value. assert \initialized(&m3[j][k]); @@ -388,16 +392,16 @@ accessing uninitialized left-value. assert \initialized(&m4[j][k]); [eva:alarm] tests/idct/ieee_1180_1990.c:243: Warning: accessing uninitialized left-value. assert \initialized(&res[3].pme[j][k]); -[eva] tests/idct/ieee_1180_1990.c:244: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:244: Warning: 2's complement assumed for overflow -[eva] tests/idct/ieee_1180_1990.c:254: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:254: Warning: 2's complement assumed for overflow [eva:alarm] tests/idct/ieee_1180_1990.c:255: Warning: accessing uninitialized left-value. assert \initialized(&res[3].pmse[j][k]); [eva] tests/idct/ieee_1180_1990.c:240: starting to merge loop iterations -[eva] tests/idct/ieee_1180_1990.c:243: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:243: Warning: 2's complement assumed for overflow -[eva] tests/idct/ieee_1180_1990.c:255: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:255: Warning: 2's complement assumed for overflow [eva] tests/idct/ieee_1180_1990.c:239: starting to merge loop iterations [eva] computing for function IEEE_1180_1990_mkbk <- main. @@ -425,7 +429,7 @@ [eva] tests/idct/ieee_1180_1990.c:259: Reusing old results for call to IEEE_1180_1990_idctf [eva] tests/idct/ieee_1180_1990.c:260: Reusing old results for call to idct -[eva] tests/idct/ieee_1180_1990.c:264: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:264: Warning: 2's complement assumed for overflow [eva:alarm] tests/idct/ieee_1180_1990.c:264: Warning: accessing uninitialized left-value. assert \initialized(&m3[j][k]); @@ -433,19 +437,19 @@ accessing uninitialized left-value. assert \initialized(&m4[j][k]); [eva:alarm] tests/idct/ieee_1180_1990.c:265: Warning: accessing uninitialized left-value. assert \initialized(&res[1].pme[j][k]); -[eva] tests/idct/ieee_1180_1990.c:266: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:266: Warning: 2's complement assumed for overflow -[eva] tests/idct/ieee_1180_1990.c:276: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:276: Warning: 2's complement assumed for overflow [eva:alarm] tests/idct/ieee_1180_1990.c:277: Warning: accessing uninitialized left-value. assert \initialized(&res[1].pmse[j][k]); [eva] tests/idct/ieee_1180_1990.c:262: starting to merge loop iterations -[eva] tests/idct/ieee_1180_1990.c:265: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:265: Warning: 2's complement assumed for overflow -[eva] tests/idct/ieee_1180_1990.c:277: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:277: Warning: 2's complement assumed for overflow [eva] tests/idct/ieee_1180_1990.c:261: starting to merge loop iterations -[eva] tests/idct/ieee_1180_1990.c:281: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:281: Warning: 2's complement assumed for overflow [eva] tests/idct/ieee_1180_1990.c:280: starting to merge loop iterations [eva] tests/idct/ieee_1180_1990.c:279: starting to merge loop iterations @@ -454,7 +458,7 @@ [eva] tests/idct/ieee_1180_1990.c:283: Reusing old results for call to IEEE_1180_1990_idctf [eva] tests/idct/ieee_1180_1990.c:284: Reusing old results for call to idct -[eva] tests/idct/ieee_1180_1990.c:288: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:288: Warning: 2's complement assumed for overflow [eva:alarm] tests/idct/ieee_1180_1990.c:288: Warning: accessing uninitialized left-value. assert \initialized(&m3[j][k]); @@ -462,16 +466,16 @@ accessing uninitialized left-value. assert \initialized(&m4[j][k]); [eva:alarm] tests/idct/ieee_1180_1990.c:289: Warning: accessing uninitialized left-value. assert \initialized(&res[4].pme[j][k]); -[eva] tests/idct/ieee_1180_1990.c:290: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:290: Warning: 2's complement assumed for overflow -[eva] tests/idct/ieee_1180_1990.c:300: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:300: Warning: 2's complement assumed for overflow [eva:alarm] tests/idct/ieee_1180_1990.c:301: Warning: accessing uninitialized left-value. assert \initialized(&res[4].pmse[j][k]); [eva] tests/idct/ieee_1180_1990.c:286: starting to merge loop iterations -[eva] tests/idct/ieee_1180_1990.c:289: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:289: Warning: 2's complement assumed for overflow -[eva] tests/idct/ieee_1180_1990.c:301: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:301: Warning: 2's complement assumed for overflow [eva] tests/idct/ieee_1180_1990.c:285: starting to merge loop iterations [eva] computing for function IEEE_1180_1990_mkbk <- main. @@ -499,7 +503,7 @@ [eva] tests/idct/ieee_1180_1990.c:305: Reusing old results for call to IEEE_1180_1990_idctf [eva] tests/idct/ieee_1180_1990.c:306: Reusing old results for call to idct -[eva] tests/idct/ieee_1180_1990.c:310: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:310: Warning: 2's complement assumed for overflow [eva:alarm] tests/idct/ieee_1180_1990.c:310: Warning: accessing uninitialized left-value. assert \initialized(&m3[j][k]); @@ -507,19 +511,19 @@ accessing uninitialized left-value. assert \initialized(&m4[j][k]); [eva:alarm] tests/idct/ieee_1180_1990.c:311: Warning: accessing uninitialized left-value. assert \initialized(&res[2].pme[j][k]); -[eva] tests/idct/ieee_1180_1990.c:312: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:312: Warning: 2's complement assumed for overflow -[eva] tests/idct/ieee_1180_1990.c:322: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:322: Warning: 2's complement assumed for overflow [eva:alarm] tests/idct/ieee_1180_1990.c:323: Warning: accessing uninitialized left-value. assert \initialized(&res[2].pmse[j][k]); [eva] tests/idct/ieee_1180_1990.c:308: starting to merge loop iterations -[eva] tests/idct/ieee_1180_1990.c:311: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:311: Warning: 2's complement assumed for overflow -[eva] tests/idct/ieee_1180_1990.c:323: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:323: Warning: 2's complement assumed for overflow [eva] tests/idct/ieee_1180_1990.c:307: starting to merge loop iterations -[eva] tests/idct/ieee_1180_1990.c:327: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:327: Warning: 2's complement assumed for overflow [eva] tests/idct/ieee_1180_1990.c:326: starting to merge loop iterations [eva] tests/idct/ieee_1180_1990.c:325: starting to merge loop iterations @@ -528,7 +532,7 @@ [eva] tests/idct/ieee_1180_1990.c:329: Reusing old results for call to IEEE_1180_1990_idctf [eva] tests/idct/ieee_1180_1990.c:330: Reusing old results for call to idct -[eva] tests/idct/ieee_1180_1990.c:334: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:334: Warning: 2's complement assumed for overflow [eva:alarm] tests/idct/ieee_1180_1990.c:334: Warning: accessing uninitialized left-value. assert \initialized(&m3[j][k]); @@ -536,16 +540,16 @@ accessing uninitialized left-value. assert \initialized(&m4[j][k]); [eva:alarm] tests/idct/ieee_1180_1990.c:335: Warning: accessing uninitialized left-value. assert \initialized(&res[5].pme[j][k]); -[eva] tests/idct/ieee_1180_1990.c:336: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:336: Warning: 2's complement assumed for overflow -[eva] tests/idct/ieee_1180_1990.c:346: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:346: Warning: 2's complement assumed for overflow [eva:alarm] tests/idct/ieee_1180_1990.c:347: Warning: accessing uninitialized left-value. assert \initialized(&res[5].pmse[j][k]); [eva] tests/idct/ieee_1180_1990.c:332: starting to merge loop iterations -[eva] tests/idct/ieee_1180_1990.c:335: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:335: Warning: 2's complement assumed for overflow -[eva] tests/idct/ieee_1180_1990.c:347: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:347: Warning: 2's complement assumed for overflow [eva] tests/idct/ieee_1180_1990.c:331: starting to merge loop iterations [eva] tests/idct/ieee_1180_1990.c:202: starting to merge loop iterations @@ -869,14 +873,14 @@ accessing uninitialized left-value. assert \initialized(&res[i].pmse[j][k]); [eva:alarm] tests/idct/ieee_1180_1990.c:368: Warning: accessing uninitialized left-value. assert \initialized(&res[i].pme[j][k]); -[eva] tests/idct/ieee_1180_1990.c:369: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:369: Warning: 2's complement assumed for overflow [eva] tests/idct/ieee_1180_1990.c:355: starting to merge loop iterations -[eva] tests/idct/ieee_1180_1990.c:357: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:357: Warning: 2's complement assumed for overflow [eva:alarm] tests/idct/ieee_1180_1990.c:358: Warning: accessing uninitialized left-value. assert \initialized(&res[i].pmse[j][k]); -[eva] tests/idct/ieee_1180_1990.c:368: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:368: Warning: 2's complement assumed for overflow [eva:alarm] tests/idct/ieee_1180_1990.c:369: Warning: accessing uninitialized left-value. assert \initialized(&res[i].pme[j][k]); @@ -885,7 +889,7 @@ [eva:alarm] tests/idct/ieee_1180_1990.c:369: Warning: accessing uninitialized left-value. assert \initialized(&res[i].pme[j][k]); [eva] tests/idct/ieee_1180_1990.c:354: starting to merge loop iterations -[eva] tests/idct/ieee_1180_1990.c:389: Warning: +[eva:signed-overflow] tests/idct/ieee_1180_1990.c:389: Warning: 2's complement assumed for overflow [eva] tests/idct/ieee_1180_1990.c:350: starting to merge loop iterations [eva] Recording results for main diff --git a/tests/sparecode/oracle/bts927.0.res.oracle b/tests/sparecode/oracle/bts927.0.res.oracle index 6148a9aa575..b0efd6f71f0 100644 --- a/tests/sparecode/oracle/bts927.0.res.oracle +++ b/tests/sparecode/oracle/bts927.0.res.oracle @@ -8,7 +8,8 @@ [eva:alarm] tests/sparecode/bts927.i:15: Warning: assertion got status unknown. [eva] computing for function f <- main. Called from tests/sparecode/bts927.i:17. -[eva] tests/sparecode/bts927.i:10: Warning: 2's complement assumed for overflow +[eva:signed-overflow] tests/sparecode/bts927.i:10: Warning: + 2's complement assumed for overflow [eva] Recording results for f [eva] Done for function f [eva] tests/sparecode/bts927.i:19: Reusing old results for call to f diff --git a/tests/value/oracle/overflow.1.res.oracle b/tests/value/oracle/overflow.1.res.oracle index 9e43466868a..baff37aa6d5 100644 --- a/tests/value/oracle/overflow.1.res.oracle +++ b/tests/value/oracle/overflow.1.res.oracle @@ -4,10 +4,14 @@ [eva] Initial state computed [eva:initial-state] Values of globals at initialization -[eva] tests/value/overflow.i:20: Warning: 2's complement assumed for overflow -[eva] tests/value/overflow.i:21: Warning: 2's complement assumed for overflow -[eva] tests/value/overflow.i:22: Warning: 2's complement assumed for overflow -[eva] tests/value/overflow.i:31: Warning: 2's complement assumed for overflow +[eva:signed-overflow] tests/value/overflow.i:20: Warning: + 2's complement assumed for overflow +[eva:signed-overflow] tests/value/overflow.i:21: Warning: + 2's complement assumed for overflow +[eva:signed-overflow] tests/value/overflow.i:22: Warning: + 2's complement assumed for overflow +[eva:signed-overflow] tests/value/overflow.i:31: Warning: + 2's complement assumed for overflow [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== diff --git a/tests/value/oracle/recol.0.res.oracle b/tests/value/oracle/recol.0.res.oracle index 39b84410b4c..18b4555af12 100644 --- a/tests/value/oracle/recol.0.res.oracle +++ b/tests/value/oracle/recol.0.res.oracle @@ -15,8 +15,10 @@ [4] ∈ {0} col_ones ∈ {0} col_123 ∈ {0} -[eva] tests/value/recol.c:30: Warning: 2's complement assumed for overflow -[eva] tests/value/recol.c:47: Warning: 2's complement assumed for overflow +[eva:signed-overflow] tests/value/recol.c:30: Warning: + 2's complement assumed for overflow +[eva:signed-overflow] tests/value/recol.c:47: Warning: + 2's complement assumed for overflow [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== diff --git a/tests/value/oracle/recol.1.res.oracle b/tests/value/oracle/recol.1.res.oracle index c0c8a0c9729..335c03f7415 100644 --- a/tests/value/oracle/recol.1.res.oracle +++ b/tests/value/oracle/recol.1.res.oracle @@ -15,8 +15,10 @@ [4] ∈ {0} col_ones ∈ {0} col_123 ∈ {0} -[eva] tests/value/recol.c:30: Warning: 2's complement assumed for overflow -[eva] tests/value/recol.c:47: Warning: 2's complement assumed for overflow +[eva:signed-overflow] tests/value/recol.c:30: Warning: + 2's complement assumed for overflow +[eva:signed-overflow] tests/value/recol.c:47: Warning: + 2's complement assumed for overflow [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== diff --git a/tests/value/oracle/volatilestruct.res.oracle b/tests/value/oracle/volatilestruct.res.oracle index 3e2d0693a16..ed81eece0db 100644 --- a/tests/value/oracle/volatilestruct.res.oracle +++ b/tests/value/oracle/volatilestruct.res.oracle @@ -53,9 +53,9 @@ s2 ∈ {0} x ∈ {0} y ∈ {0} -[eva] tests/value/volatilestruct.c:33: Warning: +[eva:signed-overflow] tests/value/volatilestruct.c:33: Warning: 2's complement assumed for overflow -[eva] tests/value/volatilestruct.c:34: Warning: +[eva:signed-overflow] tests/value/volatilestruct.c:34: Warning: 2's complement assumed for overflow [eva] Recording results for main [eva] done for function main -- GitLab From c7ae51141120e8ad263dea4e4fa7ce75210b584e Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 7 Mar 2019 18:24:25 +0100 Subject: [PATCH 093/376] [printing] distinguish between check and assert when grouping annotations --- src/kernel_services/ast_printing/description.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/kernel_services/ast_printing/description.ml b/src/kernel_services/ast_printing/description.ml index df0de122d9a..e314dca611a 100644 --- a/src/kernel_services/ast_printing/description.ml +++ b/src/kernel_services/ast_printing/description.ml @@ -466,11 +466,13 @@ let for_order k = function | [] -> [I k] | bs -> I (succ k) :: named_order bs let annot_order = function - | {annot_content=AAssert(bs,_kind,np)} -> + | {annot_content=AAssert(bs,Check,np)} -> for_order 0 bs @ named_order np.pred_name - | {annot_content=AInvariant(bs,_,np)} -> + | {annot_content=AAssert(bs,Assert,np)} -> for_order 2 bs @ named_order np.pred_name - | _ -> [I 4] + | {annot_content=AInvariant(bs,_,np)} -> + for_order 4 bs @ named_order np.pred_name + | _ -> [I 6] let loop_order = function | Id_contract (active,b) -> [B b; A active] | Id_loop _ -> [] -- GitLab From 0874d2992b32ac6ab732d2026f6c22e99ddc9559 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 7 Mar 2019 18:24:55 +0100 Subject: [PATCH 094/376] [typing] slight refactoring --- .../ast_queries/logic_typing.ml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/kernel_services/ast_queries/logic_typing.ml b/src/kernel_services/ast_queries/logic_typing.ml index e281a3b8920..49ffb79f66f 100644 --- a/src/kernel_services/ast_queries/logic_typing.ml +++ b/src/kernel_services/ast_queries/logic_typing.ml @@ -3774,21 +3774,24 @@ struct append_loop_labels (append_here_label (append_pre_label (append_init_label (Lenv.empty())))) + let assertion_kind = + function Assert -> Cil_types.Assert | Check -> Cil_types.Check + let code_annot loc current_behaviors current_return_type ca = let source = fst loc in let annot = match ca with - | AAssert (behav,Assert,p) -> - check_behavior_names loc current_behaviors behav; - Cil_types.AAssert (behav, Cil_types.Assert, predicate (code_annot_env()) p) - | AAssert (behav,Check,p) -> + | AAssert (behav,k,p) -> check_behavior_names loc current_behaviors behav; - Cil_types.AAssert (behav, Cil_types.Check, predicate (code_annot_env()) p) + Cil_types.AAssert(behav,assertion_kind k,predicate (code_annot_env()) p) | APragma (Impact_pragma sp) -> - Cil_types.APragma (Cil_types.Impact_pragma (impact_pragma (code_annot_env()) sp)) + Cil_types.APragma + (Cil_types.Impact_pragma (impact_pragma (code_annot_env()) sp)) | APragma (Slice_pragma sp) -> - Cil_types.APragma (Cil_types.Slice_pragma (slice_pragma (code_annot_env()) sp)) + Cil_types.APragma + (Cil_types.Slice_pragma (slice_pragma (code_annot_env()) sp)) | APragma (Loop_pragma lp) -> - Cil_types.APragma (Cil_types.Loop_pragma (loop_pragma (code_annot_env()) lp)) + Cil_types.APragma + (Cil_types.Loop_pragma (loop_pragma (code_annot_env()) lp)) | AStmtSpec (behav,s) -> (* function behaviors and statement behaviors are not at the same level. Do not mix them in a complete or disjoint clause -- GitLab From 736880b691364961cd8d8fb009526a5fb708044a Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@cea.fr> Date: Fri, 8 Mar 2019 09:51:24 +0100 Subject: [PATCH 095/376] Update Changelog wrt !2182 --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index fc3cf71fb0f..7ff56e51e8c 100644 --- a/Changelog +++ b/Changelog @@ -17,6 +17,8 @@ Open Source Release <next-release> ################################## +- ACSL [2019/03/08] Add check annotation, similar to assert except that + it does not introduce additional hypotheses on the program state -* Makefile [2019/03/07] Do not attempt to install .cmx on bytecode-only architectures. Patch by M. Dogguy backported from Debian package -* Kernel [2019/03/05] Better detection of invalid goto in presence of VLA -- GitLab From decd8548fc51ecbbbf424def320343626594c66f Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Tue, 5 Mar 2019 10:09:25 +0100 Subject: [PATCH 096/376] Add missing entries in the Changelog --- Changelog | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Changelog b/Changelog index 7ff56e51e8c..30e036731a7 100644 --- a/Changelog +++ b/Changelog @@ -21,17 +21,40 @@ Open Source Release <next-release> it does not introduce additional hypotheses on the program state -* Makefile [2019/03/07] Do not attempt to install .cmx on bytecode-only architectures. Patch by M. Dogguy backported from Debian package +- Libc [2019/03/05] Better specs and removal of half-implemented ifdef + that tried to take various POSIX versions into account -* Kernel [2019/03/05] Better detection of invalid goto in presence of VLA (fixes #@499) +- GUI [2019/03/04] Compatibility with lablgtk3 and improved handling of + some widgets +- ACSL [2019/03/01] Clarifies which C variables are in scope under a + \at(·,L) (#@575) +- Libc [2019/02/26] Ask clang not to warn about unknown FRAMA_C_MODEL + attribute when pre-processing frama-c's libc -* Obfuscator [2019/02/26] Obfuscate logic types and logic constructors. +-* Inout [2019/02/21] Fixes operational input on const local initialization +o RTE [2019/02/21] RTE has a static API +o Kernel [2019/02/18] When registering extended ACSL annotations, one + must now indicate whether they should have a status. +o Kernel [2019/02/05] Integer API moving closer to Zarith +- Eva [2019/01/19] New warning category for detecting loops without + 'unroll' directive +- Eva [2019/01/31] Ignore annotations with "no_eva" tag +-* ACSL [2019/01/19] Accept C identifiers that happen to be ACSL keywords + in volatile and reads clauses - Eva [2019/01/10] Improved precision on nested loops (by postponing the widening on inner loops according to -eva-widening-period). +-* Aorai [2019/01/04] Fixes #@586: avoid removing the initial state + of the automaton - Kernel [2019/01/03] Add attributes for loop statements to allow distinguishing between for, while and dowhile loops. -! Kernel [2019/01/03] Add statement attributes (sattr) to the AST. They are not printed by default, use -kernel-msg-key printer:attrs -! Kernel [2019/01/03] Improved precision of integer abstract bitwise operators. +o Kernel [2018/12/11] New functions for retrieving major and minor version +-* Kernel [2018/12/04] Fixes AST integrity check wrt volatile accesses +-* Kernel [2018/11/21] Fixes #@553 - pretty-printing of basic asm template ################################ Open Source Release 18.0 (Argon) -- GitLab From 29c3583fe04f7b32533346dc83dc2bda746bdf77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 8 Mar 2019 11:24:52 +0100 Subject: [PATCH 097/376] [Eva] Retrospectively updates the Changelog. --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index 30e036731a7..aa057af0616 100644 --- a/Changelog +++ b/Changelog @@ -52,6 +52,8 @@ o Kernel [2019/02/05] Integer API moving closer to Zarith are not printed by default, use -kernel-msg-key printer:attrs -! Kernel [2019/01/03] Improved precision of integer abstract bitwise operators. +-* Eva [2018/12/17] Fixes -eva-split-return on uninitialized or escaping + function returns when -eva-warn-copy-indeterminate is disabled. o Kernel [2018/12/11] New functions for retrieving major and minor version -* Kernel [2018/12/04] Fixes AST integrity check wrt volatile accesses -* Kernel [2018/11/21] Fixes #@553 - pretty-printing of basic asm template -- GitLab From ccef48f2c81f704686164b5a9990034eed7c195c Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Fri, 8 Mar 2019 15:48:31 +0100 Subject: [PATCH 098/376] [typing] Keep trace of all libc includes that contribute to a var definition Fixes issue #614 --- src/kernel_internals/typing/cabs2cil.ml | 12 ++++++++++-- src/kernel_internals/typing/mergecil.ml | 11 +++++++++++ src/kernel_services/ast_printing/cil_printer.ml | 4 +--- tests/libc/oracle/fc_libc.0.res.oracle | 6 ++++++ tests/syntax/libc_defs.h | 2 ++ tests/syntax/oracle/libc_defs.res.oracle | 5 +++++ 6 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 tests/syntax/libc_defs.h create mode 100644 tests/syntax/oracle/libc_defs.res.oracle diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index 320b570ab51..6cd61cd0df7 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -325,8 +325,15 @@ let process_stdlib_pragma name args = let fc_stdlib_attribute attrs = let s = get_current_stdheader () in if s = "" then attrs - else Cil.addAttribute (Attr (fc_stdlib, [AStr s])) attrs - + else begin + let payload, attrs = + if Cil.hasAttribute fc_stdlib attrs then begin + AStr s :: Cil.findAttribute fc_stdlib attrs, + Cil.dropAttribute fc_stdlib attrs + end else [AStr s], attrs + in + Cil.addAttribute (Attr (fc_stdlib, payload)) attrs + end (* ICC align/noalign pragmas (not supported by GCC/MSVC with this syntax). Implemented by translating them to 'aligned' attributes. Currently, only default and noalign are supported, not explicit alignment values. @@ -3004,6 +3011,7 @@ let makeGlobalVarinfo (isadef: bool) (vi: varinfo) : varinfo * bool = (* always favor the location of the definition.*) oldvi.vdecl <- vi.vdecl; oldvi.vdefined <- true; + oldvi.vattr <- fc_stdlib_attribute oldvi.vattr end; (* notice that [vtemp] is immutable, and cannot be updated. Hopefully, temporaries have sufficiently fresh names that this is not a problem *) diff --git a/src/kernel_internals/typing/mergecil.ml b/src/kernel_internals/typing/mergecil.ml index ca79f462689..f6b1012b319 100644 --- a/src/kernel_internals/typing/mergecil.ml +++ b/src/kernel_internals/typing/mergecil.ml @@ -1743,6 +1743,17 @@ let oneFilePass1 (f:file) : unit = end else Kernel.abort "%s" msg (* Fail if both variables are used. *) end in + if Cil.hasAttribute "fc_stdlib" oldvi.vattr then begin + let attrprm = Cil.findAttribute "fc_stdlib" oldvi.vattr in + let attrprm = + if Cil.hasAttribute "fc_stdlib" vi.vattr then begin + Cil.findAttribute "fc_stdlib" vi.vattr @ attrprm + end else attrprm + in + let attrs = Cil.dropAttribute "fc_stdlib" newrep.ndata.vattr in + let attrs = Cil.addAttribute (Attr ("fc_stdlib", attrprm)) attrs in + newrep.ndata.vattr <- attrs; + end; newrep.ndata.vdefined <- vi.vdefined || oldvi.vdefined; newrep.ndata.vreferenced <- vi.vreferenced || oldvi.vreferenced; (* We do not want to turn non-"const" globals into "const" one. That diff --git a/src/kernel_services/ast_printing/cil_printer.ml b/src/kernel_services/ast_printing/cil_printer.ml index c395c874ff0..c84b8efd2cc 100644 --- a/src/kernel_services/ast_printing/cil_printer.ml +++ b/src/kernel_services/ast_printing/cil_printer.ml @@ -109,9 +109,7 @@ let print_std_includes fmt globs = in let add_file acc g = let attrs = Cil_datatype.Global.attr g in - match Cil.findAttribute "fc_stdlib" attrs with - | [ arg ] -> extract_file acc arg - | _ -> acc + List.fold_left extract_file acc (Cil.findAttribute "fc_stdlib" attrs) in let includes = List.fold_left add_file Datatype.String.Set.empty globs in let print_one_include s = Format.fprintf fmt "#include \"%s\"@." s in diff --git a/tests/libc/oracle/fc_libc.0.res.oracle b/tests/libc/oracle/fc_libc.0.res.oracle index 15885d81a20..ea255ba6278 100644 --- a/tests/libc/oracle/fc_libc.0.res.oracle +++ b/tests/libc/oracle/fc_libc.0.res.oracle @@ -190,15 +190,20 @@ #include "alloca.h" #include "assert.c" #include "assert.h" +#include "ctype.c" #include "ctype.h" #include "dirent.h" +#include "errno.c" #include "errno.h" #include "fcntl.h" #include "fenv.c" #include "fenv.h" +#include "getopt.c" #include "getopt.h" +#include "glob.c" #include "glob.h" #include "iconv.h" +#include "inttypes.c" #include "inttypes.h" #include "libgen.h" #include "locale.c" @@ -235,6 +240,7 @@ #include "termios.h" #include "time.h" #include "unistd.h" +#include "wchar.c" #include "wchar.h" void main(void) { diff --git a/tests/syntax/libc_defs.h b/tests/syntax/libc_defs.h new file mode 100644 index 00000000000..f2c38aa03a6 --- /dev/null +++ b/tests/syntax/libc_defs.h @@ -0,0 +1,2 @@ +#include <errno.h> +#include <errno.c> diff --git a/tests/syntax/oracle/libc_defs.res.oracle b/tests/syntax/oracle/libc_defs.res.oracle new file mode 100644 index 00000000000..0705f794ef5 --- /dev/null +++ b/tests/syntax/oracle/libc_defs.res.oracle @@ -0,0 +1,5 @@ +[kernel] Parsing tests/syntax/libc_defs.h (with preprocessing) +/* Generated by Frama-C */ +#include "errno.c" +#include "errno.h" + -- GitLab From 63fa5407d58fc12865e572adb2bd3e60e6c45d0b Mon Sep 17 00:00:00 2001 From: Allan Blanchard <allan.blanchard@inria.fr> Date: Mon, 26 Nov 2018 10:16:01 +0100 Subject: [PATCH 099/376] [Kernel/test] Cil.changeTo instruction list in ghost --- tests/cil/change_to_instr.i | 17 ++++++++++++++ tests/cil/change_to_instr.ml | 17 ++++++++++++++ tests/cil/oracle/change_to_instr.res.oracle | 25 +++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 tests/cil/change_to_instr.i create mode 100644 tests/cil/change_to_instr.ml create mode 100644 tests/cil/oracle/change_to_instr.res.oracle diff --git a/tests/cil/change_to_instr.i b/tests/cil/change_to_instr.i new file mode 100644 index 00000000000..b83b32608f6 --- /dev/null +++ b/tests/cil/change_to_instr.i @@ -0,0 +1,17 @@ +/* run.config +OPT: -load-script tests/cil/change_to_instr.ml -print +*/ + + +int main(){ + int i = 0 ; + //@ ghost int j = 0 ; + + i++ ; + //@ ghost j++ ; + + { + //@ ghost int x = 0; + //@ ghost x++ ; + } +} diff --git a/tests/cil/change_to_instr.ml b/tests/cil/change_to_instr.ml new file mode 100644 index 00000000000..04d2679952d --- /dev/null +++ b/tests/cil/change_to_instr.ml @@ -0,0 +1,17 @@ +class add_skip = object(_) + inherit Visitor.frama_c_inplace + + method! vfunc f = + File.must_recompute_cfg f ; + Cil.DoChildren + + method! vinst i = + let open Cil_types in + Cil.ChangeTo [ Skip(Cil.CurrentLoc.get()) ; i ] +end + +let run () = + Visitor.visitFramacFileSameGlobals (new add_skip) (Ast.get()) + +let () = + Db.Main.extend run diff --git a/tests/cil/oracle/change_to_instr.res.oracle b/tests/cil/oracle/change_to_instr.res.oracle new file mode 100644 index 00000000000..590858bb9f0 --- /dev/null +++ b/tests/cil/oracle/change_to_instr.res.oracle @@ -0,0 +1,25 @@ +[kernel] Parsing tests/cil/change_to_instr.i (no preprocessing) +/* Generated by Frama-C */ +int main(void) +{ + int __retres; + ; + int i = 0; + /*@ ghost ; */ + /*@ ghost int j = 0; */ + ; + i ++; + /*@ ghost ; */ + /*@ ghost j ++; */ + { + /*@ ghost ; */ + /*@ ghost int x = 0; */ + /*@ ghost ; */ + /*@ ghost x ++; */ + } + ; + __retres = 0; + return __retres; +} + + -- GitLab From a8162067d77256677a8f5a47a510e625d337af0d Mon Sep 17 00:00:00 2001 From: Allan Blanchard <allan.blanchard@inria.fr> Date: Mon, 26 Nov 2018 10:16:29 +0100 Subject: [PATCH 100/376] [Kernel/test] queueInstr in ghost --- tests/cil/oracle/queue_ghost_instr.res.oracle | 25 +++++++++++++++++++ tests/cil/queue_ghost_instr.i | 17 +++++++++++++ tests/cil/queue_ghost_instr.ml | 18 +++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 tests/cil/oracle/queue_ghost_instr.res.oracle create mode 100644 tests/cil/queue_ghost_instr.i create mode 100644 tests/cil/queue_ghost_instr.ml diff --git a/tests/cil/oracle/queue_ghost_instr.res.oracle b/tests/cil/oracle/queue_ghost_instr.res.oracle new file mode 100644 index 00000000000..7f8108c3d87 --- /dev/null +++ b/tests/cil/oracle/queue_ghost_instr.res.oracle @@ -0,0 +1,25 @@ +[kernel] Parsing tests/cil/queue_ghost_instr.i (no preprocessing) +/* Generated by Frama-C */ +int main(void) +{ + int __retres; + ; + int i = 0; + /*@ ghost ; */ + /*@ ghost int j = 0; */ + ; + i ++; + /*@ ghost ; */ + /*@ ghost j ++; */ + { + /*@ ghost ; */ + /*@ ghost int x = 0; */ + /*@ ghost ; */ + /*@ ghost x ++; */ + } + ; + __retres = 0; + return __retres; +} + + diff --git a/tests/cil/queue_ghost_instr.i b/tests/cil/queue_ghost_instr.i new file mode 100644 index 00000000000..04338f314de --- /dev/null +++ b/tests/cil/queue_ghost_instr.i @@ -0,0 +1,17 @@ +/* run.config +OPT: -load-script tests/cil/queue_ghost_instr.ml -print +*/ + + +int main(){ + int i = 0 ; + //@ ghost int j = 0 ; + + i++ ; + //@ ghost j++ ; + + { + //@ ghost int x = 0; + //@ ghost x++ ; + } +} diff --git a/tests/cil/queue_ghost_instr.ml b/tests/cil/queue_ghost_instr.ml new file mode 100644 index 00000000000..c30ea64bd86 --- /dev/null +++ b/tests/cil/queue_ghost_instr.ml @@ -0,0 +1,18 @@ +class add_skip = object(this) + inherit Visitor.frama_c_inplace + + method! vfunc f = + File.must_recompute_cfg f ; + Cil.DoChildren + + method! vinst _ = + let open Cil_types in + this#queueInstr([Skip(Cil.CurrentLoc.get())]) ; + Cil.DoChildren +end + +let run () = + Visitor.visitFramacFileSameGlobals (new add_skip) (Ast.get()) + +let () = + Db.Main.extend run -- GitLab From 671dd517c2cfccce6e2818192642f07c11cbb4cd Mon Sep 17 00:00:00 2001 From: Allan Blanchard <allan.blanchard@inria.fr> Date: Mon, 26 Nov 2018 10:20:53 +0100 Subject: [PATCH 101/376] [Kernel] Assure that queued or changed instructions remains ghost when needed --- src/kernel_services/ast_queries/cil.ml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/kernel_services/ast_queries/cil.ml b/src/kernel_services/ast_queries/cil.ml index 23e9a642239..14dc2695c4b 100644 --- a/src/kernel_services/ast_queries/cil.ml +++ b/src/kernel_services/ast_queries/cil.ml @@ -277,13 +277,20 @@ let mkStmt ?(ghost=false) ?(valid_sid=false) ?(sattr=[]) (sk: stmtkind) : stmt = ghost = ghost; sattr = sattr;} -let stmt_of_instr_list ?(loc=Location.unknown) = function +(* This function is considered unsafe since the ghost parameter can only be + taken in account if the list contains at least two elements. + It should not be exposed by the API. +*) +let unsafe_stmt_of_instr_list ?(loc=Location.unknown) ?(ghost=false) = function | [] -> Instr (Skip loc) | [i] -> Instr i | il -> - let b = mkBlockNonScoping (List.map (fun i -> mkStmt (Instr i)) il) in + let b = mkBlockNonScoping (List.map (fun i -> mkStmt ~ghost (Instr i)) il) in Block b +let stmt_of_instr_list ?(loc=Location.unknown) = + unsafe_stmt_of_instr_list ~loc ~ghost:false + (**** Utility functions ******) (**** ATTRIBUTES ****) @@ -2218,8 +2225,8 @@ let flatten_transient_sub_blocks b = b.bstmts <- List.concat (List.map treat_one_stmt b.bstmts); b -let stmt_of_instr_list_visitor ?loc l = - let res = stmt_of_instr_list ?loc l in +let stmt_of_instr_list_visitor ?loc ?ghost l = + let res = unsafe_stmt_of_instr_list ?loc ?ghost l in match res with | Block b -> Block (transient_block b) | _ -> res @@ -3351,6 +3358,7 @@ and childrenExp (vis: cilVisitor) (e: exp) : exp = (* visit all nodes in a Cil statement tree in preorder *) and visitCilStmt (vis:cilVisitor) (s: stmt) : stmt = + let ghost = s.ghost in let oldloc = CurrentLoc.get () in CurrentLoc.set (Stmt.loc s) ; vis#push_stmt s; (*(vis#behavior.memo_stmt s);*) @@ -3366,8 +3374,8 @@ and childrenExp (vis: cilVisitor) (e: exp) : exp = | _ -> let b = mkBlockNonScoping - ((List.map (fun i -> mkStmt (Instr i)) !toPrepend) - @ [mkStmt res.skind]) + ((List.map (fun i -> mkStmt ~ghost (Instr i)) !toPrepend) + @ [mkStmt ~ghost res.skind]) in b.battrs <- addAttribute (Attr (vis_tmp_attr, [])) b.battrs; (* Make our statement contain the instructions to prepend *) @@ -3447,7 +3455,8 @@ and childrenExp (vis: cilVisitor) (e: exp) : exp = | Instr i -> begin match fInst i with | [i'] when i' == i -> s.skind - | il -> stmt_of_instr_list_visitor ~loc:(Cil_datatype.Instr.loc i) il + | il -> stmt_of_instr_list_visitor + ~ghost:s.ghost ~loc:(Cil_datatype.Instr.loc i) il end | Block b -> let b' = fBlock b in @@ -6638,7 +6647,8 @@ let childrenFileSameGlobals vis f = List.iter (fun s -> match s.skind with - | Instr i -> s.skind <- stmt_of_instr_list (doInstrList [i]) + | Instr i -> s.skind <- + unsafe_stmt_of_instr_list ~ghost:s.ghost (doInstrList [i]) | If (_e, tb, eb, _) -> peepHole1 doone tb.bstmts; peepHole1 doone eb.bstmts -- GitLab From 2382c6df11b2349ed0d726cc3b8449f76bc4ce8d Mon Sep 17 00:00:00 2001 From: Allan Blanchard <allan.blanchard@inria.fr> Date: Fri, 8 Feb 2019 16:00:27 +0100 Subject: [PATCH 102/376] [Kernel] Removes the unsafe function, instead adds a function for ghost stmt coherency --- src/kernel_services/ast_queries/cil.ml | 47 ++++++++++++++++---------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/src/kernel_services/ast_queries/cil.ml b/src/kernel_services/ast_queries/cil.ml index 14dc2695c4b..2c8dab8b793 100644 --- a/src/kernel_services/ast_queries/cil.ml +++ b/src/kernel_services/ast_queries/cil.ml @@ -265,6 +265,25 @@ let mkBlock (slst: stmt list) : block = let mkBlockNonScoping l = let b = mkBlock l in b.bscoping <- false; b +let rec enforceGhostStmtCoherency ?(force_ghost=false) stmt = + let force_ghost = force_ghost || stmt.ghost in + stmt.ghost <- force_ghost ; + begin match stmt.skind with + | Break(_) | Continue(_) | Goto(_) | Throw(_) + | Instr(_) | Return(_) -> () + | UnspecifiedSequence(_) -> () + | If(_, b1, b2, _) | TryFinally(b1, b2, _) | TryExcept(b1, _, b2, _) -> + enforceGhostBlockCoherency ~force_ghost b1 ; + enforceGhostBlockCoherency ~force_ghost b2 + | Switch(_, b, _, _) | Loop(_, b, _, _, _) | Block(b) -> + enforceGhostBlockCoherency ~force_ghost b + | TryCatch(b, l, _) -> + enforceGhostBlockCoherency ~force_ghost b ; + List.iter (fun (_, b) -> enforceGhostBlockCoherency ~force_ghost b) l + end +and enforceGhostBlockCoherency ?force_ghost block = + List.iter (enforceGhostStmtCoherency ?force_ghost) block.bstmts + let mkStmt ?(ghost=false) ?(valid_sid=false) ?(sattr=[]) (sk: stmtkind) : stmt = { skind = sk; labels = []; @@ -277,20 +296,13 @@ let mkStmt ?(ghost=false) ?(valid_sid=false) ?(sattr=[]) (sk: stmtkind) : stmt = ghost = ghost; sattr = sattr;} -(* This function is considered unsafe since the ghost parameter can only be - taken in account if the list contains at least two elements. - It should not be exposed by the API. -*) -let unsafe_stmt_of_instr_list ?(loc=Location.unknown) ?(ghost=false) = function +let stmt_of_instr_list ?(loc=Location.unknown) = function | [] -> Instr (Skip loc) | [i] -> Instr i | il -> - let b = mkBlockNonScoping (List.map (fun i -> mkStmt ~ghost (Instr i)) il) in + let b = mkBlockNonScoping (List.map (fun i -> mkStmt (Instr i)) il) in Block b -let stmt_of_instr_list ?(loc=Location.unknown) = - unsafe_stmt_of_instr_list ~loc ~ghost:false - (**** Utility functions ******) (**** ATTRIBUTES ****) @@ -2225,8 +2237,8 @@ let flatten_transient_sub_blocks b = b.bstmts <- List.concat (List.map treat_one_stmt b.bstmts); b -let stmt_of_instr_list_visitor ?loc ?ghost l = - let res = unsafe_stmt_of_instr_list ?loc ?ghost l in +let stmt_of_instr_list_visitor ?loc l = + let res = stmt_of_instr_list ?loc l in match res with | Block b -> Block (transient_block b) | _ -> res @@ -3455,8 +3467,7 @@ and childrenExp (vis: cilVisitor) (e: exp) : exp = | Instr i -> begin match fInst i with | [i'] when i' == i -> s.skind - | il -> stmt_of_instr_list_visitor - ~ghost:s.ghost ~loc:(Cil_datatype.Instr.loc i) il + | il -> stmt_of_instr_list_visitor ~loc:(Cil_datatype.Instr.loc i) il end | Block b -> let b' = fBlock b in @@ -3503,6 +3514,7 @@ and childrenExp (vis: cilVisitor) (e: exp) : exp = else s.skind in if skind' != s.skind then s.skind <- skind'; + enforceGhostStmtCoherency s ; (* Visit the labels *) let labels' = let fLabel = function @@ -6646,9 +6658,8 @@ let childrenFileSameGlobals vis f = in List.iter (fun s -> - match s.skind with - | Instr i -> s.skind <- - unsafe_stmt_of_instr_list ~ghost:s.ghost (doInstrList [i]) + begin match s.skind with + | Instr i -> s.skind <- stmt_of_instr_list (doInstrList [i]) | If (_e, tb, eb, _) -> peepHole1 doone tb.bstmts; peepHole1 doone eb.bstmts @@ -6667,7 +6678,9 @@ let childrenFileSameGlobals vis f = peepHole1 doone b.bstmts; peepHole1 doone h.bstmts; s.skind <- TryExcept(b, (doInstrList il, e), h, l); - | Return _ | Goto _ | Break _ | Continue _ | Throw _ -> ()) + | Return _ | Goto _ | Break _ | Continue _ | Throw _ -> () + end ; + enforceGhostStmtCoherency s) ss (* Process two statements and possibly replace them both *) -- GitLab From 6dedc3d8290652543215436dd6ddde998fe8d5d8 Mon Sep 17 00:00:00 2001 From: Allan Blanchard <allan.blanchard@inria.fr> Date: Fri, 8 Feb 2019 16:18:00 +0100 Subject: [PATCH 103/376] [Kernel/test] Adds a test case to queue_ghost_instr for stmts --- tests/cil/oracle/queue_ghost_instr.res.oracle | 4 ++++ tests/cil/queue_ghost_instr.i | 9 +++++++++ tests/cil/queue_ghost_instr.ml | 9 +++++++++ 3 files changed, 22 insertions(+) diff --git a/tests/cil/oracle/queue_ghost_instr.res.oracle b/tests/cil/oracle/queue_ghost_instr.res.oracle index 7f8108c3d87..1066baea30d 100644 --- a/tests/cil/oracle/queue_ghost_instr.res.oracle +++ b/tests/cil/oracle/queue_ghost_instr.res.oracle @@ -18,6 +18,10 @@ int main(void) /*@ ghost x ++; */ } ; + if (i) ; + /*@ ghost ; */ + /*@ ghost if (j) ; */ + ; __retres = 0; return __retres; } diff --git a/tests/cil/queue_ghost_instr.i b/tests/cil/queue_ghost_instr.i index 04338f314de..3bae2b6f40b 100644 --- a/tests/cil/queue_ghost_instr.i +++ b/tests/cil/queue_ghost_instr.i @@ -14,4 +14,13 @@ int main(){ //@ ghost int x = 0; //@ ghost x++ ; } + + if(i){ + ; + } + + /*@ ghost if(j){ + + } + */ } diff --git a/tests/cil/queue_ghost_instr.ml b/tests/cil/queue_ghost_instr.ml index c30ea64bd86..22fcc753ada 100644 --- a/tests/cil/queue_ghost_instr.ml +++ b/tests/cil/queue_ghost_instr.ml @@ -5,6 +5,15 @@ class add_skip = object(this) File.must_recompute_cfg f ; Cil.DoChildren + method! vstmt s = + let open Cil_types in + begin match s.skind with + | If(_) -> + this#queueInstr([Skip(Cil.CurrentLoc.get())]) + | _ -> () + end ; + Cil.DoChildren + method! vinst _ = let open Cil_types in this#queueInstr([Skip(Cil.CurrentLoc.get())]) ; -- GitLab From 76899c206ea362598b67034cba85e95fcfcad421 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Fri, 8 Mar 2019 18:17:17 +0100 Subject: [PATCH 104/376] [visitor] let user change the ghost status of a stmt --- src/kernel_services/ast_queries/cil.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel_services/ast_queries/cil.ml b/src/kernel_services/ast_queries/cil.ml index 2c8dab8b793..9a3e8911726 100644 --- a/src/kernel_services/ast_queries/cil.ml +++ b/src/kernel_services/ast_queries/cil.ml @@ -3370,7 +3370,6 @@ and childrenExp (vis: cilVisitor) (e: exp) : exp = (* visit all nodes in a Cil statement tree in preorder *) and visitCilStmt (vis:cilVisitor) (s: stmt) : stmt = - let ghost = s.ghost in let oldloc = CurrentLoc.get () in CurrentLoc.set (Stmt.loc s) ; vis#push_stmt s; (*(vis#behavior.memo_stmt s);*) @@ -3379,6 +3378,7 @@ and childrenExp (vis: cilVisitor) (e: exp) : exp = let res = doVisitCil vis vis#behavior.memo_stmt vis#vstmt (childrenStmt toPrepend) s in + let ghost = res.ghost in (* Now see if we have saved some instructions *) toPrepend := !toPrepend @ vis#unqueueInstr (); (match !toPrepend with -- GitLab From 9eb50bad26bbb276c3285fa28393eabbcf834c52 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Fri, 8 Mar 2019 18:18:08 +0100 Subject: [PATCH 105/376] [visitor] Coherency -> Coherence --- src/kernel_services/ast_queries/cil.ml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/kernel_services/ast_queries/cil.ml b/src/kernel_services/ast_queries/cil.ml index 9a3e8911726..79da27bd41d 100644 --- a/src/kernel_services/ast_queries/cil.ml +++ b/src/kernel_services/ast_queries/cil.ml @@ -265,7 +265,7 @@ let mkBlock (slst: stmt list) : block = let mkBlockNonScoping l = let b = mkBlock l in b.bscoping <- false; b -let rec enforceGhostStmtCoherency ?(force_ghost=false) stmt = +let rec enforceGhostStmtCoherence ?(force_ghost=false) stmt = let force_ghost = force_ghost || stmt.ghost in stmt.ghost <- force_ghost ; begin match stmt.skind with @@ -273,16 +273,16 @@ let rec enforceGhostStmtCoherency ?(force_ghost=false) stmt = | Instr(_) | Return(_) -> () | UnspecifiedSequence(_) -> () | If(_, b1, b2, _) | TryFinally(b1, b2, _) | TryExcept(b1, _, b2, _) -> - enforceGhostBlockCoherency ~force_ghost b1 ; - enforceGhostBlockCoherency ~force_ghost b2 + enforceGhostBlockCoherence ~force_ghost b1 ; + enforceGhostBlockCoherence ~force_ghost b2 | Switch(_, b, _, _) | Loop(_, b, _, _, _) | Block(b) -> - enforceGhostBlockCoherency ~force_ghost b + enforceGhostBlockCoherence ~force_ghost b | TryCatch(b, l, _) -> - enforceGhostBlockCoherency ~force_ghost b ; - List.iter (fun (_, b) -> enforceGhostBlockCoherency ~force_ghost b) l + enforceGhostBlockCoherence ~force_ghost b ; + List.iter (fun (_, b) -> enforceGhostBlockCoherence ~force_ghost b) l end -and enforceGhostBlockCoherency ?force_ghost block = - List.iter (enforceGhostStmtCoherency ?force_ghost) block.bstmts +and enforceGhostBlockCoherence ?force_ghost block = + List.iter (enforceGhostStmtCoherence ?force_ghost) block.bstmts let mkStmt ?(ghost=false) ?(valid_sid=false) ?(sattr=[]) (sk: stmtkind) : stmt = { skind = sk; @@ -3514,7 +3514,7 @@ and childrenExp (vis: cilVisitor) (e: exp) : exp = else s.skind in if skind' != s.skind then s.skind <- skind'; - enforceGhostStmtCoherency s ; + enforceGhostStmtCoherence s ; (* Visit the labels *) let labels' = let fLabel = function @@ -6680,7 +6680,7 @@ let childrenFileSameGlobals vis f = s.skind <- TryExcept(b, (doInstrList il, e), h, l); | Return _ | Goto _ | Break _ | Continue _ | Throw _ -> () end ; - enforceGhostStmtCoherency s) + enforceGhostStmtCoherence s) ss (* Process two statements and possibly replace them both *) -- GitLab From 03deb031d85bbc5c54b7363112e6dd9029785f54 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Mon, 11 Feb 2019 13:55:06 +0100 Subject: [PATCH 106/376] [Libc] add specs for rand48 and related functions --- share/libc/stdlib.h | 93 +++++++++++++++--- .../oracle/Longinit_sequencer.res.oracle | 9 ++ tests/builtins/oracle/free.res.oracle | 3 + .../builtins/oracle/linked_list.0.res.oracle | 44 ++++++++- .../builtins/oracle/linked_list.1.res.oracle | 44 ++++++++- .../builtins/oracle/linked_list.2.res.oracle | 62 +++++++++++- .../oracle/malloc-size-zero.0.res.oracle | 3 + .../oracle/malloc-size-zero.1.res.oracle | 3 + tests/builtins/oracle/realloc.res.oracle | 45 +++++++++ .../oracle/realloc_multiple.0.res.oracle | 21 ++++ .../oracle/realloc_multiple.1.res.oracle | 27 +++++ tests/builtins/oracle/strnlen.res.oracle | 3 + tests/libc/oracle/coverage.res.oracle | 2 +- tests/libc/oracle/fc_libc.0.res.oracle | 87 ++++++++-------- tests/libc/oracle/fc_libc.1.res.oracle | 98 ++++++++++++++++--- tests/libc/oracle/netdb_c.res.oracle | 1 + tests/libc/oracle/stdlib_h.res.oracle | 94 +++++++++++++++++- tests/libc/stdlib_h.c | 40 ++++++++ tests/value/oracle/gauges.res.oracle | 18 ++++ 19 files changed, 622 insertions(+), 75 deletions(-) diff --git a/share/libc/stdlib.h b/share/libc/stdlib.h index 98a172ccdb0..5d8864feeae 100644 --- a/share/libc/stdlib.h +++ b/share/libc/stdlib.h @@ -271,23 +271,9 @@ const unsigned long __fc_rand_max = __FC_RAND_MAX; */ extern int rand(void); -#ifdef _POSIX_C_SOURCE -# if _POSIX_C_SOURCE >= 200112L -/*@ assigns \result \from __fc_random_counter ; - @ assigns __fc_random_counter \from __fc_random_counter ; - @ ensures result_range: 0 <= \result < 2147483648 ; -*/ -extern long int lrand48 (void); - -/*@ assigns __fc_random_counter \from seed ; */ -extern void srand48 (long int seed); -# endif -#endif - /*@ assigns __fc_random_counter \from seed ; */ extern void srand(unsigned int seed); -#if _XOPEN_SOURCE >= 500 /*@ assigns \result \from __fc_random_counter; ensures result_range: 0 <= \result <= __fc_rand_max; @@ -296,7 +282,84 @@ extern long int random(void); /*@ assigns __fc_random_counter \from seed; */ extern void srandom(unsigned int seed); -#endif + +// used to check if some *48() functions have called the seed initializer +int __fc_random48_init __attribute__((FRAMA_C_MODEL)); + +extern unsigned short __fc_random48_counter[3] __attribute__((FRAMA_C_MODEL)); +unsigned short *__fc_p_random48_counter = __fc_random48_counter; + +/*@ + assigns __fc_random48_counter[0..2] \from seed; + assigns __fc_random48_init \from \nothing; + ensures random48_initialized: __fc_random48_init == 1; +*/ +extern void srand48 (long int seed); + +/*@ + requires initialization:initialized_seed16v: \initialized(seed16v+(0..2)); + assigns __fc_random48_counter[0..2] \from indirect:seed16v[0..2]; + assigns __fc_random48_init \from \nothing; + assigns \result \from __fc_p_random48_counter; + ensures random48_initialized: __fc_random48_init == 1; + ensures result_counter: \result == __fc_p_random48_counter; +*/ +extern unsigned short *seed48(unsigned short seed16v[3]); + +/*@ + assigns __fc_random48_counter[0..2] \from param[0..5]; + assigns __fc_random48_init \from \nothing; + ensures random48_initialized: __fc_random48_init == 1; +*/ +extern void lcong48(unsigned short param[7]); + +/*@ + requires random48_initialized: __fc_random48_init == 1; + assigns __fc_random48_counter[0..2] \from __fc_random48_counter[0..2]; + assigns \result \from __fc_random48_counter[0..2]; + ensures result_range: \is_finite(\result) && 0.0 <= \result < 1.0; +*/ +extern double drand48(void); + +/*@ + requires initialization:initialized_xsubi: \initialized(xsubi+(0..2)); + assigns __fc_random48_counter[0..2] \from __fc_random48_counter[0..2]; + assigns \result \from __fc_random48_counter[0..2]; + ensures result_range: \is_finite(\result) && 0.0 <= \result < 1.0; +*/ +extern double erand48(unsigned short xsubi[3]); + +/*@ + requires random48_initialized: __fc_random48_init == 1; + assigns __fc_random48_counter[0..2] \from __fc_random48_counter[0..2]; + assigns \result \from __fc_random48_counter[0..2]; + ensures result_range: 0 <= \result < 2147483648; +*/ +extern long int lrand48 (void); + +/*@ + requires initialization:initialized_xsubi: \initialized(xsubi+(0..2)); + assigns __fc_random48_counter[0..2] \from __fc_random48_counter[0..2]; + assigns \result \from __fc_random48_counter[0..2]; + ensures result_range: 0 <= \result < 2147483648; +*/ +extern long int nrand48 (unsigned short xsubi[3]); + +/*@ + requires random48_initialized: __fc_random48_init == 1; + assigns __fc_random48_counter[0..2] \from __fc_random48_counter[0..2]; + assigns \result \from __fc_random48_counter[0..2]; + ensures result_range: -2147483648 <= \result < 2147483648; +*/ +extern long int mrand48 (void); + +/*@ + requires initialization:initialized_xsubi: \initialized(xsubi+(0..2)); + assigns __fc_random48_counter[0..2] \from __fc_random48_counter[0..2]; + assigns \result \from __fc_random48_counter[0..2]; + ensures result_range: -2147483648 <= \result < 2147483648; +*/ +extern long int jrand48 (unsigned short xsubi[3]); /* ISO C: 7.20.3.1 */ /*@ diff --git a/tests/builtins/oracle/Longinit_sequencer.res.oracle b/tests/builtins/oracle/Longinit_sequencer.res.oracle index 6813be1ec3e..6deb10c4aea 100644 --- a/tests/builtins/oracle/Longinit_sequencer.res.oracle +++ b/tests/builtins/oracle/Longinit_sequencer.res.oracle @@ -95,6 +95,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -331,6 +334,9 @@ Values at end of function main: __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -562,6 +568,9 @@ Values at end of function main: __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} diff --git a/tests/builtins/oracle/free.res.oracle b/tests/builtins/oracle/free.res.oracle index 530cf9b1670..c3f99748ef4 100644 --- a/tests/builtins/oracle/free.res.oracle +++ b/tests/builtins/oracle/free.res.oracle @@ -18,6 +18,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} diff --git a/tests/builtins/oracle/linked_list.0.res.oracle b/tests/builtins/oracle/linked_list.0.res.oracle index c802214c1fe..a720cea4364 100644 --- a/tests/builtins/oracle/linked_list.0.res.oracle +++ b/tests/builtins/oracle/linked_list.0.res.oracle @@ -18,6 +18,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -38,7 +41,7 @@ ==END OF DUMP== [eva] computing for function malloc <- main. Called from tests/builtins/linked_list.c:41. -[eva:alarm] share/libc/stdlib.h:331: Warning: +[eva:alarm] share/libc/stdlib.h:394: Warning: function malloc, behavior allocation: postcondition 'allocation' got status unknown. [eva] Recording results for malloc [eva] Done for function malloc @@ -55,6 +58,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -88,6 +94,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -124,6 +133,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -159,6 +171,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -198,6 +213,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -235,6 +253,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -276,6 +297,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -315,6 +339,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -358,6 +385,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -399,6 +429,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -444,6 +477,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -732,6 +768,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -1022,6 +1061,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} diff --git a/tests/builtins/oracle/linked_list.1.res.oracle b/tests/builtins/oracle/linked_list.1.res.oracle index ecd278086d2..67b3d10651f 100644 --- a/tests/builtins/oracle/linked_list.1.res.oracle +++ b/tests/builtins/oracle/linked_list.1.res.oracle @@ -18,6 +18,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -38,7 +41,7 @@ ==END OF DUMP== [eva] computing for function malloc <- main. Called from tests/builtins/linked_list.c:41. -[eva:alarm] share/libc/stdlib.h:331: Warning: +[eva:alarm] share/libc/stdlib.h:394: Warning: function malloc, behavior allocation: postcondition 'allocation' got status unknown. [eva] Recording results for malloc [eva] Done for function malloc @@ -55,6 +58,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -88,6 +94,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -124,6 +133,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -159,6 +171,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -198,6 +213,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -235,6 +253,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -276,6 +297,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -315,6 +339,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -358,6 +385,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -400,6 +430,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -446,6 +479,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -486,6 +522,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -524,6 +563,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} diff --git a/tests/builtins/oracle/linked_list.2.res.oracle b/tests/builtins/oracle/linked_list.2.res.oracle index aff1af029cc..4687366532f 100644 --- a/tests/builtins/oracle/linked_list.2.res.oracle +++ b/tests/builtins/oracle/linked_list.2.res.oracle @@ -18,6 +18,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -38,7 +41,7 @@ ==END OF DUMP== [eva] computing for function malloc <- main. Called from tests/builtins/linked_list.c:41. -[eva:alarm] share/libc/stdlib.h:331: Warning: +[eva:alarm] share/libc/stdlib.h:394: Warning: function malloc, behavior allocation: postcondition 'allocation' got status unknown. [eva] Recording results for malloc [eva] Done for function malloc @@ -55,6 +58,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -87,6 +93,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -123,6 +132,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -158,6 +170,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -197,6 +212,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -234,6 +252,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -275,6 +296,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -314,6 +338,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -357,6 +384,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -398,6 +428,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -443,6 +476,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -486,6 +522,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -533,6 +572,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -578,6 +620,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -627,6 +672,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -674,6 +722,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -725,6 +776,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -774,6 +828,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -827,6 +884,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {0x7FFF} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..0xFFF] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} diff --git a/tests/builtins/oracle/malloc-size-zero.0.res.oracle b/tests/builtins/oracle/malloc-size-zero.0.res.oracle index 500a3e8e4ca..bc2ae68d215 100644 --- a/tests/builtins/oracle/malloc-size-zero.0.res.oracle +++ b/tests/builtins/oracle/malloc-size-zero.0.res.oracle @@ -56,6 +56,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} diff --git a/tests/builtins/oracle/malloc-size-zero.1.res.oracle b/tests/builtins/oracle/malloc-size-zero.1.res.oracle index 51aa2e2500e..7de8421d47e 100644 --- a/tests/builtins/oracle/malloc-size-zero.1.res.oracle +++ b/tests/builtins/oracle/malloc-size-zero.1.res.oracle @@ -35,6 +35,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} diff --git a/tests/builtins/oracle/realloc.res.oracle b/tests/builtins/oracle/realloc.res.oracle index 93405558851..9555b2ee235 100644 --- a/tests/builtins/oracle/realloc.res.oracle +++ b/tests/builtins/oracle/realloc.res.oracle @@ -15,6 +15,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -42,6 +45,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -91,6 +97,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -134,6 +143,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -164,6 +176,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -236,6 +251,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -291,6 +309,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -355,6 +376,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -383,6 +407,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -456,6 +483,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -480,6 +510,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -520,6 +553,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -559,6 +595,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -599,6 +638,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -627,6 +669,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} diff --git a/tests/builtins/oracle/realloc_multiple.0.res.oracle b/tests/builtins/oracle/realloc_multiple.0.res.oracle index 2999729e2e1..9e003300212 100644 --- a/tests/builtins/oracle/realloc_multiple.0.res.oracle +++ b/tests/builtins/oracle/realloc_multiple.0.res.oracle @@ -25,6 +25,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -60,6 +63,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -110,6 +116,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -148,6 +157,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -203,6 +215,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -246,6 +261,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -285,6 +303,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} diff --git a/tests/builtins/oracle/realloc_multiple.1.res.oracle b/tests/builtins/oracle/realloc_multiple.1.res.oracle index 6d0bc83f7e6..7f284578585 100644 --- a/tests/builtins/oracle/realloc_multiple.1.res.oracle +++ b/tests/builtins/oracle/realloc_multiple.1.res.oracle @@ -33,6 +33,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -68,6 +71,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -92,6 +98,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -152,6 +161,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -190,6 +202,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -214,6 +229,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -283,6 +301,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -330,6 +351,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -370,6 +394,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} diff --git a/tests/builtins/oracle/strnlen.res.oracle b/tests/builtins/oracle/strnlen.res.oracle index 097bcf8ac85..93b9252b532 100644 --- a/tests/builtins/oracle/strnlen.res.oracle +++ b/tests/builtins/oracle/strnlen.res.oracle @@ -38,6 +38,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} diff --git a/tests/libc/oracle/coverage.res.oracle b/tests/libc/oracle/coverage.res.oracle index 6e7f751bf3c..b43c270eb5c 100644 --- a/tests/libc/oracle/coverage.res.oracle +++ b/tests/libc/oracle/coverage.res.oracle @@ -28,7 +28,7 @@ main: 4 stmts out of 4 (100.0%) [metrics] Eva coverage statistics ======================= - Syntactically reachable functions = 2 (out of 82) + Syntactically reachable functions = 2 (out of 93) Semantically reached functions = 2 Coverage estimation = 100.0% [metrics] Statements analyzed by Eva diff --git a/tests/libc/oracle/fc_libc.0.res.oracle b/tests/libc/oracle/fc_libc.0.res.oracle index ea255ba6278..609d7872065 100644 --- a/tests/libc/oracle/fc_libc.0.res.oracle +++ b/tests/libc/oracle/fc_libc.0.res.oracle @@ -38,7 +38,7 @@ wcslen (2 calls); wcsncat (0 call); wcsncpy (0 call); wmemcpy (0 call); wmemset (0 call); - Undefined functions (377) + Undefined functions (384) ========================= FD_CLR (0 call); FD_ISSET (0 call); FD_SET (0 call); FD_ZERO (0 call); Frama_C_abort (1 call); Frama_C_char_interval (1 call); @@ -77,45 +77,46 @@ clock_nanosleep (0 call); close (0 call); closedir (0 call); closelog (0 call); connect (0 call); cos (0 call); cosf (0 call); cosl (0 call); creat (0 call); ctime (0 call); difftime (0 call); - dirname (0 call); div (0 call); dup (0 call); dup2 (0 call); execl (0 call); - execle (0 call); execlp (0 call); execv (0 call); execve (0 call); - execvp (0 call); exit (0 call); exp (0 call); expf (0 call); fabsl (0 call); - fclose (0 call); fcntl (0 call); fdopen (0 call); feof (2 calls); - feof_unlocked (0 call); ferror (2 calls); ferror_unlocked (0 call); - fflush (0 call); fgetc (1 call); fgetpos (0 call); fgets (0 call); - fgetws (0 call); fileno (0 call); fileno_unlocked (0 call); flock (0 call); - flockfile (0 call); floor (0 call); floorf (0 call); floorl (0 call); - fmod (0 call); fmodf (0 call); fopen (0 call); fork (0 call); - fputc (0 call); fputs (0 call); fread (0 call); free (1 call); - freeaddrinfo (0 call); freopen (0 call); fseek (0 call); fsetpos (0 call); - ftell (0 call); ftrylockfile (0 call); funlockfile (0 call); - fwrite (0 call); gai_strerror (0 call); getc (0 call); - getc_unlocked (0 call); getchar (0 call); getchar_unlocked (0 call); - getcwd (0 call); getegid (0 call); geteuid (0 call); getgid (0 call); - gethostname (0 call); getitimer (0 call); getopt (0 call); - getopt_long (0 call); getopt_long_only (0 call); getpgid (0 call); - getpgrp (0 call); getpid (0 call); getppid (0 call); getpriority (0 call); - getpwnam (0 call); getpwuid (0 call); getresgid (0 call); - getresuid (0 call); getrlimit (0 call); getrusage (0 call); gets (0 call); - getsid (0 call); getsockopt (0 call); gettimeofday (0 call); - getuid (0 call); gmtime (0 call); htonl (0 call); htons (0 call); - iconv (0 call); iconv_close (0 call); iconv_open (0 call); - inet_addr (2 calls); inet_ntoa (0 call); inet_ntop (0 call); - inet_pton (0 call); isascii (0 call); isatty (0 call); kill (0 call); - killpg (0 call); labs (0 call); ldiv (0 call); listen (0 call); - llabs (0 call); lldiv (0 call); localtime (0 call); log (0 call); - log10 (0 call); log10f (0 call); log10l (0 call); log2 (0 call); - log2f (0 call); log2l (0 call); logf (0 call); logl (0 call); + dirname (0 call); div (0 call); drand48 (0 call); dup (0 call); + dup2 (0 call); erand48 (0 call); execl (0 call); execle (0 call); + execlp (0 call); execv (0 call); execve (0 call); execvp (0 call); + exit (0 call); exp (0 call); expf (0 call); fabsl (0 call); fclose (0 call); + fcntl (0 call); fdopen (0 call); feof (2 calls); feof_unlocked (0 call); + ferror (2 calls); ferror_unlocked (0 call); fflush (0 call); fgetc (1 call); + fgetpos (0 call); fgets (0 call); fgetws (0 call); fileno (0 call); + fileno_unlocked (0 call); flock (0 call); flockfile (0 call); + floor (0 call); floorf (0 call); floorl (0 call); fmod (0 call); + fmodf (0 call); fopen (0 call); fork (0 call); fputc (0 call); + fputs (0 call); fread (0 call); free (1 call); freeaddrinfo (0 call); + freopen (0 call); fseek (0 call); fsetpos (0 call); ftell (0 call); + ftrylockfile (0 call); funlockfile (0 call); fwrite (0 call); + gai_strerror (0 call); getc (0 call); getc_unlocked (0 call); + getchar (0 call); getchar_unlocked (0 call); getcwd (0 call); + getegid (0 call); geteuid (0 call); getgid (0 call); gethostname (0 call); + getitimer (0 call); getopt (0 call); getopt_long (0 call); + getopt_long_only (0 call); getpgid (0 call); getpgrp (0 call); + getpid (0 call); getppid (0 call); getpriority (0 call); getpwnam (0 call); + getpwuid (0 call); getresgid (0 call); getresuid (0 call); + getrlimit (0 call); getrusage (0 call); gets (0 call); getsid (0 call); + getsockopt (0 call); gettimeofday (0 call); getuid (0 call); + gmtime (0 call); htonl (0 call); htons (0 call); iconv (0 call); + iconv_close (0 call); iconv_open (0 call); inet_addr (2 calls); + inet_ntoa (0 call); inet_ntop (0 call); inet_pton (0 call); + isascii (0 call); isatty (0 call); jrand48 (0 call); kill (0 call); + killpg (0 call); labs (0 call); lcong48 (0 call); ldiv (0 call); + listen (0 call); llabs (0 call); lldiv (0 call); localtime (0 call); + log (0 call); log10 (0 call); log10f (0 call); log10l (0 call); + log2 (0 call); log2f (0 call); log2l (0 call); logf (0 call); logl (0 call); longjmp (0 call); lrand48 (0 call); malloc (7 calls); mblen (0 call); mbstowcs (0 call); mbtowc (0 call); memoverlap (1 call); mkdir (0 call); - mkstemp (0 call); mktime (0 call); nan (0 call); nanf (0 call); - nanl (0 call); nanosleep (0 call); ntohl (0 call); ntohs (0 call); - open (0 call); openat (0 call); opendir (0 call); openlog (0 call); - pathconf (0 call); pclose (0 call); perror (0 call); pipe (0 call); - poll (0 call); popen (0 call); pow (0 call); powf (0 call); - pthread_cond_broadcast (0 call); pthread_cond_destroy (0 call); - pthread_cond_init (0 call); pthread_cond_wait (0 call); - pthread_create (0 call); pthread_join (0 call); + mkstemp (0 call); mktime (0 call); mrand48 (0 call); nan (0 call); + nanf (0 call); nanl (0 call); nanosleep (0 call); nrand48 (0 call); + ntohl (0 call); ntohs (0 call); open (0 call); openat (0 call); + opendir (0 call); openlog (0 call); pathconf (0 call); pclose (0 call); + perror (0 call); pipe (0 call); poll (0 call); popen (0 call); pow (0 call); + powf (0 call); pthread_cond_broadcast (0 call); + pthread_cond_destroy (0 call); pthread_cond_init (0 call); + pthread_cond_wait (0 call); pthread_create (0 call); pthread_join (0 call); pthread_mutex_destroy (0 call); pthread_mutex_init (0 call); pthread_mutex_lock (0 call); pthread_mutex_unlock (0 call); putc (0 call); putc_unlocked (0 call); putchar (0 call); putchar_unlocked (0 call); @@ -123,9 +124,9 @@ rand (0 call); random (0 call); read (0 call); readdir (0 call); readv (0 call); realloc (3 calls); recv (0 call); recvmsg (0 call); remove (0 call); rename (0 call); rewind (0 call); round (0 call); - roundf (0 call); roundl (0 call); select (0 call); send (0 call); - setbuf (0 call); setegid (0 call); seteuid (0 call); setgid (0 call); - sethostname (0 call); setitimer (0 call); setjmp (0 call); + roundf (0 call); roundl (0 call); seed48 (0 call); select (0 call); + send (0 call); setbuf (0 call); setegid (0 call); seteuid (0 call); + setgid (0 call); sethostname (0 call); setitimer (0 call); setjmp (0 call); setlogmask (0 call); setpgid (0 call); setpriority (0 call); setregid (0 call); setresgid (0 call); setresuid (0 call); setreuid (0 call); setrlimit (0 call); setsid (0 call); setsockopt (0 call); @@ -170,13 +171,13 @@ ============== Sloc = 1026 Decision point = 195 - Global variables = 65 + Global variables = 66 If = 186 Loop = 42 Goto = 84 Assignment = 415 Exit point = 76 - Function = 453 + Function = 460 Function call = 84 Pointer dereferencing = 157 Cyclomatic complexity = 271 diff --git a/tests/libc/oracle/fc_libc.1.res.oracle b/tests/libc/oracle/fc_libc.1.res.oracle index aecfd20abf2..14d31d68024 100644 --- a/tests/libc/oracle/fc_libc.1.res.oracle +++ b/tests/libc/oracle/fc_libc.1.res.oracle @@ -1662,17 +1662,6 @@ unsigned long const __fc_rand_max = (unsigned long)32767; */ extern int rand(void); -/*@ ensures result_range: 0 ≤ \result < 2147483648; - assigns \result, __fc_random_counter; - assigns \result \from __fc_random_counter; - assigns __fc_random_counter \from __fc_random_counter; - */ -extern long lrand48(void); - -/*@ assigns __fc_random_counter; - assigns __fc_random_counter \from seed; */ -extern void srand48(long seed); - /*@ assigns __fc_random_counter; assigns __fc_random_counter \from seed; */ extern void srand(unsigned int seed); @@ -1687,6 +1676,93 @@ extern long random(void); assigns __fc_random_counter \from seed; */ extern void srandom(unsigned int seed); +int __fc_random48_init __attribute__((__FRAMA_C_MODEL__)); +extern unsigned short __fc_random48_counter[3] __attribute__((__FRAMA_C_MODEL__)); + +unsigned short *__fc_p_random48_counter = __fc_random48_counter; +/*@ ensures random48_initialized: __fc_random48_init ≡ 1; + assigns __fc_random48_counter[0 .. 2], __fc_random48_init; + assigns __fc_random48_counter[0 .. 2] \from seed; + assigns __fc_random48_init \from \nothing; + */ +extern void srand48(long seed); + +/*@ requires + initialization: initialized_seed16v: \initialized(seed16v + (0 .. 2)); + ensures random48_initialized: __fc_random48_init ≡ 1; + ensures result_counter: \result ≡ __fc_p_random48_counter; + assigns __fc_random48_counter[0 .. 2], __fc_random48_init, \result; + assigns __fc_random48_counter[0 .. 2] + \from (indirect: *(seed16v + (0 .. 2))); + assigns __fc_random48_init \from \nothing; + assigns \result \from __fc_p_random48_counter; + */ +extern unsigned short *seed48(unsigned short * /*[3]*/ seed16v); + +/*@ ensures random48_initialized: __fc_random48_init ≡ 1; + assigns __fc_random48_counter[0 .. 2], __fc_random48_init; + assigns __fc_random48_counter[0 .. 2] \from *(param + (0 .. 5)); + assigns __fc_random48_init \from \nothing; + */ +extern void lcong48(unsigned short * /*[7]*/ param); + +/*@ requires random48_initialized: __fc_random48_init ≡ 1; + ensures result_range: \is_finite(\result) ∧ 0.0 ≤ \result < 1.0; + assigns __fc_random48_counter[0 .. 2], \result; + assigns __fc_random48_counter[0 .. 2] + \from __fc_random48_counter[0 .. 2]; + assigns \result \from __fc_random48_counter[0 .. 2]; + */ +extern double drand48(void); + +/*@ requires + initialization: initialized_xsubi: \initialized(xsubi + (0 .. 2)); + ensures result_range: \is_finite(\result) ∧ 0.0 ≤ \result < 1.0; + assigns __fc_random48_counter[0 .. 2], \result; + assigns __fc_random48_counter[0 .. 2] + \from __fc_random48_counter[0 .. 2]; + assigns \result \from __fc_random48_counter[0 .. 2]; + */ +extern double erand48(unsigned short * /*[3]*/ xsubi); + +/*@ requires random48_initialized: __fc_random48_init ≡ 1; + ensures result_range: 0 ≤ \result < 2147483648; + assigns __fc_random48_counter[0 .. 2], \result; + assigns __fc_random48_counter[0 .. 2] + \from __fc_random48_counter[0 .. 2]; + assigns \result \from __fc_random48_counter[0 .. 2]; + */ +extern long lrand48(void); + +/*@ requires + initialization: initialized_xsubi: \initialized(xsubi + (0 .. 2)); + ensures result_range: 0 ≤ \result < 2147483648; + assigns __fc_random48_counter[0 .. 2], \result; + assigns __fc_random48_counter[0 .. 2] + \from __fc_random48_counter[0 .. 2]; + assigns \result \from __fc_random48_counter[0 .. 2]; + */ +extern long nrand48(unsigned short * /*[3]*/ xsubi); + +/*@ requires random48_initialized: __fc_random48_init ≡ 1; + ensures result_range: -2147483648 ≤ \result < 2147483648; + assigns __fc_random48_counter[0 .. 2], \result; + assigns __fc_random48_counter[0 .. 2] + \from __fc_random48_counter[0 .. 2]; + assigns \result \from __fc_random48_counter[0 .. 2]; + */ +extern long mrand48(void); + +/*@ requires + initialization: initialized_xsubi: \initialized(xsubi + (0 .. 2)); + ensures result_range: -2147483648 ≤ \result < 2147483648; + assigns __fc_random48_counter[0 .. 2], \result; + assigns __fc_random48_counter[0 .. 2] + \from __fc_random48_counter[0 .. 2]; + assigns \result \from __fc_random48_counter[0 .. 2]; + */ +extern long jrand48(unsigned short * /*[3]*/ xsubi); + void *calloc(size_t nmemb, size_t size); /*@ assigns __fc_heap_status, \result; diff --git a/tests/libc/oracle/netdb_c.res.oracle b/tests/libc/oracle/netdb_c.res.oracle index 419fd8ae3f5..93b9bdbbe40 100644 --- a/tests/libc/oracle/netdb_c.res.oracle +++ b/tests/libc/oracle/netdb_c.res.oracle @@ -8,6 +8,7 @@ \return(fgets) == 0 (auto) \return(gets) == 0 (auto) \return(popen) == 0 (auto) + \return(seed48) == 0 (auto) \return(calloc) == 0 (auto) \return(malloc) == 0 (auto) \return(realloc) == 0 (auto) diff --git a/tests/libc/oracle/stdlib_h.res.oracle b/tests/libc/oracle/stdlib_h.res.oracle index f5a2bec1be1..86789f17328 100644 --- a/tests/libc/oracle/stdlib_h.res.oracle +++ b/tests/libc/oracle/stdlib_h.res.oracle @@ -238,16 +238,94 @@ [eva] tests/libc/stdlib_h.c:82: function mkstemp: precondition 'valid_template' got status valid. [eva] Done for function mkstemp +[eva] computing for function drand48 <- main. + Called from tests/libc/stdlib_h.c:86. +[eva] using specification for function drand48 +[eva:alarm] tests/libc/stdlib_h.c:86: Warning: + function drand48: precondition 'random48_initialized' got status invalid. +[eva] Done for function drand48 +[eva] computing for function lrand48 <- main. + Called from tests/libc/stdlib_h.c:90. +[eva] using specification for function lrand48 +[eva:alarm] tests/libc/stdlib_h.c:90: Warning: + function lrand48: precondition 'random48_initialized' got status invalid. +[eva] Done for function lrand48 +[eva] computing for function mrand48 <- main. + Called from tests/libc/stdlib_h.c:94. +[eva] using specification for function mrand48 +[eva:alarm] tests/libc/stdlib_h.c:94: Warning: + function mrand48: precondition 'random48_initialized' got status invalid. +[eva] Done for function mrand48 +[eva] computing for function erand48 <- main. + Called from tests/libc/stdlib_h.c:99. +[eva] using specification for function erand48 +[eva:alarm] tests/libc/stdlib_h.c:99: Warning: + function erand48: precondition 'initialization,initialized_xsubi' got status invalid. +[eva] Done for function erand48 +[eva] computing for function erand48 <- main. + Called from tests/libc/stdlib_h.c:104. +[eva] tests/libc/stdlib_h.c:104: + function erand48: precondition 'initialization,initialized_xsubi' got status valid. +[eva] Done for function erand48 +[eva] tests/libc/stdlib_h.c:105: assertion got status valid. +[eva] computing for function jrand48 <- main. + Called from tests/libc/stdlib_h.c:106. +[eva] using specification for function jrand48 +[eva] tests/libc/stdlib_h.c:106: + function jrand48: precondition 'initialization,initialized_xsubi' got status valid. +[eva] Done for function jrand48 +[eva] tests/libc/stdlib_h.c:107: assertion got status valid. +[eva] computing for function nrand48 <- main. + Called from tests/libc/stdlib_h.c:108. +[eva] using specification for function nrand48 +[eva] tests/libc/stdlib_h.c:108: + function nrand48: precondition 'initialization,initialized_xsubi' got status valid. +[eva] Done for function nrand48 +[eva] tests/libc/stdlib_h.c:109: assertion got status valid. +[eva] computing for function srand48 <- main. + Called from tests/libc/stdlib_h.c:111. +[eva] using specification for function srand48 +[eva] Done for function srand48 +[eva] computing for function seed48 <- main. + Called from tests/libc/stdlib_h.c:113. +[eva] using specification for function seed48 +[eva] tests/libc/stdlib_h.c:113: + function seed48: precondition 'initialization,initialized_seed16v' got status valid. +[eva] Done for function seed48 +[eva] computing for function lcong48 <- main. + Called from tests/libc/stdlib_h.c:115. +[eva] using specification for function lcong48 +[eva] Done for function lcong48 +[eva] computing for function drand48 <- main. + Called from tests/libc/stdlib_h.c:117. +[eva] tests/libc/stdlib_h.c:117: + function drand48: precondition 'random48_initialized' got status valid. +[eva] Done for function drand48 +[eva] tests/libc/stdlib_h.c:118: assertion got status valid. +[eva] computing for function mrand48 <- main. + Called from tests/libc/stdlib_h.c:119. +[eva] tests/libc/stdlib_h.c:119: + function mrand48: precondition 'random48_initialized' got status valid. +[eva] Done for function mrand48 +[eva] tests/libc/stdlib_h.c:120: assertion got status valid. +[eva] computing for function lrand48 <- main. + Called from tests/libc/stdlib_h.c:121. +[eva] tests/libc/stdlib_h.c:121: + function lrand48: precondition 'random48_initialized' got status valid. +[eva] Done for function lrand48 +[eva] tests/libc/stdlib_h.c:122: assertion got status valid. [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== [eva:final-states] Values at end of function main: + __fc_random48_init ∈ {1} + __fc_random48_counter[0..2] ∈ [--..--] base ∈ {0; 2; 36} sl ∈ {{ "12 34 -56" }} s ∈ {{ " 3.14 0x1.2p2" }} pl ∈ {{ "12 34 -56" + [0..--] }} q ∈ {{ " 3.14 0x1.2p2" + [0..--] }} - l ∈ [--..--] + l ∈ [0..2147483647] pll ∈ {{ "12 34 -56" + [0..--] }} ll ∈ [--..--] pul ∈ {{ "12 34 -56" + [0..--] }} @@ -256,7 +334,7 @@ ull ∈ [--..--] sd ∈ {{ " 3.14 0x1.2p2" }} pd ∈ {{ " 3.14 0x1.2p2" + [0..--] }} - d ∈ [-inf .. inf] ∪ {NaN} + d ∈ [-0. .. 1.] pld ∈ {{ " 3.14 0x1.2p2" + [0..--] }} ld ∈ [-inf .. inf] ∪ {NaN} pf ∈ {{ " 3.14 0x1.2p2" + [0..--] }} @@ -269,4 +347,16 @@ p ∈ {{ &ai[1] }} tempFilename[0..9] ∈ [--..--] r ∈ [-1..19] + xsubi[0..2] ∈ {42} + seed48v[0] ∈ {0} + [1] ∈ {4} + [2] ∈ {2} + res ∈ {{ &__fc_random48_counter[0] }} + param[0] ∈ {0} + [1] ∈ {4} + [2] ∈ {2} + [3] ∈ {0} + [4] ∈ {4} + [5] ∈ {2} + [6] ∈ {0} __retres ∈ {0} diff --git a/tests/libc/stdlib_h.c b/tests/libc/stdlib_h.c index dec6260f59f..ea1b69046d2 100644 --- a/tests/libc/stdlib_h.c +++ b/tests/libc/stdlib_h.c @@ -81,5 +81,45 @@ int main() { char tempFilename[] = "blaXXXXXX"; int r = mkstemp(tempFilename); + if (nondet) { + // should fail: seed not initialized + drand48(); + } + if (nondet) { + // should fail: seed not initialized + lrand48(); + } + if (nondet) { + // should fail: seed not initialized + mrand48(); + } + unsigned short xsubi[3]; + if (nondet) { + // should fail: xsubi + erand48(xsubi); + } + xsubi[0] = 42; + xsubi[1] = 42; + xsubi[2] = 42; + d = erand48(xsubi); + //@ assert 0.0 <= d < 1.0; + l = jrand48(xsubi); + //@ assert -2147483648 <= l < 2147483648; + l = nrand48(xsubi); + //@ assert 0 <= l < 2147483648; + + srand48(42); + unsigned short seed48v[3] = {0, 4, 2}; + unsigned short *res = seed48(seed48v); + unsigned short param[7] = {0, 4, 2, 0, 4, 2, 0}; + lcong48(param); + + d = drand48(); + //@ assert 0.0 <= d < 1.0; + l = mrand48(); + //@ assert -2147483648 <= l < 2147483648; + l = lrand48(); + //@ assert 0 <= l < 2147483648; + return 0; } diff --git a/tests/value/oracle/gauges.res.oracle b/tests/value/oracle/gauges.res.oracle index 289e246d8ac..18dd8eea6bd 100644 --- a/tests/value/oracle/gauges.res.oracle +++ b/tests/value/oracle/gauges.res.oracle @@ -364,6 +364,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -421,6 +424,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -477,6 +483,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -533,6 +542,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -595,6 +607,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -653,6 +668,9 @@ __fc_heap_status ∈ [--..--] __fc_random_counter ∈ [--..--] __fc_rand_max ∈ {32767} + __fc_random48_init ∈ {0} + __fc_random48_counter[0..2] ∈ [--..--] + __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} [1] ∈ {{ NULL ; &S_1___fc_env[0] }} [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} -- GitLab From 73bbf83f9e2fd2a52bed1ca7e7921de1a92b2ecb Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Mon, 11 Feb 2019 19:43:12 +0100 Subject: [PATCH 107/376] [Libc] add runtime test and fix several issues --- headers/header_spec.txt | 3 +- share/libc/__fc_builtin.c | 32 +- share/libc/__fc_define_fd_set_t.h | 2 +- share/libc/__fc_define_pthread_types.h | 26 +- share/libc/__fc_inet.h | 2 +- share/libc/{fc_runtime.c => __fc_runtime.c} | 4 +- share/libc/assert.c | 2 + share/libc/fenv.c | 5 +- share/libc/fenv.h | 8 +- share/libc/glob.c | 8 +- share/libc/glob.h | 2 +- share/libc/inttypes.c | 2 +- share/libc/inttypes.h | 2 +- share/libc/math.c | 4 +- share/libc/math.h | 2 +- share/libc/signal.c | 28 ++ share/libc/signal.h | 2 +- share/libc/stdlib.c | 7 +- share/libc/string.c | 10 +- .../wp_plugin/oracle/string_c.res.oracle | 88 ++-- tests/libc/check_full_libc.sh | 2 +- tests/libc/fc_libc.c | 2 +- tests/libc/oracle/coverage.res.oracle | 2 +- tests/libc/oracle/fc_libc.0.res.oracle | 119 +++--- tests/libc/oracle/fc_libc.1.res.oracle | 395 +++++++++++------- tests/libc/oracle/runtime.res.oracle | 0 tests/libc/oracle/stdlib_c.0.res.oracle | 20 +- tests/libc/oracle/stdlib_c.1.res.oracle | 20 +- tests/libc/oracle/stdlib_c.2.res.oracle | 20 +- tests/libc/oracle/string_c.res.oracle | 45 +- tests/libc/oracle/string_c_generic.res.oracle | 16 +- tests/libc/oracle/string_c_strstr.res.oracle | 2 +- tests/libc/runtime.c | 9 + 33 files changed, 537 insertions(+), 354 deletions(-) rename share/libc/{fc_runtime.c => __fc_runtime.c} (98%) create mode 100644 share/libc/signal.c create mode 100644 tests/libc/oracle/runtime.res.oracle create mode 100644 tests/libc/runtime.c diff --git a/headers/header_spec.txt b/headers/header_spec.txt index 37041b02d29..5666f1680d5 100644 --- a/headers/header_spec.txt +++ b/headers/header_spec.txt @@ -191,6 +191,7 @@ share/libc/__fc_gcc_builtins.h: CEA_LGPL share/libc/__fc_inet.h: CEA_LGPL share/libc/__fc_machdep.h: CEA_LGPL share/libc/__fc_machdep_linux_shared.h: CEA_LGPL +share/libc/__fc_runtime.c: CEA_LGPL share/libc/__fc_select.h: CEA_LGPL share/libc/__fc_string_axiomatic.h: CEA_LGPL share/libc/alloca.h: CEA_LGPL @@ -206,7 +207,6 @@ share/libc/dlfcn.h: CEA_LGPL share/libc/endian.h: CEA_LGPL share/libc/errno.c: CEA_LGPL share/libc/errno.h: CEA_LGPL -share/libc/fc_runtime.c: CEA_LGPL share/libc/fcntl.h: CEA_LGPL share/libc/features.h: CEA_LGPL share/libc/fenv.h: CEA_LGPL @@ -247,6 +247,7 @@ share/libc/resolv.h: CEA_LGPL share/libc/sched.h: CEA_LGPL share/libc/semaphore.h: CEA_LGPL share/libc/setjmp.h: CEA_LGPL +share/libc/signal.c: CEA_LGPL share/libc/signal.h: CEA_LGPL share/libc/stdarg.h: CEA_LGPL share/libc/stdbool.h: CEA_LGPL diff --git a/share/libc/__fc_builtin.c b/share/libc/__fc_builtin.c index 0c099981f98..3ec9d9c8206 100644 --- a/share/libc/__fc_builtin.c +++ b/share/libc/__fc_builtin.c @@ -31,7 +31,16 @@ __PUSH_FC_STDLIB int volatile Frama_C_entropy_source; //@ assigns Frama_C_entropy_source \from Frama_C_entropy_source; -extern void Frama_C_update_entropy(void); +void Frama_C_update_entropy(void) { + Frama_C_entropy_source = Frama_C_entropy_source; +} + +void Frama_C_make_unknown(char *p, size_t l) { + Frama_C_update_entropy(); + for (size_t i = 0; i < l; i++) { + p[i] = Frama_C_entropy_source; + } +} int Frama_C_nondet(int a, int b) { @@ -57,6 +66,19 @@ int Frama_C_interval(int min, int max) return r; } +char Frama_C_char_interval(char min, char max) +{ + int r; + char aux; + Frama_C_update_entropy(); + aux = Frama_C_entropy_source; + if ((aux>=min) && (aux <=max)) + r = aux; + else + r = min; + return r; +} + float Frama_C_float_interval(float min, float max) { Frama_C_update_entropy(); @@ -69,4 +91,12 @@ double Frama_C_double_interval(double min, double max) return Frama_C_entropy_source ? min : max; } +extern void __builtin_abort(void) __attribute__((noreturn)); // GCC builtin + +void Frama_C_abort(void) +{ + __builtin_abort(); +} + + __POP_FC_STDLIB diff --git a/share/libc/__fc_define_fd_set_t.h b/share/libc/__fc_define_fd_set_t.h index 993cba5b517..6839f5bd47d 100644 --- a/share/libc/__fc_define_fd_set_t.h +++ b/share/libc/__fc_define_fd_set_t.h @@ -27,7 +27,7 @@ __PUSH_FC_STDLIB #define FD_SETSIZE 1024 #define NFDBITS (8 * sizeof(long)) __BEGIN_DECLS -typedef struct { long __fc_fd_set[FD_SETSIZE / NFDBITS]; } fd_set; +typedef struct __fc_fd_set { long __fc_fd_set[FD_SETSIZE / NFDBITS]; } fd_set; /*@ requires valid_fdset: \valid(fdset); diff --git a/share/libc/__fc_define_pthread_types.h b/share/libc/__fc_define_pthread_types.h index bd9a591bc55..4ce2bdee976 100644 --- a/share/libc/__fc_define_pthread_types.h +++ b/share/libc/__fc_define_pthread_types.h @@ -29,22 +29,22 @@ __BEGIN_DECLS // stronger typing constraints #ifndef __have_pthread_attr_t -typedef struct { int _fc; } pthread_attr_t; +typedef struct __fc_pthread_attr_t { int _fc; } pthread_attr_t; #define __have_pthread_attr_t #endif -typedef struct { int _fc; } pthread_barrier_t; -typedef struct { int _fc; } pthread_barrierattr_t; -typedef struct { int _fc; } pthread_cond_t; -typedef struct { int _fc; } pthread_condattr_t; -typedef struct { int _fc; } pthread_key_t; -typedef struct { int _fc; } pthread_mutex_t; -typedef struct { int _fc; } pthread_mutexattr_t; -typedef struct { int _fc; } pthread_once_t; -typedef struct { int _fc; } pthread_rwlock_t; -typedef struct { int _fc; } pthread_rwlockattr_t; -typedef struct { int _fc; } pthread_spinlock_t; -typedef struct { int _fc; } pthread_t; +typedef struct __fc_pthread_barrier_t { int _fc; } pthread_barrier_t; +typedef struct __fc_pthread_barrierattr_t { int _fc; } pthread_barrierattr_t; +typedef struct __fc_pthread_cond_t { int _fc; } pthread_cond_t; +typedef struct __fc_pthread_condattr_t { int _fc; } pthread_condattr_t; +typedef struct __fc_pthread_key_t { int _fc; } pthread_key_t; +typedef struct __fc_pthread_mutex_t { int _fc; } pthread_mutex_t; +typedef struct __fc_pthread_mutexattr_t { int _fc; } pthread_mutexattr_t; +typedef struct __fc_pthread_once_t { int _fc; } pthread_once_t; +typedef struct __fc_pthread_rwlock_t { int _fc; } pthread_rwlock_t; +typedef struct __fc_pthread_rwlockattr_t { int _fc; } pthread_rwlockattr_t; +typedef struct __fc_pthread_spinlock_t { int _fc; } pthread_spinlock_t; +typedef struct __fc_pthread_t { int _fc; } pthread_t; __END_DECLS __POP_FC_STDLIB #endif diff --git a/share/libc/__fc_inet.h b/share/libc/__fc_inet.h index 07fe52fccc6..5c94db3ffab 100644 --- a/share/libc/__fc_inet.h +++ b/share/libc/__fc_inet.h @@ -103,7 +103,7 @@ struct in6_pktinfo /* Standard well-defined IP protocols. */ -enum +enum __fc_ipproto { IPPROTO_IP = 0, /* Dummy protocol for TCP. */ #define IPPROTO_IP IPPROTO_IP diff --git a/share/libc/fc_runtime.c b/share/libc/__fc_runtime.c similarity index 98% rename from share/libc/fc_runtime.c rename to share/libc/__fc_runtime.c index 8890a09a751..b51db45b40c 100644 --- a/share/libc/fc_runtime.c +++ b/share/libc/__fc_runtime.c @@ -20,7 +20,7 @@ /* */ /**************************************************************************/ -#include "__fc_builtin.h" +#include "__fc_builtin.c" #include "assert.c" #include "ctype.c" #include "errno.c" @@ -31,8 +31,8 @@ #include "locale.c" #include "math.c" #include "netdb.c" +#include "signal.c" #include "stdio.c" #include "stdlib.c" #include "string.c" #include "wchar.c" -#include "__fc_builtin.c" diff --git a/share/libc/assert.c b/share/libc/assert.c index cfbf8e50d00..b25057e0ed7 100644 --- a/share/libc/assert.c +++ b/share/libc/assert.c @@ -29,7 +29,9 @@ extern void Frama_C_show_each_warning(); void __FC_assert(int c,const char* file,int line,const char*expr) { if (!c) { +#ifdef __FRAMAC__ Frama_C_show_each_warning("Assertion may fail",file,line,expr); +#endif Frama_C_abort (); } } diff --git a/share/libc/fenv.c b/share/libc/fenv.c index 9f34644e7d4..1a4717be7f7 100644 --- a/share/libc/fenv.c +++ b/share/libc/fenv.c @@ -50,7 +50,7 @@ volatile fenv_t __fc_fenv_state __attribute__((FRAMA_C_MODEL)); */ int feholdexcept( fenv_t *envp ) { - *envp = (fenv_t)__fc_fenv_state; /* store the current FPU environment */ + *envp = __fc_fenv_state; /* store the current FPU environment */ return 0; } @@ -63,9 +63,10 @@ int feholdexcept( fenv_t *envp ) * exceptions: If envp contains a raised exception flag and at the same time * unmasks that exception type, then this will cause an interrupt. */ -void fesetenv( const fenv_t *envp ) +int fesetenv( const fenv_t *envp ) { __fc_fenv_state = *envp; + return 0; } __POP_FC_STDLIB diff --git a/share/libc/fenv.h b/share/libc/fenv.h index 4fb6dacdd29..a99347bfc31 100644 --- a/share/libc/fenv.h +++ b/share/libc/fenv.h @@ -30,7 +30,7 @@ __BEGIN_DECLS /* Define bits representing the exception. We use the bit positions of the appropriate bits in the FPU control word. */ -enum +enum __fc_fe_error { FE_INVALID = 0x01, #define FE_INVALID FE_INVALID @@ -52,7 +52,7 @@ enum corresponds to the layout of the block written by the `fstenv' instruction and has additional fields for the contents of the MXCSR register as written by the `stmxcsr' instruction. */ -typedef struct +typedef struct __fc_fenv_t { unsigned short int __control_word; unsigned short int __unused1; @@ -97,11 +97,11 @@ extern int feholdexcept( fenv_t *envp ); * exceptions: If envp contains a raised exception flag and at the same time * unmasks that exception type, then this will cause an interrupt. */ -extern void fesetenv( const fenv_t *envp ); +extern int fesetenv( const fenv_t *envp ); /** Clears the supported floating-point exceptions represented by argument. */ -extern void feclearexcept( int excepts ); +extern int feclearexcept( int excepts ); __END_DECLS diff --git a/share/libc/glob.c b/share/libc/glob.c index 05377dfe093..c3907485b41 100644 --- a/share/libc/glob.c +++ b/share/libc/glob.c @@ -20,8 +20,8 @@ /* */ /**************************************************************************/ -#include <glob.h> -#include <stdlib.h> +#include "glob.h" +#include "stdlib.h" #include "__fc_builtin.h" __PUSH_FC_STDLIB @@ -41,7 +41,7 @@ int glob(const char *pattern, int flags, while (pglob->gl_pathv[reserve_offs+prev_len]) prev_len++; // path points to pglob->gl_pathv if GLOB_APPEND, or NULL otherwise - char **path = flags & GLOB_APPEND ? &pglob->gl_pathv : NULL; + char **path = flags & GLOB_APPEND ? pglob->gl_pathv : NULL; if (pglob->gl_pathc == 0) { // no results found if (flags & GLOB_NOCHECK) { // allocate 1 slot per reserved offset, + previous length, @@ -52,7 +52,7 @@ int glob(const char *pattern, int flags, if (!pglob->gl_pathv) return GLOB_NOSPACE; // 0-init reserved offsets for (size_t i = 0; i < reserve_offs; i++) pglob->gl_pathv[i] = 0; - pglob->gl_pathv[reserve_offs + prev_len] = pattern; + pglob->gl_pathv[reserve_offs + prev_len] = (char*)pattern; pglob->gl_pathv[reserve_offs + prev_len + 1] = 0; // terminator return 0; } else { diff --git a/share/libc/glob.h b/share/libc/glob.h index cafe8f453c4..be325cd6cb2 100644 --- a/share/libc/glob.h +++ b/share/libc/glob.h @@ -43,7 +43,7 @@ __PUSH_FC_STDLIB __BEGIN_DECLS -typedef struct { +typedef struct __fc_glob_t { __SIZE_T gl_pathc; /* Count of paths matched by the pattern. */ char **gl_pathv; /* List of matched pathnames. */ __SIZE_T gl_offs; /* Slots to reserve in `gl_pathv'. */ diff --git a/share/libc/inttypes.c b/share/libc/inttypes.c index a12156da2f0..f110cfdbcaf 100644 --- a/share/libc/inttypes.c +++ b/share/libc/inttypes.c @@ -33,6 +33,6 @@ imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom){ r.quot=numer/denom; r.rem=numer%denom; return r; -}; +} __POP_FC_STDLIB diff --git a/share/libc/inttypes.h b/share/libc/inttypes.h index 7a5a4f1396b..be311683106 100644 --- a/share/libc/inttypes.h +++ b/share/libc/inttypes.h @@ -246,7 +246,7 @@ __PUSH_FC_STDLIB __BEGIN_DECLS -typedef struct +typedef struct __fc_imaxdiv_t { intmax_t quot; /* Quotient. */ intmax_t rem; /* Remainder. */ diff --git a/share/libc/math.c b/share/libc/math.c index dbe443de13f..95182ad6225 100644 --- a/share/libc/math.c +++ b/share/libc/math.c @@ -44,7 +44,7 @@ float fabsf(float x) int __finitef(float f) { - union { float f ; unsigned short w[2] ; } u ; + union __fc_u_finitef { float f ; unsigned short w[2] ; } u ; unsigned short usExp ; u.f = f ; /* Initilize for word access */ @@ -57,7 +57,7 @@ int __finitef(float f) int __finite(double d) { - union { double d ; unsigned short w[4] ; } u ; + union __fc_u_finite { double d ; unsigned short w[4] ; } u ; unsigned short usExp ; u.d = d ; /* Initilize for word access */ diff --git a/share/libc/math.h b/share/libc/math.h index f8d414b78b5..ff121459534 100644 --- a/share/libc/math.h +++ b/share/libc/math.h @@ -65,7 +65,7 @@ typedef double double_t; #define FP_SUBNORMAL 3 #define FP_NORMAL 4 -#include <float.h> // for DBL_MIN and FLT_MIN +#include "float.h" // for DBL_MIN and FLT_MIN /*@ assigns \result \from x; diff --git a/share/libc/signal.c b/share/libc/signal.c new file mode 100644 index 00000000000..ad8a67724a2 --- /dev/null +++ b/share/libc/signal.c @@ -0,0 +1,28 @@ +/**************************************************************************/ +/* */ +/* This file is part of Frama-C. */ +/* */ +/* Copyright (C) 2007-2019 */ +/* CEA (Commissariat à l'énergie atomique et aux énergies */ +/* alternatives) */ +/* */ +/* you can redistribute it and/or modify it under the terms of the GNU */ +/* Lesser General Public License as published by the Free Software */ +/* Foundation, version 2.1. */ +/* */ +/* It is distributed in the hope that it will be useful, */ +/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* GNU Lesser General Public License for more details. */ +/* */ +/* See the GNU Lesser General Public License version 2.1 */ +/* for more details (enclosed in the file licenses/LGPLv2.1). */ +/* */ +/**************************************************************************/ + +#include "signal.h" +__PUSH_FC_STDLIB + +struct sigaction __fc_sigaction[SIGRTMAX+1]; + +__POP_FC_STDLIB diff --git a/share/libc/signal.h b/share/libc/signal.h index 458175c0aef..2605e2cea27 100644 --- a/share/libc/signal.h +++ b/share/libc/signal.h @@ -198,7 +198,7 @@ extern int sigdelset(sigset_t *set, int signum); extern int sigismember(const sigset_t *set, int signum); extern struct sigaction __fc_sigaction[SIGRTMAX+1]; -extern struct sigaction *__fc_p_sigaction = __fc_sigaction; +struct sigaction *__fc_p_sigaction = __fc_sigaction; /*@ // missing: errno may be set to EINVAL when trying to set some signals requires valid_signal: 0 <= signum <= SIGRTMAX; diff --git a/share/libc/stdlib.c b/share/libc/stdlib.c index d9c40ce3983..d779e8707e2 100644 --- a/share/libc/stdlib.c +++ b/share/libc/stdlib.c @@ -182,10 +182,9 @@ int unsetenv(const char *name) return 0; } -#ifndef __FRAMAC__ -// declar __fc_strerror to ensure GCC can compile this file (for debugging and tests) -char __fc_strerror[64]; -#endif + +unsigned short __fc_random48_counter[3]; + // Note: this implementation does not check the alignment, since it cannot // currently be specified in the memory model of most plug-ins diff --git a/share/libc/string.c b/share/libc/string.c index 06662b1f297..99e54e162ad 100644 --- a/share/libc/string.c +++ b/share/libc/string.c @@ -20,6 +20,7 @@ /* */ /**************************************************************************/ +#include "__fc_builtin.h" #include "string.h" #include "stdint.h" // for uintptr_t #include "stdlib.h" // for malloc() @@ -59,7 +60,14 @@ void* memcpy(void* restrict dest, const void* restrict src, size_t n) complete behaviors; disjoint behaviors; */ -static int memoverlap(char const *p, char const *q, size_t n); +static int memoverlap(char const *p, char const *q, size_t n) { + uintptr_t + p1 = (uintptr_t)p, p2 = (uintptr_t)(p+n), + q1 = (uintptr_t)q, q2 = (uintptr_t)(q+n); + if (p1 <= q1 && p2 > q1) return -1; + else if (q1 <= p1 && q2 > p1) return 1; + else return 0; +} void* memmove(void* dest, const void* src, size_t n) { diff --git a/src/plugins/wp/tests/wp_plugin/oracle/string_c.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/string_c.res.oracle index 4758f62552e..7de5c690d8a 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/string_c.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/string_c.res.oracle @@ -34,7 +34,7 @@ Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 32): +Goal Preservation of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 33): Let a = shift_sint8(dest_0, 0). Let a_1 = havoc(Mchar_undef_0, Mchar_0, a, n). Assume { @@ -58,7 +58,7 @@ Prove: to_uint32(1 + i) <= n. ------------------------------------------------------------ -Goal Establishment of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 32): +Goal Establishment of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 33): Assume { Type: is_uint32(n). (* Heap *) @@ -73,7 +73,7 @@ Prove: 0 <= n. ------------------------------------------------------------ -Goal Preservation of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 33): +Goal Preservation of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 34): Let a = shift_sint8(dest_0, 0). Let a_1 = havoc(Mchar_undef_0, Mchar_0, a, n). Let a_2 = a_1[shift_sint8(dest_0, i) <- a_1[shift_sint8(src_0, i)]]. @@ -100,24 +100,24 @@ Prove: a_2[shift_sint8(src_0, i_1)] = a_2[shift_sint8(dest_0, i_1)]. ------------------------------------------------------------ -Goal Establishment of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 33): +Goal Establishment of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 34): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 34) (1/3): +Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 35) (1/3): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 34) (2/3): -Effect at line 37 +Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 35) (2/3): +Effect at line 38 Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 34) (3/3): -Effect at line 38 +Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 35) (3/3): +Effect at line 39 Let a = shift_sint8(dest_0, 0). Let a_1 = havoc(Mchar_undef_0, Mchar_0, a, n). Let a_2 = shift_sint8(dest_0, i). @@ -145,12 +145,12 @@ Prove: included(a_2, 1, a, n). ------------------------------------------------------------ Goal Assigns (file FRAMAC_SHARE/libc/string.h, line 96) in 'memcpy': -Effect at line 37 +Effect at line 38 Prove: true. ------------------------------------------------------------ -Goal Decreasing of Loop variant at loop (file FRAMAC_SHARE/libc/string.c, line 37): +Goal Decreasing of Loop variant at loop (file FRAMAC_SHARE/libc/string.c, line 38): Let a = shift_sint8(dest_0, 0). Let a_1 = havoc(Mchar_undef_0, Mchar_0, a, n). Assume { @@ -174,7 +174,7 @@ Prove: i < to_uint32(1 + i). ------------------------------------------------------------ -Goal Positivity of Loop variant at loop (file FRAMAC_SHARE/libc/string.c, line 37): +Goal Positivity of Loop variant at loop (file FRAMAC_SHARE/libc/string.c, line 38): Prove: true. ------------------------------------------------------------ @@ -248,7 +248,7 @@ Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 71): +Goal Preservation of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 79): Let a = shift_sint8(dest_0, 0). Let a_1 = havoc(Mchar_undef_0, Mchar_0, a, n). Let a_2 = shift_sint8(src_0, 0). @@ -285,7 +285,7 @@ Prove: to_uint32(1 + i) <= n. ------------------------------------------------------------ -Goal Establishment of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 71): +Goal Establishment of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 79): Let a = shift_sint8(d, 0). Let a_1 = shift_sint8(s, 0). Assume { @@ -311,7 +311,7 @@ Prove: 0 <= n. ------------------------------------------------------------ -Goal Preservation of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 72): +Goal Preservation of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 80): Let a = shift_sint8(d, 0). Let a_1 = havoc(Mchar_undef_0, Mchar_0, a, n). Let a_2 = shift_sint8(s, 0). @@ -351,12 +351,12 @@ Prove: a_1[shift_sint8(d, i) <- a_1[shift_sint8(s, i)]][shift_sint8(d, i_1)] = ------------------------------------------------------------ -Goal Establishment of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 72): +Goal Establishment of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 80): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 73): +Goal Preservation of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 81): Let a = shift_sint8(d, 0). Let a_1 = havoc(Mchar_undef_0, Mchar_0, a, n). Let a_2 = shift_sint8(s, 0). @@ -396,12 +396,12 @@ Prove: a_1[shift_sint8(d, i) <- a_1[shift_sint8(s, i)]][a_3] = Mchar_0[a_3]. ------------------------------------------------------------ -Goal Establishment of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 73): +Goal Establishment of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 81): Prove: true. ------------------------------------------------------------ -Goal Preservation of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 83): +Goal Preservation of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 91): Let a = shift_sint8(dest_0, 0). Let a_1 = havoc(Mchar_undef_0, Mchar_0, a, n). Let a_2 = shift_sint8(src_0, 0). @@ -438,7 +438,7 @@ Prove: to_uint32(i - 1) < n. ------------------------------------------------------------ -Goal Establishment of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 83): +Goal Establishment of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 91): Let a = shift_sint8(d, 0). Let a_1 = shift_sint8(s, 0). Assume { @@ -464,7 +464,7 @@ Prove: to_uint32(n - 1) < n. ------------------------------------------------------------ -Goal Preservation of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 84): +Goal Preservation of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 92): Let a = shift_sint8(d, 0). Let a_1 = havoc(Mchar_undef_0, Mchar_0, a, n). Let a_2 = shift_sint8(s, 0). @@ -504,7 +504,7 @@ Prove: a_1[shift_sint8(d, i) <- a_1[shift_sint8(s, i)]][shift_sint8(d, i_1)] = ------------------------------------------------------------ -Goal Establishment of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 84): +Goal Establishment of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 92): Let a = shift_sint8(dest_0, 0). Let a_1 = shift_sint8(src_0, 0). Assume { @@ -532,7 +532,7 @@ Prove: Mchar_0[shift_sint8(src_0, i)] = Mchar_0[shift_sint8(dest_0, i)]. ------------------------------------------------------------ -Goal Preservation of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 85): +Goal Preservation of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 93): Let a = shift_sint8(d, 0). Let a_1 = havoc(Mchar_undef_0, Mchar_0, a, n). Let a_2 = shift_sint8(s, 0). @@ -572,24 +572,24 @@ Prove: a_1[shift_sint8(d, i) <- a_1[shift_sint8(s, i)]][a_3] = Mchar_0[a_3]. ------------------------------------------------------------ -Goal Establishment of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 85): +Goal Establishment of Invariant 'no_eva' (file FRAMAC_SHARE/libc/string.c, line 93): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 74) (1/3): +Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 82) (1/3): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 74) (2/3): -Effect at line 77 +Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 82) (2/3): +Effect at line 85 Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 74) (3/3): -Effect at line 78 +Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 82) (3/3): +Effect at line 86 Let a = shift_sint8(d, 0). Let a_1 = havoc(Mchar_undef_0, Mchar_0, a, n). Let a_2 = shift_sint8(src_0, 0). @@ -629,19 +629,19 @@ Prove: included(a_3, 1, a, n). ------------------------------------------------------------ -Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 86) (1/3): +Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 94) (1/3): Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 86) (2/3): -Effect at line 89 +Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 94) (2/3): +Effect at line 97 Prove: true. ------------------------------------------------------------ -Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 86) (3/3): -Effect at line 90 +Goal Loop assigns (file FRAMAC_SHARE/libc/string.c, line 94) (3/3): +Effect at line 98 Let a = shift_sint8(d, 0). Let a_1 = havoc(Mchar_undef_0, Mchar_0, a, n). Let a_2 = shift_sint8(src_0, 0). @@ -692,31 +692,31 @@ Prove: true. ------------------------------------------------------------ Goal Assigns (file FRAMAC_SHARE/libc/string.h, line 106) in 'memmove' (2/7): -Effect at line 66 +Effect at line 74 Prove: true. ------------------------------------------------------------ Goal Assigns (file FRAMAC_SHARE/libc/string.h, line 106) in 'memmove' (3/7): -Call Result at line 69 +Call Result at line 77 Prove: true. ------------------------------------------------------------ Goal Assigns (file FRAMAC_SHARE/libc/string.h, line 106) in 'memmove' (4/7): -Effect at line 77 +Effect at line 85 Prove: true. ------------------------------------------------------------ Goal Assigns (file FRAMAC_SHARE/libc/string.h, line 106) in 'memmove' (5/7): -Effect at line 89 +Effect at line 97 Prove: true. ------------------------------------------------------------ Goal Assigns (file FRAMAC_SHARE/libc/string.h, line 106) in 'memmove' (6/7): -Effect at line 91 +Effect at line 99 Let a = shift_sint8(d, 0). Let a_1 = havoc(Mchar_undef_0, Mchar_0, a, n). Let a_2 = shift_sint8(src_0, 0). @@ -756,12 +756,12 @@ Prove: 0 < n. ------------------------------------------------------------ Goal Assigns (file FRAMAC_SHARE/libc/string.h, line 106) in 'memmove' (7/7): -Effect at line 93 +Effect at line 101 Prove: true. ------------------------------------------------------------ -Goal Decreasing of Loop variant at loop (file FRAMAC_SHARE/libc/string.c, line 77): +Goal Decreasing of Loop variant at loop (file FRAMAC_SHARE/libc/string.c, line 85): Let a = shift_sint8(dest_0, 0). Let a_1 = havoc(Mchar_undef_0, Mchar_0, a, n). Let a_2 = shift_sint8(src_0, 0). @@ -798,12 +798,12 @@ Prove: i < to_uint32(1 + i). ------------------------------------------------------------ -Goal Positivity of Loop variant at loop (file FRAMAC_SHARE/libc/string.c, line 77): +Goal Positivity of Loop variant at loop (file FRAMAC_SHARE/libc/string.c, line 85): Prove: true. ------------------------------------------------------------ -Goal Decreasing of Loop variant at loop (file FRAMAC_SHARE/libc/string.c, line 89): +Goal Decreasing of Loop variant at loop (file FRAMAC_SHARE/libc/string.c, line 97): Let a = shift_sint8(dest_0, 0). Let a_1 = havoc(Mchar_undef_0, Mchar_0, a, n). Let a_2 = shift_sint8(src_0, 0). @@ -840,7 +840,7 @@ Prove: to_uint32(i - 1) < i. ------------------------------------------------------------ -Goal Positivity of Loop variant at loop (file FRAMAC_SHARE/libc/string.c, line 89): +Goal Positivity of Loop variant at loop (file FRAMAC_SHARE/libc/string.c, line 97): Prove: true. ------------------------------------------------------------ diff --git a/tests/libc/check_full_libc.sh b/tests/libc/check_full_libc.sh index c20a68fd43c..ebfc06b481c 100755 --- a/tests/libc/check_full_libc.sh +++ b/tests/libc/check_full_libc.sh @@ -11,7 +11,7 @@ done; for A in `ls *.c`; do - if ! grep -q $A fc_runtime.c ../../tests/libc/fc_libc.c ; + if ! grep -q $A __fc_runtime.c ../../tests/libc/fc_libc.c ; then echo Not included implementation \'$A\'; fi ; done; diff --git a/tests/libc/fc_libc.c b/tests/libc/fc_libc.c index 5688d0e6e4f..7f27becef31 100644 --- a/tests/libc/fc_libc.c +++ b/tests/libc/fc_libc.c @@ -18,7 +18,7 @@ #define _POSIX_C_SOURCE 200112L #define _GNU_SOURCE 1 -#include "share/libc/fc_runtime.c" +#include "share/libc/__fc_runtime.c" #include "alloca.h" #include "arpa/inet.h" diff --git a/tests/libc/oracle/coverage.res.oracle b/tests/libc/oracle/coverage.res.oracle index b43c270eb5c..420792611b3 100644 --- a/tests/libc/oracle/coverage.res.oracle +++ b/tests/libc/oracle/coverage.res.oracle @@ -28,7 +28,7 @@ main: 4 stmts out of 4 (100.0%) [metrics] Eva coverage statistics ======================= - Syntactically reachable functions = 2 (out of 93) + Syntactically reachable functions = 2 (out of 112) Semantically reached functions = 2 Coverage estimation = 100.0% [metrics] Statements analyzed by Eva diff --git a/tests/libc/oracle/fc_libc.0.res.oracle b/tests/libc/oracle/fc_libc.0.res.oracle index 609d7872065..eab1d99264c 100644 --- a/tests/libc/oracle/fc_libc.0.res.oracle +++ b/tests/libc/oracle/fc_libc.0.res.oracle @@ -13,14 +13,16 @@ [eva] ====== VALUES COMPUTED ====== [eva:final-states] Values at end of function main: -[metrics] Defined functions (76) +[metrics] Defined functions (82) ====================== + Frama_C_abort (1 call); Frama_C_char_interval (1 call); Frama_C_double_interval (0 call); Frama_C_float_interval (0 call); - Frama_C_interval (14 calls); Frama_C_nondet (12 calls); - Frama_C_nondet_ptr (0 call); __FC_assert (0 call); __fc_initenv (4 calls); - __finite (0 call); __finitef (0 call); abs (0 call); atoi (0 call); - calloc (0 call); char_equal_ignore_case (1 call); fabs (0 call); - fabsf (0 call); feholdexcept (0 call); fesetenv (0 call); + Frama_C_interval (14 calls); Frama_C_make_unknown (4 calls); + Frama_C_nondet (12 calls); Frama_C_nondet_ptr (0 call); + Frama_C_update_entropy (7 calls); __FC_assert (0 call); + __fc_initenv (4 calls); __finite (0 call); __finitef (0 call); abs (0 call); + atoi (0 call); calloc (0 call); char_equal_ignore_case (1 call); + fabs (0 call); fabsf (0 call); feholdexcept (0 call); fesetenv (0 call); fetestexcept (0 call); getaddrinfo (0 call); getenv (0 call); gethostbyname (0 call); getline (0 call); glob (0 call); globfree (0 call); imaxabs (0 call); imaxdiv (0 call); isalnum (0 call); isalpha (0 call); @@ -28,29 +30,28 @@ islower (0 call); isprint (0 call); ispunct (0 call); isspace (1 call); isupper (0 call); isxdigit (0 call); localeconv (0 call); main (0 call); memchr (0 call); memcmp (0 call); memcpy (4 calls); memmove (0 call); - memrchr (0 call); memset (1 call); posix_memalign (0 call); putenv (0 call); - res_search (1 call); setenv (0 call); setlocale (0 call); - strcasecmp (0 call); strcat (0 call); strchr (3 calls); strcmp (0 call); - strcpy (0 call); strdup (0 call); strerror (0 call); strlen (6 calls); - strncat (0 call); strncmp (0 call); strncpy (2 calls); strndup (0 call); - strnlen (0 call); strrchr (0 call); strstr (0 call); tolower (0 call); - toupper (0 call); unsetenv (0 call); wcscat (0 call); wcscpy (0 call); - wcslen (2 calls); wcsncat (0 call); wcsncpy (0 call); wmemcpy (0 call); - wmemset (0 call); + memoverlap (1 call); memrchr (0 call); memset (1 call); + posix_memalign (0 call); putenv (0 call); res_search (1 call); + setenv (0 call); setlocale (0 call); strcasecmp (0 call); strcat (0 call); + strchr (3 calls); strcmp (0 call); strcpy (0 call); strdup (0 call); + strerror (0 call); strlen (6 calls); strncat (0 call); strncmp (0 call); + strncpy (2 calls); strndup (0 call); strnlen (0 call); strrchr (0 call); + strsignal (0 call); strstr (0 call); tolower (0 call); toupper (0 call); + unsetenv (0 call); wcscat (0 call); wcscpy (0 call); wcslen (2 calls); + wcsncat (0 call); wcsncpy (0 call); wmemcpy (0 call); wmemset (0 call); - Undefined functions (384) + Undefined functions (379) ========================= FD_CLR (0 call); FD_ISSET (0 call); FD_SET (0 call); FD_ZERO (0 call); - Frama_C_abort (1 call); Frama_C_char_interval (1 call); Frama_C_int_interval (0 call); Frama_C_long_interval (0 call); - Frama_C_long_long_interval (0 call); Frama_C_make_unknown (2 calls); + Frama_C_long_long_interval (0 call); Frama_C_real_interval_as_double (0 call); Frama_C_short_interval (0 call); Frama_C_size_t_interval (0 call); Frama_C_unsigned_char_interval (0 call); Frama_C_unsigned_int_interval (0 call); Frama_C_unsigned_long_interval (0 call); Frama_C_unsigned_long_long_interval (0 call); - Frama_C_unsigned_short_interval (0 call); Frama_C_update_entropy (5 calls); - _Exit (0 call); __builtin_sadd_overflow (0 call); + Frama_C_unsigned_short_interval (0 call); _Exit (0 call); + __builtin_abort (1 call); __builtin_sadd_overflow (0 call); __builtin_saddl_overflow (0 call); __builtin_saddll_overflow (0 call); __builtin_smul_overflow (0 call); __builtin_smull_overflow (0 call); __builtin_smulll_overflow (0 call); __builtin_ssub_overflow (0 call); @@ -108,15 +109,15 @@ log (0 call); log10 (0 call); log10f (0 call); log10l (0 call); log2 (0 call); log2f (0 call); log2l (0 call); logf (0 call); logl (0 call); longjmp (0 call); lrand48 (0 call); malloc (7 calls); mblen (0 call); - mbstowcs (0 call); mbtowc (0 call); memoverlap (1 call); mkdir (0 call); - mkstemp (0 call); mktime (0 call); mrand48 (0 call); nan (0 call); - nanf (0 call); nanl (0 call); nanosleep (0 call); nrand48 (0 call); - ntohl (0 call); ntohs (0 call); open (0 call); openat (0 call); - opendir (0 call); openlog (0 call); pathconf (0 call); pclose (0 call); - perror (0 call); pipe (0 call); poll (0 call); popen (0 call); pow (0 call); - powf (0 call); pthread_cond_broadcast (0 call); - pthread_cond_destroy (0 call); pthread_cond_init (0 call); - pthread_cond_wait (0 call); pthread_create (0 call); pthread_join (0 call); + mbstowcs (0 call); mbtowc (0 call); mkdir (0 call); mkstemp (0 call); + mktime (0 call); mrand48 (0 call); nan (0 call); nanf (0 call); + nanl (0 call); nanosleep (0 call); nrand48 (0 call); ntohl (0 call); + ntohs (0 call); open (0 call); openat (0 call); opendir (0 call); + openlog (0 call); pathconf (0 call); pclose (0 call); perror (0 call); + pipe (0 call); poll (0 call); popen (0 call); pow (0 call); powf (0 call); + pthread_cond_broadcast (0 call); pthread_cond_destroy (0 call); + pthread_cond_init (0 call); pthread_cond_wait (0 call); + pthread_create (0 call); pthread_join (0 call); pthread_mutex_destroy (0 call); pthread_mutex_init (0 call); pthread_mutex_lock (0 call); pthread_mutex_unlock (0 call); putc (0 call); putc_unlocked (0 call); putchar (0 call); putchar_unlocked (0 call); @@ -139,29 +140,28 @@ srand48 (0 call); srandom (0 call); stat (0 call); stpcpy (0 call); strcasestr (0 call); strcoll (0 call); strcspn (0 call); strftime (0 call); strlcat (0 call); strlcpy (0 call); strncasecmp (0 call); strpbrk (0 call); - strsep (0 call); strsignal (0 call); strspn (0 call); strtod (0 call); - strtof (0 call); strtoimax (0 call); strtok (0 call); strtok_r (0 call); - strtol (0 call); strtold (0 call); strtoll (0 call); strtoul (0 call); - strtoull (0 call); strxfrm (0 call); sync (0 call); sysconf (0 call); - syslog (0 call); system (0 call); tcgetattr (0 call); tcsetattr (0 call); - time (0 call); times (0 call); tmpfile (0 call); tmpnam (0 call); - trunc (0 call); truncf (0 call); truncl (0 call); ttyname (0 call); - tzset (0 call); umask (0 call); ungetc (0 call); unlink (0 call); - usleep (0 call); utimes (0 call); vfprintf (0 call); vfscanf (0 call); - vprintf (0 call); vscanf (0 call); vsnprintf (0 call); vsprintf (0 call); - vsyslog (0 call); wait (0 call); waitpid (0 call); wcschr (0 call); - wcscmp (0 call); wcscspn (0 call); wcslcat (0 call); wcslcpy (0 call); - wcsncmp (0 call); wcspbrk (0 call); wcsrchr (0 call); wcsspn (0 call); - wcsstr (0 call); wcstombs (0 call); wctomb (0 call); wmemchr (0 call); - wmemcmp (0 call); wmemmove (0 call); write (0 call); + strsep (0 call); strspn (0 call); strtod (0 call); strtof (0 call); + strtoimax (0 call); strtok (0 call); strtok_r (0 call); strtol (0 call); + strtold (0 call); strtoll (0 call); strtoul (0 call); strtoull (0 call); + strxfrm (0 call); sync (0 call); sysconf (0 call); syslog (0 call); + system (0 call); tcgetattr (0 call); tcsetattr (0 call); time (0 call); + times (0 call); tmpfile (0 call); tmpnam (0 call); trunc (0 call); + truncf (0 call); truncl (0 call); ttyname (0 call); tzset (0 call); + umask (0 call); ungetc (0 call); unlink (0 call); usleep (0 call); + utimes (0 call); vfprintf (0 call); vfscanf (0 call); vprintf (0 call); + vscanf (0 call); vsnprintf (0 call); vsprintf (0 call); vsyslog (0 call); + wait (0 call); waitpid (0 call); wcschr (0 call); wcscmp (0 call); + wcscspn (0 call); wcslcat (0 call); wcslcpy (0 call); wcsncmp (0 call); + wcspbrk (0 call); wcsrchr (0 call); wcsspn (0 call); wcsstr (0 call); + wcstombs (0 call); wctomb (0 call); wmemchr (0 call); wmemcmp (0 call); + wmemmove (0 call); write (0 call); - 'Extern' global variables (20) + 'Extern' global variables (17) ============================== __fc_basename; __fc_dirname; __fc_getpwuid_pw_dir; __fc_getpwuid_pw_gid; __fc_getpwuid_pw_name; __fc_getpwuid_pw_passwd; __fc_getpwuid_pw_shell; __fc_getpwuid_pw_uid; __fc_hostname; __fc_mblen_state; __fc_mbtowc_state; - __fc_sigaction; __fc_strerror; __fc_strsignal; __fc_ttyname; - __fc_wctomb_state; optarg; opterr; optopt; tzname + __fc_ttyname; __fc_wctomb_state; optarg; opterr; optopt; tzname Potential entry points (1) ========================== @@ -169,18 +169,18 @@ Global metrics ============== - Sloc = 1026 - Decision point = 195 - Global variables = 66 - If = 186 - Loop = 42 - Goto = 84 - Assignment = 415 - Exit point = 76 - Function = 460 - Function call = 84 - Pointer dereferencing = 157 - Cyclomatic complexity = 271 + Sloc = 1083 + Decision point = 204 + Global variables = 68 + If = 195 + Loop = 43 + Goto = 89 + Assignment = 438 + Exit point = 82 + Function = 461 + Function call = 89 + Pointer dereferencing = 158 + Cyclomatic complexity = 286 /* Generated by Frama-C */ #include "__fc_builtin.c" #include "__fc_builtin.h" @@ -217,6 +217,7 @@ #include "pthread.h" #include "pwd.h" #include "setjmp.h" +#include "signal.c" #include "signal.h" #include "stdarg.h" #include "stdint.h" diff --git a/tests/libc/oracle/fc_libc.1.res.oracle b/tests/libc/oracle/fc_libc.1.res.oracle index 14d31d68024..a0d63cf77b1 100644 --- a/tests/libc/oracle/fc_libc.1.res.oracle +++ b/tests/libc/oracle/fc_libc.1.res.oracle @@ -1,7 +1,7 @@ [kernel] Parsing tests/libc/fc_libc.c (with preprocessing) /* Generated by Frama-C */ typedef unsigned int size_t; -struct __anonstruct_fenv_t_2 { +struct __fc_fenv_t { unsigned short __control_word ; unsigned short __unused1 ; unsigned short __status_word ; @@ -16,14 +16,14 @@ struct __anonstruct_fenv_t_2 { unsigned short __data_selector ; unsigned short __unused5 ; }; -typedef struct __anonstruct_fenv_t_2 fenv_t; +typedef struct __fc_fenv_t fenv_t; struct option { char const *name ; int has_arg ; int *flag ; int val ; }; -struct __anonstruct_glob_t_3 { +struct __fc_glob_t { unsigned int gl_pathc ; char **gl_pathv ; unsigned int gl_offs ; @@ -34,7 +34,7 @@ struct __anonstruct_glob_t_3 { int (*gl_lstat)(char const * __restrict , void * __restrict ) ; int (*gl_stat)(char const * __restrict , void * __restrict ) ; }; -typedef struct __anonstruct_glob_t_3 glob_t; +typedef struct __fc_glob_t glob_t; typedef int wchar_t; struct __fc_div_t { int quot ; @@ -54,12 +54,13 @@ typedef struct __fc_lldiv_t lldiv_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; +typedef unsigned int uintptr_t; typedef long long intmax_t; -struct __anonstruct_imaxdiv_t_4 { +struct __fc_imaxdiv_t { intmax_t quot ; intmax_t rem ; }; -typedef struct __anonstruct_imaxdiv_t_4 imaxdiv_t; +typedef struct __fc_imaxdiv_t imaxdiv_t; struct lconv { char *decimal_point ; char *thousands_sep ; @@ -86,38 +87,38 @@ struct lconv { char int_p_sign_posn ; char int_n_sign_posn ; }; -union __anonunion_u_5 { +union __fc_u_finitef { float f ; unsigned short w[2] ; }; -union __anonunion_u_6 { +union __fc_u_finite { double d ; unsigned short w[4] ; }; -struct __anonstruct_pthread_attr_t_7 { +struct __fc_pthread_attr_t { int _fc ; }; -typedef struct __anonstruct_pthread_attr_t_7 pthread_attr_t; -struct __anonstruct_pthread_cond_t_10 { +typedef struct __fc_pthread_attr_t pthread_attr_t; +struct __fc_pthread_cond_t { int _fc ; }; -typedef struct __anonstruct_pthread_cond_t_10 pthread_cond_t; -struct __anonstruct_pthread_condattr_t_11 { +typedef struct __fc_pthread_cond_t pthread_cond_t; +struct __fc_pthread_condattr_t { int _fc ; }; -typedef struct __anonstruct_pthread_condattr_t_11 pthread_condattr_t; -struct __anonstruct_pthread_mutex_t_13 { +typedef struct __fc_pthread_condattr_t pthread_condattr_t; +struct __fc_pthread_mutex_t { int _fc ; }; -typedef struct __anonstruct_pthread_mutex_t_13 pthread_mutex_t; -struct __anonstruct_pthread_mutexattr_t_14 { +typedef struct __fc_pthread_mutex_t pthread_mutex_t; +struct __fc_pthread_mutexattr_t { int _fc ; }; -typedef struct __anonstruct_pthread_mutexattr_t_14 pthread_mutexattr_t; -struct __anonstruct_pthread_t_19 { +typedef struct __fc_pthread_mutexattr_t pthread_mutexattr_t; +struct __fc_pthread_t { int _fc ; }; -typedef struct __anonstruct_pthread_t_19 pthread_t; +typedef struct __fc_pthread_t pthread_t; typedef int pid_t; typedef unsigned int gid_t; typedef unsigned int uid_t; @@ -126,7 +127,7 @@ union sigval { int sival_int ; void *sival_ptr ; }; -struct __anonstruct_siginfo_t_20 { +struct __anonstruct_siginfo_t_1 { int si_signo ; int si_code ; union sigval si_value ; @@ -137,7 +138,7 @@ struct __anonstruct_siginfo_t_20 { int si_status ; int si_band ; }; -typedef struct __anonstruct_siginfo_t_20 siginfo_t; +typedef struct __anonstruct_siginfo_t_1 siginfo_t; struct sigaction { void (*sa_handler)(int ) ; void (*sa_sigaction)(int , siginfo_t *, void *) ; @@ -174,7 +175,7 @@ struct in_addr { struct in6_addr { uint8_t s6_addr[16] ; }; -enum __anonenum_22 { +enum __fc_ipproto { IPPROTO_IP = 0, IPPROTO_HOPOPTS = 0, IPPROTO_ICMP = 1, @@ -296,10 +297,10 @@ struct DIR { struct dirent **__fc_dir_entries ; }; typedef struct DIR DIR; -struct __anonstruct_fd_set_25 { +struct __fc_fd_set { long __fc_fd_set[(unsigned int)1024 / ((unsigned int)8 * sizeof(long))] ; }; -typedef struct __anonstruct_fd_set_25 fd_set; +typedef struct __fc_fd_set fd_set; typedef unsigned int useconds_t; struct flock { short l_type ; @@ -337,11 +338,11 @@ struct passwd { char *pw_shell ; }; typedef int ( jmp_buf)[5]; -struct __anonstruct_sigjmp_buf_43 { +struct __anonstruct_sigjmp_buf_22 { jmp_buf buf ; sigset_t sigs ; }; -typedef struct __anonstruct_sigjmp_buf_43 sigjmp_buf; +typedef struct __anonstruct_sigjmp_buf_22 sigjmp_buf; struct _code { char const *c_name ; int c_val ; @@ -373,13 +374,7 @@ struct termios { }; int volatile Frama_C_entropy_source __attribute__((__unused__, __FRAMA_C_MODEL__)); -/*@ requires valid_p: \valid(p + (0 .. l - 1)); - ensures initialization: \initialized(\old(p) + (0 .. \old(l) - 1)); - assigns *(p + (0 .. l - 1)), Frama_C_entropy_source; - assigns *(p + (0 .. l - 1)) \from Frama_C_entropy_source; - assigns Frama_C_entropy_source \from Frama_C_entropy_source; - */ -extern void Frama_C_make_unknown(char *p, size_t l); +void Frama_C_make_unknown(char *p, size_t l); int Frama_C_nondet(int a, int b); @@ -404,13 +399,7 @@ extern int Frama_C_interval_split(int min, int max); extern unsigned char Frama_C_unsigned_char_interval(unsigned char min, unsigned char max); -/*@ requires order: min ≤ max; - ensures result_bounded: \old(min) ≤ \result ≤ \old(max); - assigns \result, Frama_C_entropy_source; - assigns \result \from min, max, Frama_C_entropy_source; - assigns Frama_C_entropy_source \from Frama_C_entropy_source; - */ -extern char Frama_C_char_interval(char min, char max); +char Frama_C_char_interval(char min, char max); /*@ requires order: min ≤ max; ensures result_bounded: \old(min) ≤ \result ≤ \old(max); @@ -503,10 +492,7 @@ double Frama_C_double_interval(double min, double max); */ extern double Frama_C_real_interval_as_double(double min, double max); -/*@ terminates \false; - ensures never_terminates: \false; - assigns \nothing; */ -extern __attribute__((__noreturn__)) void Frama_C_abort(void); + __attribute__((__noreturn__)) void Frama_C_abort(void); /*@ assigns \result; assigns \result \from p; */ @@ -524,6 +510,144 @@ extern long long Frama_C_abstract_max(long long i); assigns \result \from i; */ extern long long Frama_C_abstract_min(long long i); +/*@ assigns Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +void Frama_C_update_entropy(void) +{ + Frama_C_entropy_source = Frama_C_entropy_source; + return; +} + +/*@ requires valid_p: \valid(p + (0 .. l - 1)); + ensures initialization: \initialized(\old(p) + (0 .. \old(l) - 1)); + assigns *(p + (0 .. l - 1)), Frama_C_entropy_source; + assigns *(p + (0 .. l - 1)) \from Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +void Frama_C_make_unknown(char *p, size_t l) +{ + Frama_C_update_entropy(); + { + size_t i = (unsigned int)0; + while (i < l) { + *(p + i) = (char)Frama_C_entropy_source; + i += (size_t)1; + } + } + return; +} + +/*@ ensures result_a_or_b: \result ≡ \old(a) ∨ \result ≡ \old(b); + assigns \result, Frama_C_entropy_source; + assigns \result \from a, b, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +int Frama_C_nondet(int a, int b) +{ + int tmp; + Frama_C_update_entropy(); + if (Frama_C_entropy_source) tmp = a; else tmp = b; + return tmp; +} + +/*@ ensures result_a_or_b: \result ≡ \old(a) ∨ \result ≡ \old(b); + assigns \result, Frama_C_entropy_source; + assigns \result \from a, b, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +void *Frama_C_nondet_ptr(void *a, void *b) +{ + void *tmp; + Frama_C_update_entropy(); + if (Frama_C_entropy_source) tmp = a; else tmp = b; + return tmp; +} + +/*@ requires order: min ≤ max; + ensures result_bounded: \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +int Frama_C_interval(int min, int max) +{ + int r; + int aux; + Frama_C_update_entropy(); + aux = Frama_C_entropy_source; + if (aux >= min) + if (aux <= max) r = aux; else r = min; + else r = min; + return r; +} + +/*@ requires order: min ≤ max; + ensures result_bounded: \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +char Frama_C_char_interval(char min, char max) +{ + char __retres; + int r; + char aux; + Frama_C_update_entropy(); + aux = (char)Frama_C_entropy_source; + if ((int)aux >= (int)min) + if ((int)aux <= (int)max) r = (int)aux; else r = (int)min; + else r = (int)min; + __retres = (char)r; + return __retres; +} + +/*@ requires finite: \is_finite(min) ∧ \is_finite(max); + requires order: min ≤ max; + ensures + result_bounded: + \is_finite(\result) ∧ \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +float Frama_C_float_interval(float min, float max) +{ + float tmp; + Frama_C_update_entropy(); + if (Frama_C_entropy_source) tmp = min; else tmp = max; + return tmp; +} + +/*@ requires finite: \is_finite(min) ∧ \is_finite(max); + requires order: min ≤ max; + ensures + result_bounded: + \is_finite(\result) ∧ \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +double Frama_C_double_interval(double min, double max) +{ + double tmp; + Frama_C_update_entropy(); + if (Frama_C_entropy_source) tmp = min; else tmp = max; + return tmp; +} + +extern __attribute__((__noreturn__)) void __builtin_abort(void); + +/*@ terminates \false; + ensures never_terminates: \false; + assigns \nothing; */ + __attribute__((__noreturn__)) void Frama_C_abort(void); +void Frama_C_abort(void) +{ + __builtin_abort(); + return; +} + void __FC_assert(int c, char const *file, int line, char const *expr); /*@ assigns \nothing; */ @@ -995,7 +1119,7 @@ int fetestexcept(int excepts); int feholdexcept(fenv_t *envp); -void fesetenv(fenv_t const *envp); +int fesetenv(fenv_t const *envp); static int volatile fetestexcept___fc_random_fetestexcept __attribute__(( __FRAMA_C_MODEL__)); @@ -1015,10 +1139,12 @@ int feholdexcept(fenv_t *envp) return __retres; } -void fesetenv(fenv_t const *envp) +int fesetenv(fenv_t const *envp) { + int __retres; __fc_fenv_state = *envp; - return; + __retres = 0; + return __retres; } extern char *optarg; @@ -1677,8 +1803,7 @@ extern long random(void); extern void srandom(unsigned int seed); int __fc_random48_init __attribute__((__FRAMA_C_MODEL__)); -extern unsigned short __fc_random48_counter[3] __attribute__((__FRAMA_C_MODEL__)); - +unsigned short __fc_random48_counter[3] __attribute__((__FRAMA_C_MODEL__)); unsigned short *__fc_p_random48_counter = __fc_random48_counter; /*@ ensures random48_initialized: __fc_random48_init ≡ 1; assigns __fc_random48_counter[0 .. 2], __fc_random48_init; @@ -2036,7 +2161,7 @@ int glob(char const *pattern, int flags, int __retres; int tmp; unsigned int tmp_0; - char ***tmp_1; + char **tmp_1; int tmp_4; tmp = Frama_C_interval(0,10); pglob->gl_pathc = (unsigned int)tmp; @@ -2045,8 +2170,8 @@ int glob(char const *pattern, int flags, size_t prev_len = (unsigned int)0; if (flags & (1 << 5)) while (*(pglob->gl_pathv + (reserve_offs + prev_len))) prev_len += (size_t)1; - if (flags & (1 << 5)) tmp_1 = & pglob->gl_pathv; else tmp_1 = (char ***)0; - char **path = (char **)tmp_1; + if (flags & (1 << 5)) tmp_1 = pglob->gl_pathv; else tmp_1 = (char **)0; + char **path = tmp_1; if (pglob->gl_pathc == (unsigned int)0) if (flags & (1 << 4)) { pglob->gl_pathv = (char **)realloc((void *)path, @@ -2931,7 +3056,7 @@ float fabsf(float x) int __finitef(float f) { int __retres; - union __anonunion_u_5 u; + union __fc_u_finitef u; unsigned short usExp; u.f = f; usExp = (unsigned short)((int)u.w[1] & 0x7F80); @@ -2943,7 +3068,7 @@ int __finitef(float f) int __finite(double d) { int __retres; - union __anonunion_u_6 u; + union __fc_u_finite u; unsigned short usExp; u.d = d; usExp = (unsigned short)((int)u.w[3] & 0x7F80); @@ -3005,8 +3130,7 @@ extern int sigdelset(sigset_t *set, int signum); */ extern int sigismember(sigset_t const *set, int signum); -extern struct sigaction __fc_sigaction[64 + 1]; - +struct sigaction __fc_sigaction[64 + 1]; struct sigaction *__fc_p_sigaction = __fc_sigaction; /*@ requires valid_signal: 0 ≤ signum ≤ 64; requires valid_oldact_or_null: oldact ≡ \null ∨ \valid(oldact); @@ -3618,8 +3742,7 @@ extern char *strtok_r(char * __restrict s, char const * __restrict delim, */ extern char *strsep(char **stringp, char const *delim); -extern char __fc_strerror[64]; - +char __fc_strerror[64]; char * const __fc_p_strerror = __fc_strerror; char *strerror(int errnum); @@ -3691,16 +3814,9 @@ char *strdup(char const *s); char *strndup(char const *s, size_t n); -extern char __fc_strsignal[64]; - +char __fc_strsignal[64]; char * const __fc_p_strsignal = __fc_strsignal; -/*@ ensures result_internal_str: \result ≡ __fc_p_strsignal; - ensures result_nul_terminated: *(\result + 63) ≡ 0; - ensures result_valid_string: valid_read_string(\result); - assigns \result; - assigns \result \from __fc_p_strsignal, (indirect: signum); - */ -extern char *strsignal(int signum); +char *strsignal(int signum); /*@ requires valid_memory_area: \valid((char *)s + (0 .. n - 1)); ensures @@ -4775,7 +4891,38 @@ void *memcpy(void * __restrict dest, void const * __restrict src, size_t n) complete behaviors not_separated_gt, not_separated_lt, separated; disjoint behaviors not_separated_gt, not_separated_lt, separated; */ -static int memoverlap(char const *p, char const *q, size_t n); +static int memoverlap(char const *p, char const *q, size_t n) +{ + int __retres; + uintptr_t p1 = (unsigned int)p; + uintptr_t p2 = (unsigned int)(p + n); + uintptr_t q1 = (unsigned int)q; + uintptr_t q2 = (unsigned int)(q + n); + if (p1 <= q1) { + if (p2 > q1) { + __retres = -1; + goto return_label; + } + else goto _LAND; + } + else { + _LAND: ; + if (q1 <= p1) + if (q2 > p1) { + __retres = 1; + goto return_label; + } + else { + __retres = 0; + goto return_label; + } + else { + __retres = 0; + goto return_label; + } + } + return_label: return __retres; +} /*@ requires valid_dest: valid_or_empty(dest, n); requires valid_src: valid_read_or_empty(src, n); @@ -5391,6 +5538,7 @@ char *strstr(char const *haystack, char const *needle) return_label: return __retres; } +static int __fc_strerror_init; /*@ ensures result_internal_str: \result ≡ __fc_p_strerror; ensures result_nul_terminated: *(\result + 63) ≡ 0; ensures result_valid_string: valid_read_string(\result); @@ -5400,7 +5548,12 @@ char *strstr(char const *haystack, char const *needle) char *strerror(int errnum) { char *__retres; - __retres = (char *)"strerror message by Frama-C"; + if (! __fc_strerror_init) { + Frama_C_make_unknown(__fc_strerror,(unsigned int)63); + __fc_strerror[63] = (char)0; + __fc_strerror_init = 1; + } + __retres = __fc_strerror; return __retres; } @@ -5497,6 +5650,25 @@ char *strndup(char const *s, size_t n) return_label: return __retres; } +static int __fc_strsignal_init; +/*@ ensures result_internal_str: \result ≡ __fc_p_strsignal; + ensures result_nul_terminated: *(\result + 63) ≡ 0; + ensures result_valid_string: valid_read_string(\result); + assigns \result; + assigns \result \from __fc_p_strsignal, (indirect: signum); + */ +char *strsignal(int signum) +{ + char *__retres; + if (! __fc_strsignal_init) { + Frama_C_make_unknown(__fc_strsignal,(unsigned int)63); + __fc_strsignal[63] = (char)0; + __fc_strsignal_init = 1; + } + __retres = __fc_strsignal; + return __retres; +} + /*@ ghost unsigned int volatile __fc_time __attribute__((__FRAMA_C_MODEL__)); */ /*@ assigns \result; @@ -6029,89 +6201,6 @@ wchar_t *wcsncat(wchar_t *dest, wchar_t const *src, size_t n) return dest; } -/*@ assigns Frama_C_entropy_source; - assigns Frama_C_entropy_source \from Frama_C_entropy_source; - */ -extern void Frama_C_update_entropy(void); - -/*@ ensures result_a_or_b: \result ≡ \old(a) ∨ \result ≡ \old(b); - assigns \result, Frama_C_entropy_source; - assigns \result \from a, b, Frama_C_entropy_source; - assigns Frama_C_entropy_source \from Frama_C_entropy_source; - */ -int Frama_C_nondet(int a, int b) -{ - int tmp; - Frama_C_update_entropy(); - if (Frama_C_entropy_source) tmp = a; else tmp = b; - return tmp; -} - -/*@ ensures result_a_or_b: \result ≡ \old(a) ∨ \result ≡ \old(b); - assigns \result, Frama_C_entropy_source; - assigns \result \from a, b, Frama_C_entropy_source; - assigns Frama_C_entropy_source \from Frama_C_entropy_source; - */ -void *Frama_C_nondet_ptr(void *a, void *b) -{ - void *tmp; - Frama_C_update_entropy(); - if (Frama_C_entropy_source) tmp = a; else tmp = b; - return tmp; -} - -/*@ requires order: min ≤ max; - ensures result_bounded: \old(min) ≤ \result ≤ \old(max); - assigns \result, Frama_C_entropy_source; - assigns \result \from min, max, Frama_C_entropy_source; - assigns Frama_C_entropy_source \from Frama_C_entropy_source; - */ -int Frama_C_interval(int min, int max) -{ - int r; - int aux; - Frama_C_update_entropy(); - aux = Frama_C_entropy_source; - if (aux >= min) - if (aux <= max) r = aux; else r = min; - else r = min; - return r; -} - -/*@ requires finite: \is_finite(min) ∧ \is_finite(max); - requires order: min ≤ max; - ensures - result_bounded: - \is_finite(\result) ∧ \old(min) ≤ \result ≤ \old(max); - assigns \result, Frama_C_entropy_source; - assigns \result \from min, max, Frama_C_entropy_source; - assigns Frama_C_entropy_source \from Frama_C_entropy_source; - */ -float Frama_C_float_interval(float min, float max) -{ - float tmp; - Frama_C_update_entropy(); - if (Frama_C_entropy_source) tmp = min; else tmp = max; - return tmp; -} - -/*@ requires finite: \is_finite(min) ∧ \is_finite(max); - requires order: min ≤ max; - ensures - result_bounded: - \is_finite(\result) ∧ \old(min) ≤ \result ≤ \old(max); - assigns \result, Frama_C_entropy_source; - assigns \result \from min, max, Frama_C_entropy_source; - assigns Frama_C_entropy_source \from Frama_C_entropy_source; - */ -double Frama_C_double_interval(double min, double max) -{ - double tmp; - Frama_C_update_entropy(); - if (Frama_C_entropy_source) tmp = min; else tmp = max; - return tmp; -} - /*@ ghost extern int __fc_stack_status __attribute__((__FRAMA_C_MODEL__)); */ /*@ ensures allocation: \fresh{Old, Here}(\result,\old(size)); diff --git a/tests/libc/oracle/runtime.res.oracle b/tests/libc/oracle/runtime.res.oracle new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/libc/oracle/stdlib_c.0.res.oracle b/tests/libc/oracle/stdlib_c.0.res.oracle index 1a7d6018077..c6859df65a9 100644 --- a/tests/libc/oracle/stdlib_c.0.res.oracle +++ b/tests/libc/oracle/stdlib_c.0.res.oracle @@ -78,10 +78,10 @@ (0..31/34359738367) to fit 0..63/34359738367 [eva] computing for function posix_memalign <- main. Called from tests/libc/stdlib_c.c:37. -[eva] share/libc/stdlib.c:197: +[eva] share/libc/stdlib.c:196: assertion 'alignment_is_a_suitable_power_of_two' got status valid. -[eva] share/libc/stdlib.c:200: Call to builtin Frama_C_malloc_by_stack -[eva] share/libc/stdlib.c:200: allocating variable __malloc_posix_memalign_l200 +[eva] share/libc/stdlib.c:199: Call to builtin Frama_C_malloc_by_stack +[eva] share/libc/stdlib.c:199: allocating variable __malloc_posix_memalign_l199 [eva] Recording results for posix_memalign [eva] Done for function posix_memalign [eva] computing for function free <- main. @@ -93,9 +93,9 @@ [eva] Done for function free [eva] computing for function posix_memalign <- main. Called from tests/libc/stdlib_c.c:39. -[eva] share/libc/stdlib.c:200: Call to builtin Frama_C_malloc_by_stack -[eva] share/libc/stdlib.c:200: - allocating variable __malloc_posix_memalign_l200_0 +[eva] share/libc/stdlib.c:199: Call to builtin Frama_C_malloc_by_stack +[eva] share/libc/stdlib.c:199: + allocating variable __malloc_posix_memalign_l199_0 [eva] Recording results for posix_memalign [eva] Done for function posix_memalign [eva] computing for function free <- main. @@ -109,8 +109,8 @@ [eva] ====== VALUES COMPUTED ====== [eva:final-states] Values at end of function posix_memalign: __fc_heap_status ∈ [--..--] - p_al0 ∈ {{ NULL ; &__malloc_posix_memalign_l200[0] }} - p_al1 ∈ {{ NULL ; &__malloc_posix_memalign_l200_0[0] }} or UNINITIALIZED + p_al0 ∈ {{ NULL ; &__malloc_posix_memalign_l199[0] }} + p_al1 ∈ {{ NULL ; &__malloc_posix_memalign_l199_0[0] }} or UNINITIALIZED __retres ∈ {0; 12} [eva:final-states] Values at end of function main: __fc_heap_status ∈ [--..--] @@ -120,8 +120,8 @@ q ∈ {{ NULL ; &__calloc_main_l21[0] }} r ∈ {0} s ∈ {{ NULL ; &__calloc_w_main_l32[0] }} - p_al0 ∈ {{ NULL ; &__malloc_posix_memalign_l200[0] }} - p_al1 ∈ {{ NULL ; &__malloc_posix_memalign_l200_0[0] }} + p_al0 ∈ {{ NULL ; &__malloc_posix_memalign_l199[0] }} + p_al1 ∈ {{ NULL ; &__malloc_posix_memalign_l199_0[0] }} p_memal_res ∈ {0; 12} p_memal_res2 ∈ {0; 12} __retres ∈ {0} diff --git a/tests/libc/oracle/stdlib_c.1.res.oracle b/tests/libc/oracle/stdlib_c.1.res.oracle index 9021fc4d9d1..b87733adc52 100644 --- a/tests/libc/oracle/stdlib_c.1.res.oracle +++ b/tests/libc/oracle/stdlib_c.1.res.oracle @@ -97,10 +97,10 @@ (0..31/34359738367) to fit 0..191/34359738367 [eva] computing for function posix_memalign <- main. Called from tests/libc/stdlib_c.c:37. -[eva] share/libc/stdlib.c:197: +[eva] share/libc/stdlib.c:196: assertion 'alignment_is_a_suitable_power_of_two' got status valid. -[eva] share/libc/stdlib.c:200: Call to builtin Frama_C_malloc_by_stack -[eva] share/libc/stdlib.c:200: allocating variable __malloc_posix_memalign_l200 +[eva] share/libc/stdlib.c:199: Call to builtin Frama_C_malloc_by_stack +[eva] share/libc/stdlib.c:199: allocating variable __malloc_posix_memalign_l199 [eva] Recording results for posix_memalign [eva] Done for function posix_memalign [eva] computing for function free <- main. @@ -112,9 +112,9 @@ [eva] Done for function free [eva] computing for function posix_memalign <- main. Called from tests/libc/stdlib_c.c:39. -[eva] share/libc/stdlib.c:200: Call to builtin Frama_C_malloc_by_stack -[eva] share/libc/stdlib.c:200: - allocating variable __malloc_posix_memalign_l200_0 +[eva] share/libc/stdlib.c:199: Call to builtin Frama_C_malloc_by_stack +[eva] share/libc/stdlib.c:199: + allocating variable __malloc_posix_memalign_l199_0 [eva] Recording results for posix_memalign [eva] Done for function posix_memalign [eva] computing for function free <- main. @@ -128,8 +128,8 @@ [eva] ====== VALUES COMPUTED ====== [eva:final-states] Values at end of function posix_memalign: __fc_heap_status ∈ [--..--] - p_al0 ∈ {{ &__malloc_posix_memalign_l200[0] }} - p_al1 ∈ {{ &__malloc_posix_memalign_l200_0[0] }} or UNINITIALIZED + p_al0 ∈ {{ &__malloc_posix_memalign_l199[0] }} + p_al1 ∈ {{ &__malloc_posix_memalign_l199_0[0] }} or UNINITIALIZED __retres ∈ {0} [eva:final-states] Values at end of function main: __fc_heap_status ∈ [--..--] @@ -139,8 +139,8 @@ q ∈ {{ NULL ; &__calloc_main_l21[0] }} r ∈ {0} s ∈ {{ NULL ; &__calloc_w_main_l32[0] }} - p_al0 ∈ {{ &__malloc_posix_memalign_l200[0] }} - p_al1 ∈ {{ &__malloc_posix_memalign_l200_0[0] }} + p_al0 ∈ {{ &__malloc_posix_memalign_l199[0] }} + p_al1 ∈ {{ &__malloc_posix_memalign_l199_0[0] }} p_memal_res ∈ {0} p_memal_res2 ∈ {0} __retres ∈ {0} diff --git a/tests/libc/oracle/stdlib_c.2.res.oracle b/tests/libc/oracle/stdlib_c.2.res.oracle index c70cca5c9ec..fbcbc924edb 100644 --- a/tests/libc/oracle/stdlib_c.2.res.oracle +++ b/tests/libc/oracle/stdlib_c.2.res.oracle @@ -96,10 +96,10 @@ [eva] Done for function calloc [eva] computing for function posix_memalign <- main. Called from tests/libc/stdlib_c.c:37. -[eva] share/libc/stdlib.c:197: +[eva] share/libc/stdlib.c:196: assertion 'alignment_is_a_suitable_power_of_two' got status valid. -[eva] share/libc/stdlib.c:200: Call to builtin Frama_C_malloc_by_stack -[eva] share/libc/stdlib.c:200: allocating variable __malloc_posix_memalign_l200 +[eva] share/libc/stdlib.c:199: Call to builtin Frama_C_malloc_by_stack +[eva] share/libc/stdlib.c:199: allocating variable __malloc_posix_memalign_l199 [eva] Recording results for posix_memalign [eva] Done for function posix_memalign [eva] computing for function free <- main. @@ -111,9 +111,9 @@ [eva] Done for function free [eva] computing for function posix_memalign <- main. Called from tests/libc/stdlib_c.c:39. -[eva] share/libc/stdlib.c:200: Call to builtin Frama_C_malloc_by_stack -[eva] share/libc/stdlib.c:200: - allocating variable __malloc_posix_memalign_l200_0 +[eva] share/libc/stdlib.c:199: Call to builtin Frama_C_malloc_by_stack +[eva] share/libc/stdlib.c:199: + allocating variable __malloc_posix_memalign_l199_0 [eva] Recording results for posix_memalign [eva] Done for function posix_memalign [eva] computing for function free <- main. @@ -140,8 +140,8 @@ __malloc_w_calloc_l72_1[0..4294967291] ∈ [--..--] or UNINITIALIZED [eva:final-states] Values at end of function posix_memalign: __fc_heap_status ∈ [--..--] - p_al0 ∈ {{ NULL ; &__malloc_posix_memalign_l200[0] }} - p_al1 ∈ {{ NULL ; &__malloc_posix_memalign_l200_0[0] }} or UNINITIALIZED + p_al0 ∈ {{ NULL ; &__malloc_posix_memalign_l199[0] }} + p_al1 ∈ {{ NULL ; &__malloc_posix_memalign_l199_0[0] }} or UNINITIALIZED __retres ∈ {0; 12} [eva:final-states] Values at end of function main: __fc_heap_status ∈ [--..--] @@ -151,8 +151,8 @@ q ∈ {{ NULL ; (int *)&__malloc_calloc_l72_0 }} r ∈ {0} s ∈ {{ NULL ; (int *)&__malloc_w_calloc_l72_1 }} or UNINITIALIZED - p_al0 ∈ {{ NULL ; &__malloc_posix_memalign_l200[0] }} - p_al1 ∈ {{ NULL ; &__malloc_posix_memalign_l200_0[0] }} + p_al0 ∈ {{ NULL ; &__malloc_posix_memalign_l199[0] }} + p_al1 ∈ {{ NULL ; &__malloc_posix_memalign_l199_0[0] }} p_memal_res ∈ {0; 12} p_memal_res2 ∈ {0; 12} __retres ∈ {0} diff --git a/tests/libc/oracle/string_c.res.oracle b/tests/libc/oracle/string_c.res.oracle index d4cb7a56f16..01a4e906ea1 100644 --- a/tests/libc/oracle/string_c.res.oracle +++ b/tests/libc/oracle/string_c.res.oracle @@ -90,8 +90,10 @@ [eva] tests/libc/string_c.c:42: function memmove: precondition 'valid_src' got status valid. [eva] computing for function memoverlap <- memmove <- test_memmove <- main. - Called from share/libc/string.c:69. -[eva] using specification for function memoverlap + Called from share/libc/string.c:77. +[eva] share/libc/string.c:59: + function memoverlap, behavior not_separated_gt: postcondition 'result_p_after_q' got status valid. +[eva] Recording results for memoverlap [eva] Done for function memoverlap [eva] share/libc/string.h:108: cannot evaluate ACSL term, unsupported ACSL construct: logic function memcmp @@ -110,7 +112,10 @@ [eva] tests/libc/string_c.c:49: function memmove: precondition 'valid_src' got status valid. [eva] computing for function memoverlap <- memmove <- test_memmove <- main. - Called from share/libc/string.c:69. + Called from share/libc/string.c:77. +[eva] share/libc/string.c:55: + function memoverlap, behavior not_separated_lt: postcondition 'result_p_before_q' got status valid. +[eva] Recording results for memoverlap [eva] Done for function memoverlap [eva] Recording results for memmove [eva] Done for function memmove @@ -122,7 +127,8 @@ [eva] tests/libc/string_c.c:52: function memmove: precondition 'valid_src' got status valid. [eva] computing for function memoverlap <- memmove <- test_memmove <- main. - Called from share/libc/string.c:69. + Called from share/libc/string.c:77. +[eva] Recording results for memoverlap [eva] Done for function memoverlap [eva] Recording results for memmove [eva] Done for function memmove @@ -134,7 +140,10 @@ [eva] tests/libc/string_c.c:56: function memmove: precondition 'valid_src' got status valid. [eva] computing for function memoverlap <- memmove <- test_memmove <- main. - Called from share/libc/string.c:69. + Called from share/libc/string.c:77. +[eva] share/libc/string.c:51: + function memoverlap, behavior separated: postcondition 'result_no_overlap' got status valid. +[eva] Recording results for memoverlap [eva] Done for function memoverlap [eva] Recording results for memmove [eva] Done for function memmove @@ -480,8 +489,8 @@ [eva] tests/libc/string_c.c:124: function strcat: precondition 'room_string' got status valid. [eva] computing for function strlen <- strcat <- test_strcat <- main. - Called from share/libc/string.c:174. -[eva] share/libc/string.c:174: + Called from share/libc/string.c:182. +[eva] share/libc/string.c:182: function strlen: precondition 'valid_string_s' got status valid. [eva] Recording results for strlen [eva] Done for function strlen @@ -506,7 +515,7 @@ [eva] tests/libc/string_c.c:132: function strcat: precondition 'room_string' got status valid. [eva] computing for function strlen <- strcat <- test_strcat <- main. - Called from share/libc/string.c:174. + Called from share/libc/string.c:182. [eva] Recording results for strlen [eva] Done for function strlen [eva] Recording results for strcat @@ -521,7 +530,7 @@ [eva] tests/libc/string_c.c:134: function strcat: precondition 'room_string' got status valid. [eva] computing for function strlen <- strcat <- test_strcat <- main. - Called from share/libc/string.c:174. + Called from share/libc/string.c:182. [eva] Recording results for strlen [eva] Done for function strlen [eva] Recording results for strcat @@ -534,7 +543,7 @@ function strcat: precondition 'valid_string_dest' got status valid. [eva] tests/libc/string_c.c:135: function strcat: precondition 'room_string' got status valid. -[eva] share/libc/string.c:174: Reusing old results for call to strlen +[eva] share/libc/string.c:182: Reusing old results for call to strlen [eva] Recording results for strcat [eva] Done for function strcat [eva] tests/libc/string_c.c:136: assertion got status valid. @@ -698,8 +707,8 @@ [eva] tests/libc/string_c.c:214: function strrchr: precondition 'valid_string_s' got status valid. [eva] computing for function strlen <- strrchr <- test_strrchr <- main. - Called from share/libc/string.c:229. -[eva] share/libc/string.c:229: + Called from share/libc/string.c:237. +[eva] share/libc/string.c:237: function strlen: precondition 'valid_string_s' got status valid. [eva] Recording results for strlen [eva] Done for function strlen @@ -718,7 +727,7 @@ Called from tests/libc/string_c.c:216. [eva] tests/libc/string_c.c:216: function strrchr: precondition 'valid_string_s' got status valid. -[eva] share/libc/string.c:229: Reusing old results for call to strlen +[eva] share/libc/string.c:237: Reusing old results for call to strlen [eva] share/libc/string.h:184: function strrchr, behavior not_found: postcondition 'result_null' got status valid. [eva] Recording results for strrchr @@ -728,7 +737,7 @@ Called from tests/libc/string_c.c:218. [eva] tests/libc/string_c.c:218: function strrchr: precondition 'valid_string_s' got status valid. -[eva] share/libc/string.c:229: Reusing old results for call to strlen +[eva] share/libc/string.c:237: Reusing old results for call to strlen [eva] Recording results for strrchr [eva] Done for function strrchr [eva] tests/libc/string_c.c:219: assertion got status valid. @@ -736,7 +745,7 @@ Called from tests/libc/string_c.c:220. [eva] tests/libc/string_c.c:220: function strrchr: precondition 'valid_string_s' got status valid. -[eva] share/libc/string.c:229: Reusing old results for call to strlen +[eva] share/libc/string.c:237: Reusing old results for call to strlen [eva] Recording results for strrchr [eva] Done for function strrchr [eva] tests/libc/string_c.c:221: assertion got status valid. @@ -964,6 +973,12 @@ [3] ∈ {0; 18; 108} [4] ∈ {0; 111} [5] ∈ {0} +[eva:final-states] Values at end of function memoverlap: + p1 ∈ {{ (unsigned int)&buf{[0], [2], [3]} }} + p2 ∈ {{ (unsigned int)&buf{[4], [6]} }} + q1 ∈ {{ (unsigned int)&buf{[0], [2]} }} + q2 ∈ {{ (unsigned int)&buf{[3], [4], [6]} }} + __retres ∈ {-1; 0; 1} [eva:final-states] Values at end of function memmove: s ∈ {{ &buf{[0], [2]} }} d ∈ {{ &buf{[0], [2], [3]} }} diff --git a/tests/libc/oracle/string_c_generic.res.oracle b/tests/libc/oracle/string_c_generic.res.oracle index 79cc74ecd4c..23daf7cb925 100644 --- a/tests/libc/oracle/string_c_generic.res.oracle +++ b/tests/libc/oracle/string_c_generic.res.oracle @@ -160,7 +160,7 @@ function strncpy: precondition 'room_nstring' got status valid. [eva] tests/libc/string_c_generic.c:73: function strncpy: precondition 'separation' got status valid. -[eva] share/libc/string.c:212: starting to merge loop iterations +[eva] share/libc/string.c:220: starting to merge loop iterations [eva] share/libc/string.h:363: function strncpy: postcondition 'result_ptr' got status valid. [eva] share/libc/string.h:364: @@ -211,7 +211,7 @@ function strncmp: precondition 'valid_string_s1' got status valid. [eva] tests/libc/string_c_generic.c:82: function strncmp: precondition 'valid_string_s2' got status valid. -[eva] share/libc/string.c:130: starting to merge loop iterations +[eva] share/libc/string.c:138: starting to merge loop iterations [eva] share/libc/string.h:147: cannot evaluate ACSL term, unsupported ACSL construct: logic function strncmp [eva:alarm] share/libc/string.h:147: Warning: @@ -245,8 +245,8 @@ [eva] tests/libc/string_c_generic.c:86: function strncat, behavior partial: precondition 'room_string' got status valid. [eva] computing for function strlen <- strncat <- main. - Called from share/libc/string.c:185. -[eva] share/libc/string.c:185: + Called from share/libc/string.c:193. +[eva] share/libc/string.c:193: function strlen: precondition 'valid_string_s' got status valid. [eva] share/libc/string.h:127: function strlen: postcondition 'acsl_c_equiv' got status valid. @@ -307,8 +307,8 @@ [eva] tests/libc/string_c_generic.c:93: function strrchr: precondition 'valid_string_s' got status valid. [eva] computing for function strlen <- strrchr <- main. - Called from share/libc/string.c:229. -[eva] share/libc/string.c:229: + Called from share/libc/string.c:237. +[eva] share/libc/string.c:237: function strlen: precondition 'valid_string_s' got status valid. [eva] Recording results for strlen [eva] Done for function strlen @@ -326,8 +326,8 @@ Called from tests/libc/string_c_generic.c:94. [eva] tests/libc/string_c_generic.c:94: function strrchr: precondition 'valid_string_s' got status valid. -[eva] share/libc/string.c:229: Reusing old results for call to strlen -[eva] share/libc/string.c:229: starting to merge loop iterations +[eva] share/libc/string.c:237: Reusing old results for call to strlen +[eva] share/libc/string.c:237: starting to merge loop iterations [eva] share/libc/string.h:184: function strrchr, behavior not_found: postcondition 'result_null' got status valid. [eva] Recording results for strrchr diff --git a/tests/libc/oracle/string_c_strstr.res.oracle b/tests/libc/oracle/string_c_strstr.res.oracle index f9d41091bb4..6009523b883 100644 --- a/tests/libc/oracle/string_c_strstr.res.oracle +++ b/tests/libc/oracle/string_c_strstr.res.oracle @@ -68,7 +68,7 @@ function strstr: precondition 'valid_string_haystack' got status valid. [eva] tests/libc/string_c_strstr.c:59: function strstr: precondition 'valid_string_needle' got status valid. -[eva] share/libc/string.c:258: starting to merge loop iterations +[eva] share/libc/string.c:266: starting to merge loop iterations [eva] Recording results for strstr [eva] Done for function strstr [eva] computing for function strstr <- main. diff --git a/tests/libc/runtime.c b/tests/libc/runtime.c new file mode 100644 index 00000000000..6fd7bf646ad --- /dev/null +++ b/tests/libc/runtime.c @@ -0,0 +1,9 @@ +/* run.config* + COMMENT: tests that the runtime can compile without errors (for PathCrawler, E-ACSL, ...) + CMD: gcc -D__FC_MACHDEP_X86_64 share/libc/__fc_runtime.c -Wno-attributes + OPT: + */ + +int main() { + return 0; +} -- GitLab From 22039c76bcac20c52d17cdddad86c1184e2f7395 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Tue, 5 Mar 2019 15:35:01 +0100 Subject: [PATCH 108/376] [Libc] fix and improve stubs for strerror/strsignal --- share/libc/string.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/share/libc/string.c b/share/libc/string.c index 99e54e162ad..fc5a7893720 100644 --- a/share/libc/string.c +++ b/share/libc/string.c @@ -271,9 +271,19 @@ char *strstr(const char *haystack, const char *needle) return NULL; } +char __fc_strerror[64]; +static int __fc_strerror_init; + char *strerror(int errnum) { - return "strerror message by Frama-C"; +#ifdef __FRAMAC__ + if (!__fc_strerror_init) { + Frama_C_make_unknown(__fc_strerror, 63); + __fc_strerror[63] = 0; + __fc_strerror_init = 1; + } +#endif + return __fc_strerror; } /* Warning: read considerations about malloc() in Frama-C */ @@ -307,4 +317,19 @@ char *strndup(const char *s, size_t n) return p; } +char __fc_strsignal[64]; +static int __fc_strsignal_init; + +char *strsignal(int signum) +{ +#ifdef __FRAMAC__ + if (!__fc_strsignal_init) { + Frama_C_make_unknown(__fc_strsignal, 63); + __fc_strsignal[63] = 0; + __fc_strsignal_init = 1; + } +#endif + return __fc_strsignal; +} + __POP_FC_STDLIB -- GitLab From fe7dd6cc46055dd95cf4c1c1f1936a9756876b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 18 Feb 2019 14:50:06 +0100 Subject: [PATCH 109/376] [kernel] Marks arrays as having their address taken when their address is taken. --- src/kernel_internals/typing/cabs2cil.ml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index 6cd61cd0df7..9ee2e6f4abd 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -1185,10 +1185,7 @@ let mkAddrOfAndMark loc ((b, off) as lval) : exp = begin match lastOffset off with | NoOffset -> (match b with - | Var vi -> - (* Do not mark arrays as having their address taken. *) - if not (isArrayType vi.vtype) then - vi.vaddrof <- true + | Var vi -> vi.vaddrof <- true | _ -> ()) | Index _ -> () | Field(fi,_) -> fi.faddrof <- true -- GitLab From 9a3dc42cc5739730ba68521e31c1ecf9b7266fba Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Tue, 5 Mar 2019 08:46:10 +0100 Subject: [PATCH 110/376] [typing] also mark address taken in case of StartOf --- src/kernel_internals/typing/cabs2cil.ml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index 9ee2e6f4abd..b09617ac5eb 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -1193,15 +1193,12 @@ let mkAddrOfAndMark loc ((b, off) as lval) : exp = mkAddrOf ~loc lval (* Call only on arrays *) -let mkStartOfAndMark loc ((_b, _off) as lval) : exp = +let mkStartOfAndMark loc ((b, _off) as lval) : exp = (* Mark the vaddrof flag if b is a variable *) - (* Do not mark arrays as having their address taken. - (match b with - | Var vi -> vi.vaddrof <- true - | _ -> ()); - *) - let res = new_exp ~loc (StartOf lval) in - res + (match b with + | Var vi -> vi.vaddrof <- true + | _ -> ()); + new_exp ~loc (StartOf lval) (* Keep a set of self compinfo for composite types *) let compInfoNameEnv : (string, compinfo) H.t = H.create 113 -- GitLab From ee66f23f3f18ff6d27586099c689e1dcddf5c37d Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Fri, 27 Jul 2018 14:03:33 +0200 Subject: [PATCH 111/376] [Kernel] remove dead code from rmtmps; minor simplifications --- src/kernel_internals/typing/rmtmps.ml | 24 ++++++++++++------------ src/kernel_internals/typing/rmtmps.mli | 1 - src/kernel_services/ast_queries/file.ml | 2 +- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/kernel_internals/typing/rmtmps.ml b/src/kernel_internals/typing/rmtmps.ml index 2cc4c84b91a..c1c2fef79e6 100644 --- a/src/kernel_internals/typing/rmtmps.ml +++ b/src/kernel_internals/typing/rmtmps.ml @@ -48,8 +48,10 @@ open Cil_types open Cil module H = Hashtbl -(* Set on the command-line: *) +(* Used by external plug-ins: *) let keepUnused = ref false + +(* Possibly no longer used: *) let rmUnusedInlines = ref false let rmUnusedStatic = ref false @@ -760,9 +762,7 @@ let removeUnmarked isRoot file = type rootsFilter = global -> bool -let isDefaultRoot = isExportedRoot - -let removeUnusedTemps ?(isRoot : rootsFilter = isDefaultRoot) file = +let removeUnusedTemps ?(isRoot : rootsFilter = isExportedRoot) file = if not !keepUnused then begin Kernel.debug ~dkey "Removing unused temporaries" ; @@ -772,8 +772,8 @@ let removeUnusedTemps ?(isRoot : rootsFilter = isDefaultRoot) file = (* build up the root set *) let isRoot global = - isPragmaRoot keepers global || - isRoot global + isPragmaRoot keepers global || + isRoot global in (* mark everything reachable from the global roots *) @@ -785,12 +785,12 @@ let removeUnusedTemps ?(isRoot : rootsFilter = isDefaultRoot) file = (* print which original source variables were removed *) if false && removedLocals != [] then - let count = List.length removedLocals in - if count > 2000 then - (Kernel.warning "%d unused local variables removed" count) - else - (Kernel.warning "%d unused local variables removed:@!%a" - count (Pretty_utils.pp_list ~sep:",@," Format.pp_print_string) removedLocals) + let count = List.length removedLocals in + if count > 2000 then + (Kernel.warning "%d unused local variables removed" count) + else + (Kernel.warning "%d unused local variables removed:@!%a" + count (Pretty_utils.pp_list ~sep:",@," Format.pp_print_string) removedLocals) end (* diff --git a/src/kernel_internals/typing/rmtmps.mli b/src/kernel_internals/typing/rmtmps.mli index c99591522f1..61f49635423 100644 --- a/src/kernel_internals/typing/rmtmps.mli +++ b/src/kernel_internals/typing/rmtmps.mli @@ -76,7 +76,6 @@ type rootsFilter = Cil_types.global -> bool -val isDefaultRoot : rootsFilter val isExportedRoot : rootsFilter val isCompleteProgramRoot : rootsFilter diff --git a/src/kernel_services/ast_queries/file.ml b/src/kernel_services/ast_queries/file.ml index 3e49d89eeee..1f1726189a0 100644 --- a/src/kernel_services/ast_queries/file.ml +++ b/src/kernel_services/ast_queries/file.ml @@ -637,7 +637,7 @@ let () = keep_unused_specified_function). This function is meant to be passed to {!Rmtmps.removeUnusedTemps}. *) let keep_entry_point ?(specs=Kernel.Keep_unused_specified_functions.get ()) g = - Rmtmps.isDefaultRoot g || + Rmtmps.isExportedRoot g || match g with | GFun({svar = v; sspec = spec},_) | GFunDecl(spec,v,_) -> -- GitLab From 23618a4c6c35ae3d928b4d273a74b9f14d711afb Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Fri, 27 Jul 2018 15:21:19 +0200 Subject: [PATCH 112/376] [Kernel] fix indent + whitespace in rmtmps prior to refactoring --- src/kernel_internals/typing/rmtmps.ml | 670 +++++++++++++------------- 1 file changed, 335 insertions(+), 335 deletions(-) diff --git a/src/kernel_internals/typing/rmtmps.ml b/src/kernel_internals/typing/rmtmps.ml index c1c2fef79e6..9eae099fe52 100644 --- a/src/kernel_internals/typing/rmtmps.ml +++ b/src/kernel_internals/typing/rmtmps.ml @@ -59,38 +59,38 @@ let rmUnusedStatic = ref false * * Clearing of "referenced" bits * - *) +*) let clearReferencedBits file = let considerGlobal global = match global with | GType (info, _) -> - info.treferenced <- false + info.treferenced <- false | GEnumTag (info, _) | GEnumTagDecl (info, _) -> - Kernel.debug ~dkey "clearing mark: %a" Cil_printer.pp_global global; - info.ereferenced <- false + Kernel.debug ~dkey "clearing mark: %a" Cil_printer.pp_global global; + info.ereferenced <- false | GCompTag (info, _) | GCompTagDecl (info, _) -> - info.creferenced <- false + info.creferenced <- false | GVar (vi, _, _) | GFunDecl (_, vi, _) | GVarDecl (vi, _) -> - vi.vreferenced <- false + vi.vreferenced <- false | GFun ({svar = info} as func, _) -> - info.vreferenced <- false; - let clearMark local = - local.vreferenced <- false - in - List.iter clearMark func.slocals + info.vreferenced <- false; + let clearMark local = + local.vreferenced <- false + in + List.iter clearMark func.slocals | _ -> - () + () in iterGlobals file considerGlobal @@ -99,18 +99,18 @@ let clearReferencedBits file = * * Scanning and categorization of pragmas * - *) +*) (* collections of names of things to keep *) type collection = (string, unit) H.t type keepers = { - typedefs : collection; - enums : collection; - structs : collection; - unions : collection; - defines : collection; - } + typedefs : collection; + enums : collection; + structs : collection; + unions : collection; + defines : collection; +} (* rapid transfer of control when we find a malformed pragma *) @@ -119,7 +119,7 @@ exception Bad_pragma (* CIL and CCured define several pragmas which prevent removal of * various global varinfos. Here we scan for those pragmas and build * up collections of the corresponding varinfos' names. - *) +*) let categorizePragmas file = @@ -140,57 +140,57 @@ let categorizePragmas file = in function - | GPragma (Attr ("cilnoremove" as directive, args), (location,_)) -> - (* a very flexible pragma: can retain typedefs, enums, - * structs, unions, or globals (functions or variables) *) - begin - let processArg arg = - try - match arg with - | AStr specifier -> - (* isolate and categorize one varinfo name *) - let collection, name = - (* Two words denotes a typedef, enum, struct, or - * union, as in "type foo" or "enum bar". A - * single word denotes a global function or - * variable. *) - let whitespace = Str.regexp "[ \t]+" in - let words = Str.split whitespace specifier in - match words with - | ["type"; name] -> - keepers.typedefs, name - | ["enum"; name] -> - keepers.enums, name - | ["struct"; name] -> - keepers.structs, name - | ["union"; name] -> - keepers.unions, name - | [name] -> - keepers.defines, name - | _ -> - raise Bad_pragma - in - H.add collection name () - | _ -> - raise Bad_pragma - with Bad_pragma -> - badPragma location directive - in - List.iter processArg args - end - | GFunDecl (_,v, _) -> begin - (* Look for alias attributes, e.g. Linux modules *) - match filterAttributes "alias" v.vattr with - | [] -> () (* ordinary prototype. *) - | [ Attr("alias", [AStr othername]) ] -> - H.add keepers.defines othername () - | _ -> - Kernel.fatal ~current:true - "Bad alias attribute at %a" - Cil_printer.pp_location (CurrentLoc.get ()) - end - | _ -> - () + | GPragma (Attr ("cilnoremove" as directive, args), (location,_)) -> + (* a very flexible pragma: can retain typedefs, enums, + * structs, unions, or globals (functions or variables) *) + begin + let processArg arg = + try + match arg with + | AStr specifier -> + (* isolate and categorize one varinfo name *) + let collection, name = + (* Two words denotes a typedef, enum, struct, or + * union, as in "type foo" or "enum bar". A + * single word denotes a global function or + * variable. *) + let whitespace = Str.regexp "[ \t]+" in + let words = Str.split whitespace specifier in + match words with + | ["type"; name] -> + keepers.typedefs, name + | ["enum"; name] -> + keepers.enums, name + | ["struct"; name] -> + keepers.structs, name + | ["union"; name] -> + keepers.unions, name + | [name] -> + keepers.defines, name + | _ -> + raise Bad_pragma + in + H.add collection name () + | _ -> + raise Bad_pragma + with Bad_pragma -> + badPragma location directive + in + List.iter processArg args + end + | GFunDecl (_,v, _) -> begin + (* Look for alias attributes, e.g. Linux modules *) + match filterAttributes "alias" v.vattr with + | [] -> () (* ordinary prototype. *) + | [ Attr("alias", [AStr othername]) ] -> + H.add keepers.defines othername () + | _ -> + Kernel.fatal ~current:true + "Bad alias attribute at %a" + Cil_printer.pp_location (CurrentLoc.get ()) + end + | _ -> + () in iterGlobals file considerPragma; keepers @@ -201,27 +201,27 @@ let categorizePragmas file = * * Root collection from pragmas * - *) +*) let isPragmaRoot keepers = function | GType ({tname = name}, _) -> - H.mem keepers.typedefs name + H.mem keepers.typedefs name | GEnumTag ({ename = name}, _) | GEnumTagDecl ({ename = name}, _) -> - H.mem keepers.enums name + H.mem keepers.enums name | GCompTag ({cname = name; cstruct = structure}, _) | GCompTagDecl ({cname = name; cstruct = structure}, _) -> - let collection = if structure then keepers.structs else keepers.unions in - H.mem collection name + let collection = if structure then keepers.structs else keepers.unions in + H.mem collection name | GVar ({vname = name; vattr = attrs}, _, _) | GVarDecl ({vname = name; vattr = attrs}, _) | GFunDecl (_,{vname = name; vattr = attrs}, _) | GFun ({svar = {vname = name; vattr = attrs}}, _) -> - H.mem keepers.defines name || - hasAttribute "used" attrs + H.mem keepers.defines name || + hasAttribute "used" attrs | _ -> - false + false @@ -229,14 +229,14 @@ let isPragmaRoot keepers = function * * Common root collecting utilities * - *) +*) (*TODO:remove -let traceRoot _reason _global = -(* trace (dprintf "root (%s): %a@!" reason d_shortglobal global);*) + let traceRoot _reason _global = + (* trace (dprintf "root (%s): %a@!" reason d_shortglobal global);*) true -let traceNonRoot _reason _global = -(* trace (dprintf "non-root (%s): %a@!" reason d_shortglobal global);*) + let traceNonRoot _reason _global = + (* trace (dprintf "non-root (%s): %a@!" reason d_shortglobal global);*) false *) let hasExportingAttribute funvar = @@ -253,7 +253,7 @@ let hasExportingAttribute funvar = * * Root collection from external linkage * - *) +*) (* Exported roots are those global varinfos which are visible to the @@ -266,43 +266,43 @@ let hasExportingAttribute funvar = * - the function named "main" * gcc incorrectly (according to C99) makes inline functions visible to * the linker. So we can only remove inline functions on MSVC. - *) +*) let isExportedRoot global = let name, result, reason = match global with - | GVar ({vstorage = Static} as v, _, _) when - Cil.hasAttribute "FC_BUILTIN" v.vattr -> - v.vname, true, "FC_BUILTIN attribute" - | GVar ({vstorage = Static; vname}, _, _) -> vname, false, "static variable" - | GVar (v,_,_) -> - v.vname, true, "non-static variable" - | GFun ({svar = v}, _) -> begin - if hasExportingAttribute v then - v.vname,true, "constructor or destructor function" - else if v.vstorage = Static then - v.vname, not !rmUnusedStatic, "static function" - else if v.vinline && v.vstorage != Extern - && (Cil.msvcMode () || !rmUnusedInlines) then - v.vname, false, "inline function" - else - v.vname, true, "other function" - end - | GFunDecl(_,v,_) when hasAttribute "alias" v.vattr -> - v.vname, true, "has GCC alias attribute" - | GFunDecl(_,v,_) | GVarDecl(v,_) when hasAttribute "FC_BUILTIN" v.vattr -> - v.vname, true, "has FC_BUILTIN attribute" - | GAnnot _ -> "", true, "global annotation" - | GType (t, _) when - Cil.hasAttribute "FC_BUILTIN" (Cil.typeAttr t.ttype) -> - t.tname, true, "has FC_BUILTIN attribute" - | GCompTag (c,_) | GCompTagDecl (c,_) when - Cil.hasAttribute "FC_BUILTIN" c.cattr -> - c.cname, true, "has FC_BUILTIN attribute" - | GEnumTag (e, _) | GEnumTagDecl (e,_) when - Cil.hasAttribute "FC_BUILTIN" e.eattr -> - e.ename, true, "has FC_BUILTIN attribute" - | _ -> - "", false, "neither function nor variable nor annotation" + | GVar ({vstorage = Static} as v, _, _) when + Cil.hasAttribute "FC_BUILTIN" v.vattr -> + v.vname, true, "FC_BUILTIN attribute" + | GVar ({vstorage = Static; vname}, _, _) -> vname, false, "static variable" + | GVar (v,_,_) -> + v.vname, true, "non-static variable" + | GFun ({svar = v}, _) -> begin + if hasExportingAttribute v then + v.vname,true, "constructor or destructor function" + else if v.vstorage = Static then + v.vname, not !rmUnusedStatic, "static function" + else if v.vinline && v.vstorage != Extern + && (Cil.msvcMode () || !rmUnusedInlines) then + v.vname, false, "inline function" + else + v.vname, true, "other function" + end + | GFunDecl(_,v,_) when hasAttribute "alias" v.vattr -> + v.vname, true, "has GCC alias attribute" + | GFunDecl(_,v,_) | GVarDecl(v,_) when hasAttribute "FC_BUILTIN" v.vattr -> + v.vname, true, "has FC_BUILTIN attribute" + | GAnnot _ -> "", true, "global annotation" + | GType (t, _) when + Cil.hasAttribute "FC_BUILTIN" (Cil.typeAttr t.ttype) -> + t.tname, true, "has FC_BUILTIN attribute" + | GCompTag (c,_) | GCompTagDecl (c,_) when + Cil.hasAttribute "FC_BUILTIN" c.cattr -> + c.cname, true, "has FC_BUILTIN attribute" + | GEnumTag (e, _) | GEnumTagDecl (e,_) when + Cil.hasAttribute "FC_BUILTIN" e.eattr -> + e.ename, true, "has FC_BUILTIN attribute" + | _ -> + "", false, "neither function nor variable nor annotation" in Kernel.debug ~dkey "isExportedRoot %s -> %B, %s" name result reason; @@ -314,25 +314,25 @@ let isExportedRoot global = * * Root collection for complete programs * - *) +*) (* Exported roots are "main()" and functions bearing a "constructor" * or "destructor" attribute. These are the only things which must be * retained in a complete program. - *) +*) let isCompleteProgramRoot global = let result = match global with - | GFun ({svar = {vname = "main"; vstorage = vstorage}}, _) -> + | GFun ({svar = {vname = "main"; vstorage = vstorage}}, _) -> vstorage <> Static - | GFun (fundec, _) - when hasExportingAttribute fundec.svar -> + | GFun (fundec, _) + when hasExportingAttribute fundec.svar -> true - | _ -> + | _ -> false in -(* trace (dprintf "complete program root -> %b for %a@!" result d_shortglobal global);*) + (* trace (dprintf "complete program root -> %b for %a@!" result d_shortglobal global);*) result @@ -340,7 +340,7 @@ let isCompleteProgramRoot global = * * Transitive reachability closure from roots * - *) +*) (* This visitor recursively marks all reachable types and variables as used. *) @@ -351,26 +351,26 @@ class markReachableVisitor method! vglob = function | GType (typeinfo, _) -> - typeinfo.treferenced <- true; - DoChildren + typeinfo.treferenced <- true; + DoChildren | GCompTag (compinfo, _) | GCompTagDecl (compinfo, _) -> - compinfo.creferenced <- true; - DoChildren + compinfo.creferenced <- true; + DoChildren | GEnumTag (enuminfo, _) | GEnumTagDecl (enuminfo, _) -> - enuminfo.ereferenced <- true; - DoChildren + enuminfo.ereferenced <- true; + DoChildren | GVar (varinfo, _, _) | GVarDecl (varinfo, _) | GFunDecl (_,varinfo, _) | GFun ({svar = varinfo}, _) -> - if not (hasAttribute "FC_BUILTIN" varinfo.vattr) then - varinfo.vreferenced <- true; - DoChildren + if not (hasAttribute "FC_BUILTIN" varinfo.vattr) then + varinfo.vreferenced <- true; + DoChildren | GAnnot _ -> DoChildren | _ -> - SkipChildren + SkipChildren method! vstmt s = match s.skind with @@ -389,116 +389,116 @@ class markReachableVisitor method! vinst = function | Asm (_, tmpls, _, _) when Cil.msvcMode () -> - (* If we have inline assembly on MSVC, we cannot tell which locals - * are referenced. Keep them all *) - (match !currentFunc with - Some fd -> - List.iter (fun v -> - let vre = Str.regexp_string (Str.quote v.vname) in - if List.exists (fun tmp -> - try ignore (Str.search_forward vre tmp 0); true - with Not_found -> false) - tmpls - then - v.vreferenced <- true) fd.slocals - | _ -> assert false); - DoChildren + (* If we have inline assembly on MSVC, we cannot tell which locals + * are referenced. Keep them all *) + (match !currentFunc with + Some fd -> + List.iter (fun v -> + let vre = Str.regexp_string (Str.quote v.vname) in + if List.exists (fun tmp -> + try ignore (Str.search_forward vre tmp 0); true + with Not_found -> false) + tmpls + then + v.vreferenced <- true) fd.slocals + | _ -> assert false); + DoChildren | _ -> DoChildren method! vvrbl v = if not v.vreferenced then begin - let name = v.vname in - if v.vglob then - Kernel.debug ~dkey "marking transitive use: global %s" name - else - Kernel.debug ~dkey "marking transitive use: local %s" name; + let name = v.vname in + if v.vglob then + Kernel.debug ~dkey "marking transitive use: global %s" name + else + Kernel.debug ~dkey "marking transitive use: local %s" name; (* If this is a global, we need to keep everything used in its - * definition and declarations. *) + * definition and declarations. *) v.vreferenced <- true; - if v.vglob then - begin - Kernel.debug ~dkey "descending: global %s" name; - let descend global = - ignore (visitCilGlobal (self :> cilVisitor) global) - in - let globals = Hashtbl.find_all globalMap name in - List.iter descend globals - end + if v.vglob then + begin + Kernel.debug ~dkey "descending: global %s" name; + let descend global = + ignore (visitCilGlobal (self :> cilVisitor) global) + in + let globals = Hashtbl.find_all globalMap name in + List.iter descend globals + end end; SkipChildren method private mark_enum e = if not e.ereferenced then begin - Kernel.debug ~dkey "marking transitive use: enum %s\n" e.ename; - e.ereferenced <- true; - self#visitAttrs e.eattr; + Kernel.debug ~dkey "marking transitive use: enum %s\n" e.ename; + e.ereferenced <- true; + self#visitAttrs e.eattr; (* Must visit the value attributed to the enum constants *) ignore (visitCilEnumInfo (self:>cilVisitor) e); end - else + else Kernel.debug ~dkey "not marking transitive use: enum %s\n" e.ename; method! vexpr e = match e.enode with Const (CEnum {eihost = ei}) -> self#mark_enum ei; DoChildren | _ -> DoChildren - + method! vterm_node t = match t with TConst (LEnum {eihost = ei}) -> self#mark_enum ei; DoChildren | _ -> DoChildren - + method private visitAttrs attrs = ignore (visitCilAttributes (self :> cilVisitor) attrs) - + method! vtype typ = (match typ with - | TEnum(e, attrs) -> - self#visitAttrs attrs; - self#mark_enum e - - | TComp(c, _, attrs) -> - let old = c.creferenced in - if not old then - begin - Kernel.debug ~dkey "marking transitive use: compound %s\n" - c.cname; - c.creferenced <- true; - - (* to recurse, we must ask explicitly *) - let recurse f = ignore (self#vtype f.ftype) in - List.iter recurse c.cfields; - self#visitAttrs attrs; - self#visitAttrs c.cattr - end; - - | TNamed(ti, attrs) -> - let old = ti.treferenced in - if not old then - begin - Kernel.debug ~dkey "marking transitive use: typedef %s\n" - ti.tname; - ti.treferenced <- true; - - (* recurse deeper into the type referred-to by the typedef *) - (* to recurse, we must ask explicitly *) - ignore (self#vtype ti.ttype); - self#visitAttrs attrs - end; - - | TVoid a | TInt (_,a) | TFloat (_,a) | TBuiltin_va_list a -> - self#visitAttrs a - | TPtr(ty,a) -> ignore (self#vtype ty); self#visitAttrs a - | TArray(ty,sz, _, a) -> - ignore (self#vtype ty); self#visitAttrs a; - Extlib.may (ignore $ (visitCilExpr (self:>cilVisitor))) sz - | TFun (ty, args,_,a) -> - ignore (self#vtype ty); - Extlib.may (List.iter (fun (_,ty,_) -> ignore (self#vtype ty))) args; - self#visitAttrs a + | TEnum(e, attrs) -> + self#visitAttrs attrs; + self#mark_enum e + + | TComp(c, _, attrs) -> + let old = c.creferenced in + if not old then + begin + Kernel.debug ~dkey "marking transitive use: compound %s\n" + c.cname; + c.creferenced <- true; + + (* to recurse, we must ask explicitly *) + let recurse f = ignore (self#vtype f.ftype) in + List.iter recurse c.cfields; + self#visitAttrs attrs; + self#visitAttrs c.cattr + end; + + | TNamed(ti, attrs) -> + let old = ti.treferenced in + if not old then + begin + Kernel.debug ~dkey "marking transitive use: typedef %s\n" + ti.tname; + ti.treferenced <- true; + + (* recurse deeper into the type referred-to by the typedef *) + (* to recurse, we must ask explicitly *) + ignore (self#vtype ti.ttype); + self#visitAttrs attrs + end; + + | TVoid a | TInt (_,a) | TFloat (_,a) | TBuiltin_va_list a -> + self#visitAttrs a + | TPtr(ty,a) -> ignore (self#vtype ty); self#visitAttrs a + | TArray(ty,sz, _, a) -> + ignore (self#vtype ty); self#visitAttrs a; + Extlib.may (ignore $ (visitCilExpr (self:>cilVisitor))) sz + | TFun (ty, args,_,a) -> + ignore (self#vtype ty); + Extlib.may (List.iter (fun (_,ty,_) -> ignore (self#vtype ty))) args; + self#visitAttrs a ); SkipChildren end @@ -514,9 +514,9 @@ let markReachable file isRoot = | GVar (info, _, _) | GFunDecl (_,info, _) | GVarDecl (info, _) -> - Hashtbl.add globalMap info.vname global + Hashtbl.add globalMap info.vname global | _ -> - () + () in iterGlobals file considerGlobal; @@ -527,14 +527,14 @@ let markReachable file isRoot = let visitIfRoot global = if isRoot global then begin -(* trace (dprintf "traversing root global: %a\n" d_shortglobal global);*) + (* trace (dprintf "traversing root global: %a\n" d_shortglobal global);*) (match global with - GFun(fd, _) -> currentFunc := Some fd - | _ -> currentFunc := None); - ignore (visitCilGlobal visitor global) + GFun(fd, _) -> currentFunc := Some fd + | _ -> currentFunc := None); + ignore (visitCilGlobal visitor global) end else -(* trace (dprintf "skipping non-root global: %a\n" d_shortglobal global)*) + (* trace (dprintf "skipping non-root global: %a\n" d_shortglobal global)*) () in iterGlobals file visitIfRoot @@ -553,71 +553,71 @@ let labelsToKeep is_removable ll = let rec loop sofar = function [] -> sofar, [] | l :: rest -> - let newlabel, keepl = - match l with - | Case _ | Default _ -> sofar, true - | Label (ln, _, _) as lab -> begin - match is_removable lab, sofar with - | true, ("", _) -> - (* keep this one only if we have no label so far *) - (ln, lab), false - | true, _ -> sofar, false - | false, (_, lab') when is_removable lab' -> - (* this is an original label; prefer it to temporary or - * missing labels *) - (ln, lab), false - | false, _ -> sofar, false + let newlabel, keepl = + match l with + | Case _ | Default _ -> sofar, true + | Label (ln, _, _) as lab -> begin + match is_removable lab, sofar with + | true, ("", _) -> + (* keep this one only if we have no label so far *) + (ln, lab), false + | true, _ -> sofar, false + | false, (_, lab') when is_removable lab' -> + (* this is an original label; prefer it to temporary or + * missing labels *) + (ln, lab), false + | false, _ -> sofar, false end - in - let newlabel', rest' = loop newlabel rest in - newlabel', (if keepl then l :: rest' else rest') + in + let newlabel', rest' = loop newlabel rest in + newlabel', (if keepl then l :: rest' else rest') in loop ("", Label("", Cil_datatype.Location.unknown, false)) ll class markUsedLabels is_removable (labelMap: (string, unit) H.t) = let keep_label dest = - let (ln, _), _ = labelsToKeep is_removable !dest.labels in - if ln = "" then - Kernel.fatal "Statement has no label:@\n%a" Cil_printer.pp_stmt !dest ; - (* Mark it as used *) - H.replace labelMap ln () -in -let keep_label_logic = function - | FormalLabel _ | BuiltinLabel _ -> () - | StmtLabel dest -> keep_label dest -in -object - inherit nopCilVisitor + let (ln, _), _ = labelsToKeep is_removable !dest.labels in + if ln = "" then + Kernel.fatal "Statement has no label:@\n%a" Cil_printer.pp_stmt !dest ; + (* Mark it as used *) + H.replace labelMap ln () + in + let keep_label_logic = function + | FormalLabel _ | BuiltinLabel _ -> () + | StmtLabel dest -> keep_label dest + in + object + inherit nopCilVisitor - method! vstmt (s: stmt) = - match s.skind with - Goto (dest, _) -> keep_label dest; DoChildren - | _ -> DoChildren + method! vstmt (s: stmt) = + match s.skind with + Goto (dest, _) -> keep_label dest; DoChildren + | _ -> DoChildren - method! vterm_node t = - begin - match t with - | Tat (_,lab) -> keep_label_logic lab - | Tapp(_,labs,_) -> + method! vterm_node t = + begin + match t with + | Tat (_,lab) -> keep_label_logic lab + | Tapp(_,labs,_) -> List.iter keep_label_logic labs - | _ -> () - end; - DoChildren + | _ -> () + end; + DoChildren - method! vpredicate_node t = - begin - match t with - | Pat (_,lab) -> keep_label_logic lab - | Papp(_,labs,_) -> + method! vpredicate_node t = + begin + match t with + | Pat (_,lab) -> keep_label_logic lab + | Papp(_,labs,_) -> List.iter keep_label_logic labs - | _ -> () - end; - DoChildren + | _ -> () + end; + DoChildren - (* No need to go into expressions or types *) - method! vexpr _ = SkipChildren - method! vtype _ = SkipChildren - end + (* No need to go into expressions or types *) + method! vexpr _ = SkipChildren + method! vtype _ = SkipChildren + end class removeUnusedLabels is_removable (labelMap: (string, unit) H.t) = object inherit nopCilVisitor @@ -625,16 +625,16 @@ class removeUnusedLabels is_removable (labelMap: (string, unit) H.t) = object method! vstmt (s: stmt) = let (ln, lab), lrest = labelsToKeep is_removable s.labels in s.labels <- - (if ln <> "" && + (if ln <> "" && (H.mem labelMap ln || not (is_removable lab)) (* keep user-provided labels *) - then (* We had labels *) + then (* We had labels *) (lab :: lrest) else lrest); DoChildren - (* No need to go into expressions or instructions *) + (* No need to go into expressions or instructions *) method! vexpr _ = SkipChildren method! vinst _ = SkipChildren method! vtype _ = SkipChildren @@ -644,7 +644,7 @@ end * * Removal of unused varinfos * - *) +*) (* regular expression matching names of uninteresting locals *) @@ -694,60 +694,60 @@ let removeUnmarked isRoot file = let filterGlobal global = match global with - (* unused global types, variables, and functions are simply removed *) - | GType (t, _) -> - t.treferenced || - Cil.hasAttribute "FC_BUILTIN" (Cil.typeAttr t.ttype) - || isRoot global - | GCompTag (c,_) | GCompTagDecl (c,_) -> - c.creferenced || - Cil.hasAttribute "FC_BUILTIN" c.cattr || isRoot global - | GEnumTag (e, _) | GEnumTagDecl (e,_) -> - e.ereferenced || - Cil.hasAttribute "FC_BUILTIN" e.eattr || isRoot global - | GVar (v, _, _) -> - v.vreferenced || - Cil.hasAttribute "FC_BUILTIN" v.vattr || isRoot global - | GVarDecl (v, _) - | GFunDecl (_,v, _)-> - v.vreferenced || - Cil.hasAttribute "FC_BUILTIN" v.vattr || - (Cil.removeFormalsDecl v; isRoot global) - (* keep FC_BUILTIN, as some plug-ins might want to use them later - for semi-legitimate reasons. *) - | GFun (func, _) -> - (* if some generated temp variables are useless, remove them. - Keep variables that were already present in the code. - *) - let filterLocal local = - if local.vtemp && not local.vreferenced then - begin - (* along the way, record the interesting locals that were removed *) - let name = local.vname in - (Kernel.debug ~dkey "removing local: %s\n" name); - if not (Str.string_match uninteresting name 0) then - removedLocals := - (func.svar.vname ^ "::" ^ name) :: !removedLocals; - false - end else true - in - func.slocals <- List.filter filterLocal func.slocals; - let remove_blocals = object - inherit Cil.nopCilVisitor - method! vblock b = - b.blocals <- List.filter filterLocal b.blocals; - DoChildren - end - in - (func.svar.vreferenced - || Cil.hasAttribute "FC_BUILTIN" func.svar.vattr - || isRoot global) && - (ignore (visitCilBlock remove_blocals func.sbody); - remove_unused_labels func; - true) - - (* all other globals are retained *) - | _ -> true + (* unused global types, variables, and functions are simply removed *) + | GType (t, _) -> + t.treferenced || + Cil.hasAttribute "FC_BUILTIN" (Cil.typeAttr t.ttype) + || isRoot global + | GCompTag (c,_) | GCompTagDecl (c,_) -> + c.creferenced || + Cil.hasAttribute "FC_BUILTIN" c.cattr || isRoot global + | GEnumTag (e, _) | GEnumTagDecl (e,_) -> + e.ereferenced || + Cil.hasAttribute "FC_BUILTIN" e.eattr || isRoot global + | GVar (v, _, _) -> + v.vreferenced || + Cil.hasAttribute "FC_BUILTIN" v.vattr || isRoot global + | GVarDecl (v, _) + | GFunDecl (_,v, _)-> + v.vreferenced || + Cil.hasAttribute "FC_BUILTIN" v.vattr || + (Cil.removeFormalsDecl v; isRoot global) + (* keep FC_BUILTIN, as some plug-ins might want to use them later + for semi-legitimate reasons. *) + | GFun (func, _) -> + (* if some generated temp variables are useless, remove them. + Keep variables that were already present in the code. + *) + let filterLocal local = + if local.vtemp && not local.vreferenced then + begin + (* along the way, record the interesting locals that were removed *) + let name = local.vname in + (Kernel.debug ~dkey "removing local: %s\n" name); + if not (Str.string_match uninteresting name 0) then + removedLocals := + (func.svar.vname ^ "::" ^ name) :: !removedLocals; + false + end else true + in + func.slocals <- List.filter filterLocal func.slocals; + let remove_blocals = object + inherit Cil.nopCilVisitor + method! vblock b = + b.blocals <- List.filter filterLocal b.blocals; + DoChildren + end + in + (func.svar.vreferenced + || Cil.hasAttribute "FC_BUILTIN" func.svar.vattr + || isRoot global) && + (ignore (visitCilBlock remove_blocals func.sbody); + remove_unused_labels func; + true) + + (* all other globals are retained *) + | _ -> true in file.globals <- List.filter filterGlobal file.globals; !removedLocals @@ -757,7 +757,7 @@ let removeUnmarked isRoot file = * * Exported interface * - *) +*) type rootsFilter = global -> bool -- GitLab From ed85673439c445d9b7679202e0e8c0d0a88cd25b Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Fri, 27 Jul 2018 15:19:13 +0200 Subject: [PATCH 113/376] [Kernel] refactor removeUnusedTemps to no longer use '*referenced' fields --- src/kernel_internals/typing/rmtmps.ml | 544 ++++++++++++++------------ 1 file changed, 296 insertions(+), 248 deletions(-) diff --git a/src/kernel_internals/typing/rmtmps.ml b/src/kernel_internals/typing/rmtmps.ml index 9eae099fe52..c15193c0bc6 100644 --- a/src/kernel_internals/typing/rmtmps.ml +++ b/src/kernel_internals/typing/rmtmps.ml @@ -46,7 +46,30 @@ let dkey = Kernel.dkey_rmtmps open Extlib open Cil_types open Cil -module H = Hashtbl + +(* Reachability of used data is stored in a table mapping [info] to [bool]. + Note that due to mutability, we need to use our own Hashtbl module which + uses [Cil_datatype] equality functions. *) +type info = + | Type of typeinfo + | Enum of enuminfo + | Comp of compinfo + | Var of varinfo + +module InfoHashtbl = Hashtbl.Make(struct + type t = info + let equal i1 i2 = match i1, i2 with + | Type t1, Type t2 -> Cil_datatype.Typeinfo.equal t1 t2 + | Enum e1, Enum e2 -> Cil_datatype.Enuminfo.equal e1 e2 + | Comp c1, Comp c2 -> Cil_datatype.Compinfo.equal c1 c2 + | Var v1, Var v2 -> Cil_datatype.Varinfo.equal v1 v2 + | _, _ -> false + let hash = function + | Type t -> Cil_datatype.Typeinfo.hash t + | Enum e -> Cil_datatype.Enuminfo.hash e + | Comp c -> Cil_datatype.Compinfo.hash c + | Var v -> Cil_datatype.Varinfo.hash v + end) (* Used by external plug-ins: *) let keepUnused = ref false @@ -55,44 +78,7 @@ let keepUnused = ref false let rmUnusedInlines = ref false let rmUnusedStatic = ref false -(*********************************************************************** - * - * Clearing of "referenced" bits - * -*) - - -let clearReferencedBits file = - let considerGlobal global = - match global with - | GType (info, _) -> - info.treferenced <- false - - | GEnumTag (info, _) - | GEnumTagDecl (info, _) -> - Kernel.debug ~dkey "clearing mark: %a" Cil_printer.pp_global global; - info.ereferenced <- false - - | GCompTag (info, _) - | GCompTagDecl (info, _) -> - info.creferenced <- false - - | GVar (vi, _, _) - | GFunDecl (_, vi, _) - | GVarDecl (vi, _) -> - vi.vreferenced <- false - - | GFun ({svar = info} as func, _) -> - info.vreferenced <- false; - let clearMark local = - local.vreferenced <- false - in - List.iter clearMark func.slocals - - | _ -> - () - in - iterGlobals file considerGlobal +let is_reachable t r = try InfoHashtbl.find t r with Not_found -> false (*********************************************************************** @@ -103,7 +89,7 @@ let clearReferencedBits file = (* collections of names of things to keep *) -type collection = (string, unit) H.t +type collection = (string, unit) Hashtbl.t type keepers = { typedefs : collection; enums : collection; @@ -121,15 +107,15 @@ exception Bad_pragma * up collections of the corresponding varinfos' names. *) -let categorizePragmas file = +let categorizePragmas ast = (* names of things which should be retained *) let keepers = { - typedefs = H.create 1; - enums = H.create 1; - structs = H.create 1; - unions = H.create 1; - defines = H.create 1 + typedefs = Hashtbl.create 1; + enums = Hashtbl.create 1; + structs = Hashtbl.create 1; + unions = Hashtbl.create 1; + defines = Hashtbl.create 1 } in (* populate these name collections in light of each pragma *) @@ -170,7 +156,7 @@ let categorizePragmas file = | _ -> raise Bad_pragma in - H.add collection name () + Hashtbl.add collection name () | _ -> raise Bad_pragma with Bad_pragma -> @@ -183,7 +169,7 @@ let categorizePragmas file = match filterAttributes "alias" v.vattr with | [] -> () (* ordinary prototype. *) | [ Attr("alias", [AStr othername]) ] -> - H.add keepers.defines othername () + Hashtbl.add keepers.defines othername () | _ -> Kernel.fatal ~current:true "Bad alias attribute at %a" @@ -192,7 +178,7 @@ let categorizePragmas file = | _ -> () in - iterGlobals file considerPragma; + iterGlobals ast considerPragma; keepers @@ -206,19 +192,19 @@ let categorizePragmas file = let isPragmaRoot keepers = function | GType ({tname = name}, _) -> - H.mem keepers.typedefs name + Hashtbl.mem keepers.typedefs name | GEnumTag ({ename = name}, _) | GEnumTagDecl ({ename = name}, _) -> - H.mem keepers.enums name + Hashtbl.mem keepers.enums name | GCompTag ({cname = name; cstruct = structure}, _) | GCompTagDecl ({cname = name; cstruct = structure}, _) -> let collection = if structure then keepers.structs else keepers.unions in - H.mem collection name + Hashtbl.mem collection name | GVar ({vname = name; vattr = attrs}, _, _) | GVarDecl ({vname = name; vattr = attrs}, _) | GFunDecl (_,{vname = name; vattr = attrs}, _) | GFun ({svar = {vname = name; vattr = attrs}}, _) -> - H.mem keepers.defines name || + Hashtbl.mem keepers.defines name || hasAttribute "used" attrs | _ -> false @@ -230,15 +216,6 @@ let isPragmaRoot keepers = function * Common root collecting utilities * *) -(*TODO:remove - let traceRoot _reason _global = - (* trace (dprintf "root (%s): %a@!" reason d_shortglobal global);*) - true - - let traceNonRoot _reason _global = - (* trace (dprintf "non-root (%s): %a@!" reason d_shortglobal global);*) - false -*) let hasExportingAttribute funvar = let isExportingAttribute = function | Attr ("constructor", []) -> true @@ -247,8 +224,6 @@ let hasExportingAttribute funvar = in List.exists isExportingAttribute funvar.vattr - - (*********************************************************************** * * Root collection from external linkage @@ -345,166 +320,168 @@ let isCompleteProgramRoot global = (* This visitor recursively marks all reachable types and variables as used. *) class markReachableVisitor - ((globalMap: (string, Cil_types.global) H.t), - (currentFunc: Cil_types.fundec option ref)) = object (self) - inherit nopCilVisitor + (globalMap: (string, Cil_types.global) Hashtbl.t) + (currentFunc: Cil_types.fundec option ref) + (reachable_tbl: bool InfoHashtbl.t) + = object (self) + inherit nopCilVisitor - method! vglob = function - | GType (typeinfo, _) -> - typeinfo.treferenced <- true; - DoChildren - | GCompTag (compinfo, _) - | GCompTagDecl (compinfo, _) -> - compinfo.creferenced <- true; - DoChildren - | GEnumTag (enuminfo, _) - | GEnumTagDecl (enuminfo, _) -> - enuminfo.ereferenced <- true; - DoChildren - | GVar (varinfo, _, _) - | GVarDecl (varinfo, _) - | GFunDecl (_,varinfo, _) - | GFun ({svar = varinfo}, _) -> - if not (hasAttribute "FC_BUILTIN" varinfo.vattr) then - varinfo.vreferenced <- true; - DoChildren - | GAnnot _ -> DoChildren - | _ -> - SkipChildren + method! vglob = function + | GType (typeinfo, _) -> + InfoHashtbl.replace reachable_tbl (Type typeinfo) true; + DoChildren + | GCompTag (compinfo, _) + | GCompTagDecl (compinfo, _) -> + InfoHashtbl.replace reachable_tbl (Comp compinfo) true; + DoChildren + | GEnumTag (enuminfo, _) + | GEnumTagDecl (enuminfo, _) -> + InfoHashtbl.replace reachable_tbl (Enum enuminfo) true; + DoChildren + | GVar (varinfo, _, _) + | GVarDecl (varinfo, _) + | GFunDecl (_,varinfo, _) + | GFun ({svar = varinfo}, _) -> + if not (hasAttribute "FC_BUILTIN" varinfo.vattr) then + InfoHashtbl.replace reachable_tbl (Var varinfo) true; + DoChildren + | GAnnot _ -> DoChildren + | _ -> + SkipChildren + + method! vstmt s = + match s.skind with + | TryCatch(_,c,_) -> + List.iter + (fun (decl,_) -> + match decl with + | Catch_exn(v,l) -> + (* treat all variables declared in exn clause as used. *) + ignore (self#vvrbl v); + List.iter (fun (v,_) -> ignore (self#vvrbl v)) l + | Catch_all -> ()) + c; + DoChildren + | _ -> DoChildren - method! vstmt s = - match s.skind with - | TryCatch(_,c,_) -> - List.iter - (fun (decl,_) -> - match decl with - | Catch_exn(v,l) -> - (* treat all variables declared in exn clause as used. *) - ignore (self#vvrbl v); - List.iter (fun (v,_) -> ignore (self#vvrbl v)) l - | Catch_all -> ()) - c; - DoChildren - | _ -> DoChildren - - method! vinst = function - | Asm (_, tmpls, _, _) when Cil.msvcMode () -> - (* If we have inline assembly on MSVC, we cannot tell which locals - * are referenced. Keep them all *) - (match !currentFunc with - Some fd -> - List.iter (fun v -> - let vre = Str.regexp_string (Str.quote v.vname) in - if List.exists (fun tmp -> - try ignore (Str.search_forward vre tmp 0); true - with Not_found -> false) - tmpls - then - v.vreferenced <- true) fd.slocals - | _ -> assert false); - DoChildren - | _ -> DoChildren + method! vinst = function + | Asm (_, tmpls, _, _) when Cil.msvcMode () -> + (* If we have inline assembly on MSVC, we cannot tell which locals + * are referenced. Keep them all *) + (match !currentFunc with + Some fd -> + List.iter (fun v -> + let vre = Str.regexp_string (Str.quote v.vname) in + if List.exists (fun tmp -> + try ignore (Str.search_forward vre tmp 0); true + with Not_found -> false) + tmpls + then + InfoHashtbl.replace reachable_tbl (Var v) true + ) fd.slocals + | _ -> assert false); + DoChildren + | _ -> DoChildren - method! vvrbl v = - if not v.vreferenced then - begin - let name = v.vname in - if v.vglob then - Kernel.debug ~dkey "marking transitive use: global %s" name - else - Kernel.debug ~dkey "marking transitive use: local %s" name; + method! vvrbl v = + if not (is_reachable reachable_tbl (Var v)) then + begin + let name = v.vname in + if v.vglob then + Kernel.debug ~dkey "marking transitive use: global %s" name + else + Kernel.debug ~dkey "marking transitive use: local %s" name; + + (* If this is a global, we need to keep everything used in its + * definition and declarations. *) + InfoHashtbl.replace reachable_tbl (Var v) true; + if v.vglob then + begin + Kernel.debug ~dkey "descending: global %s" name; + let descend global = + ignore (visitCilGlobal (self :> cilVisitor) global) + in + let globals = Hashtbl.find_all globalMap name in + List.iter descend globals + end + end; + SkipChildren - (* If this is a global, we need to keep everything used in its - * definition and declarations. *) - v.vreferenced <- true; - if v.vglob then - begin - Kernel.debug ~dkey "descending: global %s" name; - let descend global = - ignore (visitCilGlobal (self :> cilVisitor) global) - in - let globals = Hashtbl.find_all globalMap name in - List.iter descend globals - end - end; - SkipChildren + method private mark_enum e = + if not (is_reachable reachable_tbl (Enum e)) then + begin + Kernel.debug ~dkey "marking transitive use: enum %s\n" e.ename; + InfoHashtbl.replace reachable_tbl (Enum e) true; + self#visitAttrs e.eattr; + (* Must visit the value attributed to the enum constants *) + ignore (visitCilEnumInfo (self:>cilVisitor) e); + end + else + Kernel.debug ~dkey "not marking transitive use: enum %s\n" e.ename; + + method! vexpr e = + match e.enode with + Const (CEnum {eihost = ei}) -> self#mark_enum ei; DoChildren + | _ -> DoChildren - method private mark_enum e = - if not e.ereferenced then - begin - Kernel.debug ~dkey "marking transitive use: enum %s\n" e.ename; - e.ereferenced <- true; - self#visitAttrs e.eattr; - (* Must visit the value attributed to the enum constants *) - ignore (visitCilEnumInfo (self:>cilVisitor) e); - end - else - Kernel.debug ~dkey "not marking transitive use: enum %s\n" e.ename; + method! vterm_node t = + match t with + TConst (LEnum {eihost = ei}) -> self#mark_enum ei; DoChildren + | _ -> DoChildren - method! vexpr e = - match e.enode with - Const (CEnum {eihost = ei}) -> self#mark_enum ei; DoChildren - | _ -> DoChildren - - method! vterm_node t = - match t with - TConst (LEnum {eihost = ei}) -> self#mark_enum ei; DoChildren - | _ -> DoChildren - - method private visitAttrs attrs = - ignore (visitCilAttributes (self :> cilVisitor) attrs) - - method! vtype typ = - (match typ with - | TEnum(e, attrs) -> - self#visitAttrs attrs; - self#mark_enum e - - | TComp(c, _, attrs) -> - let old = c.creferenced in - if not old then - begin - Kernel.debug ~dkey "marking transitive use: compound %s\n" - c.cname; - c.creferenced <- true; - - (* to recurse, we must ask explicitly *) - let recurse f = ignore (self#vtype f.ftype) in - List.iter recurse c.cfields; - self#visitAttrs attrs; - self#visitAttrs c.cattr - end; - - | TNamed(ti, attrs) -> - let old = ti.treferenced in - if not old then - begin - Kernel.debug ~dkey "marking transitive use: typedef %s\n" - ti.tname; - ti.treferenced <- true; - - (* recurse deeper into the type referred-to by the typedef *) - (* to recurse, we must ask explicitly *) - ignore (self#vtype ti.ttype); - self#visitAttrs attrs - end; - - | TVoid a | TInt (_,a) | TFloat (_,a) | TBuiltin_va_list a -> - self#visitAttrs a - | TPtr(ty,a) -> ignore (self#vtype ty); self#visitAttrs a - | TArray(ty,sz, _, a) -> - ignore (self#vtype ty); self#visitAttrs a; - Extlib.may (ignore $ (visitCilExpr (self:>cilVisitor))) sz - | TFun (ty, args,_,a) -> - ignore (self#vtype ty); - Extlib.may (List.iter (fun (_,ty,_) -> ignore (self#vtype ty))) args; - self#visitAttrs a - ); - SkipChildren -end + method private visitAttrs attrs = + ignore (visitCilAttributes (self :> cilVisitor) attrs) + + method! vtype typ = + (match typ with + | TEnum(e, attrs) -> + self#visitAttrs attrs; + self#mark_enum e + + | TComp(c, _, attrs) -> + let old = is_reachable reachable_tbl (Comp c) in + if not old then + begin + Kernel.debug ~dkey "marking transitive use: compound %s\n" + c.cname; + InfoHashtbl.replace reachable_tbl (Comp c) true; + + (* to recurse, we must ask explicitly *) + let recurse f = ignore (self#vtype f.ftype) in + List.iter recurse c.cfields; + self#visitAttrs attrs; + self#visitAttrs c.cattr + end; + + | TNamed(ti, attrs) -> + let old = (is_reachable reachable_tbl (Type ti)) in + if not old then + begin + Kernel.debug ~dkey "marking transitive use: typedef %s\n" + ti.tname; + InfoHashtbl.replace reachable_tbl (Type ti) true; + (* recurse deeper into the type referred-to by the typedef *) + (* to recurse, we must ask explicitly *) + ignore (self#vtype ti.ttype); + self#visitAttrs attrs + end; + + | TVoid a | TInt (_,a) | TFloat (_,a) | TBuiltin_va_list a -> + self#visitAttrs a + | TPtr(ty,a) -> ignore (self#vtype ty); self#visitAttrs a + | TArray(ty,sz, _, a) -> + ignore (self#vtype ty); self#visitAttrs a; + Extlib.may (ignore $ (visitCilExpr (self:>cilVisitor))) sz + | TFun (ty, args,_,a) -> + ignore (self#vtype ty); + Extlib.may (List.iter (fun (_,ty,_) -> ignore (self#vtype ty))) args; + self#visitAttrs a + ); + SkipChildren + end -let markReachable file isRoot = +let markReachable isRoot ast reachable_tbl = (* build a mapping from global names back to their definitions & * declarations *) let globalMap = Hashtbl.create 137 in @@ -518,12 +495,12 @@ let markReachable file isRoot = | _ -> () in - iterGlobals file considerGlobal; + iterGlobals ast considerGlobal; let currentFunc = ref None in (* mark everything reachable from the global roots *) - let visitor = new markReachableVisitor (globalMap, currentFunc) in + let visitor = new markReachableVisitor globalMap currentFunc reachable_tbl in let visitIfRoot global = if isRoot global then begin @@ -537,8 +514,85 @@ let markReachable file isRoot = (* trace (dprintf "skipping non-root global: %a\n" d_shortglobal global)*) () in - iterGlobals file visitIfRoot + iterGlobals ast visitIfRoot + +(********************************************************************** + * + * Marking of referenced infos + * + **********************************************************************) + +class markReferencedVisitor = object + inherit nopCilVisitor + val inside_exp : exp Stack.t = Stack.create () + val inside_typ : typ Stack.t = Stack.create () + + method! vglob = function + | GType (typeinfo, _loc) -> + typeinfo.treferenced <- true; + DoChildren + | GCompTag (compinfo, _loc) + | GCompTagDecl (compinfo, _loc) -> + compinfo.creferenced <- true; + DoChildren + | GEnumTag (enuminfo, _loc) + | GEnumTagDecl (enuminfo, _loc) -> + enuminfo.ereferenced <- true; + DoChildren + | GVar (varinfo, _, _loc) + | GVarDecl (varinfo, _loc) + | GFunDecl (_,varinfo, _loc) + | GFun ({svar = varinfo}, _loc) -> + varinfo.vreferenced <- true; + DoChildren + | GAnnot _ -> DoChildren + | _ -> + SkipChildren + + method! vtype = function + | TNamed (ti, _) -> + if not (Stack.is_empty inside_typ) then begin + ti.treferenced <- true; + end; + DoChildren + | TComp (ci, _, _) -> + if not (Stack.is_empty inside_typ) then begin + ci.creferenced <- true; + end; + DoChildren + | TEnum (ei, _) -> + if not (Stack.is_empty inside_typ) then begin + ei.ereferenced <- true; + end; + DoChildren + | TVoid _ + | TInt _ + | TFloat _ + | TPtr _ + | TArray _ + | TFun _ + | TBuiltin_va_list _ -> DoChildren + + method! vexpr e = + match e.enode with + | SizeOf t | AlignOf t | UnOp (_, _, t) | BinOp (_, _, _, t) -> + Stack.push t inside_typ; + DoChildrenPost (fun e -> ignore (Stack.pop inside_typ); e) + | _ -> + Stack.push e inside_exp; + DoChildrenPost (fun e -> ignore (Stack.pop inside_exp); e) + + method! vvrbl v = + if not (Stack.is_empty inside_exp) then begin + v.vreferenced <- true; + end; + SkipChildren + +end + +let markReferenced ast = + visitCilFileSameGlobals (new markReferencedVisitor) ast (********************************************************************** * @@ -574,13 +628,13 @@ let labelsToKeep is_removable ll = in loop ("", Label("", Cil_datatype.Location.unknown, false)) ll -class markUsedLabels is_removable (labelMap: (string, unit) H.t) = +class markUsedLabels is_removable (labelMap: (string, unit) Hashtbl.t) = let keep_label dest = let (ln, _), _ = labelsToKeep is_removable !dest.labels in if ln = "" then Kernel.fatal "Statement has no label:@\n%a" Cil_printer.pp_stmt !dest ; (* Mark it as used *) - H.replace labelMap ln () + Hashtbl.replace labelMap ln () in let keep_label_logic = function | FormalLabel _ | BuiltinLabel _ -> () @@ -619,14 +673,14 @@ class markUsedLabels is_removable (labelMap: (string, unit) H.t) = method! vtype _ = SkipChildren end -class removeUnusedLabels is_removable (labelMap: (string, unit) H.t) = object +class removeUnusedLabels is_removable (labelMap: (string, unit) Hashtbl.t) = object inherit nopCilVisitor method! vstmt (s: stmt) = let (ln, lab), lrest = labelsToKeep is_removable s.labels in s.labels <- (if ln <> "" && - (H.mem labelMap ln || not (is_removable lab)) + (Hashtbl.mem labelMap ln || not (is_removable lab)) (* keep user-provided labels *) then (* We had labels *) (lab :: lrest) @@ -682,37 +736,37 @@ let label_removable = function let remove_unused_labels ?(is_removable=label_removable) func = (* We also want to remove unused labels. We do it all here, including * marking the used labels *) - let usedLabels:(string, unit) H.t = H.create 13 in + let usedLabels:(string, unit) Hashtbl.t = Hashtbl.create 13 in ignore (visitCilBlock (new markUsedLabels is_removable usedLabels) func.sbody); (* And now we scan again and we remove them *) ignore (visitCilBlock (new removeUnusedLabels is_removable usedLabels) func.sbody) -let removeUnmarked isRoot file = +let removeUnmarked isRoot ast reachable_tbl = let removedLocals = ref [] in let filterGlobal global = match global with (* unused global types, variables, and functions are simply removed *) | GType (t, _) -> - t.treferenced || + is_reachable reachable_tbl (Type t) || Cil.hasAttribute "FC_BUILTIN" (Cil.typeAttr t.ttype) || isRoot global | GCompTag (c,_) | GCompTagDecl (c,_) -> - c.creferenced || + is_reachable reachable_tbl (Comp c) || Cil.hasAttribute "FC_BUILTIN" c.cattr || isRoot global | GEnumTag (e, _) | GEnumTagDecl (e,_) -> - e.ereferenced || + is_reachable reachable_tbl (Enum e) || Cil.hasAttribute "FC_BUILTIN" e.eattr || isRoot global | GVar (v, _, _) -> - v.vreferenced || + is_reachable reachable_tbl (Var v) || Cil.hasAttribute "FC_BUILTIN" v.vattr || isRoot global | GVarDecl (v, _) | GFunDecl (_,v, _)-> - v.vreferenced || + is_reachable reachable_tbl (Var v) || Cil.hasAttribute "FC_BUILTIN" v.vattr || - (Cil.removeFormalsDecl v; isRoot global) + (if isRoot global then true else (Cil.removeFormalsDecl v; false)) (* keep FC_BUILTIN, as some plug-ins might want to use them later for semi-legitimate reasons. *) | GFun (func, _) -> @@ -720,7 +774,7 @@ let removeUnmarked isRoot file = Keep variables that were already present in the code. *) let filterLocal local = - if local.vtemp && not local.vreferenced then + if local.vtemp && not (is_reachable reachable_tbl (Var local)) then begin (* along the way, record the interesting locals that were removed *) let name = local.vname in @@ -739,7 +793,7 @@ let removeUnmarked isRoot file = DoChildren end in - (func.svar.vreferenced + ((is_reachable reachable_tbl (Var func.svar)) || Cil.hasAttribute "FC_BUILTIN" func.svar.vattr || isRoot global) && (ignore (visitCilBlock remove_blocals func.sbody); @@ -749,7 +803,8 @@ let removeUnmarked isRoot file = (* all other globals are retained *) | _ -> true in - file.globals <- List.filter filterGlobal file.globals; + let keptGlobals, _removedGlobals = List.partition filterGlobal ast.globals in + ast.globals <- keptGlobals; !removedLocals @@ -762,14 +817,15 @@ let removeUnmarked isRoot file = type rootsFilter = global -> bool -let removeUnusedTemps ?(isRoot : rootsFilter = isExportedRoot) file = +let removeUnusedTemps ?(isRoot : rootsFilter = isExportedRoot) ast = if not !keepUnused then begin Kernel.debug ~dkey "Removing unused temporaries" ; (* digest any pragmas that would create additional roots *) - let keepers = categorizePragmas file in + let keepers = categorizePragmas ast in + let reachable_tbl = InfoHashtbl.create 43 in (* build up the root set *) let isRoot global = isPragmaRoot keepers global || @@ -777,20 +833,12 @@ let removeUnusedTemps ?(isRoot : rootsFilter = isExportedRoot) file = in (* mark everything reachable from the global roots *) - clearReferencedBits file; - markReachable file isRoot; + markReachable isRoot ast reachable_tbl; - (* take out the trash *) - let removedLocals = removeUnmarked isRoot file in + markReferenced ast; - (* print which original source variables were removed *) - if false && removedLocals != [] then - let count = List.length removedLocals in - if count > 2000 then - (Kernel.warning "%d unused local variables removed" count) - else - (Kernel.warning "%d unused local variables removed:@!%a" - count (Pretty_utils.pp_list ~sep:",@," Format.pp_print_string) removedLocals) + (* take out the trash *) + ignore (removeUnmarked isRoot ast reachable_tbl) end (* -- GitLab From 3c6bc923bbf0e4af86c5060b6810f9e73e09b54b Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Wed, 8 Aug 2018 15:46:17 +0200 Subject: [PATCH 114/376] [Kernel] add debugging messages; include logic_info; fix default vreferenced --- src/kernel_internals/typing/cabs2cil.ml | 16 +- src/kernel_internals/typing/rmtmps.ml | 143 +++++++++++++++--- src/kernel_services/ast_queries/cil.ml | 16 +- src/kernel_services/ast_queries/cil.mli | 10 +- .../plugin_entry_points/kernel.ml | 1 + .../plugin_entry_points/kernel.mli | 2 + src/plugins/variadic/va_build.ml | 2 +- 7 files changed, 153 insertions(+), 37 deletions(-) diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index 6cd61cd0df7..84a71d10ca3 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -2888,8 +2888,8 @@ let makeGlobalVarinfo (isadef: bool) (vi: varinfo) : varinfo * bool = * local. This can happen when we declare an extern variable with * global scope but we are in a local scope. *) Kernel.debug ~dkey:Kernel.dkey_typing_global - "makeGlobalVarinfo isadef=%B vi.vname=%s(%d)" - isadef vi.vname vi.vid; + "makeGlobalVarinfo isadef=%B vi.vname=%s(%d), vreferenced=%B" + isadef vi.vname vi.vid vi.vreferenced; (* This may throw an exception Not_found *) let oldvi, oldloc = lookupGlobalVar vi.vname in Kernel.debug ~dkey:Kernel.dkey_typing_global @@ -4650,6 +4650,7 @@ and makeVarInfoCabs ~(isformal: bool) ~(isglobal: bool) ?(isgenerated=false) + ?(referenced=false) (ldecl : location) (bt, sto, inline, attrs) (n,ndt,a) @@ -4666,7 +4667,8 @@ and makeVarInfoCabs Kernel.error ~once:true ~current:true "inline for a non-function: %s" n; checkRestrictQualifierDeep vtype; (* log "Looking at %s(%b): (%a)@." n isformal d_attrlist nattr;*) - let vi = makeVarinfo ~temp:isgenerated isglobal isformal n vtype in + let vi = makeVarinfo ~referenced ~temp:isgenerated isglobal isformal n vtype + in vi.vstorage <- sto; vi.vattr <- nattr; vi.vdecl <- ldecl; @@ -8224,11 +8226,17 @@ and createGlobal ghost logic_spec ((t,s,b,attr_list) : (typ * storage * bool * A let is_fc_builtin {A.expr_node=enode} = match enode with A.VARIABLE "FC_BUILTIN" -> true | _ -> false in + let is_fc_stdlib {A.expr_node=enode} = + match enode with A.VARIABLE v when v = fc_stdlib -> true | _ -> false + in let isgenerated = List.exists (fun (_,el) -> List.exists is_fc_builtin el) a in + let islibc = + List.exists (fun (_,el) -> List.exists is_fc_stdlib el) a + in (* Make a first version of the varinfo *) - let vi = makeVarInfoCabs ~ghost ~isformal:false + let vi = makeVarInfoCabs ~ghost ~isformal:false ~referenced:islibc ~isglobal:true ~isgenerated (convLoc cloc) (t,s,b,attr_list) (n,ndt,a) in (* Add the variable to the environment before doing the initializer diff --git a/src/kernel_internals/typing/rmtmps.ml b/src/kernel_internals/typing/rmtmps.ml index c15193c0bc6..3ecc19e5a44 100644 --- a/src/kernel_internals/typing/rmtmps.ml +++ b/src/kernel_internals/typing/rmtmps.ml @@ -80,6 +80,12 @@ let rmUnusedStatic = ref false let is_reachable t r = try InfoHashtbl.find t r with Not_found -> false +let pp_info fmt = function + | Type ti -> Format.fprintf fmt "%s" ti.tname + | Enum ei -> Format.fprintf fmt "%s" ei.ename + | Comp ci -> Format.fprintf fmt "%s" ci.cname + | Var vi -> Format.fprintf fmt "%s" vi.vname + (*********************************************************************** * @@ -277,7 +283,8 @@ let isExportedRoot global = Cil.hasAttribute "FC_BUILTIN" e.eattr -> e.ename, true, "has FC_BUILTIN attribute" | _ -> - "", false, "neither function nor variable nor annotation" + (Format.asprintf "%a" Cil_types_debug.pp_global global), false, + "neither fundef nor vardef nor annotation" in Kernel.debug ~dkey "isExportedRoot %s -> %B, %s" name result reason; @@ -328,14 +335,17 @@ class markReachableVisitor method! vglob = function | GType (typeinfo, _) -> + Kernel.debug ~dkey "marking reachable: type %s" typeinfo.tname; InfoHashtbl.replace reachable_tbl (Type typeinfo) true; DoChildren | GCompTag (compinfo, _) | GCompTagDecl (compinfo, _) -> + Kernel.debug ~dkey "marking reachable: comp decl %s" compinfo.cname; InfoHashtbl.replace reachable_tbl (Comp compinfo) true; DoChildren | GEnumTag (enuminfo, _) | GEnumTagDecl (enuminfo, _) -> + Kernel.debug ~dkey "marking reachable: enum decl %s" enuminfo.ename; InfoHashtbl.replace reachable_tbl (Enum enuminfo) true; DoChildren | GVar (varinfo, _, _) @@ -343,7 +353,10 @@ class markReachableVisitor | GFunDecl (_,varinfo, _) | GFun ({svar = varinfo}, _) -> if not (hasAttribute "FC_BUILTIN" varinfo.vattr) then - InfoHashtbl.replace reachable_tbl (Var varinfo) true; + begin + Kernel.debug ~dkey "marking reachable: function %s" varinfo.vname; + InfoHashtbl.replace reachable_tbl (Var varinfo) true; + end; DoChildren | GAnnot _ -> DoChildren | _ -> @@ -388,16 +401,16 @@ class markReachableVisitor begin let name = v.vname in if v.vglob then - Kernel.debug ~dkey "marking transitive use: global %s" name + Kernel.debug ~dkey "marking transitive use: global %s (%d)" name v.vid else - Kernel.debug ~dkey "marking transitive use: local %s" name; + Kernel.debug ~dkey "marking transitive use: local %s (%d)" name v.vid; (* If this is a global, we need to keep everything used in its * definition and declarations. *) InfoHashtbl.replace reachable_tbl (Var v) true; if v.vglob then begin - Kernel.debug ~dkey "descending: global %s" name; + Kernel.debug ~dkey "descending: global %s (%d)" name v.vid; let descend global = ignore (visitCilGlobal (self :> cilVisitor) global) in @@ -410,14 +423,14 @@ class markReachableVisitor method private mark_enum e = if not (is_reachable reachable_tbl (Enum e)) then begin - Kernel.debug ~dkey "marking transitive use: enum %s\n" e.ename; + Kernel.debug ~dkey "marking transitive use: enum %s" e.ename; InfoHashtbl.replace reachable_tbl (Enum e) true; self#visitAttrs e.eattr; (* Must visit the value attributed to the enum constants *) ignore (visitCilEnumInfo (self:>cilVisitor) e); end else - Kernel.debug ~dkey "not marking transitive use: enum %s\n" e.ename; + Kernel.debug ~dkey "not marking transitive use: enum %s" e.ename; method! vexpr e = match e.enode with @@ -442,7 +455,7 @@ class markReachableVisitor let old = is_reachable reachable_tbl (Comp c) in if not old then begin - Kernel.debug ~dkey "marking transitive use: compound %s\n" + Kernel.debug ~dkey "marking transitive use: compound %s" c.cname; InfoHashtbl.replace reachable_tbl (Comp c) true; @@ -457,7 +470,7 @@ class markReachableVisitor let old = (is_reachable reachable_tbl (Type ti)) in if not old then begin - Kernel.debug ~dkey "marking transitive use: typedef %s\n" + Kernel.debug ~dkey "marking transitive use: typedef %s" ti.tname; InfoHashtbl.replace reachable_tbl (Type ti) true; (* recurse deeper into the type referred-to by the typedef *) @@ -478,6 +491,38 @@ class markReachableVisitor self#visitAttrs a ); SkipChildren + + method! vlogic_var_decl lv = + Kernel.debug ~dkey "markReachable: found LOGIC VAR DECL for: %s (%d)\n" lv.lv_name lv.lv_id; + DoChildren + + method! vlogic_var_use lv = + Kernel.debug ~dkey "markReachable: found LOGIC VAR USE for: %s (%d)\n" lv.lv_name lv.lv_id; + match lv.lv_origin with + | None -> SkipChildren + | Some v -> + if not (is_reachable reachable_tbl (Var v)) then + begin + let name = v.vname in + if v.vglob then + Kernel.debug ~dkey "marking transitive use for logic var: global %s (%d)" name v.vid + else + Kernel.debug ~dkey "marking transitive use for logic var: local %s (%d)" name v.vid; + + (* If this is a global, we need to keep everything used in its + * definition and declarations. *) + InfoHashtbl.replace reachable_tbl (Var v) true; + if v.vglob then + begin + Kernel.debug ~dkey "descending: global %s (%d)" name v.vid; + let descend global = + ignore (visitCilGlobal (self :> cilVisitor) global) + in + let globals = Hashtbl.find_all globalMap name in + List.iter descend globals + end + end; + SkipChildren end @@ -522,28 +567,50 @@ let markReachable isRoot ast reachable_tbl = * **********************************************************************) +let global_type_and_name = function + | GType (t, _) -> "type " ^ t.tname + | GCompTag (c,_) -> "comp " ^ c.cname + | GCompTagDecl (c,_) -> "comp decl " ^ c.cname + | GEnumTag (e, _) -> "enum " ^ e.ename + | GEnumTagDecl (e,_) -> "enum decl " ^ e.ename + | GVarDecl(v,_) -> "var decl " ^ v.vname + | GFunDecl(_,v,_) -> "fun decl " ^ v.vname + | GVar (v, _, _) -> "var " ^ v.vname + | GFun ({svar = v}, _) -> "fun " ^ v.vname + | GAsm _ -> "<asm>" + | GPragma _ -> "<pragma>" + | GText _ -> "<text>" + | GAnnot _ -> "<annot>" + class markReferencedVisitor = object inherit nopCilVisitor + val dkey = Kernel.dkey_referenced + val inside_exp : exp Stack.t = Stack.create () val inside_typ : typ Stack.t = Stack.create () method! vglob = function - | GType (typeinfo, _loc) -> + | GType (typeinfo, loc) -> + Kernel.debug ~source:(fst loc) ~dkey "referenced: type %s" typeinfo.tname; typeinfo.treferenced <- true; DoChildren - | GCompTag (compinfo, _loc) - | GCompTagDecl (compinfo, _loc) -> + | GCompTag (compinfo, loc) + | GCompTagDecl (compinfo, loc) -> + Kernel.debug ~source:(fst loc) ~dkey "referenced: comp %s" compinfo.cname; compinfo.creferenced <- true; DoChildren - | GEnumTag (enuminfo, _loc) - | GEnumTagDecl (enuminfo, _loc) -> + | GEnumTag (enuminfo, loc) + | GEnumTagDecl (enuminfo, loc) -> + Kernel.debug ~source:(fst loc) ~dkey "referenced: enum %s" enuminfo.ename; enuminfo.ereferenced <- true; DoChildren - | GVar (varinfo, _, _loc) - | GVarDecl (varinfo, _loc) - | GFunDecl (_,varinfo, _loc) - | GFun ({svar = varinfo}, _loc) -> + | GVar (varinfo, _, loc) + | GVarDecl (varinfo, loc) + | GFunDecl (_,varinfo, loc) + | GFun ({svar = varinfo}, loc) -> + Kernel.debug ~dkey "referenced: var/fun %s@." varinfo.vname; + Kernel.debug ~source:(fst loc) ~dkey "referenced: fun %s" varinfo.vname; varinfo.vreferenced <- true; DoChildren | GAnnot _ -> DoChildren @@ -553,16 +620,19 @@ class markReferencedVisitor = object method! vtype = function | TNamed (ti, _) -> if not (Stack.is_empty inside_typ) then begin + Kernel.debug ~current:true ~dkey "referenced: type %s" ti.tname; ti.treferenced <- true; end; DoChildren | TComp (ci, _, _) -> if not (Stack.is_empty inside_typ) then begin + Kernel.debug ~current:true ~dkey "referenced: comp %s" ci.cname; ci.creferenced <- true; end; DoChildren | TEnum (ei, _) -> if not (Stack.is_empty inside_typ) then begin + Kernel.debug ~current:true ~dkey "referenced: enum %s" ei.ename; ei.ereferenced <- true; end; DoChildren @@ -585,6 +655,7 @@ class markReferencedVisitor = object method! vvrbl v = if not (Stack.is_empty inside_exp) then begin + Kernel.debug ~current:true ~dkey "referenced: var %s" v.vname; v.vreferenced <- true; end; SkipChildren @@ -592,7 +663,10 @@ class markReferencedVisitor = object end let markReferenced ast = - visitCilFileSameGlobals (new markReferencedVisitor) ast + Kernel.debug ~dkey "starting markReferenced (AST has %d globals)" + (List.length ast.globals); + visitCilFileSameGlobals (new markReferencedVisitor) ast; + Kernel.debug ~dkey "finished markReferenced" (********************************************************************** * @@ -778,7 +852,7 @@ let removeUnmarked isRoot ast reachable_tbl = begin (* along the way, record the interesting locals that were removed *) let name = local.vname in - (Kernel.debug ~dkey "removing local: %s\n" name); + (Kernel.debug ~dkey "removing local: %s" name); if not (Str.string_match uninteresting name 0) then removedLocals := (func.svar.vname ^ "::" ^ name) :: !removedLocals; @@ -803,8 +877,28 @@ let removeUnmarked isRoot ast reachable_tbl = (* all other globals are retained *) | _ -> true in - let keptGlobals, _removedGlobals = List.partition filterGlobal ast.globals in + let keptGlobals, removedGlobals = List.partition filterGlobal ast.globals in ast.globals <- keptGlobals; + if Kernel.is_debug_key_enabled dkey then + List.iter (fun rg -> + Kernel.debug ~dkey "removing global: %s" (global_type_and_name rg) + ) removedGlobals; + if Kernel.is_debug_key_enabled dkey then + List.iter (fun rg -> + begin + match rg with + | GFunDecl (_s, vi, _) -> + begin + try + let kf = Globals.Functions.get vi in + Kernel.debug ~dkey "GFunDecl: %a@." Kernel_function.pretty_code kf + with Not_found -> + Kernel.debug ~dkey "GFunDecl: not found for %a@." Printer.pp_varinfo vi; + end + | _ -> () + end; + Kernel.debug ~dkey "kept global %s (%a)" (global_type_and_name rg) Printer.pp_global rg + ) keptGlobals; !removedLocals @@ -835,6 +929,13 @@ let removeUnusedTemps ?(isRoot : rootsFilter = isExportedRoot) ast = (* mark everything reachable from the global roots *) markReachable isRoot ast reachable_tbl; + let elements = + InfoHashtbl.fold (fun k v acc -> Format.asprintf "%a:%B" pp_info k v :: acc) + reachable_tbl [] + in + Kernel.debug ~dkey "reachable_tbl: %a" + (Pretty_utils.pp_list ~sep:"@\n" Format.pp_print_string) elements; + markReferenced ast; (* take out the trash *) diff --git a/src/kernel_services/ast_queries/cil.ml b/src/kernel_services/ast_queries/cil.ml index 79da27bd41d..c5e01b7134d 100644 --- a/src/kernel_services/ast_queries/cil.ml +++ b/src/kernel_services/ast_queries/cil.ml @@ -578,7 +578,7 @@ type attributeClass = | x -> x (* Make a varinfo. Used mostly as a helper function below *) - let makeVarinfo ?(source=true) ?(temp=false) global formal name typ = + let makeVarinfo ?(source=true) ?(temp=false) ?(referenced=false) global formal name typ = let vi = { vorig_name = name; vname = name; @@ -593,7 +593,7 @@ type attributeClass = vattr = []; vstorage = NoStorage; vaddrof = false; - vreferenced = false; + vreferenced = referenced; vdescr = None; vdescrpure = true; vghost = false; @@ -6280,16 +6280,16 @@ let need_cast ?(force=false) oldt newt = let refresh_local_name fdec vi = let new_name = findUniqueName fdec vi.vname in vi.vname <- new_name - let makeLocal ?(temp=false) ?(formal=false) fdec name typ = + let makeLocal ?(temp=false) ?referenced ?(formal=false) fdec name typ = (* a helper function *) let name = findUniqueName fdec name in fdec.smaxid <- 1 + fdec.smaxid; - let vi = makeVarinfo ~temp false formal name typ in + let vi = makeVarinfo ~temp ?referenced false formal name typ in vi (* Make a local variable and add it to a function *) - let makeLocalVar fdec ?scope ?(temp=false) ?(insert = true) name typ = - let vi = makeLocal ~temp fdec name typ in + let makeLocalVar fdec ?scope ?(temp=false) ?referenced ?(insert = true) name typ = + let vi = makeLocal ~temp ?referenced fdec name typ in refresh_local_name fdec vi; if insert then begin @@ -6377,8 +6377,8 @@ let need_cast ?(force=false) oldt newt = (* Make a global variable. Your responsibility to make sure that the name * is unique *) - let makeGlobalVar ?source ?temp name typ = - makeVarinfo ?source ?temp true false name typ + let makeGlobalVar ?source ?temp ?referenced name typ = + makeVarinfo ?source ?temp ?referenced true false name typ let mkPureExprInstr ~fundec ~scope ?loc e = let loc = match loc with None -> e.eloc | Some l -> l in diff --git a/src/kernel_services/ast_queries/cil.mli b/src/kernel_services/ast_queries/cil.mli index 799986722ec..60819b3c6ef 100644 --- a/src/kernel_services/ast_queries/cil.mli +++ b/src/kernel_services/ast_queries/cil.mli @@ -672,10 +672,13 @@ val splitFunctionTypeVI: [vtemp] field in type {!Cil_types.varinfo}. The [source] argument defaults to [true], and corresponds to the field [vsource] . + The [referenced] argument defaults to [false], and corresponds to the field + [vreferenced] . The first unnamed argument specifies whether the varinfo is for a global and the second is for formals. *) val makeVarinfo: - ?source:bool -> ?temp:bool -> bool -> bool -> string -> typ -> varinfo + ?source:bool -> ?temp:bool -> ?referenced:bool -> bool -> bool -> string -> + typ -> varinfo (** Make a formal variable for a function declaration. Insert it in both the sformals and the type of the function. You can optionally specify where to @@ -696,7 +699,7 @@ val makeFormalVar: fundec -> ?where:string -> string -> typ -> varinfo @modify Chlorine-20180501 the name of the variable is guaranteed to be fresh. *) val makeLocalVar: - fundec -> ?scope:block -> ?temp:bool -> ?insert:bool + fundec -> ?scope:block -> ?temp:bool -> ?referenced:bool -> ?insert:bool -> string -> typ -> varinfo (** if needed, rename the given varinfo so that its [vname] does not @@ -720,7 +723,8 @@ val makeTempVar: fundec -> ?insert:bool -> ?name:string -> ?descr:string -> (** Make a global variable. Your responsibility to make sure that the name is unique. [source] defaults to [true]. [temp] defaults to [false].*) -val makeGlobalVar: ?source:bool -> ?temp:bool -> string -> typ -> varinfo +val makeGlobalVar: ?source:bool -> ?temp:bool -> ?referenced:bool -> string -> + typ -> varinfo (** Make a shallow copy of a [varinfo] and assign a new identifier. If the original varinfo has an associated logic var, it is copied too and diff --git a/src/kernel_services/plugin_entry_points/kernel.ml b/src/kernel_services/plugin_entry_points/kernel.ml index 0c95ee14a2c..9c4a3b5306a 100644 --- a/src/kernel_services/plugin_entry_points/kernel.ml +++ b/src/kernel_services/plugin_entry_points/kernel.ml @@ -82,6 +82,7 @@ let dkey_loops = register_category "natural-loops" let dkey_parser = register_category "parser" let dkey_rmtmps = register_category "parser:rmtmps" +let dkey_referenced = register_category "parser:referenced" let dkey_pp = register_category "pp" let dkey_compilation_db = register_category "pp:compilation-db" diff --git a/src/kernel_services/plugin_entry_points/kernel.mli b/src/kernel_services/plugin_entry_points/kernel.mli index 06e4720e294..c837fb5a091 100644 --- a/src/kernel_services/plugin_entry_points/kernel.mli +++ b/src/kernel_services/plugin_entry_points/kernel.mli @@ -109,6 +109,8 @@ val dkey_prop_status_reg: category val dkey_rmtmps: category +val dkey_referenced: category + val dkey_task: category val dkey_typing_global: category diff --git a/src/plugins/variadic/va_build.ml b/src/plugins/variadic/va_build.ml index 77f3bbaf047..a5852d4a84d 100644 --- a/src/plugins/variadic/va_build.ml +++ b/src/plugins/variadic/va_build.ml @@ -28,7 +28,7 @@ open Cil let function_declaration ?vattr ~loc name typ mk_spec = (* Build the varinfo *) - let vi = makeGlobalVar name typ in + let vi = makeGlobalVar ~referenced:true name typ in Extlib.may (fun extra_vattr -> vi.vattr <- vi.vattr @ extra_vattr) vattr; vi.vdecl <- loc; (* Build the formals *) -- GitLab From 38bff3ec609e996c217e7852a48b6c6f471ef600 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 11 Mar 2019 14:36:56 +0100 Subject: [PATCH 115/376] [parser] accept adjacent string literal tokens in extended GNU asm clauses Apparently things like that exist in untamed code bases. Fixes #615 --- src/kernel_internals/parsing/cparser.mly | 13 +++++-------- tests/syntax/assembly_gmp.c | 3 +++ tests/syntax/oracle/assembly_gmp.0.res.oracle | 5 +++++ tests/syntax/oracle/assembly_gmp.1.res.oracle | 5 +++++ tests/syntax/oracle/assembly_gmp.2.res.oracle | 5 +++++ 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/kernel_internals/parsing/cparser.mly b/src/kernel_internals/parsing/cparser.mly index 965974d98d9..7da75c2c4a1 100644 --- a/src/kernel_internals/parsing/cparser.mly +++ b/src/kernel_internals/parsing/cparser.mly @@ -736,10 +736,7 @@ string_constant: back to a string for easy viewing. */ string_list { intlist_to_string (fst $1), snd $1 } ; -one_string_constant: -/* Don't concat multiple strings. For asm templates. */ - CST_STRING { intlist_to_string (fst $1) } -; + string_list: one_string { fst $1, snd $1 } | string_list one_string { merge_string $1 $2 } @@ -1674,8 +1671,8 @@ asmattr: | CONST asmattr { ("const", []) :: $2 } ; asmtemplate: - one_string_constant { [$1] } -| one_string_constant asmtemplate { $1 :: $2 } + one_string { [intlist_to_string (fst $1)] } +| one_string asmtemplate { intlist_to_string (fst $1) :: $2 } ; asmoutputs: /* empty */ { None } @@ -1711,8 +1708,8 @@ asmclobber: | COLON asmcloberlst_ne asmlabels { $2,$3 } ; asmcloberlst_ne: - one_string_constant { [$1] } -| one_string_constant COMMA asmcloberlst_ne { $1 :: $3 } + string_constant { [fst $1] } +| string_constant COMMA asmcloberlst_ne { fst $1 :: $3 } ; asmlabels: | /* empty */ { [] } diff --git a/tests/syntax/assembly_gmp.c b/tests/syntax/assembly_gmp.c index 91147a15876..0d39854c42e 100644 --- a/tests/syntax/assembly_gmp.c +++ b/tests/syntax/assembly_gmp.c @@ -191,4 +191,7 @@ asm("sidt %0\n" : :"m"(loc)); asm ("movq $36, (%0)": : "r"(pulValue)); +int a = 2, b = 3; + __asm__("mov %1, %0" : "=r"(a) :"r"(b): "%""eax"); + } diff --git a/tests/syntax/oracle/assembly_gmp.0.res.oracle b/tests/syntax/oracle/assembly_gmp.0.res.oracle index 64d451b45f1..eb6853729c5 100644 --- a/tests/syntax/oracle/assembly_gmp.0.res.oracle +++ b/tests/syntax/oracle/assembly_gmp.0.res.oracle @@ -140,6 +140,11 @@ void f(void) \from (indirect: pulValue), *(pulValue + (..)); */ __asm__ ("movq $36, (%0)" : : "r" (pulValue)); + int a = 2; + int b = 3; + /*@ assigns a; + assigns a \from b; */ + __asm__ ("mov %1, %0" : "=r" (a) : "r" (b) : "%eax"); return; } diff --git a/tests/syntax/oracle/assembly_gmp.1.res.oracle b/tests/syntax/oracle/assembly_gmp.1.res.oracle index 34e7312b07b..63a12b1b07b 100644 --- a/tests/syntax/oracle/assembly_gmp.1.res.oracle +++ b/tests/syntax/oracle/assembly_gmp.1.res.oracle @@ -123,6 +123,11 @@ void f(void) \from (indirect: pulValue), *(pulValue + (..)); */ __asm__ ("movq $36, (%0)" : : "r" (pulValue)); + int a = 2; + int b = 3; + /*@ assigns a; + assigns a \from b; */ + __asm__ ("mov %1, %0" : "=r" (a) : "r" (b) : "%eax"); return; } diff --git a/tests/syntax/oracle/assembly_gmp.2.res.oracle b/tests/syntax/oracle/assembly_gmp.2.res.oracle index 914bb19ed14..2684a9a6655 100644 --- a/tests/syntax/oracle/assembly_gmp.2.res.oracle +++ b/tests/syntax/oracle/assembly_gmp.2.res.oracle @@ -122,6 +122,11 @@ void f(void) \from (indirect: pulValue), *(pulValue + (..)); */ __asm__ ("movq $36, (%0)" : : "r" (pulValue)); + int a = 2; + int b = 3; + /*@ assigns a; + assigns a \from b; */ + __asm__ ("mov %1, %0" : "=r" (a) : "r" (b) : "%eax"); return; } -- GitLab From f2ab6d0950d69c6d8921e5fed46b70c731f3e3ba Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Mon, 11 Mar 2019 14:52:15 +0100 Subject: [PATCH 116/376] [rmtmps] remove obsoleted code --- src/kernel_internals/typing/rmtmps.ml | 34 ++------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/src/kernel_internals/typing/rmtmps.ml b/src/kernel_internals/typing/rmtmps.ml index 3ecc19e5a44..e22c8830104 100644 --- a/src/kernel_internals/typing/rmtmps.ml +++ b/src/kernel_internals/typing/rmtmps.ml @@ -774,35 +774,6 @@ end * *) - -(* regular expression matching names of uninteresting locals *) -let uninteresting = - let names = [ - (* Cil.makeTempVar *) - "__cil_tmp"; - - (* sm: I don't know where it comes from but these show up all over. *) - (* this doesn't seem to do what I wanted.. *) - "iter"; - - (* various macros in glibc's <bits/string2.h> *) - "__result"; - "__s"; "__s1"; "__s2"; - "__s1_len"; "__s2_len"; - "__retval"; "__len"; - - (* various macros in glibc's <ctype.h> *) - "__c"; "__res"; - - (* We remove the __malloc variables *) - ] in - - (* optional alpha renaming *) - let alpha = "\\(___[0-9]+\\)?" in - - let pattern = "\\(" ^ (String.concat "\\|" names) ^ "\\)" ^ alpha ^ "$" in - Str.regexp pattern - let label_removable = function Label (_,_,user) -> not user | Case _ | Default _ -> false @@ -853,9 +824,8 @@ let removeUnmarked isRoot ast reachable_tbl = (* along the way, record the interesting locals that were removed *) let name = local.vname in (Kernel.debug ~dkey "removing local: %s" name); - if not (Str.string_match uninteresting name 0) then - removedLocals := - (func.svar.vname ^ "::" ^ name) :: !removedLocals; + removedLocals := + (func.svar.vname ^ "::" ^ name) :: !removedLocals; false end else true in -- GitLab From d485c4056728ce9920d6b949a096c622122cd562 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Mon, 11 Mar 2019 18:22:24 +0100 Subject: [PATCH 117/376] [Libc] remove last occurrences of anonymous composite types --- share/libc/regex.h | 4 ++-- share/libc/setjmp.h | 2 +- share/libc/signal.h | 2 +- share/libc/wchar.h | 2 +- tests/libc/oracle/fc_libc.1.res.oracle | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/share/libc/regex.h b/share/libc/regex.h index 97277d5564e..d33bc5833af 100644 --- a/share/libc/regex.h +++ b/share/libc/regex.h @@ -43,7 +43,7 @@ typedef struct re_pattern_buffer regex_t; #define REG_NOTEOL 2 /* Error codes */ -typedef enum +typedef enum __fc_reg_errcode_t { REG_NOERROR = 0, REG_NOMATCH, @@ -66,7 +66,7 @@ typedef enum typedef int regoff_t; -typedef struct +typedef struct __fc_regmatch_t { regoff_t rm_so; regoff_t rm_eo; diff --git a/share/libc/setjmp.h b/share/libc/setjmp.h index ecca7307fda..eacfb3efa91 100644 --- a/share/libc/setjmp.h +++ b/share/libc/setjmp.h @@ -41,7 +41,7 @@ extern int setjmp(jmp_buf env); extern void longjmp(jmp_buf env, int val); #include "__fc_define_sigset_t.h" -typedef struct {jmp_buf buf; sigset_t sigs;} sigjmp_buf; +typedef struct __fc_sigjmp_buf {jmp_buf buf; sigset_t sigs;} sigjmp_buf; extern int sigsetjmp(sigjmp_buf env, int savesigs); diff --git a/share/libc/signal.h b/share/libc/signal.h index 2605e2cea27..f42d35711ab 100644 --- a/share/libc/signal.h +++ b/share/libc/signal.h @@ -132,7 +132,7 @@ struct sigevent { #ifndef __have_siginfo_t #define __have_siginfo_t -typedef struct { +typedef struct __fc_siginfo_t { int si_signo; int si_code; union sigval si_value; diff --git a/share/libc/wchar.h b/share/libc/wchar.h index aeb08ed3eae..ff7e863ad8d 100644 --- a/share/libc/wchar.h +++ b/share/libc/wchar.h @@ -206,7 +206,7 @@ extern int fwscanf(FILE * stream, const wchar_t * format, ...); extern int swscanf(const wchar_t * str, const wchar_t * format, ...); #ifndef __mbstate_t_defined -typedef struct { int __count; char __value[4]; } mbstate_t; +typedef struct __fc_mbstate_t { int __count; char __value[4]; } mbstate_t; #define __mbstate_t_defined #endif diff --git a/tests/libc/oracle/fc_libc.1.res.oracle b/tests/libc/oracle/fc_libc.1.res.oracle index a0d63cf77b1..fef572d466a 100644 --- a/tests/libc/oracle/fc_libc.1.res.oracle +++ b/tests/libc/oracle/fc_libc.1.res.oracle @@ -127,7 +127,7 @@ union sigval { int sival_int ; void *sival_ptr ; }; -struct __anonstruct_siginfo_t_1 { +struct __fc_siginfo_t { int si_signo ; int si_code ; union sigval si_value ; @@ -138,7 +138,7 @@ struct __anonstruct_siginfo_t_1 { int si_status ; int si_band ; }; -typedef struct __anonstruct_siginfo_t_1 siginfo_t; +typedef struct __fc_siginfo_t siginfo_t; struct sigaction { void (*sa_handler)(int ) ; void (*sa_sigaction)(int , siginfo_t *, void *) ; @@ -338,11 +338,11 @@ struct passwd { char *pw_shell ; }; typedef int ( jmp_buf)[5]; -struct __anonstruct_sigjmp_buf_22 { +struct __fc_sigjmp_buf { jmp_buf buf ; sigset_t sigs ; }; -typedef struct __anonstruct_sigjmp_buf_22 sigjmp_buf; +typedef struct __fc_sigjmp_buf sigjmp_buf; struct _code { char const *c_name ; int c_val ; -- GitLab From 4eeb5855fca5d874bbabc79bbfbd5f515131c1bb Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Fri, 1 Feb 2019 15:51:12 +0100 Subject: [PATCH 118/376] [Libc] fix some minor issues --- share/libc/malloc.h | 2 +- share/libc/memory.h | 2 +- share/libc/pthread.h | 4 ++-- share/libc/pwd.h | 5 +---- share/libc/semaphore.h | 2 +- share/libc/time.h | 2 +- share/libc/unistd.h | 4 ++-- share/libc/utmpx.h | 2 +- .../variadic/tests/known/oracle/printf.res.oracle | 1 + .../variadic/tests/known/oracle/swprintf.res.oracle | 1 + .../variadic/tests/known/oracle/wchar.res.oracle | 1 + tests/libc/oracle/fc_libc.0.res.oracle | 12 ++++++------ tests/libc/oracle/fc_libc.1.res.oracle | 8 ++------ 13 files changed, 21 insertions(+), 25 deletions(-) diff --git a/share/libc/malloc.h b/share/libc/malloc.h index 3508e681088..89992c10aea 100644 --- a/share/libc/malloc.h +++ b/share/libc/malloc.h @@ -21,4 +21,4 @@ /**************************************************************************/ // This file is not in the C standard; it exists for compatibility purposes -#include <stdlib.h> +#include "stdlib.h" diff --git a/share/libc/memory.h b/share/libc/memory.h index 4c1227c6134..767739595b4 100644 --- a/share/libc/memory.h +++ b/share/libc/memory.h @@ -21,4 +21,4 @@ /**************************************************************************/ // This file is not in the C standard; it exists for compatibility purposes -#include <string.h> +#include "string.h" diff --git a/share/libc/pthread.h b/share/libc/pthread.h index d55ece32dee..ac9f78bc234 100644 --- a/share/libc/pthread.h +++ b/share/libc/pthread.h @@ -366,8 +366,8 @@ extern void pthread_testcancel(void); // From POSIX: "Inclusion of the <pthread.h> header shall make symbols defined // in the headers <sched.h> and <time.h> visible." -#include <sched.h> -#include <time.h> +// (sched.h has already been included) +#include "time.h" __POP_FC_STDLIB #endif diff --git a/share/libc/pwd.h b/share/libc/pwd.h index c93e3126bec..7e12b710fbb 100644 --- a/share/libc/pwd.h +++ b/share/libc/pwd.h @@ -25,6 +25,7 @@ #include "features.h" __PUSH_FC_STDLIB +#include "__fc_builtin.h" #include "__fc_define_uid_and_gid.h" #include "__fc_string_axiomatic.h" @@ -45,16 +46,12 @@ struct passwd { extern char __fc_getpwuid_pw_name[64]; extern char __fc_getpwuid_pw_passwd[64]; -extern uid_t __fc_getpwuid_pw_uid; -extern gid_t __fc_getpwuid_pw_gid; extern char __fc_getpwuid_pw_dir[64]; extern char __fc_getpwuid_pw_shell[64]; struct passwd __fc_pwd = {.pw_name = __fc_getpwuid_pw_name, .pw_passwd = __fc_getpwuid_pw_passwd, - .pw_uid = __fc_getpwuid_pw_uid, - .pw_gid = __fc_getpwuid_pw_gid, .pw_dir = __fc_getpwuid_pw_dir, .pw_shell = __fc_getpwuid_pw_shell}; diff --git a/share/libc/semaphore.h b/share/libc/semaphore.h index 264a85bfeda..765cd52cb54 100644 --- a/share/libc/semaphore.h +++ b/share/libc/semaphore.h @@ -26,7 +26,7 @@ #define __FC_SEMAPHORE #include "features.h" __PUSH_FC_STDLIB -#include <time.h> +#include "time.h" __BEGIN_DECLS diff --git a/share/libc/time.h b/share/libc/time.h index ffe74960d94..60e5031571f 100644 --- a/share/libc/time.h +++ b/share/libc/time.h @@ -31,7 +31,7 @@ __PUSH_FC_STDLIB #include "__fc_string_axiomatic.h" #include "errno.h" - +#include "signal.h" /* * Names of the interval timers, and structure * defining a timer setting: diff --git a/share/libc/unistd.h b/share/libc/unistd.h index 3e790d21269..019c35bdad2 100644 --- a/share/libc/unistd.h +++ b/share/libc/unistd.h @@ -36,8 +36,8 @@ __PUSH_FC_STDLIB #include "__fc_define_intptr_t.h" #include "__fc_select.h" -#include <getopt.h> -#include <limits.h> +#include "getopt.h" +#include "limits.h" extern volatile int Frama_C_entropy_source; diff --git a/share/libc/utmpx.h b/share/libc/utmpx.h index cc1c85dc142..8e38de8057f 100644 --- a/share/libc/utmpx.h +++ b/share/libc/utmpx.h @@ -26,7 +26,7 @@ __PUSH_FC_STDLIB #include "__fc_define_pid_t.h" -#include <sys/time.h> +#include "sys/time.h" __BEGIN_DECLS diff --git a/src/plugins/variadic/tests/known/oracle/printf.res.oracle b/src/plugins/variadic/tests/known/oracle/printf.res.oracle index 6468d9e5be5..d3eac0b8fd4 100644 --- a/src/plugins/variadic/tests/known/oracle/printf.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/printf.res.oracle @@ -155,6 +155,7 @@ /* Generated by Frama-C */ #include "errno.h" #include "inttypes.h" +#include "signal.h" #include "stdarg.h" #include "stddef.h" #include "stdint.h" diff --git a/src/plugins/variadic/tests/known/oracle/swprintf.res.oracle b/src/plugins/variadic/tests/known/oracle/swprintf.res.oracle index 304d4dc1977..84ee5740088 100644 --- a/src/plugins/variadic/tests/known/oracle/swprintf.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/swprintf.res.oracle @@ -54,6 +54,7 @@ __retres ∈ {0} /* Generated by Frama-C */ #include "errno.h" +#include "signal.h" #include "stdarg.h" #include "stdio.h" #include "time.h" diff --git a/src/plugins/variadic/tests/known/oracle/wchar.res.oracle b/src/plugins/variadic/tests/known/oracle/wchar.res.oracle index 0f8d049bfce..6d0225a7730 100644 --- a/src/plugins/variadic/tests/known/oracle/wchar.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/wchar.res.oracle @@ -83,6 +83,7 @@ S___fc_stdout[0..1] ∈ [--..--] /* Generated by Frama-C */ #include "errno.h" +#include "signal.h" #include "stdarg.h" #include "stdio.h" #include "time.h" diff --git a/tests/libc/oracle/fc_libc.0.res.oracle b/tests/libc/oracle/fc_libc.0.res.oracle index eab1d99264c..ba81dc3d603 100644 --- a/tests/libc/oracle/fc_libc.0.res.oracle +++ b/tests/libc/oracle/fc_libc.0.res.oracle @@ -156,12 +156,12 @@ wcstombs (0 call); wctomb (0 call); wmemchr (0 call); wmemcmp (0 call); wmemmove (0 call); write (0 call); - 'Extern' global variables (17) + 'Extern' global variables (15) ============================== - __fc_basename; __fc_dirname; __fc_getpwuid_pw_dir; __fc_getpwuid_pw_gid; - __fc_getpwuid_pw_name; __fc_getpwuid_pw_passwd; __fc_getpwuid_pw_shell; - __fc_getpwuid_pw_uid; __fc_hostname; __fc_mblen_state; __fc_mbtowc_state; - __fc_ttyname; __fc_wctomb_state; optarg; opterr; optopt; tzname + __fc_basename; __fc_dirname; __fc_getpwuid_pw_dir; __fc_getpwuid_pw_name; + __fc_getpwuid_pw_passwd; __fc_getpwuid_pw_shell; __fc_hostname; + __fc_mblen_state; __fc_mbtowc_state; __fc_ttyname; __fc_wctomb_state; + optarg; opterr; optopt; tzname Potential entry points (1) ========================== @@ -171,7 +171,7 @@ ============== Sloc = 1083 Decision point = 204 - Global variables = 68 + Global variables = 66 If = 195 Loop = 43 Goto = 89 diff --git a/tests/libc/oracle/fc_libc.1.res.oracle b/tests/libc/oracle/fc_libc.1.res.oracle index a0d63cf77b1..c0bb6e199f8 100644 --- a/tests/libc/oracle/fc_libc.1.res.oracle +++ b/tests/libc/oracle/fc_libc.1.res.oracle @@ -7050,10 +7050,6 @@ extern char __fc_getpwuid_pw_name[64]; extern char __fc_getpwuid_pw_passwd[64]; -extern uid_t __fc_getpwuid_pw_uid; - -extern gid_t __fc_getpwuid_pw_gid; - extern char __fc_getpwuid_pw_dir[64]; extern char __fc_getpwuid_pw_shell[64]; @@ -7061,8 +7057,8 @@ extern char __fc_getpwuid_pw_shell[64]; struct passwd __fc_pwd = {.pw_name = __fc_getpwuid_pw_name, .pw_passwd = __fc_getpwuid_pw_passwd, - .pw_uid = __fc_getpwuid_pw_uid, - .pw_gid = __fc_getpwuid_pw_gid, + .pw_uid = 0U, + .pw_gid = 0U, .pw_gecos = (char *)0, .pw_dir = __fc_getpwuid_pw_dir, .pw_shell = __fc_getpwuid_pw_shell}; -- GitLab From aba67b5aa6dd7087969efa734da693ff1412d5df Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Tue, 12 Mar 2019 08:35:58 +0100 Subject: [PATCH 119/376] [wp/tests] oracles for test about no-wp property tags --- .../wp/tests/wp_plugin/oracle_qualif/nowp.0.report.json | 1 + src/plugins/wp/tests/wp_plugin/oracle_qualif/nowp.res.oracle | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/nowp.0.report.json diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/nowp.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/nowp.0.report.json new file mode 100644 index 00000000000..19765bd501b --- /dev/null +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/nowp.0.report.json @@ -0,0 +1 @@ +null diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/nowp.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/nowp.res.oracle index a36ba397028..651016e1309 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/nowp.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/nowp.res.oracle @@ -5,5 +5,6 @@ [wp] Warning: Missing RTE guards [wp] 0 goal scheduled [wp] Proved goals: 0 / 0 -[wp] Report 'tests/wp_plugin/nowp.c.0.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/nowp.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/nowp.0.report.json' ------------------------------------------------------------- -- GitLab From 2c623d84da92d0549d99936cafbaf04781fdcb63 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Thu, 10 Jan 2019 19:36:00 +0100 Subject: [PATCH 120/376] [Kernel] be more lenient with function pointer types with empty argument lists --- src/kernel_internals/typing/cabs2cil.ml | 8 ++++--- tests/syntax/fct_ptr.i | 4 ++++ tests/syntax/function-types-compatible.i | 2 +- tests/syntax/oracle/fct_ptr.res.oracle | 14 ++++++++++++ .../function-types-compatible.res.oracle | 22 +++++++++++++++---- 5 files changed, 42 insertions(+), 8 deletions(-) diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index b09617ac5eb..df716861958 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -2722,9 +2722,11 @@ let rec castTo ?(fromsource=false) | TPtr (TFun (_,args,va,_),_), TPtr(TFun (_,args',va',_),_) -> (* Checks on casting from a function type into another one. We enforce at least the same number of arguments, and emit a warning - if types do not match. - *) - if va <> va' || bigger_length_args args args' then + if types do not match. Note that empty argument lists are always + compatible. *) + if (va <> va' || bigger_length_args args args') && + (args <> None && args' <> None) + then error "conversion between function types with \ different number of arguments:@ %a@ and@ %a" diff --git a/tests/syntax/fct_ptr.i b/tests/syntax/fct_ptr.i index d6695d92417..6b64b574793 100644 --- a/tests/syntax/fct_ptr.i +++ b/tests/syntax/fct_ptr.i @@ -14,3 +14,7 @@ int main () { q = p; q(3); } + +typedef int (*Function_ptr)(); +char *f_va(int a, ...) { return a; } +Function_ptr fp_table[1] = {(Function_ptr) f_va}; // warning, but no error diff --git a/tests/syntax/function-types-compatible.i b/tests/syntax/function-types-compatible.i index 48a4e257653..770198b5691 100644 --- a/tests/syntax/function-types-compatible.i +++ b/tests/syntax/function-types-compatible.i @@ -2,5 +2,5 @@ void (*p)(int, ...); void f(); void main() { p = f; - p(1, 2); + p(1, 2); // warning, but no parsing error; will fail during execution } diff --git a/tests/syntax/oracle/fct_ptr.res.oracle b/tests/syntax/oracle/fct_ptr.res.oracle index af75749caca..5d52398cf87 100644 --- a/tests/syntax/oracle/fct_ptr.res.oracle +++ b/tests/syntax/oracle/fct_ptr.res.oracle @@ -1,5 +1,11 @@ [kernel] Parsing tests/syntax/fct_ptr.i (no preprocessing) +[kernel:typing:incompatible-types-call] tests/syntax/fct_ptr.i:20: Warning: + implicit conversion between incompatible function types: + char *(*)(int a , ...) + and + int (*)() /* Generated by Frama-C */ +typedef int (*Function_ptr)(); int f(int); void *p = (void *)(& f); @@ -22,4 +28,12 @@ int main(void) return __retres; } +char *f_va(int a, void * const *__va_params) +{ + char *__retres; + __retres = (char *)a; + return __retres; +} + +Function_ptr fp_table[1] = {(int (*)())(& f_va)}; diff --git a/tests/syntax/oracle/function-types-compatible.res.oracle b/tests/syntax/oracle/function-types-compatible.res.oracle index 1d6359c914d..121d63a24e7 100644 --- a/tests/syntax/oracle/function-types-compatible.res.oracle +++ b/tests/syntax/oracle/function-types-compatible.res.oracle @@ -1,8 +1,22 @@ [kernel] Parsing tests/syntax/function-types-compatible.i (no preprocessing) -[kernel] tests/syntax/function-types-compatible.i:4: Failure: - conversion between function types with different number of arguments: +[kernel:typing:incompatible-types-call] tests/syntax/function-types-compatible.i:4: Warning: + implicit conversion between incompatible function types: void (*)() and void (*)(int , ...) -[kernel] User Error: stopping on file "tests/syntax/function-types-compatible.i" that has errors. -[kernel] Frama-C aborted: invalid user input. +/* Generated by Frama-C */ +void (*p)(int , void * const *__va_params); +void f(); + +void main(void) +{ + p = (void (*)(int , void * const *__va_params))(& f); + { + int __va_arg0 = 2; + void *__va_args[1] = {& __va_arg0}; + (*p)(1,(void * const *)(__va_args)); + } + return; +} + + -- GitLab From 43f4d259c18816b3a241ef4b4fab6fb05f79637d Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Tue, 12 Mar 2019 18:31:41 +0100 Subject: [PATCH 121/376] [lint] lintify rmtmps Given that the previous commits made so many whitespace changes, it'd be a shame not to do it --- .Makefile.lint | 2 -- src/kernel_internals/typing/rmtmps.mli | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.Makefile.lint b/.Makefile.lint index cdddb760969..fc916bfa1e3 100644 --- a/.Makefile.lint +++ b/.Makefile.lint @@ -23,8 +23,6 @@ ML_LINT_KO+=src/kernel_internals/typing/mergecil.ml ML_LINT_KO+=src/kernel_internals/typing/mergecil.mli ML_LINT_KO+=src/kernel_internals/typing/oneret.ml ML_LINT_KO+=src/kernel_internals/typing/oneret.mli -ML_LINT_KO+=src/kernel_internals/typing/rmtmps.ml -ML_LINT_KO+=src/kernel_internals/typing/rmtmps.mli ML_LINT_KO+=src/kernel_internals/typing/translate_lightweight.ml ML_LINT_KO+=src/kernel_internals/typing/translate_lightweight.mli ML_LINT_KO+=src/kernel_internals/typing/unroll_loops.ml diff --git a/src/kernel_internals/typing/rmtmps.mli b/src/kernel_internals/typing/rmtmps.mli index 61f49635423..510a6565b05 100644 --- a/src/kernel_internals/typing/rmtmps.mli +++ b/src/kernel_internals/typing/rmtmps.mli @@ -72,7 +72,7 @@ * Note that certain CIL- and CCured-specific pragmas induce * additional global roots. This functionality is always present, and * is not subject to replacement by "filterRoots". - *) +*) type rootsFilter = Cil_types.global -> bool @@ -83,10 +83,10 @@ val isCompleteProgramRoot : rootsFilter val removeUnusedTemps: ?isRoot:rootsFilter -> Cil_types.file -> unit (** removes unused labels for which [is_removable] is true. -[is_removable] defaults to the negation of boolean flag of [Label] -{i i.e.} only labels generated by CIL may be removed. -@since Carbon-20101201 - *) + [is_removable] defaults to the negation of boolean flag of [Label] + {i i.e.} only labels generated by CIL may be removed. + @since Carbon-20101201 +*) val remove_unused_labels: ?is_removable:(Cil_types.label -> bool) -> Cil_types.fundec -> unit -- GitLab From 60bc2c1ee002cfe42560646d9348a69bf9732555 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Tue, 26 Feb 2019 13:20:04 +0100 Subject: [PATCH 122/376] [wp] adds some comments --- src/plugins/wp/MemTyped.ml | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/src/plugins/wp/MemTyped.ml b/src/plugins/wp/MemTyped.ml index 6de0a92ea47..5320e259671 100644 --- a/src/plugins/wp/MemTyped.ml +++ b/src/plugins/wp/MemTyped.ml @@ -1057,7 +1057,14 @@ let block_length sigma obj l = (* --- Cast --- *) (* -------------------------------------------------------------------------- *) -module Layout = +module Layout : sig + val pretty : Format.formatter -> c_object -> unit + + val fits: dst:c_object -> src:c_object -> bool + (* returns [true] in these cases: + - [dst] fits into [src] + - [dst] equals [src] *) +end = struct type atom = P of typ | I of c_int | F of c_float @@ -1144,10 +1151,10 @@ struct let add_array ly n w = if n=1 then ly @ w else add_many ly n w - let rec compare l1 l2 = - match l1 , l2 with - | [] , [] -> Equal - | [] , _ -> Fit + let rec compare ~dst ~src = + match dst , src with + | [] , [] -> Equal (* src = dst *) + | [] , _ -> Fit (* exists obj ; src = dst concat obj *) | _ , [] -> Mismatch | p::w1 , q::w2 -> match p , q with @@ -1166,7 +1173,7 @@ struct else Mismatch | Arr(u,n) , Arr(v,m) -> begin - match compare u v with + match compare ~dst:u ~src:v with | Mismatch -> Mismatch | Fit -> Mismatch | Equal -> @@ -1181,18 +1188,18 @@ struct compare w1 w2 end | Arr(v,n) , Str _ -> - compare (v @ add_array v (n-1) w1) l2 + compare ~dst:(v @ add_array v (n-1) w1) ~src | Str _ , Arr(v,n) -> - compare l1 (v @ add_array v (n-1) w2) + compare ~dst ~src:(v @ add_array v (n-1) w2) - let fits obj1 obj2 = - match obj1 , obj2 with + let fits ~dst ~src = + match dst , src with | C_int i1 , C_int i2 -> i1 = i2 | C_float f1 , C_float f2 -> f1 = f2 | C_comp c , C_comp d when Compinfo.equal c d -> true | C_pointer _ , C_pointer _ -> true | _ -> - match compare (layout obj1) (layout obj2) with + match compare ~dst:(layout dst) ~src:(layout src) with | Equal | Fit -> true | Mismatch -> false @@ -1223,10 +1230,10 @@ let cast s l = match Context.get pointer with | NoCast -> Warning.error ~source:"Typed Model" "%a" pp_mismatch s | Fits -> - if Layout.fits s.post s.pre then l else + if Layout.fits ~dst:s.post ~src:s.pre then l else Warning.error ~source:"Typed Model" "%a" pp_mismatch s | Unsafe -> - if not (Layout.fits s.post s.pre) then + if not (Layout.fits ~dst:s.post ~src:s.pre) then Warning.emit ~severe:false ~source:"Typed Model" ~effect:"Keep pointer value" "%a" pp_mismatch s ; l -- GitLab From 30e29676854b7d35beb597644d4c474b7a46f4b5 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Tue, 26 Feb 2019 13:23:48 +0100 Subject: [PATCH 123/376] [wp] explicits offset of an union field --- src/plugins/wp/ctypes.ml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/plugins/wp/ctypes.ml b/src/plugins/wp/ctypes.ml index 04cd9701c91..bde88014eff 100644 --- a/src/plugins/wp/ctypes.ml +++ b/src/plugins/wp/ctypes.ml @@ -464,9 +464,12 @@ let sizeof_object = function WpLog.fatal ~current:true "Sizeof unknown-size array" let field_offset fd = - let ctype = TComp(fd.fcomp,Cil.empty_size_cache(),[]) in - let offset = Field(fd,NoOffset) in - fst (Cil.bitsOffset ctype offset) / 8 + if fd.fcomp.cstruct then (* C struct *) + let ctype = TComp(fd.fcomp,Cil.empty_size_cache(),[]) in + let offset = Field(fd,NoOffset) in + fst (Cil.bitsOffset ctype offset) / 8 + else (* CIL invariant: all C union fields start at offset 0 *) + 0 (* Conforms to C-ISO 6.3.1.8 *) (* If same sign => greater rank. *) -- GitLab From 71cb033cb3326f36f44432791e92ed60739232e9 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Wed, 13 Mar 2019 16:30:00 +0100 Subject: [PATCH 124/376] [wp/tests] restore run.config_qualif for a test --- src/plugins/wp/tests/wp_acsl/logic.i | 4 +- .../wp_acsl/oracle_qualif/logic.res.oracle | 54 +++++++++---------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/plugins/wp/tests/wp_acsl/logic.i b/src/plugins/wp/tests/wp_acsl/logic.i index 3d6f566be3a..2f8fa186d83 100644 --- a/src/plugins/wp/tests/wp_acsl/logic.i +++ b/src/plugins/wp/tests/wp_acsl/logic.i @@ -1,9 +1,9 @@ /* run.config OPT: -wp-model Typed+cast -*//* run.config_qualif +*/ +/* run.config_qualif OPT: -wp -wp-model Typed+cast -wp-steps 50 */ - // Test logic types defined from C types //-------------------------------------- typedef struct { int x ; int y ; } Point ; diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.res.oracle index a5be47ac219..6df7d6c5cdf 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.res.oracle @@ -1,4 +1,4 @@ -# frama-c -wp -wp-timeout 90 -wp-steps 1500 [...] +# frama-c -wp -wp-model 'Typed (Cast)' -wp-timeout 90 -wp-steps 50 [...] [kernel] Parsing tests/wp_acsl/logic.i (no preprocessing) [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' @@ -41,34 +41,34 @@ [wp] tests/wp_acsl/logic.i:62: Warning: Logic cast to struct (Tint2) from (int [6]) not implemented yet [wp] 21 goals scheduled -[wp] [Alt-Ergo] Goal typed_h_ensures : Unsuccess (Stronger) -[wp] [Qed] Goal typed_h_assigns_exit : Valid -[wp] [Qed] Goal typed_h_assigns_normal : Valid -[wp] [Qed] Goal typed_main_requires_qed_ok : Valid -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_2 : Valid -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_3 : Valid -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_4 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_5 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_6 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_7 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_8 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_9 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_10 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_11 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_12 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_13 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_14 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_15 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_16 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_17 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_18 : Unsuccess (Stronger) -[wp] Proved goals: 5 / 21 - Qed: 3 - Alt-Ergo: 2 (unsuccess: 16) +[wp] [Qed] Goal typed_cast_h_ensures : Valid +[wp] [Qed] Goal typed_cast_h_assigns_exit : Valid +[wp] [Qed] Goal typed_cast_h_assigns_normal : Valid +[wp] [Qed] Goal typed_cast_main_requires_qed_ok : Valid +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_2 : Unsuccess +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_3 : Unsuccess +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_4 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_5 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_6 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_7 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_8 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_9 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_10 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_11 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_12 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_13 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_14 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_15 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_16 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_17 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_18 : Unsuccess (Stronger) +[wp] Proved goals: 4 / 21 + Qed: 4 + Alt-Ergo: 0 (unsuccess: 17) [wp] Report in: 'tests/wp_acsl/oracle_qualif/logic.0.report.json' [wp] Report out: 'tests/wp_acsl/result_qualif/logic.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -h 2 - 3 66.7% -main 1 2 (56..80) 18 16.7% +h 3 - 3 100% +main 1 - 18 5.6% ------------------------------------------------------------- -- GitLab From 7081913439f4b6bd74a953705c0fc1a7644686d4 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Wed, 27 Feb 2019 10:27:17 +0100 Subject: [PATCH 125/376] [wp/tests] add a test about C casts --- src/plugins/wp/tests/wp_typed/cast_fits.i | 62 +++++++ .../wp_typed/oracle/cast_fits.0.res.oracle | 164 ++++++++++++++++++ .../wp_typed/oracle/cast_fits.1.res.oracle | 164 ++++++++++++++++++ .../oracle_qualif/cast_fits.0.report.json | 86 +++++++++ .../oracle_qualif/cast_fits.res.oracle | 45 +++++ 5 files changed, 521 insertions(+) create mode 100644 src/plugins/wp/tests/wp_typed/cast_fits.i create mode 100644 src/plugins/wp/tests/wp_typed/oracle/cast_fits.0.res.oracle create mode 100644 src/plugins/wp/tests/wp_typed/oracle/cast_fits.1.res.oracle create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/cast_fits.0.report.json create mode 100644 src/plugins/wp/tests/wp_typed/oracle_qualif/cast_fits.res.oracle diff --git a/src/plugins/wp/tests/wp_typed/cast_fits.i b/src/plugins/wp/tests/wp_typed/cast_fits.i new file mode 100644 index 00000000000..8c0fcba18e0 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/cast_fits.i @@ -0,0 +1,62 @@ +typedef struct { int i1; char c1; } L1 ; + +//@ ensures \result == p->i1; +int fits1(L1 * p) { + int * q = (int *) p; + return *q; +} + +typedef struct { char c2; int i2; } L2; + +//@ ensures \result == p->c2; +int mismatch1(L2 * p) { + int * q = (int *) p; + return *q; +} + +typedef struct { char c3; L1 ic3; int i3; } L3 ; + +//@ ensures \result == p->ic3.i1; +int fits2(L3 * p) { + L2 * q = (L2 *) p; + return q->i2; +} + +typedef struct { char c4; L1 ic4[2]; int i4; } L4 ; + +//@ ensures \result == p->ic4[0].i1; +int fits3(L4 * p) { + L2 * q = (L2 *) p; + return q->i2; +} + +typedef struct { L3 ci5[2]; } L5 ; + +typedef struct { L2 ci6[2]; char c6; } L6 ; + +//@ ensures \result == p->ci5[1].c3; +int fits4(L5 * p) { + L6 * q = (L6 *) p; + return q->c6; +} + +typedef union { int u7; } L7 ; + +//@ ensures \result == p->u7; +int fits5(L7 * p) { + int * q = (int *) p; + return *q; +} + +typedef union { int i8; char u8; double d8;} L8 ; +//@ ensures \result == p->i8; +int mismatch2(L8 * p) { + int * q = (int *) p; + return *q; +} + +//@ ensures \result == *p; +int mismatch3(int * p) { + L8 * q = (L8 *) p; + return q->i8; +} diff --git a/src/plugins/wp/tests/wp_typed/oracle/cast_fits.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle/cast_fits.0.res.oracle new file mode 100644 index 00000000000..d9d935d4173 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle/cast_fits.0.res.oracle @@ -0,0 +1,164 @@ +# frama-c -wp [...] +[kernel] Parsing tests/wp_typed/cast_fits.i (no preprocessing) +[wp] Running WP plugin... +[wp] Loading driver 'share/wp.driver' +[wp] Warning: Missing RTE guards +[wp] tests/wp_typed/cast_fits.i:39: Warning: + Cast with incompatible pointers types (source: __anonstruct_L5_5*) + (target: __anonstruct_L6_6*) +[wp] tests/wp_typed/cast_fits.i:47: Warning: + Cast with incompatible pointers types (source: __anonunion_L7_7*) + (target: sint32*) +[wp] tests/wp_typed/cast_fits.i:13: Warning: + Cast with incompatible pointers types (source: __anonstruct_L2_2*) + (target: sint32*) +[wp] tests/wp_typed/cast_fits.i:54: Warning: + Cast with incompatible pointers types (source: __anonunion_L8_8*) + (target: sint32*) +[wp] tests/wp_typed/cast_fits.i:60: Warning: + Cast with incompatible pointers types (source: sint32*) + (target: __anonunion_L8_8*) +------------------------------------------------------------ + Function fits1 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/cast_fits.i, line 3) in 'fits1': +Let x = Mint_0[p]. +Let x_1 = Mint_0[shiftfield_F1_i1(p)]. +Assume { + Type: is_sint32(x) /\ is_sint32(x_1). + (* Heap *) + Have: region(p.base) <= 0. +} +Prove: x_1 = x. + +------------------------------------------------------------ +------------------------------------------------------------ + Function fits2 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/cast_fits.i, line 19) in 'fits2': +Let x = Mint_0[shiftfield_F2_i2(p)]. +Let x_1 = Mint_0[shiftfield_F1_i1(shiftfield_F3_ic3(p))]. +Assume { + Type: is_sint32(x) /\ is_sint32(x_1). + (* Heap *) + Have: region(p.base) <= 0. +} +Prove: x_1 = x. + +------------------------------------------------------------ +------------------------------------------------------------ + Function fits3 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/cast_fits.i, line 27) in 'fits3': +Let x = Mint_0[shiftfield_F2_i2(p)]. +Let x_1 = Mint_0 + [shiftfield_F1_i1(shift___anonstruct_L1_1(shiftfield_F4_ic4(p), + 0))]. +Assume { + Type: is_sint32(x) /\ is_sint32(x_1). + (* Heap *) + Have: region(p.base) <= 0. +} +Prove: x_1 = x. + +------------------------------------------------------------ +------------------------------------------------------------ + Function fits4 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/cast_fits.i, line 37) in 'fits4': +tests/wp_typed/cast_fits.i:39: warning from Typed Model: + - Warning: Hide sub-term definition + Reason: Cast with incompatible pointers types (source: __anonstruct_L5_5*) + (target: __anonstruct_L6_6*) +Let x = Mchar_0[shiftfield_F6_c6(q)]. +Let x_1 = Mchar_0 + [shiftfield_F3_c3(shift___anonstruct_L3_3(shiftfield_F5_ci5(p), + 1))]. +Assume { + Type: is_sint8(x) /\ is_sint32(x) /\ is_sint8(x_1). + (* Heap *) + Have: (region(p.base) <= 0) /\ sconst(Mchar_0). +} +Prove: x_1 = x. + +------------------------------------------------------------ +------------------------------------------------------------ + Function fits5 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/cast_fits.i, line 45) in 'fits5': +tests/wp_typed/cast_fits.i:47: warning from Typed Model: + - Warning: Hide sub-term definition + Reason: Cast with incompatible pointers types (source: __anonunion_L7_7*) + (target: sint32*) +Let x = Mint_0[q]. +Let x_1 = Mint_0[shiftfield_F7_u7(p)]. +Assume { + Type: is_sint32(x) /\ is_sint32(x_1). + (* Heap *) + Have: region(p.base) <= 0. +} +Prove: x_1 = x. + +------------------------------------------------------------ +------------------------------------------------------------ + Function mismatch1 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/cast_fits.i, line 11) in 'mismatch1': +tests/wp_typed/cast_fits.i:13: warning from Typed Model: + - Warning: Hide sub-term definition + Reason: Cast with incompatible pointers types (source: __anonstruct_L2_2*) + (target: sint32*) +Let x = Mint_0[q]. +Let x_1 = Mchar_0[shiftfield_F2_c2(p)]. +Assume { + Type: is_sint32(x) /\ is_sint8(x_1). + (* Heap *) + Have: (region(p.base) <= 0) /\ sconst(Mchar_0). +} +Prove: x_1 = x. + +------------------------------------------------------------ +------------------------------------------------------------ + Function mismatch2 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/cast_fits.i, line 52) in 'mismatch2': +tests/wp_typed/cast_fits.i:54: warning from Typed Model: + - Warning: Hide sub-term definition + Reason: Cast with incompatible pointers types (source: __anonunion_L8_8*) + (target: sint32*) +Let x = Mint_0[q]. +Let x_1 = Mint_0[shiftfield_F8_i8(p)]. +Assume { + Type: is_sint32(x) /\ is_sint32(x_1). + (* Heap *) + Have: region(p.base) <= 0. +} +Prove: x_1 = x. + +------------------------------------------------------------ +------------------------------------------------------------ + Function mismatch3 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/cast_fits.i, line 58) in 'mismatch3': +tests/wp_typed/cast_fits.i:60: warning from Typed Model: + - Warning: Hide sub-term definition + Reason: Cast with incompatible pointers types (source: sint32*) + (target: __anonunion_L8_8*) +Let x = Mint_0[p]. +Let x_1 = Mint_0[shiftfield_F8_i8(q)]. +Assume { + Type: is_sint32(x) /\ is_sint32(x_1). + (* Heap *) + Have: region(p.base) <= 0. +} +Prove: x_1 = x. + +------------------------------------------------------------ diff --git a/src/plugins/wp/tests/wp_typed/oracle/cast_fits.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle/cast_fits.1.res.oracle new file mode 100644 index 00000000000..0fe3ebad742 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle/cast_fits.1.res.oracle @@ -0,0 +1,164 @@ +# frama-c -wp -wp-model 'Typed (Ref)' [...] +[kernel] Parsing tests/wp_typed/cast_fits.i (no preprocessing) +[wp] Running WP plugin... +[wp] Loading driver 'share/wp.driver' +[wp] Warning: Missing RTE guards +[wp] tests/wp_typed/cast_fits.i:39: Warning: + Cast with incompatible pointers types (source: __anonstruct_L5_5*) + (target: __anonstruct_L6_6*) +[wp] tests/wp_typed/cast_fits.i:47: Warning: + Cast with incompatible pointers types (source: __anonunion_L7_7*) + (target: sint32*) +[wp] tests/wp_typed/cast_fits.i:13: Warning: + Cast with incompatible pointers types (source: __anonstruct_L2_2*) + (target: sint32*) +[wp] tests/wp_typed/cast_fits.i:54: Warning: + Cast with incompatible pointers types (source: __anonunion_L8_8*) + (target: sint32*) +[wp] tests/wp_typed/cast_fits.i:60: Warning: + Cast with incompatible pointers types (source: sint32*) + (target: __anonunion_L8_8*) +------------------------------------------------------------ + Function fits1 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/cast_fits.i, line 3) in 'fits1': +Let x = Mint_0[p]. +Let x_1 = Mint_0[shiftfield_F1_i1(p)]. +Assume { + Type: is_sint32(x) /\ is_sint32(x_1). + (* Heap *) + Have: region(p.base) <= 0. +} +Prove: x_1 = x. + +------------------------------------------------------------ +------------------------------------------------------------ + Function fits2 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/cast_fits.i, line 19) in 'fits2': +Let x = Mint_0[shiftfield_F2_i2(p)]. +Let x_1 = Mint_0[shiftfield_F1_i1(shiftfield_F3_ic3(p))]. +Assume { + Type: is_sint32(x) /\ is_sint32(x_1). + (* Heap *) + Have: region(p.base) <= 0. +} +Prove: x_1 = x. + +------------------------------------------------------------ +------------------------------------------------------------ + Function fits3 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/cast_fits.i, line 27) in 'fits3': +Let x = Mint_0[shiftfield_F2_i2(p)]. +Let x_1 = Mint_0 + [shiftfield_F1_i1(shift___anonstruct_L1_1(shiftfield_F4_ic4(p), + 0))]. +Assume { + Type: is_sint32(x) /\ is_sint32(x_1). + (* Heap *) + Have: region(p.base) <= 0. +} +Prove: x_1 = x. + +------------------------------------------------------------ +------------------------------------------------------------ + Function fits4 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/cast_fits.i, line 37) in 'fits4': +tests/wp_typed/cast_fits.i:39: warning from Typed Model: + - Warning: Hide sub-term definition + Reason: Cast with incompatible pointers types (source: __anonstruct_L5_5*) + (target: __anonstruct_L6_6*) +Let x = Mchar_0[shiftfield_F6_c6(q)]. +Let x_1 = Mchar_0 + [shiftfield_F3_c3(shift___anonstruct_L3_3(shiftfield_F5_ci5(p), + 1))]. +Assume { + Type: is_sint8(x) /\ is_sint32(x) /\ is_sint8(x_1). + (* Heap *) + Have: (region(p.base) <= 0) /\ sconst(Mchar_0). +} +Prove: x_1 = x. + +------------------------------------------------------------ +------------------------------------------------------------ + Function fits5 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/cast_fits.i, line 45) in 'fits5': +tests/wp_typed/cast_fits.i:47: warning from Typed Model: + - Warning: Hide sub-term definition + Reason: Cast with incompatible pointers types (source: __anonunion_L7_7*) + (target: sint32*) +Let x = Mint_0[q]. +Let x_1 = Mint_0[shiftfield_F7_u7(p)]. +Assume { + Type: is_sint32(x) /\ is_sint32(x_1). + (* Heap *) + Have: region(p.base) <= 0. +} +Prove: x_1 = x. + +------------------------------------------------------------ +------------------------------------------------------------ + Function mismatch1 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/cast_fits.i, line 11) in 'mismatch1': +tests/wp_typed/cast_fits.i:13: warning from Typed Model: + - Warning: Hide sub-term definition + Reason: Cast with incompatible pointers types (source: __anonstruct_L2_2*) + (target: sint32*) +Let x = Mint_0[q]. +Let x_1 = Mchar_0[shiftfield_F2_c2(p)]. +Assume { + Type: is_sint32(x) /\ is_sint8(x_1). + (* Heap *) + Have: (region(p.base) <= 0) /\ sconst(Mchar_0). +} +Prove: x_1 = x. + +------------------------------------------------------------ +------------------------------------------------------------ + Function mismatch2 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/cast_fits.i, line 52) in 'mismatch2': +tests/wp_typed/cast_fits.i:54: warning from Typed Model: + - Warning: Hide sub-term definition + Reason: Cast with incompatible pointers types (source: __anonunion_L8_8*) + (target: sint32*) +Let x = Mint_0[q]. +Let x_1 = Mint_0[shiftfield_F8_i8(p)]. +Assume { + Type: is_sint32(x) /\ is_sint32(x_1). + (* Heap *) + Have: region(p.base) <= 0. +} +Prove: x_1 = x. + +------------------------------------------------------------ +------------------------------------------------------------ + Function mismatch3 +------------------------------------------------------------ + +Goal Post-condition (file tests/wp_typed/cast_fits.i, line 58) in 'mismatch3': +tests/wp_typed/cast_fits.i:60: warning from Typed Model: + - Warning: Hide sub-term definition + Reason: Cast with incompatible pointers types (source: sint32*) + (target: __anonunion_L8_8*) +Let x = Mint_0[p]. +Let x_1 = Mint_0[shiftfield_F8_i8(q)]. +Assume { + Type: is_sint32(x) /\ is_sint32(x_1). + (* Heap *) + Have: region(p.base) <= 0. +} +Prove: x_1 = x. + +------------------------------------------------------------ diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/cast_fits.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/cast_fits.0.report.json new file mode 100644 index 00000000000..3003aaa8a86 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/cast_fits.0.report.json @@ -0,0 +1,86 @@ +{ "wp:global": { "alt-ergo": { "total": 8, "valid": 3, "unknown": 5, + "rank": 7 }, + "wp:main": { "total": 8, "valid": 3, "unknown": 5, + "rank": 7 } }, + "wp:functions": { "fits1": { "fits1_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 6 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 6 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 6 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 6 } } }, + "mismatch1": { "mismatch1_ensures": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } } }, + "fits2": { "fits2_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 6 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 6 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 6 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 6 } } }, + "fits3": { "fits3_ensures": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 7 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 7 } }, + "wp:section": { "alt-ergo": { "total": 1, + "valid": 1, + "rank": 7 }, + "wp:main": { "total": 1, + "valid": 1, + "rank": 7 } } }, + "fits4": { "fits4_ensures": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } } }, + "fits5": { "fits5_ensures": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } } }, + "mismatch2": { "mismatch2_ensures": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } } }, + "mismatch3": { "mismatch3_ensures": { "alt-ergo": + { "total": 1, + "unknown": 1 }, + "wp:main": + { "total": 1, + "unknown": 1 } }, + "wp:section": { "alt-ergo": { "total": 1, + "unknown": 1 }, + "wp:main": { "total": 1, + "unknown": 1 } } } } } diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/cast_fits.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/cast_fits.res.oracle new file mode 100644 index 00000000000..41a7947cd45 --- /dev/null +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/cast_fits.res.oracle @@ -0,0 +1,45 @@ +# frama-c -wp -wp-timeout 90 -wp-steps 1500 [...] +[kernel] Parsing tests/wp_typed/cast_fits.i (no preprocessing) +[wp] Running WP plugin... +[wp] Loading driver 'share/wp.driver' +[wp] Warning: Missing RTE guards +[wp] tests/wp_typed/cast_fits.i:39: Warning: + Cast with incompatible pointers types (source: __anonstruct_L5_5*) + (target: __anonstruct_L6_6*) +[wp] tests/wp_typed/cast_fits.i:47: Warning: + Cast with incompatible pointers types (source: __anonunion_L7_7*) + (target: sint32*) +[wp] tests/wp_typed/cast_fits.i:13: Warning: + Cast with incompatible pointers types (source: __anonstruct_L2_2*) + (target: sint32*) +[wp] tests/wp_typed/cast_fits.i:54: Warning: + Cast with incompatible pointers types (source: __anonunion_L8_8*) + (target: sint32*) +[wp] tests/wp_typed/cast_fits.i:60: Warning: + Cast with incompatible pointers types (source: sint32*) + (target: __anonunion_L8_8*) +[wp] 8 goals scheduled +[wp] [Alt-Ergo] Goal typed_fits1_ensures : Valid +[wp] [Alt-Ergo] Goal typed_fits2_ensures : Valid +[wp] [Alt-Ergo] Goal typed_fits3_ensures : Valid +[wp] [Alt-Ergo] Goal typed_fits4_ensures : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_fits5_ensures : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_mismatch1_ensures : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_mismatch2_ensures : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_mismatch3_ensures : Unsuccess (Stronger) +[wp] Proved goals: 3 / 8 + Qed: 0 + Alt-Ergo: 3 (unsuccess: 5) +[wp] Report in: 'tests/wp_typed/oracle_qualif/cast_fits.0.report.json' +[wp] Report out: 'tests/wp_typed/result_qualif/cast_fits.0.report.json' +------------------------------------------------------------- +Functions WP Alt-Ergo Total Success +fits1 - 1 (20..32) 1 100% +mismatch1 - - 1 0.0% +fits2 - 1 (20..32) 1 100% +fits3 - 1 (24..36) 1 100% +fits4 - - 1 0.0% +fits5 - - 1 0.0% +mismatch2 - - 1 0.0% +mismatch3 - - 1 0.0% +------------------------------------------------------------- -- GitLab From 6be3084d6f081d0ea5316d28acccb399e856ff18 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Tue, 26 Feb 2019 15:59:02 +0100 Subject: [PATCH 126/376] [wp] better fitting detection for C casts --- src/plugins/wp/MemTyped.ml | 55 ++++++++++++++----- .../wp_typed/oracle/cast_fits.0.res.oracle | 18 +----- .../wp_typed/oracle/cast_fits.1.res.oracle | 18 +----- .../oracle_qualif/cast_fits.0.report.json | 32 +++++++---- .../oracle_qualif/cast_fits.res.oracle | 18 ++---- 5 files changed, 70 insertions(+), 71 deletions(-) diff --git a/src/plugins/wp/MemTyped.ml b/src/plugins/wp/MemTyped.ml index 5320e259671..c8d82ca1aee 100644 --- a/src/plugins/wp/MemTyped.ml +++ b/src/plugins/wp/MemTyped.ml @@ -1062,14 +1062,15 @@ module Layout : sig val fits: dst:c_object -> src:c_object -> bool (* returns [true] in these cases: - - [dst] fits into [src] - - [dst] equals [src] *) + - [dst] fits into [src] (exists cobj; [src] = [dst] concat cobj) + - [dst] equals [src] ([dst] = [src]) *) end = struct - type atom = P of typ | I of c_int | F of c_float + type atom = P of typ | I of c_int | F of c_float | U of Cil_types.compinfo let pp_atom fmt = function + | U ci -> Format.fprintf fmt "union %a" Printer.pp_compinfo ci | P ty -> Printer.pp_typ fmt (TPtr(ty,[])) | I i -> Ctypes.pp_int fmt i | F f -> Ctypes.pp_float fmt f @@ -1077,7 +1078,10 @@ struct let eqatom a1 a2 = match a1 , a2 with | P _ , P _ -> true - | _ -> (a1 = a2) + | U u1 , U u2 -> Compinfo.equal u1 u2 + | I i1 , I i2 -> i1 = i2 + | F f1 , F f2 -> f1 = f2 + | _ -> false type block = | Str of atom * int @@ -1124,12 +1128,13 @@ struct | C_int i -> add_atom (I i) w | C_float f -> add_atom (F f) w | C_pointer t -> add_atom (P t) w + | C_comp { cfields = [f] } -> + flayout w f (* unions containing only one field are + considered as structures *) | C_comp c -> if c.cstruct then List.fold_left flayout w c.cfields - else - (* TODO: can be the longest common prefix *) - add_block Garbled w + else add_atom (U c) w (* unions with several fields *) | C_array { arr_flat = Some a } -> let ly = rlayout [] (Ctypes.object_of a.arr_cell) in if a.arr_cell_nbr = 1 @@ -1146,21 +1151,34 @@ struct let layout (obj : c_object) : layout = List.rev (rlayout [] obj) - type comparison = Fit | Equal | Mismatch + let add_compound (c: Cil_types.compinfo) w : layout = + List.fold_left flayout w (List.rev c.cfields) + + let ulayout (c: Cil_types.compinfo) : layout = add_compound c [] + + type comparison = Srem of layout | Drem of layout | Equal | Mismatch let add_array ly n w = if n=1 then ly @ w else add_many ly n w - let rec compare ~dst ~src = + let rec equal_atom a b = + (eqatom a b) || + (match a,b with + | U u1, U u2 -> (* for union, the layouts must be equal *) + (match compare ~dst:(ulayout u1) ~src:(ulayout u2) with + | Equal -> true + | _ -> false) + | _, _ -> false) + and compare ~dst ~src = match dst , src with | [] , [] -> Equal (* src = dst *) - | [] , _ -> Fit (* exists obj ; src = dst concat obj *) - | _ , [] -> Mismatch + | [] , obj -> Srem obj (* src = dst @ obj *) + | obj , [] -> Drem obj (* dst = src @ obj *) | p::w1 , q::w2 -> match p , q with | Garbled , _ | _ , Garbled -> Mismatch | Str(a,n) , Str(b,m) -> - if eqatom a b then + if equal_atom a b then if n < m then let w2 = Str(a,m-n)::w2 in compare w1 w2 @@ -1175,7 +1193,14 @@ struct begin match compare ~dst:u ~src:v with | Mismatch -> Mismatch - | Fit -> Mismatch + | Drem u' -> + let w1 = u' @ add_array u (n-1) w1 in + let w2 = add_array v (m-1) w2 in + compare w1 w2 + | Srem v' -> + let w1 = add_array u (n-1) w1 in + let w2 = v' @ add_array v (m-1) w2 in + compare w1 w2 | Equal -> if n < m then let w2 = add_array v (m-n) w2 in @@ -1200,8 +1225,8 @@ struct | C_pointer _ , C_pointer _ -> true | _ -> match compare ~dst:(layout dst) ~src:(layout src) with - | Equal | Fit -> true - | Mismatch -> false + | Equal | Srem _ -> true + | Drem _ | Mismatch -> false let rec pretty fmt = function | C_pointer ty -> Format.fprintf fmt "%a*" pretty (Ctypes.object_of ty) diff --git a/src/plugins/wp/tests/wp_typed/oracle/cast_fits.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle/cast_fits.0.res.oracle index d9d935d4173..56beccaf01f 100644 --- a/src/plugins/wp/tests/wp_typed/oracle/cast_fits.0.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle/cast_fits.0.res.oracle @@ -3,12 +3,6 @@ [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' [wp] Warning: Missing RTE guards -[wp] tests/wp_typed/cast_fits.i:39: Warning: - Cast with incompatible pointers types (source: __anonstruct_L5_5*) - (target: __anonstruct_L6_6*) -[wp] tests/wp_typed/cast_fits.i:47: Warning: - Cast with incompatible pointers types (source: __anonunion_L7_7*) - (target: sint32*) [wp] tests/wp_typed/cast_fits.i:13: Warning: Cast with incompatible pointers types (source: __anonstruct_L2_2*) (target: sint32*) @@ -70,11 +64,7 @@ Prove: x_1 = x. ------------------------------------------------------------ Goal Post-condition (file tests/wp_typed/cast_fits.i, line 37) in 'fits4': -tests/wp_typed/cast_fits.i:39: warning from Typed Model: - - Warning: Hide sub-term definition - Reason: Cast with incompatible pointers types (source: __anonstruct_L5_5*) - (target: __anonstruct_L6_6*) -Let x = Mchar_0[shiftfield_F6_c6(q)]. +Let x = Mchar_0[shiftfield_F6_c6(p)]. Let x_1 = Mchar_0 [shiftfield_F3_c3(shift___anonstruct_L3_3(shiftfield_F5_ci5(p), 1))]. @@ -91,11 +81,7 @@ Prove: x_1 = x. ------------------------------------------------------------ Goal Post-condition (file tests/wp_typed/cast_fits.i, line 45) in 'fits5': -tests/wp_typed/cast_fits.i:47: warning from Typed Model: - - Warning: Hide sub-term definition - Reason: Cast with incompatible pointers types (source: __anonunion_L7_7*) - (target: sint32*) -Let x = Mint_0[q]. +Let x = Mint_0[p]. Let x_1 = Mint_0[shiftfield_F7_u7(p)]. Assume { Type: is_sint32(x) /\ is_sint32(x_1). diff --git a/src/plugins/wp/tests/wp_typed/oracle/cast_fits.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle/cast_fits.1.res.oracle index 0fe3ebad742..cc8072d61ce 100644 --- a/src/plugins/wp/tests/wp_typed/oracle/cast_fits.1.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle/cast_fits.1.res.oracle @@ -3,12 +3,6 @@ [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' [wp] Warning: Missing RTE guards -[wp] tests/wp_typed/cast_fits.i:39: Warning: - Cast with incompatible pointers types (source: __anonstruct_L5_5*) - (target: __anonstruct_L6_6*) -[wp] tests/wp_typed/cast_fits.i:47: Warning: - Cast with incompatible pointers types (source: __anonunion_L7_7*) - (target: sint32*) [wp] tests/wp_typed/cast_fits.i:13: Warning: Cast with incompatible pointers types (source: __anonstruct_L2_2*) (target: sint32*) @@ -70,11 +64,7 @@ Prove: x_1 = x. ------------------------------------------------------------ Goal Post-condition (file tests/wp_typed/cast_fits.i, line 37) in 'fits4': -tests/wp_typed/cast_fits.i:39: warning from Typed Model: - - Warning: Hide sub-term definition - Reason: Cast with incompatible pointers types (source: __anonstruct_L5_5*) - (target: __anonstruct_L6_6*) -Let x = Mchar_0[shiftfield_F6_c6(q)]. +Let x = Mchar_0[shiftfield_F6_c6(p)]. Let x_1 = Mchar_0 [shiftfield_F3_c3(shift___anonstruct_L3_3(shiftfield_F5_ci5(p), 1))]. @@ -91,11 +81,7 @@ Prove: x_1 = x. ------------------------------------------------------------ Goal Post-condition (file tests/wp_typed/cast_fits.i, line 45) in 'fits5': -tests/wp_typed/cast_fits.i:47: warning from Typed Model: - - Warning: Hide sub-term definition - Reason: Cast with incompatible pointers types (source: __anonunion_L7_7*) - (target: sint32*) -Let x = Mint_0[q]. +Let x = Mint_0[p]. Let x_1 = Mint_0[shiftfield_F7_u7(p)]. Assume { Type: is_sint32(x) /\ is_sint32(x_1). diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/cast_fits.0.report.json b/src/plugins/wp/tests/wp_typed/oracle_qualif/cast_fits.0.report.json index 3003aaa8a86..193b5d5e58b 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/cast_fits.0.report.json +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/cast_fits.0.report.json @@ -1,7 +1,7 @@ -{ "wp:global": { "alt-ergo": { "total": 8, "valid": 3, "unknown": 5, - "rank": 7 }, - "wp:main": { "total": 8, "valid": 3, "unknown": 5, - "rank": 7 } }, +{ "wp:global": { "alt-ergo": { "total": 8, "valid": 5, "unknown": 3, + "rank": 8 }, + "wp:main": { "total": 8, "valid": 5, "unknown": 3, + "rank": 8 } }, "wp:functions": { "fits1": { "fits1_ensures": { "alt-ergo": { "total": 1, "valid": 1, "rank": 6 }, @@ -49,21 +49,29 @@ "valid": 1, "rank": 7 } } }, "fits4": { "fits4_ensures": { "alt-ergo": { "total": 1, - "unknown": 1 }, + "valid": 1, + "rank": 8 }, "wp:main": { "total": 1, - "unknown": 1 } }, + "valid": 1, + "rank": 8 } }, "wp:section": { "alt-ergo": { "total": 1, - "unknown": 1 }, + "valid": 1, + "rank": 8 }, "wp:main": { "total": 1, - "unknown": 1 } } }, + "valid": 1, + "rank": 8 } } }, "fits5": { "fits5_ensures": { "alt-ergo": { "total": 1, - "unknown": 1 }, + "valid": 1, + "rank": 6 }, "wp:main": { "total": 1, - "unknown": 1 } }, + "valid": 1, + "rank": 6 } }, "wp:section": { "alt-ergo": { "total": 1, - "unknown": 1 }, + "valid": 1, + "rank": 6 }, "wp:main": { "total": 1, - "unknown": 1 } } }, + "valid": 1, + "rank": 6 } } }, "mismatch2": { "mismatch2_ensures": { "alt-ergo": { "total": 1, "unknown": 1 }, diff --git a/src/plugins/wp/tests/wp_typed/oracle_qualif/cast_fits.res.oracle b/src/plugins/wp/tests/wp_typed/oracle_qualif/cast_fits.res.oracle index 41a7947cd45..6bc88bcb22a 100644 --- a/src/plugins/wp/tests/wp_typed/oracle_qualif/cast_fits.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle_qualif/cast_fits.res.oracle @@ -3,12 +3,6 @@ [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' [wp] Warning: Missing RTE guards -[wp] tests/wp_typed/cast_fits.i:39: Warning: - Cast with incompatible pointers types (source: __anonstruct_L5_5*) - (target: __anonstruct_L6_6*) -[wp] tests/wp_typed/cast_fits.i:47: Warning: - Cast with incompatible pointers types (source: __anonunion_L7_7*) - (target: sint32*) [wp] tests/wp_typed/cast_fits.i:13: Warning: Cast with incompatible pointers types (source: __anonstruct_L2_2*) (target: sint32*) @@ -22,14 +16,14 @@ [wp] [Alt-Ergo] Goal typed_fits1_ensures : Valid [wp] [Alt-Ergo] Goal typed_fits2_ensures : Valid [wp] [Alt-Ergo] Goal typed_fits3_ensures : Valid -[wp] [Alt-Ergo] Goal typed_fits4_ensures : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_fits5_ensures : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_fits4_ensures : Valid +[wp] [Alt-Ergo] Goal typed_fits5_ensures : Valid [wp] [Alt-Ergo] Goal typed_mismatch1_ensures : Unsuccess (Stronger) [wp] [Alt-Ergo] Goal typed_mismatch2_ensures : Unsuccess (Stronger) [wp] [Alt-Ergo] Goal typed_mismatch3_ensures : Unsuccess (Stronger) -[wp] Proved goals: 3 / 8 +[wp] Proved goals: 5 / 8 Qed: 0 - Alt-Ergo: 3 (unsuccess: 5) + Alt-Ergo: 5 (unsuccess: 3) [wp] Report in: 'tests/wp_typed/oracle_qualif/cast_fits.0.report.json' [wp] Report out: 'tests/wp_typed/result_qualif/cast_fits.0.report.json' ------------------------------------------------------------- @@ -38,8 +32,8 @@ fits1 - 1 (20..32) 1 100% mismatch1 - - 1 0.0% fits2 - 1 (20..32) 1 100% fits3 - 1 (24..36) 1 100% -fits4 - - 1 0.0% -fits5 - - 1 0.0% +fits4 - 1 (28..40) 1 100% +fits5 - 1 (20..32) 1 100% mismatch2 - - 1 0.0% mismatch3 - - 1 0.0% ------------------------------------------------------------- -- GitLab From 3c0bc02a5c359a906c8c9ac88da78f6ad2cd0fba Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Wed, 13 Mar 2019 16:18:52 +0100 Subject: [PATCH 127/376] [wp] better fitting detection for C casts (source: T target:T[N]) --- src/plugins/wp/MemTyped.ml | 51 ++++++++++++++++--- .../wp/tests/wp_acsl/oracle/logic.res.oracle | 22 -------- .../wp_acsl/oracle_qualif/logic.0.report.json | 32 ++++++------ .../wp_acsl/oracle_qualif/logic.res.oracle | 8 +-- 4 files changed, 59 insertions(+), 54 deletions(-) diff --git a/src/plugins/wp/MemTyped.ml b/src/plugins/wp/MemTyped.ml index c8d82ca1aee..63c759f0498 100644 --- a/src/plugins/wp/MemTyped.ml +++ b/src/plugins/wp/MemTyped.ml @@ -1194,13 +1194,13 @@ struct match compare ~dst:u ~src:v with | Mismatch -> Mismatch | Drem u' -> - let w1 = u' @ add_array u (n-1) w1 in - let w2 = add_array v (m-1) w2 in - compare w1 w2 + let w1 = u' @ add_array u (n-1) w1 in + let w2 = add_array v (m-1) w2 in + compare w1 w2 | Srem v' -> - let w1 = add_array u (n-1) w1 in - let w2 = v' @ add_array v (m-1) w2 in - compare w1 w2 + let w1 = add_array u (n-1) w1 in + let w2 = v' @ add_array v (m-1) w2 in + compare w1 w2 | Equal -> if n < m then let w2 = add_array v (m-n) w2 in @@ -1217,6 +1217,39 @@ struct | Str _ , Arr(v,n) -> compare ~dst ~src:(v @ add_array v (n-1) w2) + let rec repeated ~dst ~src = + match dst , src with + | [] , [] -> true (* src = dst *) + | _ , [] -> false (* empty source layout *) + | [] , _ -> false (* empty destination layout *) + | [p] , [q] -> begin + match p , q with + | Garbled , _ | _ , Garbled -> false + | Str(a,n) , Str(b,m) -> (* dst =?= repeated(src,n/m) *) + equal_atom a b && n >= m && (n mod m = 0) + | Arr(u,n) , Arr(v,m) -> + begin + match compare ~dst:u ~src:v with + | Mismatch -> false + | Drem u' -> + let w1 = u' @ add_array u (n-1) [] in + let w2 = add_array v (m-1) [] in + let cmp = compare ~dst:w1 ~src:w2 in + repeated_result ~src cmp + | Srem _ -> + false + | Equal -> (* dst =?= repeated(src,n/m) *) + n >= m && (n mod m = 0) + end + | _ , _ -> repeated_compare ~dst ~src + end + | _ , _ -> repeated_compare ~dst ~src + and repeated_compare ~dst ~src = repeated_result ~src (compare ~dst ~src) + and repeated_result ~src = function + | Equal -> true + | Mismatch | Srem _ -> false + | Drem dst -> repeated ~dst ~src + let fits ~dst ~src = match dst , src with | C_int i1 , C_int i2 -> i1 = i2 @@ -1224,9 +1257,11 @@ struct | C_comp c , C_comp d when Compinfo.equal c d -> true | C_pointer _ , C_pointer _ -> true | _ -> - match compare ~dst:(layout dst) ~src:(layout src) with + let src = layout src in + match compare ~dst:(layout dst) ~src with | Equal | Srem _ -> true - | Drem _ | Mismatch -> false + | Mismatch -> false + | Drem dst -> repeated dst src let rec pretty fmt = function | C_pointer ty -> Format.fprintf fmt "%a*" pretty (Ctypes.object_of ty) diff --git a/src/plugins/wp/tests/wp_acsl/oracle/logic.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle/logic.res.oracle index fe7f03a505d..96e9d783dee 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle/logic.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle/logic.res.oracle @@ -3,15 +3,9 @@ [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' [wp] Warning: Missing RTE guards -[wp] tests/wp_acsl/logic.i:16: Warning: - Cast with incompatible pointers types (source: __anonstruct_Point_1*) - (target: __anonstruct_Point_1[3]*) [wp] tests/wp_acsl/logic.i:65: Warning: Cast with incompatible pointers types (source: __anonstruct_Buint_4*) (target: uint32*) -[wp] tests/wp_acsl/logic.i:48: Warning: - Cast with incompatible pointers types (source: __anonstruct_Point_1*) - (target: __anonstruct_Point_1[3]*) [wp] tests/wp_acsl/logic.i:49: Warning: Logic cast from struct (Tint2) not implemented yet [wp] tests/wp_acsl/logic.i:50: Warning: @@ -45,28 +39,16 @@ ------------------------------------------------------------ Goal Post-condition (file tests/wp_acsl/logic.i, line 21) in 'h': -tests/wp_acsl/logic.i:16: warning from Typed Model: - - Warning: Keep pointer value - Reason: Cast with incompatible pointers types (source: __anonstruct_Point_1*) - (target: __anonstruct_Point_1[3]*) Prove: true. ------------------------------------------------------------ Goal Assigns nothing in 'h': -tests/wp_acsl/logic.i:16: warning from Typed Model: - - Warning: Keep pointer value - Reason: Cast with incompatible pointers types (source: __anonstruct_Point_1*) - (target: __anonstruct_Point_1[3]*) Prove: true. ------------------------------------------------------------ Goal Assigns nothing in 'h': -tests/wp_acsl/logic.i:16: warning from Typed Model: - - Warning: Keep pointer value - Reason: Cast with incompatible pointers types (source: __anonstruct_Point_1*) - (target: __anonstruct_Point_1[3]*) Prove: true. ------------------------------------------------------------ @@ -154,10 +136,6 @@ Prove: P_P(m). ------------------------------------------------------------ Goal Pre-condition 'qed_ok' in 'main': -tests/wp_acsl/logic.i:48: warning from Typed Model: - - Warning: Keep pointer value - Reason: Cast with incompatible pointers types (source: __anonstruct_Point_1*) - (target: __anonstruct_Point_1[3]*) Let a = global(G_tr_31). Let a_1 = shift___anonstruct_Point_1(a, 2). Let a_2 = shift___anonstruct_Point_1(a, 1). diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.0.report.json index badcee8deb0..ab5fc8563a8 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.0.report.json +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.0.report.json @@ -1,21 +1,17 @@ -{ "wp:global": { "alt-ergo": { "total": 18, "valid": 2, "unknown": 16, +{ "wp:global": { "alt-ergo": { "total": 17, "valid": 3, "unknown": 14, "rank": 16 }, - "qed": { "total": 3, "valid": 3 }, - "wp:main": { "total": 21, "valid": 5, "unknown": 16, + "qed": { "total": 4, "valid": 4 }, + "wp:main": { "total": 21, "valid": 7, "unknown": 14, "rank": 16 } }, "wp:functions": { "h": { "h_assigns": { "qed": { "total": 2, "valid": 2 }, "wp:main": { "total": 2, "valid": 2 } }, - "h_ensures": { "alt-ergo": { "total": 1, - "unknown": 1 }, + "h_ensures": { "qed": { "total": 1, "valid": 1 }, "wp:main": { "total": 1, - "unknown": 1 } }, - "wp:section": { "alt-ergo": { "total": 1, - "unknown": 1 }, - "qed": { "total": 2, "valid": 2 }, + "valid": 1 } }, + "wp:section": { "qed": { "total": 3, "valid": 3 }, "wp:main": { "total": 3, - "valid": 2, - "unknown": 1 } } }, + "valid": 3 } } }, "main": { "main_requires_qed_ok_18": { "alt-ergo": { "total": 1, "unknown": 1 }, @@ -102,10 +98,12 @@ "unknown": 1 } }, "main_requires_qed_ok_4": { "alt-ergo": { "total": 1, - "unknown": 1 }, + "valid": 1, + "rank": 16 }, "wp:main": { "total": 1, - "unknown": 1 } }, + "valid": 1, + "rank": 16 } }, "main_requires_qed_ok_3": { "alt-ergo": { "total": 1, "valid": 1, @@ -127,12 +125,12 @@ "wp:main": { "total": 1, "valid": 1 } }, "wp:section": { "alt-ergo": { "total": 17, - "valid": 2, - "unknown": 15, + "valid": 3, + "unknown": 14, "rank": 16 }, "qed": { "total": 1, "valid": 1 }, "wp:main": { "total": 18, - "valid": 3, - "unknown": 15, + "valid": 4, + "unknown": 14, "rank": 16 } } } } } diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.res.oracle index 6df7d6c5cdf..8f4e0382edf 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.res.oracle @@ -3,15 +3,9 @@ [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' [wp] Warning: Missing RTE guards -[wp] tests/wp_acsl/logic.i:16: Warning: - Cast with incompatible pointers types (source: __anonstruct_Point_1*) - (target: __anonstruct_Point_1[3]*) [wp] tests/wp_acsl/logic.i:65: Warning: Cast with incompatible pointers types (source: __anonstruct_Buint_4*) (target: uint32*) -[wp] tests/wp_acsl/logic.i:48: Warning: - Cast with incompatible pointers types (source: __anonstruct_Point_1*) - (target: __anonstruct_Point_1[3]*) [wp] tests/wp_acsl/logic.i:49: Warning: Logic cast from struct (Tint2) not implemented yet [wp] tests/wp_acsl/logic.i:50: Warning: @@ -47,7 +41,7 @@ [wp] [Qed] Goal typed_cast_main_requires_qed_ok : Valid [wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_2 : Unsuccess [wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_3 : Unsuccess -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_4 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_4 : Unsuccess [wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_5 : Unsuccess (Stronger) [wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_6 : Unsuccess (Stronger) [wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_7 : Unsuccess (Stronger) -- GitLab From a3b60b2768e6d884d25ff7ab56b81e5499d4609d Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Wed, 13 Mar 2019 16:42:51 +0100 Subject: [PATCH 128/376] [wp/tests] no more need of +cast for a test --- src/plugins/wp/tests/wp_acsl/logic.i | 4 +- .../wp/tests/wp_acsl/oracle/logic.res.oracle | 43 +++++++++--------- .../wp_acsl/oracle_qualif/logic.res.oracle | 44 +++++++++---------- 3 files changed, 44 insertions(+), 47 deletions(-) diff --git a/src/plugins/wp/tests/wp_acsl/logic.i b/src/plugins/wp/tests/wp_acsl/logic.i index 2f8fa186d83..7a54adc27e1 100644 --- a/src/plugins/wp/tests/wp_acsl/logic.i +++ b/src/plugins/wp/tests/wp_acsl/logic.i @@ -1,8 +1,8 @@ /* run.config - OPT: -wp-model Typed+cast + OPT: -wp-model Typed */ /* run.config_qualif - OPT: -wp -wp-model Typed+cast -wp-steps 50 + OPT: -wp -wp-model Typed -wp-steps 50 */ // Test logic types defined from C types //-------------------------------------- diff --git a/src/plugins/wp/tests/wp_acsl/oracle/logic.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle/logic.res.oracle index 96e9d783dee..a3547cdccf7 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle/logic.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle/logic.res.oracle @@ -1,4 +1,4 @@ -# frama-c -wp -wp-model 'Typed (Cast)' [...] +# frama-c -wp [...] [kernel] Parsing tests/wp_acsl/logic.i (no preprocessing) [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' @@ -66,19 +66,18 @@ Let a = global(G_tr_31). Let a_1 = shift___anonstruct_Point_1(a, 2). Let a_2 = shift___anonstruct_Point_1(a, 1). Let a_3 = shift___anonstruct_Point_1(a, 0). -Let a_4 = global(G_buint_37). -Let a_5 = shiftfield_F4_bytes(a_4). +Let a_4 = shiftfield_F4_bytes(global(G_buint_37)). Let m = Array1_S1(a_3, 3, Mint_0). Assume { - Type: is_uint32(Mint_0[a_4]) /\ IsArray1S1(m). + Type: IsArray1S1(m). (* Initializer *) - Init: Mint_0[shift_uint8(a_5, 0)] = 1. + Init: Mint_0[shift_uint8(a_4, 0)] = 1. (* Initializer *) - Init: Mint_0[shift_uint8(a_5, 1)] = 2. + Init: Mint_0[shift_uint8(a_4, 1)] = 2. (* Initializer *) - Init: Mint_0[shift_uint8(a_5, 2)] = 4. + Init: Mint_0[shift_uint8(a_4, 2)] = 4. (* Initializer *) - Init: Mint_0[shift_uint8(a_5, 3)] = 8. + Init: Mint_0[shift_uint8(a_4, 3)] = 8. (* Initializer *) Init: Mint_0[shiftfield_F1_x(a_3)] = 10. (* Initializer *) @@ -103,19 +102,18 @@ Let a = global(G_tr_31). Let a_1 = shift___anonstruct_Point_1(a, 2). Let a_2 = shift___anonstruct_Point_1(a, 1). Let a_3 = shift___anonstruct_Point_1(a, 0). -Let a_4 = global(G_buint_37). -Let a_5 = shiftfield_F4_bytes(a_4). +Let a_4 = shiftfield_F4_bytes(global(G_buint_37)). Let m = Array1_S1(a_3, 3, Mint_0). Assume { - Type: is_uint32(Mint_0[a_4]) /\ IsArray1S1(m). + Type: IsArray1S1(m). (* Initializer *) - Init: Mint_0[shift_uint8(a_5, 0)] = 1. + Init: Mint_0[shift_uint8(a_4, 0)] = 1. (* Initializer *) - Init: Mint_0[shift_uint8(a_5, 1)] = 2. + Init: Mint_0[shift_uint8(a_4, 1)] = 2. (* Initializer *) - Init: Mint_0[shift_uint8(a_5, 2)] = 4. + Init: Mint_0[shift_uint8(a_4, 2)] = 4. (* Initializer *) - Init: Mint_0[shift_uint8(a_5, 3)] = 8. + Init: Mint_0[shift_uint8(a_4, 3)] = 8. (* Initializer *) Init: Mint_0[shiftfield_F1_x(a_3)] = 10. (* Initializer *) @@ -140,19 +138,18 @@ Let a = global(G_tr_31). Let a_1 = shift___anonstruct_Point_1(a, 2). Let a_2 = shift___anonstruct_Point_1(a, 1). Let a_3 = shift___anonstruct_Point_1(a, 0). -Let a_4 = global(G_buint_37). -Let a_5 = shiftfield_F4_bytes(a_4). +Let a_4 = shiftfield_F4_bytes(global(G_buint_37)). Let m = Array1_S1(a_3, 3, Mint_0). Assume { - Type: is_uint32(Mint_0[a_4]) /\ IsArray1S1(m). + Type: IsArray1S1(m). (* Initializer *) - Init: Mint_0[shift_uint8(a_5, 0)] = 1. + Init: Mint_0[shift_uint8(a_4, 0)] = 1. (* Initializer *) - Init: Mint_0[shift_uint8(a_5, 1)] = 2. + Init: Mint_0[shift_uint8(a_4, 1)] = 2. (* Initializer *) - Init: Mint_0[shift_uint8(a_5, 2)] = 4. + Init: Mint_0[shift_uint8(a_4, 2)] = 4. (* Initializer *) - Init: Mint_0[shift_uint8(a_5, 3)] = 8. + Init: Mint_0[shift_uint8(a_4, 3)] = 8. (* Initializer *) Init: Mint_0[shiftfield_F1_x(a_3)] = 10. (* Initializer *) @@ -238,7 +235,7 @@ Let a_4 = global(G_buint_37). Let a_5 = shiftfield_F4_bytes(a_4). Let a_6 = Load_S4(a_4, Mint_0). Assume { - Type: is_uint32(Mint_0[a_4]) /\ IsS4(a_6). + Type: IsS4(a_6). (* Initializer *) Init: Mint_0[shift_uint8(a_5, 0)] = 1. (* Initializer *) diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.res.oracle index 8f4e0382edf..225cf1c40b8 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/logic.res.oracle @@ -1,4 +1,4 @@ -# frama-c -wp -wp-model 'Typed (Cast)' -wp-timeout 90 -wp-steps 50 [...] +# frama-c -wp -wp-timeout 90 -wp-steps 50 [...] [kernel] Parsing tests/wp_acsl/logic.i (no preprocessing) [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' @@ -35,27 +35,27 @@ [wp] tests/wp_acsl/logic.i:62: Warning: Logic cast to struct (Tint2) from (int [6]) not implemented yet [wp] 21 goals scheduled -[wp] [Qed] Goal typed_cast_h_ensures : Valid -[wp] [Qed] Goal typed_cast_h_assigns_exit : Valid -[wp] [Qed] Goal typed_cast_h_assigns_normal : Valid -[wp] [Qed] Goal typed_cast_main_requires_qed_ok : Valid -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_2 : Unsuccess -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_3 : Unsuccess -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_4 : Unsuccess -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_5 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_6 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_7 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_8 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_9 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_10 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_11 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_12 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_13 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_14 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_15 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_16 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_17 : Unsuccess (Stronger) -[wp] [Alt-Ergo] Goal typed_cast_main_requires_qed_ok_18 : Unsuccess (Stronger) +[wp] [Qed] Goal typed_h_ensures : Valid +[wp] [Qed] Goal typed_h_assigns_exit : Valid +[wp] [Qed] Goal typed_h_assigns_normal : Valid +[wp] [Qed] Goal typed_main_requires_qed_ok : Valid +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_2 : Unsuccess +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_3 : Unsuccess +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_4 : Unsuccess +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_5 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_6 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_7 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_8 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_9 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_10 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_11 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_12 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_13 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_14 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_15 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_16 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_17 : Unsuccess (Stronger) +[wp] [Alt-Ergo] Goal typed_main_requires_qed_ok_18 : Unsuccess (Stronger) [wp] Proved goals: 4 / 21 Qed: 4 Alt-Ergo: 0 (unsuccess: 17) -- GitLab From 3be325cbad15488e91d218cd27cb2ac0cc021ac3 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Thu, 21 Feb 2019 15:30:22 +0100 Subject: [PATCH 129/376] [Kernel] add more debug pretty-printers --- .../ast_printing/cil_types_debug.ml | 268 ++++++++++-------- .../ast_printing/cil_types_debug.mli | 10 +- 2 files changed, 159 insertions(+), 119 deletions(-) diff --git a/src/kernel_services/ast_printing/cil_types_debug.ml b/src/kernel_services/ast_printing/cil_types_debug.ml index c1c21886248..55d7253b1f9 100644 --- a/src/kernel_services/ast_printing/cil_types_debug.ml +++ b/src/kernel_services/ast_printing/cil_types_debug.ml @@ -40,6 +40,8 @@ let print_full_fieldinfo = false let print_full_enuminfo = false let print_full_typeinfo = false let print_full_varinfo = false +let print_full_fundec = false +let print_full_spec = false let pp_list fmt = Pretty_utils.pp_list fmt ~sep:", " ~pre:"[" ~last:"]" ~suf:"" ~empty:"[]" let pp_option fmt = Pretty_utils.pp_opt ~none:"None" ~pre:"Some(" ~suf:")" fmt @@ -412,10 +414,9 @@ and pp_exp_node fmt = function | StartOf(lval) -> Format.fprintf fmt "StartOf(%a)" pp_lval lval | Info(exp,exp_info) -> Format.fprintf fmt "Info(%a,%a)" pp_exp exp pp_exp_info exp_info -and pp_exp_info fmt _exp_info = Format.fprintf fmt "pp_exp_info_TODO" (*{ - exp_type : logic_type; - exp_name: string_list; - }*) +and pp_exp_info fmt exp_info = Format.fprintf fmt "{exp_type=%a;exp_name=%a}" + pp_logic_type exp_info.exp_type + (pp_list pp_string) exp_info.exp_name and pp_constant fmt = function | CInt64(integer,ikind,string_option) -> @@ -473,27 +474,42 @@ and pp_init fmt = function Format.fprintf fmt "CompoundInit(%a,%a)" pp_typ typ (pp_list (pp_pair pp_offset pp_init)) offset_init_pair_list -and pp_initinfo fmt _initinfo = Format.fprintf fmt "pp_initinfo_TODO" (*{ mutable init : init_option }*) - -and pp_fundec fmt _fundec = Format.fprintf fmt "pp_fundec_TODO" (*{ - mutable svar: varinfo; - mutable sformals: varinfo_list; - mutable slocals: varinfo_list; - mutable smaxid: int; - mutable sbody: block; - mutable smaxstmtid: int_option; - mutable sallstmts: stmt_list; - mutable sspec: funspec; - }*) - -and pp_block fmt _block = Format.fprintf fmt "pp_block_TODO" (*{ - mutable battrs: attributes; - mutable blocals: varinfo_list; - mutable bstmts: stmt_list; - }*) +and pp_initinfo fmt initinfo = Format.fprintf fmt "{%a}" (pp_option pp_init) initinfo.init + +and pp_fundec fmt fundec = + if print_full_fundec then + Format.fprintf fmt + "{svar=%a;sformals=%a;slocals=%a;smaxid=%a;sbody=%a;smaxstmtid=%a;sallstmts=%a;sspec=%a}" + pp_varinfo fundec.svar + (pp_list pp_varinfo) fundec.sformals + (pp_list pp_varinfo) fundec.slocals + pp_int fundec.smaxid + pp_block fundec.sbody + (pp_option pp_int) fundec.smaxstmtid + (pp_list pp_stmt) fundec.sallstmts + pp_funspec fundec.sspec + else + Format.fprintf fmt + "{svar=%a;sformals=%a;slocals=%a;smaxid=%a;sbody=<...>;smaxstmtid=%a;sallstmts=<...>;sspec=%a}" + pp_varinfo fundec.svar + (pp_list pp_varinfo) fundec.sformals + (pp_list pp_varinfo) fundec.slocals + pp_int fundec.smaxid + (*pp_block fundec.sbody*) + (pp_option pp_int) fundec.smaxstmtid + (*(pp_list pp_stmt) fundec.sallstmts*) + pp_funspec fundec.sspec + +and pp_block fmt block = + Format.fprintf fmt "{battrs=%a;bscoping=%a;blocals=%a;bstatics=%a;bstmts=%a}" + pp_attributes block.battrs + pp_bool block.bscoping + (pp_list pp_varinfo) block.blocals + (pp_list pp_varinfo) block.bstatics + (pp_list pp_stmt) block.bstmts and pp_stmt fmt stmt = Format.fprintf fmt - "{sid=%a;labels=%a;skind=%a;ghost=%a;TODO}" + "{sid=%a;labels=%a;skind=%a;ghost=%a;succs=<...>;preds=<...>}" pp_int stmt.sid (pp_list pp_label) stmt.labels pp_stmtkind stmt.skind @@ -569,13 +585,12 @@ and pp_instr fmt = function | Local_init(vi,i,location) -> Format.fprintf fmt "Local_init(%a,%a,%a)" pp_varinfo vi pp_local_init i pp_location location -and pp_extended_asm fmt _extended_asm = Format.fprintf fmt "pp_extended_asm_TODO" (*{ - { - asm_outputs: (string_option * string * lval)_list; - asm_inputs: (string_option * string * exp)_list; - asm_clobbers: string_list; - asm_gotos: (stmt ref)_list; - }*) +and pp_extended_asm fmt extended_asm = + Format.fprintf fmt "{asm_outputs=%a;asm_inputs=%a;asm_clobbers=%a;asm_gotos=%a}" + (pp_list (pp_tuple3 (pp_option pp_string) pp_string pp_lval)) extended_asm.asm_outputs + (pp_list (pp_tuple3 (pp_option pp_string) pp_string pp_exp)) extended_asm.asm_inputs + (pp_list pp_string) extended_asm.asm_clobbers + (pp_list (pp_ref pp_stmt)) extended_asm.asm_gotos and pp_filepath_position fmt filepath_position = Format.fprintf fmt "{pos_path=%s;pos_lnum=%d;pos_bol=%d;pos_cnum=%d}" @@ -605,12 +620,12 @@ and pp_logic_constant fmt = function | LReal(logic_real) -> Format.fprintf fmt "LReal(%a)" pp_logic_real logic_real | LEnum(enumitem) -> Format.fprintf fmt "LEnum(%a)" pp_enumitem enumitem -and pp_logic_real fmt _logic_real = Format.fprintf fmt "pp_logic_real_TODO" (*{ - r_literal : string ; - r_nearest : float ; - r_upper : float ; - r_lower : float ; - }*) +and pp_logic_real fmt logic_real = + Format.fprintf fmt "{r_literal=%a;r_nearest=%a;r_upper=%a;r_lower=%a}" + pp_string logic_real.r_literal + pp_float logic_real.r_nearest + pp_float logic_real.r_upper + pp_float logic_real.r_lower and pp_logic_type fmt = function | Ctype(typ) -> Format.fprintf fmt "Ctype(%a)" pp_typ typ @@ -709,14 +724,13 @@ and pp_term_lhost fmt = function | TResult(typ) -> Format.fprintf fmt "TResult(%a)" pp_typ typ | TMem(term) -> Format.fprintf fmt "TMem(%a)" pp_term term -and pp_model_info fmt _model_info = Format.fprintf fmt "pp_model_info_TODO" (*{ - mi_name: string; - mi_field_type: logic_type; - mi_base_type: typ; - mi_decl: location; - mutable mi_attr: attributes; - - }*) +and pp_model_info fmt model_info = Format.fprintf fmt + "{mi_name=%a;mi_field_type=%a;mi_base_type=%a;mi_decl=%a;mi_attr=%a}" + pp_string model_info.mi_name + pp_logic_type model_info.mi_field_type + pp_typ model_info.mi_base_type + pp_location model_info.mi_decl + pp_attributes model_info.mi_attr and pp_term_offset fmt = function | TNoOffset -> Format.fprintf fmt "TNoOffset" @@ -728,11 +742,12 @@ and pp_term_offset fmt = function Format.fprintf fmt "TIndex(%a,%a)" pp_term term pp_term_offset term_offset and pp_logic_info fmt logic_info = - Format.fprintf fmt "{l_var_info=%a;%al_tparams=%a;logic_type=%a;TODO}" + Format.fprintf fmt "{l_var_info=%a;%al_tparams=%a;logic_type=%a;l_profile=%a;l_body=<...>}" pp_logic_var logic_info.l_var_info (pp_if_list_not_empty "l_labels=" ";" (pp_list pp_logic_label)) logic_info.l_labels (pp_list pp_string) logic_info.l_tparams (pp_option pp_logic_type) logic_info.l_type + (pp_list pp_logic_var) logic_info.l_profile (*{ mutable l_var_info : logic_var; mutable l_labels : logic_label_list; @@ -742,13 +757,14 @@ and pp_logic_info fmt logic_info = mutable l_body : logic_body; }*) -and pp_builtin_logic_info fmt _builtin_logic_info = Format.fprintf fmt "pp_builtin_logic_info_TODO" (*{ - mutable bl_name: string; - mutable bl_labels: logic_label_list; - mutable bl_params: string_list; - mutable bl_type: logic_type_option; - mutable bl_profile: (string * logic_type)_list; - }*) +and pp_builtin_logic_info fmt builtin_logic_info = + Format.fprintf fmt + "{bl_name=%a;bl_labels=%a;bl_params=%a;bl_type=%a;bl_profile=%a}" + pp_string builtin_logic_info.bl_name + (pp_list pp_logic_label) builtin_logic_info.bl_labels + (pp_list pp_string) builtin_logic_info.bl_params + (pp_option pp_logic_type) builtin_logic_info.bl_type + (pp_list (pp_pair pp_string pp_logic_type)) builtin_logic_info.bl_profile and pp_logic_body fmt = function | LBnone -> Format.fprintf fmt "LBnone" @@ -780,8 +796,12 @@ and pp_logic_var_kind fmt = function | LVLocal -> Format.fprintf fmt "LVLocal" and pp_logic_var fmt logic_var = - Format.fprintf fmt "{lv_name=%a;lv_id=%a;TODO}" + Format.fprintf fmt "{lv_name=%a;lv_id=%a;lv_type=%a;lv_kind=%a;lv_origin=%a;lv_attr=%a}" pp_string logic_var.lv_name pp_int logic_var.lv_id + pp_logic_type logic_var.lv_type + pp_logic_var_kind logic_var.lv_kind + (pp_option pp_varinfo) logic_var.lv_origin + pp_attributes logic_var.lv_attr (*{ mutable lv_name : string; mutable lv_id : int; @@ -792,7 +812,7 @@ and pp_logic_var fmt logic_var = }*) and pp_logic_ctor_info fmt logic_ctor_info = - Format.fprintf fmt "{ctor_name=%a;ctor_type=TODO;ctor_params=%a}" + Format.fprintf fmt "{ctor_name=%a;ctor_type=<...>;ctor_params=%a}" pp_string logic_ctor_info.ctor_name (*note: printing ctor_type type may lead to infinite recursion*) (*pp_logic_type_info logic_ctor_info.ctor_type*) @@ -871,13 +891,22 @@ and pp_predicate fmt predicate = Format.fprintf fmt "{%a%apred_content=%a}" (pp_if_loc_known "pred_loc=" ";") predicate.pred_loc pp_predicate_node predicate.pred_content -and pp_spec fmt _spec = Format.fprintf fmt "pp_spec_TODO" (*{ - mutable spec_behavior : behavior_list; - mutable spec_variant : term variant_option; - mutable spec_terminates: identified_predicate_option; - mutable spec_complete_behaviors: string_list_list; - mutable spec_disjoint_behaviors: string_list_list; - }*) +and pp_spec fmt spec = + if print_full_spec then + Format.fprintf fmt + "{spec_behavior=%a;spec_variant=%a;spec_terminates=%a;\ + spec_complete_behaviors=%a;spec_disjoint_behaviors=%a}" + (pp_list pp_behavior) spec.spec_behavior + (pp_option pp_variant) spec.spec_variant + (pp_option pp_identified_predicate) spec.spec_terminates + (pp_list (pp_list pp_string)) spec.spec_complete_behaviors + (pp_list (pp_list pp_string)) spec.spec_disjoint_behaviors + else + Format.fprintf fmt "{spec_behavior=%a;spec_complete_behaviors=%a;\ + spec_disjoint_behaviors=%a}" + (pp_list pp_string) (List.map (fun b -> b.b_name) spec.spec_behavior) + (pp_list (pp_list pp_string)) spec.spec_complete_behaviors + (pp_list (pp_list pp_string)) spec.spec_disjoint_behaviors and pp_acsl_extension fmt = pp_tuple5 pp_int pp_string pp_location pp_bool pp_acsl_extension_kind fmt @@ -886,15 +915,17 @@ and pp_acsl_extension_kind fmt = function | Ext_terms(term_list) -> Format.fprintf fmt "Ext_terms(%a)" (pp_list pp_term) term_list | Ext_preds(predicate_list) -> Format.fprintf fmt "Ext_preds(%a)" (pp_list pp_predicate) predicate_list -and pp_behavior fmt _behavior = Format.fprintf fmt "pp_behavior_TODO" (*{ - mutable b_name : string; - mutable b_requires : identified_predicate_list; - mutable b_assumes : identified_predicate_list; - mutable b_post_cond : (termination_kind * identified_predicate)_list; - mutable b_assigns : assigns; - mutable b_allocation : allocation; - mutable b_extended : acsl_extension_list - }*) +and pp_behavior fmt behavior = + Format.fprintf fmt + "{b_name=%a;b_requires=%a;b_assumes=%a;b_post_cond=%a;b_assigns=%a;\ + b_allocation=%a;b_extended=%a}" + pp_string behavior.b_name + (pp_list pp_identified_predicate) behavior.b_requires + (pp_list pp_identified_predicate) behavior.b_assumes + (pp_list (pp_pair pp_termination_kind pp_identified_predicate)) behavior.b_post_cond + (pp_assigns pp_from) behavior.b_assigns + pp_allocation behavior.b_allocation + (pp_list pp_acsl_extension) behavior.b_extended and pp_termination_kind fmt = function | Normal -> Format.fprintf fmt "Normal" @@ -947,12 +978,12 @@ and pp_code_annotation_node fmt = function Format.fprintf fmt "AExtended(%a,%B,%a)" (pp_list pp_string) string_list is_loop pp_acsl_extension acsl_extension -and pp_funspec fmt _funspec = Format.fprintf fmt "pp_funspec_TODO" +and pp_funspec fmt funspec = pp_spec fmt funspec -and pp_code_annotation fmt _code_annotation = Format.fprintf fmt "pp_code_annotation_TODO" (*{ - annot_id: int; - annot_content : code_annotation_node; - }*) +and pp_code_annotation fmt code_annotation = + Format.fprintf fmt "{annot_id=%a;annot_content=%a}" + pp_int code_annotation.annot_id + pp_code_annotation_node code_annotation.annot_content and pp_funbehavior fmt = pp_behavior fmt @@ -1001,48 +1032,57 @@ let pp_cil_function fmt = function Format.fprintf fmt "Declaration(%a,%a,%a,%a)" pp_funspec funspec pp_varinfo varinfo (pp_option (pp_list pp_varinfo)) varinfo_list_option pp_location location -let pp_kernel_function fmt _kernel_function = Format.fprintf fmt "pp_kernel_function_TODO" (*{ - mutable fundec : cil_function; - mutable spec : funspec; - }*) +let pp_kernel_function fmt kernel_function = + Format.fprintf fmt "{fundec=%a;spec=%a}" + pp_cil_function kernel_function.fundec + pp_funspec kernel_function.spec let pp_localisation fmt = function | VGlobal -> Format.fprintf fmt "VGlobal" | VLocal(kernel_function) -> Format.fprintf fmt "VLocal(%a)" pp_kernel_function kernel_function | VFormal(kernel_function) -> Format.fprintf fmt "VFormal(%a)" pp_kernel_function kernel_function -let pp_mach fmt _mach = Format.fprintf fmt "pp_mach_TODO" (*{ - sizeof_short: int; - sizeof_int: int; - sizeof_long: int ; - sizeof_longlong: int; - sizeof_ptr: int; - sizeof_float: int; - sizeof_double: int; - sizeof_longdouble: int; - sizeof_void: int; - sizeof_fun: int; - size_t: string; - wchar_t: string; - ptrdiff_t: string; - alignof_short: int; - alignof_int: int; - alignof_long: int; - alignof_longlong: int; - alignof_ptr: int; - alignof_float: int; - alignof_double: int; - alignof_longdouble: int; - alignof_str: int; - alignof_fun: int; - char_is_unsigned: bool; - underscore_name: bool; - const_string_literals: bool; - little_endian: bool; - alignof_aligned: int; - has__builtin_va_list: bool; - __thread_is_keyword: bool; - compiler: string; - cpp_arch_flags: string_list; - version: string; - }*) +let pp_mach fmt mach = + Format.fprintf fmt + "{sizeof_short=%a;sizeof_int=%a;sizeof_long=%a;sizeof_longlong=%a;\ + sizeof_ptr=%a;sizeof_float=%a;sizeof_double=%a;sizeof_longdouble=%a;\ + sizeof_void=%a;sizeof_fun=%a;size_t=%a;wchar_t=%a;ptrdiff_t=%a;\ + alignof_short=%a;alignof_int=%a;alignof_long=%a;alignof_longlong=%a;\ + alignof_ptr=%a;alignof_float=%a;alignof_double=%a;alignof_longdouble=%a;\ + alignof_str=%a;alignof_fun=%a;char_is_unsigned=%a;underscore_name=%a;\ + const_string_literals=%a;little_endian=%a;alignof_aligned=%a;\ + has__builtin_va_list=%a;__thread_is_keyword=%a;compiler=%a;\ + cpp_arch_flags=%a;version=%a}" + pp_int mach.sizeof_short + pp_int mach.sizeof_int + pp_int mach.sizeof_long + pp_int mach.sizeof_longlong + pp_int mach.sizeof_ptr + pp_int mach.sizeof_float + pp_int mach.sizeof_double + pp_int mach.sizeof_longdouble + pp_int mach.sizeof_void + pp_int mach.sizeof_fun + pp_string mach.size_t + pp_string mach.wchar_t + pp_string mach.ptrdiff_t + pp_int mach.alignof_short + pp_int mach.alignof_int + pp_int mach.alignof_long + pp_int mach.alignof_longlong + pp_int mach.alignof_ptr + pp_int mach.alignof_float + pp_int mach.alignof_double + pp_int mach.alignof_longdouble + pp_int mach.alignof_str + pp_int mach.alignof_fun + pp_bool mach.char_is_unsigned + pp_bool mach.underscore_name + pp_bool mach.const_string_literals + pp_bool mach.little_endian + pp_int mach.alignof_aligned + pp_bool mach.has__builtin_va_list + pp_bool mach.__thread_is_keyword + pp_string mach.compiler + (pp_list pp_string) mach.cpp_arch_flags + pp_string mach.version diff --git a/src/kernel_services/ast_printing/cil_types_debug.mli b/src/kernel_services/ast_printing/cil_types_debug.mli index e6cca0530b1..29eb14f20cc 100644 --- a/src/kernel_services/ast_printing/cil_types_debug.mli +++ b/src/kernel_services/ast_printing/cil_types_debug.mli @@ -141,8 +141,8 @@ val pp_predicate : Cil_types.predicate Pretty_utils.formatter val pp_spec : Format.formatter -> Cil_types.spec -> unit val pp_acsl_extension : Format.formatter -> Cil_types.acsl_extension -> unit val pp_acsl_extension_kind : - Cil_types.acsl_extension_kind Pretty_utils.formatter -val pp_behavior : Format.formatter -> 'a -> unit + Format.formatter -> Cil_types.acsl_extension_kind -> unit +val pp_behavior : Format.formatter -> Cil_types.behavior -> unit val pp_termination_kind : Format.formatter -> Cil_types.termination_kind -> unit val pp_loop_pragma : @@ -161,11 +161,11 @@ val pp_code_annotation_node : Format.formatter -> Cil_types.code_annotation_node -> unit val pp_funspec : Format.formatter -> Cil_types.funspec -> unit val pp_code_annotation : Cil_types.code_annotation Pretty_utils.formatter -val pp_funbehavior : Format.formatter -> 'a -> unit +val pp_funbehavior : Format.formatter -> Cil_types.funbehavior -> unit val pp_global_annotation : Cil_types.global_annotation Pretty_utils.formatter val pp_custom_tree : Format.formatter -> Cil_types.custom_tree -> unit val pp_kinstr : Format.formatter -> Cil_types.kinstr -> unit val pp_cil_function : Format.formatter -> Cil_types.cil_function -> unit -val pp_kernel_function : Format.formatter -> 'a -> unit +val pp_kernel_function : Format.formatter -> Cil_types.kernel_function -> unit val pp_localisation : Format.formatter -> Cil_types.localisation -> unit -val pp_mach : Format.formatter -> 'a -> unit +val pp_mach : Format.formatter -> Cil_types.mach -> unit -- GitLab From 95f011c7395e1ad4c63acfb5590f618eeca703a3 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Thu, 14 Mar 2019 14:05:46 +0100 Subject: [PATCH 130/376] [Kernel] help message prints default value for option -enums --- src/kernel_services/plugin_entry_points/kernel.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kernel_services/plugin_entry_points/kernel.ml b/src/kernel_services/plugin_entry_points/kernel.ml index 9c4a3b5306a..31065775b51 100644 --- a/src/kernel_services/plugin_entry_points/kernel.ml +++ b/src/kernel_services/plugin_entry_points/kernel.ml @@ -1113,13 +1113,15 @@ module LogicalOperators = let () = Parameter_customize.set_group normalisation let () = Parameter_customize.do_not_reset_on_copy () module Enums = - P.Empty_string + P.String (struct let option_name = "-enums" let arg_name = "repr" + let default = "gcc-enums" let help = "use <repr> to decide how enumerated types should be represented. \ - -enums help gives the list of available representations" + -enums help gives the list of available representations (default: " + ^ default ^ ")" end) let enum_reprs = ["gcc-enums"; "gcc-short-enums"; "int";] let () = Enums.set_possible_values ("help"::enum_reprs) -- GitLab From 6fe4bc908b700b9775a14d3e8c446701e8216b9f Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Thu, 14 Mar 2019 14:06:50 +0100 Subject: [PATCH 131/376] [Variadic] fix warning related to enum type --- src/plugins/variadic/standard.ml | 35 ++++++++++++----- .../oracle/printf_wrong_types.res.oracle | 39 ++++++++++++++++++- .../variadic/tests/known/printf_wrong_types.c | 3 +- 3 files changed, 65 insertions(+), 12 deletions(-) diff --git a/src/plugins/variadic/standard.ml b/src/plugins/variadic/standard.ml index af4fefa77c6..8f2aac621af 100644 --- a/src/plugins/variadic/standard.ml +++ b/src/plugins/variadic/standard.ml @@ -72,12 +72,21 @@ let is_extended_integer_type t = | TNamed (ti, _) -> List.mem ti.tname extended_integer_typenames | _ -> false +let integral_rep ikind = + Cil.bitsSizeOfInt ikind, Cil.isSigned ikind + +let expose t = + Cil.type_remove_attributes_for_c_cast (Cil.unrollType t) + +let is_equivalent_enum given expected = + match expose given, expose expected with + | TInt (i1,a1), TEnum({ekind=i2},a2) + | TEnum({ekind=i1},a1), TInt (i2,a2) -> + integral_rep i1 = integral_rep i2 && + Cil_datatype.Attributes.equal a1 a2 + | _, _ -> false + let can_cast given expected = - let integral_rep ikind = - Cil.bitsSizeOfInt ikind, Cil.isSigned ikind - and expose t = - Cil.type_remove_attributes_for_c_cast (Cil.unrollType t) - in match expose given, expose expected with | (TInt (i1,a1) | TEnum({ekind=i1},a1)), (TInt (i2,a2) | TEnum({ekind=i2},a2)) @@ -106,11 +115,17 @@ let pretty_typ fmt t = let cast_arg i paramtyp exp = let argtyp = Cil.typeOf exp in if not (can_cast argtyp paramtyp) && not (does_fit exp paramtyp) then - Self.warning ~current:true - "Incorrect type for argument %d. \ - The argument will be cast from %a to %a." - (i + 1) - pretty_typ argtyp pretty_typ paramtyp; + if Strict.get () && is_equivalent_enum argtyp paramtyp then + Self.warning ~current:true + "Possible portability issues with enum type for argument %d \ + (use -variadic-no-strict to avoid this warning)." + (i + 1) + else + Self.warning ~current:true + "Incorrect type for argument %d. \ + The argument will be cast from %a to %a." + (i + 1) + pretty_typ argtyp pretty_typ paramtyp; Cil.mkCast ~force:false ~e:exp ~newt:paramtyp diff --git a/src/plugins/variadic/tests/known/oracle/printf_wrong_types.res.oracle b/src/plugins/variadic/tests/known/oracle/printf_wrong_types.res.oracle index 0bb2cd97335..39f1ae9b900 100644 --- a/src/plugins/variadic/tests/known/oracle/printf_wrong_types.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/printf_wrong_types.res.oracle @@ -69,7 +69,11 @@ [variadic] tests/known/printf_wrong_types.c:35: Translating call to printf to a call to the specialized version printf_va_15. [variadic] tests/known/printf_wrong_types.c:35: Warning: - Incorrect type for argument 2. The argument will be cast from RC (unsigned int) to unsigned int. + Possible portability issues with enum type for argument 2 (use -variadic-no-strict to avoid this warning). +[variadic] tests/known/printf_wrong_types.c:36: + Translating call to printf to a call to the specialized version printf_va_16. +[variadic] tests/known/printf_wrong_types.c:36: Warning: + Incorrect type for argument 2. The argument will be cast from RC (unsigned int) to int. [eva] Analyzing a complete application starting at main [eva] Computing initial state [eva] Initial state computed @@ -298,6 +302,19 @@ int printf_va_14(char const * __restrict format, int param0); */ int printf_va_15(char const * __restrict format, unsigned int param0); +/*@ requires valid_read_string(format); + assigns \result, __fc_stdout->__fc_FILE_data; + assigns \result + \from (indirect: __fc_stdout->__fc_FILE_id), + __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), + param0; + assigns __fc_stdout->__fc_FILE_data + \from (indirect: __fc_stdout->__fc_FILE_id), + __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), + param0; + */ +int printf_va_16(char const * __restrict format, int param0); + int main(void) { int __retres; @@ -325,6 +342,7 @@ int main(void) printf_va_14("%d",(int)string); RC rc = OK; printf_va_15("%u",rc); + printf_va_16("%d",(int)rc); __retres = 0; return __retres; } @@ -386,6 +404,7 @@ int main(void) printf("%d",string); RC rc = OK; printf("%u",rc); + printf("%d",rc); __retres = 0; return __retres; } @@ -453,6 +472,10 @@ int main(void) Incorrect type for argument 2. The argument will be cast from char * to int. [variadic] tests/known/printf_wrong_types.c:35: Translating call to printf to a call to the specialized version printf_va_15. +[variadic] tests/known/printf_wrong_types.c:36: + Translating call to printf to a call to the specialized version printf_va_16. +[variadic] tests/known/printf_wrong_types.c:36: Warning: + Incorrect type for argument 2. The argument will be cast from RC (unsigned int) to int. [eva] Analyzing a complete application starting at main [eva] Computing initial state [eva] Initial state computed @@ -681,6 +704,19 @@ int printf_va_14(char const * __restrict format, int param0); */ int printf_va_15(char const * __restrict format, unsigned int param0); +/*@ requires valid_read_string(format); + assigns \result, __fc_stdout->__fc_FILE_data; + assigns \result + \from (indirect: __fc_stdout->__fc_FILE_id), + __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), + param0; + assigns __fc_stdout->__fc_FILE_data + \from (indirect: __fc_stdout->__fc_FILE_id), + __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), + param0; + */ +int printf_va_16(char const * __restrict format, int param0); + int main(void) { int __retres; @@ -708,6 +744,7 @@ int main(void) printf_va_14("%d",(int)string); RC rc = OK; printf_va_15("%u",rc); + printf_va_16("%d",(int)rc); __retres = 0; return __retres; } diff --git a/src/plugins/variadic/tests/known/printf_wrong_types.c b/src/plugins/variadic/tests/known/printf_wrong_types.c index 7b6cdd80e44..85cfc9279a4 100644 --- a/src/plugins/variadic/tests/known/printf_wrong_types.c +++ b/src/plugins/variadic/tests/known/printf_wrong_types.c @@ -32,5 +32,6 @@ int main(){ typedef enum { OK, ERROR } RC; RC rc = OK; - printf("%u", rc); // Wrong type (in strict mode) + printf("%u", rc); // Correct type with '-enums gcc-enums' + printf("%d", rc); // Wrong type (in strict mode) } -- GitLab From 6bd6462425aa83c63a3becabaeaa247f9cd544cf Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 14 Mar 2019 15:23:20 +0100 Subject: [PATCH 132/376] [parsing] Allow attributes in declarator lists Previously, the parser only allowed attributes at beginning of a declaration (like for `const`, `static`, ...). However, gcc accepts to have attributes in the rest of the declaration (after the first comma, like for a pointer or array declarator). Fixes #616 --- src/kernel_internals/parsing/cparser.mly | 15 ++++++++++++++- .../syntax/attributes-declarations-definitions.c | 4 ++++ ...attributes-declarations-definitions.res.oracle | 7 +++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/kernel_internals/parsing/cparser.mly b/src/kernel_internals/parsing/cparser.mly index 7da75c2c4a1..29da754e5d2 100644 --- a/src/kernel_internals/parsing/cparser.mly +++ b/src/kernel_internals/parsing/cparser.mly @@ -1035,9 +1035,22 @@ declaration: /* ISO 6.7.*/ init_declarator_list: /* ISO 6.7 */ init_declarator { [$1] } -| init_declarator COMMA init_declarator_list { $1 :: $3 } +| init_declarator COMMA init_declarator_attr_list { $1 :: $3 } ; + +init_declarator_attr_list: + init_declarator_attr { [ $1 ] } +| init_declarator_attr COMMA init_declarator_attr_list { $1 :: $3 } +; + +init_declarator_attr: + attribute_nocv_list init_declarator { + let ((name, decl, attrs, loc), init) = $2 in + ((name, PARENTYPE ($1,decl,[]), attrs, loc), init) + } +; + init_declarator: /* ISO 6.7 */ declarator { ($1, NO_INIT) } | declarator EQ init_expression diff --git a/tests/syntax/attributes-declarations-definitions.c b/tests/syntax/attributes-declarations-definitions.c index f090ff912c4..82a09705250 100644 --- a/tests/syntax/attributes-declarations-definitions.c +++ b/tests/syntax/attributes-declarations-definitions.c @@ -41,3 +41,7 @@ iptr h(volatile iptr ip2) { } iptr volatile h(const iptr ip3); + +void test(void) { + int a, __attribute__((unused)) b; +} diff --git a/tests/syntax/oracle/attributes-declarations-definitions.res.oracle b/tests/syntax/oracle/attributes-declarations-definitions.res.oracle index 89fcae3ec66..57fdf7c1995 100644 --- a/tests/syntax/oracle/attributes-declarations-definitions.res.oracle +++ b/tests/syntax/oracle/attributes-declarations-definitions.res.oracle @@ -42,4 +42,11 @@ iptr h(iptr volatile ip3) return __retres; } +void test(void) +{ + int a; + int b __attribute__((__unused__)); + return; +} + -- GitLab From ef39e882f57028507e8dd7dea6256cc2c9e56e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 15 Mar 2019 15:48:21 +0100 Subject: [PATCH 133/376] [doc] makes doc compiling --- .Makefile.lint | 1 + src/kernel_services/ast_queries/logic_typing.mli | 2 +- src/libraries/stdlib/extlib.mli | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.Makefile.lint b/.Makefile.lint index fc916bfa1e3..aae7e04c6ce 100644 --- a/.Makefile.lint +++ b/.Makefile.lint @@ -357,6 +357,7 @@ ML_LINT_KO+=src/plugins/pdg_types/pdgTypes.mli ML_LINT_KO+=src/plugins/postdominators/compute.ml ML_LINT_KO+=src/plugins/postdominators/postdominators_parameters.ml ML_LINT_KO+=src/plugins/postdominators/print.ml +ML_LINT_KO+=src/plugins/print_api/dynamic_plugins.mli ML_LINT_KO+=src/plugins/print_api/print_interface.ml ML_LINT_KO+=src/plugins/scope/Scope.mli ML_LINT_KO+=src/plugins/scope/datascope.ml diff --git a/src/kernel_services/ast_queries/logic_typing.mli b/src/kernel_services/ast_queries/logic_typing.mli index eed2c7af32c..59d1fc90373 100644 --- a/src/kernel_services/ast_queries/logic_typing.mli +++ b/src/kernel_services/ast_queries/logic_typing.mli @@ -176,7 +176,7 @@ type typing_context = { @since Carbon-20101201 @modify Silicon-20161101 change type of the function - @Frama-C+dev add [status] argument + @modify Frama-C+dev add [status] argument *) val register_behavior_extension: string -> bool -> diff --git a/src/libraries/stdlib/extlib.mli b/src/libraries/stdlib/extlib.mli index 89d1cc38c08..1fdba6ce16d 100644 --- a/src/libraries/stdlib/extlib.mli +++ b/src/libraries/stdlib/extlib.mli @@ -339,7 +339,7 @@ val mkdir : ?parents:bool -> string -> Unix.file_perm -> unit and then fail to create the children, e.g. if [perm] does not allow user execution of the created directory. This will leave the filesystem in a modified state before raising an exception. - @raise [Unix.Unix_error] if cannot create [name] or its parents. + @raise Unix.Unix_error if cannot create [name] or its parents. @since Frama-C+dev *) val safe_at_exit : (unit -> unit) -> unit -- GitLab From da04f80a4f61a541010ebb27aa54b6f9a20e4f99 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Fri, 15 Mar 2019 15:40:04 +0100 Subject: [PATCH 134/376] new algo (more lazy) for fitting detection of C Casts --- src/plugins/wp/MemTyped.ml | 223 +++++++++++++++++++++++-------------- 1 file changed, 137 insertions(+), 86 deletions(-) diff --git a/src/plugins/wp/MemTyped.ml b/src/plugins/wp/MemTyped.ml index 63c759f0498..fef9cc95716 100644 --- a/src/plugins/wp/MemTyped.ml +++ b/src/plugins/wp/MemTyped.ml @@ -503,6 +503,7 @@ let rec size_of_object = function and size_of_typ t = size_of_object (object_of t) and size_of_field f = size_of_typ f.ftype and size_of_comp c = + (* union field are considered as struct field *) List.fold_left (fun s f -> s + size_of_field f) 0 c.cfields @@ -1067,36 +1068,74 @@ module Layout : sig end = struct - type atom = P of typ | I of c_int | F of c_float | U of Cil_types.compinfo + type atom = P of typ | I of c_int | F of c_float let pp_atom fmt = function - | U ci -> Format.fprintf fmt "union %a" Printer.pp_compinfo ci | P ty -> Printer.pp_typ fmt (TPtr(ty,[])) | I i -> Ctypes.pp_int fmt i | F f -> Ctypes.pp_float fmt f - let eqatom a1 a2 = + let eq_atom a1 a2 = match a1 , a2 with | P _ , P _ -> true - | U u1 , U u2 -> Compinfo.equal u1 u2 | I i1 , I i2 -> i1 = i2 | F f1 , F f2 -> f1 = f2 | _ -> false + type slot = A of atom + | S of Cil_types.compinfo (* delayed layout of a C struct *) + | U of Cil_types.compinfo (* delayed layout of a C union *) + + let pp_slot fmt = function + | A a -> pp_atom fmt a + | S s -> Format.fprintf fmt "{struct %a}" Printer.pp_compinfo s + | U u -> Format.fprintf fmt "{union %a}" Printer.pp_compinfo u + + let eq_slot a1 a2 = (* syntactic equality *) + match a1 , a2 with + | A a1 , A a2 -> eq_atom a1 a2 + | S c1 , S c2 | U c1, U c2 -> Compinfo.equal c1 c2 + | _ -> false + + let rec get_slot = function + | C_int i -> A (I i) + | C_float f -> A (F f) + | C_pointer t -> A (P t) + | C_comp ( { cfields = [f] } as c ) -> + begin (* union having only one field is equivalent to a struct *) + match Ctypes.object_of f.ftype with + | C_array _ -> (if c.cstruct then S c else U c) + | cobj -> get_slot cobj + end + | C_comp c -> if c.cstruct then S c else U c + | C_array _ -> assert false + type block = - | Str of atom * int - | Arr of layout * int (* non-homogeneous, more than one *) + | Str of slot * int + | Arr of c_object * int (* delayed layout of a C type *) | Garbled - and layout = block list - - let rec pp_block fmt = function - | Str(a,n) when n=1 -> pp_atom fmt a - | Str(a,n) -> Format.fprintf fmt "%a[%d]" pp_atom a n - | Arr(ly,n) -> Format.fprintf fmt "%a[%d]" pp_layout ly n + let pp_block fmt = function + | Str(a,n) when n=1 -> pp_slot fmt a + | Str(a,n) -> Format.fprintf fmt "%a[%d]" pp_slot a n + | Arr(o,n) -> Format.fprintf fmt "{ctype %a}[%d]" Ctypes.pretty o n | Garbled -> Format.fprintf fmt "..." - and pp_layout fmt = function + let add_slot a n w = + assert (n >= 1) ; + match w with + | Str(b,m) :: w when eq_slot a b -> Str(b,m+n)::w + | _ -> Str(a,n) :: w + + let add_block p w = + match p , w with + | Str(a,n) , Str(b,m)::w when eq_slot a b -> Str(b,n+m)::w + | Garbled , Garbled::_ -> w + | _ -> p :: w + + type layout = block list + + let pp_layout fmt = function | [b] -> pp_block fmt b | bs -> begin @@ -1105,100 +1144,100 @@ struct Format.fprintf fmt " }@]" ; end - let add_atom a ly = - match ly with - | Str(b,m) :: w when eqatom a b -> Str(b,m+1)::w - | _ -> Str(a,1) :: ly - - let add_block p ly = - match p , ly with - | Str(a,n) , Str(b,m)::w when eqatom a b -> Str(b,n+m)::w - | Garbled , Garbled::_ -> ly - | _ -> p :: ly - (* requires n > 1 *) - let add_many ly n w = - match ly with - | [] -> w - | [Str(a,m)] -> add_block (Str(a,n*m)) w - | Garbled::_ -> add_block Garbled w - | ly -> Arr(ly,n) :: w - - let rec rlayout w = function - | C_int i -> add_atom (I i) w - | C_float f -> add_atom (F f) w - | C_pointer t -> add_atom (P t) w - | C_comp { cfields = [f] } -> - flayout w f (* unions containing only one field are - considered as structures *) - | C_comp c -> - if c.cstruct - then List.fold_left flayout w c.cfields - else add_atom (U c) w (* unions with several fields *) + let rec add_many cobj n w = (* returns [layout obj]*n @ [w] *) + assert (n > 1) ; + match cobj, w with + | C_array { arr_flat = Some a }, _ when a.arr_cell_nbr = 1 -> + add_many (Ctypes.object_of a.arr_cell) n w + | C_array _, Arr(o, m)::w when 0 = compare_ptr_conflated o cobj -> Arr(o, m+n)::w + | C_array _, _ -> Arr(cobj, n)::w + | _ -> add_slot (get_slot cobj) n w + + let rec rlayout w = function (* returns [layout obj] @ [w] *) | C_array { arr_flat = Some a } -> - let ly = rlayout [] (Ctypes.object_of a.arr_cell) in + let cobj = Ctypes.object_of a.arr_cell in if a.arr_cell_nbr = 1 - then ly @ w (* ly is in reversed order *) - else add_many (List.rev ly) a.arr_cell_nbr w + then rlayout w cobj + else add_many cobj a.arr_cell_nbr w | C_array { arr_element = e } -> if Wp_parameters.ExternArrays.get () then - let ly = rlayout [] (Ctypes.object_of e) in - add_many (List.rev ly) max_int w + add_many (Ctypes.object_of e) max_int w else add_block Garbled w + | cobj -> add_slot (get_slot cobj) 1 w - and flayout w f = rlayout w (Ctypes.object_of f.ftype) + let layout (obj : c_object) : layout = rlayout [] obj - let layout (obj : c_object) : layout = List.rev (rlayout [] obj) + let clayout (c: Cil_types.compinfo) : layout = + let flayout w f = rlayout w (Ctypes.object_of f.ftype) in + List.fold_left flayout [] (List.rev c.cfields) - let add_compound (c: Cil_types.compinfo) w : layout = - List.fold_left flayout w (List.rev c.cfields) + type comparison = Srem of layout | Drem of layout | Equal | Mismatch - let ulayout (c: Cil_types.compinfo) : layout = add_compound c [] + let add_array o n w = + assert (n > 0) ; + if n=1 then rlayout w o else Arr(o, n)::w - type comparison = Srem of layout | Drem of layout | Equal | Mismatch + let decr_slot a n w = + assert (n >= 1); + if n=1 then w else Str(a, n-1)::w - let add_array ly n w = - if n=1 then ly @ w else add_many ly n w - - let rec equal_atom a b = - (eqatom a b) || - (match a,b with - | U u1, U u2 -> (* for union, the layouts must be equal *) - (match compare ~dst:(ulayout u1) ~src:(ulayout u2) with - | Equal -> true - | _ -> false) - | _, _ -> false) + let rec equal u v = + match compare ~dst:u ~src:v with + | Equal -> true + | _ -> false + and compare_slot ~dst ~src = + match dst, src with + | A a1, A a2 -> if eq_atom a1 a2 then Equal else Mismatch + | S c1, S c2 | U c1, U c2 when Compinfo.equal c1 c2 -> Equal + | S c1, _ -> compare ~dst:(clayout c1) ~src:[Str(src,1)] + | _, S c2 -> compare ~dst:[Str(dst,1)] ~src:(clayout c2) + | U c1, U c2 -> (* for union, the layouts must be equal *) + if equal (clayout c1) (clayout c2) then Equal else Mismatch + | U _, A _ -> Mismatch + | A _, U _ -> Mismatch and compare ~dst ~src = match dst , src with - | [] , [] -> Equal (* src = dst *) - | [] , obj -> Srem obj (* src = dst @ obj *) - | obj , [] -> Drem obj (* dst = src @ obj *) + | [] , [] -> Equal (* src = dst *) + | [] , obj -> Srem obj (* src = dst @ obj *) + | obj , [] -> Drem obj (* dst = src @ obj *) | p::w1 , q::w2 -> match p , q with | Garbled , _ | _ , Garbled -> Mismatch | Str(a,n) , Str(b,m) -> - if equal_atom a b then - if n < m then - let w2 = Str(a,m-n)::w2 in - compare w1 w2 - else if n > m then - let w1 = Str(a,n-m)::w1 in - compare w1 w2 - else - (* n = m *) - compare w1 w2 - else Mismatch + begin + match compare_slot a b with + | Mismatch -> Mismatch + | Drem a'-> + let w1 = a' @ decr_slot a n w1 in + let w2 = decr_slot b m w2 in + compare w1 w2 + | Srem b' -> + let w1 = decr_slot a n w1 in + let w2 = b' @ decr_slot b m w2 in + compare w1 w2 + | Equal -> + if n < m then + let w2 = Str(a,m-n)::w2 in + compare w1 w2 + else if n > m then + let w1 = Str(a,n-m)::w1 in + compare w1 w2 + else + (* n = m *) + compare w1 w2 + end | Arr(u,n) , Arr(v,m) -> begin - match compare ~dst:u ~src:v with + match compare ~dst:(layout u) ~src:(layout v) with | Mismatch -> Mismatch | Drem u' -> let w1 = u' @ add_array u (n-1) w1 in - let w2 = add_array v (m-1) w2 in + let w2 = add_array v (m-1) w2 in compare w1 w2 | Srem v' -> - let w1 = add_array u (n-1) w1 in + let w1 = add_array u (n-1) w1 in let w2 = v' @ add_array v (m-1) w2 in compare w1 w2 | Equal -> @@ -1212,10 +1251,10 @@ struct (* n = m *) compare w1 w2 end - | Arr(v,n) , Str _ -> - compare ~dst:(v @ add_array v (n-1) w1) ~src + | Arr(u,n) , Str _ -> + compare ~dst:((layout u) @ add_array u (n-1) w1) ~src | Str _ , Arr(v,n) -> - compare ~dst ~src:(v @ add_array v (n-1) w2) + compare ~dst ~src:((layout v) @ add_array v (n-1) w2) let rec repeated ~dst ~src = match dst , src with @@ -1226,10 +1265,22 @@ struct match p , q with | Garbled , _ | _ , Garbled -> false | Str(a,n) , Str(b,m) -> (* dst =?= repeated(src,n/m) *) - equal_atom a b && n >= m && (n mod m = 0) + begin + match compare_slot ~dst:a ~src:b with + | Mismatch -> false + | Drem a' -> + let w1 = a' @ decr_slot a n [] in + let w2 = decr_slot b m [] in + let cmp = compare ~dst:w1 ~src:w2 in + repeated_result ~src cmp + | Srem _ -> + false + | Equal -> (* dst =?= repeated(src,n/m) *) + n >= m && (n mod m = 0) + end | Arr(u,n) , Arr(v,m) -> begin - match compare ~dst:u ~src:v with + match compare ~dst:(layout u) ~src:(layout v) with | Mismatch -> false | Drem u' -> let w1 = u' @ add_array u (n-1) [] in -- GitLab From f9e3b09069c3e13214745e095edbb8925a7844a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 15 Mar 2019 18:16:02 +0100 Subject: [PATCH 135/376] [lint] reverting print-dynamic-api --- .Makefile.lint | 1 - 1 file changed, 1 deletion(-) diff --git a/.Makefile.lint b/.Makefile.lint index aae7e04c6ce..fc916bfa1e3 100644 --- a/.Makefile.lint +++ b/.Makefile.lint @@ -357,7 +357,6 @@ ML_LINT_KO+=src/plugins/pdg_types/pdgTypes.mli ML_LINT_KO+=src/plugins/postdominators/compute.ml ML_LINT_KO+=src/plugins/postdominators/postdominators_parameters.ml ML_LINT_KO+=src/plugins/postdominators/print.ml -ML_LINT_KO+=src/plugins/print_api/dynamic_plugins.mli ML_LINT_KO+=src/plugins/print_api/print_interface.ml ML_LINT_KO+=src/plugins/scope/Scope.mli ML_LINT_KO+=src/plugins/scope/datascope.ml -- GitLab From 4cc644822354cf1cd445a639de66d6be6fa5d344 Mon Sep 17 00:00:00 2001 From: Virgile Robles <virgile.robles@protonmail.ch> Date: Mon, 18 Mar 2019 16:04:22 +0100 Subject: [PATCH 136/376] [Cabs2cil] Fix collision of anon comp field names --- src/kernel_internals/typing/cabs2cil.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index 12bb3812be0..b72e5035f82 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -3532,7 +3532,8 @@ let fieldsToInit else if found then found, offset :: loff (* if this field is an anonymous comp, search for the designator inside *) - else if prefix anonCompFieldName f.fname && not found then + else if prefix anonCompFieldName f.fname && not found + && f.forig_name <> f.fname then match unrollType f.ftype with | TComp (comp, _, _) -> add_comp offset comp acc (* go deeper inside *) -- GitLab From 1c9fcfd37531905d9491ffaa3bf555266697c370 Mon Sep 17 00:00:00 2001 From: Virgile Robles <virgile.robles@protonmail.ch> Date: Mon, 18 Mar 2019 20:03:53 +0100 Subject: [PATCH 137/376] Add test for __anonCompField parsing --- tests/syntax/oracle/rename.res.oracle | 4 ++++ tests/syntax/rename.i | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/tests/syntax/oracle/rename.res.oracle b/tests/syntax/oracle/rename.res.oracle index d734d2bfa32..1397bafc86b 100644 --- a/tests/syntax/oracle/rename.res.oracle +++ b/tests/syntax/oracle/rename.res.oracle @@ -1,5 +1,8 @@ [kernel] Parsing tests/syntax/rename.i (no preprocessing) /* Generated by Frama-C */ +struct not_anon { + int __anonCompField1 ; +}; int f(void) { int x = 0; @@ -62,4 +65,5 @@ void f4(int *j_0_1) return; } +struct not_anon s = {.__anonCompField1 = 0}; diff --git a/tests/syntax/rename.i b/tests/syntax/rename.i index d7524ce90d3..201ece88971 100644 --- a/tests/syntax/rename.i +++ b/tests/syntax/rename.i @@ -38,3 +38,9 @@ void f4(int *j_0_1) { { int j_0_1 = j_0; j_0_1+=j_0; } } + +struct not_anon { + int __anonCompField1; +}; + +struct not_anon s = {.__anonCompField1 = 0}; -- GitLab From f26f2622e5a536bec61fbb0244dabdc796711bd6 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Tue, 19 Mar 2019 10:30:31 +0100 Subject: [PATCH 138/376] check non-interference of __anonCompField1 with anonymous field --- tests/syntax/oracle/rename.res.oracle | 9 +++++++++ tests/syntax/rename.i | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/tests/syntax/oracle/rename.res.oracle b/tests/syntax/oracle/rename.res.oracle index 1397bafc86b..52e6869da08 100644 --- a/tests/syntax/oracle/rename.res.oracle +++ b/tests/syntax/oracle/rename.res.oracle @@ -1,8 +1,16 @@ [kernel] Parsing tests/syntax/rename.i (no preprocessing) +[kernel] tests/syntax/rename.i:48: Warning: + unnamed fields are a C11 extension (use -c11 to avoid this warning) /* Generated by Frama-C */ struct not_anon { int __anonCompField1 ; }; +struct __anonstruct_1 { + int inner_i ; +}; +struct anon { + struct __anonstruct_1 __anonCompField1 ; +}; int f(void) { int x = 0; @@ -66,4 +74,5 @@ void f4(int *j_0_1) } struct not_anon s = {.__anonCompField1 = 0}; +struct anon a = {.__anonCompField1 = {.inner_i = 0}}; diff --git a/tests/syntax/rename.i b/tests/syntax/rename.i index 201ece88971..08a549ccc24 100644 --- a/tests/syntax/rename.i +++ b/tests/syntax/rename.i @@ -44,3 +44,9 @@ struct not_anon { }; struct not_anon s = {.__anonCompField1 = 0}; + +struct anon { + struct { int inner_i; }; +}; + +struct anon a = { .inner_i = 0 }; -- GitLab From 61869eecdc52c13b97f22a5aeec799e216d45834 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 11 Mar 2019 19:16:01 +0100 Subject: [PATCH 139/376] [kernel] keep appropriate information about used suffixes in alpha conv tables --- src/kernel_internals/typing/alpha.ml | 5 ++++- src/kernel_internals/typing/cabs2cil.ml | 15 ++++++++++++++- tests/syntax/rename.i | 14 ++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/kernel_internals/typing/alpha.ml b/src/kernel_internals/typing/alpha.ml index fd3269331a1..66f32b2e3e9 100644 --- a/src/kernel_internals/typing/alpha.ml +++ b/src/kernel_internals/typing/alpha.ml @@ -202,11 +202,14 @@ let alphaWorker ~(alphaTable: 'a alphaTable) find_unused_suffix (Integer.succ min) infix infixes suffixes in let newsuffix = make_suffix newmin in + let newinfix = make_full_suffix infix newmin in + Kernel.( + debug ~dkey:dkey_alpha "New suffix: %s" newsuffix); let base = if is_generated_name prefix then prefix else lookupname in H.add - infixes newsuffix + infixes newinfix (ref (Integer.minus_one, [(Integer.minus_one, data)])); (match undolist with | Some l -> l:= AlphaAddedSuffix (prefix,newsuffix)::!l diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index b72e5035f82..31b0267bff2 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -3841,10 +3841,23 @@ let exitScope () = | UndoRemoveFromEnv n :: t -> H.remove env n; loop t | UndoRemoveFromAlphaTable (p,i) :: t -> + Kernel.( + debug ~dkey:dkey_alpha_undo + "Removing %s %s from alpha table\n" p i); (try let h = H.find alphaTable p in H.remove h i; - if H.length h = 0 then H.remove alphaTable p + let l = H.length h in + if l = 0 then begin + H.remove alphaTable p; + Kernel.( + debug ~dkey:dkey_alpha_undo "No suffix for %s anymore" p) + end else begin + Kernel.( + debug ~dkey:dkey_alpha_undo "%d suffixes remaining@\n%t" l + (fun fmt -> + H.iter (fun i _ -> Format.fprintf fmt "%s@ " i) h)) + end with Not_found -> Kernel.warning "prefix (%s,%s) not in alpha conversion table. \ diff --git a/tests/syntax/rename.i b/tests/syntax/rename.i index 08a549ccc24..86a78d54789 100644 --- a/tests/syntax/rename.i +++ b/tests/syntax/rename.i @@ -39,6 +39,20 @@ void f4(int *j_0_1) { j_0_1+=j_0; } } +void f5() { + { int y_0; } + int y_0; +} + +int y_0; + +void f6() { + { int y_2; } + int y_2; +} + +int y_1; + struct not_anon { int __anonCompField1; }; -- GitLab From 7cedf7724bdb67d0ae995638525609918eee5303 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 11 Mar 2019 19:18:41 +0100 Subject: [PATCH 140/376] [kernel] limit the suffix's length when uniquifying variables names --- src/kernel_services/ast_queries/cil.ml | 4 +++- tests/syntax/oracle/rename.res.oracle | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/kernel_services/ast_queries/cil.ml b/src/kernel_services/ast_queries/cil.ml index c5e01b7134d..6ce13b9bca6 100644 --- a/src/kernel_services/ast_queries/cil.ml +++ b/src/kernel_services/ast_queries/cil.ml @@ -7444,7 +7444,9 @@ let isCompleteType ?allowZeroSizeArrays t = let undolist = ref [] in (* Process one local variable *) let processLocal (v: varinfo) = - let lookupname = v.vname in + (* start from original name to avoid putting another _0 in case + of conflicts. *) + let lookupname = v.vorig_name in let data = CurrentLoc.get () in let newname, oldloc = Alpha.newAlphaName diff --git a/tests/syntax/oracle/rename.res.oracle b/tests/syntax/oracle/rename.res.oracle index 52e6869da08..a672348b232 100644 --- a/tests/syntax/oracle/rename.res.oracle +++ b/tests/syntax/oracle/rename.res.oracle @@ -73,6 +73,23 @@ void f4(int *j_0_1) return; } +void f5(void) +{ + int y_0_1; + int y_0_0; + return; +} + +int y_0; +void f6(void) +{ + int y_2_0; + int y_2; + return; +} + +int y_1; + struct not_anon s = {.__anonCompField1 = 0}; struct anon a = {.__anonCompField1 = {.inner_i = 0}}; -- GitLab From 77f98be30e5e64ec26c2f28d427944274e1b9955 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 11 Mar 2019 19:34:05 +0100 Subject: [PATCH 141/376] [tests] update oracles --- tests/spec/oracle/array_typedef.res.oracle | 16 ++++++++-------- tests/spec/oracle/sizeof_logic.res.oracle | 2 +- ...ributes-declarations-definitions.res.oracle | 18 +++++++++--------- tests/syntax/oracle/bts0588.res.oracle | 6 +++--- .../typedef_namespace_bts1500.0.res.oracle | 4 ++-- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tests/spec/oracle/array_typedef.res.oracle b/tests/spec/oracle/array_typedef.res.oracle index f70e7649412..51da3e81b84 100644 --- a/tests/spec/oracle/array_typedef.res.oracle +++ b/tests/spec/oracle/array_typedef.res.oracle @@ -73,9 +73,9 @@ typedef struct __anonstruct_msg_1 msg; /*@ assigns \empty; */ void send_addr(int const * /*[4]*/ addr); -void send_msg(msg const *msg_0) +void send_msg(msg const *msg) { - send_addr(msg_0->src); + send_addr(msg->src); return; } @@ -89,13 +89,13 @@ void host_address(int * /*[4]*/ ip) return; } -void create_msg(msg *msg_0) +void create_msg(msg *msg) { - host_address(msg_0->src); - host_address(msg_0->dst); - /*@ assert msg_0->dst[0] ≡ 192; */ ; - /*@ assert msg_0->src[0] ≡ 192; */ ; - /*@ assert msg_0->dst[sizeof(ip_address) / sizeof(int) - 1] ≡ 101; */ ; + host_address(msg->src); + host_address(msg->dst); + /*@ assert msg->dst[0] ≡ 192; */ ; + /*@ assert msg->src[0] ≡ 192; */ ; + /*@ assert msg->dst[sizeof(ip_address) / sizeof(int) - 1] ≡ 101; */ ; return; } diff --git a/tests/spec/oracle/sizeof_logic.res.oracle b/tests/spec/oracle/sizeof_logic.res.oracle index 0bc5ea119a7..a5f76a76a31 100644 --- a/tests/spec/oracle/sizeof_logic.res.oracle +++ b/tests/spec/oracle/sizeof_logic.res.oracle @@ -10,7 +10,7 @@ struct S { /*@ lemma good: ∀ short x; sizeof(x) ≤ sizeof(int); */ /*@ ensures \result ≡ sizeof(struct S volatile); */ -int f(int a_0) +int f(int a) { int __retres; __retres = (int)sizeof(struct S volatile); diff --git a/tests/syntax/oracle/attributes-declarations-definitions.res.oracle b/tests/syntax/oracle/attributes-declarations-definitions.res.oracle index 57fdf7c1995..40ab5bd3e4c 100644 --- a/tests/syntax/oracle/attributes-declarations-definitions.res.oracle +++ b/tests/syntax/oracle/attributes-declarations-definitions.res.oracle @@ -7,20 +7,20 @@ typedef int __attribute__((__a1__)) aint; typedef int __attribute__((__p1__)) * __attribute__((__p2__)) iptr; int __attribute__((__tret5__, __tret4__, __tret3__, __tret2__, __tret1__)) f( -int const __attribute__((__arg3__)) p4) __attribute__((__f5__, __f4__, +int const __attribute__((__arg3__)) p3) __attribute__((__f5__, __f4__, __f2__, __f1__)); -/*@ requires p4 ≥ 3; - requires p4 ≥ 1; - requires p4 ≥ 4; */ +/*@ requires p3 ≥ 3; + requires p3 ≥ 1; + requires p3 ≥ 4; */ int __attribute__((__tret5__, __tret4__, __tret3__, __tret2__, __tret1__)) f( -int const __attribute__((__arg3__)) p4) __attribute__((__f5__, __f4__, +int const __attribute__((__arg3__)) p3) __attribute__((__f5__, __f4__, __f2__, __f1__)); int __attribute__((__tret5__, __tret4__, __tret3__, __tret2__, __tret1__)) f( -int const __attribute__((__arg3__)) p4) +int const __attribute__((__arg3__)) p3) { int __attribute__((__tret5__, __tret4__, __tret3__, __tret2__, __tret1__)) __retres; - __retres = (int __attribute__((__tret3__, __tret2__, __tret1__)))p4; + __retres = (int __attribute__((__tret3__, __tret2__, __tret1__)))p3; return __retres; } @@ -33,9 +33,9 @@ aint g(int __attribute__((__a2__)) i3) return __retres; } -iptr h(iptr volatile ip3); +iptr h(iptr volatile ip2); -iptr h(iptr volatile ip3) +iptr h(iptr volatile ip2) { iptr __retres; __retres = (int __attribute__((__p1__)) *)0; diff --git a/tests/syntax/oracle/bts0588.res.oracle b/tests/syntax/oracle/bts0588.res.oracle index 97469051425..1bb974c5380 100644 --- a/tests/syntax/oracle/bts0588.res.oracle +++ b/tests/syntax/oracle/bts0588.res.oracle @@ -8,10 +8,10 @@ void g(int a) return; } -/*@ ensures \old(x) > 0; */ -void f(int x) +/*@ ensures \old(a) > 0; */ +void f(int a) { - x = 1; + a = 1; return; } diff --git a/tests/syntax/oracle/typedef_namespace_bts1500.0.res.oracle b/tests/syntax/oracle/typedef_namespace_bts1500.0.res.oracle index dac79fa8c28..d1362720e34 100644 --- a/tests/syntax/oracle/typedef_namespace_bts1500.0.res.oracle +++ b/tests/syntax/oracle/typedef_namespace_bts1500.0.res.oracle @@ -9,8 +9,8 @@ int main(void) { int __retres; digit x = 4; - int digit_0 = 3; - __retres = (x + digit_0) + A; + int digit = 3; + __retres = (x + digit) + A; return __retres; } -- GitLab From f08d858149ce3944a909313907e2ea23f9bc6557 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 11 Mar 2019 20:04:13 +0100 Subject: [PATCH 142/376] [tests] add test for initial renaming problem --- tests/syntax/rename.i | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/syntax/rename.i b/tests/syntax/rename.i index 86a78d54789..053c6546f77 100644 --- a/tests/syntax/rename.i +++ b/tests/syntax/rename.i @@ -53,6 +53,13 @@ void f6() { int y_1; +void f7() { + { int __constr_expr_1 = 0; } + int __constr_expr_1 = 0; +} + +int __constr_expr_0 = 0; + struct not_anon { int __anonCompField1; }; -- GitLab From f509a756ac4075f60162c83e8b2f5e25c751f93c Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 14 Mar 2019 14:20:55 +0100 Subject: [PATCH 143/376] [typing] Refactor handling of alpha conversion Do not use two distinct undo stacks for taking care of which symbols are in use at a given program point. Let `Alpha` manages everything internally. --- src/kernel_internals/typing/cabs2cil.ml | 68 +++++++------------------ tests/syntax/oracle/rename.res.oracle | 11 +++- 2 files changed, 27 insertions(+), 52 deletions(-) diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index 31b0267bff2..a66624a0fd6 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -867,9 +867,7 @@ let remove_label_env lab = * hash table easily *) type undoScope = UndoRemoveFromEnv of string - | UndoResetAlphaCounter of location Alpha.alphaTableData ref * - location Alpha.alphaTableData - | UndoRemoveFromAlphaTable of string * string + | UndoAlphaEnv of location Alpha.undoAlphaElement list let scopes : undoScope list ref list ref = ref [] @@ -881,14 +879,10 @@ let declared_in_current_scope s = | cur_scope :: _ -> let names_declared_in_current_scope = Extlib.filter_map - (fun us -> - match us with - | UndoRemoveFromEnv _ | UndoRemoveFromAlphaTable _ -> true - | UndoResetAlphaCounter _ -> false) - (fun us -> - match us with - | UndoRemoveFromEnv s | UndoRemoveFromAlphaTable (s,_) -> s - | UndoResetAlphaCounter _ -> assert false (* already filtered *) + (function UndoRemoveFromEnv _ -> true | UndoAlphaEnv _ -> false) + (function + | UndoRemoveFromEnv s -> s + | UndoAlphaEnv _ -> assert false (* already filtered *) ) !cur_scope in List.mem s names_declared_in_current_scope @@ -973,29 +967,24 @@ let newAlphaName (globalscope: bool) (* The name should have global scope *) * the top-most scope (that of the enclosing function) *) let rec findEnclosingFun = function [] -> (* At global scope *) None - | [s] -> begin - let prefix, infix = Alpha.getAlphaPrefix lookupname in - try - let infixes = H.find alphaTable prefix in - let countref = H.find infixes infix in - s := (UndoResetAlphaCounter (countref, !countref)) :: !s; Some s - with Not_found -> - s := (UndoRemoveFromAlphaTable (prefix, infix)) :: !s; Some s; - end + | [s] -> Some s | _ :: rest -> findEnclosingFun rest in let undo_scope = if not globalscope then findEnclosingFun !scopes else None in + let undolist = + match undo_scope with None -> None | Some _ -> Some (ref []) + in + let data = CurrentLoc.get () in let newname, oldloc = - Alpha.newAlphaName alphaTable lookupname (CurrentLoc.get ()) + Alpha.newAlphaName ~alphaTable ?undolist ~lookupname ~data in + (match undo_scope, undolist with + | None, None -> () + | Some s, Some l -> s := (UndoAlphaEnv !l) :: !s + | _ -> assert false (* by construction, both options have the same status*)); if newname <> lookupname then begin - (match undo_scope with - | None -> () - | Some s -> - let newpre, newinf = Alpha.getAlphaPrefix newname in - s := (UndoRemoveFromAlphaTable (newpre, newinf)) :: !s); try let info = if !scopes = [] then begin @@ -3840,31 +3829,8 @@ let exitScope () = [] -> () | UndoRemoveFromEnv n :: t -> H.remove env n; loop t - | UndoRemoveFromAlphaTable (p,i) :: t -> - Kernel.( - debug ~dkey:dkey_alpha_undo - "Removing %s %s from alpha table\n" p i); - (try - let h = H.find alphaTable p in - H.remove h i; - let l = H.length h in - if l = 0 then begin - H.remove alphaTable p; - Kernel.( - debug ~dkey:dkey_alpha_undo "No suffix for %s anymore" p) - end else begin - Kernel.( - debug ~dkey:dkey_alpha_undo "%d suffixes remaining@\n%t" l - (fun fmt -> - H.iter (fun i _ -> Format.fprintf fmt "%s@ " i) h)) - end - with Not_found -> - Kernel.warning - "prefix (%s,%s) not in alpha conversion table. \ - undo stack is inconsistent" - p i); loop t - | UndoResetAlphaCounter (vref, oldv) :: t -> - vref := oldv; + | UndoAlphaEnv undolist :: t -> + Alpha.undoAlphaChanges ~alphaTable ~undolist; loop t in loop !this; diff --git a/tests/syntax/oracle/rename.res.oracle b/tests/syntax/oracle/rename.res.oracle index a672348b232..3014a97f930 100644 --- a/tests/syntax/oracle/rename.res.oracle +++ b/tests/syntax/oracle/rename.res.oracle @@ -1,5 +1,5 @@ [kernel] Parsing tests/syntax/rename.i (no preprocessing) -[kernel] tests/syntax/rename.i:48: Warning: +[kernel] tests/syntax/rename.i:69: Warning: unnamed fields are a C11 extension (use -c11 to avoid this warning) /* Generated by Frama-C */ struct not_anon { @@ -89,7 +89,16 @@ void f6(void) } int y_1; +void f7(void) +{ + { + int __constr_expr_1 = 0; + } + int __constr_expr_2 = 0; + return; +} +int __constr_expr_0 = 0; struct not_anon s = {.__anonCompField1 = 0}; struct anon a = {.__anonCompField1 = {.inner_i = 0}}; -- GitLab From a8262ca9dec2e8b240ef6479c7b275ea2860744e Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 14 Mar 2019 14:32:58 +0100 Subject: [PATCH 144/376] [lint] converting Alpha module --- .Makefile.lint | 2 - src/kernel_internals/typing/alpha.ml | 195 +++++++++++++------------- src/kernel_internals/typing/alpha.mli | 50 +++---- 3 files changed, 122 insertions(+), 125 deletions(-) diff --git a/.Makefile.lint b/.Makefile.lint index fc916bfa1e3..c74c7c5be98 100644 --- a/.Makefile.lint +++ b/.Makefile.lint @@ -11,8 +11,6 @@ ML_LINT_KO+=src/kernel_internals/runtime/messages.ml ML_LINT_KO+=src/kernel_internals/runtime/messages.mli ML_LINT_KO+=src/kernel_internals/runtime/special_hooks.ml ML_LINT_KO+=src/kernel_internals/typing/allocates.ml -ML_LINT_KO+=src/kernel_internals/typing/alpha.ml -ML_LINT_KO+=src/kernel_internals/typing/alpha.mli ML_LINT_KO+=src/kernel_internals/typing/asm_contracts.ml ML_LINT_KO+=src/kernel_internals/typing/cfg.ml ML_LINT_KO+=src/kernel_internals/typing/cfg.mli diff --git a/src/kernel_internals/typing/alpha.ml b/src/kernel_internals/typing/alpha.ml index 66f32b2e3e9..727d2c77733 100644 --- a/src/kernel_internals/typing/alpha.ml +++ b/src/kernel_internals/typing/alpha.ml @@ -47,16 +47,16 @@ module H = Hashtbl let alphaSeparator = '_' (** For each prefix we remember the last integer suffix that has been used - (to start searching for a fresh name) and the list - * of suffixes, each with some data associated with the newAlphaName that + (to start searching for a fresh name) and the list + * of suffixes, each with some data associated with the newAlphaName that * created the suffix. *) type 'a alphaTableData = Integer.t * (Integer.t * 'a) list -type 'a undoAlphaElement = - AlphaChangedSuffix of 'a alphaTableData ref * 'a alphaTableData (* The - * reference that was changed and - * the old suffix *) - | AlphaAddedSuffix of string * string (* We added this new entry to the +type 'a undoAlphaElement = + AlphaChangedSuffix of 'a alphaTableData ref * 'a alphaTableData (* The + * reference that was changed and + * the old suffix *) + | AlphaAddedSuffix of string * string (* We added this new entry to the * table *) type 'a alphaTable = (string, (string, 'a alphaTableData ref) H.t) H.t @@ -64,11 +64,11 @@ type 'a alphaTable = (string, (string, 'a alphaTableData ref) H.t) H.t (* specify a behavior for renaming *) type rename_mode = | Incr_last_suffix - (* increment the last suffix in the original id - (adding _nnn if no suffix exists in the original id) *) + (* increment the last suffix in the original id + (adding _nnn if no suffix exists in the original id) *) | Add_new_suffix - (* systematically adds a _nnn suffix even if the original name - ends with _mmm *) + (* systematically adds a _nnn suffix even if the original name + ends with _mmm *) let has_generated_prefix n prefix = let prefix_length = String.length prefix in @@ -79,39 +79,39 @@ let has_generated_prefix n prefix = end else n in String.length real_name >= prefix_length && - String.sub real_name 0 prefix_length = prefix + String.sub real_name 0 prefix_length = prefix let generated_prefixes = [ "__anon"; "__constr_expr" ] let is_generated_name n = List.exists (has_generated_prefix n) generated_prefixes -(* Strip the suffix. Return the prefix, the suffix (including the separator - * but not the numeric value, possibly empty), and the - * numeric value of the suffix (possibly -1 if missing) *) -let splitNameForAlpha ~(lookupname: string) = +(* Strip the suffix. Return the prefix, the suffix (including the separator + * but not the numeric value, possibly empty), and the + * numeric value of the suffix (possibly -1 if missing) *) +let splitNameForAlpha ~(lookupname: string) = let len = String.length lookupname in - (* Search backward for the numeric suffix. Return the first digit of the + (* Search backward for the numeric suffix. Return the first digit of the * suffix. Returns len if no numeric suffix *) let rec skipSuffix seen_sep last_sep (i: int) = if i = -1 then last_sep else - let c = lookupname.[i] in - (* we might start to use Str at some point. *) - if (Char.compare '0' c <= 0 && Char.compare c '9' <= 0) then - skipSuffix false last_sep (i - 1) - else if c = alphaSeparator then - if not seen_sep then - (* check whether we are in the middle of a multi-suffix ident - e.g. x_0_2, where the prefix would be x. *) - skipSuffix true i (i-1) - else (* we have something like x__0. Consider x_ as the prefix. *) - i+1 - else (* we have something like x1234_0. Consider x1234 as the prefix *) - last_sep + let c = lookupname.[i] in + (* we might start to use Str at some point. *) + if (Char.compare '0' c <= 0 && Char.compare c '9' <= 0) then + skipSuffix false last_sep (i - 1) + else if c = alphaSeparator then + if not seen_sep then + (* check whether we are in the middle of a multi-suffix ident + e.g. x_0_2, where the prefix would be x. *) + skipSuffix true i (i-1) + else (* we have something like x__0. Consider x_ as the prefix. *) + i+1 + else (* we have something like x1234_0. Consider x1234 as the prefix *) + last_sep in (* we start as if the next char of the identifier was _, so that x123_ is seen as a prefix. - *) + *) let startSuffix = skipSuffix true len (len - 1) in if startSuffix >= len then @@ -129,11 +129,11 @@ let make_full_suffix infix n = infix ^ make_suffix n elements of l are less than or equal to max. returns the new suffix and a new bound to max in case the new suffix is greater than max. - *) +*) let find_unused_suffix min infix sibling l = let rec aux v = if List.exists (fun (n,_) -> Integer.equal n v) l - || H.mem sibling (make_full_suffix infix v) + || H.mem sibling (make_full_suffix infix v) then begin Kernel.debug ~dkey:Kernel.dkey_alpha "%s is already taken" (make_full_suffix infix v); @@ -143,27 +143,27 @@ let find_unused_suffix min infix sibling l = let get_suffix_idx rename_mode infix = match rename_mode with - | Add_new_suffix -> infix, Integer.minus_one - | Incr_last_suffix when infix = "" -> infix, Integer.minus_one - | Incr_last_suffix -> - (* by construction there is at least one alphaSeparator in the infix *) - let idx = String.rindex infix alphaSeparator in - String.sub infix 0 idx, - Integer.of_string - (String.sub infix (idx + 1) (String.length infix - idx - 1)) + | Add_new_suffix -> infix, Integer.minus_one + | Incr_last_suffix when infix = "" -> infix, Integer.minus_one + | Incr_last_suffix -> + (* by construction there is at least one alphaSeparator in the infix *) + let idx = String.rindex infix alphaSeparator in + String.sub infix 0 idx, + Integer.of_string + (String.sub infix (idx + 1) (String.length infix - idx - 1)) -(* Create a new name based on a given name. The new name is formed from a - * prefix (obtained from the given name by stripping a suffix consisting of - * the alphaSeparator followed by only digits), followed by alphaSeparator - * and then by a positive integer suffix. The first argument is a table - * mapping name prefixes to the largest suffix used so far for that - * prefix. The largest suffix is one when only the version without suffix has +(* Create a new name based on a given name. The new name is formed from a + * prefix (obtained from the given name by stripping a suffix consisting of + * the alphaSeparator followed by only digits), followed by alphaSeparator + * and then by a positive integer suffix. The first argument is a table + * mapping name prefixes to the largest suffix used so far for that + * prefix. The largest suffix is one when only the version without suffix has * been used. *) let alphaWorker ~(alphaTable: 'a alphaTable) - ?undolist - ~(lookupname: string) ~(data:'a) - (make_new: bool) : string * 'a = + ?undolist + ~(lookupname: string) ~(data:'a) + (make_new: bool) : string * 'a = let prefix, infix = splitNameForAlpha ~lookupname in let rename_mode = if is_generated_name prefix then Incr_last_suffix else Add_new_suffix @@ -179,66 +179,66 @@ let alphaWorker ~(alphaTable: 'a alphaTable) let min, suffixes = !rc in (* We have seen this prefix *) Kernel.debug ~dkey:Kernel.dkey_alpha "Old min %s. Old suffixes: @[%a@]" - (Integer.to_string min) + (Integer.to_string min) (Pretty_utils.pp_list (fun fmt (s,_) -> Format.fprintf fmt "%s" (Integer.to_string s))) suffixes; (* Save the undo info *) (match undolist with - Some l -> l := AlphaChangedSuffix (rc, !rc) :: !l - | _ -> ()); + Some l -> l := AlphaChangedSuffix (rc, !rc) :: !l + | _ -> ()); let newname, newmin, (olddata: 'a), newsuffixes = match List.filter (fun (n, _) -> Integer.equal n curr_idx) suffixes with - | [] -> (* never seen this index before *) - lookupname, min, data, (curr_idx, data) :: suffixes - | [(_, l) ] -> - (* We have seen this exact suffix before *) - (* In Incr_last_suffix mode, we do not take curr_idx into account, - but select the first available index available *) - if make_new then begin - let newmin = - find_unused_suffix (Integer.succ min) infix infixes suffixes - in - let newsuffix = make_suffix newmin in - let newinfix = make_full_suffix infix newmin in - Kernel.( - debug ~dkey:dkey_alpha "New suffix: %s" newsuffix); - let base = - if is_generated_name prefix then prefix else lookupname - in - H.add - infixes newinfix - (ref (Integer.minus_one, [(Integer.minus_one, data)])); - (match undolist with - | Some l -> l:= AlphaAddedSuffix (prefix,newsuffix)::!l - | None -> ()); - base ^ newsuffix, newmin, l, (newmin, data) :: suffixes - end else lookupname, min, data, suffixes - | _ -> (Kernel.fatal "Cil.alphaWorker") + | [] -> (* never seen this index before *) + lookupname, min, data, (curr_idx, data) :: suffixes + | [(_, l) ] -> + (* We have seen this exact suffix before *) + (* In Incr_last_suffix mode, we do not take curr_idx into account, + but select the first available index available *) + if make_new then begin + let newmin = + find_unused_suffix (Integer.succ min) infix infixes suffixes + in + let newsuffix = make_suffix newmin in + let newinfix = make_full_suffix infix newmin in + Kernel.( + debug ~dkey:dkey_alpha "New suffix: %s" newsuffix); + let base = + if is_generated_name prefix then prefix else lookupname + in + H.add + infixes newinfix + (ref (Integer.minus_one, [(Integer.minus_one, data)])); + (match undolist with + | Some l -> l:= AlphaAddedSuffix (prefix,newsuffix)::!l + | None -> ()); + base ^ newsuffix, newmin, l, (newmin, data) :: suffixes + end else lookupname, min, data, suffixes + | _ -> (Kernel.fatal "Cil.alphaWorker") in rc := (newmin, newsuffixes); newname, olddata with Not_found -> begin (* First variable with this prefix *) - (match undolist with - Some l -> l := AlphaAddedSuffix (prefix,infix) :: !l - | _ -> ()); - let infixes = - try H.find alphaTable prefix - with Not_found -> - let h = H.create 3 in H.add alphaTable prefix h; h - in - H.add infixes infix - (ref (Integer.minus_one, [ (curr_idx, data) ])); - Kernel.debug ~dkey:Kernel.dkey_alpha " First seen. "; - lookupname, data (* Return the original name *) - end + (match undolist with + Some l -> l := AlphaAddedSuffix (prefix,infix) :: !l + | _ -> ()); + let infixes = + try H.find alphaTable prefix + with Not_found -> + let h = H.create 3 in H.add alphaTable prefix h; h + in + H.add infixes infix + (ref (Integer.minus_one, [ (curr_idx, data) ])); + Kernel.debug ~dkey:Kernel.dkey_alpha " First seen. "; + lookupname, data (* Return the original name *) + end in Kernel.debug ~dkey:Kernel.dkey_alpha "Res=: %s" newname; newname, olddata - + let newAlphaName ~alphaTable ?undolist ~lookupname ~data = alphaWorker ~alphaTable ?undolist ~lookupname ~data true @@ -249,11 +249,11 @@ let registerAlphaName ~alphaTable ?undolist ~lookupname ~data = let getAlphaPrefix ~lookupname = splitNameForAlpha ~lookupname (* Undoes the changes as specified by the undolist *) -let undoAlphaChanges ~alphaTable ~undolist = +let undoAlphaChanges ~alphaTable ~undolist = List.iter - (function - AlphaChangedSuffix (where, old) -> - where := old + (function + AlphaChangedSuffix (where, old) -> + where := old | AlphaAddedSuffix (prefix, infix) -> Kernel.debug ~dkey:Kernel.dkey_alpha_undo "Removing %s%s from alpha table\n" prefix infix; @@ -266,4 +266,3 @@ let undoAlphaChanges ~alphaTable ~undolist = "prefix %s has no entry in the table. Inconsistent undo list" prefix) undolist - diff --git a/src/kernel_internals/typing/alpha.mli b/src/kernel_internals/typing/alpha.mli index 852b6791ab4..9101266f418 100644 --- a/src/kernel_internals/typing/alpha.mli +++ b/src/kernel_internals/typing/alpha.mli @@ -43,52 +43,52 @@ (** Alpha conversion. *) -(** This is the type of the elements that are recorded by the alpha - * conversion functions in order to be able to undo changes to the tables - * they modify. Useful for implementing +(** This is the type of the elements that are recorded by the alpha + * conversion functions in order to be able to undo changes to the tables + * they modify. Useful for implementing * scoping *) type 'a undoAlphaElement -(** This is the type of the elements of the alpha renaming table. These +(** This is the type of the elements of the alpha renaming table. These * elements can carry some data associated with each occurrence of the name. *) type 'a alphaTableData (** type for alpha conversion table. We split the lookup in two to avoid creating accidental collisions when converting x_0 into x_0_0 if the original code contains both. *) -type 'a alphaTable = +type 'a alphaTable = (string, (string, 'a alphaTableData ref) Hashtbl.t) Hashtbl.t -(** Create a new name based on a given name. The new name is formed from a - * prefix (obtained from the given name by stripping a suffix consisting of _ - * followed by only digits), followed by a special separator and then by a - * positive integer suffix. The first argument is a table mapping name - * prefixes to some data that specifies what suffixes have been used and how - * to create the new one. This function updates the table with the new - * largest suffix generated. The "undolist" argument, when present, will be - * used by the function to record information that can be used by - * {!Alpha.undoAlphaChanges} to undo those changes. Note that the undo - * information will be in reverse order in which the action occurred. Returns - * the new name and, if different from the lookupname, the location of the - * previous occurrence. This function knows about the location implicitly +(** Create a new name based on a given name. The new name is formed from a + * prefix (obtained from the given name by stripping a suffix consisting of _ + * followed by only digits), followed by a special separator and then by a + * positive integer suffix. The first argument is a table mapping name + * prefixes to some data that specifies what suffixes have been used and how + * to create the new one. This function updates the table with the new + * largest suffix generated. The "undolist" argument, when present, will be + * used by the function to record information that can be used by + * {!Alpha.undoAlphaChanges} to undo those changes. Note that the undo + * information will be in reverse order in which the action occurred. Returns + * the new name and, if different from the lookupname, the location of the + * previous occurrence. This function knows about the location implicitly * from the [(Cil.CurrentLoc.get ())]. *) val newAlphaName: alphaTable: 'a alphaTable -> - ?undolist: 'a undoAlphaElement list ref -> - lookupname:string -> data:'a -> string * 'a + ?undolist: 'a undoAlphaElement list ref -> + lookupname:string -> data:'a -> string * 'a -(** Register a name with an alpha conversion table to ensure that when later +(** Register a name with an alpha conversion table to ensure that when later * we call newAlphaName we do not end up generating this one *) val registerAlphaName: alphaTable: 'a alphaTable -> - ?undolist: 'a undoAlphaElement list ref -> - lookupname:string -> data:'a -> unit + ?undolist: 'a undoAlphaElement list ref -> + lookupname:string -> data:'a -> unit -(** Split the name in preparation for newAlphaName. Returns a pair +(** Split the name in preparation for newAlphaName. Returns a pair [(prefix, infix)] where [prefix] is the index in the outer table, while infix is the index in the inner table. *) val getAlphaPrefix: lookupname:string -> string * string (** Undo the changes to a table *) -val undoAlphaChanges: alphaTable:'a alphaTable -> - undolist:'a undoAlphaElement list -> unit +val undoAlphaChanges: alphaTable:'a alphaTable -> + undolist:'a undoAlphaElement list -> unit -- GitLab From 423b8c8a9483351d53ee17d5fa8e7c2225cd2cda Mon Sep 17 00:00:00 2001 From: Valentin Perrelle <valentin.perrelle@cea.fr> Date: Mon, 18 Mar 2019 18:21:42 +0100 Subject: [PATCH 145/376] [fcscript] Add a script to monitor and summarize multiple analyses --- Makefile | 18 +- bin/frama-c-script | 9 + headers/header_spec.txt | 9 +- share/analysis-scripts/benchmark_database.py | 177 +++++++++++++ share/analysis-scripts/clone.sh | 91 +++++++ share/analysis-scripts/find_fun.py | 2 +- share/analysis-scripts/frama_c_results.py | 73 ++++++ share/analysis-scripts/git_utils.py | 59 +++++ share/analysis-scripts/list_files.py | 2 +- share/analysis-scripts/results_display.py | 255 +++++++++++++++++++ share/analysis-scripts/summary.py | 219 ++++++++++++++++ 11 files changed, 906 insertions(+), 8 deletions(-) create mode 100644 share/analysis-scripts/benchmark_database.py create mode 100755 share/analysis-scripts/clone.sh create mode 100644 share/analysis-scripts/frama_c_results.py create mode 100644 share/analysis-scripts/git_utils.py create mode 100644 share/analysis-scripts/results_display.py create mode 100755 share/analysis-scripts/summary.py diff --git a/Makefile b/Makefile index d007948e544..c451aa21fec 100644 --- a/Makefile +++ b/Makefile @@ -251,16 +251,21 @@ DISTRIB_FILES:=\ Changelog config.h.in \ VERSION VERSION_CODENAME $(wildcard licenses/*) \ $(LIBC_FILES) \ + share/analysis-scripts/benchmark_database.py \ share/analysis-scripts/cmd-dep.sh \ share/analysis-scripts/concat-csv.sh \ + share/analysis-scripts/clone.sh \ $(wildcard share/analysis-scripts/examples/*) \ share/analysis-scripts/find_fun.py \ share/analysis-scripts/flamegraph.pl \ share/analysis-scripts/frama-c.mk \ + share/analysis-scripts/frama_c_results.py \ + share/analysis-scripts/git_utils.py \ share/analysis-scripts/list_files.py \ share/analysis-scripts/parse-coverage.sh \ - share/analysis-scripts/summary.sh \ share/analysis-scripts/README.md \ + share/analysis-scripts/results_display.py \ + share/analysis-scripts/summary.py \ share/analysis-scripts/template.mk \ $(wildcard share/emacs/*.el) share/autocomplete_frama-c \ share/_frama-c \ @@ -1898,15 +1903,20 @@ install:: install-lib share/configure.ac share/autocomplete_frama-c share/_frama-c \ $(FRAMAC_DATADIR) $(MKDIR) $(FRAMAC_DATADIR)/analysis-scripts - $(CP) share/analysis-scripts/cmd-dep.sh \ + $(CP) share/analysis-scripts/benchmark_database.py \ + share/analysis-scripts/cmd-dep.sh \ share/analysis-scripts/concat-csv.sh \ + share/analysis-scripts/clone.sh \ share/analysis-scripts/find_fun.py \ share/analysis-scripts/flamegraph.pl \ share/analysis-scripts/frama-c.mk \ + share/analysis-scripts/frama_c_results.py \ + share/analysis-scripts/git_utils.py \ + share/analysis-scripts/list_files.py \ share/analysis-scripts/parse-coverage.sh \ share/analysis-scripts/README.md \ - share/analysis-scripts/list_files.py \ - share/analysis-scripts/summary.sh \ + share/analysis-scripts/results_display.py \ + share/analysis-scripts/summary.py \ share/analysis-scripts/template.mk \ $(FRAMAC_DATADIR)/analysis-scripts $(MKDIR) $(FRAMAC_DATADIR)/analysis-scripts/examples diff --git a/bin/frama-c-script b/bin/frama-c-script index b46c6944edc..b797957eeb5 100755 --- a/bin/frama-c-script +++ b/bin/frama-c-script @@ -54,6 +54,11 @@ if [ $# -lt 1 ]; then echo " Lists files in [dirs] declaring or defining <function-name>" echo " (defaults to PWD + /usr/include)." echo " Heuristics-based: neither correct nor complete." + echo "" + echo " - summary [options]" + echo " Monitors and summarizes multiple analyses dispatched by a Makefile" + echo " in the current PWD." + echo " Use $0 summary --help for more informations." exit fi @@ -201,6 +206,10 @@ case "$command" in shift; flamegraph "$@"; ;; + "summary") + shift; + ${FRAMAC_SHARE}/analysis-scripts/summary.py "$@"; + ;; *) echo "error: unrecognized command: $command" esac diff --git a/headers/header_spec.txt b/headers/header_spec.txt index 5666f1680d5..5960673ee93 100644 --- a/headers/header_spec.txt +++ b/headers/header_spec.txt @@ -113,8 +113,10 @@ ptests/.gitignore: .ignore ptests/.merlin: .ignore ptests/ptests.ml: CEA_LGPL share/_frama-c: CEA_LGPL +share/analysis-scripts/benchmark_database.py: .ignore +share/analysis-scripts/clone.sh: .ignore share/analysis-scripts/frama-c.mk: CEA_LGPL -share/analysis-scripts/README.md: .ignore +share/analysis-scripts/frama_c_results.py: .ignore share/analysis-scripts/cmd-dep.sh: .ignore share/analysis-scripts/concat-csv.sh: .ignore share/analysis-scripts/examples/example.c: .ignore @@ -124,9 +126,12 @@ share/analysis-scripts/examples/example-slevel.mk: .ignore share/analysis-scripts/examples/Makefile: .ignore share/analysis-scripts/find_fun.py: .ignore share/analysis-scripts/flamegraph.pl: CDDL +share/analysis-scripts/git_utils.py: .ignore share/analysis-scripts/list_files.py: .ignore share/analysis-scripts/parse-coverage.sh: .ignore -share/analysis-scripts/summary.sh: .ignore +share/analysis-scripts/README.md: .ignore +share/analysis-scripts/results_display.py: .ignore +share/analysis-scripts/summary.py: .ignore share/analysis-scripts/template.mk: .ignore share/autocomplete_frama-c: CEA_LGPL share/Makefile.clean: CEA_LGPL diff --git a/share/analysis-scripts/benchmark_database.py b/share/analysis-scripts/benchmark_database.py new file mode 100644 index 00000000000..0f74d2c8084 --- /dev/null +++ b/share/analysis-scripts/benchmark_database.py @@ -0,0 +1,177 @@ +########################################################################## +# # +# This file is part of Frama-C. # +# # +# Copyright (C) 2007-2019 # +# CEA (Commissariat à l'énergie atomique et aux énergies # +# alternatives) # +# # +# you can redistribute it and/or modify it under the terms of the GNU # +# Lesser General Public License as published by the Free Software # +# Foundation, version 2.1. # +# # +# It is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Lesser General Public License for more details. # +# # +# See the GNU Lesser General Public License version 2.1 # +# for more details (enclosed in the file licenses/LGPLv2.1). # +# # +########################################################################## + +import time +import os +import csv +import sqlite3 + +import git_utils + +def dict_factory(cursor, row): + d = {} + for idx, col in enumerate(cursor.description): + d[col[0]] = row[idx] + return d + + +class Database: + inserted_targets = {} + + def __init__(self, benchmark_tag, benchmark_comment, gitdir, analyzer_rev, reference_rev): + self.benchmark_tag = benchmark_tag + self.benchmark_comment = benchmark_comment + if analyzer_rev is None: + self.analyzer_hash = None + self.analyzer = None + else: + self.analyzer_hash = git_utils.rev_parse(gitdir, analyzer_rev) + self.analyzer = git_utils.name_rev(gitdir, analyzer_rev) + self.reference_hash = git_utils.rev_parse(gitdir, reference_rev) + self.connection = sqlite3.connect('benchmark-results.db') + self.connection.row_factory = dict_factory + self.setup_rdb() + self.reference_results = self.query_rdb(self.reference_hash) + + def update(self, results): + if not self.benchmark_tag is None: + for result in results: + inserted = result["target"] in self.inserted_targets + if result["up_to_date"] and not inserted: + self.insert(result) + self.inserted_targets[result["target"]] = True + + for result in results: + if result['target'] in self.reference_results: + ref = self.reference_results[result['target']] + def compute_diff(column, ratio): + nonlocal result, ref + try: + if ratio: + diff = result[column] / ref[column] - 1.0 + else: + diff = result[column] - ref[column] + except TypeError: + diff =None + result['diff_' + column] = diff + + compute_diff('alarms', False) + compute_diff('warnings', False) + compute_diff('user_time', True) + compute_diff('memory', True) + compute_diff('coverage', False) + else: + result['diff_alarms'] = None + result['diff_warnings'] = None + result['diff_user_time'] = None + result['diff_memory'] = None + result['diff_coverage'] = None + + def insert_csv(self, result): + filename="benchmark-results.csv" + file_already_exists=os.path.isfile(filename) + fieldnames = [ + 'benchmark_tag', 'timestamp', + 'analyzer', 'analyzer_hash', + 'target', 'target_hash', + 'user_time', 'memory', 'alarms', 'warnings', + 'sem_reach_fun', 'syn_reach_fun', 'total_fun', + 'sem_reach_stmt', 'syn_reach_stmt', + 'cmd_args', 'benchmark_comment'] + with open(filename, 'a', newline='') as file: + writer = csv.DictWriter(file, + fieldnames=fieldnames, extrasaction='ignore', + delimiter="\t", quotechar='"') + if not file_already_exists: + writer.writeheader() + writer.writerow(result) + + def insert(self, result): + completed_result = { **result, + 'benchmark_tag' : self.benchmark_tag, + 'benchmark_comment' : self.benchmark_comment, + 'target_hash' : git_utils.current_rev(result["target"]), + 'analyzer' : self.analyzer, + 'analyzer_hash' : self.analyzer_hash } + self.insert_csv(completed_result) + self.insert_rdb(completed_result) + + def setup_rdb(self): + cursor = self.connection.cursor() + cursor.execute( + "CREATE TABLE IF NOT EXISTS benchmark_results (" + "benchmark_tag TEXT NOT NULL," + "timestamp TEXT NOT NULL," + "analyzer TEXT NOT NULL," + "analyzer_hash TEXT NOT NULL," + "target TEXT NOT NULL," + "target_hash TEXT NOT NULL," + "user_time REAL NOT NULL," + "memory INTEGER NOT NULL," + "alarms INTEGER NOT NULL," + "warnings INTEGER NOT NULL," + "sem_reach_fun INTEGER NOT NULL," + "syn_reach_fun INTEGER NOT NULL," + "total_fun INTEGER NOT NULL," + "sem_reach_stmt INTEGER NOT NULL," + "syn_reach_stmt INTEGER NOT NULL," + "cmd_args TEXT NOT NULL," + "benchmark_comment TEXT);") + self.connection.commit() + + def insert_rdb(self, result): + cursor = self.connection.cursor() + cursor.execute( + "INSERT INTO benchmark_results(" + "benchmark_tag, timestamp, " + "analyzer, analyzer_hash, target, target_hash, " + "user_time, memory, alarms, warnings, " + "sem_reach_fun, syn_reach_fun, total_fun, " + "sem_reach_stmt, syn_reach_stmt, " + "cmd_args, benchmark_comment) " + "VALUES(" + "DATETIME('now','localtime'), " + ":benchmark_tag, :analyzer, " + ":analyzer_hash, :target, :target_hash, " + ":user_time, :memory, :alarms, :warnings, " + ":sem_reach_fun, :syn_reach_fun, :total_fun, " + ":sem_reach_stmt, :syn_reach_stmt, " + ":cmd_args, :benchmark_comment)", result) + self.connection.commit() + + def query_rdb(self, analyzer_hash): + cursor = self.connection.cursor() + cursor.execute( + "SELECT " + "target, " + "avg(user_time) as user_time, avg(memory) as memory, " + "min(alarms) as alarms, min(warnings) as warnings, " + "max(sem_reach_stmt) as sem_reach_stmt, " + "max(syn_reach_stmt) as syn_reach_stmt " + "FROM benchmark_results " + "WHERE analyzer_hash=? " + "GROUP BY target", (analyzer_hash,)) + results = {} + for r in cursor.fetchall(): + r['coverage'] = r['sem_reach_stmt'] / r['syn_reach_stmt'] + results[r['target']] = r + return results diff --git a/share/analysis-scripts/clone.sh b/share/analysis-scripts/clone.sh new file mode 100755 index 00000000000..19fe1a82afc --- /dev/null +++ b/share/analysis-scripts/clone.sh @@ -0,0 +1,91 @@ +#!/bin/bash -eu + +git_hash="master" +clone_dir="frama-c-clones" +repository_path="git@git.frama-c.com:frama-c/frama-c" +show_usage="" + +while [[ $# > 0 ]] +do + case $1 in + -d|--clone-dir) + clone_dir="$2" + shift + ;; + + -p|--repository-path) + repository_path="$2" + shift + ;; + + -h|--help) + show_usage="yes" + ;; + + *) + git_hash="$1" + ;; + esac + shift +done + +if [ -n "$show_usage" ] +then + echo "Usage: $0 HASH" + echo "Provides a working tree of Frama-C." + echo "" + echo "The following arguments can be given:" + echo " -d, --clone-dir path to the directory where frama-c versions are" + echo " cloned" + echo " -p, --repository-path PATH do not clone from frama-c gitlab, use this path instead" + echo " -h, --help prints this help and quits" + exit 1 +fi + + +bare="$clone_dir/frama-c.git" + +# Check if bench clone exists +if [ ! -d "$bare" ] +then + git clone --bare --quiet $repository_path "$bare" + sed --in-place '/bare = true/d' $bare/config +fi + +# Fetch all refs +git -C $bare fetch origin '+refs/heads/*:refs/heads/*' --prune + +# Resolve branch name if given +git_hash=`git --git-dir="$bare" rev-parse "$git_hash"` + +# target_path must be an absolute path +target_path="$(readlink -f "$clone_dir/$git_hash")" + +# Checkout +if [ ! -e "$target_path" ] +then + # The workdir cmd can extract a working tree of the desired hash + # without cloning once more + workdir_cmd=`locate git-new-workdir --limit 1` + if [ -z "$workdir_cmd" ] + then + git --git-dir="$bare" worktree add "$target_path" "$git_hash" + else + bash "$workdir_cmd" "$bare" "$target_path" "$git_hash" + fi +fi + +# Build Frama-C +if [ ! -e "$target_path/build/bin/frama-c" ] +then + ( + cd "$target_path"; + autoconf -f --warnings=none; + ./configure --quiet --prefix=$(pwd)/build > /dev/null; + make -j > /dev/null; + make install > /dev/null; + ) +fi + +# Output repository path +echo "$target_path" diff --git a/share/analysis-scripts/find_fun.py b/share/analysis-scripts/find_fun.py index 8451cdf1302..b8a3565da0b 100755 --- a/share/analysis-scripts/find_fun.py +++ b/share/analysis-scripts/find_fun.py @@ -4,7 +4,7 @@ # # # This file is part of Frama-C. # # # -# Copyright (C) 2007-2018 # +# Copyright (C) 2007-2019 # # CEA (Commissariat à l'énergie atomique et aux énergies # # alternatives) # # # diff --git a/share/analysis-scripts/frama_c_results.py b/share/analysis-scripts/frama_c_results.py new file mode 100644 index 00000000000..63cdfc18288 --- /dev/null +++ b/share/analysis-scripts/frama_c_results.py @@ -0,0 +1,73 @@ +########################################################################## +# # +# This file is part of Frama-C. # +# # +# Copyright (C) 2007-2019 # +# CEA (Commissariat à l'énergie atomique et aux énergies # +# alternatives) # +# # +# you can redistribute it and/or modify it under the terms of the GNU # +# Lesser General Public License as published by the Free Software # +# Foundation, version 2.1. # +# # +# It is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Lesser General Public License for more details. # +# # +# See the GNU Lesser General Public License version 2.1 # +# for more details (enclosed in the file licenses/LGPLv2.1). # +# # +########################################################################## + +import re + +stat_file_re = re.compile("^([^=]*)=(.*)$", re.MULTILINE) + +def load(filename): + data = {} + try: + with open(filename, 'r') as file: + content = file.read() + for (key,value) in stat_file_re.findall(content): + data[key] = value + except OSError: + pass + return data + +re_escape_space = re.compile(r'\\ ') + +def convert(data, key, to_type, default=None): + try: + value = data[key].strip() + if to_type is str: + value = re.sub(r'\\ ', ' ', value) + value = re.sub(r'\\,', ',', value) + return value + else: + return to_type(value) + except (ValueError, TypeError, KeyError): + return default + +def parse(data): + result = {} + result["timestamp"] = convert(data, "timestamp", str) + result["sem_reach_fun"] = convert(data, "sem_reach_fun", int) + result["syn_reach_fun"] = convert(data, "syn_reach_fun", int) + result["total_fun"] = convert(data, "total_fun", int) + result["sem_reach_stmt"] = convert(data, "sem_reach_stmt", int) + result["syn_reach_stmt"] = convert(data, "syn_reach_stmt", int) + result["alarms"] = convert(data, "alarms", int) + result["warnings"] = convert(data, "warnings", int) + result["user_time"] = convert(data, "user_time", float) + result["memory"] = convert(data, "memory", int) + result["cmd_args"] = convert(data, "cmd_args", str) + result["benchmark_tag"] = convert(data, "benchmark_tag", str) + if result["sem_reach_stmt"] != None and result["syn_reach_stmt"] != None: + result["coverage"] = result["sem_reach_stmt"] / result["syn_reach_stmt"] + else: + result["coverage"] = None + return result + +def read(filename): + return parse(load(filename)) diff --git a/share/analysis-scripts/git_utils.py b/share/analysis-scripts/git_utils.py new file mode 100644 index 00000000000..7e174ebda83 --- /dev/null +++ b/share/analysis-scripts/git_utils.py @@ -0,0 +1,59 @@ +########################################################################## +# # +# This file is part of Frama-C. # +# # +# Copyright (C) 2007-2019 # +# CEA (Commissariat à l'énergie atomique et aux énergies # +# alternatives) # +# # +# you can redistribute it and/or modify it under the terms of the GNU # +# Lesser General Public License as published by the Free Software # +# Foundation, version 2.1. # +# # +# It is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Lesser General Public License for more details. # +# # +# See the GNU Lesser General Public License version 2.1 # +# for more details (enclosed in the file licenses/LGPLv2.1). # +# # +########################################################################## + +import subprocess + +def rev_parse(gitdir, rev): + res = subprocess.run( + ['git', 'rev-parse', rev], + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL, + encoding='ascii', + cwd=gitdir) + name = res.stdout.strip() + return name if name else None + +def name_rev(gitdir, rev): + res = subprocess.run( + ['git', 'name-rev', '--name-only', rev], + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL, + encoding='ascii', + cwd=gitdir) + name = res.stdout.strip() + return name if name else None + +def current_rev(gitdir): + return name_rev(gitdir, "HEAD") + +def is_clean(gitdir): + # git diff and diff-index are not working on some of our case studies to + # decide whether the workingin dir is clean or not ; git status is more + # reliable + res = subprocess.run( + ['git', 'status', '--untracked-files=no', '--porcelain'], + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL, + encoding='ascii', + cwd=gitdir) + return res.returncode == 0 and not res.stdout + diff --git a/share/analysis-scripts/list_files.py b/share/analysis-scripts/list_files.py index 859979b2286..7a1a8972dc6 100755 --- a/share/analysis-scripts/list_files.py +++ b/share/analysis-scripts/list_files.py @@ -4,7 +4,7 @@ # # # This file is part of Frama-C. # # # -# Copyright (C) 2007-2018 # +# Copyright (C) 2007-2019 # # CEA (Commissariat à l'énergie atomique et aux énergies # # alternatives) # # # diff --git a/share/analysis-scripts/results_display.py b/share/analysis-scripts/results_display.py new file mode 100644 index 00000000000..2f368a3ce0c --- /dev/null +++ b/share/analysis-scripts/results_display.py @@ -0,0 +1,255 @@ +########################################################################## +# # +# This file is part of Frama-C. # +# # +# Copyright (C) 2007-2019 # +# CEA (Commissariat à l'énergie atomique et aux énergies # +# alternatives) # +# # +# you can redistribute it and/or modify it under the terms of the GNU # +# Lesser General Public License as published by the Free Software # +# Foundation, version 2.1. # +# # +# It is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Lesser General Public License for more details. # +# # +# See the GNU Lesser General Public License version 2.1 # +# for more details (enclosed in the file licenses/LGPLv2.1). # +# # +########################################################################## + +import re +import sys +import string +import curses + + +sensitivity = 0.02 + +class ResultsFormatter(string.Formatter): + @staticmethod + def format_memory(kilobytes): + if kilobytes < 4096: + return str(kilobytes) + " kiB" + megabytes = round(kilobytes / 1024) + if megabytes < 4096: + return str(megabytes) + " MiB" + gigabytes = round(megabytes / 1024) + return str(gygabytes) + " GiB" + + @staticmethod + def format_time(seconds): + if seconds < 10: + return str(round(seconds,2)) + "s" + if seconds < 100: + return str(round(seconds,1)) + "s" + if seconds < 600: + return str(round(seconds)) + "s" + minutes = round(seconds / 60) + if minutes < 600: + return str(minutes) + "m" + hours = round(minutes / 60) + return str(hours) + "h" + + @staticmethod + def attribute(value, inverted): + if value > sensitivity: + return "@-" if inverted else "@+" + elif value < -sensitivity: + return "@+" if inverted else "@-" + else: + return "@=" + + def get_field(self, field_name, args, kwargs): + try: + return super().get_field(field_name, args, kwargs) + except (KeyError, AttributeError): + return None,field_name + + def format_field(self, value, format_spec): + if value == None: + return "" + elif format_spec.startswith('+cmp:'): + remainder = format_spec.split("+cmp:",1)[1] + return (self.attribute(value, False) + + self.format_field(value, remainder) + "@=") + elif format_spec.startswith('-cmp:'): + remainder = format_spec.split("-cmp:",1)[1] + return (self.attribute(value, True) + + self.format_field(value, remainder) + "@=") + elif format_spec == 'time': + return self.format_time(value) + elif format_spec == 'memory': + return self.format_memory(value) + else: + return super().format_field(value, format_spec) + +class UserExitRequest (Exception): + pass + +class PlainDisplay: + NEGATIVE = 1 + POSITIVE = 2 + RUNNING = 3 + HEADER = 4 + + columns = [ + {"size":64, "caption":"Case", "format":"{target_name:s}"}, + {"size":14, "caption":"Coverage", + "format":"{coverage:>8.0%} {diff_coverage:+cmp:+.0%}"}, + {"size":14, "caption":"Alarms", + "format":"{alarms:>8d} {diff_alarms:-cmp:+d}"}, + {"size":14 , "caption":"Warnings", + "format":"{warnings:>8d} {diff_warnings:-cmp:+d}"}, + {"size":14, "caption":"Time", + "format":"{user_time:time} {diff_user_time:-cmp:+.0%}"}, + {"size":14, "caption":"Memory", + "format":"{memory:memory} {diff_memory:-cmp:+.0%}"}] + + def __init__(self): + self.NEGATIVE = 0 + self.POSITIVE = 0 + self.RUNNING = 0 + self.HEADER = 0 + self.OBSOLETE = 0 + self.needs_update = False + + def write(self, text, attributes=0): + sys.stdout.write(text) + + def rich_write(self, text, override=None, size=0): + attributes = 0 + n = 0 + for s in re.split(r'(@.)', text): + if s == "@=": + attributes = 0 + elif s == "@+": + attributes = self.POSITIVE + elif s == "@-": + attributes = self.NEGATIVE + else: + n += len(s) + self.write(s, attributes if override is None else override) + if n < size: + self.write(' ' * (size - n), attributes if override is None else override) + + fmt = ResultsFormatter() + + def format(self, *args, **kwargs): + return self.fmt.format(*args, **kwargs) + + def print_table(self, results): + self.write(" ", self.HEADER) + for column in self.columns: + self.write(self.format('{caption:^{size}}', **column), self.HEADER) + self.write(" ", self.HEADER) + + self.write("\n-") + for column in self.columns: + self.write(self.format('{:-^{size}}', "", **column)) + self.write("-") + + self.write("\n") + for result in results: + self.write(" ") + for column in self.columns: + s = self.fmt.format(column["format"], **result) + if result["is_running"]: + attribute = self.RUNNING + elif not result["up_to_date"]: + attribute = self.OBSOLETE + else: + attribute = None + self.rich_write(s, attribute, size=column['size']) + + self.write(" ") + self.write("\n") + + self.write("\n") + self.needs_update = False + + def process_inputs(self): + pass + + +class CursesDisplay(PlainDisplay): + def __init__(self, stdscr): + self.stdscr = stdscr + #curses.mousemask(curses.ALL_MOUSE_EVENTS) + stdscr.nodelay(True) + stdscr.refresh() # Needs to be done once or nothing will be output + + self.window = curses.newpad(400, 160) + curses.init_color(curses.COLOR_YELLOW, 300, 300, 300) + curses.init_pair(1, curses.COLOR_RED, 0) + curses.init_pair(2, curses.COLOR_GREEN, 0) + curses.init_pair(3, curses.COLOR_WHITE, curses.COLOR_YELLOW) + curses.init_pair(4, curses.COLOR_YELLOW, 0) + self.NEGATIVE = curses.color_pair(1) + self.POSITIVE = curses.color_pair(2) + self.RUNNING = curses.A_BLINK | curses.color_pair(3) + self.HEADER = curses.A_BOLD + self.OBSOLETE = curses.color_pair(4) + self.scroll_y = 0 + + def write(self, text, attributes=0): + self.window.addstr(text, attributes) + + def print_table(self, results): + self.window.clear() + PlainDisplay.print_table(self, results) + height, width = self.stdscr.getmaxyx() + try: + self.window.refresh(0, 0, 0, 0, 1, width-1) + self.window.refresh(self.scroll_y+2, 0, 2, 0, height-1, width-1) + except Exception: + # getmaxyx may be out of date, especially when resizing down the + # window ; just ignore errors + pass + + + def process_inputs(self): + previous_y = self.scroll_y + c = self.stdscr.getch() + while c != -1: + if c == ord('q'): + raise UserExitRequest + elif c == curses.KEY_UP: + self.scroll_y -= 1 + elif c == curses.KEY_DOWN: + self.scroll_y += 1 + elif c == curses.KEY_NPAGE: + self.scroll_y += 10 + elif c == curses.KEY_PPAGE: + self.scroll_y -= 10 + elif c == curses.KEY_MOUSE: + id,x,y,z,bstate = curses.getmouse() + if z > 0: + self.scroll_y += 1 + elif z < 0: + self.scroll_y -= 1 + self.scroll_y = max(0, self.scroll_y) + c = self.stdscr.getch() + if self.scroll_y != previous_y: + self.needs_update = True + + +def wrapper(f, *args, **kwargs): + if 'curses' in kwargs: + use_curses = kwargs['curses'] + del kwargs['curses'] + else: + use_curses = False + + if use_curses: + def g(stdscr): + nonlocal f, args, kwargs + display = CursesDisplay(stdscr) + return f(display, *args, **kwargs) + return curses.wrapper(g) + else: + display = PlainDisplay() + return f(display, *args, **kwargs) + diff --git a/share/analysis-scripts/summary.py b/share/analysis-scripts/summary.py new file mode 100755 index 00000000000..9c0c586ef51 --- /dev/null +++ b/share/analysis-scripts/summary.py @@ -0,0 +1,219 @@ +#!/usr/bin/env python3 +#-*- coding: utf-8 -*- +########################################################################## +# # +# This file is part of Frama-C. # +# # +# Copyright (C) 2007-2019 # +# CEA (Commissariat à l'énergie atomique et aux énergies # +# alternatives) # +# # +# you can redistribute it and/or modify it under the terms of the GNU # +# Lesser General Public License as published by the Free Software # +# Foundation, version 2.1. # +# # +# It is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Lesser General Public License for more details. # +# # +# See the GNU Lesser General Public License version 2.1 # +# for more details (enclosed in the file licenses/LGPLv2.1). # +# # +########################################################################## + +import re +import sys +import subprocess +import time +import os +import signal +import argparse +import uuid + +import frama_c_results +import results_display +import benchmark_database + +class OperationException(Exception): + pass + +def build_env(framac): + if framac is None: + return { **os.environ } + else: + bindir = framac + '/build/bin' + return { **os.environ, 'PATH' : bindir + ':' + os.environ['PATH'] } + +def list_targets(): + env = build_env(framac) + res = subprocess.run( + ["make", "--quiet", "display-targets"], + env=env, + stdout=subprocess.PIPE, + encoding='ascii') + return res.stdout.split() + +def clone_frama_c(clonedir, hash): + print("Cloning Frama-C", hash, "...") + res = subprocess.run( + ["./scripts/clone.sh", "--clone-dir", clonedir, hash], + stdout=subprocess.PIPE, + encoding='ascii') + if res.returncode != 0: + raise OperationException("Cannot clone repository. Try to manually" + "remove the broken clone in " + clonedir) + return res.stdout.strip() + +def run_make(framac, benchmark_tag=None): + args = ['make', '--keep-going', 'all'] + env = build_env(framac) + if not framac is None: + bindir = framac + '/build/bin' + args += [ + 'FRAMAC_DIR=' + bindir, + 'FRAMAC=' + bindir + '/frama-c', + 'FRAMAC_CONFIG=' + bindir + '/frama-c-config'] + if benchmark_tag is None: + args += ['-j', '8'] + else: + args += ['BENCHMARK=' + benchmark_tag] + return subprocess.Popen(args, env=env, + stdout=subprocess.DEVNULL, + stderr=subprocess.PIPE, + preexec_fn=os.setsid) + +def terminate_process(process): + if process is None: + return b"" + else: + try: + os.killpg(os.getpgid(process.pid), signal.SIGTERM) + pass + except ProcessLookupError: + pass + output,errors = process.communicate() + return errors + +def smart_rename(target): + target = re.sub('main\.eva$', '', target) + target = re.sub('\.eva$', '', target) + target = re.sub('qds/frama-c', 'qds', target) + return target + +def is_running(target): + return os.path.isfile(target + '/running') + +def poll_results(targets, benchmark_tag): + results = [] + for target in targets: + filename = target + '/stats.txt' + result = frama_c_results.read(filename) + result["target"] = target + result["target_name"] = smart_rename(target) + result["is_running"] = is_running(target) + result["up_to_date"] = benchmark_tag is None or benchmark_tag == result['benchmark_tag'] + results.append(result); + return results + + +def run_analyses(display, database, framac, benchmark_tag): + results = [] + targets = list_targets() + process = run_make(framac, benchmark_tag) + errors = b"" + next_poll = time.time() + + def update(): + nonlocal display, database, targets, benchmark_tag, results + results = poll_results(targets, benchmark_tag) + if not database is None: + database.update(results) + display.needs_update = True + + try: + while process.poll() is None: + if time.time() >= next_poll: + update() + next_poll = time.time() + 2.0 + display.process_inputs() + if display.needs_update: + display.print_table(results) + time.sleep(0.05) + update() + except (KeyboardInterrupt, results_display.UserExitRequest): + print("Analyzes interrupted by user.") + except Exception as e: + # terminate_process below is somehow blocking the exception printing + errors += bytearray(str(e), 'ascii') + raise e + finally: + errors += terminate_process(process) + return results,errors + + +parser = argparse.ArgumentParser( + description="Run analyses and summarize the results. Must be run in a " + "directory with a Makefile having two rules: 'all', a target " + "that runs the analysis, and 'display-targets', the target that " + "lists the built results.") +parser.add_argument('rev', nargs='?', metavar="REVISION", + help="a Frama-C revision to use for analyses (default: use the " + "default configuration for Frama-C)") +parser.add_argument('-b', '--benchmark', + action="store_true", + help="sets benchmark mode: do not run analyses in parallel and rerun all " + "analyses") +parser.add_argument('-v', '--vs', + action="store", metavar="REVISION", default="master", + help="a revision to compare the results to") +parser.add_argument('-c', '--comment', + action="store", metavar="COMMENT", + help="when benchmarking, add this comment inside the database") +parser.add_argument('-p', '--repository-path', + action="store", metavar="PATH", + help="don't clone Frama-C, use this git repository instead") + + +errors = b'' + +try: + args = parser.parse_args() + + if args.repository_path is None: + if args.rev is None: + gitdir = None + framac = None + else: + clonedir = "./frama-c-clones" + gitdir = clonedir + "/frama-c.git" + framac = clone_frama_c(clonedir, args.rev) + else: + framac = args.repository_path + gitdir = framac + + if args.benchmark: + benchmark_tag=str(uuid.uuid1()) + print("Running benchmarks with benchmark tag", benchmark_tag, "...") + else: + benchmark_tag=None + print("Running analyses ...") + + benchmark_comment = args.comment + + if gitdir is None: + database = None + else: + database = benchmark_database.Database(benchmark_tag, benchmark_comment, + gitdir, args.rev, args.vs) + + results,errors = results_display.wrapper(run_analyses, database, framac, + benchmark_tag, curses=True) + + print("Results:\n") + results_display.PlainDisplay().print_table(results) + +except OperationException as e: + errors += bytearray(str(e), 'ascii') + +sys.stderr.buffer.write(errors + b'\n') -- GitLab From 8ad5c2876974d1f876c0bc4a2f490d051e20cbb0 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Mon, 25 Mar 2019 16:39:32 +0100 Subject: [PATCH 146/376] [WP] detection of non significative casts (from/to the same array type) --- src/plugins/wp/LogicSemantics.ml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/wp/LogicSemantics.ml b/src/plugins/wp/LogicSemantics.ml index 8f0c5dd0358..9deb0c43059 100644 --- a/src/plugins/wp/LogicSemantics.ml +++ b/src/plugins/wp/LogicSemantics.ml @@ -543,6 +543,10 @@ struct to a deref of a cast to a pointer `*(T( * )[])(p)` *) let cast = cast_ptr dst_ctype t0 in L.load (C.current env) (Ctypes.object_of dst_ctype) cast + | C_array dst_arr_info, L_array src_arr_info + when Ctypes.AinfoComparable.equal dst_arr_info src_arr_info -> + (* cast from/to the same type *) + C.logic env t | C_array {arr_flat=Some _}, (L_integer|L_cint _|L_bool|L_real|L_cfloat _|L_array _) -> Warning.error "@[Logic cast to sized array (%a) from (%a) not implemented yet@]" Printer.pp_typ dst_ctype Printer.pp_logic_type t.term_type -- GitLab From 15871a53a98ad58df7560490408d0942c6ffbdb9 Mon Sep 17 00:00:00 2001 From: Valentin Perrelle <valentin.perrelle@cea.fr> Date: Mon, 18 Mar 2019 17:53:06 +0100 Subject: [PATCH 147/376] [Variadic] Distinguish various cast types --- src/plugins/variadic/standard.ml | 61 ++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/src/plugins/variadic/standard.ml b/src/plugins/variadic/standard.ml index 8f2aac621af..d5b98d5d1d1 100644 --- a/src/plugins/variadic/standard.ml +++ b/src/plugins/variadic/standard.ml @@ -78,24 +78,29 @@ let integral_rep ikind = let expose t = Cil.type_remove_attributes_for_c_cast (Cil.unrollType t) -let is_equivalent_enum given expected = - match expose given, expose expected with - | TInt (i1,a1), TEnum({ekind=i2},a2) - | TEnum({ekind=i1},a1), TInt (i2,a2) -> - integral_rep i1 = integral_rep i2 && - Cil_datatype.Attributes.equal a1 a2 - | _, _ -> false +(* From most permissive to least permissive *) +type castability = Strict (* strictly allowed by the C standard *) + | Tolerated (* tolerated in practice *) + | NonPortable (* non-portable minor deviation *) + | NonStrict (* only allowed in non-strict mode *) + | Never (* never allowed *) let can_cast given expected = match expose given, expose expected with + | t1, t2 when Cil_datatype.Typ.equal t1 t2 -> Strict | (TInt (i1,a1) | TEnum({ekind=i1},a1)), - (TInt (i2,a2) | TEnum({ekind=i2},a2)) - when not (Strict.get ()) || is_extended_integer_type given -> - integral_rep i1 = integral_rep i2 && - Cil_datatype.Attributes.equal a1 a2 - | TPtr _, TPtr _ -> true - | exposed_given, exposed_expected -> - Cil_datatype.Typ.equal exposed_given exposed_expected + (TInt (i2,a2) | TEnum({ekind=i2},a2)) -> + if integral_rep i1 <> integral_rep i2 || + not (Cil_datatype.Attributes.equal a1 a2) then + Never + else if is_extended_integer_type given then + Tolerated + else if i1 = i2 then + NonPortable + else + NonStrict + | TPtr _, TPtr _ -> Strict + | _, _ -> Never let does_fit exp typ = match Cil.constFoldToInt exp, Cil.unrollType typ with @@ -114,18 +119,22 @@ let pretty_typ fmt t = (* cast the i-th argument exp to paramtyp *) let cast_arg i paramtyp exp = let argtyp = Cil.typeOf exp in - if not (can_cast argtyp paramtyp) && not (does_fit exp paramtyp) then - if Strict.get () && is_equivalent_enum argtyp paramtyp then - Self.warning ~current:true - "Possible portability issues with enum type for argument %d \ - (use -variadic-no-strict to avoid this warning)." - (i + 1) - else - Self.warning ~current:true - "Incorrect type for argument %d. \ - The argument will be cast from %a to %a." - (i + 1) - pretty_typ argtyp pretty_typ paramtyp; + if not (does_fit exp paramtyp) then + begin match can_cast argtyp paramtyp with + | Strict | Tolerated -> () + | (NonPortable | NonStrict) when not (Strict.get ()) -> () + | NonPortable -> + Self.warning ~current:true + "Possible portability issues with enum type for argument %d \ + (use -variadic-no-strict to avoid this warning)." + (i + 1) + | NonStrict | Never -> + Self.warning ~current:true + "Incorrect type for argument %d. \ + The argument will be cast from %a to %a." + (i + 1) + pretty_typ argtyp pretty_typ paramtyp + end; Cil.mkCast ~force:false ~e:exp ~newt:paramtyp -- GitLab From ebdcacd3ec889fbee111947e006fb6a0300255e2 Mon Sep 17 00:00:00 2001 From: Thibault Martin <thibault.martin@cea.fr> Date: Wed, 27 Mar 2019 17:16:23 +0100 Subject: [PATCH 148/376] Remove option -wp-assert-check-only Since commit #8783731f and #28139960 this option is not needed anymore. I updated LUncov (which was the only plugin using it) to remove it as well --- src/plugins/wp/wpAnnot.ml | 2 +- src/plugins/wp/wp_parameters.ml | 11 ----------- src/plugins/wp/wp_parameters.mli | 1 - 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/plugins/wp/wpAnnot.ml b/src/plugins/wp/wpAnnot.ml index b0203265ab2..1e2ce76c94b 100644 --- a/src/plugins/wp/wpAnnot.ml +++ b/src/plugins/wp/wpAnnot.ml @@ -914,7 +914,7 @@ let get_stmt_annots config v s = in (b_acc, (a_acc, e_acc)) | TBRok | TBRpart -> let id = WpPropId.mk_assert_id config.kf s a in - let check = kind = Check || Wp_parameters.Assert_check_only.get () + let check = kind = Check and goal = goal_to_select config id in if check && not goal then acc else diff --git a/src/plugins/wp/wp_parameters.ml b/src/plugins/wp/wp_parameters.ml index bd5be9fa57d..3ea59dcff6c 100644 --- a/src/plugins/wp/wp_parameters.ml +++ b/src/plugins/wp/wp_parameters.ml @@ -897,17 +897,6 @@ module Check = end) let () = on_reset Print.clear -let () = Parameter_customize.set_group wp_po -let () = Parameter_customize.do_not_save () -let () = Parameter_customize.is_invisible () -module Assert_check_only = - False (struct - let option_name = "-wp-assert-check-only" - let help = - "Turns assertions into labels." - end) -let () = on_reset Print.clear - (* -------------------------------------------------------------------------- *) (* --- OS environment variables --- *) (* -------------------------------------------------------------------------- *) diff --git a/src/plugins/wp/wp_parameters.mli b/src/plugins/wp/wp_parameters.mli index 724fc39ae51..88dfd0553b3 100644 --- a/src/plugins/wp/wp_parameters.mli +++ b/src/plugins/wp/wp_parameters.mli @@ -135,7 +135,6 @@ module ReportJson: Parameter_sig.String module ReportName: Parameter_sig.String module MemoryContext: Parameter_sig.Bool module Check: Parameter_sig.Bool -module Assert_check_only: Parameter_sig.Bool (** {2 Environment Variables} *) -- GitLab From 178f8de5e13cf9ca057b4f75fa97be935c6e5647 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Thu, 28 Mar 2019 08:25:41 +0100 Subject: [PATCH 149/376] [Distribution] adds share/META.frama-c --- Makefile | 1 + headers/header_spec.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/Makefile b/Makefile index c451aa21fec..f517edfe058 100644 --- a/Makefile +++ b/Makefile @@ -275,6 +275,7 @@ DISTRIB_FILES:=\ share/Makefile.plugin.template share/Makefile.dynamic \ share/Makefile.dynamic_config.external \ share/Makefile.dynamic_config.internal \ + share/META.frama-c \ $(filter-out src/kernel_internals/runtime/config.ml, \ $(wildcard src/kernel_internals/runtime/*.ml*)) \ $(wildcard src/kernel_services/abstract_interp/*.ml*) \ diff --git a/headers/header_spec.txt b/headers/header_spec.txt index 5960673ee93..8538850d61e 100644 --- a/headers/header_spec.txt +++ b/headers/header_spec.txt @@ -142,6 +142,7 @@ share/Makefile.dynamic_config.external: CEA_LGPL share/Makefile.dynamic_config.internal: CEA_LGPL share/Makefile.generic: CEA_LGPL share/Makefile.plugin.template: CEA_LGPL +share/META.frama-c: .ignore share/builtin.h: CEA_LGPL share/configure.ac: CEA_LGPL share/emacs/acsl.el: ACSL_EL -- GitLab From 59fad4b75747b0f8b5cd1d386bbaf8be769d0c9d Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Thu, 28 Mar 2019 09:32:28 +0100 Subject: [PATCH 150/376] [Distribution] remove duplicates --- headers/header_spec.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/headers/header_spec.txt b/headers/header_spec.txt index 8538850d61e..2f826961dbc 100644 --- a/headers/header_spec.txt +++ b/headers/header_spec.txt @@ -664,8 +664,6 @@ src/libraries/utils/pretty_utils.ml: CEA_LGPL src/libraries/utils/pretty_utils.mli: CEA_LGPL src/libraries/utils/qstack.ml: CEA_LGPL src/libraries/utils/qstack.mli: CEA_LGPL -src/libraries/utils/sanitizer.ml: CEA_LGPL -src/libraries/utils/sanitizer.mli: CEA_LGPL src/libraries/utils/rangemap.ml: OCAML_STDLIB src/libraries/utils/rangemap.mli: OCAML_STDLIB src/libraries/utils/rgmap.ml: CEA_LGPL -- GitLab From a7d9d161c36931defaf1cddcf2d1fee12efe9e88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 15 Mar 2019 11:30:58 +0100 Subject: [PATCH 151/376] [Eva] Offsetmap: removes the unused alarm boolean returned by some functions. If needed, this boolean could be computed by the callers of these functions via Base.is_valid_offset. In Base, do not export offset_is_in_validity, that was only used to compute this boolean. --- src/kernel_services/abstract_interp/base.mli | 4 - src/kernel_services/abstract_interp/lmap.ml | 14 ++-- .../abstract_interp/offsetmap.ml | 75 ++++++++----------- .../abstract_interp/offsetmap_sig.mli | 19 ++--- .../abstract_interp/tr_offset.ml | 4 +- .../abstract_interp/tr_offset.mli | 13 +--- .../value/domains/cvalue/builtins_memory.ml | 8 +- .../value/domains/cvalue/builtins_string.ml | 2 +- src/plugins/value/legacy/eval_op.ml | 9 +-- src/plugins/value/values/offsm_value.ml | 14 ++-- 10 files changed, 63 insertions(+), 99 deletions(-) diff --git a/src/kernel_services/abstract_interp/base.mli b/src/kernel_services/abstract_interp/base.mli index 0c4cefd1949..ce45249b747 100644 --- a/src/kernel_services/abstract_interp/base.mli +++ b/src/kernel_services/abstract_interp/base.mli @@ -177,10 +177,6 @@ val max_valid_absolute_address: unit -> Int.t val bits_sizeof : t -> Int_Base.t -val offset_is_in_validity : Int.t -> validity -> Ival.t -> bool -(** [is_offset_in_validity size validity ival] checks that [ival] is a valid - offset for an access of size [size] according to [validity]. *) - val is_valid_offset : for_writing:bool -> Int.t -> t -> Ival.t -> bool (** [is_valid_offset ~for_writing size b offset] checks that [offset] (expressed in bits) plus [size] bits is valid in [b]. *) diff --git a/src/kernel_services/abstract_interp/lmap.ml b/src/kernel_services/abstract_interp/lmap.ml index 28caf337006..825aa7b0b74 100644 --- a/src/kernel_services/abstract_interp/lmap.ml +++ b/src/kernel_services/abstract_interp/lmap.ml @@ -183,10 +183,7 @@ struct Offsetmap.update_imprecise_everywhere ~validity orig v offm | Int_Base.Value size -> assert (Int.ge size Int.zero); - let _, r = - Offsetmap.update ?origin ~validity ~exact ~offsets ~size v offm - in - r + Offsetmap.update ?origin ~validity ~exact ~offsets ~size v offm in match offm' with | `Bottom -> () @@ -230,7 +227,7 @@ struct match find_or_default base mem with | `Bottom -> acc_v | `Value offsetmap -> - let _alarm_o, new_v = + let new_v = Offsetmap.find ~conflate_bottom ~validity ~offsets ~size offsetmap in @@ -475,7 +472,7 @@ struct match offsetmap_dst with | `Bottom -> acc | `Value offsetmap_dst -> - let _this_alarm, new_offsetmap = + let new_offsetmap = Offsetmap.paste_slice ~validity ~exact ~from ~size ~offsets:i_dst offsetmap_dst in @@ -512,9 +509,8 @@ struct match find_or_default k_src m with | `Bottom -> acc | `Value offsetmap_src -> - let _alarm_copy, copy = - Offsetmap.copy_slice ~validity - ~offsets:i_src ~size offsetmap_src + let copy = + Offsetmap.copy_slice ~validity~offsets:i_src ~size offsetmap_src in Bottom.join Offsetmap.join acc copy in diff --git a/src/kernel_services/abstract_interp/offsetmap.ml b/src/kernel_services/abstract_interp/offsetmap.ml index 507f88fe4c8..bd89eb563c1 100644 --- a/src/kernel_services/abstract_interp/offsetmap.ml +++ b/src/kernel_services/abstract_interp/offsetmap.ml @@ -109,7 +109,6 @@ module Make (V : module type of Offsetmap_lattice_with_isotropy) = struct type v = V.t type widen_hint = V.generic_widen_hint - type alarm = bool let empty = Empty (** All high-level functions of this module must handle a size of 0, in which @@ -1531,7 +1530,7 @@ module Make (V : module type of Offsetmap_lattice_with_isotropy) = struct (* Finds the value associated to some offsets represented as an ival. *) let find ~validity ?(conflate_bottom=true) ~offsets ~size tree = - let alarm, offsets = Tr_offset.trim_by_validity offsets size validity in + let offsets = Tr_offset.trim_by_validity offsets size validity in let topify = Origin.K_Misalign_read in let read_one_node ~offset node ~start ~size acc = extract_bits_and_stitch ~topify ~conflate_bottom @@ -1543,8 +1542,7 @@ module Make (V : module type of Offsetmap_lattice_with_isotropy) = struct let read_nodes = read_successive_nodes ~read_one_node neutral in let read_value v _size = v in let join = V.join in - let v = read ~offsets ~size tree ~read_value ~read_nodes ~join V.bottom in - alarm, v + read ~offsets ~size tree ~read_value ~read_nodes ~join V.bottom (* Copies the node [node] at the end of the offsetmap [acc], as part of the larger copy of the interval [start..start+size-1] from the englobing @@ -1575,10 +1573,10 @@ module Make (V : module type of Offsetmap_lattice_with_isotropy) = struct t let copy_slice ~validity ~offsets ~size tree = - let alarm, offsets = Tr_offset.trim_by_validity offsets size validity in - if Int.(equal size zero) then alarm, `Value Empty + let offsets = Tr_offset.trim_by_validity offsets size validity in + if Int.(equal size zero) then `Value Empty else match offsets with - | Tr_offset.Invalid -> alarm, `Bottom + | Tr_offset.Invalid -> `Bottom | _ -> let read_one_node = copy_one_node in let neutral = m_empty in @@ -1586,7 +1584,7 @@ module Make (V : module type of Offsetmap_lattice_with_isotropy) = struct let read_value v size = interval_aux (pred size) Rel.zero size v in let init = isotropic_interval size V.bottom in let t = read ~offsets ~size tree ~read_value ~read_nodes ~join init in - alarm, `Value t + `Value t (* Keep the part of the tree strictly under (i.e. strictly on the left) of a given offset. *) @@ -1907,37 +1905,34 @@ let update_aux_tr_offsets ~exact ~offsets ~size v curr_off t = the memory zones written. *) let update_aux ?origin ~validity ~exact ~offsets ~size v curr_off t = let v = V.anisotropic_cast ~size v in - let alarm, reduced = - Tr_offset.trim_by_validity ?origin offsets size validity - in + let reduced = Tr_offset.trim_by_validity ?origin offsets size validity in let exact = exact && not (Base.is_weak_validity validity) in - let r = update_aux_tr_offsets ~exact ~offsets:reduced ~size v curr_off t in - alarm, r + update_aux_tr_offsets ~exact ~offsets:reduced ~size v curr_off t (* Same as update_aux, but on zero-rooted offsetmaps. *) let update ?origin ~validity ~exact ~offsets ~size v t = try - let alarm, (_curr_off, r) = + let _curr_off, r = update_aux ?origin ~validity ~exact ~offsets ~size v Int.zero t in - alarm, `Value r - with Update_Result_is_bottom -> true, `Bottom + `Value r + with Update_Result_is_bottom -> `Bottom (* High-level update function (roughly of type [Ival.t -> v -> offsetmap -> offsetmap]) that *under*-approximate the set of written locations, when there are too many of them. *) let update_under ~validity ~exact ~offsets ~size v t = let v = V.anisotropic_cast ~size v in - let alarm, offsets = Tr_offset.trim_by_validity offsets size validity in + let offsets = Tr_offset.trim_by_validity offsets size validity in if Base.is_weak_validity validity || update_aux_tr_offsets_approximates offsets size then - alarm, `Value t + `Value t else try let _, t = update_aux_tr_offsets ~exact ~offsets ~size v Int.zero t in - alarm, `Value t - with Update_Result_is_bottom -> true, `Bottom + `Value t + with Update_Result_is_bottom -> `Bottom let is_single_interval o = match o with @@ -2016,33 +2011,26 @@ let update_under ~validity ~exact ~offsets ~size v t = let stop_src = Int.pred size in ignore (Ival.cardinal_less_than offsets plevel); (* See explanations at the end of [Tr_offset] for what is computed here.*) - let min_valid, max_sure_valid, max_maybe_valid = match validity with - | Base.Invalid | Base.Empty (* size > 0 *) -> - Int.zero, Int.minus_one, Int.minus_one - | Base.Known (b,e) -> - b, e, e - | Base.Unknown (b, k, e) -> - let max_sure = Extlib.opt_conv Int.minus_one k in - b, max_sure, e - | Base.Variable { Base.min_alloc; Base.max_alloc } -> - Int.zero, min_alloc, max_alloc + let min_valid, max_maybe_valid = match validity with + | Base.Invalid | Base.Empty (* size > 0 *) -> Int.zero, Int.minus_one + | Base.Known (b, e) | Base.Unknown (b, _, e) -> b, e + | Base.Variable { Base.max_alloc } -> Int.zero, max_alloc in - let aux start_to (acc_offsm, acc_alarm, acc_success) = + let aux start_to (acc_offsm, acc_success) = let stop_to = Int.pred (Int.add start_to size) in (* check if at least one access is possibly valid *) if Int.lt start_to min_valid || Int.gt stop_to max_maybe_valid then (* at least one bit cannot be written => invalid access *) - acc_offsm, true, acc_success + acc_offsm, acc_success else let exact = exact && not (Base.is_weak_validity validity) in - let alarm = acc_alarm || Int.gt stop_to max_sure_valid in - paste_slice_itv ~exact src stop_src start_to acc_offsm, alarm, true + paste_slice_itv ~exact src stop_src start_to acc_offsm, true in (* TODO: this should be improved if offsets if of the form [a..b]c%d with d >= size. In this case, the write do not overlap, and could be done in one run in the offsetmap itself, using a zipper *) - let res, alarm, success = Ival.fold_int aux offsets (dst, false, false) in - if success then alarm, `Value res else true, `Bottom + let res, success = Ival.fold_int aux offsets (dst, false) in + if success then `Value res else `Bottom with Not_less_than -> (* Value to paste, since we cannot be precise *) let v = @@ -2050,11 +2038,8 @@ let update_under ~validity ~exact ~offsets ~size v t = when doing 'find' *) if size <=~ Integer.of_int 128 then let validity_src = Base.validity_from_size size in - let _, v = - find ~validity:validity_src ~conflate_bottom:false - ~offsets:Ival.zero ~size src - in - v + find ~validity:validity_src ~conflate_bottom:false + ~offsets:Ival.zero ~size src else (* This is a struct or an array. Either the result will be imprecise because catenating semi-imprecise values through merge_bits @@ -2074,7 +2059,7 @@ let update_under ~validity ~exact ~offsets ~size v t = (** pastes [from] (of size [size]) at all [offsets] in [dst] *) let paste_slice ~validity ~exact ~from:src ~size ~offsets dst = - if Int.(equal size zero) then (* nothing to do *) false, `Value dst + if Int.(equal size zero) then (* nothing to do *) `Value dst else match offsets, src with (*Special case: [from] contains a single (aligned) binding [v], and [size] @@ -2714,7 +2699,7 @@ module Int_Intervals = struct let max = pred (start_max +~ size) in let curr_off, ifalse = aux_create_interval ~min ~max false in let validity = Base.Known (min, max) in - let _alarm, (curr_off', i) = + let curr_off', i = try Int_Intervals_Map.update_aux ~validity ~exact:true ~offsets:ival ~size true curr_off ifalse @@ -2758,7 +2743,7 @@ module Int_Intervals = struct (* See if using [from_ival_size] would cause an approximation *) let max = pred (start_max +~ size) in let validity = Base.Known (min, max) in - let _, offsets = Tr_offset.trim_by_validity ival size validity in + let offsets = Tr_offset.trim_by_validity ival size validity in if Int_Intervals_Map.update_aux_tr_offsets_approximates offsets size then bottom (* imprecise *) else from_ival_size_over_cached ival size (* precise *) @@ -2836,7 +2821,7 @@ end) = struct let add_binding_ival ~validity ~exact offsets ~size v m = match size with | Int_Base.Value size -> - snd (update ~validity ~exact ~offsets ~size v m) + update ~validity ~exact ~offsets ~size v m | Int_Base.Top -> update_imprecise_everywhere ~validity Origin.top v m diff --git a/src/kernel_services/abstract_interp/offsetmap_sig.mli b/src/kernel_services/abstract_interp/offsetmap_sig.mli index 87ee6349e91..54f47dbbd53 100644 --- a/src/kernel_services/abstract_interp/offsetmap_sig.mli +++ b/src/kernel_services/abstract_interp/offsetmap_sig.mli @@ -29,7 +29,6 @@ open Abstract_interp type v (** Type of the values stored in the offsetmap *) type widen_hint -type alarm = bool (** [true] indicates that an alarm may have occurred *) include Datatype.S (** Datatype for the offsetmaps *) @@ -182,10 +181,9 @@ val find : validity:Base.validity -> ?conflate_bottom:bool -> offsets:Ival.t -> size:Integer.t -> - t -> bool * v + t -> v (** Find the value bound to a set of intervals, expressed as an ival, in the - given rangemap. The returned boolean (alarm) indicates that at least one - of the offsets does not comply with [validity]. *) + given rangemap. *) val find_imprecise: validity:Base.validity-> t -> v (** [find_imprecise ~validity m] returns an imprecise join of the values bound @@ -197,9 +195,9 @@ val find_imprecise_everywhere: t -> v val copy_slice: validity:Base.validity -> offsets:Ival.t -> size:Integer.t -> - t -> alarm * t Bottom.or_bottom + t -> t Bottom.or_bottom (** [copy_slice ~validity ~offsets ~size m] copies and merges the slices of - [m] starting at offsets [offsets] and of size [size]. Offsets invalid + [m] starting at offsets [offsets] and of size [size]. Offsets invalid according to [validity] are removed. [size] must be strictly greater than zero. *) @@ -221,15 +219,14 @@ val update : offsets:Ival.t -> size:Int.t -> v -> - t -> alarm * t Bottom.or_bottom + t -> t Bottom.or_bottom (** [update ?origin ~validity ~exact ~offsets ~size v m] writes [v], of size [size], each [offsets] in [m]; [m] must be of the size implied by [validity]. [~exact=true] results in a strong update, while [~exact=false] performs a weak update. If [offsets] contains too many offsets, or if [offsets] and [size] are not compatible, [offsets] and/or [v] are over-approximated. In this case, [origin] is used as the source of - the resulting imprecision. Returns [`Bottom] when all offsets are invalid. - The boolean returned indicates a potential alarm. *) + the resulting imprecision. Returns [`Bottom] when all offsets are invalid. *) val update_under : validity:Base.validity -> @@ -237,7 +234,7 @@ val update_under : offsets:Ival.t -> size:Int.t -> v -> - t -> alarm * t Bottom.or_bottom + t -> t Bottom.or_bottom (** Same as {!update}, except that no over-approximation on the set of offsets or on the value written occurs. In case of imprecision, [m] is not updated. *) @@ -258,7 +255,7 @@ val paste_slice: from:t -> size:Int.t -> offsets:Ival.t -> - t -> alarm * t Bottom.or_bottom + t -> t Bottom.or_bottom (** {2 Shape} *) diff --git a/src/kernel_services/abstract_interp/tr_offset.ml b/src/kernel_services/abstract_interp/tr_offset.ml index 190317dfd3f..1dff8c7d48b 100644 --- a/src/kernel_services/abstract_interp/tr_offset.ml +++ b/src/kernel_services/abstract_interp/tr_offset.ml @@ -65,9 +65,7 @@ let reduce_offset_by_validity origin ival size validity = | Base.Variable v -> reduce_for_bounds Int.zero v.Base.max_alloc let trim_by_validity ?(origin=Origin.Unknown) ival size validity = - let alarm = not (Base.offset_is_in_validity size validity ival) in - let offset = reduce_offset_by_validity origin ival size validity in - alarm, offset + reduce_offset_by_validity origin ival size validity (* Local Variables: diff --git a/src/kernel_services/abstract_interp/tr_offset.mli b/src/kernel_services/abstract_interp/tr_offset.mli index d59336ec349..a64e29a1612 100644 --- a/src/kernel_services/abstract_interp/tr_offset.mli +++ b/src/kernel_services/abstract_interp/tr_offset.mli @@ -40,16 +40,11 @@ val pretty: t Pretty_utils.formatter (** [trim_by_validity ?origin offsets size validity] reduces [offsets] so that all accesses to [offsets+(0..size-1)] are valid according to [validity]. For a size of 0, consider the offsets up to the validity past-one valid. - The returned boolean indicates that at least one of the offsets does not - comply with [validity]. If the valid offsets cannot be represented - precisely, the [Overlap] constructor is returned. When specified, - the [origin] argument is used as the source of this imprecision . *) + If the valid offsets cannot be represented precisely, the [Overlap] + constructor is returned. When specified, the [origin] argument is used as + the source of this imprecision . *) val trim_by_validity : - ?origin:Origin.t -> - Ival.t -> - Integer.t -> - Base.validity -> - bool (** alarm *) * t + ?origin:Origin.t -> Ival.t -> Integer.t -> Base.validity -> t (** This is a more complete specification of this function, for a single offset [o]. We want to write [size>0 bits], on a base possibly valid between diff --git a/src/plugins/value/domains/cvalue/builtins_memory.ml b/src/plugins/value/domains/cvalue/builtins_memory.ml index e413f5d9ac2..497a32936a5 100644 --- a/src/plugins/value/domains/cvalue/builtins_memory.ml +++ b/src/plugins/value/domains/cvalue/builtins_memory.ml @@ -444,8 +444,8 @@ let memset_typ_offsm_int full_typ i = (* Read [full_offsm] between [offset] and [offset+size-1], and return the value stored there. *) let find size = - snd (V_Offsetmap.find ~validity - ~offsets:(Ival.inject_singleton offset) ~size full_offsm) + V_Offsetmap.find ~validity + ~offsets:(Ival.inject_singleton offset) ~size full_offsm in (* Update [full_offsm] between [offset] and [offset+size-1], and store exactly [v] there *) @@ -490,7 +490,7 @@ let memset_typ_offsm_int full_typ i = if Integer.(gt nb one) then begin (* Copy the result *) let src = Ival.inject_singleton offset in - let _alarm_access, copy = + let copy = V_Offsetmap.copy_slice ~validity ~offsets:src ~size:sizeelt offsm' in @@ -505,7 +505,7 @@ let memset_typ_offsm_int full_typ i = match copy with | `Bottom -> assert false (* the copy is within bounds *) | `Value copy -> - let _alarm_access, r = + let r = V_Offsetmap.paste_slice ~validity ~exact:true ~from:copy ~size:sizeelt ~offsets:dst offsm' in diff --git a/src/plugins/value/domains/cvalue/builtins_string.ml b/src/plugins/value/domains/cvalue/builtins_string.ml index 343dffefba4..00a56357172 100644 --- a/src/plugins/value/domains/cvalue/builtins_string.ml +++ b/src/plugins/value/domains/cvalue/builtins_string.ml @@ -149,7 +149,7 @@ let read_char kind offset cvalue acc = let rec search_each_index kind ~validity ~index ~max offsetmap acc = let offsets = Ival.inject_singleton index in let size = kind.size in - let _, cvalue = Cvalue.V_Offsetmap.find ~validity ~offsets ~size offsetmap in + let cvalue = Cvalue.V_Offsetmap.find ~validity ~offsets ~size offsetmap in let acc = read_char kind offsets cvalue acc in let index = Integer.add index size in if acc.stop || Integer.gt index max diff --git a/src/plugins/value/legacy/eval_op.ml b/src/plugins/value/legacy/eval_op.ml index 7e919716a71..9db5315a07a 100644 --- a/src/plugins/value/legacy/eval_op.ml +++ b/src/plugins/value/legacy/eval_op.ml @@ -54,10 +54,7 @@ let v_uninit_of_offsetmap ~typ offsm = | Int_Base.Value size -> let validity = Base.validity_from_size size in let offsets = Ival.zero in - let _alarm, r = - V_Offsetmap.find ~validity ~conflate_bottom:false ~offsets ~size offsm - in - r + V_Offsetmap.find ~validity ~conflate_bottom:false ~offsets ~size offsm let backward_comp_int_left positive comp l r = if (Value_parameters.UndefinedPointerComparisonPropagateAll.get()) @@ -221,13 +218,13 @@ let add_if_singleton value acc = else acc let find_offsm_under validity ival size offsm acc = - let _alarm, offsets = Tr_offset.trim_by_validity ival size validity in + let offsets = Tr_offset.trim_by_validity ival size validity in match offsets with | Tr_offset.Invalid | Tr_offset.Overlap _ -> acc | Tr_offset.Set list -> let find acc offset = let offsets = Ival.inject_singleton offset in - let _, value = Cvalue.V_Offsetmap.find ~validity ~offsets ~size offsm in + let value = Cvalue.V_Offsetmap.find ~validity ~offsets ~size offsm in add_if_singleton value acc in List.fold_left find acc list diff --git a/src/plugins/value/values/offsm_value.ml b/src/plugins/value/values/offsm_value.ml index ad5cffc13e1..db062fd131d 100644 --- a/src/plugins/value/values/offsm_value.ml +++ b/src/plugins/value/values/offsm_value.ml @@ -44,8 +44,8 @@ let basic_copy ?(start=Int.zero) ~size o = let validity = enough_validity ~start ~size in let offsets = Ival.inject_singleton start in match V_Offsetmap.copy_slice ~validity ~offsets ~size o with - | _, `Bottom -> assert false - | _, `Value r -> r + | `Bottom -> assert false + | `Value r -> r (* paste [src] of size [size_src] starting at [start] in [r]. If [r] has size [size_r], [size+start <= size_r] must hold. *) @@ -56,14 +56,14 @@ let basic_paste ?(start=Int.zero) ~src ~size_src dst = let offsets = Ival.inject_singleton start in let from = src in match V_Offsetmap.paste_slice ~validity ~exact ~from ~size ~offsets dst with - | _, `Bottom -> assert false - | _, `Value r -> r + | `Bottom -> assert false + | `Value r -> r (* Reads [size] bits starting at [start] in [o], as a single value *) let basic_find ?(start=Int.zero) ~size o = let validity = enough_validity ~start ~size in let offsets = Ival.inject_singleton start in - let _, v = V_Offsetmap.find ~validity ~offsets ~size o in + let v = V_Offsetmap.find ~validity ~offsets ~size o in V_Or_Uninitialized.map (fun v -> V.reinterpret_as_int ~signed:false ~size v) v (* Paste [v] of size [size] at position [start] in [o] *) @@ -72,8 +72,8 @@ let basic_add ?(start=Int.zero) ~size v o = let offsets = Ival.inject_singleton start in let v = V_Or_Uninitialized.initialized v in match V_Offsetmap.update ~validity ~exact:true ~offsets ~size v o with - | _, `Value m -> m - | _ -> assert false + | `Value m -> m + | `Bottom -> assert false let inject ~size v = V_Offsetmap.create ~size ~size_v:size (V_Or_Uninitialized.initialized v) -- GitLab From c82ea6d59ac0cac04dfae5e51f264105be11fab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 14 Mar 2019 13:46:37 +0100 Subject: [PATCH 152/376] [Eva] Base: rewrites is_valid_offset and valid_offset. - shares and moves the functions [reduce_offset_by_validity] of Locations and Precise_locs into base.ml. - replaces the boolean argument ~for_writing into the new type access, that represents Read, Write or No_access. Without any access, offsets must point into or just beyond the base validity. - fixes the support of accesses of size 0: they are now invalid: + in bases with Invalid validity; + one past a base validity unless the base ends with an empty struct. --- src/kernel_services/abstract_interp/base.ml | 85 ++++++++++++---- src/kernel_services/abstract_interp/base.mli | 23 ++++- .../abstract_interp/locations.ml | 97 ++++++++----------- .../abstract_interp/locations.mli | 20 ++-- src/plugins/from/from_compute.ml | 6 +- src/plugins/inout/derefs.ml | 2 +- src/plugins/inout/operational_inputs.ml | 6 +- src/plugins/pdg/build.ml | 5 +- .../value/domains/cvalue/builtins_memory.ml | 15 ++- .../value/domains/cvalue/builtins_string.ml | 4 +- .../domains/cvalue/cvalue_specification.ml | 2 +- .../value/domains/equality/equality_domain.ml | 6 +- src/plugins/value/domains/inout_domain.ml | 2 +- src/plugins/value/domains/symbolic_locs.ml | 5 +- .../value/engine/transfer_specification.ml | 2 +- src/plugins/value/gui_files/gui_eval.ml | 9 +- src/plugins/value/legacy/eval_op.ml | 6 +- src/plugins/value/legacy/eval_op.mli | 2 +- src/plugins/value/legacy/eval_terms.ml | 43 ++++---- src/plugins/value/legacy/eval_terms.mli | 4 +- src/plugins/value/register.ml | 15 +-- src/plugins/value/utils/value_util.ml | 2 +- src/plugins/value/values/cvalue_forward.ml | 18 ++-- src/plugins/value/values/main_locations.ml | 9 +- src/plugins/value_types/cvalue.ml | 2 +- src/plugins/value_types/function_Froms.ml | 4 +- src/plugins/value_types/function_Froms.mli | 2 +- src/plugins/value_types/precise_locs.ml | 55 +++-------- src/plugins/value_types/precise_locs.mli | 8 +- tests/pdg/sets.ml | 6 +- tests/slicing/libSelect.ml | 8 +- 31 files changed, 242 insertions(+), 231 deletions(-) diff --git a/src/kernel_services/abstract_interp/base.ml b/src/kernel_services/abstract_interp/base.ml index 4ee29fa9fdc..1c819cd5e87 100644 --- a/src/kernel_services/abstract_interp/base.ml +++ b/src/kernel_services/abstract_interp/base.ml @@ -251,32 +251,83 @@ let is_weak = function | Allocated (_, _, Variable { weak }) -> weak | _ -> false -let offset_is_in_validity size validity ival = - Ival.is_bottom ival || - (* Special case. We stretch the truth and say that the address of the - base itself is valid for a size of 0. A size of 0 appears for: - - empty structs - - memory operations on a 0 size (e.g. memcpy (_, _ 0)) - - internally, to emulate the semantics of "past-one" pointers (in - Cvalue_forward.are_comparable). *) - Int.(equal zero size) && Ival.(equal ival zero) || +(* Does a C type end by an empty struct? *) +let rec final_empty_struct = function + | TArray (typ, _, _, _) -> final_empty_struct typ + | TComp (compinfo, _, _) -> + begin + match compinfo.cfields with + | [] -> true + | l -> + let last_field = List.(hd (rev l)) in + try Cil.bitsSizeOf last_field.ftype = 0 + with Cil.SizeOfError _ -> false + end + | TNamed (typeinfo, _) -> final_empty_struct typeinfo.ttype + | TVoid _ | TInt _ | TFloat _ | TPtr _ | TEnum _ + | TFun _ | TBuiltin_va_list _ -> false + +(* Does a base end by an empty struct? *) +let final_empty_struct = function + | Var (vi, _) | Allocated (vi, _, _) -> final_empty_struct vi.vtype + | _ -> false + +type access = Read of Integer.t | Write of Integer.t | No_access +let for_writing = function Write _ -> true | Read _ | No_access -> false + +let is_empty = function + | Read size | Write size -> Int.(equal zero size) + | No_access -> true + +(* Computes the last valid offset for an access of the base [base] with [max] + valid bits: [max - size + 1] for an access of size [size]. *) +let last_valid_offset base max = function + | Read size | Write size -> + if Int.is_zero size + (* For an access of size 0, [max] is the last valid offset, unless the base + ends by an empty struct, in which case [max+1] is also a valid offset. *) + then if final_empty_struct base then Int.succ max else max + else Int.sub max (Int.pred size) + | No_access -> Int.succ max (* A pointer can point just beyond its object. *) + +let offset_for_validity ~bitfield access base = + match validity base with + | Empty -> if is_empty access then Ival.zero else Ival.bottom + | Invalid -> if access = No_access then Ival.zero else Ival.bottom + | Known (min, max) | Unknown (min, _, max) -> + let max = last_valid_offset base max access in + if bitfield + then Ival.inject_range (Some min) (Some max) + else Ival.inject_interval (Some min) (Some max) Int.zero Int.eight + | Variable variable_v -> + let maxv = last_valid_offset base variable_v.max_alloc access in + Ival.inject_range (Some Int.zero) (Some maxv) + +let valid_offset ?(bitfield=true) access base = + if for_writing access && is_read_only base + then Ival.bottom + else offset_for_validity ~bitfield access base + +let offset_is_in_validity access base ival = let is_valid_for_bounds min_bound max_bound = match Ival.min_and_max ival with | Some min, Some max -> - Int.ge min min_bound && Int.le (Int.add max (Int.pred size)) max_bound + Int.ge min min_bound && + Int.le max (last_valid_offset base max_bound access) | _, _ -> false in - match validity with - | Empty | Invalid -> false + match validity base with + | Empty -> is_empty access && Ival.(equal zero ival) + | Invalid -> access = No_access && Ival.(equal zero ival) | Known (min, max) | Unknown (min, Some max, _) -> is_valid_for_bounds min max - | Unknown (_, None, _) -> false (* all accesses are possibly invalid *) + | Unknown (_, None, _) -> false (* All accesses are possibly invalid. *) | Variable v -> is_valid_for_bounds Int.zero v.min_alloc -let is_valid_offset ~for_writing size base offset = - Ival.is_bottom offset || - not (for_writing && (is_read_only base)) && - offset_is_in_validity size (validity base) offset +let is_valid_offset access base offset = + Ival.is_bottom offset + || not (for_writing access && (is_read_only base)) + && offset_is_in_validity access base offset let is_function base = match base with diff --git a/src/kernel_services/abstract_interp/base.mli b/src/kernel_services/abstract_interp/base.mli index ce45249b747..22ccad956fd 100644 --- a/src/kernel_services/abstract_interp/base.mli +++ b/src/kernel_services/abstract_interp/base.mli @@ -177,10 +177,25 @@ val max_valid_absolute_address: unit -> Int.t val bits_sizeof : t -> Int_Base.t -val is_valid_offset : for_writing:bool -> Int.t -> t -> Ival.t -> bool -(** [is_valid_offset ~for_writing size b offset] checks that [offset] - (expressed in bits) plus [size] bits is valid in [b]. *) - +(** Access kind: read/write of k bits, or no access. + Without any access, an offset must point into or just beyond the base ("one + past the last element of the array object", non-array object being viewed as + array of one element). *) +type access = Read of Int.t | Write of Int.t | No_access + +val is_valid_offset : access -> t -> Ival.t -> bool +(** [is_valid_offset access b offset] holds iff the ival [offset] (expressed in + bits) is completely valid for the [access] of base [b] (it only represents + valid offsets for such an access). Returns false if [offset] may be invalid + for such an access. *) + +val valid_offset: ?bitfield:bool -> access -> t -> Ival.t +(** Computes all offsets that may be valid for an [access] of base [t]. + For bases with variable or unknown validity, the result may not satisfy + [is_valid_offset], as some offsets may be valid or invalid. + [bitfield] is true by default: the computed offset may be offsets of + bitfields. If it is set to false, the computed offsets are byte aligned + (they are all congruent to 0 modulo 8). *) (** {2 Misc} *) diff --git a/src/kernel_services/abstract_interp/locations.ml b/src/kernel_services/abstract_interp/locations.ml index f508068d2db..70ca0060d5d 100644 --- a/src/kernel_services/abstract_interp/locations.ml +++ b/src/kernel_services/abstract_interp/locations.ml @@ -522,40 +522,21 @@ type location = { loc : Location_Bits.t; size : Int_Base.t } -exception Found_two +type access = Read | Write | No_access + +let project_size = function + | Int_Base.Value size -> size + | Int_Base.Top -> Int.zero -(* Reduce [offsets] so that reading [size] from [offsets] fits within - the validity of [base]. If [aligned] is set to true, make the offset - congruent to 0 modulo 8. - Maintain synchronized with Precise_locs.reduce_offset_by_validity. *) -let reduce_offset_by_validity ~for_writing ?(bitfield=true) base offsets size = - if for_writing && Base.is_read_only base then - Ival.bottom - else - match Base.validity base, size with - | Base.Empty, _ -> - if Int_Base.(compare size zero) > 0 then Ival.bottom else Ival.zero - | Base.Invalid, _ -> Ival.bottom - | _, Int_Base.Top -> offsets - | (Base.Known (minv,maxv) | Base.Unknown (minv,_,maxv)), - Int_Base.Value size -> - (* The maximum offset is maxv - (size - 1), except if size = 0, - in which case the maximum offset is exactly maxv. *) - let pred_size = Int.max Int.zero (Int.pred size) in - let maxv = Int.sub maxv pred_size in - let range = - if bitfield - then Ival.inject_range (Some minv) (Some maxv) - else Ival.inject_interval (Some minv) (Some maxv) Int.zero Int.eight - in - Ival.narrow range offsets - | Base.Variable variable_v, Int_Base.Value size -> - let pred_size = Int.max Int.zero (Int.pred size) in - let maxv = Int.sub variable_v.Base.max_alloc pred_size in - let range = - Ival.inject_range (Some Int.zero) (Some maxv) - in - Ival.narrow range offsets +(* Conversion into Base.access. A location valid for an access of unknown size + must be at least valid for an empty access, so accesses of unknown sizes are + converted into empty accesses. *) +let base_access ~size = function + | No_access -> Base.No_access + | Read -> Base.Read (project_size size) + | Write -> Base.Write (project_size size) + +exception Found_two let valid_cardinal_zero_or_one ~for_writing {loc=loc;size=size} = Location_Bits.equal Location_Bits.bottom loc || @@ -566,16 +547,18 @@ let valid_cardinal_zero_or_one ~for_writing {loc=loc;size=size} = already := true in try - match loc with - | Location_Bits.Top _ -> false - | Location_Bits.Map m -> - if Int_Base.is_top size then false - else begin + match loc, size with + | Location_Bits.Top _, _ -> false + | _, Int_Base.Top -> false + | Location_Bits.Map m, Int_Base.Value size -> Location_Bits.M.iter (fun base offsets -> if Base.is_weak base then raise Found_two; + let access = + if for_writing then Base.Write size else Base.Read size + in let valid_offsets = - reduce_offset_by_validity ~for_writing base offsets size + Ival.narrow offsets (Base.valid_offset access base) in if Ival.cardinal_zero_or_one valid_offsets then begin @@ -585,7 +568,6 @@ let valid_cardinal_zero_or_one ~for_writing {loc=loc;size=size} = else raise Found_two ) m; true - end with | Abstract_interp.Error_Top | Found_two -> false @@ -605,14 +587,13 @@ let loc_size { size = size } = size let make_loc loc_bits size = { loc = loc_bits; size = size } -let is_valid ~for_writing {loc; size} = - match size with - | Int_Base.Top -> false - | Int_Base.Value size -> - let is_valid_offset b o = Base.is_valid_offset ~for_writing size b o in - match loc with - | Location_Bits.Top _ -> false - | Location_Bits.Map m -> Location_Bits.M.for_all is_valid_offset m +let is_valid access {loc; size} = + not (Int_Base.is_top size) && + let access = base_access ~size access in + let is_valid_offset = Base.is_valid_offset access in + match loc with + | Location_Bits.Top _ -> false + | Location_Bits.Map m -> Location_Bits.M.for_all is_valid_offset m let filter_base f loc = @@ -696,9 +677,10 @@ let pretty_english ~prefix fmt { loc = m ; size = size } = print_binding fmt off (* Case [Top (Top, _)] must be handled by caller. *) -let enumerate_valid_bits_under_over under_over ~for_writing {loc; size} = +let enumerate_valid_bits_under_over under_over access {loc; size} = + let access = base_access ~size access in let compute_offset base offs acc = - let valid_offset = reduce_offset_by_validity ~for_writing base offs size in + let valid_offset = Ival.narrow offs (Base.valid_offset access base) in if Ival.is_bottom valid_offset then acc else @@ -716,36 +698,37 @@ let interval_from_ival_under base offset size = | Base.Variable { Base.weak = true } -> Int_Intervals.bottom | _ -> Int_Intervals.from_ival_size_under offset size -let enumerate_valid_bits ~for_writing loc = +let enumerate_valid_bits access loc = match loc.loc with | Location_Bits.Top (Base.SetLattice.Top, _) -> Zone.top | _ -> - enumerate_valid_bits_under_over interval_from_ival_over ~for_writing loc + enumerate_valid_bits_under_over interval_from_ival_over access loc ;; -let enumerate_valid_bits_under ~for_writing loc = +let enumerate_valid_bits_under access loc = match loc.size with | Int_Base.Top -> Zone.bottom | Int_Base.Value _ -> match loc.loc with | Location_Bits.Top _ -> Zone.bottom | Location_Bits.Map _ -> - enumerate_valid_bits_under_over interval_from_ival_under ~for_writing loc + enumerate_valid_bits_under_over interval_from_ival_under access loc ;; (** [valid_part l] is an over-approximation of the valid part of the location [l]. *) -let valid_part ~for_writing ?(bitfield=true) {loc = loc; size = size } = +let valid_part access ?(bitfield=true) {loc = loc; size = size } = + let access = base_access ~size access in let compute_loc base offs acc = let valid_offset = - reduce_offset_by_validity ~for_writing ~bitfield base offs size + Ival.narrow offs (Base.valid_offset access ~bitfield base) in if Ival.is_bottom valid_offset then acc else Location_Bits.M.add base valid_offset acc in - let locbits = + let locbits = match loc with | Location_Bits.Top (Base.SetLattice.Top, _) -> loc | Location_Bits.Top (Base.SetLattice.Set _, _) -> diff --git a/src/kernel_services/abstract_interp/locations.mli b/src/kernel_services/abstract_interp/locations.mli index f1facdc3932..654cd6dbc40 100644 --- a/src/kernel_services/abstract_interp/locations.mli +++ b/src/kernel_services/abstract_interp/locations.mli @@ -326,12 +326,18 @@ val make_loc : Location_Bits.t -> Int_Base.t -> location val loc_equal : location -> location -> bool val loc_size : location -> Int_Base.t -val is_valid : for_writing:bool -> location -> bool -(** Is the given location entirely valid, as the destination of a write - operation if [for_writing] is true, as the destination of a read - otherwise. *) +(** Kind of memory access. *) +type access = Read | Write | No_access -val valid_part : for_writing:bool -> ?bitfield:bool -> location -> location +(** Conversion into a base access, with the size information. + Accesses of unknown sizes are converted into empty accesses. *) +val base_access: size:Int_Base.t -> access -> Base.access + +val is_valid : access -> location -> bool +(** Is the given location entirely valid, without any access or as a destination + for a read or write access. *) + +val valid_part : access -> ?bitfield:bool -> location -> location (** Overapproximation of the valid part of the given location. Beware that [is_valid (valid_part loc)] does not necessarily hold, as garbled mix may not be reduced by [valid_part]. @@ -375,10 +381,10 @@ val loc_bits_to_loc_bytes_under : Location_Bits.t -> Location_Bytes.t val enumerate_bits : location -> Zone.t val enumerate_bits_under : location -> Zone.t -val enumerate_valid_bits : for_writing:bool -> location -> Zone.t +val enumerate_valid_bits : access -> location -> Zone.t (** @plugin development guide *) -val enumerate_valid_bits_under : for_writing:bool -> location -> Zone.t +val enumerate_valid_bits_under : access -> location -> Zone.t val zone_of_varinfo : varinfo -> Zone.t (** @since Carbon-20101201 *) diff --git a/src/plugins/from/from_compute.ml b/src/plugins/from/from_compute.ml index 6217f6e42a3..0f49ea62431 100644 --- a/src/plugins/from/from_compute.ml +++ b/src/plugins/from/from_compute.ml @@ -100,7 +100,7 @@ let compute_using_prototype_for_state state kf assigns = let acc = Function_Froms.Memory.add_binding_loc ~exact:false acc output_loc_over input_deps in let output_loc_under_zone = Locations.enumerate_valid_bits_under - ~for_writing:true output_loc_under in + Write output_loc_under in (* Now, perform a strong update on the zones that are guaranteed to be assigned (under-approximation) AND that do not depend on themselves. @@ -347,10 +347,10 @@ struct let deps_of_deps = Function_Froms.Memory.find state.deps_table deps in let all_indirect = Zone.join state.additional_deps deps_of_deps in let deps = Function_Froms.Deps.add_indirect_dep deps_right all_indirect in + let access = if init then Read else Write in { state with deps_table = Function_Froms.Memory.add_binding_precise_loc - ~for_writing:(not init) - ~exact state.deps_table loc deps } + ~exact access state.deps_table loc deps } let transfer_call stmt dest f args _loc state = !Db.progress (); diff --git a/src/plugins/inout/derefs.ml b/src/plugins/inout/derefs.ml index 17ef8fb7dd3..30200c083f7 100644 --- a/src/plugins/inout/derefs.ml +++ b/src/plugins/inout/derefs.ml @@ -47,7 +47,7 @@ class virtual do_it_ = object(self) let loc = loc_bytes_to_loc_bits r in let size = Bit_utils.sizeof_lval lv in self#join - (enumerate_valid_bits ~for_writing:false (make_loc loc size)) + (enumerate_valid_bits Read (make_loc loc size)) end; DoChildren diff --git a/src/plugins/inout/operational_inputs.ml b/src/plugins/inout/operational_inputs.ml index e1e981e872a..d4d164bb0b3 100644 --- a/src/plugins/inout/operational_inputs.ml +++ b/src/plugins/inout/operational_inputs.ml @@ -123,8 +123,8 @@ let eval_assigns kf state assigns = let loc_out_under, loc_out_over, deps = !Db.Properties.Interp.loc_to_loc_under_over ~result:None state out.it_content in - (enumerate_valid_bits_under ~for_writing:true loc_out_under, - enumerate_valid_bits ~for_writing:true loc_out_over, + (enumerate_valid_bits_under Write loc_out_under, + enumerate_valid_bits Write loc_out_over, clean_deps deps) with Db.Properties.Interp.No_conversion -> Inout_parameters.warning ~current:true ~once:true @@ -141,7 +141,7 @@ let eval_assigns kf state assigns = let _, loc, deps = !Db.Properties.Interp.loc_to_loc_under_over None state from in let acc = Zone.join (clean_deps deps) acc in - let z = enumerate_valid_bits ~for_writing:false loc in + let z = enumerate_valid_bits Read loc in Zone.join z acc in List.fold_left aux deps l diff --git a/src/plugins/pdg/build.ml b/src/plugins/pdg/build.ml index 29d65d3c4ca..8d0c5ba63a3 100644 --- a/src/plugins/pdg/build.ml +++ b/src/plugins/pdg/build.ml @@ -471,10 +471,7 @@ let is_variadic kf = let key_return = Key.stmt_key ret_stmt in let return_node = add_elem pdg key_return in let retres_loc = Db.Value.find_return_loc pdg.fct in - let retres = - Locations.enumerate_valid_bits ~for_writing:false - retres_loc - in + let retres = Locations.(enumerate_valid_bits Read retres_loc) in add_dpds pdg return_node Dpd.Data state retres_loc_dpds; add_decl_dpds pdg return_node Dpd.Data retres_decls; let new_state = Pdg_state.add_loc_node state true retres return_node in diff --git a/src/plugins/value/domains/cvalue/builtins_memory.ml b/src/plugins/value/domains/cvalue/builtins_memory.ml index 497a32936a5..dac35d94de1 100644 --- a/src/plugins/value/domains/cvalue/builtins_memory.ml +++ b/src/plugins/value/domains/cvalue/builtins_memory.ml @@ -167,8 +167,8 @@ let frama_c_memcpy state actuals = ~from:offsetmap ~dst_loc:dst_bits ~size:size_min ~exact:true state in let (deps_table, sure_zone) = - let zone_dst = enumerate_valid_bits ~for_writing:true loc_dst in - let zone_src = enumerate_valid_bits ~for_writing:false loc_src in + let zone_dst = enumerate_valid_bits Locations.Write loc_dst in + let zone_src = enumerate_valid_bits Locations.Read loc_src in let deps = Function_Froms.(Deps.add_data_dep Deps.bottom zone_src) in @@ -211,8 +211,8 @@ let frama_c_memcpy state actuals = let loc_dst = make_loc (Location_Bits.shift range dst) size_char in let c_from = let open Function_Froms in - let zone_src = enumerate_valid_bits ~for_writing:false loc_src in - let zone_dst = enumerate_valid_bits ~for_writing:true loc_dst in + let zone_src = enumerate_valid_bits Locations.Read loc_src in + let zone_dst = enumerate_valid_bits Locations.Write loc_dst in let deps = Deps.add_data_dep Deps.bottom zone_src in let deps_table = Memory.add_binding ~exact:false precise_deps_table zone_dst deps @@ -345,7 +345,7 @@ let frama_c_memset_imprecise state dst v size = let loc = loc_bytes_to_loc_bits loc in let loc = make_loc loc (Int_Base.inject size_char) in let state = Cvalue.Model.add_binding ~exact:false state loc v in - (state,enumerate_valid_bits ~for_writing:true loc) + (state,enumerate_valid_bits Locations.Write loc) else (state,Zone.bottom) in (* Write "sure" bytes in an exact way: they exist only if there is only @@ -367,7 +367,7 @@ let frama_c_memset_imprecise state dst v size = ~from ~dst_loc:left' ~size:sure ~exact:true new_state in let sure_loc = make_loc left' (Int_Base.inject sure) in - let sure_zone = enumerate_valid_bits ~for_writing:true sure_loc in + let sure_zone = enumerate_valid_bits Locations.Write sure_loc in (state,sure_zone) else (new_state,Zone.bottom) @@ -591,8 +591,7 @@ let frama_c_memset_precise state dst v (exp_size, size) = let open Function_Froms in let size_bits = Integer.mul size (Bit_utils.sizeofchar ())in let dst_location = Locations.make_loc dst_loc (Int_Base.Value size_bits) in - let dst_zone = Locations.enumerate_valid_bits - ~for_writing:true dst_location in + let dst_zone = Locations.(enumerate_valid_bits Write dst_location) in let deps_table = Function_Froms.Memory.add_binding ~exact:true Function_Froms.Memory.empty dst_zone input in diff --git a/src/plugins/value/domains/cvalue/builtins_string.ml b/src/plugins/value/domains/cvalue/builtins_string.ml index 00a56357172..3298ae3d4d4 100644 --- a/src/plugins/value/domains/cvalue/builtins_string.ml +++ b/src/plugins/value/domains/cvalue/builtins_string.ml @@ -344,10 +344,10 @@ let search_char kind ~length state str = let reduce_by_validity ~size cvalue = let loc_bits = Locations.loc_bytes_to_loc_bits cvalue in let loc = Locations.make_loc loc_bits (Int_Base.inject size) in - if Locations.is_valid ~for_writing:false loc + if Locations.(is_valid Read loc) then loc.Locations.loc, true else - let valid_loc = Locations.valid_part ~for_writing:false ~bitfield:true loc in + let valid_loc = Locations.(valid_part Read ~bitfield:true loc) in valid_loc.Locations.loc, false type char = Char | Wide diff --git a/src/plugins/value/domains/cvalue/cvalue_specification.ml b/src/plugins/value/domains/cvalue/cvalue_specification.ml index 69a39589b18..756a15776b1 100644 --- a/src/plugins/value/domains/cvalue/cvalue_specification.ml +++ b/src/plugins/value/domains/cvalue/cvalue_specification.ml @@ -36,7 +36,7 @@ let eval_assigns_from pre_state it = let eval_env = Eval_terms.env_assigns pre_state in let under, _ = Eval_terms.eval_tlval_as_zone_under_over - ~alarm_mode:Eval_terms.Ignore ~for_writing:false eval_env term + ~alarm_mode:Eval_terms.Ignore Locations.Read eval_env term in under diff --git a/src/plugins/value/domains/equality/equality_domain.ml b/src/plugins/value/domains/equality/equality_domain.ml index 844b890277e..69f1c355b3a 100644 --- a/src/plugins/value/domains/equality/equality_domain.ml +++ b/src/plugins/value/domains/equality/equality_domain.ml @@ -406,9 +406,7 @@ module Make let assign _stmt left_value right_expr value valuation state = let open Locations in let left_loc = Precise_locs.imprecise_location left_value.lloc in - let direct_left_zone = - Locations.enumerate_valid_bits ~for_writing:true left_loc - in + let direct_left_zone = Locations.(enumerate_valid_bits Write left_loc) in let state = kill Hcexprs.Modified direct_left_zone state in let right_expr = Cil.constFold true right_expr in try @@ -515,7 +513,7 @@ module Make let logic_assign _assigns location ~pre:_ state = let loc = Precise_locs.imprecise_location location in - let zone = Locations.enumerate_valid_bits ~for_writing:true loc in + let zone = Locations.(enumerate_valid_bits Write loc) in kill Hcexprs.Modified zone state let evaluate_predicate _ _ _ = Alarmset.Unknown diff --git a/src/plugins/value/domains/inout_domain.ml b/src/plugins/value/domains/inout_domain.ml index d6dd5b5afde..bd2e643f14d 100644 --- a/src/plugins/value/domains/inout_domain.ml +++ b/src/plugins/value/domains/inout_domain.ml @@ -177,7 +177,7 @@ module Transfer = struct let inputs_lv = Value_util.indirect_zone_of_lval to_z lv.Eval.lval in let inputs = Zone.join inputs_e inputs_lv in let outputs = - Precise_locs.enumerate_valid_bits ~for_writing:true lv.Eval.lloc + Precise_locs.enumerate_valid_bits Locations.Write lv.Eval.lloc in let exact_outputs = Precise_locs.cardinal_zero_or_one lv.Eval.lloc in { diff --git a/src/plugins/value/domains/symbolic_locs.ml b/src/plugins/value/domains/symbolic_locs.ml index 6bf6163b4fa..1d197a22ce9 100644 --- a/src/plugins/value/domains/symbolic_locs.ml +++ b/src/plugins/value/domains/symbolic_locs.ml @@ -368,7 +368,7 @@ module Memory = struct List.fold_left aux_vi state l let kill loc state = - let z = Locations.enumerate_valid_bits ~for_writing:false loc in + let z = Locations.(enumerate_valid_bits Read loc) in fold_overwritten remove_key state z state (* Add the the mapping [lv --> v] to [state] when possible. @@ -378,8 +378,7 @@ module Memory = struct state else let k = K.HCE.of_lval lv in - let for_writing = false in - let z_lv = Precise_locs.enumerate_valid_bits ~for_writing (get_z lv) in + let z_lv = Precise_locs.enumerate_valid_bits Locations.Read (get_z lv) in let z_lv_indirect = Value_util.indirect_zone_of_lval get_z lv in if Locations.Zone.intersects z_lv z_lv_indirect then (* The location of [lv] intersects with the zones needed to compute diff --git a/src/plugins/value/engine/transfer_specification.ml b/src/plugins/value/engine/transfer_specification.ml index 4caa148ad23..dc968ee3006 100644 --- a/src/plugins/value/engine/transfer_specification.ml +++ b/src/plugins/value/engine/transfer_specification.ml @@ -133,7 +133,7 @@ let reduce_to_valid_location out loc = None end else - let valid = Locations.valid_part ~for_writing:true loc in + let valid = Locations.(valid_part Write loc) in if Locations.is_bottom_loc valid then begin if is_assigns out && not (Locations.is_bottom_loc loc) then diff --git a/src/plugins/value/gui_files/gui_eval.ml b/src/plugins/value/gui_files/gui_eval.ml index a2b2f89b704..06607377956 100644 --- a/src/plugins/value/gui_files/gui_eval.ml +++ b/src/plugins/value/gui_files/gui_eval.ml @@ -193,7 +193,7 @@ module Make (X: Analysis.S) = struct if Cvalue.Model.is_reachable state then if Int_Base.(equal loc.Locations.size zero) then GO_Empty, true else - let loc' = Locations.valid_part ~for_writing:false loc in + let loc' = Locations.(valid_part Read loc) in if Locations.is_bottom_loc loc' then GO_InvalidLoc, false else @@ -202,7 +202,7 @@ module Make (X: Analysis.S) = struct match Cvalue.Model.copy_offsetmap loc'.Locations.loc size state with | `Bottom -> GO_Bottom, false | `Value offsm -> - let ok = Locations.is_valid ~for_writing:false loc in + let ok = Locations.(is_valid Read loc) in GO_Offsetmap offsm, ok with Abstract_interp.Error_Top -> GO_Top, false else (* Bottom state *) @@ -261,7 +261,7 @@ module Make (X: Analysis.S) = struct | `Bottom -> Locations.Zone.bottom, false, false | `Value loc -> let ploc = get_precise_loc loc in - let z = Precise_locs.enumerate_valid_bits ~for_writing:false ploc in + let z = Precise_locs.enumerate_valid_bits Locations.Read ploc in z, false, false in {eval_and_warn=lv_to_zone; @@ -439,8 +439,7 @@ module Make (X: Analysis.S) = struct let tlv_to_zone env tlv = let alarms = ref false in let alarm_mode = Eval_terms.Track alarms in - let for_writing = false in - let z = Eval_terms.eval_tlval_as_zone ~for_writing env ~alarm_mode tlv in + let z = Eval_terms.eval_tlval_as_zone Locations.Read env ~alarm_mode tlv in z, not !alarms, false in {eval_and_warn=tlv_to_zone; diff --git a/src/plugins/value/legacy/eval_op.ml b/src/plugins/value/legacy/eval_op.ml index 9db5315a07a..207409c2290 100644 --- a/src/plugins/value/legacy/eval_op.ml +++ b/src/plugins/value/legacy/eval_op.ml @@ -130,7 +130,7 @@ let reduce_by_initialized_defined f loc state = | Ival.Not_Singleton_Int (* from Ival.project_int *) -> state -let reduce_by_valid_loc ~positive ~for_writing loc typ state = +let reduce_by_valid_loc ~positive access loc typ state = try let value = Cvalue.Model.find state loc in if Cvalue.V.is_imprecise value then @@ -143,7 +143,7 @@ let reduce_by_valid_loc ~positive ~for_writing loc typ state = let reduced_value = Locations.loc_to_loc_without_size (if positive - then Locations.valid_part ~for_writing value_as_loc + then Locations.valid_part access value_as_loc else Locations.invalid_part value_as_loc ) in if V.equal value reduced_value @@ -176,7 +176,7 @@ let apply_on_all_locs f loc state = | Int_Base.Top -> state | Int_Base.Value _ as size -> try - let loc = Locations.valid_part ~for_writing:false loc in + let loc = Locations.valid_part Locations.Read loc in let loc = loc.Locations.loc in let plevel = Value_parameters.ArrayPrecisionLevel.get() in ignore (Locations.Location_Bits.cardinal_less_than loc plevel); diff --git a/src/plugins/value/legacy/eval_op.mli b/src/plugins/value/legacy/eval_op.mli index a50dbf5673e..d151cccfcca 100644 --- a/src/plugins/value/legacy/eval_op.mli +++ b/src/plugins/value/legacy/eval_op.mli @@ -60,7 +60,7 @@ val apply_on_all_locs: val reduce_by_valid_loc: positive:bool -> - for_writing:bool -> + Locations.access -> Locations.location -> typ -> Model.t -> Model.t (* [reduce_by_valid_loc positive ~for_writing loc typ state] reduces [state] so that [loc] contains a pointer [p] such that [(typ* )p] is diff --git a/src/plugins/value/legacy/eval_terms.ml b/src/plugins/value/legacy/eval_terms.ml index bd7d695d456..72aaae64939 100644 --- a/src/plugins/value/legacy/eval_terms.ml +++ b/src/plugins/value/legacy/eval_terms.ml @@ -123,7 +123,7 @@ let alarm_reduce_mode () = if Value_parameters.ReduceOnLogicAlarms.get () then Ignore else Fail let find_or_alarm ~alarm_mode state loc = - let is_invalid = not (Locations.is_valid ~for_writing:false loc) in + let is_invalid = not Locations.(is_valid Read loc) in track_alarms is_invalid alarm_mode; let v = Model.find_indeterminate ~conflate_bottom:true state loc in let is_indeterminate = Cvalue.V_Or_Uninitialized.is_indeterminate v in @@ -737,7 +737,7 @@ let rec eval_term ~alarm_mode env t = let deps = if Cvalue.Model.is_reachable state then add_deps env.e_cur empty_logic_deps - (enumerate_valid_bits ~for_writing:false eover_loc) + (enumerate_valid_bits Locations.Read eover_loc) else empty_logic_deps in let eunder_loc = make_loc (lval.eunder) size in @@ -1303,16 +1303,16 @@ let eval_tlval_as_location_with_deps ~alarm_mode env t = (* Return a pair of (under-approximating, over-approximating) zones. *) -let eval_tlval_as_zone_under_over ~alarm_mode ~for_writing env t = +let eval_tlval_as_zone_under_over ~alarm_mode access env t = let r = eval_tlval ~alarm_mode env t in let s = Eval_typ.sizeof_lval_typ r.etype in - let under = enumerate_valid_bits_under ~for_writing (make_loc r.eunder s) in - let over = enumerate_valid_bits ~for_writing (make_loc r.eover s) in + let under = enumerate_valid_bits_under access (make_loc r.eunder s) in + let over = enumerate_valid_bits access (make_loc r.eover s) in (under, over) -let eval_tlval_as_zone ~alarm_mode ~for_writing env t = +let eval_tlval_as_zone ~alarm_mode access env t = let _under, over = - eval_tlval_as_zone_under_over ~alarm_mode ~for_writing env t + eval_tlval_as_zone_under_over ~alarm_mode access env t in over @@ -1487,7 +1487,7 @@ let eval_forall_predicate state r test = let size_bits = Eval_typ.sizeof_lval_typ r.etype in let make_loc loc = make_loc loc size_bits in let over_loc = make_loc r.eover in - if not (Locations.is_valid ~for_writing:false over_loc) then c_alarm (); + if not Locations.(is_valid Read over_loc) then c_alarm (); match forall_in_over_location state over_loc test with | Unknown -> let under_loc = make_loc r.eunder in @@ -1604,7 +1604,7 @@ let reduce_by_known_papp env positive li _labels args = can evaluate, but on which we are not able to reduce on (yet ?).*) env -let reduce_by_valid env positive ~for_writing (tset: term) = +let reduce_by_valid env positive access (tset: term) = (* Auxiliary function that reduces \valid(lv+offs), where lv is atomic (no more tsets), and offs is a bits-expressed constant offset. [offs_typ] is supposed to be the type of the pointed location after [offs] @@ -1625,7 +1625,7 @@ let reduce_by_valid env positive ~for_writing (tset: term) = let lshifted_p = make_loc shifted_p (Eval_typ.sizeof_lval_typ offs_typ) in let valid = (* reduce the shifted pointer to the wanted part *) if positive - then Locations.valid_part ~for_writing lshifted_p + then Locations.valid_part access lshifted_p else Locations.invalid_part lshifted_p in let valid = valid.loc in @@ -1661,7 +1661,7 @@ let reduce_by_valid env positive ~for_writing (tset: term) = let aux_one_lval typ loc env = try let state = - Eval_op.reduce_by_valid_loc ~positive ~for_writing + Eval_op.reduce_by_valid_loc ~positive access loc typ (env_current_state env) in overwrite_current_state env state @@ -1876,9 +1876,9 @@ let rec reduce_by_predicate ~alarm_mode env positive p = | _,Pvalid (_label,tsets) -> (* TODO: label should not be ignored. Instead, we should clear variables that are not in scope at the label. *) - reduce_by_valid env positive ~for_writing:true tsets + reduce_by_valid env positive Write tsets | _,Pvalid_read (_label,tsets) -> - reduce_by_valid env positive ~for_writing:false tsets + reduce_by_valid env positive Read tsets | _,Pvalid_function _tsets -> env (* TODO *) @@ -2019,28 +2019,29 @@ and eval_predicate env pred = | Pvalid (_label, tsets) | Pvalid_read (_label, tsets) -> begin (* TODO: see same constructor in reduce_by_predicate *) try - let for_writing = - (match p.pred_content with Pvalid_read _ -> false | _ -> true) in + let access = + match p.pred_content with Pvalid_read _ -> Read | _ -> Write + in let state = env_current_state env in let typ_pointed = Logic_typing.ctype_of_pointed tsets.term_type in (* Check if we are trying to write in a const l-value *) - if for_writing && Value_util.is_const_write_invalid typ_pointed then + if access = Write && Value_util.is_const_write_invalid typ_pointed then raise Stop; let size = Eval_typ.sizeof_lval_typ typ_pointed in (* Check that the given location is valid *) let valid ~over:locbytes_over ~under:locbytes_under = let loc = loc_bytes_to_loc_bits locbytes_over in let loc = Locations.make_loc loc size in - if not (Locations.is_valid ~for_writing loc) then ( + if not Locations.(is_valid access loc) then ( (* \valid does not hold if the over-approximation is invalid everywhere, or if a part of the under-approximation is invalid *) - let valid = valid_part ~for_writing loc in + let valid = valid_part access loc in if Locations.is_bottom_loc valid then raise Stop; let loc_under = loc_bytes_to_loc_bits locbytes_under in let loc_under = Locations.make_loc loc_under size in let valid_loc_under = - Locations.valid_part ~for_writing loc_under + Locations.valid_part access loc_under in if not (Location.equal loc_under valid_loc_under) then raise Stop; @@ -2051,7 +2052,7 @@ and eval_predicate env pred = (* Evaluate the left-value, and check that it is initialized and not an escaping pointer *) let loc = eval_tlval_as_location ~alarm_mode env tsets in - if not (Locations.is_valid ~for_writing:false loc) then + if not Locations.(is_valid Read loc) then c_alarm (); let v = Model.find_indeterminate state loc in let v, ok = match v with @@ -2329,7 +2330,7 @@ let predicate_deps env pred = | Pinitialized (lbl, tsets) | Pdangling (lbl, tsets) -> let loc, deploc = eval_tlval_as_location_with_deps ~alarm_mode env tsets in - let zone = enumerate_valid_bits ~for_writing:false loc in + let zone = enumerate_valid_bits Locations.Read loc in Logic_label.Map.add lbl zone deploc | Pnot p -> do_eval env p diff --git a/src/plugins/value/legacy/eval_terms.mli b/src/plugins/value/legacy/eval_terms.mli index 6f8c8f5334b..9a134a1b1ae 100644 --- a/src/plugins/value/legacy/eval_terms.mli +++ b/src/plugins/value/legacy/eval_terms.mli @@ -83,7 +83,7 @@ type alarm_mode = (** Return a pair of (under-approximating, over-approximating) zones. *) val eval_tlval_as_zone_under_over: alarm_mode:alarm_mode -> - for_writing:bool -> eval_env -> term -> Zone.t * Zone.t + Locations.access -> eval_env -> term -> Zone.t * Zone.t (* ML: Should not be exported. *) type 'a eval_result = { @@ -104,7 +104,7 @@ val eval_tlval_as_location : val eval_tlval_as_zone : alarm_mode:alarm_mode -> - for_writing:bool -> eval_env -> term -> Zone.t + Locations.access -> eval_env -> term -> Zone.t val eval_predicate : eval_env -> predicate -> predicate_status diff --git a/src/plugins/value/register.ml b/src/plugins/value/register.ml index 2c7b988317a..c3ec4215b3a 100644 --- a/src/plugins/value/register.ml +++ b/src/plugins/value/register.ml @@ -59,7 +59,7 @@ let assigns_inputs_to_zone state assigns = (fun acc t -> let z = Eval_terms.eval_tlval_as_zone ~alarm_mode:Eval_terms.Ignore - ~for_writing:false env t.it_content + Read env t.it_content in Zone.join acc z) acc @@ -96,7 +96,7 @@ let assigns_outputs_aux ~eval ~bot ~top ~join state ~result assigns = let assigns_outputs_to_zone = let eval env term = Eval_terms.eval_tlval_as_zone - ~alarm_mode:Eval_terms.Ignore ~for_writing:true env term + ~alarm_mode:Eval_terms.Ignore Write env term in assigns_outputs_aux ~eval ~bot:Locations.Zone.bottom ~top:Locations.Zone.top ~join:Locations.Zone.join @@ -211,7 +211,7 @@ and eval_deps_lval state lv = match loc with | `Bottom -> deps | `Value loc -> - let deps_lv = Precise_locs.enumerate_valid_bits ~for_writing loc in + let deps_lv = Precise_locs.enumerate_valid_bits Read loc in Locations.Zone.join deps deps_lv and eval_deps_addr state (h, o:lval) = Locations.Zone.join (eval_deps_host state h) (eval_deps_offset state o) @@ -399,7 +399,7 @@ module Export (Eval : Eval) = struct let _, r = lval_to_precise_loc_with_deps_state_alarm ?with_alarms state ~deps:None lv in - let zone = Precise_locs.enumerate_valid_bits ~for_writing:false r in + let zone = Precise_locs.enumerate_valid_bits Read r in Locations.Zone.join acc zone in Db.Value.fold_state_callstack @@ -407,7 +407,7 @@ module Export (Eval : Eval) = struct let lval_to_zone_state state lv = let _, r = lval_to_precise_loc_with_deps_state state ~deps:None lv in - Precise_locs.enumerate_valid_bits ~for_writing:false r + Precise_locs.enumerate_valid_bits Read r let lval_to_zone_with_deps_state state ~for_writing ~deps lv = let deps, r = lval_to_precise_loc_with_deps_state state ~deps lv in @@ -416,14 +416,15 @@ module Export (Eval : Eval) = struct then Precise_locs.loc_bottom else r in - let zone = Precise_locs.enumerate_valid_bits ~for_writing r in + let access = if for_writing then Write else Read in + let zone = Precise_locs.enumerate_valid_bits access r in let exact = Precise_locs.valid_cardinal_zero_or_one ~for_writing r in deps, zone, exact let lval_to_offsetmap_aux ?with_alarms state lv = let loc = - Locations.valid_part ~for_writing:false + Locations.valid_part Read (lval_to_loc ?with_alarms state lv) in match loc.Locations.size with diff --git a/src/plugins/value/utils/value_util.ml b/src/plugins/value/utils/value_util.ml index db6e355de38..99bfd13838f 100644 --- a/src/plugins/value/utils/value_util.ml +++ b/src/plugins/value/utils/value_util.ml @@ -271,7 +271,7 @@ let rec zone_of_expr find_loc expr = and zone_of_lval find_loc lval = let ploc = find_loc lval in let loc = Precise_locs.imprecise_location ploc in - let zone = Locations.enumerate_valid_bits ~for_writing:false loc in + let zone = Locations.(enumerate_valid_bits Read loc) in Locations.Zone.join zone (indirect_zone_of_lval find_loc lval) diff --git a/src/plugins/value/values/cvalue_forward.ml b/src/plugins/value/values/cvalue_forward.ml index 9051330001c..81f7f534772 100644 --- a/src/plugins/value/values/cvalue_forward.ml +++ b/src/plugins/value/values/cvalue_forward.ml @@ -61,14 +61,12 @@ let are_comparable_string pointer1 pointer2 = In practice, function pointers are considered possible or one past when their offset is 0. For object pointers, the offset is checked against the validity of each base, taking past-one into account. *) -let possible_pointer ~one_past location = +let possible_pointer access location = let location = Locations.loc_bytes_to_loc_bits location in let is_possible_offset base offs = - if Base.is_function base then - Ival.is_zero offs - else - let size = if one_past then Integer.zero else Integer.one in - Base.is_valid_offset ~for_writing:false size base offs + if Base.is_function base + then Ival.is_zero offs + else Base.is_valid_offset access base offs in Locations.Location_Bits.for_all is_possible_offset location @@ -107,8 +105,8 @@ let are_comparable_reason kind ev1 ev2 = else (* Both pointers have to be almost valid (they can be pointers to one past an array object. *) - if (not (possible_pointer ~one_past:true rest_1)) || - (not (possible_pointer ~one_past:true rest_2)) + if (not (possible_pointer Base.No_access rest_1)) || + (not (possible_pointer Base.No_access rest_2)) then false, `Invalid_pointer else (* Equality operators allow the comparison between an almost valid pointer @@ -133,8 +131,8 @@ let are_comparable_reason kind ev1 ev2 = then false, `Rel_different_bases else (* If both addresses are valid, they can be compared for equality. *) - if (possible_pointer ~one_past:false rest_1) && - (possible_pointer ~one_past:false rest_2) + if (possible_pointer (Base.Read Integer.one) rest_1) && + (possible_pointer (Base.Read Integer.one) rest_2) then (* But beware of the comparisons of literal strings. *) if are_comparable_string rest_1 rest_2 diff --git a/src/plugins/value/values/main_locations.ml b/src/plugins/value/values/main_locations.ml index 3645e0e14d0..f98119eab16 100644 --- a/src/plugins/value/values/main_locations.ml +++ b/src/plugins/value/values/main_locations.ml @@ -138,13 +138,14 @@ module PLoc = struct let eval_varinfo varinfo = make (Locations.loc_of_varinfo varinfo) - let is_valid ~for_writing loc = - Locations.is_valid ~for_writing (Precise_locs.imprecise_location loc) + let is_valid access loc = + Locations.is_valid access (Precise_locs.imprecise_location loc) let assume_valid_location ~for_writing ~bitfield loc = - if not (is_valid ~for_writing loc) + let access = Locations.(if for_writing then Write else Read) in + if not (is_valid access loc) then - let loc = Precise_locs.valid_part ~for_writing ~bitfield loc in + let loc = Precise_locs.valid_part access ~bitfield loc in if Precise_locs.is_bottom_loc loc then `False else `Unknown loc else `True diff --git a/src/plugins/value_types/cvalue.ml b/src/plugins/value_types/cvalue.ml index 7ee4502377b..fd1b472fbcc 100644 --- a/src/plugins/value_types/cvalue.ml +++ b/src/plugins/value_types/cvalue.ml @@ -103,7 +103,7 @@ module V = struct then Ival.contains_zero offset else let bits_offset = Ival.scale (Bit_utils.sizeofchar()) offset in - not (Base.is_valid_offset ~for_writing:false Int.zero base bits_offset) + not Base.(is_valid_offset No_access base bits_offset) in Location_Bytes.exists offset_contains_zero loc diff --git a/src/plugins/value_types/function_Froms.ml b/src/plugins/value_types/function_Froms.ml index 4fd759f702f..4de3b0ed250 100644 --- a/src/plugins/value_types/function_Froms.ml +++ b/src/plugins/value_types/function_Froms.ml @@ -372,9 +372,9 @@ module Memory = struct let find z m = Deps.to_zone (find_precise z m) - let add_binding_precise_loc ~exact ~for_writing m loc v = + let add_binding_precise_loc ~exact access m loc v = let aux_one_loc loc m = - let loc = Locations.valid_part ~for_writing loc in + let loc = Locations.valid_part access loc in add_binding_loc ~exact m loc (DepsOrUnassigned.AssignedFrom v) in Precise_locs.fold aux_one_loc loc m diff --git a/src/plugins/value_types/function_Froms.mli b/src/plugins/value_types/function_Froms.mli index 0c385d02544..b05c9dd733f 100644 --- a/src/plugins/value_types/function_Froms.mli +++ b/src/plugins/value_types/function_Froms.mli @@ -103,7 +103,7 @@ module Memory : sig val add_binding: exact:bool -> t -> Locations.Zone.t -> Deps.t -> t val add_binding_loc: exact:bool -> t -> Locations.location -> Deps.t -> t val add_binding_precise_loc: - exact:bool -> for_writing:bool -> t -> + exact:bool -> Locations.access -> t -> Precise_locs.precise_location -> Deps.t -> t val bind_var: Cil_types.varinfo -> Deps.t -> t -> t val unbind_var: Cil_types.varinfo -> t -> t diff --git a/src/plugins/value_types/precise_locs.ml b/src/plugins/value_types/precise_locs.ml index 9d0eb8c75c7..66689b97a1f 100644 --- a/src/plugins/value_types/precise_locs.ml +++ b/src/plugins/value_types/precise_locs.ml @@ -305,8 +305,8 @@ let fold f pl acc = in fold_offset aux_po po acc -let enumerate_valid_bits ~for_writing loc = - let aux loc z = Zone.join z (enumerate_valid_bits ~for_writing loc) in +let enumerate_valid_bits access loc = + let aux loc z = Zone.join z (enumerate_valid_bits access loc) in fold aux loc Zone.bottom @@ -323,7 +323,8 @@ let valid_cardinal_zero_or_one ~for_writing pl = try ignore (fold (fun loc found_one -> - let valid = Locations.valid_part ~for_writing loc in + let access = if for_writing then Write else Read in + let valid = Locations.valid_part access loc in if Locations.is_bottom_loc loc then found_one else if Locations.cardinal_zero_or_one valid then @@ -355,50 +356,20 @@ let rec reduce_offset_by_range range offset = match offset with let offset = reduce_offset_by_range range offset in if offset = POBottom then offset else POShift (shift, offset, card) -(* Maintain synchronized with Locations.reduce_offset_by_validity *) -let reduce_offset_by_validity ~for_writing ~bitfield base offset size = - if for_writing && Base.is_read_only base then - POBottom - else - match Base.validity base, size with - | Base.Empty, _ -> - if Int_Base.(compare size zero) > 0 - then POBottom - else reduce_offset_by_range Ival.zero offset - | Base.Invalid, _ -> POBottom - | _, Int_Base.Top -> offset - | (Base.Known (minv, maxv) | Base.Unknown (minv,_,maxv)), - Int_Base.Value size -> - (* The maximum offset is maxv - (size - 1), except if size = 0, - in which case the maximum offset is exactly maxv. *) - let pred_size = Int.max Int.zero (Int.pred size) in - let maxv = Int.sub maxv pred_size in - let range = - if bitfield - then Ival.inject_range (Some minv) (Some maxv) - else Ival.inject_interval (Some minv) (Some maxv) Int.zero Int.eight - in - reduce_offset_by_range range offset - | Base.Variable variable_v, Int_Base.Value size -> - let pred_size = Int.max Int.zero (Int.pred size) in - let maxv = Int.sub variable_v.Base.max_alloc pred_size in - let range = - if bitfield - then Ival.inject_range (Some Int.zero) (Some maxv) - else Ival.inject_interval (Some Int.zero) (Some maxv) Int.zero Int.eight - in - reduce_offset_by_range range offset - +let reduce_offset_by_validity ~bitfield access size base offset = + let access = Locations.base_access ~size access in + let range = Base.valid_offset ~bitfield access base in + if Ival.is_bottom range then POBottom else reduce_offset_by_range range offset -let reduce_by_valid_part ~for_writing ~bitfield precise_loc size = +let reduce_by_valid_part access ~bitfield precise_loc size = match precise_loc with | PLBottom -> precise_loc | PLLoc loc -> let loc = Locations.make_loc loc size in - PLLoc Locations.((valid_part ~for_writing ~bitfield loc).Locations.loc) + PLLoc Locations.((valid_part access ~bitfield loc).Locations.loc) | PLVarOffset (base, offset) -> begin - match reduce_offset_by_validity ~for_writing ~bitfield base offset size with + match reduce_offset_by_validity ~bitfield access size base offset with | POBottom -> PLBottom | offset -> PLVarOffset (base, offset) end @@ -407,8 +378,8 @@ let reduce_by_valid_part ~for_writing ~bitfield precise_loc size = simultaneously [loc] and [offset]. We do nothing for the time being. *) precise_loc -let valid_part ~for_writing ~bitfield {loc; size} = - { loc = reduce_by_valid_part ~for_writing ~bitfield loc size; +let valid_part access ~bitfield {loc; size} = + { loc = reduce_by_valid_part ~bitfield access loc size; size = size } (* diff --git a/src/plugins/value_types/precise_locs.mli b/src/plugins/value_types/precise_locs.mli index 2ed59ce10ab..a45c5391d1c 100644 --- a/src/plugins/value_types/precise_locs.mli +++ b/src/plugins/value_types/precise_locs.mli @@ -88,7 +88,7 @@ val fold: (Locations.location -> 'a -> 'a) -> precise_location -> 'a -> 'a val enumerate_valid_bits: - for_writing:bool -> precise_location -> Locations.Zone.t + Locations.access -> precise_location -> Locations.Zone.t val valid_cardinal_zero_or_one: for_writing:bool -> precise_location -> bool (** Is the restriction of the given location to its valid part precise enough @@ -101,9 +101,9 @@ val cardinal_zero_or_one: precise_location -> bool val pretty_loc: precise_location Pretty_utils.formatter val valid_part: - for_writing:bool -> bitfield:bool -> precise_location -> precise_location -(** Overapproximation of the valid part of the given location for a read or write - operation, according to the [for_writing] boolean. + Locations.access -> bitfield:bool -> precise_location -> precise_location +(** Overapproximation of the valid part of the given location (without any + access, or for a read or write access). [bitfield] indicates whether the location may be the one of a bitfield, and is true by default. If it is set to false, the location is assumed to be byte aligned, and its offset (expressed in bits) is reduced to be congruent diff --git a/tests/pdg/sets.ml b/tests/pdg/sets.ml index c0753d1cddd..5fcdf037acd 100644 --- a/tests/pdg/sets.ml +++ b/tests/pdg/sets.ml @@ -30,11 +30,7 @@ let main _ = v in - let y_zone = - Locations.enumerate_valid_bits - ~for_writing:false - (Locations.loc_of_varinfo y) - in + let y_zone = Locations.(enumerate_valid_bits Read (loc_of_varinfo y)) in let y_at_11_nodes, undef = (* y=5 *) !Pdg.find_location_nodes_at_stmt pdg (fst (Kernel_function.find_from_sid 11)) ~before:false y_zone diff --git a/tests/slicing/libSelect.ml b/tests/slicing/libSelect.ml index 39a9a84a8ea..41e55de6abc 100644 --- a/tests/slicing/libSelect.ml +++ b/tests/slicing/libSelect.ml @@ -77,7 +77,7 @@ let get_zones str_data (kinst, kf) = let lval_term = !Db.Properties.Interp.term_lval kf str_data in let lval = !Db.Properties.Interp.term_lval_to_lval ~result:None lval_term in let loc = !Db.Value.lval_to_loc (Cil_types.Kstmt kinst) lval in - Locations.enumerate_valid_bits ~for_writing:false loc + Locations.(enumerate_valid_bits Read loc) ;; let select_data_before_stmt str_data kinst kf = @@ -91,11 +91,7 @@ let select_retres kf = let ki = Kernel_function.find_return kf in try let loc = Db.Value.find_return_loc kf in - let zone = - Locations.enumerate_valid_bits - ~for_writing:false - loc - in + let zone = Locations.(enumerate_valid_bits Read loc) in let mark = Slicing.Api.Mark.make ~data:true ~addr:false ~ctrl:false in let before = false in Slicing.Api.Select.select_stmt_zone_internal kf ki before zone mark -- GitLab From 6d71f0680322052f426aba45cd3a81843b570b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 15 Mar 2019 13:24:23 +0100 Subject: [PATCH 153/376] [Eva] Updates test oracles. It is now invalid to read/write an empty struct in an Invalid base (such as the null base). --- tests/builtins/oracle/imprecise.res.oracle | 12 ++++++------ tests/value/oracle/empty_struct.4.res.oracle | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/builtins/oracle/imprecise.res.oracle b/tests/builtins/oracle/imprecise.res.oracle index d77f1466122..e27e83c8af3 100644 --- a/tests/builtins/oracle/imprecise.res.oracle +++ b/tests/builtins/oracle/imprecise.res.oracle @@ -39,6 +39,8 @@ [eva] computing for function f <- invalid_assigns_imprecise <- main. Called from tests/builtins/imprecise.c:11. [eva] using specification for function f +[eva] tests/builtins/imprecise.c:11: Warning: + Completely invalid destination for assigns clause *p. Ignoring. [eva] Done for function f [eva] Recording results for invalid_assigns_imprecise [from] Computing for function invalid_assigns_imprecise @@ -285,7 +287,6 @@ NULL[rbits 800 to 1607] ∈ [--..--] or ESCAPINGADDR p_gm_null ∈ [100..197] [eva:final-states] Values at end of function invalid_assigns_imprecise: - NULL[rbits 800 to 1607] ∈ [--..--] p ∈ {0} [eva:final-states] Values at end of function many_writes: t_packed1{[0..298]{.i1; .i2#; .[bits 48 to 63]#}; [299].i1} ∈ @@ -490,7 +491,7 @@ Sure outputs: p_gm_null [inout] Out (internal) for function invalid_assigns_imprecise: - NULL[..]; p + p [inout] Inputs for function invalid_assigns_imprecise: \nothing [inout] InOut (internal) for function invalid_assigns_imprecise: @@ -568,7 +569,7 @@ Sure outputs: i; j; k[0..4]; p [inout] Out (internal) for function main: - NULL[..]; v1.[bits 0 to 7]; v2.[bits 32 to 63]; v3.[bits 0 to ..]; + NULL[100..200]; v1.[bits 0 to 7]; v2.[bits 32 to 63]; v3.[bits 0 to ..]; v5.[bits 0 to ..]; p_gm_null [inout] Inputs for function main: NULL[100..200]; v; v1.[bits 0 to 7]; p_gm_null @@ -836,7 +837,6 @@ NULL[rbits 800 to 1607] ∈ [--..--] or ESCAPINGADDR p_gm_null ∈ [100..197] [eva:final-states] Values at end of function invalid_assigns_imprecise: - NULL[rbits 800 to 1607] ∈ [--..--] p ∈ {0} [eva:final-states] Values at end of function many_writes: t_packed1{[0..298]{.i1; .i2#; .[bits 48 to 63]#}; [299].i1} ∈ @@ -1035,7 +1035,7 @@ Sure outputs: p_gm_null [inout] Out (internal) for function invalid_assigns_imprecise: - NULL[..]; p + p [inout] Inputs for function invalid_assigns_imprecise: \nothing [inout] InOut (internal) for function invalid_assigns_imprecise: @@ -1113,7 +1113,7 @@ Sure outputs: i; j; k[0..4]; p [inout] Out (internal) for function main: - NULL[..]; v1.[bits 0 to 7]; v2.[bits 32 to 63]; v3.[bits 0 to ..]; + NULL[100..200]; v1.[bits 0 to 7]; v2.[bits 32 to 63]; v3.[bits 0 to ..]; v5.[bits 0 to ..]; p_gm_null [inout] Inputs for function main: NULL[100..200]; v; v1.[bits 0 to 7]; p_gm_null diff --git a/tests/value/oracle/empty_struct.4.res.oracle b/tests/value/oracle/empty_struct.4.res.oracle index 4daf49a7923..62bc2e7b1de 100644 --- a/tests/value/oracle/empty_struct.4.res.oracle +++ b/tests/value/oracle/empty_struct.4.res.oracle @@ -6,8 +6,12 @@ NULL[rbits 0 to 15] ∈ [--..--] s2 ∈ {0} pgs ∈ {{ &gs }} +[eva:alarm] tests/value/empty_struct.c:70: Warning: + out of bounds read. assert \valid_read(ptr_ret); [eva] Recording results for main2 [eva] done for function main2 +[eva] tests/value/empty_struct.c:70: + assertion 'Eva,mem_access' got final status invalid. [eva] ====== VALUES COMPUTED ====== [eva:final-states] Values at end of function main2: ptr_ret ∈ {2} -- GitLab From b4c3949812bd12ee7f0150dae9186a7d49d94f3a Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Thu, 28 Mar 2019 19:08:04 +0100 Subject: [PATCH 154/376] [Libc] remove unnecessary include The extraneous include prevents gzip from compiling. --- share/libc/unistd.h | 2 +- src/plugins/variadic/tests/known/oracle/exec.res.oracle | 1 - .../tests/known/oracle/exec_failed_requirement.res.oracle | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/share/libc/unistd.h b/share/libc/unistd.h index 019c35bdad2..356ae590fc8 100644 --- a/share/libc/unistd.h +++ b/share/libc/unistd.h @@ -36,7 +36,7 @@ __PUSH_FC_STDLIB #include "__fc_define_intptr_t.h" #include "__fc_select.h" -#include "getopt.h" + #include "limits.h" extern volatile int Frama_C_entropy_source; diff --git a/src/plugins/variadic/tests/known/oracle/exec.res.oracle b/src/plugins/variadic/tests/known/oracle/exec.res.oracle index 1b512fc679b..075e93f7f68 100644 --- a/src/plugins/variadic/tests/known/oracle/exec.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/exec.res.oracle @@ -35,7 +35,6 @@ sentinel ∈ {0} __retres ∈ {0} /* Generated by Frama-C */ -#include "getopt.h" #include "sys/time.h" #include "unistd.h" int main(void) diff --git a/src/plugins/variadic/tests/known/oracle/exec_failed_requirement.res.oracle b/src/plugins/variadic/tests/known/oracle/exec_failed_requirement.res.oracle index 3bdfda3fde9..97c267c20a2 100644 --- a/src/plugins/variadic/tests/known/oracle/exec_failed_requirement.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/exec_failed_requirement.res.oracle @@ -17,7 +17,6 @@ [eva:final-states] Values at end of function main: NON TERMINATING FUNCTION /* Generated by Frama-C */ -#include "getopt.h" #include "sys/time.h" #include "unistd.h" int main(void) -- GitLab From 67fb596c8540772cfb947dc6c69770b9cc9b9c46 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Thu, 5 Apr 2018 11:30:57 +0200 Subject: [PATCH 155/376] [Eva] floating-point widening hints --- .../abstract_interp/fc_float.ml | 68 ++++++-- .../abstract_interp/float_interval.ml | 8 +- .../abstract_interp/float_interval.mli | 1 + .../abstract_interp/float_interval_sig.mli | 3 +- .../abstract_interp/float_sig.mli | 17 +- src/kernel_services/abstract_interp/fval.mli | 1 + src/kernel_services/abstract_interp/ival.ml | 20 ++- src/kernel_services/abstract_interp/ival.mli | 4 +- src/kernel_services/abstract_interp/lmap.ml | 6 +- src/kernel_services/abstract_interp/lmap.mli | 4 +- .../abstract_interp/locations.ml | 4 +- .../abstract_interp/locations.mli | 4 +- .../abstract_interp/offsetmap.ml | 6 +- .../abstract_interp/offsetmap.mli | 2 +- .../offsetmap_lattice_with_isotropy.mli | 4 +- .../value/domains/gauges/gauges_domain.ml | 2 +- src/plugins/value/domains/symbolic_locs.ml | 2 +- src/plugins/value/utils/widen.ml | 160 +++++++++++++----- src/plugins/value/utils/widen.mli | 2 +- src/plugins/value_types/cvalue.ml | 2 +- src/plugins/value_types/cvalue.mli | 10 +- src/plugins/value_types/widen_type.ml | 112 ++++++++++-- src/plugins/value_types/widen_type.mli | 7 +- .../misc/oracle/widen_hints_float.res.oracle | 61 +++++++ tests/misc/widen_hints_float.c | 33 ++++ 25 files changed, 426 insertions(+), 117 deletions(-) create mode 100644 tests/misc/oracle/widen_hints_float.res.oracle create mode 100644 tests/misc/widen_hints_float.c diff --git a/src/kernel_services/abstract_interp/fc_float.ml b/src/kernel_services/abstract_interp/fc_float.ml index 3d0b23e3631..58da42b53ee 100644 --- a/src/kernel_services/abstract_interp/fc_float.ml +++ b/src/kernel_services/abstract_interp/fc_float.ml @@ -109,24 +109,60 @@ let prev_float prec f = then Down >>% fun () -> Floating_point.round_to_single_precision_float f else f -let m_pi = 3.1415929794311523 (* single-precision *) -let m_pi_2 = 1.5707964897155761 (* single-precision *) -let max_single_precision_float = Floating_point.max_single_precision_float - let le f1 f2 = compare f1 f2 <= 0 -let widen_up f = - if le f (-0.) then -0. - else if le f 0. then 0. - else if le f 1. then 1. - else if le f m_pi_2 then m_pi_2 - else if le f m_pi then m_pi - else if le f 10. then 10. - else if le f 1e10 then 1e10 - else if le f max_single_precision_float then max_single_precision_float - else if le f 1e80 then 1e80 - else if le f max_float then max_float - else infinity + +(* -------------------------------------------------------------------------- + Widen hints + -------------------------------------------------------------------------- *) + +module Widen_Hints = struct + + include Datatype.Float.Set + + let pretty fmt s = + if not (is_empty s) then + Pretty_utils.pp_iter + ~pre:"@[<hov 1>{" + ~suf:"}@]" + ~sep:";@ " + iter Floating_point.pretty fmt s + + let of_list l = + match l with + | [] -> empty + | [e] -> singleton e + | e :: q -> + List.fold_left (fun acc x -> add x acc) (singleton e) q + + let m_pi = 3.1415929794311523 (* single-precision *) + let m_pi_2 = 1.5707964897155761 (* single-precision *) + let max_single_float = Floating_point.max_single_precision_float + + let default_widen_hints = + let l = [0.0;1.0;m_pi_2;m_pi;10.;1e10;max_single_float;1e80] in + union (of_list l) (of_list (List.map (fun x -> -. x) l)) + +end + +type widen_hints = Widen_Hints.t + +let widen_up wh prec f = + let r = try Widen_Hints.nearest_elt_ge f wh + with Not_found -> + if le f max_float then max_float + else infinity + in + round_to_precision Up prec r + +let widen_down wh prec f = + let r = try Widen_Hints.nearest_elt_le f wh + with Not_found -> + if le (-. max_float) f then (-. max_float) + else neg_infinity + in + round_to_precision Down prec r + let neg = (~-.) let abs = abs_float diff --git a/src/kernel_services/abstract_interp/float_interval.ml b/src/kernel_services/abstract_interp/float_interval.ml index 89c49bcc166..13650e1b318 100644 --- a/src/kernel_services/abstract_interp/float_interval.ml +++ b/src/kernel_services/abstract_interp/float_interval.ml @@ -314,14 +314,12 @@ module Make (F: Float_sig.S) = struct | (FRange.NaN, FRange.Itv (b1, e1, _)) -> FRange.inject ~nan:true b1 e1 | FRange.NaN, FRange.NaN -> FRange.nan - let widen_down f = F.neg (F.widen_up (F.neg f)) - - let widen f1 f2 = + let widen wh prec f1 f2 = assert (is_included f1 f2); match f1, f2 with | FRange.Itv (b1, e1, _), FRange.Itv (b2, e2, nan) -> - let b = if Cmp.equal b2 b1 then b2 else widen_down b2 in - let e = if Cmp.equal e2 e1 then e2 else F.widen_up e2 in + let b = if Cmp.equal b2 b1 then b2 else F.widen_down wh prec b2 in + let e = if Cmp.equal e2 e1 then e2 else F.widen_up wh prec e2 in (** widen_up and down produce double only if the input is a double *) FRange.inject ~nan b e | FRange.NaN, f2 -> f2 diff --git a/src/kernel_services/abstract_interp/float_interval.mli b/src/kernel_services/abstract_interp/float_interval.mli index 51cb520393b..66a803c74e1 100644 --- a/src/kernel_services/abstract_interp/float_interval.mli +++ b/src/kernel_services/abstract_interp/float_interval.mli @@ -26,3 +26,4 @@ Supports NaN and infinite values. *) module Make (Float: Float_sig.S) : Float_interval_sig.S with type float := Float.t + and type widen_hints := Float.widen_hints diff --git a/src/kernel_services/abstract_interp/float_interval_sig.mli b/src/kernel_services/abstract_interp/float_interval_sig.mli index d2250132fe1..aee6a1d773c 100644 --- a/src/kernel_services/abstract_interp/float_interval_sig.mli +++ b/src/kernel_services/abstract_interp/float_interval_sig.mli @@ -29,6 +29,7 @@ type prec = Float_sig.prec module type S = sig type float (** Type of the interval bounds. *) + type widen_hints (** Type of the widen hints. *) type t (** Type of intervals. *) val packed_descr : Structural_descr.pack @@ -64,7 +65,7 @@ module type S = sig val is_included: t -> t -> bool val join: t -> t -> t - val widen: t -> t -> t + val widen: widen_hints -> prec -> t -> t -> t val narrow: t -> t -> t or_bottom val contains_a_zero: t -> bool diff --git a/src/kernel_services/abstract_interp/float_sig.mli b/src/kernel_services/abstract_interp/float_sig.mli index 37c9d5be3d1..5febce60c3d 100644 --- a/src/kernel_services/abstract_interp/float_sig.mli +++ b/src/kernel_services/abstract_interp/float_sig.mli @@ -30,6 +30,14 @@ type round = Up | Down | Near | Zero - the ACSL 'real' type. *) type prec = Single | Double | Long_Double | Real + +module type Widen_Hints = sig + include FCSet.S with type elt = Datatype.Float.t + include Datatype.S with type t:=t + + val default_widen_hints: t +end + module type S = sig type t @@ -80,9 +88,14 @@ module type S = sig behavior as [next_float]. *) val prev_float: prec -> t -> t + module Widen_Hints : Widen_Hints + type widen_hints = Widen_Hints.t + (** [widen_up f] returns a value strictly larger than [f], such that - successive applications of [widen_up] converge rapidly to infinity. *) - val widen_up: t -> t + successive applications of [widen_up] converge rapidly to infinity. + The first arguments give the set of steps that could be used. *) + val widen_up : widen_hints -> prec -> t -> t + val widen_down: widen_hints -> prec -> t -> t (** Floating-point operations. *) diff --git a/src/kernel_services/abstract_interp/fval.mli b/src/kernel_services/abstract_interp/fval.mli index 4bebb2da3eb..f631b8d354b 100644 --- a/src/kernel_services/abstract_interp/fval.mli +++ b/src/kernel_services/abstract_interp/fval.mli @@ -61,6 +61,7 @@ module F : sig end include Float_interval_sig.S with type float := F.t + and type widen_hints := Fc_float.widen_hints val round_to_single_precision_float : t -> t diff --git a/src/kernel_services/abstract_interp/ival.ml b/src/kernel_services/abstract_interp/ival.ml index eb88284cee5..3d7cdeb7065 100644 --- a/src/kernel_services/abstract_interp/ival.ml +++ b/src/kernel_services/abstract_interp/ival.ml @@ -52,8 +52,7 @@ module Widen_Arithmetic_Value_Set = struct include Datatype.Integer.Set let pretty fmt s = - if is_empty s then Format.fprintf fmt "{}" - else + if not (is_empty s) then Pretty_utils.pp_iter ~pre:"@[<hov 1>{" ~suf:"}@]" @@ -102,8 +101,8 @@ type t = module Widen_Hints = Widen_Arithmetic_Value_Set type size_widen_hint = Integer.t -type generic_widen_hint = Widen_Hints.t -type widen_hint = size_widen_hint * generic_widen_hint +type numerical_widen_hint = Widen_Hints.t * Fc_float.Widen_Hints.t +type widen_hint = size_widen_hint * numerical_widen_hint let some_zero = Some Int.zero @@ -619,13 +618,22 @@ let has_smaller_max_bound t1 t2 = | Some _, None -> 1 | Some m1, Some m2 -> Int.compare m2 m1 -let widen (bitsize,wh) t1 t2 = +let widen (bitsize,(wh,fh)) t1 t2 = if equal t1 t2 || cardinal_zero_or_one t1 then t2 else match t2 with | Float f2 -> let f1 = project_float t1 in - Float (Fval.widen f1 f2) + let prec = + if Integer.equal bitsize (Integer.of_int 32) + then Float_sig.Single + else if Integer.equal bitsize (Integer.of_int 64) + then Float_sig.Double + else if Integer.equal bitsize (Integer.of_int 128) + then Float_sig.Long_Double + else Float_sig.Single + in + Float (Fval.widen fh prec f1 f2) | Top _ | Set _ -> (* Add possible interval limits deducted from the bitsize *) let wh = diff --git a/src/kernel_services/abstract_interp/ival.mli b/src/kernel_services/abstract_interp/ival.mli index 32218fd7746..cc7f8630939 100644 --- a/src/kernel_services/abstract_interp/ival.mli +++ b/src/kernel_services/abstract_interp/ival.mli @@ -58,12 +58,12 @@ module Widen_Hints : sig end type size_widen_hint = Integer.t -type generic_widen_hint = Widen_Hints.t +type numerical_widen_hint = Widen_Hints.t * Fc_float.Widen_Hints.t include Datatype.S_with_collections with type t := t include Lattice_type.Full_AI_Lattice_with_cardinality with type t := t - and type widen_hint = size_widen_hint * generic_widen_hint + and type widen_hint = size_widen_hint * numerical_widen_hint val is_bottom : t -> bool val overlaps: partial:bool -> size:Integer.t -> t -> t -> bool diff --git a/src/kernel_services/abstract_interp/lmap.ml b/src/kernel_services/abstract_interp/lmap.ml index 825aa7b0b74..5d1f91af760 100644 --- a/src/kernel_services/abstract_interp/lmap.ml +++ b/src/kernel_services/abstract_interp/lmap.ml @@ -38,7 +38,7 @@ module Make_LOffset end) (Offsetmap: module type of Offsetmap_sig with type v = V.t - and type widen_hint = V.generic_widen_hint) + and type widen_hint = V.numerical_widen_hint) (Default_offsetmap: sig val name: string val default_offsetmap : Base.t -> Offsetmap.t Bottom.or_bottom @@ -50,7 +50,7 @@ struct type v = V.t type offsetmap = Offsetmap.t - type widen_hint_base = V.generic_widen_hint + type widen_hint_base = V.numerical_widen_hint open Default_offsetmap @@ -432,7 +432,7 @@ struct (Hptmap_sig.PersistentCache name) UniversalPredicate ~decide_fast ~decide_fst ~decide_snd ~decide_both - type widen_hint = Base.Set.t * (Base.t -> V.generic_widen_hint) + type widen_hint = Base.Set.t * (Base.t -> V.numerical_widen_hint) (* Precondition : m1 <= m2 *) let widen (wh_key_set, wh_hints: widen_hint) m1 m2 = diff --git a/src/kernel_services/abstract_interp/lmap.mli b/src/kernel_services/abstract_interp/lmap.mli index 44f39505c5b..29251098017 100644 --- a/src/kernel_services/abstract_interp/lmap.mli +++ b/src/kernel_services/abstract_interp/lmap.mli @@ -39,7 +39,7 @@ module Make_LOffset end) (Offsetmap: module type of Offsetmap_sig with type v = V.t - and type widen_hint = V.generic_widen_hint) + and type widen_hint = V.numerical_widen_hint) (Default_offsetmap: sig val name: string (** Used to create different datatypes each time the functor is applied *) @@ -72,7 +72,7 @@ module Make_LOffset end): module type of Lmap_sig with type v = V.t - and type widen_hint_base = V.generic_widen_hint + and type widen_hint_base = V.numerical_widen_hint and type offsetmap = Offsetmap.t (* diff --git a/src/kernel_services/abstract_interp/locations.ml b/src/kernel_services/abstract_interp/locations.ml index 70ca0060d5d..7487068ab5c 100644 --- a/src/kernel_services/abstract_interp/locations.ml +++ b/src/kernel_services/abstract_interp/locations.ml @@ -405,8 +405,8 @@ module Location_Bytes = struct m1 m2 type size_widen_hint = Ival.size_widen_hint - type generic_widen_hint = Base.t -> Ival.generic_widen_hint - type widen_hint = size_widen_hint * generic_widen_hint + type numerical_widen_hint = Base.t -> Ival.numerical_widen_hint + type widen_hint = size_widen_hint * numerical_widen_hint let widen (size, wh) = let widen_map = diff --git a/src/kernel_services/abstract_interp/locations.mli b/src/kernel_services/abstract_interp/locations.mli index 654cd6dbc40..8ae6ee928ea 100644 --- a/src/kernel_services/abstract_interp/locations.mli +++ b/src/kernel_services/abstract_interp/locations.mli @@ -46,8 +46,8 @@ module Location_Bytes : sig | Map of M.t (** Precise set of addresses+offsets *) type size_widen_hint = Ival.size_widen_hint - type generic_widen_hint = Base.t -> Ival.generic_widen_hint - type widen_hint = size_widen_hint * generic_widen_hint + type numerical_widen_hint = Base.t -> Ival.numerical_widen_hint + type widen_hint = size_widen_hint * numerical_widen_hint (** Those locations have a lattice structure, including standard operations such as [join], [narrow], etc. *) diff --git a/src/kernel_services/abstract_interp/offsetmap.ml b/src/kernel_services/abstract_interp/offsetmap.ml index bd89eb563c1..506f4f18d86 100644 --- a/src/kernel_services/abstract_interp/offsetmap.ml +++ b/src/kernel_services/abstract_interp/offsetmap.ml @@ -108,7 +108,7 @@ module Make (V : module type of Offsetmap_lattice_with_isotropy) = struct open Format type v = V.t - type widen_hint = V.generic_widen_hint + type widen_hint = V.numerical_widen_hint let empty = Empty (** All high-level functions of this module must handle a size of 0, in which @@ -2194,9 +2194,9 @@ module FullyIsotropic = struct let cardinal_zero_or_one _ = false let widen _wh _ m = m - type generic_widen_hint = unit + type numerical_widen_hint = unit type size_widen_hint = Integer.t - type widen_hint = size_widen_hint * generic_widen_hint + type widen_hint = size_widen_hint * numerical_widen_hint end diff --git a/src/kernel_services/abstract_interp/offsetmap.mli b/src/kernel_services/abstract_interp/offsetmap.mli index 88e2986c36d..7f518453dcb 100644 --- a/src/kernel_services/abstract_interp/offsetmap.mli +++ b/src/kernel_services/abstract_interp/offsetmap.mli @@ -27,7 +27,7 @@ module Make (V : module type of Offsetmap_lattice_with_isotropy) : module type of Offsetmap_sig with type v = V.t - and type widen_hint = V.generic_widen_hint + and type widen_hint = V.numerical_widen_hint (**/**) (* Exported as Int_Intervals, do not use this module directly *) diff --git a/src/kernel_services/abstract_interp/offsetmap_lattice_with_isotropy.mli b/src/kernel_services/abstract_interp/offsetmap_lattice_with_isotropy.mli index e2dfef042ed..5c443aff195 100644 --- a/src/kernel_services/abstract_interp/offsetmap_lattice_with_isotropy.mli +++ b/src/kernel_services/abstract_interp/offsetmap_lattice_with_isotropy.mli @@ -24,11 +24,11 @@ open Lattice_type -type generic_widen_hint +type numerical_widen_hint type size_widen_hint = Integer.t include Bounded_Join_Semi_Lattice -include With_Widening with type t := t and type widen_hint = size_widen_hint * generic_widen_hint +include With_Widening with type t := t and type widen_hint = size_widen_hint * numerical_widen_hint include With_Cardinal_One with type t := t val pretty_typ: Cil_types.typ option -> t Pretty_utils.formatter diff --git a/src/plugins/value/domains/gauges/gauges_domain.ml b/src/plugins/value/domains/gauges/gauges_domain.ml index 78284d2e1d4..11b85c2cbe7 100644 --- a/src/plugins/value/domains/gauges/gauges_domain.ml +++ b/src/plugins/value/domains/gauges/gauges_domain.ml @@ -291,7 +291,7 @@ module G = struct let decide _ _ _ = assert false in join ~cache ~symmetric:true ~idempotent:false ~decide - let empty_wh = Integer.zero, (fun _ -> Ival.Widen_Hints.empty) + let empty_wh = Integer.zero, (fun _ -> Ival.Widen_Hints.empty, Fc_float.Widen_Hints.empty) let widen = let cache = cache_name "MV.widen" in diff --git a/src/plugins/value/domains/symbolic_locs.ml b/src/plugins/value/domains/symbolic_locs.ml index 1d197a22ce9..952cf517636 100644 --- a/src/plugins/value/domains/symbolic_locs.ml +++ b/src/plugins/value/domains/symbolic_locs.ml @@ -52,7 +52,7 @@ module K2V = struct let cache = Hptmap_sig.NoCache in let symmetric = false in let idempotent = true in - let wh = Integer.zero, fun _b -> Ival.Widen_Hints.empty in + let wh = Integer.zero, (fun _b -> Ival.Widen_Hints.empty, Fc_float.Widen_Hints.empty) in let decide _ v1 v2 = Some (V.widen wh v1 v2) in M.inter ~cache ~symmetric ~idempotent ~decide diff --git a/src/plugins/value/utils/widen.ml b/src/plugins/value/utils/widen.ml index 2356d40a562..94d70a29988 100644 --- a/src/plugins/value/utils/widen.ml +++ b/src/plugins/value/utils/widen.ml @@ -34,14 +34,32 @@ let dkey = Widen_hints_ext.dkey reuse loop indexes... *) +let rec constFoldTermToNearestFloat = function + | TConst (LReal r) -> Some (r.r_nearest) + | TUnOp (Neg,e) -> begin + match (constFoldTermToNearestFloat e.term_node) with + | None -> None + | Some e -> Some (-. e) + end + | _ -> None + class pragma_widen_visitor init_widen_hints init_enclosing_loops = object(self) inherit Visitor.frama_c_inplace val widen_hints = init_widen_hints val enclosing_loops = init_enclosing_loops - method private add_thresholds ?base thresholds = - widen_hints := Widen_type.join (Widen_type.num_hints None(*see note*) base thresholds) !widen_hints + method private add_int_thresholds ?base int_thresholds = + widen_hints := + Widen_type.join + (Widen_type.num_hints None(*see note*) base int_thresholds) + !widen_hints + + method private add_float_thresholds ?base float_thresholds = + widen_hints := + Widen_type.join + (Widen_type.float_hints None(*see note*) base float_thresholds) + !widen_hints method private add_var_hints ~stmt hints = widen_hints := Widen_type.join (Widen_type.var_hints stmt hints) !widen_hints @@ -63,20 +81,27 @@ class pragma_widen_visitor init_widen_hints init_enclosing_loops = object(self) "could not interpret loop pragma relative to widening variables" end | Widen_hints l -> begin - let f (lv, lnum, lt) t = match t with + let f (lv, lint, lfloat, lt) t = match t with | { term_node= TLval (TVar { lv_origin = Some vi}, _)} -> - (Base.of_varinfo vi :: lv, lnum, lt) + (Base.of_varinfo vi :: lv, lint, lfloat, lt) | { term_node= TConst (Integer(v,_))} -> - (lv, Ival.Widen_Hints.add v lnum, lt) - | _ -> (lv, lnum, t::lt) + (lv, Ival.Widen_Hints.add v lint, lfloat, lt) + | _ -> + match constFoldTermToNearestFloat t.term_node with + | Some f -> (lv, lint, Fc_float.Widen_Hints.add f lfloat, lt) + | None -> (lv, lint, lfloat, t::lt) in - match List.fold_left f ([], Ival.Widen_Hints.empty, []) l with - | (vars, thresholds, []) -> + match List.fold_left f ([], Ival.Widen_Hints.empty, Fc_float.Widen_Hints.empty, []) l with + | (vars, int_thresholds, float_thresholds, []) -> (* the annotation is empty or contains only variables *) - if vars = [] then - self#add_thresholds thresholds - else - List.iter (fun base -> self#add_thresholds ~base thresholds) vars + if vars = [] then begin + self#add_int_thresholds int_thresholds; + self#add_float_thresholds float_thresholds + end else + List.iter (fun base -> + self#add_int_thresholds ~base int_thresholds; + self#add_float_thresholds ~base float_thresholds; + ) vars | _ -> Value_parameters.warning ~once:true "could not interpret loop pragma relative to widening hint" @@ -137,17 +162,17 @@ class pragma_widen_visitor init_widen_hints init_enclosing_loops = object(self) match e with | {enode=(CastE(_, { enode=Lval (Var varinfo, _)}) | Lval (Var varinfo, _))} -> - let thresholds = Ival.Widen_Hints.singleton Integer.zero in + let int_thresholds = Ival.Widen_Hints.singleton Integer.zero in let base = Base.of_varinfo varinfo in - self#add_thresholds ~base thresholds; + self#add_int_thresholds ~base int_thresholds; Cil.DoChildren | _ -> Cil.DoChildren and comparison_visit add1 add2 e1 e2 = let add base set = - let thresholds = + let int_thresholds = List.fold_right Ival.Widen_Hints.add set Ival.Widen_Hints.empty in - self#add_thresholds ~base thresholds + self#add_int_thresholds ~base int_thresholds in let i1, i2 = Cil.constFoldToInt e1, Cil.constFoldToInt e2 in begin match i1, i2, e1, e2 with @@ -184,8 +209,8 @@ class pragma_widen_visitor init_widen_hints init_enclosing_loops = object(self) let add_hint vidx size shift = let bound1 = Integer.sub size shift in let bound2 = Integer.(sub bound1 one) in - let thresholds = Ival.Widen_Hints.of_list [bound1; bound2] in - self#add_thresholds ~base:(Base.of_varinfo vidx) thresholds + let int_thresholds = Ival.Widen_Hints.of_list [bound1; bound2] in + self#add_int_thresholds ~base:(Base.of_varinfo vidx) int_thresholds in (* Find inside [idx] a variable on which we will add hints. [shift] is an integer that indicates that we access to [idx+shift], instead of to @@ -252,6 +277,9 @@ let base_of_static_hvars hvars = (* syntactic constraints prevent this from happening *) Value_parameters.fatal "unsupported lhost: %a" Printer.pp_lval (Mem e, offset) +type threshold = Int_th of Integer.t | Float_th of float + +(* try parsing as int, then as float *) let threshold_of_threshold_term ht = let global_find_init vi = try (Globals.Vars.find vi).init with Not_found -> None @@ -260,16 +288,36 @@ let threshold_of_threshold_term ht = (new Logic_utils.simplify_const_lval global_find_init) ht in match Logic_utils.constFoldTermToInt ht with - | None -> Value_parameters.abort ~source:(fst ht.term_loc) - "could not parse widening hint: %a@ \ - If it contains variables, they must be global const integers." - Printer.pp_term ht - | Some i -> i + | Some i -> Int_th i + | None -> + match constFoldTermToNearestFloat ht.term_node with + | Some f -> Float_th f + | None -> + Value_parameters.abort ~source:(fst ht.term_loc) + "could not parse widening hint: %a@ \ + If it contains variables, they must be global const integers." + Printer.pp_term ht let thresholds_of_threshold_terms hts = - List.fold_left (fun acc' ht -> - Ival.Widen_Hints.add (threshold_of_threshold_term ht) acc' - ) Ival.Widen_Hints.empty hts + let has_int = ref false in + let has_float = ref false in + List.fold_left (fun (int_acc, float_acc) ht -> + match threshold_of_threshold_term ht with + | Int_th i -> + if !has_float then + Value_parameters.abort ~source:(fst ht.term_loc) + "widening hint mixing integers and floats: %a" + Printer.pp_term ht; + has_int := true; + Ival.Widen_Hints.add i int_acc, float_acc + | Float_th f -> + if !has_int then + Value_parameters.abort ~source:(fst ht.term_loc) + "widening hint mixing integers and floats: %a" + Printer.pp_term ht; + has_float := true; + int_acc, Fc_float.Widen_Hints.add f float_acc + ) (Ival.Widen_Hints.empty, Fc_float.Widen_Hints.empty) hts class hints_visitor init_widen_hints global = object(self) inherit Visitor.frama_c_inplace @@ -284,17 +332,27 @@ class hints_visitor init_widen_hints global = object(self) List.iter (fun ({Widen_hints_ext.vars; loc}, wh_terms) -> let base = base_of_static_hvars vars in - let thresholds = thresholds_of_threshold_terms wh_terms in + let int_thresholds, float_thresholds = + thresholds_of_threshold_terms wh_terms + in Value_parameters.feedback ~source:(fst loc) ~dkey - "adding%s hint from annotation: %a, %a (for all statements)" + "adding%s hint from annotation: %a, %t (for all statements)" (if global then " global" else "") (Pretty_utils.pp_opt ~none:(format_of_string "for all variables") Base.pretty) base - Ival.Widen_Hints.pretty thresholds; - let new_hints = - Widen_type.num_hints None (* see note above *) base thresholds + (fun fmt -> + if Ival.Widen_Hints.is_empty int_thresholds then + Format.fprintf fmt "float:%a" Fc_float.Widen_Hints.pretty float_thresholds + else + Ival.Widen_Hints.pretty fmt int_thresholds); + let new_int_hints = + Widen_type.num_hints None (* see note above *) base int_thresholds + in + widen_hints := Widen_type.join new_int_hints !widen_hints; + let new_float_hints = + Widen_type.float_hints None (* see note above *) base float_thresholds in - widen_hints := Widen_type.join new_hints !widen_hints + widen_hints := Widen_type.join new_float_hints !widen_hints ) static_hints method! vstmt s = @@ -363,7 +421,8 @@ type dynamic_hint = { (* dynamic, used to detect when a new base needs to be added to the global widening hints *); lv : exp * offset; (* static, parsed once from the AST *) - thresholds : Ival.Widen_Hints.t; (* static, computed only once *) + int_thresholds : Ival.Widen_Hints.t; (* static, computed only once *) + float_thresholds : Fc_float.Widen_Hints.t; (* static, computed only once *) } module ExpOffset = Datatype.Pair(Exp)(Offset) @@ -376,13 +435,16 @@ module DynamicHintDatatype = Datatype.Make(struct Structural_descr.t_tuple [| Base.Hptset.packed_descr; ExpOffset.packed_descr; - Ival.Widen_Hints.packed_descr |] + Ival.Widen_Hints.packed_descr; + Fc_float.Widen_Hints.packed_descr |] let reprs = - List.map - (fun wh -> { bases = Base.Hptset.empty; - lv = (Exp.dummy, NoOffset); - thresholds = wh }) + Extlib.product + (fun wh fh -> { bases = Base.Hptset.empty; + lv = (Exp.dummy, NoOffset); + int_thresholds = wh; + float_thresholds = fh }) Ival.Widen_Hints.reprs + Fc_float.Widen_Hints.reprs let mem_project = Datatype.never_any_project end) @@ -430,8 +492,11 @@ let extract_dynamic_hints stmt = let open Widen_hints_ext in match hlv.vars with | HintMem (e, offset) -> - let thresholds = thresholds_of_threshold_terms threshold_terms in - { bases = Base.Hptset.empty; lv = (e, offset); thresholds; } :: l + let int_thresholds, float_thresholds = + thresholds_of_threshold_terms threshold_terms + in + let bases = Base.Hptset.empty in + { bases; lv = (e, offset); int_thresholds; float_thresholds; } :: l | _-> l in List.fold_left aux [] wh @@ -489,13 +554,18 @@ let dynamic_widen_hints_hook (stmt, _callstack, states) = let new_hints = Base.Hptset.fold (fun base acc -> Value_parameters.debug ~source ~dkey - "adding new base due to dynamic widen hint: %a, %a" + "adding new base due to dynamic widen hint: %a, %a%a" Base.pretty base - Ival.Widen_Hints.pretty dhint.thresholds; - let hint_for_base = - Widen_type.num_hints None (Some base) dhint.thresholds + Ival.Widen_Hints.pretty dhint.int_thresholds + Fc_float.Widen_Hints.pretty dhint.float_thresholds; + let int_hint_for_base = + Widen_type.num_hints None (Some base) dhint.int_thresholds + in + let float_hint_for_base = + Widen_type.float_hints None (Some base) dhint.float_thresholds in - Widen_type.join acc hint_for_base + let acc = Widen_type.join acc int_hint_for_base in + Widen_type.join acc float_hint_for_base ) new_bases acc_hints in dhint.bases <- Base.Hptset.union dhint.bases new_bases; diff --git a/src/plugins/value/utils/widen.mli b/src/plugins/value/utils/widen.mli index 283459456db..b9dc1c6f77b 100644 --- a/src/plugins/value/utils/widen.mli +++ b/src/plugins/value/utils/widen.mli @@ -27,7 +27,7 @@ open Cil_types (** [getWidenHints kf s] retrieves the set of widening hints related to function [kf] and statement [s]. *) val getWidenHints: kernel_function -> stmt -> - Base.Set.t * (Base.t -> Locations.Location_Bytes.generic_widen_hint) + Base.Set.t * (Base.t -> Locations.Location_Bytes.numerical_widen_hint) (** Parses all widening hints defined via the widen_hint syntax extension. The result is memoized for subsequent calls. *) diff --git a/src/plugins/value_types/cvalue.ml b/src/plugins/value_types/cvalue.ml index fd1b472fbcc..56124a5079b 100644 --- a/src/plugins/value_types/cvalue.ml +++ b/src/plugins/value_types/cvalue.ml @@ -744,7 +744,7 @@ module V_Or_Uninitialized = struct (* let (==>) = (fun x y -> (not x) || y) *) type size_widen_hint = V.size_widen_hint - type generic_widen_hint = V.generic_widen_hint + type numerical_widen_hint = V.numerical_widen_hint type widen_hint = V.widen_hint let widen wh t1 t2 = create (get_flags t2) (V.widen wh (get_v t1) (get_v t2)) diff --git a/src/plugins/value_types/cvalue.mli b/src/plugins/value_types/cvalue.mli index 050be2bc75f..83a60eeb362 100644 --- a/src/plugins/value_types/cvalue.mli +++ b/src/plugins/value_types/cvalue.mli @@ -46,12 +46,12 @@ module V : sig of all of them. Use some shortcuts *) with type M.t = Location_Bytes.M.t and type t = Location_Bytes.t - and type generic_widen_hint = Location_Bytes.generic_widen_hint + and type numerical_widen_hint = Location_Bytes.numerical_widen_hint and type size_widen_hint = Location_Bytes.size_widen_hint include module type of Offsetmap_lattice_with_isotropy with type t := t - and type generic_widen_hint := generic_widen_hint + and type numerical_widen_hint := numerical_widen_hint and type size_widen_hint := size_widen_hint and type widen_hint := widen_hint @@ -175,7 +175,7 @@ module V_Or_Uninitialized : sig include module type of Offsetmap_lattice_with_isotropy with type t := t and type size_widen_hint = Location_Bytes.size_widen_hint - and type generic_widen_hint = Location_Bytes.generic_widen_hint + and type numerical_widen_hint = Location_Bytes.numerical_widen_hint and type widen_hint = Locations.Location_Bytes.widen_hint include Lattice_type.With_Under_Approximation with type t:= t include Lattice_type.With_Narrow with type t := t @@ -237,7 +237,7 @@ module V_Or_Uninitialized : sig module V_Offsetmap: sig include module type of Offsetmap_sig with type v = V_Or_Uninitialized.t - and type widen_hint = V_Or_Uninitialized.generic_widen_hint + and type widen_hint = V_Or_Uninitialized.numerical_widen_hint val narrow: t -> t -> t Bottom.Type.or_bottom val narrow_reinterpret: t -> t -> t Bottom.Type.or_bottom @@ -257,7 +257,7 @@ module Model: sig include module type of Lmap_sig with type v = V_Or_Uninitialized.t and type offsetmap = V_Offsetmap.t - and type widen_hint_base = V_Or_Uninitialized.generic_widen_hint + and type widen_hint_base = V_Or_Uninitialized.numerical_widen_hint include Lattice_type.With_Narrow with type t := t diff --git a/src/plugins/value_types/widen_type.ml b/src/plugins/value_types/widen_type.ml index ed9929b21d0..157b11f55c9 100644 --- a/src/plugins/value_types/widen_type.ml +++ b/src/plugins/value_types/widen_type.ml @@ -23,25 +23,36 @@ open Cil_datatype module Num_hints_stmt = Stmt.Map.Make(Ival.Widen_Hints) +module Float_hints_stmt = Stmt.Map.Make(Fc_float.Widen_Hints) module Num_hints_bases = Base.Map.Make(Ival.Widen_Hints) +module Float_hints_bases = Base.Map.Make(Fc_float.Widen_Hints) module Num_hints_bases_stmt = Stmt.Map.Make(Num_hints_bases) +module Float_hints_bases_stmt = Stmt.Map.Make(Float_hints_bases) module Priority_bases_stmt = Stmt.Map.Make(Base.Set) type widen_hints = { priority_bases: Base.Set.t Stmt.Map.t; default_hints: Ival.Widen_Hints.t; + default_float_hints: Fc_float.Widen_Hints.t; default_hints_by_stmt: Ival.Widen_Hints.t Stmt.Map.t; + default_float_hints_by_stmt: Fc_float.Widen_Hints.t Stmt.Map.t; hints_by_addr: Ival.Widen_Hints.t Base.Map.t; + float_hints_by_addr: Fc_float.Widen_Hints.t Base.Map.t; hints_by_addr_by_stmt: Ival.Widen_Hints.t Base.Map.t Stmt.Map.t; + float_hints_by_addr_by_stmt: Fc_float.Widen_Hints.t Base.Map.t Stmt.Map.t; } (* an [empty] set of hints *) let empty = { priority_bases = Stmt.Map.empty; default_hints = Ival.Widen_Hints.empty; + default_float_hints = Fc_float.Widen_Hints.empty; default_hints_by_stmt = Stmt.Map.empty; + default_float_hints_by_stmt = Stmt.Map.empty; hints_by_addr = Base.Map.empty; + float_hints_by_addr = Base.Map.empty; hints_by_addr_by_stmt = Stmt.Map.empty; + float_hints_by_addr_by_stmt = Stmt.Map.empty; } include Datatype.Make(struct @@ -52,18 +63,27 @@ include Datatype.Make(struct Structural_descr.t_tuple [| Priority_bases_stmt.packed_descr; Ival.Widen_Hints.packed_descr; + Fc_float.Widen_Hints.packed_descr; Num_hints_stmt.packed_descr; + Float_hints_stmt.packed_descr; Num_hints_bases.packed_descr; - Num_hints_bases_stmt.packed_descr |] + Float_hints_bases.packed_descr; + Num_hints_bases_stmt.packed_descr; + Float_hints_bases_stmt.packed_descr |] let reprs = - List.map - (fun wh -> - { priority_bases = Stmt.Map.empty; - default_hints = wh; - default_hints_by_stmt = Stmt.Map.empty; - hints_by_addr = Base.Map.empty; - hints_by_addr_by_stmt = Stmt.Map.empty}) - Ival.Widen_Hints.reprs + Extlib.product + (fun wh fh -> + { priority_bases = Stmt.Map.empty; + default_hints = wh; + default_float_hints = fh; + default_hints_by_stmt = Stmt.Map.empty; + default_float_hints_by_stmt = Stmt.Map.empty; + hints_by_addr = Base.Map.empty; + float_hints_by_addr = Base.Map.empty; + float_hints_by_addr_by_stmt = Stmt.Map.empty; + hints_by_addr_by_stmt = Stmt.Map.empty + }) + Ival.Widen_Hints.reprs Fc_float.Widen_Hints.reprs let mem_project = Datatype.never_any_project end) @@ -79,17 +99,30 @@ let join wh1 wh2 = wh1.priority_bases wh2.priority_bases; default_hints = Ival.Widen_Hints.union wh1.default_hints wh2.default_hints; + default_float_hints = + Fc_float.Widen_Hints.union wh1.default_float_hints wh2.default_float_hints; default_hints_by_stmt = Stmt.Map.merge (fun _key -> map_merge Ival.Widen_Hints.union) wh1.default_hints_by_stmt wh2.default_hints_by_stmt; + default_float_hints_by_stmt = + Stmt.Map.merge (fun _key -> map_merge Fc_float.Widen_Hints.union) + wh1.default_float_hints_by_stmt wh2.default_float_hints_by_stmt; hints_by_addr = Base.Map.merge (fun _key -> map_merge Ival.Widen_Hints.union) wh1.hints_by_addr wh2.hints_by_addr; + float_hints_by_addr = + Base.Map.merge (fun _key -> map_merge Fc_float.Widen_Hints.union) + wh1.float_hints_by_addr wh2.float_hints_by_addr; hints_by_addr_by_stmt = Stmt.Map.merge (fun _key -> map_merge (Base.Map.merge (fun _key -> map_merge Ival.Widen_Hints.union))) wh1.hints_by_addr_by_stmt wh2.hints_by_addr_by_stmt; + float_hints_by_addr_by_stmt = + Stmt.Map.merge (fun _key -> + map_merge (Base.Map.merge + (fun _key -> map_merge Fc_float.Widen_Hints.union))) + wh1.float_hints_by_addr_by_stmt wh2.float_hints_by_addr_by_stmt; } let pretty fmt wh = @@ -110,19 +143,32 @@ let pretty fmt wh = Format.fprintf fmt "@[priority bases: %a@\n\ default_hints: %a@\n\ + default_float_hints: %a@\n\ default_hints_by_stmt: %a@\n\ + default_float_hints_by_stmt: %a@\n\ hints_by_addr: %a@\n\ - hints_by_addr_by_stmt: %a@]" + float_hints_by_addr: %a@\n\ + hints_by_addr_by_stmt: %a@\n\ + float_hints_by_addr_by_stmt: %a@]" (pp_bindings pp_stmt Base.Set.pretty) (Stmt.Map.bindings wh.priority_bases) Ival.Widen_Hints.pretty wh.default_hints + Fc_float.Widen_Hints.pretty wh.default_float_hints (Pretty_utils.pp_list ~sep:",@ " (Pretty_utils.pp_pair ~sep:" -> " pp_stmt Ival.Widen_Hints.pretty)) (Stmt.Map.bindings wh.default_hints_by_stmt) + (Pretty_utils.pp_list ~sep:",@ " + (Pretty_utils.pp_pair ~sep:" -> " pp_stmt Fc_float.Widen_Hints.pretty)) + (Stmt.Map.bindings wh.default_float_hints_by_stmt) (Pretty_utils.pp_list ~sep:",@ " (Pretty_utils.pp_pair ~sep:" -> " Base.pretty Ival.Widen_Hints.pretty)) (Base.Map.bindings wh.hints_by_addr) + (Pretty_utils.pp_list ~sep:",@ " + (Pretty_utils.pp_pair ~sep:" -> " Base.pretty Fc_float.Widen_Hints.pretty)) + (Base.Map.bindings wh.float_hints_by_addr) (pp_bindings pp_stmt (pp_base_map Ival.Widen_Hints.pretty)) (Stmt.Map.bindings wh.hints_by_addr_by_stmt) + (pp_bindings pp_stmt (pp_base_map Fc_float.Widen_Hints.pretty)) + (Stmt.Map.bindings wh.float_hints_by_addr_by_stmt) let hints_for_base default_hints hints_by_base b = let widen_hints_null = @@ -147,7 +193,7 @@ let hints_for_base default_hints hints_by_base b = ) let hints_from_keys stmt h = - let hints_by_base = + let int_hints_by_base = try let at_stmt = Stmt.Map.find stmt h.hints_by_addr_by_stmt in Base.Map.merge (fun _b os1 os2 -> @@ -158,17 +204,40 @@ let hints_from_keys stmt h = ) at_stmt h.hints_by_addr with Not_found -> h.hints_by_addr in + let float_hints_by_base = + try + let at_stmt = Stmt.Map.find stmt h.float_hints_by_addr_by_stmt in + Base.Map.merge (fun _b os1 os2 -> + match os1, os2 with + | Some s1, Some s2 -> Some (Fc_float.Widen_Hints.union s1 s2) + | Some s, None | None, Some s -> Some s + | None, None -> None + ) at_stmt h.float_hints_by_addr + with Not_found -> h.float_hints_by_addr + in let prio = try Stmt.Map.find stmt h.priority_bases with Not_found -> Base.Set.empty in - let default = + let int_default = try let at_stmt = Stmt.Map.find stmt h.default_hints_by_stmt in Ival.Widen_Hints.union h.default_hints at_stmt with Not_found -> h.default_hints in - prio, (fun b -> hints_for_base default hints_by_base b) + let float_default = + try + let at_stmt = Stmt.Map.find stmt h.default_float_hints_by_stmt in + Fc_float.Widen_Hints.union h.default_float_hints at_stmt + with Not_found -> h.default_float_hints + in + let float_hints_for_base b = + try Fc_float.Widen_Hints.union (Base.Map.find b float_hints_by_base) float_default + with Not_found -> float_default + in + prio, (fun b b' -> + hints_for_base int_default int_hints_by_base b b', + float_hints_for_base b) let var_hints stmt prio_bases = { empty with priority_bases = Stmt.Map.singleton stmt prio_bases } @@ -185,10 +254,23 @@ let num_hints stmto baseo hints = | None, None -> (* Hints for all bases and all statements *) { empty with default_hints = hints } +let float_hints stmto baseo hints = + match stmto, baseo with + | None, Some b -> (* Hints for a base at all statements *) + { empty with float_hints_by_addr = Base.Map.singleton b hints } + | Some stmt, Some b -> (* Hints for a base at a statement *) + { empty with float_hints_by_addr_by_stmt = Stmt.Map.singleton stmt + (Base.Map.singleton b hints) } + | Some stmt, None -> (* Hints for all bases and a given statement *) + { empty with default_float_hints_by_stmt = Stmt.Map.singleton stmt hints } + | None, None -> (* Hints for all bases and all statements *) + { empty with default_float_hints = hints } + (* default set of hints. Depends on the machdep *) let default () = - let default = Ival.Widen_Hints.default_widen_hints in - num_hints None None default + let int_default = Ival.Widen_Hints.default_widen_hints in + let float_default = Fc_float.Widen_Hints.default_widen_hints in + join (num_hints None None int_default) (float_hints None None float_default) (* Local Variables: diff --git a/src/plugins/value_types/widen_type.mli b/src/plugins/value_types/widen_type.mli index e017c3c17f7..00f9cf979a0 100644 --- a/src/plugins/value_types/widen_type.mli +++ b/src/plugins/value_types/widen_type.mli @@ -41,6 +41,11 @@ val pretty : Format.formatter -> t -> unit val num_hints: Cil_types.stmt option -> Base.t option -> Ival.Widen_Hints.t -> t +(** Define floating hints for one or all variables ([None]), + for a certain stmt or for all statements ([None]). *) +val float_hints: + Cil_types.stmt option -> Base.t option -> Fc_float.Widen_Hints.t -> t + (** Define a set of bases to widen in priority for a given statement. *) val var_hints : Cil_types.stmt -> Base.Set.t -> t @@ -48,7 +53,7 @@ val var_hints : Cil_types.stmt -> Base.Set.t -> t {!Cvalue.Model.widen}. *) val hints_from_keys : Cil_types.stmt -> t -> - Base.Set.t * (Base.t -> Locations.Location_Bytes.generic_widen_hint) + Base.Set.t * (Base.t -> Locations.Location_Bytes.numerical_widen_hint) (* Local Variables: diff --git a/tests/misc/oracle/widen_hints_float.res.oracle b/tests/misc/oracle/widen_hints_float.res.oracle new file mode 100644 index 00000000000..1b5726f1922 --- /dev/null +++ b/tests/misc/oracle/widen_hints_float.res.oracle @@ -0,0 +1,61 @@ +[kernel] Parsing tests/misc/widen_hints_float.c (with preprocessing) +[eva] Analyzing a complete application starting at main +[eva] Computing initial state +[eva] Initial state computed +[eva:initial-state] Values of globals at initialization + +[eva] computing for function Frama_C_double_interval <- main. + Called from tests/misc/widen_hints_float.c:12. +[eva] using specification for function Frama_C_double_interval +[eva] tests/misc/widen_hints_float.c:12: + function Frama_C_double_interval: precondition 'finite' got status valid. +[eva] tests/misc/widen_hints_float.c:12: + function Frama_C_double_interval: precondition 'order' got status valid. +[eva] Done for function Frama_C_double_interval +[eva] tests/misc/widen_hints_float.c:15: starting to merge loop iterations +[eva] computing for function Frama_C_double_interval <- main. + Called from tests/misc/widen_hints_float.c:19. +[eva] tests/misc/widen_hints_float.c:19: + function Frama_C_double_interval: precondition 'finite' got status valid. +[eva] tests/misc/widen_hints_float.c:19: + function Frama_C_double_interval: precondition 'order' got status valid. +[eva] Done for function Frama_C_double_interval +[eva] tests/misc/widen_hints_float.c:22: starting to merge loop iterations +[eva] computing for function Frama_C_double_interval <- main. + Called from tests/misc/widen_hints_float.c:26. +[eva] tests/misc/widen_hints_float.c:26: + function Frama_C_double_interval: precondition 'finite' got status valid. +[eva] tests/misc/widen_hints_float.c:26: + function Frama_C_double_interval: precondition 'order' got status valid. +[eva] Done for function Frama_C_double_interval +[eva] tests/misc/widen_hints_float.c:28: starting to merge loop iterations +[eva:alarm] tests/misc/widen_hints_float.c:29: Warning: + non-finite double value. + assert + \is_finite((double)((double)(f3 - (double)64) * (double)(f3 - (double)64))); +[eva] Recording results for main +[eva] done for function main +[eva] ====== VALUES COMPUTED ====== +[eva:final-states] Values at end of function main: + Frama_C_entropy_source ∈ [--..--] + f1 ∈ [-0. .. 71.] + f2 ∈ [-80. .. 0.] + f3 ∈ [-1.79769313486e+308 .. 1.79769313486e+308] + __retres ∈ {0} +[from] Computing for function main +[from] Computing for function Frama_C_double_interval <-main +[from] Done for function Frama_C_double_interval +[from] Done for function main +[from] ====== DEPENDENCIES COMPUTED ====== + These dependencies hold at termination for the executions that terminate: +[from] Function Frama_C_double_interval: + Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) + \result FROM Frama_C_entropy_source; min; max +[from] Function main: + Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) + \result FROM \nothing +[from] ====== END OF DEPENDENCIES ====== +[inout] Out (internal) for function main: + Frama_C_entropy_source; f1; i; f2; i_0; f3; i_1; __retres +[inout] Inputs for function main: + Frama_C_entropy_source diff --git a/tests/misc/widen_hints_float.c b/tests/misc/widen_hints_float.c new file mode 100644 index 00000000000..a0e5a550a5c --- /dev/null +++ b/tests/misc/widen_hints_float.c @@ -0,0 +1,33 @@ +#include "__fc_builtin.h" + +int main() { + + /* + The expression is a parabola p + where p([0.;64.]) = [0.;64.] and p([64.;128.]) = [0.;64.]. + For any value x<0, p(x) < x; + For any value 128.<x, p(x) < -x; + */ + + double f1 = Frama_C_double_interval(0.,1./64.); + + //@ loop widen_hints f1, 71.; + for(int i = 0; i < 100; i++){ + f1 = (64*64 - (f1 - 64) * (f1 - 64))/64; + } + + double f2 = Frama_C_double_interval(-1./64.,-0); + + //@ loop widen_hints f2, -80.; + for(int i = 0; i < 100; i++){ + f2 = -(64*64 - (-f2 - 64) * (-f2 - 64))/64; + } + + double f3 = Frama_C_double_interval(0.,1./64.); + + for(int i = 0; i < 100; i++){ + f3 = (64*64 - (f3 - 64) * (f3 - 64))/64; + } + + return 0; +} -- GitLab From 419daba1c7306f8d2991cd264751cb132590489f Mon Sep 17 00:00:00 2001 From: Valentin Perrelle <valentin.perrelle@cea.fr> Date: Wed, 20 Mar 2019 14:53:45 +0100 Subject: [PATCH 156/376] [Eva] More float widen hints tests --- .../misc/oracle/widen_hints_float.res.oracle | 188 ++++++++++++++++-- tests/misc/widen_hints_float.c | 47 ++++- 2 files changed, 210 insertions(+), 25 deletions(-) diff --git a/tests/misc/oracle/widen_hints_float.res.oracle b/tests/misc/oracle/widen_hints_float.res.oracle index 1b5726f1922..087bdf14a4f 100644 --- a/tests/misc/oracle/widen_hints_float.res.oracle +++ b/tests/misc/oracle/widen_hints_float.res.oracle @@ -1,61 +1,205 @@ [kernel] Parsing tests/misc/widen_hints_float.c (with preprocessing) +[kernel:parser:decimal-float] tests/misc/widen_hints_float.c:42: Warning: + Floating-point constant 0.01 is not represented exactly. Will use 0x1.47ae147ae147bp-7. + (warn-once: no further messages from category 'parser:decimal-float' will be emitted) [eva] Analyzing a complete application starting at main [eva] Computing initial state [eva] Initial state computed [eva:initial-state] Values of globals at initialization -[eva] computing for function Frama_C_double_interval <- main. - Called from tests/misc/widen_hints_float.c:12. +[eva] computing for function parabola <- main. + Called from tests/misc/widen_hints_float.c:70. +[eva] computing for function Frama_C_double_interval <- parabola <- main. + Called from tests/misc/widen_hints_float.c:17. [eva] using specification for function Frama_C_double_interval -[eva] tests/misc/widen_hints_float.c:12: +[eva] tests/misc/widen_hints_float.c:17: function Frama_C_double_interval: precondition 'finite' got status valid. -[eva] tests/misc/widen_hints_float.c:12: +[eva] tests/misc/widen_hints_float.c:17: function Frama_C_double_interval: precondition 'order' got status valid. [eva] Done for function Frama_C_double_interval -[eva] tests/misc/widen_hints_float.c:15: starting to merge loop iterations -[eva] computing for function Frama_C_double_interval <- main. - Called from tests/misc/widen_hints_float.c:19. -[eva] tests/misc/widen_hints_float.c:19: +[eva] tests/misc/widen_hints_float.c:20: starting to merge loop iterations +[eva] computing for function Frama_C_double_interval <- parabola <- main. + Called from tests/misc/widen_hints_float.c:24. +[eva] tests/misc/widen_hints_float.c:24: function Frama_C_double_interval: precondition 'finite' got status valid. -[eva] tests/misc/widen_hints_float.c:19: +[eva] tests/misc/widen_hints_float.c:24: function Frama_C_double_interval: precondition 'order' got status valid. [eva] Done for function Frama_C_double_interval -[eva] tests/misc/widen_hints_float.c:22: starting to merge loop iterations -[eva] computing for function Frama_C_double_interval <- main. - Called from tests/misc/widen_hints_float.c:26. -[eva] tests/misc/widen_hints_float.c:26: +[eva] tests/misc/widen_hints_float.c:27: starting to merge loop iterations +[eva] computing for function Frama_C_double_interval <- parabola <- main. + Called from tests/misc/widen_hints_float.c:31. +[eva] tests/misc/widen_hints_float.c:31: function Frama_C_double_interval: precondition 'finite' got status valid. -[eva] tests/misc/widen_hints_float.c:26: +[eva] tests/misc/widen_hints_float.c:31: function Frama_C_double_interval: precondition 'order' got status valid. [eva] Done for function Frama_C_double_interval -[eva] tests/misc/widen_hints_float.c:28: starting to merge loop iterations -[eva:alarm] tests/misc/widen_hints_float.c:29: Warning: +[eva] tests/misc/widen_hints_float.c:33: starting to merge loop iterations +[eva:alarm] tests/misc/widen_hints_float.c:34: Warning: non-finite double value. assert \is_finite((double)((double)(f3 - (double)64) * (double)(f3 - (double)64))); +[eva] Recording results for parabola +[eva] Done for function parabola +[eva] computing for function trigo <- main. + Called from tests/misc/widen_hints_float.c:71. +[eva] computing for function Frama_C_double_interval <- trigo <- main. + Called from tests/misc/widen_hints_float.c:42. +[eva] tests/misc/widen_hints_float.c:42: + function Frama_C_double_interval: precondition 'finite' got status valid. +[eva] tests/misc/widen_hints_float.c:42: + function Frama_C_double_interval: precondition 'order' got status valid. +[eva] Done for function Frama_C_double_interval +[eva] tests/misc/widen_hints_float.c:42: Call to builtin sin +[eva] tests/misc/widen_hints_float.c:42: + function sin: precondition 'finite_arg' got status valid. +[eva] tests/misc/widen_hints_float.c:41: starting to merge loop iterations +[eva] computing for function Frama_C_double_interval <- trigo <- main. + Called from tests/misc/widen_hints_float.c:42. +[eva] Done for function Frama_C_double_interval +[eva] tests/misc/widen_hints_float.c:42: Call to builtin sin +[eva] computing for function Frama_C_double_interval <- trigo <- main. + Called from tests/misc/widen_hints_float.c:42. +[eva] Done for function Frama_C_double_interval +[eva] tests/misc/widen_hints_float.c:42: Call to builtin sin +[eva] computing for function Frama_C_double_interval <- trigo <- main. + Called from tests/misc/widen_hints_float.c:42. +[eva] Done for function Frama_C_double_interval +[eva] tests/misc/widen_hints_float.c:42: Call to builtin sin +[eva] computing for function Frama_C_double_interval <- trigo <- main. + Called from tests/misc/widen_hints_float.c:42. +[eva] Done for function Frama_C_double_interval +[eva] tests/misc/widen_hints_float.c:42: Call to builtin sin +[eva] computing for function Frama_C_double_interval <- trigo <- main. + Called from tests/misc/widen_hints_float.c:42. +[eva] Done for function Frama_C_double_interval +[eva] tests/misc/widen_hints_float.c:42: Call to builtin sin +[eva] Recording results for trigo +[eva] Done for function trigo +[eva] computing for function first_order_filter <- main. + Called from tests/misc/widen_hints_float.c:72. +[eva] computing for function Frama_C_double_interval <- first_order_filter <- main. + Called from tests/misc/widen_hints_float.c:49. +[eva] tests/misc/widen_hints_float.c:49: + function Frama_C_double_interval: precondition 'finite' got status valid. +[eva] tests/misc/widen_hints_float.c:49: + function Frama_C_double_interval: precondition 'order' got status valid. +[eva] Done for function Frama_C_double_interval +[eva] tests/misc/widen_hints_float.c:48: starting to merge loop iterations +[eva] computing for function Frama_C_double_interval <- first_order_filter <- main. + Called from tests/misc/widen_hints_float.c:49. +[eva] Done for function Frama_C_double_interval +[eva] computing for function Frama_C_double_interval <- first_order_filter <- main. + Called from tests/misc/widen_hints_float.c:49. +[eva] Done for function Frama_C_double_interval +[eva] computing for function Frama_C_double_interval <- first_order_filter <- main. + Called from tests/misc/widen_hints_float.c:49. +[eva] Done for function Frama_C_double_interval +[eva] computing for function Frama_C_double_interval <- first_order_filter <- main. + Called from tests/misc/widen_hints_float.c:49. +[eva] Done for function Frama_C_double_interval +[eva] computing for function Frama_C_double_interval <- first_order_filter <- main. + Called from tests/misc/widen_hints_float.c:49. +[eva] Done for function Frama_C_double_interval +[eva] computing for function Frama_C_double_interval <- first_order_filter <- main. + Called from tests/misc/widen_hints_float.c:54. +[eva] tests/misc/widen_hints_float.c:54: + function Frama_C_double_interval: precondition 'finite' got status valid. +[eva] tests/misc/widen_hints_float.c:54: + function Frama_C_double_interval: precondition 'order' got status valid. +[eva] Done for function Frama_C_double_interval +[eva] tests/misc/widen_hints_float.c:53: starting to merge loop iterations +[eva] computing for function Frama_C_double_interval <- first_order_filter <- main. + Called from tests/misc/widen_hints_float.c:54. +[eva] Done for function Frama_C_double_interval +[eva] computing for function Frama_C_double_interval <- first_order_filter <- main. + Called from tests/misc/widen_hints_float.c:54. +[eva] Done for function Frama_C_double_interval +[eva] computing for function Frama_C_double_interval <- first_order_filter <- main. + Called from tests/misc/widen_hints_float.c:54. +[eva] Done for function Frama_C_double_interval +[eva] computing for function Frama_C_double_interval <- first_order_filter <- main. + Called from tests/misc/widen_hints_float.c:54. +[eva] Done for function Frama_C_double_interval +[eva] computing for function Frama_C_double_interval <- first_order_filter <- main. + Called from tests/misc/widen_hints_float.c:54. +[eva] Done for function Frama_C_double_interval +[eva] Recording results for first_order_filter +[eva] Done for function first_order_filter +[eva] computing for function newton_sqrt <- main. + Called from tests/misc/widen_hints_float.c:73. +[eva] tests/misc/widen_hints_float.c:59: starting to merge loop iterations +[eva] tests/misc/widen_hints_float.c:64: starting to merge loop iterations +[eva] Recording results for newton_sqrt +[eva] Done for function newton_sqrt [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== -[eva:final-states] Values at end of function main: +[eva:final-states] Values at end of function first_order_filter: + Frama_C_entropy_source ∈ [--..--] + f1 ∈ [-10. .. 10.] + f2 ∈ [-5. .. 5.] +[eva:final-states] Values at end of function newton_sqrt: + f1 ∈ [1. .. 2.] + f2 ∈ [1.4 .. 2.] +[eva:final-states] Values at end of function parabola: Frama_C_entropy_source ∈ [--..--] f1 ∈ [-0. .. 71.] f2 ∈ [-80. .. 0.] f3 ∈ [-1.79769313486e+308 .. 1.79769313486e+308] - __retres ∈ {0} -[from] Computing for function main -[from] Computing for function Frama_C_double_interval <-main +[eva:final-states] Values at end of function trigo: + Frama_C_entropy_source ∈ [--..--] + f1 ∈ [-1. .. 1.] +[eva:final-states] Values at end of function main: + Frama_C_entropy_source ∈ [--..--] +[from] Computing for function first_order_filter +[from] Computing for function Frama_C_double_interval <-first_order_filter [from] Done for function Frama_C_double_interval +[from] Done for function first_order_filter +[from] Computing for function newton_sqrt +[from] Done for function newton_sqrt +[from] Computing for function parabola +[from] Done for function parabola +[from] Computing for function trigo +[from] Computing for function sin <-trigo +[from] Done for function sin +[from] Done for function trigo +[from] Computing for function main [from] Done for function main [from] ====== DEPENDENCIES COMPUTED ====== These dependencies hold at termination for the executions that terminate: [from] Function Frama_C_double_interval: Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) \result FROM Frama_C_entropy_source; min; max +[from] Function first_order_filter: + Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) +[from] Function newton_sqrt: + NO EFFECTS +[from] Function parabola: + Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) +[from] Function sin: + \result FROM x +[from] Function trigo: + Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) [from] Function main: Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) - \result FROM \nothing [from] ====== END OF DEPENDENCIES ====== +[inout] Out (internal) for function first_order_filter: + Frama_C_entropy_source; f1; i; tmp; f2; i_0; tmp_0 +[inout] Inputs for function first_order_filter: + Frama_C_entropy_source +[inout] Out (internal) for function newton_sqrt: + f1; i; f2; i_0 +[inout] Inputs for function newton_sqrt: + \nothing +[inout] Out (internal) for function parabola: + Frama_C_entropy_source; f1; i; f2; i_0; f3; i_1 +[inout] Inputs for function parabola: + Frama_C_entropy_source +[inout] Out (internal) for function trigo: + Frama_C_entropy_source; f1; i; tmp +[inout] Inputs for function trigo: + Frama_C_entropy_source [inout] Out (internal) for function main: - Frama_C_entropy_source; f1; i; f2; i_0; f3; i_1; __retres + Frama_C_entropy_source [inout] Inputs for function main: Frama_C_entropy_source diff --git a/tests/misc/widen_hints_float.c b/tests/misc/widen_hints_float.c index a0e5a550a5c..db243cd089d 100644 --- a/tests/misc/widen_hints_float.c +++ b/tests/misc/widen_hints_float.c @@ -1,7 +1,12 @@ -#include "__fc_builtin.h" +/* run.config* + STDOPT: #"-val-subdivide-non-linear 20" +*/ + -int main() { +#include "__fc_builtin.h" +#include <math.h> +void parabola(void) { /* The expression is a parabola p where p([0.;64.]) = [0.;64.] and p([64.;128.]) = [0.;64.]. @@ -28,6 +33,42 @@ int main() { for(int i = 0; i < 100; i++){ f3 = (64*64 - (f3 - 64) * (f3 - 64))/64; } +} + +void trigo(void) { + double f1 = 0.0; + + for (int i = 0; i < 100; i++) { + f1 = sin(f1 + Frama_C_double_interval(-0.01, 0.01)); + } +} + +void first_order_filter(void) { + float f1 = 0.0; + for (int i = 1; i < 100; i++) + f1 = f1 * 0.8 + Frama_C_double_interval(-1.0, 1.0); + + float f2 = 0.0; + //@ loop widen_hints f2, 5., -5.; + for (int i = 1; i < 100; i++) + f2 = f2 * 0.8 + Frama_C_double_interval(-1.0, 1.0); +} + +void newton_sqrt(void) { + double f1 = 2.0; + for (int i = 1; i < 100; i++) + f1 = (f1 + 2.0 / f1) / 2.0; + + double f2 = 2.0; + //@ loop widen_hints f2, 1.4; + for (int i = 1; i < 100; i++) { + f2 = (f2 + 2.0 / f2) / 2.0; + } +} - return 0; +void main(voi) { + parabola(); + trigo(); + first_order_filter(); + newton_sqrt(); } -- GitLab From 41ce82a4010409a76e90043e6a2e128f8d608961 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Tue, 26 Mar 2019 20:02:11 +0100 Subject: [PATCH 157/376] [Eva] keep real lower/upper bounds for floating-point widening hints --- .../abstract_interp/fc_float.ml | 54 ++++++++++++++----- .../abstract_interp/float_sig.mli | 2 +- .../ast_queries/cil_datatype.ml | 40 ++++++++++++-- .../ast_queries/cil_datatype.mli | 2 + src/plugins/value/utils/widen.ml | 24 +++++---- 5 files changed, 94 insertions(+), 28 deletions(-) diff --git a/src/kernel_services/abstract_interp/fc_float.ml b/src/kernel_services/abstract_interp/fc_float.ml index 58da42b53ee..5f0b009bab1 100644 --- a/src/kernel_services/abstract_interp/fc_float.ml +++ b/src/kernel_services/abstract_interp/fc_float.ml @@ -61,6 +61,7 @@ let cmp_ieee = (compare: float -> float -> int) (* replace "noalloc" with [@@noalloc] for OCaml version >= 4.03.0 *) [@@@ warning "-3"] external compare : float -> float -> int = "float_compare_total" "noalloc" +let total_compare = compare [@@@ warning "+3"] let of_float round prec f = round >>% fun () -> round_to_precision prec f @@ -118,7 +119,7 @@ let le f1 f2 = compare f1 f2 <= 0 module Widen_Hints = struct - include Datatype.Float.Set + include Cil_datatype.Logic_real.Set let pretty fmt s = if not (is_empty s) then @@ -126,29 +127,55 @@ module Widen_Hints = struct ~pre:"@[<hov 1>{" ~suf:"}@]" ~sep:";@ " - iter Floating_point.pretty fmt s + iter + (fun fmt r -> Format.pp_print_string fmt r.Cil_types.r_literal) fmt s - let of_list l = + let logic_real_of_float f = + { Cil_types.r_literal = Format.asprintf "%10.7g" f; + r_nearest = f; + r_lower = f; + r_upper = f; } + + let of_float_list l = match l with | [] -> empty - | [e] -> singleton e + | [e] -> singleton (logic_real_of_float e) | e :: q -> - List.fold_left (fun acc x -> add x acc) (singleton e) q - - let m_pi = 3.1415929794311523 (* single-precision *) - let m_pi_2 = 1.5707964897155761 (* single-precision *) - let max_single_float = Floating_point.max_single_precision_float + List.fold_left + (fun acc x -> add (logic_real_of_float x) acc) + (singleton (logic_real_of_float e)) q let default_widen_hints = - let l = [0.0;1.0;m_pi_2;m_pi;10.;1e10;max_single_float;1e80] in - union (of_list l) (of_list (List.map (fun x -> -. x) l)) + let l = [0.0;1.0;10.0;1e10;Floating_point.max_single_precision_float;1e80] in + union (of_float_list l) (of_float_list (List.map (fun x -> -. x) l)) + + exception Found of float + + let nearest_float_ge f s = + try + iter (fun e -> + if total_compare e.Cil_types.r_upper f >= 0 + then raise (Found e.Cil_types.r_upper)) + s; + raise Not_found + with Found r -> r + + let nearest_float_le f s = + try + let els_desc = List.rev (elements s) in + List.iter (fun e -> + if total_compare e.Cil_types.r_lower f <= 0 + then raise (Found e.Cil_types.r_lower)) + els_desc; + raise Not_found + with Found r -> r end type widen_hints = Widen_Hints.t let widen_up wh prec f = - let r = try Widen_Hints.nearest_elt_ge f wh + let r = try Widen_Hints.nearest_float_ge f wh with Not_found -> if le f max_float then max_float else infinity @@ -156,14 +183,13 @@ let widen_up wh prec f = round_to_precision Up prec r let widen_down wh prec f = - let r = try Widen_Hints.nearest_elt_le f wh + let r = try Widen_Hints.nearest_float_le f wh with Not_found -> if le (-. max_float) f then (-. max_float) else neg_infinity in round_to_precision Down prec r - let neg = (~-.) let abs = abs_float diff --git a/src/kernel_services/abstract_interp/float_sig.mli b/src/kernel_services/abstract_interp/float_sig.mli index 5febce60c3d..50ade7d97da 100644 --- a/src/kernel_services/abstract_interp/float_sig.mli +++ b/src/kernel_services/abstract_interp/float_sig.mli @@ -32,7 +32,7 @@ type prec = Single | Double | Long_Double | Real module type Widen_Hints = sig - include FCSet.S with type elt = Datatype.Float.t + include FCSet.S with type elt = Cil_datatype.Logic_real.t include Datatype.S with type t:=t val default_widen_hints: t diff --git a/src/kernel_services/ast_queries/cil_datatype.ml b/src/kernel_services/ast_queries/cil_datatype.ml index 49792655353..f0b07d285ac 100644 --- a/src/kernel_services/ast_queries/cil_datatype.ml +++ b/src/kernel_services/ast_queries/cil_datatype.ml @@ -1446,15 +1446,26 @@ let is_exact_float r = classify_float r.r_upper = FP_normal && Datatype.Float.equal r.r_upper r.r_lower +[@@@ warning "-3"] +(* [float_compare_total] is used to ensure -0.0 and 0.0 are distinct *) +external float_compare_total : float -> float -> int = "float_compare_total" "noalloc" +[@@@ warning "+3"] + +let compare_logic_real r1 r2 = + let c = float_compare_total r1.r_lower r2.r_lower in + if c <> 0 then c else + let c = float_compare_total r1.r_nearest r2.r_nearest in + if c <> 0 then c else + let c = float_compare_total r1.r_upper r2.r_upper in + if c <> 0 then c else + String.compare r1.r_literal r2.r_literal + let compare_logic_constant c1 c2 = match c1,c2 with | Integer (i1,_), Integer(i2,_) -> Integer.compare i1 i2 | LStr s1, LStr s2 -> Datatype.String.compare s1 s2 | LWStr s1, LWStr s2 -> compare_list Datatype.Int64.compare s1 s2 | LChr c1, LChr c2 -> Datatype.Char.compare c1 c2 - | LReal r1, LReal r2 -> - if is_exact_float r1 && is_exact_float r2 - then Datatype.Float.compare r1.r_lower r2.r_lower - else Datatype.String.compare r1.r_literal r2.r_literal + | LReal r1, LReal r2 -> compare_logic_real r1 r2 | LEnum e1, LEnum e2 -> Enumitem.compare e1 e2 | Integer _,(LStr _|LWStr _ |LChr _|LReal _|LEnum _) -> 1 | LStr _ ,(LWStr _ |LChr _|LReal _|LEnum _) -> 1 @@ -1882,6 +1893,27 @@ module Logic_label = struct end) end +module Logic_real = struct + let pretty_ref = ref (fun _ _ -> assert false) + include Make_with_collections + (struct + type t = logic_real + let name = "Logic_real" + let reprs = + [{ r_literal = ""; r_nearest = 0.0; r_lower = 0.0; r_upper = 0.0; }] + let compare = compare_logic_real + let hash r = + let fhash = Datatype.Float.hash in + fhash r.r_lower + 3 * fhash r.r_nearest + 7 * fhash r.r_upper + + 11 * Datatype.String.hash r.r_literal + let equal r1 r2 = compare r1 r2 = 0 + let copy = Datatype.undefined + let internal_pretty_code = Datatype.undefined + let pretty fmt t = !pretty_ref fmt t + let varname _ = "logic_real" + end) +end + module Global_annotation = struct let pretty_ref = ref (fun _ -> assert false) include Make_with_collections diff --git a/src/kernel_services/ast_queries/cil_datatype.mli b/src/kernel_services/ast_queries/cil_datatype.mli index f2552c6d88b..983c6ba3a37 100644 --- a/src/kernel_services/ast_queries/cil_datatype.mli +++ b/src/kernel_services/ast_queries/cil_datatype.mli @@ -279,6 +279,8 @@ module Term_lhost: S_with_collections_pretty with type t = term_lhost module Term_offset: S_with_collections_pretty with type t = term_offset module Term_lval: S_with_collections_pretty with type t = term_lval +module Logic_real: S_with_collections_pretty with type t = logic_real + module Predicate: S_with_pretty with type t = predicate module Identified_predicate: S_with_collections_pretty with type t = identified_predicate diff --git a/src/plugins/value/utils/widen.ml b/src/plugins/value/utils/widen.ml index 94d70a29988..8bd8db47b52 100644 --- a/src/plugins/value/utils/widen.ml +++ b/src/plugins/value/utils/widen.ml @@ -34,12 +34,18 @@ let dkey = Widen_hints_ext.dkey reuse loop indexes... *) -let rec constFoldTermToNearestFloat = function - | TConst (LReal r) -> Some (r.r_nearest) +let rec constFoldTermToLogicReal = function + | TConst (LReal r) -> Some r | TUnOp (Neg,e) -> begin - match (constFoldTermToNearestFloat e.term_node) with + match (constFoldTermToLogicReal e.term_node) with | None -> None - | Some e -> Some (-. e) + | Some e -> Some { r_literal = + if String.get e.r_literal 0 = '-' then + String.sub e.r_literal 1 (String.length e.r_literal - 1) + else "-" ^ e.r_literal; + r_nearest = -. e.r_nearest; + r_lower = -. e.r_upper; + r_upper = -. e.r_lower; } end | _ -> None @@ -87,7 +93,7 @@ class pragma_widen_visitor init_widen_hints init_enclosing_loops = object(self) | { term_node= TConst (Integer(v,_))} -> (lv, Ival.Widen_Hints.add v lint, lfloat, lt) | _ -> - match constFoldTermToNearestFloat t.term_node with + match constFoldTermToLogicReal t.term_node with | Some f -> (lv, lint, Fc_float.Widen_Hints.add f lfloat, lt) | None -> (lv, lint, lfloat, t::lt) in @@ -277,7 +283,7 @@ let base_of_static_hvars hvars = (* syntactic constraints prevent this from happening *) Value_parameters.fatal "unsupported lhost: %a" Printer.pp_lval (Mem e, offset) -type threshold = Int_th of Integer.t | Float_th of float +type threshold = Int_th of Integer.t | Real_th of logic_real (* try parsing as int, then as float *) let threshold_of_threshold_term ht = @@ -290,8 +296,8 @@ let threshold_of_threshold_term ht = match Logic_utils.constFoldTermToInt ht with | Some i -> Int_th i | None -> - match constFoldTermToNearestFloat ht.term_node with - | Some f -> Float_th f + match constFoldTermToLogicReal ht.term_node with + | Some f -> Real_th f | None -> Value_parameters.abort ~source:(fst ht.term_loc) "could not parse widening hint: %a@ \ @@ -310,7 +316,7 @@ let thresholds_of_threshold_terms hts = Printer.pp_term ht; has_int := true; Ival.Widen_Hints.add i int_acc, float_acc - | Float_th f -> + | Real_th f -> if !has_int then Value_parameters.abort ~source:(fst ht.term_loc) "widening hint mixing integers and floats: %a" -- GitLab From ff4cd3b7e2525a1dcf552f44c74dac10304e7357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 8 Jan 2019 10:49:55 +0100 Subject: [PATCH 158/376] [Inout] Avoids folding implicit zero-initializers of large arrays. Fixes a performance issue. --- src/plugins/inout/cumulative_analysis.ml | 12 ++++++++++++ src/plugins/inout/cumulative_analysis.mli | 4 ++++ src/plugins/inout/inputs.ml | 4 +++- src/plugins/inout/operational_inputs.ml | 16 +++++++++++----- src/plugins/inout/outputs.ml | 17 +++++++++++++---- 5 files changed, 43 insertions(+), 10 deletions(-) diff --git a/src/plugins/inout/cumulative_analysis.ml b/src/plugins/inout/cumulative_analysis.ml index ca86a013946..9bdb2f6624b 100644 --- a/src/plugins/inout/cumulative_analysis.ml +++ b/src/plugins/inout/cumulative_analysis.ml @@ -23,6 +23,18 @@ open Cil_types open Visitor +(* To avoid a performance issue, do not fold implicit zero-initializers of large + arrays. For arrays of scalar elements, the outputs of an initializer is + exactly the zone covered by the array. For arrays containing structs with + padding bits, this is an over-approximation, so we prefer folding the + initializer if the array is not too big (the 100 cells limit is arbitrary). + We still need to fold the explicit initializers to collect the inputs. *) +let fold_implicit_initializer typ = + not + (Cil.isArrayType typ && + (Cil.isArithmeticOrPointerType (Cil.typeOf_array_elem typ) + || Ast_info.array_size typ > (Integer.of_int 100))) + let specialize_state_on_call ?stmt kf = match stmt with | Some ({ skind = Instr (Call (_, _, l, _)) } as stmt) -> diff --git a/src/plugins/inout/cumulative_analysis.mli b/src/plugins/inout/cumulative_analysis.mli index 78448372050..e5af1ddfa41 100644 --- a/src/plugins/inout/cumulative_analysis.mli +++ b/src/plugins/inout/cumulative_analysis.mli @@ -32,6 +32,10 @@ open Cil_types can be gathered using a Cil visitor). *) +(** Should implicit zero-initializers for [typ] be folded? False for big arrays + to avoid a performance issue. *) +val fold_implicit_initializer: typ -> bool + val specialize_state_on_call: ?stmt:stmt -> kernel_function -> Db.Value.state (** If the given statement is a call to the given function, diff --git a/src/plugins/inout/inputs.ml b/src/plugins/inout/inputs.ml index 2819a6864d3..96edd8a1f3d 100644 --- a/src/plugins/inout/inputs.ml +++ b/src/plugins/inout/inputs.ml @@ -96,7 +96,9 @@ class virtual do_it_ = object(self) self#do_assign lv; ignore (visitFramacExpr (self:>frama_c_visitor) e) | CompoundInit (ct,initl) -> - let implicit = true in + (* No need to consider implicit zero-initializers, for which + nothing is read. *) + let implicit = false in let doinit o i _ () = ignore (visitFramacOffset (self:>frama_c_visitor) o); aux (Cil.addOffsetLval o lv) i diff --git a/src/plugins/inout/operational_inputs.ml b/src/plugins/inout/operational_inputs.ml index d4d164bb0b3..1c070d2ddf9 100644 --- a/src/plugins/inout/operational_inputs.ml +++ b/src/plugins/inout/operational_inputs.ml @@ -283,7 +283,6 @@ end) = struct let new_inputs = Zone.diff inputs data.under_outputs_d in store_non_terminating_inputs new_inputs; {data with over_inputs_d = Zone.join data.over_inputs_d new_inputs} - ;; (* Initialized const variables should be included as outputs of the function, so [for_writing] must be false for local initializations. It should be @@ -302,8 +301,8 @@ end) = struct Add it into the under-approximated outputs. *) Zone.link data.under_outputs_d new_outs else data.under_outputs_d - in { - under_outputs_d = new_sure_outs; + in + { under_outputs_d = new_sure_outs; over_inputs_d = Zone.join data.over_inputs_d new_inputs; over_outputs_d = Zone.join data.over_outputs_d new_outs } @@ -372,9 +371,16 @@ end) = struct let e_inputs = !Db.From.find_deps_no_transitivity_state state e in add_out ~for_writing:false state lv e_inputs acc | CompoundInit(ct, initl) -> - let implicit = true in + (* Avoid folding implicit zero-initializer of large arrays. *) + let implicit = Cumulative_analysis.fold_implicit_initializer ct in let doinit o i _ data = aux (Cil.addOffsetLval o lv) i data in - Cil.foldLeftCompound ~implicit ~doinit ~ct ~initl ~acc + let data = Cil.foldLeftCompound ~implicit ~doinit ~ct ~initl ~acc in + if implicit then data else + (* If the implicit zero-initializers hade been skipped, add the + zone of the array as outputs. It is exactly the written zone for + arrays of scalar elements. Nothing is read by zero-initializers, + so the inputs are empty. *) + add_out ~for_writing:false state lv Zone.bottom acc in aux (Cil.var v) i data | Call (lvaloption,funcexp,argl,loc) -> diff --git a/src/plugins/inout/outputs.ml b/src/plugins/inout/outputs.ml index 35e15968f18..67ff63012dc 100644 --- a/src/plugins/inout/outputs.ml +++ b/src/plugins/inout/outputs.ml @@ -89,10 +89,19 @@ class virtual do_it_ = object(self) let rec aux lv = function | SingleInit _ -> self#do_assign ~for_writing:false lv | CompoundInit (ct, initl) -> - let implicit = true in - let doinit o i _ () = aux (Cil.addOffsetLval o lv) i in - Cil.foldLeftCompound ~implicit ~doinit ~ct ~initl ~acc:() - in aux (Cil.var v) i + (* Avoid folding the implicit zero-initializers of large arrays. *) + if Cumulative_analysis.fold_implicit_initializer ct + then + let implicit = true in + let doinit o i _ () = aux (Cil.addOffsetLval o lv) i in + Cil.foldLeftCompound ~implicit ~doinit ~ct ~initl ~acc:() + else + (* For arrays of scalar elements, all the zone covered by the + array is written. For arrays of structs containing padding + bits, this is a sound over-approximation. *) + self#do_assign ~for_writing:false lv + in + aux (Cil.var v) i | Local_init (v, ConsInit(f, _, _),_) -> let state = Db.Value.get_state self#current_kinstr in if Cvalue.Model.is_top state then self#join Zone.top -- GitLab From bf0c00600fd5c946311e65625e43a32776f36270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 10 Jan 2019 14:58:20 +0100 Subject: [PATCH 159/376] [From] Avoids folding implicit zero-initializers of large arrays. Fixes a performance issue. --- src/plugins/from/from_compute.ml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/plugins/from/from_compute.ml b/src/plugins/from/from_compute.ml index 0f49ea62431..ea103a92baa 100644 --- a/src/plugins/from/from_compute.ml +++ b/src/plugins/from/from_compute.ml @@ -463,7 +463,6 @@ struct let init = Cil.is_mutable_or_initialized lv in transfer_assign stmt ~init lv comp_vars state | Local_init(v, AssignInit i, _) -> - let implicit = true in let rec aux lv i acc = let doinit o i _ state = aux (Cil.addOffsetLval o lv) i state in match i with @@ -471,7 +470,21 @@ struct let comp_vars = find stmt acc.deps_table e in transfer_assign stmt ~init:true lv comp_vars acc | CompoundInit (ct, initl) -> - Cil.foldLeftCompound ~implicit ~doinit ~ct ~initl ~acc + (* To avoid a performance issue, do not fold implicit initializers + of scalar or large arrays. We still use implicit initializers + for small struct arrays, as this may be more precise in case of + padding bits. The 100 limit is arbitrary. *) + let implicit = + not (Cil.isArrayType ct && + (Cil.isArithmeticOrPointerType (Cil.typeOf_array_elem ct) + || Ast_info.array_size ct > (Integer.of_int 100))) + in + let r = Cil.foldLeftCompound ~implicit ~doinit ~ct ~initl ~acc in + if implicit then r else + (* If implicit zero-initializers have been skipped, also mark + the entire array as initialized from no dependency (nothing + is read by the implicit zero-initializers). *) + transfer_assign stmt ~init:true lv Function_Froms.Deps.bottom r in aux (Cil.var v) i state | Call (lvaloption,funcexp,argl,loc) -> -- GitLab From 83c932dee9d23b30ec8e643189776511d6aca035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 28 Mar 2019 17:53:57 +0100 Subject: [PATCH 160/376] [Eva] Moves a minor optimization into partitioned_dataflow. Do not call enter_scope and leave_scope when no variables enter or leave the scope. --- src/plugins/value/engine/partitioned_dataflow.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/value/engine/partitioned_dataflow.ml b/src/plugins/value/engine/partitioned_dataflow.ml index c5ba74ba824..8621a85292a 100644 --- a/src/plugins/value/engine/partitioned_dataflow.ml +++ b/src/plugins/value/engine/partitioned_dataflow.ml @@ -334,10 +334,12 @@ module Make_Dataflow lift' (fun s -> Transfer.assume s stmt exp positive) states let transfer_enter (block : block) (states : state list) : state list = - List.map (Transfer.enter_scope kf (block_toplevel_locals block)) states + let vars = block_toplevel_locals block in + if vars = [] then states else List.map (Transfer.enter_scope kf vars) states let transfer_leave (block : block) (states : state list) : state list = - List.map (Domain.leave_scope kf block.blocals) states + let vars = block.blocals in + if vars = [] then states else List.map (Domain.leave_scope kf vars) states let transfer_call (stmt : stmt) (dest : lval option) (callee : exp) (args : exp list) (state : state) : state list = -- GitLab From 5b1e64e84b3c039d418668ef17d9f30ae35e9b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 28 Mar 2019 17:37:26 +0100 Subject: [PATCH 161/376] [Eva] New module type Abstractions.Eva: all abstractions and the evaluator. This module type simplifies the signature of functors using evaluation functions. --- Makefile | 4 +- src/plugins/value/engine/abstractions.ml | 8 ++- src/plugins/value/engine/abstractions.mli | 12 +++- src/plugins/value/engine/analysis.ml | 10 ++-- src/plugins/value/engine/compute_functions.ml | 52 +++++----------- .../value/engine/compute_functions.mli | 7 +-- .../value/engine/transfer_specification.ml | 12 ++-- .../value/engine/transfer_specification.mli | 16 ++--- src/plugins/value/engine/transfer_stmt.ml | 60 +++++++++---------- src/plugins/value/engine/transfer_stmt.mli | 16 ++--- 10 files changed, 87 insertions(+), 110 deletions(-) diff --git a/Makefile b/Makefile index f517edfe058..08279956546 100644 --- a/Makefile +++ b/Makefile @@ -913,12 +913,12 @@ PLUGIN_CMO:= slevel/split_strategy value_parameters \ domains/cvalue/cvalue_transfer domains/cvalue/cvalue_init \ domains/cvalue/cvalue_specification \ domains/cvalue/cvalue_domain \ - engine/subdivided_evaluation engine/evaluation \ + engine/subdivided_evaluation engine/evaluation engine/abstractions \ engine/recursion engine/transfer_stmt engine/transfer_specification \ engine/partitioning engine/mem_exec \ engine/legacy_partitioning engine/basic_partitioning \ engine/loop_partitioning engine/partitioned_dataflow \ - engine/initialization engine/abstractions \ + engine/initialization \ engine/compute_functions engine/analysis register PLUGIN_CMI:= values/abstract_value values/abstract_location \ engine/state_partitioning \ diff --git a/src/plugins/value/engine/abstractions.ml b/src/plugins/value/engine/abstractions.ml index a15c6bb25a6..117b2a5e4fe 100644 --- a/src/plugins/value/engine/abstractions.ml +++ b/src/plugins/value/engine/abstractions.ml @@ -83,11 +83,17 @@ end module type S = sig module Val : Value module Loc : Abstract_location.External with type value = Val.t - and type location = Precise_locs.precise_location module Dom : Abstract_domain.External with type value = Val.t and type location = Loc.location end +module type Eva = sig + include S + module Eval: Evaluation.S with type state = Dom.t + and type value = Val.t + and type loc = Loc.location + and type origin = Dom.origin +end (* -------------------------------------------------------------------------- *) (* Value Abstraction *) diff --git a/src/plugins/value/engine/abstractions.mli b/src/plugins/value/engine/abstractions.mli index 499cb28161d..9b3a1fb81ed 100644 --- a/src/plugins/value/engine/abstractions.mli +++ b/src/plugins/value/engine/abstractions.mli @@ -61,11 +61,21 @@ end module type S = sig module Val : Value module Loc : Abstract_location.External with type value = Val.t - and type location = Precise_locs.precise_location module Dom : Abstract_domain.External with type value = Val.t and type location = Loc.location end +(** Module gathering: + - the analysis abstractions: value, location and state abstractions; + - the evaluation functions for these abstractions. *) +module type Eva = sig + include S + module Eval: Evaluation.S with type state = Dom.t + and type value = Val.t + and type loc = Loc.location + and type origin = Dom.origin +end + (** Type of abstractions that use the builtin types for values and locations *) module type Standard_abstraction = Abstract_domain.Internal with type value = Cvalue.V.t diff --git a/src/plugins/value/engine/analysis.ml b/src/plugins/value/engine/analysis.ml index d11f2ec4640..402aea1875c 100644 --- a/src/plugins/value/engine/analysis.ml +++ b/src/plugins/value/engine/analysis.ml @@ -59,11 +59,13 @@ end module Make (Abstract: Abstractions.S) = struct - include Abstract - - module Eval = Evaluation.Make (Abstract.Val) (Abstract.Loc) (Abstract.Dom) + module Abstract = struct + include Abstract + module Eval = Evaluation.Make (Abstract.Val) (Abstract.Loc) (Abstract.Dom) + end - include Compute_functions.Make (Abstract) (Eval) + include Abstract + include Compute_functions.Make (Abstract) let get_stmt_state stmt = let fundec = Kernel_function.(get_definition (find_englobing_kf stmt)) in diff --git a/src/plugins/value/engine/compute_functions.ml b/src/plugins/value/engine/compute_functions.ml index 8d30fe87260..409a3b2a285 100644 --- a/src/plugins/value/engine/compute_functions.ml +++ b/src/plugins/value/engine/compute_functions.ml @@ -132,44 +132,24 @@ let () = | Sys.Signal_handle f -> prev := f with Invalid_argument _ -> () (* Ignore: SIGURSR1 is not available on Windows, and possibly on other platforms. *) -module Make - (Abstract: Abstractions.S) - (Eva: Evaluation.S with type value = Abstract.Val.t - and type origin = Abstract.Dom.origin - and type loc = Abstract.Loc.location - and type state = Abstract.Dom.t) -= struct - - module Domain = struct - include Abstract.Dom - let enter_scope kf vars state = match vars with - | [] -> state - | _ -> enter_scope kf vars state - let leave_scope kf vars state = match vars with - | [] -> state - | _ -> leave_scope kf vars state - end - module PowersetDomain = Powerset.Make (Domain) - - module Transfer = - Transfer_stmt.Make (Abstract.Val) (Abstract.Loc) (Domain) (Eva) - module Logic = Transfer_logic.Make (Domain) (PowersetDomain) +module Make (Abstract: Abstractions.Eva) = struct - module Spec = - Transfer_specification.Make - (Abstract.Val) (Abstract.Loc) (Domain) (PowersetDomain) (Logic) + module PowersetDomain = Powerset.Make (Abstract.Dom) - module Init = Initialization.Make (Abstract.Dom) (Eva) (Transfer) + module Transfer = Transfer_stmt.Make (Abstract) + module Logic = Transfer_logic.Make (Abstract.Dom) (PowersetDomain) + module Spec = Transfer_specification.Make (Abstract) (PowersetDomain) (Logic) + module Init = Initialization.Make (Abstract.Dom) (Abstract.Eval) (Transfer) module Computer = Partitioned_dataflow.Computer - (Domain) (PowersetDomain) (Transfer) (Init) (Logic) (Spec) + (Abstract.Dom) (PowersetDomain) (Transfer) (Init) (Logic) (Spec) let initial_state = Init.initial_state let get_cvalue = - match Domain.get Cvalue_domain.key with + match Abstract.Dom.get Cvalue_domain.key with | None -> fun _ -> Cvalue.Model.top | Some get -> fun state -> get state @@ -237,7 +217,7 @@ module Make (* Mem Exec *) - module MemExec = Mem_exec.Make (Abstract.Val) (Domain) + module MemExec = Mem_exec.Make (Abstract.Val) (Abstract.Dom) let compute_and_cache_call stmt call init_state = let default () = compute_using_spec_or_body (Kstmt stmt) call init_state in @@ -299,7 +279,7 @@ module Make let join_states = function | [] -> `Bottom | [state] -> `Value state - | s :: l -> `Value (List.fold_left Domain.join s l) + | s :: l -> `Value (List.fold_left Abstract.Dom.join s l) let compute_call_or_builtin stmt call state = match Builtins.find_builtin_override call.kf with @@ -333,14 +313,14 @@ module Make Builtins.apply_builtin builtin cvalue_call cvalue_state in let insert (cvalue_state, clobbered_set) = - Domain.set Locals_scoping.key clobbered_set - (Domain.set Cvalue_domain.key cvalue_state final_state) + Abstract.Dom.set Locals_scoping.key clobbered_set + (Abstract.Dom.set Cvalue_domain.key cvalue_state final_state) in let states = Bottom.bot_of_list (List.map insert cvalue_states) in Transfer.{states; cacheable; builtin=true} let compute_call = - if Domain.mem Cvalue_domain.key + if Abstract.Dom.mem Cvalue_domain.key && Abstract.Val.mem Main_values.cvalue_key && Abstract.Loc.mem Main_locations.ploc_key then compute_call_or_builtin @@ -349,7 +329,7 @@ module Make let () = Transfer.compute_call_ref := compute_call let store_initial_state kf init_state = - Domain.Store.register_initial_state (Value_util.call_stack ()) init_state; + Abstract.Dom.Store.register_initial_state (Value_util.call_stack ()) init_state; let cvalue_state = get_cvalue init_state in Db.Value.Call_Value_Callbacks.apply (cvalue_state, [kf, Kglobal]) @@ -366,7 +346,7 @@ module Make Value_util.pop_call_stack (); Value_parameters.feedback "done for function %a" Kernel_function.pretty kf; post_analysis (); - Domain.post_analysis final_state; + Abstract.Dom.post_analysis final_state; with | Db.Value.Aborted -> post_analysis_cleanup ~aborted:true; @@ -398,7 +378,7 @@ module Make let compute_from_init_state kf init_state = pre_analysis (); - Domain.Store.register_global_state (`Value init_state); + Abstract.Dom.Store.register_global_state (`Value init_state); compute kf init_state end diff --git a/src/plugins/value/engine/compute_functions.mli b/src/plugins/value/engine/compute_functions.mli index 2e04b81105c..3e1db0817b9 100644 --- a/src/plugins/value/engine/compute_functions.mli +++ b/src/plugins/value/engine/compute_functions.mli @@ -25,12 +25,7 @@ open Cil_types open Eval -module Make - (Abstract: Abstractions.S) - (Eva: Evaluation.S with type value = Abstract.Val.t - and type origin = Abstract.Dom.origin - and type loc = Abstract.Loc.location - and type state = Abstract.Dom.t) +module Make (Abstract: Abstractions.Eva) : sig (** Compute a call to the main function. *) diff --git a/src/plugins/value/engine/transfer_specification.ml b/src/plugins/value/engine/transfer_specification.ml index dc968ee3006..5515e44a3b8 100644 --- a/src/plugins/value/engine/transfer_specification.ml +++ b/src/plugins/value/engine/transfer_specification.ml @@ -165,15 +165,15 @@ let precise_loc_of_assign env assign_or_allocation = module Make - (Value: Abstract_value.External) - (Location: Abstract_location.External) - (Domain: Abstract_domain.External with type value = Value.t - and type location = Location.location) - (States: Powerset.S with type state = Domain.t) - (Logic : Transfer_logic.S with type state = Domain.t + (Abstract: Abstractions.S) + (States: Powerset.S with type state = Abstract.Dom.t) + (Logic : Transfer_logic.S with type state = Abstract.Dom.t and type states = States.t) = struct + module Domain = Abstract.Dom + module Location = Abstract.Loc + (* Most transfer functions about logic return a set of states instead of a single state, and States.empty instead of bottom. We thus use this monad to turn `Bottom into States.empty in the following for consistency. *) diff --git a/src/plugins/value/engine/transfer_specification.mli b/src/plugins/value/engine/transfer_specification.mli index 056587e6cbb..dfb86ee93c2 100644 --- a/src/plugins/value/engine/transfer_specification.mli +++ b/src/plugins/value/engine/transfer_specification.mli @@ -24,21 +24,17 @@ open Cil_types open Eval module Make - (Value: Abstract_value.External) - (Location: Abstract_location.External) - (Domain: Abstract_domain.External with type value = Value.t - and type location = Location.location) - (States: Powerset.S with type state = Domain.t) - (Logic : Transfer_logic.S with type state = Domain.t + (Abstract: Abstractions.S) + (States: Powerset.S with type state = Abstract.Dom.t) + (Logic : Transfer_logic.S with type state = Abstract.Dom.t and type states = States.t) : sig - - val treat_statement_assigns: assigns -> Domain.t -> Domain.t + val treat_statement_assigns: assigns -> Abstract.Dom.t -> Abstract.Dom.t val compute_using_specification: warn:bool -> - kinstr -> (Location.location, Value.t) call -> spec -> - Domain.t -> Domain.t list or_bottom + kinstr -> (Abstract.Loc.location, Abstract.Val.t) call -> spec -> + Abstract.Dom.t -> Abstract.Dom.t list or_bottom end diff --git a/src/plugins/value/engine/transfer_stmt.ml b/src/plugins/value/engine/transfer_stmt.ml index 2a2ac4ca72b..dedb9086728 100644 --- a/src/plugins/value/engine/transfer_stmt.ml +++ b/src/plugins/value/engine/transfer_stmt.ml @@ -101,23 +101,19 @@ module DumpFileCounters = let name = "Transfer_stmt.DumpFileCounters" end) -module Make - (Value: Abstract_value.External) - (Location: Abstract_location.External) - (Domain: Abstract_domain.External with type value = Value.t - and type location = Location.location) - (Eva: Evaluation.S with type state = Domain.state - and type value = Domain.value - and type loc = Domain.location - and type origin = Domain.origin) -= struct - - type state = Domain.state - type value = Domain.value - type location = Domain.location +module Make (Abstract: Abstractions.Eva) = struct + + module Value = Abstract.Val + module Location = Abstract.Loc + module Domain = Abstract.Dom + module Eval = Abstract.Eval + + type state = Domain.t + type value = Value.t + type location = Location.location (* Transfer functions. *) - module TF = Domain.Transfer (Eva.Valuation) + module TF = Domain.Transfer (Eval.Valuation) (* When using a product of domains, a product of states may have no concretization (if the domains have inferred incompatible properties) @@ -157,17 +153,17 @@ module Make if they lead to bottom without alarms. *) let evaluate_and_check ?valuation state expr = - let res = Eva.evaluate ?valuation state expr in + let res = Eval.evaluate ?valuation state expr in report_unreachability state res "the expression %a" Printer.pp_exp expr; res let lvaluate_and_check ~for_writing ?valuation state lval = - let res = Eva.lvaluate ~for_writing ?valuation state lval in + let res = Eval.lvaluate ~for_writing ?valuation state lval in report_unreachability state res "the lvalue %a" Printer.pp_lval lval; res let copy_lvalue_and_check ?valuation state lval = - let res = Eva.copy_lvalue ?valuation state lval in + let res = Eval.copy_lvalue ?valuation state lval in report_unreachability state res "the copy of %a" Printer.pp_lval lval; res @@ -217,7 +213,7 @@ module Make then let truth = Location.assume_no_overlap ~partial:true loc right_loc in let alarm () = Alarms.Overlap (lval, right_lval) in - Eva.interpret_truth ~alarm (loc, right_loc) truth + Eval.interpret_truth ~alarm (loc, right_loc) truth else `Value (loc, right_loc), Alarmset.none (* Checks the compatibility between the left and right locations of a copy. *) @@ -273,7 +269,7 @@ module Make (* Assumption. *) let assume state stmt expr positive = - let eval, alarms = Eva.reduce state expr positive in + let eval, alarms = Eval.reduce state expr positive in (* TODO: check not comparable. *) Alarmset.emit (Kstmt stmt) alarms; eval >>- fun valuation -> @@ -345,7 +341,7 @@ module Make | None -> default valuation expr | Some inout -> let find_loc lval = - match Eva.Valuation.find_loc valuation lval with + match Eval.Valuation.find_loc valuation lval with | `Top -> Precise_locs.loc_top | `Value record -> get record.loc in @@ -378,7 +374,7 @@ module Make reduced, and their new (more precise) value. *) let gather_reduced_arguments call valuation state = let safe_arguments = filter_safe_arguments valuation call in - let empty = Eva.Valuation.empty in + let empty = Eval.Valuation.empty in let reduce_one_argument acc argument = acc >>- fun acc -> let pre_value = match argument.avalue with @@ -393,7 +389,7 @@ module Make If the call has copied the argument, it may be uninitialized. Thus, we also avoid the backward propagation if the formal is uninitialized here. This should not happen in the Assign case above. *) - fst (Eva.copy_lvalue ~valuation:empty state lval) + fst (Eval.copy_lvalue ~valuation:empty state lval) >>- fun (_valuation, post_value) -> if Bottom.is_included Value.is_included pre_value post_value.v @@ -407,10 +403,10 @@ module Make This function reduces the [state] by assuming [expr = value] for each pair (expr, value) of [reductions]. *) let reduce_arguments reductions state = - let valuation = `Value Eva.Valuation.empty in + let valuation = `Value Eval.Valuation.empty in let reduce_one_argument valuation (argument, post_value) = valuation >>- fun valuation -> - Eva.assume ~valuation state argument.concrete post_value + Eval.assume ~valuation state argument.concrete post_value in List.fold_left reduce_one_argument valuation reductions >>-: fun valuation -> TF.update valuation state @@ -602,7 +598,7 @@ module Make let domain_show_each name arguments state = let pretty fmt expr = let pp fmt = - match fst (Eva.evaluate state expr) with + match fst (Eval.evaluate state expr) with | `Bottom -> Format.fprintf fmt "%s" (Unicode.bottom_string ()) | `Value (valuation, _value) -> show_expr valuation state fmt expr in @@ -625,7 +621,7 @@ module Make begin try let offsm = - fst (Eva.lvaluate ~for_writing:false state lval) + fst (Eval.lvaluate ~for_writing:false state lval) >>- fun (_, loc, _) -> let ploc = get_ploc loc and cvalue_state = get_cvalue state in @@ -644,7 +640,7 @@ module Make | None -> fun fmt _ _ -> Format.fprintf fmt "%s" (Unicode.top_string ()) | Some get_cval -> fun fmt expr state -> - let value = fst (Eva.evaluate state expr) >>-: snd >>-: get_cval in + let value = fst (Eval.evaluate state expr) >>-: snd >>-: get_cval in (Bottom.pretty Cvalue.V.pretty) fmt value let pretty_arguments state arguments = @@ -734,7 +730,7 @@ module Make let cacheable = ref Value_types.Cacheable in let eval = (* Resolve [funcexp] into the called kernel functions. *) - let functions, alarms = Eva.eval_function_exp funcexp ~args state in + let functions, alarms = Eval.eval_function_exp funcexp ~args state in Alarmset.emit ki_call alarms; functions >>- fun functions -> let current_kf = Value_util.current_kf () in @@ -781,7 +777,7 @@ module Make if Cil.isIntegralOrPointerType varinfo.vtype then let matched, tail = - Eva.split_by_evaluation return_expr expected_values states + Eval.split_by_evaluation return_expr expected_values states in let process (i, states, mess) = if mess then @@ -809,14 +805,14 @@ module Make let check_non_overlapping state lvs1 lvs2 = let eval_loc (acc, valuation) lval = - match fst (Eva.lvaluate ~valuation ~for_writing:false state lval) with + match fst (Eval.lvaluate ~valuation ~for_writing:false state lval) with | `Bottom -> acc, valuation | `Value (valuation, loc, _) -> (lval, loc) :: acc, valuation in let eval_list valuation lvs = List.fold_left eval_loc ([], valuation) lvs in - let list1, valuation = eval_list Eva.Valuation.empty lvs1 in + let list1, valuation = eval_list Eval.Valuation.empty lvs1 in let list2, _ = eval_list valuation lvs2 in let check acc (lval1, loc1) (lval2, loc2) = let truth = Location.assume_no_overlap ~partial:false loc1 loc2 in diff --git a/src/plugins/value/engine/transfer_stmt.mli b/src/plugins/value/engine/transfer_stmt.mli index 3fb197fdbc0..a2e64699a2e 100644 --- a/src/plugins/value/engine/transfer_stmt.mli +++ b/src/plugins/value/engine/transfer_stmt.mli @@ -61,18 +61,10 @@ module type S = sig (stmt -> (location, value) call -> state -> call_result) ref end -module Make - (Value: Abstract_value.External) - (Location: Abstract_location.External) - (Domain: Abstract_domain.External with type value = Value.t - and type location = Location.location) - (Eva: Evaluation.S with type state = Domain.state - and type value = Domain.value - and type loc = Domain.location - and type origin = Domain.origin) - : S with type state = Domain.state - and type value = Domain.value - and type location = Domain.location +module Make (Abstract: Abstractions.Eva) + : S with type state = Abstract.Dom.t + and type value = Abstract.Val.t + and type location = Abstract.Loc.location (* Local Variables: -- GitLab From 6c962a31425153cd919e03a004be35391ae51c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 28 Mar 2019 17:48:03 +0100 Subject: [PATCH 162/376] [Eva] Removes an optimization when building the abstractions for the legacy config. --- src/plugins/value/engine/abstractions.ml | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/src/plugins/value/engine/abstractions.ml b/src/plugins/value/engine/abstractions.ml index 117b2a5e4fe..2d68429dc36 100644 --- a/src/plugins/value/engine/abstractions.ml +++ b/src/plugins/value/engine/abstractions.ml @@ -575,29 +575,7 @@ let make config = (* Default and Legacy Abstractions *) (* -------------------------------------------------------------------------- *) - -module Legacy = struct - - module Val = struct - include Main_values.CVal - include Structure.Open (Structure.Key_Value) (Main_values.CVal) - let reduce t = t - end - - module Loc = struct - include Main_locations.PLoc - include Structure.Open - (Structure.Key_Location) - (struct include Main_locations.PLoc type t = location end) - end - - module Dom = struct - include Cvalue_domain.State - include Structure.Open (Structure.Key_Domain) (Cvalue_domain.State) - end - -end - +module Legacy = (val make legacy_config) module Default = (val make default_config) -- GitLab From 43323e50294949acaf5aa0e7860755cf1baa87ff Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Mon, 1 Apr 2019 11:07:19 +0200 Subject: [PATCH 163/376] update changelog for !2105 --- Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index aa057af0616..acdfc594a36 100644 --- a/Changelog +++ b/Changelog @@ -17,6 +17,7 @@ Open Source Release <next-release> ################################## +- Inout [2019/04/01] Fix performance issue when initializing large arrays. - ACSL [2019/03/08] Add check annotation, similar to assert except that it does not introduce additional hypotheses on the program state -* Makefile [2019/03/07] Do not attempt to install .cmx on bytecode-only -- GitLab From 22d44d296cbacc6ae2c8d346dbc0d39479516a53 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Wed, 27 Mar 2019 15:19:31 +0100 Subject: [PATCH 164/376] [NIX] tests tarball compilation --- .gitlab-ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0f54bad0335..f828c1b025b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -151,6 +151,30 @@ CFP: tags: - nix +build-tarball: + stage: tests + variables: + CURRENT: $CI_COMMIT_REF_NAME + DEFAULT: "master" + OCAML: "4_05" + FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" + script: + - nix/frama-ci.sh build -A frama-c.distrib + tags: + - nix + +tarball-compilation: + stage: distrib_and_compatibility + variables: + CURRENT: $CI_COMMIT_REF_NAME + DEFAULT: "master" + OCAML: "4_05" + FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" + script: + - nix/frama-ci.sh build -A frama-c.tests-distrib + tags: + - nix + internal: stage: distrib_and_compatibility variables: -- GitLab From b530f17fd3cd93e70a1643b28488416e09a758d0 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Fri, 29 Mar 2019 12:49:39 +0100 Subject: [PATCH 165/376] [Nix] adds pkgs.file for frama-c-distrib --- nix/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/default.nix b/nix/default.nix index 3bc25269109..7b153a9754f 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -2,7 +2,7 @@ { pkgs, stdenv, src ? ../., opam2nix, ocaml_version ? "ocaml-ng.ocamlPackages_4_05.ocaml", plugins ? { } }: let mk_buildInputs = { opamPackages ? [] } : - [ pkgs.gnugrep pkgs.gnused pkgs.autoconf pkgs.gnumake pkgs.gcc pkgs.ncurses pkgs.time pkgs.python3 pkgs.perl] ++ opam2nix.build { + [ pkgs.gnugrep pkgs.gnused pkgs.autoconf pkgs.gnumake pkgs.gcc pkgs.ncurses pkgs.time pkgs.python3 pkgs.perl pkgs.file] ++ opam2nix.build { specs = opam2nix.toSpecs ([ "ocamlfind" "zarith" "ocamlgraph" { name = "coq"; constraint = "=8.7.2"; } ] ++ opamPackages ++ @@ -108,7 +108,7 @@ rec { distrib = stdenv.mkDerivation { name = "frama-c-distrib"; inherit src; - buildInputs = buildInputs ++ [ plugins.headache.installed ]; + buildInputs = buildInputs ++ [ plugins.headache.installed pkgs.file ]; postPatch = '' patchShebangs . ''; -- GitLab From cbdff81618efe16c175466ff9af04e1506c05b0f Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Mon, 1 Apr 2019 14:17:47 +0200 Subject: [PATCH 166/376] [Nix] build from distrib tarball --- .gitlab-ci.yml | 12 ++++++------ nix/default.nix | 21 ++++++++++++--------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f828c1b025b..04fd07dcf36 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -151,27 +151,27 @@ CFP: tags: - nix -build-tarball: - stage: tests +build-distrib-tarball: + stage: build variables: CURRENT: $CI_COMMIT_REF_NAME DEFAULT: "master" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - - nix/frama-ci.sh build -A frama-c.distrib + - nix/frama-ci.sh build -A frama-c.build-distrib-tarball tags: - nix -tarball-compilation: - stage: distrib_and_compatibility +build-from-distrib-tarball: + stage: tests variables: CURRENT: $CI_COMMIT_REF_NAME DEFAULT: "master" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - - nix/frama-ci.sh build -A frama-c.tests-distrib + - nix/frama-ci.sh build -A frama-c.build-from-distrib-tarball tags: - nix diff --git a/nix/default.nix b/nix/default.nix index 7b153a9754f..6e3255fb4ed 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -105,10 +105,11 @@ rec { ''; }; - distrib = stdenv.mkDerivation { - name = "frama-c-distrib"; + build-distrib-tarball = stdenv.mkDerivation { + name = "frama-c-build-distrib-tarball"; inherit src; buildInputs = buildInputs ++ [ plugins.headache.installed pkgs.file ]; + outputs = [ "out" ]; postPatch = '' patchShebangs . ''; @@ -119,16 +120,19 @@ rec { ''; buildPhase = '' make DISTRIB="frama-c-archive" src-distrib + tar -zcf frama-c-tests-archive.tar.gz tests src/plugins/*/tests ''; installPhase = '' - tar -C $out --strip-components=1 -xf frama-c-archive.tar.gz + tar -C $out --strip-components=1 -xzf frama-c-archive.tar.gz + tar -C $out -xzf frama-c-tests-archive.tar.gz ''; }; - tests-distrib = stdenv.mkDerivation { - name = "frama-c-tests-distrib"; - inherit distrib buildInputs; - outputs = [ "out" "build_dir" ]; + build-from-distrib-tarball = stdenv.mkDerivation { + name = "frama-c-build-from-distrib-tarball"; + inherit buildInputs; + src = build-distrib-tarball.out ; + outputs = [ "out" ]; configurePhase = '' unset CC autoconf @@ -136,10 +140,9 @@ rec { ''; buildPhase = '' make -j 4 - make tests -j4 PTESTS_OPTS="-error-code -j 4" ''; installPhase = '' - make install + true ''; }; -- GitLab From 86317c49226eb4473c861999de38147e19cace8d Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Tue, 12 Mar 2019 17:26:18 +0100 Subject: [PATCH 167/376] [tests] refactor tests to simplify future changes --- tests/constant_propagation/array_pointers.i | 2 +- tests/constant_propagation/bts-1787-bis.i | 6 +++--- tests/constant_propagation/bts-1787.i | 4 ++-- tests/constant_propagation/const_field_return_struct.i | 2 +- tests/constant_propagation/enum.i | 2 +- tests/constant_propagation/fct_ptr.i | 2 +- tests/constant_propagation/struct_field.i | 2 +- tests/constant_propagation/test_config | 1 + 8 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 tests/constant_propagation/test_config diff --git a/tests/constant_propagation/array_pointers.i b/tests/constant_propagation/array_pointers.i index bd9fff2b420..5f2d17c28f1 100644 --- a/tests/constant_propagation/array_pointers.i +++ b/tests/constant_propagation/array_pointers.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva -eva-show-progress -scf -eva-show-progress -journal-disable + STDOPT: +"-eva" */ void *p; diff --git a/tests/constant_propagation/bts-1787-bis.i b/tests/constant_propagation/bts-1787-bis.i index 01be6cb5fcf..cd70cec18f7 100644 --- a/tests/constant_propagation/bts-1787-bis.i +++ b/tests/constant_propagation/bts-1787-bis.i @@ -1,7 +1,7 @@ /* run.config -OPT: -journal-disable -print -OPT: -journal-disable -scf -eva-show-progress -OPT: -journal-disable -scf -eva-show-progress -scf-allow-cast + OPT: -print -journal-disable + STDOPT: + STDOPT: +"-scf-allow-cast" */ typedef struct { diff --git a/tests/constant_propagation/bts-1787.i b/tests/constant_propagation/bts-1787.i index a959b09e871..6b534ca4bbd 100644 --- a/tests/constant_propagation/bts-1787.i +++ b/tests/constant_propagation/bts-1787.i @@ -1,6 +1,6 @@ /* run.config -OPT: -journal-disable -scf -eva-show-progress -scf-allow-cast -OPT: -journal-disable -scf -eva-show-progress + STDOPT: +"-scf-allow-cast" + STDOPT: */ typedef struct { diff --git a/tests/constant_propagation/const_field_return_struct.i b/tests/constant_propagation/const_field_return_struct.i index 9bf7ea6975b..6b4473198a2 100644 --- a/tests/constant_propagation/const_field_return_struct.i +++ b/tests/constant_propagation/const_field_return_struct.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva -eva-show-progress -scf -eva-show-progress -journal-disable + STDOPT: +"-eva" */ struct S { diff --git a/tests/constant_propagation/enum.i b/tests/constant_propagation/enum.i index c36692b4ed8..374f0d5ffb6 100644 --- a/tests/constant_propagation/enum.i +++ b/tests/constant_propagation/enum.i @@ -1,5 +1,5 @@ /* run.config -OPT: -semantic-const-folding -eva-show-progress + STDOPT: */ enum E { A, B, C, D }; diff --git a/tests/constant_propagation/fct_ptr.i b/tests/constant_propagation/fct_ptr.i index 12a34d58d3c..9182142aa59 100644 --- a/tests/constant_propagation/fct_ptr.i +++ b/tests/constant_propagation/fct_ptr.i @@ -1,5 +1,5 @@ /* run.config -OPT: -scf -eva-show-progress -then-on propagated + STDOPT: +"-then-on propagated" */ void (*pf)(void); diff --git a/tests/constant_propagation/struct_field.i b/tests/constant_propagation/struct_field.i index 9621fff8f01..97e18ced984 100644 --- a/tests/constant_propagation/struct_field.i +++ b/tests/constant_propagation/struct_field.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva -semantic-const-folding -eva-show-progress -journal-disable + STDOPT: +"-eva" */ struct st { diff --git a/tests/constant_propagation/test_config b/tests/constant_propagation/test_config new file mode 100644 index 00000000000..b174b4500a1 --- /dev/null +++ b/tests/constant_propagation/test_config @@ -0,0 +1 @@ +OPT: -journal-disable -scf -eva-show-progress -- GitLab From a1e0fdc99b385ec4186edb43e3ad9a8050e1d278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Wed, 27 Feb 2019 14:26:27 +0100 Subject: [PATCH 168/376] [Eva] New meta options -eva-fast, -eva-precise and -eva-power. Quick configuration of a fast (but imprecise) or precise (but slow) analysis. --- src/plugins/value/value_parameters.ml | 82 +++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/src/plugins/value/value_parameters.ml b/src/plugins/value/value_parameters.ml index 7eda5b6c514..b7d58f50470 100644 --- a/src/plugins/value/value_parameters.ml +++ b/src/plugins/value/value_parameters.ml @@ -1318,6 +1318,88 @@ module MallocLevel = end) let () = MallocLevel.add_aliases ["-val-mlevel"] +(* -------------------------------------------------------------------------- *) +(* --- Meta options --- *) +(* -------------------------------------------------------------------------- *) + +let () = Parameter_customize.set_negative_option_name "" +module Fast = + False + (struct + let option_name = "-eva-fast" + let help = "Quick configuration for a fast (but rather imprecise) analysis. \ + Opposite of (and incompatible with) -eva-precise. \ + Equivalent to -eva-power 0." + end) + +let () = Parameter_customize.set_negative_option_name "" +module Precise = + False + (struct + let option_name = "-eva-precise" + let help = "Quick configuration for a precise (but rather slow) analysis. \ + Opposite of (and incompatible with) -eva-fast. \ + Equivalent to -eva-power 5." + end) + +module Power = + Int + (struct + let option_name = "-eva-power" + let arg_name = "n" + let default = -1 + let help = "Meta-option that automatically sets up some Eva parameters \ + for a quick configuration of an analysis, \ + from 0 (fastest but rather imprecise analysis) \ + to 10 (accurate but potentially slow analysis)." + end) +let () = Power.set_range (-1) 10 + +let incompatible_meta_options () = + abort "The meta options %s, %s and %s are mutually incompatible." + Fast.name Precise.name Power.name + +(* Sets a parameter, unless is is already set. *) +let set (type t) (module P: Parameter_sig.S with type t = t) t = + if P.is_set () + then printf " option %s has already been set, and is not modified." P.name + else + begin + P.set t; + let str = Typed_parameter.get_value P.parameter in + if P.is_default () + then printf " option %s kept at its default value: %s." P.name str + else printf " option %s set to %s." P.name str; + end + +let slevel_power = [| 0; 10; 25; 50; 75; 100; 150; 200; 300; 400; 500; |] + +let set_analysis option_name n = + if Fast.is_set () && option_name <> Fast.name + || Precise.is_set () && option_name <> Precise.name + || Power.is_set () && option_name <> Power.name + then incompatible_meta_options (); + feedback "Option %s detected, \ + automatic configuration of the analysis:" option_name; + set (module (MinLoopUnroll)) (n / 2); + set (module (SemanticUnrollingLevel)) (slevel_power.(n)); + set (module (WideningDelay)) (1 + n / 2); + set (module (ILevel)) (8 + 12 * n); + set (module (ArrayPrecisionLevel)) (50 * (n+1)); + set (module (LinearLevel)) (20 * n); + set (module (RmAssert)) (n > 0); + set (module (SymbolicLocsDomain)) (n > 0); + set (module (EqualityDomain)) (n > 1); + set (module (EqualityCall)) (if n > 2 then "formals" else "none"); + set (module (GaugesDomain)) (n > 3); + set (module (SplitReturn)) (if n > 4 then "auto" else ""); + () + +let () = + Fast.add_update_hook (fun _ n -> if n then set_analysis Fast.name 0); + Precise.add_update_hook (fun _ n -> if n then set_analysis Precise.name 5); + Power.add_update_hook (fun _ n -> if n >= 0 then set_analysis Power.name n) + (* -------------------------------------------------------------------------- *) (* --- Freeze parameters. MUST GO LAST --- *) (* -------------------------------------------------------------------------- *) -- GitLab From efba14ab82d61ef1c3f6b0427a59db99c8f0d766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 2 Apr 2019 15:08:15 +0200 Subject: [PATCH 169/376] [Libc] Do not create files when compiling a test with gcc. --- tests/libc/runtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libc/runtime.c b/tests/libc/runtime.c index 6fd7bf646ad..6041f4433ac 100644 --- a/tests/libc/runtime.c +++ b/tests/libc/runtime.c @@ -1,6 +1,6 @@ /* run.config* COMMENT: tests that the runtime can compile without errors (for PathCrawler, E-ACSL, ...) - CMD: gcc -D__FC_MACHDEP_X86_64 share/libc/__fc_runtime.c -Wno-attributes + CMD: gcc -fsyntax-only -D__FC_MACHDEP_X86_64 share/libc/__fc_runtime.c -Wno-attributes OPT: */ -- GitLab From 483da4ed7fef0e61ed6761362168bd436cfc6ef1 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Tue, 2 Apr 2019 15:27:02 +0200 Subject: [PATCH 170/376] [Nix] removes some `adds pkgs.file` --- nix/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/default.nix b/nix/default.nix index 6e3255fb4ed..4cc5134a468 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -63,7 +63,7 @@ rec { lint = stdenv.mkDerivation { name = "frama-c-lint"; inherit src; - buildInputs = (mk_buildInputs {opamPackages = [ "ocp-indent" ];} ) ++ [ pkgs.bc plugins.headache.installed pkgs.file ]; + buildInputs = (mk_buildInputs {opamPackages = [ "ocp-indent" ];} ) ++ [ pkgs.bc plugins.headache.installed ]; outputs = [ "out" ]; postPatch = '' patchShebangs . @@ -108,7 +108,7 @@ rec { build-distrib-tarball = stdenv.mkDerivation { name = "frama-c-build-distrib-tarball"; inherit src; - buildInputs = buildInputs ++ [ plugins.headache.installed pkgs.file ]; + buildInputs = buildInputs ++ [ plugins.headache.installed ]; outputs = [ "out" ]; postPatch = '' patchShebangs . @@ -179,7 +179,7 @@ rec { inherit src; buildInputs = (mk_buildInputs { opamPackages = [ "xml-light" ];} ) ++ [ pkgs.getopt pkgs.which - pkgs.libxslt pkgs.libxml2 pkgs.file pkgs.autoPatchelfHook stdenv.cc.cc.lib + pkgs.libxslt pkgs.libxml2 pkgs.autoPatchelfHook stdenv.cc.cc.lib ]; counter_examples_src = plugins.counter-examples.src; genassigns_src = plugins.genassigns.src; -- GitLab From c28f85c1004176537546eebdc16e3e8ed9979575 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Tue, 2 Apr 2019 14:48:37 +0200 Subject: [PATCH 171/376] [tests] refactoring of pdg tests --- Makefile | 1 + tests/pdg/annot.c | 4 ++-- tests/pdg/array_struct.i | 2 +- tests/pdg/assigns.i | 2 +- tests/pdg/bts1194.c | 2 +- tests/pdg/call.c | 2 +- tests/pdg/calls_and_implicits.c | 2 +- tests/pdg/const.i | 2 +- tests/pdg/decl_dpds.c | 2 +- tests/pdg/doc_dot.c | 2 +- tests/pdg/dpds_intra.c | 20 ++++++++++---------- tests/pdg/dyn_dpds.c | 4 ++-- tests/pdg/globals.c | 6 +++--- tests/pdg/inter_alias2.c | 8 ++++---- tests/pdg/loops.c | 22 +++++++++++----------- tests/pdg/multiple_calls.c | 4 ++-- tests/pdg/no_body.c | 4 ++-- tests/pdg/oracle/const.res.oracle | 24 ++++++++++++------------ tests/pdg/pb_infinite_loop.c | 6 +++--- tests/pdg/postdom.c | 2 +- tests/pdg/sets.c | 2 +- tests/pdg/simple_call.c | 8 ++++---- tests/pdg/simple_intra_slice.c | 2 +- tests/pdg/test_config | 1 + tests/pdg/top_pdg_input.c | 2 +- tests/pdg/variadic.c | 2 +- 26 files changed, 70 insertions(+), 68 deletions(-) create mode 100644 tests/pdg/test_config diff --git a/Makefile b/Makefile index f517edfe058..46848a8dd43 100644 --- a/Makefile +++ b/Makefile @@ -1082,6 +1082,7 @@ PLUGIN_NAME:=Pdg PLUGIN_DIR:=src/plugins/pdg PLUGIN_TESTS_LIB:=tests/pdg/dyn_dpds.ml \ tests/pdg/sets.ml +PLUGIN_TESTS_DIRS:=pdg PLUGIN_CMO:= pdg_parameters \ ctrlDpds \ pdg_state \ diff --git a/tests/pdg/annot.c b/tests/pdg/annot.c index 1136ec925f7..7fadc29185a 100644 --- a/tests/pdg/annot.c +++ b/tests/pdg/annot.c @@ -1,6 +1,6 @@ /* run.config - OPT: -eva-show-progress -fct-pdg f1 -main f1 -journal-disable -pdg-print -pdg-verbose 2 - OPT: -eva-show-progress -fct-pdg loop -main loop -journal-disable -pdg-print -pdg-verbose 2 + STDOPT: +"-fct-pdg f1 -main f1" + STDOPT: +"-fct-pdg loop -main loop" */ int G; diff --git a/tests/pdg/array_struct.i b/tests/pdg/array_struct.i index 0e3fd525ed8..f57e1fde63e 100644 --- a/tests/pdg/array_struct.i +++ b/tests/pdg/array_struct.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -pdg -pdg-print -journal-disable -pdg-verbose 2 + STDOPT: +"-pdg" */ typedef struct { diff --git a/tests/pdg/assigns.i b/tests/pdg/assigns.i index 503e10488cc..eeefb6ac7a4 100644 --- a/tests/pdg/assigns.i +++ b/tests/pdg/assigns.i @@ -1,5 +1,5 @@ /* run.config - OPT: -journal-disable -eva-show-progress -pdg -pdg-print -calldeps -pdg-verbose 2 + STDOPT: +"-pdg -calldeps" */ unsigned int x, y; diff --git a/tests/pdg/bts1194.c b/tests/pdg/bts1194.c index e15d6e04378..3cebc895ed2 100644 --- a/tests/pdg/bts1194.c +++ b/tests/pdg/bts1194.c @@ -1,5 +1,5 @@ /* run.config - OPT: -eva -inout -eva-show-progress -pdg -pdg-print -calldeps -deps -then -slice-return main -then-last -print -eva-show-progress + STDOPT: +"-eva -inout -pdg -calldeps -deps -then -slice-return main -then-last -print -eva-show-progress" */ int Y, X; diff --git a/tests/pdg/call.c b/tests/pdg/call.c index bfe8cd61495..f6c2c5ce8a9 100644 --- a/tests/pdg/call.c +++ b/tests/pdg/call.c @@ -1,6 +1,6 @@ /* run.config GCC: - OPT: -lib-entry -main g -eva-show-progress -pdg -pdg-dot tests/pdg/call -journal-disable -pdg-print -pdg-verbose 2 + STDOPT: +"-lib-entry -main g -pdg -pdg-dot tests/pdg/call " */ /* Ne pas modifier : exemple utilisé dans le rapport. */ diff --git a/tests/pdg/calls_and_implicits.c b/tests/pdg/calls_and_implicits.c index 32af2e6dd2f..1beea648a97 100644 --- a/tests/pdg/calls_and_implicits.c +++ b/tests/pdg/calls_and_implicits.c @@ -1,6 +1,6 @@ /* run.config * GCC: - * OPT: -eva-show-progress -fct-pdg main -inout -journal-disable -pdg-print -pdg-verbose 2 + * STDOPT: +"-fct-pdg main -inout" * */ diff --git a/tests/pdg/const.i b/tests/pdg/const.i index 9c195693403..9b09ac698ac 100644 --- a/tests/pdg/const.i +++ b/tests/pdg/const.i @@ -1,5 +1,5 @@ /* run.config - STDOPT: #" -load-module pdg -calldeps -eva-show-progress -pdg -pdg-print" + STDOPT: #"-eva -pdg -out -input -deps -calldeps -eva-show-progress -pdg -pdg-print" */ struct T1 { diff --git a/tests/pdg/decl_dpds.c b/tests/pdg/decl_dpds.c index 1b828df756d..c3554288fcf 100644 --- a/tests/pdg/decl_dpds.c +++ b/tests/pdg/decl_dpds.c @@ -1,6 +1,6 @@ /* run.config GCC: - OPT: -eva-show-progress -fct-pdg main -journal-disable -pdg-print -pdg-verbose 2 + STDOPT: +"-fct-pdg main" */ extern int G; diff --git a/tests/pdg/doc_dot.c b/tests/pdg/doc_dot.c index 965debeac4e..74710f1cb5f 100644 --- a/tests/pdg/doc_dot.c +++ b/tests/pdg/doc_dot.c @@ -1,5 +1,5 @@ /* run.config - OPT: -lib-entry -main g -eva-show-progress -fct-pdg g -pdg-dot tests/pdg/doc -journal-disable -pdg-print -pdg-verbose 2 + STDOPT: +"-lib-entry -main g -fct-pdg g -pdg-dot tests/pdg/doc" */ /* To build the svg file: * dot -Tsvg tests/pdg/doc.g.dot > tests/pdg/doc.g.svg diff --git a/tests/pdg/dpds_intra.c b/tests/pdg/dpds_intra.c index b666b2cb330..9197f260b9d 100644 --- a/tests/pdg/dpds_intra.c +++ b/tests/pdg/dpds_intra.c @@ -1,18 +1,18 @@ /* run.config GCC: - OPT: -eva-show-progress -fct-pdg test_struct -journal-disable -pdg-print -pdg-verbose 2 - OPT: -eva-show-progress -fct-pdg test_if_simple -journal-disable -pdg-print -pdg-verbose 2 - OPT: -eva-show-progress -fct-pdg test_goto_simple -journal-disable -pdg-print -pdg-verbose 2 - OPT: -eva-show-progress -fct-pdg test_goto_arriere -journal-disable -pdg-print -pdg-verbose 2 - OPT: -eva-show-progress -fct-pdg test_goto_else -journal-disable -pdg-print -pdg-verbose 2 - OPT: -main test_ctrl_dpd_multiple -journal-disable -pdg-print -pdg-verbose 2 + STDOPT: +"-fct-pdg test_struct" + STDOPT: +"-fct-pdg test_if_simple" + STDOPT: +"-fct-pdg test_goto_simple" + STDOPT: +"-fct-pdg test_goto_arriere" + STDOPT: +"-fct-pdg test_goto_else" + STDOPT: +"-main test_ctrl_dpd_multiple " => ne passe pas - OPT: -eva-show-progress -fct-pdg test_simple_loop -journal-disable -pdg-print -pdg-verbose 2 - OPT: -eva-show-progress -fct-pdg main -journal-disable -pdg-print -pdg-verbose 2 - OPT: -eva-show-progress -fct-pdg multiple_global_inputs -journal-disable -pdg-print -pdg-verbose 2 + STDOPT: +"-fct-pdg test_simple_loop" + STDOPT: +"-fct-pdg main" + STDOPT: +"-fct-pdg multiple_global_inputs" */ /* bin/toplevel.opt -deps -main g tests/slicing/dpds_intra.c */ -/* bin/toplevel.opt -eva-show-progress -fct-pdg test_goto_simple tests/slicing/dpds_intra.c -pdg-dot */ +/* bin/toplevel.opt -fct-pdg test_goto_simple tests/slicing/dpds_intra.c -pdg-dot */ extern int G; diff --git a/tests/pdg/dyn_dpds.c b/tests/pdg/dyn_dpds.c index 20168cf1621..8c40c94f19d 100644 --- a/tests/pdg/dyn_dpds.c +++ b/tests/pdg/dyn_dpds.c @@ -1,12 +1,12 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs -eva-show-progress -deps -journal-disable -pdg-print -pdg-verbose 2 + STDOPT: +"-load-module @PTEST_DIR@/@PTEST_NAME@.cmxs -deps" */ /* To have a look at the dot PDG : - bin/toplevel.byte -deps -pdg-dot pdg -eva-show-progress -fct-pdg main @PTEST_DIR@/@PTEST_NAME@.c ; + bin/toplevel.byte -deps -pdg-dot pdg -fct-pdg main @PTEST_DIR@/@PTEST_NAME@.c ; zgrviewer pdg.main.dot or use @PTEST_DIR@/@PTEST_NAME@.ml to test the dynamic dependencies. diff --git a/tests/pdg/globals.c b/tests/pdg/globals.c index 7e7bde7417c..da152f25a18 100644 --- a/tests/pdg/globals.c +++ b/tests/pdg/globals.c @@ -1,8 +1,8 @@ /* run.config GCC: - STDOPT: #"-load-module pdg -main g -pdg-print -pdg-verbose 2" - STDOPT: #"-load-module pdg -main h -pdg-print -pdg-verbose 2" - STDOPT: #"-load-module pdg -main f -pdg-print -pdg-verbose 2" + STDOPT: #"-load-module pdg -eva -out -input -deps -main g -pdg-print -pdg-verbose 2" + STDOPT: #"-load-module pdg -eva -out -input -deps -main h -pdg-print -pdg-verbose 2" + STDOPT: #"-load-module pdg -eva -out -input -deps -main f -pdg-print -pdg-verbose 2" */ struct Tstr; extern int X; diff --git a/tests/pdg/inter_alias2.c b/tests/pdg/inter_alias2.c index 6ebda529c9d..714662e3966 100644 --- a/tests/pdg/inter_alias2.c +++ b/tests/pdg/inter_alias2.c @@ -1,9 +1,9 @@ /* run.config * GCC: - * OPT: -eva-show-progress -eva -journal-disable -pdg-print -pdg-verbose 2 - * OPT: -calldeps -eva-show-progress -fct-pdg incr_ptr -journal-disable -pdg-print -pdg-verbose 2 - * OPT: -calldeps -eva-show-progress -fct-pdg f1 -journal-disable -pdg-print -pdg-verbose 2 - * OPT: -calldeps -eva-show-progress -fct-pdg f2 -journal-disable -pdg-print -pdg-verbose 2 + * STDOPT: +"-eva" + * STDOPT: +"-calldeps -fct-pdg incr_ptr" + * STDOPT: +"-calldeps -fct-pdg f1" + * STDOPT: +"-calldeps -fct-pdg f2" */ void incr_ptr (int *p) { *p += 1; diff --git a/tests/pdg/loops.c b/tests/pdg/loops.c index 394600f8f53..dfb6e1b63d0 100644 --- a/tests/pdg/loops.c +++ b/tests/pdg/loops.c @@ -1,14 +1,14 @@ /* run.config GCC: - OPT: -lib-entry -main simple -eva-show-progress -fct-pdg simple -journal-disable -pdg-print -pdg-verbose 2 - OPT: -lib-entry -main simple_with_break -eva-show-progress -fct-pdg simple_with_break -journal-disable -pdg-print -pdg-verbose 2 - OPT: -lib-entry -main infinite -eva-show-progress -fct-pdg infinite -journal-disable -pdg-print -pdg-verbose 2 - OPT: -lib-entry -main infinite2 -eva-show-progress -fct-pdg infinite2 -journal-disable -pdg-print -pdg-verbose 2 - OPT: -lib-entry -main maybe_infinite -eva-show-progress -fct-pdg maybe_infinite -journal-disable -pdg-print -pdg-verbose 2 - OPT: -lib-entry -main two_infinite_loops -eva-show-progress -fct-pdg two_infinite_loops -journal-disable -pdg-print -pdg-verbose 2 - OPT: -lib-entry -main loop_with_goto -eva-show-progress -fct-pdg loop_with_goto -journal-disable -pdg-print -pdg-verbose 2 - OPT: -lib-entry -main non_natural_loop -eva-show-progress -fct-pdg non_natural_loop -journal-disable -pdg-print -pdg-verbose 2 - OPT: -lib-entry -main dead_code -eva-show-progress -fct-pdg dead_code -journal-disable -pdg-print -pdg-verbose 2 + STDOPT: +"-lib-entry -main simple -fct-pdg simple " + STDOPT: +"-lib-entry -main simple_with_break -fct-pdg simple_with_break " + STDOPT: +"-lib-entry -main infinite -fct-pdg infinite " + STDOPT: +"-lib-entry -main infinite2 -fct-pdg infinite2 " + STDOPT: +"-lib-entry -main maybe_infinite -fct-pdg maybe_infinite " + STDOPT: +"-lib-entry -main two_infinite_loops -fct-pdg two_infinite_loops " + STDOPT: +"-lib-entry -main loop_with_goto -fct-pdg loop_with_goto " + STDOPT: +"-lib-entry -main non_natural_loop -fct-pdg non_natural_loop " + STDOPT: +"-lib-entry -main dead_code -fct-pdg dead_code " @@ -24,11 +24,11 @@ bin/toplevel.opt -lib-entry -main $F -deps -verbose tests/pdg/loops.c zgrviewer ./$F_cfg.dot Pour voir les postdominateurs : -bin/toplevel.opt -lib-entry -main $F -eva-show-progress -fct-pdg $F -dot-postdom p tests/pdg/loops.c ; +bin/toplevel.opt -lib-entry -main $F -fct-pdg $F -dot-postdom p tests/pdg/loops.c ; zgrviewer ./p.$F.dot Pour voir le PDG : -bin/toplevel.opt -lib-entry -main $F -eva-show-progress -fct-pdg $F -pdg-dot pdg tests/pdg/loops.c ; +bin/toplevel.opt -lib-entry -main $F -fct-pdg $F -pdg-dot pdg tests/pdg/loops.c ; zgrviewer ./pdg.$F.dot */ diff --git a/tests/pdg/multiple_calls.c b/tests/pdg/multiple_calls.c index d1e88beaab5..1a7660f575c 100644 --- a/tests/pdg/multiple_calls.c +++ b/tests/pdg/multiple_calls.c @@ -1,7 +1,7 @@ /* run.config GCC: - OPT: -inout -deps -main appel_ptr_fct -eva-show-progress -fct-pdg appel_ptr_fct -journal-disable -pdg-print -pdg-verbose 2 - OPT: -inout -deps -main appel_ptr_fct_bis -eva-show-progress -fct-pdg appel_ptr_fct_bis -journal-disable -pdg-print -pdg-verbose 2 + STDOPT: +"-inout -deps -main appel_ptr_fct -fct-pdg appel_ptr_fct " + STDOPT: +"-inout -deps -main appel_ptr_fct_bis -fct-pdg appel_ptr_fct_bis " */ extern int G1, G2, G3, G4; diff --git a/tests/pdg/no_body.c b/tests/pdg/no_body.c index 83b2ee049bc..003b2595d11 100644 --- a/tests/pdg/no_body.c +++ b/tests/pdg/no_body.c @@ -1,9 +1,9 @@ /* run.config * GCC: -* OPT: -eva-show-progress -fct-pdg main -inout -journal-disable -pdg-print -pdg-verbose 2 +* STDOPT: +"-fct-pdg main -inout " */ /* - * ledit bin/toplevel.top tests/slicing/no_body.c -eva-show-progress -fct-pdg main + * ledit bin/toplevel.top tests/slicing/no_body.c -fct-pdg main * #use "tests/slicing/select.ml";; * test "loop" (select_data "G");; */ diff --git a/tests/pdg/oracle/const.res.oracle b/tests/pdg/oracle/const.res.oracle index 22d4b94c015..0f2f3790c73 100644 --- a/tests/pdg/oracle/const.res.oracle +++ b/tests/pdg/oracle/const.res.oracle @@ -67,6 +67,18 @@ G3.M2 FROM G1.M2; G4; G5 \result FROM \nothing [from] ====== END OF CALLWISE DEPENDENCIES ====== +[inout] Out (internal) for function F1: + G3.M2 +[inout] Inputs for function F1: + G2.M2; G5 +[inout] Out (internal) for function F2: + G1.M1; V1 +[inout] Inputs for function F2: + G4 +[inout] Out (internal) for function main: + G1.M1; G2; G3.M2; V2 +[inout] Inputs for function main: + G1; G2.M2; G4; G5 [pdg] computing for function F1 [pdg] done for function F1 [pdg] computing for function F2 @@ -154,15 +166,3 @@ {n30}: In(G5) {n31}: In(G1.M2) {n32}: In(G4) -[inout] Out (internal) for function F1: - G3.M2 -[inout] Inputs for function F1: - G2.M2; G5 -[inout] Out (internal) for function F2: - G1.M1; V1 -[inout] Inputs for function F2: - G4 -[inout] Out (internal) for function main: - G1.M1; G2; G3.M2; V2 -[inout] Inputs for function main: - G1; G2.M2; G4; G5 diff --git a/tests/pdg/pb_infinite_loop.c b/tests/pdg/pb_infinite_loop.c index 5274ab98727..0dcf50f1923 100644 --- a/tests/pdg/pb_infinite_loop.c +++ b/tests/pdg/pb_infinite_loop.c @@ -1,8 +1,8 @@ /* run.config GCC: - OPT: -main test_infinite_loop -eva-show-progress -fct-pdg test_infinite_loop -journal-disable -pdg-print -pdg-verbose 2 - OPT: -main test_infinite_loop_2 -eva-show-progress -fct-pdg test_infinite_loop_2 -journal-disable -pdg-print -pdg-verbose 2 - OPT: -main test_exit -eva-show-progress -fct-pdg test_exit -journal-disable -pdg-print -pdg-verbose 2 + STDOPT: +"-main test_infinite_loop -fct-pdg test_infinite_loop " + STDOPT: +"-main test_infinite_loop_2 -fct-pdg test_infinite_loop_2 " + STDOPT: +"-main test_exit -fct-pdg test_exit " */ /* This test is a problem at the moment because the postdominators are Top diff --git a/tests/pdg/postdom.c b/tests/pdg/postdom.c index b6b0cddc3df..3a3caed0faf 100644 --- a/tests/pdg/postdom.c +++ b/tests/pdg/postdom.c @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -pdg -journal-disable -pdg-print -pdg-verbose 2 + STDOPT: +"-pdg" */ diff --git a/tests/pdg/sets.c b/tests/pdg/sets.c index 3efc61ce72b..7b8f05dda8a 100644 --- a/tests/pdg/sets.c +++ b/tests/pdg/sets.c @@ -1,6 +1,6 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -eva-show-progress -load-module @PTEST_DIR@/@PTEST_NAME@ -lib-entry -main f -pdg -inout -journal-disable -pdg-print -pdg-verbose 2 + STDOPT: +"-load-module @PTEST_DIR@/@PTEST_NAME@ -lib-entry -main f -pdg -inout " */ diff --git a/tests/pdg/simple_call.c b/tests/pdg/simple_call.c index 6997c09cc1d..38800935624 100644 --- a/tests/pdg/simple_call.c +++ b/tests/pdg/simple_call.c @@ -1,9 +1,9 @@ /* run.config GCC: - OPT: -eva-show-progress -fct-pdg main -journal-disable -pdg-print -pdg-verbose 2 - OPT: -main call_in_loop -eva-show-progress -fct-pdg call_in_loop -journal-disable -pdg-print -pdg-verbose 2 - OPT: -main call_mix_G1_G2 -eva-show-progress -fct-pdg call_mix_G1_G2 -journal-disable -pdg-print -pdg-verbose 2 - OPT: -main call_multiple_global_outputs -eva-show-progress -fct-pdg call_multiple_global_outputs -journal-disable -pdg-print -pdg-verbose 2 + STDOPT: +"-fct-pdg main " + STDOPT: +"-main call_in_loop -fct-pdg call_in_loop " + STDOPT: +"-main call_mix_G1_G2 -fct-pdg call_mix_G1_G2 " + STDOPT: +"-main call_multiple_global_outputs -fct-pdg call_multiple_global_outputs " */ extern int G, G1, G2; diff --git a/tests/pdg/simple_intra_slice.c b/tests/pdg/simple_intra_slice.c index 2ea6f3ee9d8..2cc5d17980e 100644 --- a/tests/pdg/simple_intra_slice.c +++ b/tests/pdg/simple_intra_slice.c @@ -1,6 +1,6 @@ /* run.config GCC: - OPT: -eva-show-progress -pdg -journal-disable -pdg-print -pdg-verbose 2 + STDOPT: +"-pdg " */ /* test conçu initialement comme test pour le slicing */ int Unknown; diff --git a/tests/pdg/test_config b/tests/pdg/test_config new file mode 100644 index 00000000000..864d6b8a7b6 --- /dev/null +++ b/tests/pdg/test_config @@ -0,0 +1 @@ +OPT: -journal-disable -eva-show-progress -pdg-print -pdg-verbose 2 diff --git a/tests/pdg/top_pdg_input.c b/tests/pdg/top_pdg_input.c index f999edabbd2..632bde8819a 100644 --- a/tests/pdg/top_pdg_input.c +++ b/tests/pdg/top_pdg_input.c @@ -1,5 +1,5 @@ /* run.config - STDOPT: +"-no-results-function no_results -eva-no-builtins-auto -load-module pdg -pdg -journal-disable -pdg-print -pdg-verbose 2 -then -main main_asm" + STDOPT: +"-eva -pdg -out -input -deps -no-results-function no_results -eva-no-builtins-auto -load-module pdg -pdg -journal-disable -pdg-print -pdg-verbose 2 -then -main main_asm" */ volatile int nondet; int no_results() {return 1;} diff --git a/tests/pdg/variadic.c b/tests/pdg/variadic.c index 10ce0d25095..12a04b83b35 100644 --- a/tests/pdg/variadic.c +++ b/tests/pdg/variadic.c @@ -1,5 +1,5 @@ /* run.config -* OPT: -eva-show-progress -pdg -journal-disable -pdg-print -pdg-verbose 2 +* STDOPT: +"-pdg " */ // __builtin_va_start and co do not appear in PDG output because Value forgets to register them in the table of called functions. This is a bug of Value -- GitLab From 3f0de9e73792d5c9afa41c2886c89ff22b95307e Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Wed, 13 Mar 2019 18:48:25 +0100 Subject: [PATCH 172/376] [tests] refactoring of sparecode tests --- tests/sparecode/bts324.i | 6 +++--- tests/sparecode/bts324_bis.i | 6 +++--- tests/sparecode/bts334.i | 6 +++--- tests/sparecode/bts927.i | 4 ++-- tests/sparecode/calls.i | 4 ++-- tests/sparecode/dead_code.i | 4 ++-- tests/sparecode/glob_decls.i | 6 +++--- tests/sparecode/intra.i | 10 +++++----- tests/sparecode/issue_157.i | 2 +- tests/sparecode/params.i | 4 ++-- tests/sparecode/se.i | 2 +- tests/sparecode/test_config | 1 + tests/sparecode/top.i | 6 +++--- 13 files changed, 31 insertions(+), 30 deletions(-) create mode 100644 tests/sparecode/test_config diff --git a/tests/sparecode/bts324.i b/tests/sparecode/bts324.i index 10be411858c..c2cf07e2d27 100644 --- a/tests/sparecode/bts324.i +++ b/tests/sparecode/bts324.i @@ -1,7 +1,7 @@ /* run.config - OPT: -sparecode-analysis -eva-show-progress -sparecode-debug 1 -journal-disable - OPT: -sparecode-analysis -eva-show-progress -sparecode-debug 1 -main main_bis -journal-disable - OPT: -sparecode-analysis -eva-show-progress -sparecode-debug 1 -main main_ter -journal-disable + STDOPT: +"-sparecode-analysis" + STDOPT: +"-sparecode-analysis -main main_bis" + STDOPT: +"-sparecode-analysis -main main_ter" */ diff --git a/tests/sparecode/bts324_bis.i b/tests/sparecode/bts324_bis.i index 911010398dd..73050a55cfd 100644 --- a/tests/sparecode/bts324_bis.i +++ b/tests/sparecode/bts324_bis.i @@ -1,7 +1,7 @@ /* run.config - OPT: -sparecode-analysis -eva-show-progress -sparecode-debug 1 -journal-disable - OPT: -sparecode-analysis -eva-show-progress -sparecode-debug 1 -main main_bis -journal-disable - OPT: -sparecode-analysis -eva-show-progress -sparecode-debug 1 -sparecode-no-annot -journal-disable + STDOPT: +"-sparecode-analysis" + STDOPT: +"-sparecode-analysis -main main_bis" + STDOPT: +"-sparecode-analysis -sparecode-no-annot" */ int ki[2], k ; diff --git a/tests/sparecode/bts334.i b/tests/sparecode/bts334.i index 171f62f180f..f6af16f8c93 100644 --- a/tests/sparecode/bts334.i +++ b/tests/sparecode/bts334.i @@ -1,7 +1,7 @@ /*run.config - OPT: -main main_init -sparecode-analysis -eva-show-progress -sparecode-no-annot -journal-disable - OPT: -main main_init -eva-show-progress -slice-pragma loop_body -journal-disable -then-on 'Slicing export' -print - OPT: -main main_init -eva-show-progress -slice-pragma loop_body -calldeps -journal-disable -then-on 'Slicing export' -print + STDOPT: +"-sparecode-debug 0 -main main_init -sparecode-analysis -sparecode-no-annot " + STDOPT: +"-sparecode-debug 0 -main main_init -slice-pragma loop_body -then-on 'Slicing export' -print" + STDOPT: +"-sparecode-debug 0 -main main_init -slice-pragma loop_body -calldeps -then-on 'Slicing export' -print" */ int kf ; int k[2] ; diff --git a/tests/sparecode/bts927.i b/tests/sparecode/bts927.i index da1d3904f9e..883a5ed539c 100644 --- a/tests/sparecode/bts927.i +++ b/tests/sparecode/bts927.i @@ -1,6 +1,6 @@ /* run.config - OPT: -no-warn-signed-overflow -sparecode -eva-show-progress - OPT: -warn-signed-overflow -sparecode -eva-show-progress + STDOPT: +"-sparecode-debug 0 -no-warn-signed-overflow -sparecode" + STDOPT: +"-sparecode-debug 0 -warn-signed-overflow -sparecode" */ /* The purpose of these tests is to check if the conditions are removed diff --git a/tests/sparecode/calls.i b/tests/sparecode/calls.i index 48b0856afe0..91773f1b22e 100644 --- a/tests/sparecode/calls.i +++ b/tests/sparecode/calls.i @@ -1,6 +1,6 @@ /* run.config - OPT: -sparecode-debug 1 -sparecode-analysis -eva-show-progress -journal-disable - OPT: -slicing-level 2 -slice-return main -eva-show-progress -journal-disable -then-on 'Slicing export' -print + STDOPT: +"-sparecode-analysis" + STDOPT: +"-slicing-level 2 -slice-return main -then-on 'Slicing export' -print" */ int G; diff --git a/tests/sparecode/dead_code.i b/tests/sparecode/dead_code.i index 3f8966d815d..327e62941ab 100644 --- a/tests/sparecode/dead_code.i +++ b/tests/sparecode/dead_code.i @@ -1,6 +1,6 @@ /* run.config - OPT: -sparecode-debug 1 -sparecode -eva-show-progress -journal-disable - OPT: -slicing-level 2 -slice-return main -eva-show-progress -journal-disable -then-on 'Slicing export' -print + STDOPT: +"-sparecode" + STDOPT: +"-slicing-level 2 -slice-return main -then-on 'Slicing export' -print" */ int main (void) { diff --git a/tests/sparecode/glob_decls.i b/tests/sparecode/glob_decls.i index f8f2da144f9..abdf205de22 100644 --- a/tests/sparecode/glob_decls.i +++ b/tests/sparecode/glob_decls.i @@ -1,7 +1,7 @@ /* run.config - OPT: -lib-entry -journal-disable -sparecode-debug 1 -sparecode-analysis -eva-show-progress - OPT: -lib-entry -slice-pragma main -slice-return main -eva-show-progress -journal-disable -then-on 'Slicing export' -print - OPT: -journal-disable -sparecode-debug 1 -sparecode-rm-unused-globals + STDOPT: +"-lib-entry -sparecode-analysis " + STDOPT: +"-lib-entry -slice-pragma main -slice-return main -then-on 'Slicing export' -print" + STDOPT: +"-sparecode-rm-unused-globals" */ // can be removed diff --git a/tests/sparecode/intra.i b/tests/sparecode/intra.i index 444aa11a381..65316cbe60a 100644 --- a/tests/sparecode/intra.i +++ b/tests/sparecode/intra.i @@ -1,9 +1,9 @@ /* run.config - OPT: -sparecode-debug 1 -sparecode-analysis -eva-show-progress -journal-disable - OPT: -eva-show-progress -slicing-level 2 -slice-return main -journal-disable -then-last -print - OPT: -main main2 -sparecode-analysis -eva-show-progress -journal-disable - OPT: -main main2 -slice-return main2 -eva-show-progress -journal-disable -then-last -print - OPT: -main main2 -slice-return main2 -eva-show-progress -slice-assert f10 -journal-disable -then-last -print + STDOPT: +"-sparecode-analysis" + STDOPT: +"-sparecode-debug 0 -slicing-level 2 -slice-return main -then-last -print" + STDOPT: +"-sparecode-debug 0 -main main2 -sparecode-analysis" + STDOPT: +"-sparecode-debug 0 -main main2 -slice-return main2 -then-last -print" + STDOPT: +"-sparecode-debug 0 -main main2 -slice-return main2 -slice-assert f10 -then-last -print" */ /* Waiting for results such as: diff --git a/tests/sparecode/issue_157.i b/tests/sparecode/issue_157.i index 7bdc05ad32b..930b3686c9a 100644 --- a/tests/sparecode/issue_157.i +++ b/tests/sparecode/issue_157.i @@ -1,5 +1,5 @@ /* run.config - OPT: -sparecode-debug 1 -sparecode-analysis -eva-show-progress -journal-disable + STDOPT: +"-sparecode-analysis" */ int f() { diff --git a/tests/sparecode/params.i b/tests/sparecode/params.i index 33c0142f48e..26bb415eefc 100644 --- a/tests/sparecode/params.i +++ b/tests/sparecode/params.i @@ -1,6 +1,6 @@ /* run.config - OPT: -sparecode-debug 1 -sparecode-analysis -eva-show-progress -journal-disable - OPT: -eva-show-progress -slicing-level 2 -slice-return main -journal-disable -then-last -print -eva-show-progress + STDOPT: +"-sparecode-analysis" + STDOPT: +"-slicing-level 2 -slice-return main -then-last -print" */ /* This is an example from #529. 'y' in [main1] should be visible to get a diff --git a/tests/sparecode/se.i b/tests/sparecode/se.i index 8f7b0fe6760..3a7460e9595 100644 --- a/tests/sparecode/se.i +++ b/tests/sparecode/se.i @@ -1,5 +1,5 @@ /* run.config - OPT: -sparecode-debug 1 -sparecode-analysis -eva-show-progress -lib-entry -main Se -journal-disable + STDOPT: +"-sparecode-analysis -lib-entry -main Se" */ int glob; diff --git a/tests/sparecode/test_config b/tests/sparecode/test_config new file mode 100644 index 00000000000..f46bc3e3975 --- /dev/null +++ b/tests/sparecode/test_config @@ -0,0 +1 @@ +OPT: -journal-disable -eva-show-progress -sparecode-debug 1 diff --git a/tests/sparecode/top.i b/tests/sparecode/top.i index 40f7cc9d0b6..d15706cc6ce 100644 --- a/tests/sparecode/top.i +++ b/tests/sparecode/top.i @@ -1,7 +1,7 @@ /* run.config - OPT: -sparecode-debug 1 -sparecode-analysis -eva-show-progress -journal-disable -main main_top - OPT: -sparecode-debug 1 -sparecode-analysis -eva-show-progress -journal-disable -main main_call_top - OPT: -sparecode-debug 1 -sparecode-analysis -eva-show-progress -journal-disable -main main_top_not_used + STDOPT: +"-sparecode-analysis -main main_top" + STDOPT: +"-sparecode-analysis -main main_call_top" + STDOPT: +"-sparecode-analysis -main main_top_not_used" */ void print (int x); -- GitLab From 85d2fb50581666f1b2ecfc0ed653c945d50ac49e Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Wed, 13 Mar 2019 19:20:28 +0100 Subject: [PATCH 173/376] [tests] refactoring of saveload tests --- tests/saveload/basic.i | 10 +++++----- tests/saveload/bool.c | 4 ++-- tests/saveload/callbacks.i | 2 +- tests/saveload/deps.i | 10 +++++----- tests/saveload/isset.c | 8 ++++---- tests/saveload/load_one.i | 2 +- tests/saveload/multi_project.i | 2 +- tests/saveload/segfault_datatypes.i | 4 ++-- tests/saveload/sparecode.i | 2 +- tests/saveload/test_config | 1 + 10 files changed, 23 insertions(+), 22 deletions(-) create mode 100644 tests/saveload/test_config diff --git a/tests/saveload/basic.i b/tests/saveload/basic.i index e0d5d8f8b74..e08f72217af 100644 --- a/tests/saveload/basic.i +++ b/tests/saveload/basic.i @@ -2,14 +2,14 @@ EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs EXECNOW: LOG basic_sav.res LOG basic_sav.err BIN basic.sav @frama-c@ -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs -eva -out -input -deps -eva-show-progress ./@PTEST_DIR@/@PTEST_NAME@.i -save ./tests/saveload/result/basic.sav > ./tests/saveload/result/basic_sav.res 2> ./tests/saveload/result/basic_sav.err EXECNOW: LOG basic_sav.1.res LOG basic_sav.1.err BIN basic.1.sav ./bin/toplevel.opt -save ./tests/saveload/result/basic.1.sav @PTEST_DIR@/@PTEST_NAME@.i -eva -out -input -deps -eva-show-progress > ./tests/saveload/result/basic_sav.1.res 2> ./tests/saveload/result/basic_sav.1.err - OPT: -load ./tests/saveload/result/basic.sav -eva -out -input -deps -journal-disable + STDOPT: +"-load ./tests/saveload/result/basic.sav -eva -out -input -deps -journal-disable" CMD: @frama-c@ -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -load ./tests/saveload/result/basic.1.sav -eva -out -input -deps -journal-disable -print - OPT: -load ./tests/saveload/result/basic.1.sav -eva -out -input -deps -journal-disable + STDOPT: +"-load ./tests/saveload/result/basic.1.sav -eva -out -input -deps -journal-disable -print" + STDOPT: +"-load ./tests/saveload/result/basic.1.sav -eva -out -input -deps -journal-disable" EXECNOW: make -s @PTEST_DIR@/status.cmxs EXECNOW: LOG status_sav.res LOG status_sav.err BIN status.sav @frama-c@ -load-module @PTEST_DIR@/status -save ./tests/saveload/result/status.sav @PTEST_DIR@/@PTEST_NAME@.i > ./tests/saveload/result/status_sav.res 2> ./tests/saveload/result/status_sav.err - OPT: -load-module @PTEST_DIR@/status -load ./tests/saveload/result/status.sav - OPT: -load ./tests/saveload/result/status.sav + STDOPT: +"-load-module @PTEST_DIR@/status -load ./tests/saveload/result/status.sav" + STDOPT: +"-load ./tests/saveload/result/status.sav" */ int main() { diff --git a/tests/saveload/bool.c b/tests/saveload/bool.c index f202c7f7fda..5453ccfe238 100644 --- a/tests/saveload/bool.c +++ b/tests/saveload/bool.c @@ -1,7 +1,7 @@ /* run.config EXECNOW: BIN bool.sav LOG bool_sav.res LOG bool_sav.err ./bin/toplevel.opt -save ./tests/saveload/result/bool.sav -eva -eva-show-progress ./tests/saveload/bool.c > tests/saveload/result/bool_sav.res 2> tests/saveload/result/bool_sav.err - OPT: -load ./tests/saveload/result/bool.sav -out -input -deps - OPT: -load ./tests/saveload/result/bool.sav -eva + STDOPT: +"-load ./tests/saveload/result/bool.sav -out -input -deps" + STDOPT: +"-load ./tests/saveload/result/bool.sav -eva" */ #include "stdbool.h" diff --git a/tests/saveload/callbacks.i b/tests/saveload/callbacks.i index eaac5742247..b1fe21aabd1 100644 --- a/tests/saveload/callbacks.i +++ b/tests/saveload/callbacks.i @@ -1,6 +1,6 @@ /* run.config EXECNOW: LOG callbacks_initial.res LOG callbacks_initial.err BIN callbacks.sav ./bin/toplevel.opt tests/saveload/callbacks.i -out -calldeps -eva-show-progress -main main1 -save ./tests/saveload/result/callbacks.sav > ./tests/saveload/result/callbacks_initial.res 2> ./tests/saveload/result/callbacks_initial.err - OPT: -load ./tests/saveload/result/callbacks.sav -main main2 -then -main main3 + STDOPT: +"-load ./tests/saveload/result/callbacks.sav -main main2 -then -main main3" */ /* This tests whether the callbacks for callwise inout and from survive after diff --git a/tests/saveload/deps.i b/tests/saveload/deps.i index 9999d8a8912..1e7dddc3a3c 100644 --- a/tests/saveload/deps.i +++ b/tests/saveload/deps.i @@ -1,11 +1,11 @@ /* run.config EXECNOW: make -s ./tests/saveload/deps_A.cmxs ./tests/saveload/deps_B.cmxs ./tests/saveload/deps_C.cmxs ./tests/saveload/deps_D.cmxs ./tests/saveload/deps_E.cmxs EXECNOW: LOG deps_sav.res LOG deps_sav.err BIN deps.sav @frama-c@ -load-module ./tests/saveload/deps_A.cmxs -eva -out -input -deps -eva-show-progress ./tests/saveload/deps.i -save ./tests/saveload/result/deps.sav > ./tests/saveload/result/deps_sav.res 2> ./tests/saveload/result/deps_sav.err - OPT: -load-module ./tests/saveload/deps_A -load ./tests/saveload/result/deps.sav -eva -out -input -deps -eva-show-progress - OPT: -load-module ./tests/saveload/deps_B -load ./tests/saveload/result/deps.sav -out -input -deps -eva-show-progress - OPT: -load-module ./tests/saveload/deps_C -load ./tests/saveload/result/deps.sav -out -input -deps -eva-show-progress - OPT: -load-module ./tests/saveload/deps_D -load ./tests/saveload/result/deps.sav -out -input -deps -eva-show-progress - OPT: -load-module ./tests/saveload/deps_E -load ./tests/saveload/result/deps.sav -out -input -deps -eva-show-progress + STDOPT: +"-load-module ./tests/saveload/deps_A -load ./tests/saveload/result/deps.sav -eva -out -input -deps " + STDOPT: +"-load-module ./tests/saveload/deps_B -load ./tests/saveload/result/deps.sav -out -input -deps " + STDOPT: +"-load-module ./tests/saveload/deps_C -load ./tests/saveload/result/deps.sav -out -input -deps " + STDOPT: +"-load-module ./tests/saveload/deps_D -load ./tests/saveload/result/deps.sav -out -input -deps " + STDOPT: +"-load-module ./tests/saveload/deps_E -load ./tests/saveload/result/deps.sav -out -input -deps " */ int main() { diff --git a/tests/saveload/isset.c b/tests/saveload/isset.c index cd916529828..e490c3405e8 100644 --- a/tests/saveload/isset.c +++ b/tests/saveload/isset.c @@ -1,9 +1,9 @@ /* run.config EXECNOW: LOG isset_sav.res LOG isset_sav.err BIN isset.sav ./bin/toplevel.opt -quiet -eva -save tests/saveload/result/isset.sav tests/saveload/isset.c > ./tests/saveload/result/isset_sav.res 2> ./tests/saveload/result/isset_sav.err - OPT: -quiet -load ./tests/saveload/result/isset.sav - OPT: -load ./tests/saveload/result/isset.sav - OPT: -eva -load ./tests/saveload/result/isset.sav - OPT: -quiet -eva -load ./tests/saveload/result/isset.sav + STDOPT: +"-quiet -load ./tests/saveload/result/isset.sav" + STDOPT: +"-load ./tests/saveload/result/isset.sav" + STDOPT: +"-eva -load ./tests/saveload/result/isset.sav" + STDOPT: +"-quiet -eva -load ./tests/saveload/result/isset.sav" */ int main() { diff --git a/tests/saveload/load_one.i b/tests/saveload/load_one.i index 8f58edd1679..75dde3f7292 100644 --- a/tests/saveload/load_one.i +++ b/tests/saveload/load_one.i @@ -1,6 +1,6 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs -eva-show-progress + STDOPT: +"-load-module @PTEST_DIR@/@PTEST_NAME@.cmxs" */ int G; diff --git a/tests/saveload/multi_project.i b/tests/saveload/multi_project.i index e8c3589515c..3a98905ee05 100644 --- a/tests/saveload/multi_project.i +++ b/tests/saveload/multi_project.i @@ -1,7 +1,7 @@ /* run.config EXECNOW: BIN multi_project.sav LOG multi_project_sav.res LOG multi_project_sav.err ./bin/toplevel.opt -save ./tests/saveload/result/multi_project.sav -eva-show-progress -semantic-const-folding @PTEST_DIR@/@PTEST_NAME@.i > tests/saveload/result/multi_project_sav.res 2> tests/saveload/result/multi_project_sav.err EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -load ./tests/saveload/result/multi_project.sav -journal-disable + STDOPT: +"-load ./tests/saveload/result/multi_project.sav -journal-disable" CMD: @frama-c@ -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs OPT: -eva -eva-show-progress */ diff --git a/tests/saveload/segfault_datatypes.i b/tests/saveload/segfault_datatypes.i index 6aba95f697d..0e64333dd66 100644 --- a/tests/saveload/segfault_datatypes.i +++ b/tests/saveload/segfault_datatypes.i @@ -1,8 +1,8 @@ /* run.config EXECNOW: make -s ./tests/saveload/segfault_datatypes_A.cmxs ./tests/saveload/segfault_datatypes_B.cmxs - EXECNOW: LOG segfault_datatypes_sav.res LOG segfault_datatypes_sav.err BIN segfault_datatypes.sav @frama-c@ -load-module ./tests/saveload/segfault_datatypes_A -eva -out -input -deps -eva-show-progress ./tests/saveload/segfault_datatypes.i -save ./tests/saveload/result/segfault_datatypes.sav > ./tests/saveload/result/segfault_datatypes_sav.res 2> ./tests/saveload/result/segfault_datatypes_sav.err + EXECNOW: LOG segfault_datatypes_sav.res LOG segfault_datatypes_sav.err BIN segfault_datatypes.sav @frama-c@ -load-module ./tests/saveload/segfault_datatypes_A -eva -out -input -deps ./tests/saveload/segfault_datatypes.i -eva-show-progress -save ./tests/saveload/result/segfault_datatypes.sav > ./tests/saveload/result/segfault_datatypes_sav.res 2> ./tests/saveload/result/segfault_datatypes_sav.err CMD: @frama-c@ -load-module ./tests/saveload/segfault_datatypes_B - OPT: -load ./tests/saveload/result/segfault_datatypes.sav -eva -out -input -deps -journal-disable + STDOPT: +"-load ./tests/saveload/result/segfault_datatypes.sav -eva -out -input -deps -journal-disable" */ diff --git a/tests/saveload/sparecode.i b/tests/saveload/sparecode.i index ba347428ae7..33d1776ddc1 100644 --- a/tests/saveload/sparecode.i +++ b/tests/saveload/sparecode.i @@ -1,6 +1,6 @@ /* run.config EXECNOW: BIN sparecode.sav LOG sparecode_sav.res LOG sparecode_sav.err ./bin/toplevel.opt -slicing-level 2 -slice-return main -eva-show-progress -save ./tests/saveload/result/sparecode.sav tests/saveload/sparecode.i -then-on 'Slicing export' -print > tests/saveload/result/sparecode_sav.res 2> tests/saveload/result/sparecode_sav.err - OPT: -load ./tests/saveload/result/sparecode.sav + STDOPT: +"-load ./tests/saveload/result/sparecode.sav" */ int G; diff --git a/tests/saveload/test_config b/tests/saveload/test_config new file mode 100644 index 00000000000..16c72227f60 --- /dev/null +++ b/tests/saveload/test_config @@ -0,0 +1 @@ +OPT: -eva-show-progress -- GitLab From d6f4818e4b577196d6957d6d46a588436b72b198 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Wed, 13 Mar 2019 19:54:33 +0100 Subject: [PATCH 174/376] [tests] refactoring of slicing tests --- tests/slicing/adpcm.c | 2 +- tests/slicing/annot.i | 4 +- tests/slicing/bts0184.i | 2 +- tests/slicing/bts0190.i | 2 +- tests/slicing/bts0950_annot.i | 2 +- tests/slicing/bts1248.i | 2 +- tests/slicing/bts1445.i | 4 +- tests/slicing/bts1684.i | 2 +- tests/slicing/bts1768.i | 2 +- tests/slicing/bts179.i | 6 +-- tests/slicing/bts283.i | 2 +- tests/slicing/bts326.i | 2 +- tests/slicing/bts335.i | 2 +- tests/slicing/bts335b.i | 2 +- tests/slicing/bts336.i | 16 ++++---- tests/slicing/bts341.i | 2 +- tests/slicing/bts344.i | 4 +- tests/slicing/bts345.i | 10 ++--- tests/slicing/bts679.i | 2 +- tests/slicing/bts679b.i | 2 +- tests/slicing/bts709.c | 2 +- tests/slicing/bts808.i | 2 +- tests/slicing/bts827.i | 2 +- tests/slicing/call_accuracy.i | 2 +- tests/slicing/call_demo.i | 4 +- tests/slicing/callwise.i | 2 +- tests/slicing/csmith.i | 6 +-- tests/slicing/filter.i | 2 +- tests/slicing/forall_loop_invariant.i | 2 +- tests/slicing/if_many_values.i | 2 +- tests/slicing/initialized.i | 2 +- tests/slicing/keep_annot.i | 10 ++--- tests/slicing/loop_infinite.i | 2 +- tests/slicing/loop_simple.i | 2 +- tests/slicing/loops.i | 50 ++++++++++++------------ tests/slicing/ptr_fct.i | 2 +- tests/slicing/same_sliced_name_bts1422.i | 2 +- tests/slicing/select_calls.i | 4 +- tests/slicing/select_return.i | 44 ++++++++++----------- tests/slicing/select_return_bis.i | 22 +++++------ tests/slicing/simple_intra_slice.i | 2 +- tests/slicing/sizeof.i | 26 ++++++------ tests/slicing/slice_behavior.i | 2 +- tests/slicing/slice_pragma_stmt.i | 46 +++++++++++----------- tests/slicing/test_config | 1 + tests/slicing/top.i | 6 +-- tests/slicing/top2.i | 4 +- tests/slicing/undef-fun.i | 2 +- tests/slicing/unitialized.c | 8 ++-- tests/slicing/unravel-flavors.i | 8 ++-- tests/slicing/unravel-point.i | 10 ++--- tests/slicing/unravel-variance.i | 10 ++--- tests/slicing/unsupported.i | 4 +- tests/slicing/use_spec.i | 4 +- tests/slicing/variadic.c | 10 ++--- 55 files changed, 191 insertions(+), 190 deletions(-) diff --git a/tests/slicing/adpcm.c b/tests/slicing/adpcm.c index 88dbc4dbda0..f6a352643ec 100644 --- a/tests/slicing/adpcm.c +++ b/tests/slicing/adpcm.c @@ -1,6 +1,6 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -eva-show-progress -load-module ./tests/slicing/libSelect.cmxs -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs -ulevel -1 -deps -slicing-level 2 -journal-disable + STDOPT: +"-eva-show-progress -load-module ./tests/slicing/libSelect.cmxs -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs -ulevel -1 -deps -slicing-level 2 -journal-disable" */ #include "tests/test/adpcm.c" diff --git a/tests/slicing/annot.i b/tests/slicing/annot.i index 6d3edf1559d..ae8621780d4 100644 --- a/tests/slicing/annot.i +++ b/tests/slicing/annot.i @@ -1,6 +1,6 @@ /* run.config - OPT: -eva-show-progress -main f1 -slice-assert f1 -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -main f2 -slice-assert f2 -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check + STDOPT: +"-main f1 -slice-assert f1 -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-main f2 -slice-assert f2 -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " */ extern int x, z; diff --git a/tests/slicing/bts0184.i b/tests/slicing/bts0184.i index 8330ee7bd2f..f4e31d0e286 100644 --- a/tests/slicing/bts0184.i +++ b/tests/slicing/bts0184.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -check -slice-pragma x -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check + STDOPT: +"-slice-pragma x -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " **/ int x(int y, int z) { diff --git a/tests/slicing/bts0190.i b/tests/slicing/bts0190.i index bd70c2e914f..1cec1079cde 100644 --- a/tests/slicing/bts0190.i +++ b/tests/slicing/bts0190.i @@ -1,5 +1,5 @@ /* run.config -OPT: -slicing-warn-key cmdline=active -eva-show-progress -check -slice-rd y -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check +STDOPT: +"-slicing-warn-key cmdline=active -check -slice-rd y -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " */ int z1(void); diff --git a/tests/slicing/bts0950_annot.i b/tests/slicing/bts0950_annot.i index 375a9b42906..5b0af4a955d 100644 --- a/tests/slicing/bts0950_annot.i +++ b/tests/slicing/bts0950_annot.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -eva -slice-value a -then-on "Slicing export" -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check + STDOPT: +"-eva -slice-value a -then-on 'Slicing export' -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check" */ /*@ requires \valid(dest); */ extern void cpy(int *dest, const int *src); diff --git a/tests/slicing/bts1248.i b/tests/slicing/bts1248.i index 4bfb32dd548..b1b634ca8b9 100644 --- a/tests/slicing/bts1248.i +++ b/tests/slicing/bts1248.i @@ -1,5 +1,5 @@ /* run.config -OPT: -eva-show-progress -slice-rd x -main f -slicing-project-name p -then-on 'p export' -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i +STDOPT: +"-slice-rd x -main f -slicing-project-name p -then-on 'p export' -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i" */ int f(void) { diff --git a/tests/slicing/bts1445.i b/tests/slicing/bts1445.i index 790abe29393..90953815c39 100644 --- a/tests/slicing/bts1445.i +++ b/tests/slicing/bts1445.i @@ -1,6 +1,6 @@ /* run.config -OPT: -eva-show-progress -slice-calls main -then-on "Slicing export" -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -OPT: -eva-show-progress -slice-calls f -main f -then-on "Slicing export" -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i +STDOPT: +"-slice-calls main -then-on 'Slicing export' -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i" +STDOPT: +"-slice-calls f -main f -then-on 'Slicing export' -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i" */ int x = 0; diff --git a/tests/slicing/bts1684.i b/tests/slicing/bts1684.i index e0a962dff1d..de3db5c51ef 100644 --- a/tests/slicing/bts1684.i +++ b/tests/slicing/bts1684.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -slice-calls main -journal-enable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i + STDOPT: +"-slice-calls main -journal-enable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i" */ // one bug about JOURNALIZATION and another one about slicing CALLS TO MAIN function. double d1, d2, d3; diff --git a/tests/slicing/bts1768.i b/tests/slicing/bts1768.i index 9e2da0e7494..4f8d7725029 100644 --- a/tests/slicing/bts1768.i +++ b/tests/slicing/bts1768.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -main main -slice-pragma main -ulevel 10 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i + STDOPT: +"-main main -slice-pragma main -ulevel 10 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i" */ int choix ; int state = 1; diff --git a/tests/slicing/bts179.i b/tests/slicing/bts179.i index 2057a44fa6a..f3c27eeb3d4 100644 --- a/tests/slicing/bts179.i +++ b/tests/slicing/bts179.i @@ -1,7 +1,7 @@ /* run.config - OPT: -eva-show-progress -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -slice-pragma main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -sparecode-analysis -journal-disable + STDOPT: +"-slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i" + STDOPT: +"-slice-pragma main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i" + STDOPT: +"-sparecode-analysis -journal-disable" */ struct {int a; int ab; int b; int c ; int d;} S; diff --git a/tests/slicing/bts283.i b/tests/slicing/bts283.i index 5f4c456e3f4..95c10baf058 100644 --- a/tests/slicing/bts283.i +++ b/tests/slicing/bts283.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -slice-return main -slice-undef-functions -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i + STDOPT: +"-slice-return main -slice-undef-functions -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i" */ int x,y,z; diff --git a/tests/slicing/bts326.i b/tests/slicing/bts326.i index 45adb1012e4..48f60d41072 100644 --- a/tests/slicing/bts326.i +++ b/tests/slicing/bts326.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -calldeps -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps + STDOPT: +"-calldeps -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" */ /* Problem : f(1) should be sliced out. See BTS#326 */ int t[2] ; diff --git a/tests/slicing/bts335.i b/tests/slicing/bts335.i index 2afdf635257..11ca698199d 100644 --- a/tests/slicing/bts335.i +++ b/tests/slicing/bts335.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -slice-pragma g -calldeps -slicing-level 3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps + STDOPT: +"-slice-pragma g -calldeps -slicing-level 3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" */ /* diff --git a/tests/slicing/bts335b.i b/tests/slicing/bts335b.i index def1d6dc2ca..d63ae4eea19 100644 --- a/tests/slicing/bts335b.i +++ b/tests/slicing/bts335b.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -slice-return main -calldeps -slicing-level 3 -slicing-verbose 2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps + STDOPT: +"-slice-return main -calldeps -slicing-level 3 -slicing-verbose 2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" */ int X, Y; diff --git a/tests/slicing/bts336.i b/tests/slicing/bts336.i index ba7da4820cf..b1f75ffb65c 100644 --- a/tests/slicing/bts336.i +++ b/tests/slicing/bts336.i @@ -1,12 +1,12 @@ /* run.config - OPT: -eva-show-progress -slice-return main -calldeps -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress - OPT: -eva-show-progress -main main2 -slice-return main2 -calldeps -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress - OPT: -eva-show-progress -main main3 -slice-return main3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress - OPT: -eva-show-progress -journal-disable -main main3 -inout -calldeps -slice-return main3 -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress -no-inout - OPT: -eva-show-progress -journal-disable -main main -calldeps -slice-return main -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress - OPT: -eva-show-progress -journal-disable -main main4 -calldeps -slice-return main4 -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress - OPT: -eva-show-progress -journal-disable -main main4 -calldeps -slice-return main4 -slicing-level 3 -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress - OPT: -eva-show-progress -journal-disable -main main5 -calldeps -slice-return main5 -then-on 'Slicing export' -set-project-as-default -print -calldeps -eva-show-progress -slice-return main5 -then-on 'Slicing export 2' -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress + STDOPT: +"-slice-return main -calldeps -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" + STDOPT: +"-main main2 -slice-return main2 -calldeps -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" + STDOPT: +"-main main3 -slice-return main3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" + STDOPT: +"-journal-disable -main main3 -inout -calldeps -slice-return main3 -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -no-inout -eva-show-progress" + STDOPT: +"-journal-disable -main main -calldeps -slice-return main -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" + STDOPT: +"-journal-disable -main main4 -calldeps -slice-return main4 -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" + STDOPT: +"-journal-disable -main main4 -calldeps -slice-return main4 -slicing-level 3 -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" + STDOPT: +"-journal-disable -main main5 -calldeps -slice-return main5 -then-on 'Slicing export' -set-project-as-default -print -eva-show-progress -calldeps -slice-return main5 -then-on 'Slicing export 2' -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" */ // something to do to have better results... int T[10]; diff --git a/tests/slicing/bts341.i b/tests/slicing/bts341.i index fcd3c73bfd5..af5b43d5a31 100644 --- a/tests/slicing/bts341.i +++ b/tests/slicing/bts341.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -check -slice-assert main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check + STDOPT: +"-slice-assert main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check" */ int main (int c) { if (c) diff --git a/tests/slicing/bts344.i b/tests/slicing/bts344.i index a44dc449ca5..a560db41550 100644 --- a/tests/slicing/bts344.i +++ b/tests/slicing/bts344.i @@ -1,6 +1,6 @@ /* run.config - OPT: -eva-show-progress -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -slice-return main_bis -main main_bis -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps + STDOPT: +"-slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-slice-return main_bis -main main_bis -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" */ int X, Y ; diff --git a/tests/slicing/bts345.i b/tests/slicing/bts345.i index b9d3ef2ebef..76db76d7b5f 100644 --- a/tests/slicing/bts345.i +++ b/tests/slicing/bts345.i @@ -1,9 +1,9 @@ /* run.config - OPT: -eva-show-progress -check -slice-return call_top -main call_top -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-return top -main top -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-return top -main call_top -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-return called_by_top -main top -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-return called_by_top -main call_top -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check + STDOPT: +"-slice-return call_top -main call_top -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-return top -main top -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-return top -main call_top -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-return called_by_top -main top -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-return called_by_top -main call_top -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " */ int called_indirectly_by_top (int x) { diff --git a/tests/slicing/bts679.i b/tests/slicing/bts679.i index 297a8e218df..902dd771327 100644 --- a/tests/slicing/bts679.i +++ b/tests/slicing/bts679.i @@ -1,5 +1,5 @@ /* run.config -OPT: -eva-show-progress -slice-return main -then-on "Slicing export" -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i +STDOPT: +"-slice-return main -then-on 'Slicing export' -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i" */ void f(void) { return; } int X = 1 ; diff --git a/tests/slicing/bts679b.i b/tests/slicing/bts679b.i index 725996ba631..2e350641583 100644 --- a/tests/slicing/bts679b.i +++ b/tests/slicing/bts679b.i @@ -1,5 +1,5 @@ /* run.config -OPT: -eva-show-progress -slice-assert main -then-on "Slicing export" -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps +STDOPT: +"-slice-assert main -then-on 'Slicing export' -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" */ int X = 1 ; diff --git a/tests/slicing/bts709.c b/tests/slicing/bts709.c index 3662f3ffc42..baf67e8b2e5 100644 --- a/tests/slicing/bts709.c +++ b/tests/slicing/bts709.c @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -slice-pragma func -no-unicode -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps + STDOPT: +"-eva-show-progress -slice-pragma func -no-unicode -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" */ #include <assert.h> diff --git a/tests/slicing/bts808.i b/tests/slicing/bts808.i index 2df48aa1a9b..74fb4cf1e22 100644 --- a/tests/slicing/bts808.i +++ b/tests/slicing/bts808.i @@ -1,5 +1,5 @@ /* run.config -* OPT: -eva-show-progress -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i +* STDOPT: +"-slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " */ int f0 (void) { diff --git a/tests/slicing/bts827.i b/tests/slicing/bts827.i index b224482f828..cd0ec9d931f 100644 --- a/tests/slicing/bts827.i +++ b/tests/slicing/bts827.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps + STDOPT: +"-slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" */ /* The problem was a mix-up between f outputs and retrun value. */ diff --git a/tests/slicing/call_accuracy.i b/tests/slicing/call_accuracy.i index d9efa6c69fd..cecb3ba3a5e 100644 --- a/tests/slicing/call_accuracy.i +++ b/tests/slicing/call_accuracy.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -calldeps -slice-return main -slicing-level 3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps + STDOPT: +"-calldeps -slice-return main -slicing-level 3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" */ int f_cond (int c, int a, int b) { ++a; diff --git a/tests/slicing/call_demo.i b/tests/slicing/call_demo.i index a2ae4c61862..b391349193d 100644 --- a/tests/slicing/call_demo.i +++ b/tests/slicing/call_demo.i @@ -1,6 +1,6 @@ /* run.config - OPT: -eva-show-progress -slice-calls call1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -slice-calls call2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps + STDOPT: +"-slice-calls call1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-slice-calls call2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" */ //@ assigns \result \from v; diff --git a/tests/slicing/callwise.i b/tests/slicing/callwise.i index 64840715cbf..35c6b5f9f22 100644 --- a/tests/slicing/callwise.i +++ b/tests/slicing/callwise.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -calldeps -slice-return main -slicing-level 2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps + STDOPT: +"-calldeps -slice-return main -slicing-level 2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" */ int a = 1, b = 1, c = 1, d = 1, *p; diff --git a/tests/slicing/csmith.i b/tests/slicing/csmith.i index 4e7eb7c6259..822f71d984f 100644 --- a/tests/slicing/csmith.i +++ b/tests/slicing/csmith.i @@ -1,8 +1,8 @@ /* run.config - OPT: -eva-show-progress -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i + STDOPT: +"-slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " COMMENT: - OPT: -eva-show-progress -main bts906b -fct-pdg bts906b -pdg-print -pdg-verbose 2 - OPT: -eva-show-progress -main bts906c -fct-pdg bts906c -pdg-print -pdg-verbose 2 + STDOPT: +"-main bts906b -fct-pdg bts906b -pdg-print -pdg-verbose 2" + STDOPT: +"-main bts906c -fct-pdg bts906c -pdg-print -pdg-verbose 2" COMMENT: The two PDG tests above test interesting case where the slicing may COMMENT: slice away a goto because of an incorrect analyze of some dead code, COMMENT: which make the slicer think that the destination of the goto is the diff --git a/tests/slicing/filter.i b/tests/slicing/filter.i index 43ce0802b73..6c100e07115 100644 --- a/tests/slicing/filter.i +++ b/tests/slicing/filter.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i + STDOPT: +"-slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " **/ /* TESTS: this is about [filter] optimisations since sometimes, * slicing results are ok, but the generated new project is not correct. */ diff --git a/tests/slicing/forall_loop_invariant.i b/tests/slicing/forall_loop_invariant.i index a8c78bcdfc6..a959f703b52 100644 --- a/tests/slicing/forall_loop_invariant.i +++ b/tests/slicing/forall_loop_invariant.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -slice-assert main -then-on 'Slicing export' -print -then-on default -slice-value t -then-on 'Slicing export 2' -print -check -set-project-as-default -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + STDOPT: +"-slice-assert main -then-on 'Slicing export' -print -then-on default -slice-value t -then-on 'Slicing export 2' -print -check -set-project-as-default -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps" **/ diff --git a/tests/slicing/if_many_values.i b/tests/slicing/if_many_values.i index 3c49f051e2b..11bf03bc16c 100644 --- a/tests/slicing/if_many_values.i +++ b/tests/slicing/if_many_values.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -check -slice-value r -journal-disable -slevel 101 -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + STDOPT: +"-slice-value r -journal-disable -slevel 101 -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps" **/ int r=1; diff --git a/tests/slicing/initialized.i b/tests/slicing/initialized.i index c706ab2f282..f1f2fd51e92 100644 --- a/tests/slicing/initialized.i +++ b/tests/slicing/initialized.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -slice-assert main -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check + STDOPT: +"-slice-assert main -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " **/ void main() { diff --git a/tests/slicing/keep_annot.i b/tests/slicing/keep_annot.i index 8683c9a73ea..ae570853dfd 100644 --- a/tests/slicing/keep_annot.i +++ b/tests/slicing/keep_annot.i @@ -1,9 +1,9 @@ /* run.config - OPT: -eva-show-progress -context-valid-pointers -lib-entry -main f -slice-assert f -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -context-valid-pointers -lib-entry -main f -slice-assert f -slicing-keep-annotations -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -context-valid-pointers -lib-entry -main L -slice-pragma L -slicing-keep-annotations -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -context-valid-pointers -lib-entry -main L -slice-pragma L -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -slice-return bts1110 -main bts1110 -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps + STDOPT: +"-context-valid-pointers -lib-entry -main f -slice-assert f -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-context-valid-pointers -lib-entry -main f -slice-assert f -slicing-keep-annotations -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-context-valid-pointers -lib-entry -main L -slice-pragma L -slicing-keep-annotations -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-context-valid-pointers -lib-entry -main L -slice-pragma L -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-slice-return bts1110 -main bts1110 -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" */ diff --git a/tests/slicing/loop_infinite.i b/tests/slicing/loop_infinite.i index 5d15670842f..5b3b69abc07 100644 --- a/tests/slicing/loop_infinite.i +++ b/tests/slicing/loop_infinite.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -check -deps -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + STDOPT: +"-deps -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps" */ int main() { volatile int a=0,b,c; diff --git a/tests/slicing/loop_simple.i b/tests/slicing/loop_simple.i index 03c7b909f12..210466de5c7 100644 --- a/tests/slicing/loop_simple.i +++ b/tests/slicing/loop_simple.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -deps -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps + STDOPT: +"-deps -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" */ int main() { int a,c; volatile int b = 0; diff --git a/tests/slicing/loops.i b/tests/slicing/loops.i index c329cd0823d..2c873816954 100644 --- a/tests/slicing/loops.i +++ b/tests/slicing/loops.i @@ -1,29 +1,29 @@ /* run.config - OPT: -eva-show-progress -deps -lib-entry -main f1 -slice-pragma f1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -lib-entry -main f1 -slice-assert f1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -lib-entry -main f2 -slice-pragma f2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -lib-entry -main f2 -slice-assert f2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -main test_infinite_loop_3 -slice-value G -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -main test_infinite_loop_4 -slice-value G -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -main test_infinite_loop_5 -slice-value G -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -main loop -slice-value Z -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -slice-calls loop -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -slice-pragma loop -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -slice-assert loop -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -main loop -slice-rd Y -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -main loop -slice-rd Z -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -main loop -slice-wr Y -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -main loop -slice-wr Z -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -lib-entry -main stop_f1 -slice-pragma stop_f1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -lib-entry -main stop_f1 -slice-assert stop_f1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -lib-entry -main stop_f2 -slice-pragma stop_f2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -lib-entry -main stop_f2 -slice-assert stop_f2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -slice-value Z -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -slice-rd Y -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -slice-rd Z -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -slice-wr Y -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -slice-wr Z -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps - OPT: -eva-show-progress -deps -lib-entry -main alarm -slice-threat alarm -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps + STDOPT: +"-deps -lib-entry -main f1 -slice-pragma f1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -lib-entry -main f1 -slice-assert f1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -lib-entry -main f2 -slice-pragma f2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -lib-entry -main f2 -slice-assert f2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -main test_infinite_loop_3 -slice-value G -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -main test_infinite_loop_4 -slice-value G -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -main test_infinite_loop_5 -slice-value G -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -main loop -slice-value Z -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -slice-calls loop -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -slice-pragma loop -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -slice-assert loop -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -main loop -slice-rd Y -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -main loop -slice-rd Z -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -main loop -slice-wr Y -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -main loop -slice-wr Z -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -lib-entry -main stop_f1 -slice-pragma stop_f1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -lib-entry -main stop_f1 -slice-assert stop_f1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -lib-entry -main stop_f2 -slice-pragma stop_f2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -lib-entry -main stop_f2 -slice-assert stop_f2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -slice-value Z -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -slice-rd Y -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -slice-rd Z -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -slice-wr Y -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -slice-wr Z -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-deps -lib-entry -main alarm -slice-threat alarm -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" */ diff --git a/tests/slicing/ptr_fct.i b/tests/slicing/ptr_fct.i index 1bec692d364..c972063ed05 100644 --- a/tests/slicing/ptr_fct.i +++ b/tests/slicing/ptr_fct.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -main h -slice-return h -slicing-level 1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i + STDOPT: +"-main h -slice-return h -slicing-level 1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " */ int X ; diff --git a/tests/slicing/same_sliced_name_bts1422.i b/tests/slicing/same_sliced_name_bts1422.i index 1f07dbde3d7..e16a0f6bf0b 100644 --- a/tests/slicing/same_sliced_name_bts1422.i +++ b/tests/slicing/same_sliced_name_bts1422.i @@ -1,5 +1,5 @@ /* run.config -OPT: -eva-show-progress -main foo -slice-value y -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check +STDOPT: +"-main foo -slice-value y -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " */ int y; diff --git a/tests/slicing/select_calls.i b/tests/slicing/select_calls.i index 5617397a8e1..3377326ccb5 100644 --- a/tests/slicing/select_calls.i +++ b/tests/slicing/select_calls.i @@ -1,6 +1,6 @@ /* run.config - OPT: -eva-show-progress -lib-entry -main f -slice-calls send -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -lib-entry -main g -slice-calls nothing -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i + STDOPT: +"-lib-entry -main f -slice-calls send -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-lib-entry -main g -slice-calls nothing -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " */ void nothing (void); diff --git a/tests/slicing/select_return.i b/tests/slicing/select_return.i index 710e0952c18..f2455c4f86e 100644 --- a/tests/slicing/select_return.i +++ b/tests/slicing/select_return.i @@ -1,26 +1,26 @@ /* run.config - OPT: -eva-show-progress -check -slice-calls send -lib-entry -main g -slicing-level 0 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send -lib-entry -main g -slicing-level 1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send -lib-entry -main g -slicing-level 2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send -lib-entry -main g -slicing-level 3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send,send_bis -lib-entry -main g -slicing-level 0 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send,send_bis -lib-entry -main g -slicing-level 1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send,send_bis -lib-entry -main g -slicing-level 2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send,send_bis -lib-entry -main g -slicing-level 3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls "send, send_bis" -lib-entry -main g -slicing-level 1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls "send, send_bis" -lib-entry -main g -slicing-level 2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls "send,send_bis" -lib-entry -main g -slicing-level 3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-return f -lib-entry -main g -slicing-level 0 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-return f -lib-entry -main g -slicing-level 1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-return f -lib-entry -main g -slicing-level 2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-return f -lib-entry -main g -slicing-level 3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-pragma f -lib-entry -main g -slicing-level 0 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-pragma f -lib-entry -main g -slicing-level 1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-pragma f -lib-entry -main g -slicing-level 2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-pragma f -lib-entry -main g -slicing-level 3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-value H -lib-entry -main g -slicing-level 1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-value H -lib-entry -main g -slicing-level 2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-value H -lib-entry -main g -slicing-level 3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check + STDOPT: +"-slice-calls send -lib-entry -main g -slicing-level 0 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-calls send -lib-entry -main g -slicing-level 1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-calls send -lib-entry -main g -slicing-level 2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-calls send -lib-entry -main g -slicing-level 3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-calls send,send_bis -lib-entry -main g -slicing-level 0 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-calls send,send_bis -lib-entry -main g -slicing-level 1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-calls send,send_bis -lib-entry -main g -slicing-level 2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-calls send,send_bis -lib-entry -main g -slicing-level 3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-calls send,send_bis -lib-entry -main g -slicing-level 1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-calls send,send_bis -lib-entry -main g -slicing-level 2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-calls send,send_bis -lib-entry -main g -slicing-level 3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-return f -lib-entry -main g -slicing-level 0 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-return f -lib-entry -main g -slicing-level 1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-return f -lib-entry -main g -slicing-level 2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-return f -lib-entry -main g -slicing-level 3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-pragma f -lib-entry -main g -slicing-level 0 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-pragma f -lib-entry -main g -slicing-level 1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-pragma f -lib-entry -main g -slicing-level 2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-pragma f -lib-entry -main g -slicing-level 3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-value H -lib-entry -main g -slicing-level 1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-value H -lib-entry -main g -slicing-level 2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " + STDOPT: +"-slice-value H -lib-entry -main g -slicing-level 3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " */ int G,H,I; diff --git a/tests/slicing/select_return_bis.i b/tests/slicing/select_return_bis.i index 04c376f362b..d156bfe29a6 100644 --- a/tests/slicing/select_return_bis.i +++ b/tests/slicing/select_return_bis.i @@ -1,15 +1,15 @@ /* run.config - OPT: -eva-show-progress -check -slice-calls send -lib-entry -main g -slicing-level 0 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send -lib-entry -main g -slicing-level 1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send -lib-entry -main g -slicing-level 2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send -lib-entry -main g -slicing-level 3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send,send_bis -lib-entry -main g -slicing-level 0 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send,send_bis -lib-entry -main g -slicing-level 1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send,send_bis -lib-entry -main g -slicing-level 2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send,send_bis -lib-entry -main g -slicing-level 3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send,send_bis -lib-entry -main g -slicing-level 1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send,send_bis -lib-entry -main g -slicing-level 2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check - OPT: -eva-show-progress -check -slice-calls send,send_bis -lib-entry -main g -slicing-level 3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check + STDOPT: +"-slice-calls send -lib-entry -main g -slicing-level 0 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check" + STDOPT: +"-slice-calls send -lib-entry -main g -slicing-level 1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check" + STDOPT: +"-slice-calls send -lib-entry -main g -slicing-level 2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check" + STDOPT: +"-slice-calls send -lib-entry -main g -slicing-level 3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check" + STDOPT: +"-slice-calls send,send_bis -lib-entry -main g -slicing-level 0 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check" + STDOPT: +"-slice-calls send,send_bis -lib-entry -main g -slicing-level 1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check" + STDOPT: +"-slice-calls send,send_bis -lib-entry -main g -slicing-level 2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check" + STDOPT: +"-slice-calls send,send_bis -lib-entry -main g -slicing-level 3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check" + STDOPT: +"-slice-calls send,send_bis -lib-entry -main g -slicing-level 1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check" + STDOPT: +"-slice-calls send,send_bis -lib-entry -main g -slicing-level 2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check" + STDOPT: +"-slice-calls send,send_bis -lib-entry -main g -slicing-level 3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check" */ int G,H,I; diff --git a/tests/slicing/simple_intra_slice.i b/tests/slicing/simple_intra_slice.i index e335e824fe8..72d49734dd7 100644 --- a/tests/slicing/simple_intra_slice.i +++ b/tests/slicing/simple_intra_slice.i @@ -1,7 +1,7 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs CMD: @frama-c@ -load-module tests/slicing/libSelect.cmxs -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -eva-show-progress -deps -no-slice-callers -journal-disable + OPT: -eva-show-progress -deps -no-slice-callers -journal-disable */ int Unknown; int G; diff --git a/tests/slicing/sizeof.i b/tests/slicing/sizeof.i index 4eb2d2152a1..7595f180d7b 100644 --- a/tests/slicing/sizeof.i +++ b/tests/slicing/sizeof.i @@ -1,17 +1,17 @@ /* run.config - OPT: -eva-show-progress -check -deps -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -slice-return SizeOf_1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -slice-return SizeOf_2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -slice-return SizeOfE_pt1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -slice-return SizeOfE_pt2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -slice-return SizeOfE_pt3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -slice-return SizeOfE_pt_deref_1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -slice-return SizeOfE_tab_1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -slice-return SizeOfE_pt_tab_1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -slice-return SizeOfE_pt_tab_2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -slice-return SizeOfE_tab_acces_1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -slice-pragma main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -slice-assert main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + STDOPT: +"-deps -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps" + STDOPT: +"-deps -slice-return SizeOf_1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps" + STDOPT: +"-deps -slice-return SizeOf_2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps" + STDOPT: +"-deps -slice-return SizeOfE_pt1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps" + STDOPT: +"-deps -slice-return SizeOfE_pt2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps" + STDOPT: +"-deps -slice-return SizeOfE_pt3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps" + STDOPT: +"-deps -slice-return SizeOfE_pt_deref_1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps" + STDOPT: +"-deps -slice-return SizeOfE_tab_1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps" + STDOPT: +"-deps -slice-return SizeOfE_pt_tab_1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps" + STDOPT: +"-deps -slice-return SizeOfE_pt_tab_2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps" + STDOPT: +"-deps -slice-return SizeOfE_tab_acces_1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps" + STDOPT: +"-deps -slice-pragma main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps" + STDOPT: +"-deps -slice-assert main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps" */ struct St { int i, *p, tab[5] ; } st ; diff --git a/tests/slicing/slice_behavior.i b/tests/slicing/slice_behavior.i index 01911bdb71b..f5d52985ed9 100644 --- a/tests/slicing/slice_behavior.i +++ b/tests/slicing/slice_behavior.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -check -eva -slice-assert f -slicing-level 0 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-eva + STDOPT: +"-eva -slice-assert f -slicing-level 0 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-eva" */ /*@ requires a > 0; */ int f(int a) { diff --git a/tests/slicing/slice_pragma_stmt.i b/tests/slicing/slice_pragma_stmt.i index 0dc5d985b62..fee7a33722d 100644 --- a/tests/slicing/slice_pragma_stmt.i +++ b/tests/slicing/slice_pragma_stmt.i @@ -1,27 +1,27 @@ /* run.config - OPT: -eva-show-progress -print -journal-disable - OPT: -eva-show-progress -main nop1 -slice-pragma nop1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main nop2 -slice-pragma nop2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main nop3 -slice-pragma nop3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main nop4 -slice-pragma nop4 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main nop5 -slice-pragma nop5 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main nop6 -slice-pragma nop6 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main nop7 -slice-pragma nop7 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main nop8 -slice-pragma nop8 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main double_effect1 -slice-pragma double_effect1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main double_effect2 -slice-pragma double_effect2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main double_effect3 -slice-pragma double_effect3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main double_effect4 -slice-pragma double_effect4 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main double_effect5 -slice-pragma double_effect5 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main test1 -slice-pragma test1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main test2 -slice-pragma test2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main test3 -slice-pragma test3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main test4 -slice-pragma test4 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main test5 -slice-pragma test5 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main test6 -slice-pragma test6 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main test7 -slice-pragma test7 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main test8 -slice-pragma test8 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main test9 -slice-pragma test9 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i + STDOPT: +"-print -journal-disable" + STDOPT: +"-main nop1 -slice-pragma nop1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main nop2 -slice-pragma nop2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main nop3 -slice-pragma nop3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main nop4 -slice-pragma nop4 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main nop5 -slice-pragma nop5 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main nop6 -slice-pragma nop6 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main nop7 -slice-pragma nop7 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main nop8 -slice-pragma nop8 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main double_effect1 -slice-pragma double_effect1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main double_effect2 -slice-pragma double_effect2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main double_effect3 -slice-pragma double_effect3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main double_effect4 -slice-pragma double_effect4 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main double_effect5 -slice-pragma double_effect5 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main test1 -slice-pragma test1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main test2 -slice-pragma test2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main test3 -slice-pragma test3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main test4 -slice-pragma test4 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main test5 -slice-pragma test5 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main test6 -slice-pragma test6 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main test7 -slice-pragma test7 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main test8 -slice-pragma test8 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-main test9 -slice-pragma test9 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " */ typedef int stmt, expr, slice; int x, y ; diff --git a/tests/slicing/test_config b/tests/slicing/test_config index b9b84abc9f8..ab88cd0df15 100644 --- a/tests/slicing/test_config +++ b/tests/slicing/test_config @@ -1 +1,2 @@ EXECNOW: make -s tests/slicing/libSelect.cmxs tests/slicing/libAnim.cmxs +OPT: -eva-show-progress diff --git a/tests/slicing/top.i b/tests/slicing/top.i index 82274e75fbc..7dac65d4ec6 100644 --- a/tests/slicing/top.i +++ b/tests/slicing/top.i @@ -1,7 +1,7 @@ /* run.config -* OPT: -eva-show-progress -eva-no-builtins-auto -check -slicing-level 0 -slice-return uncalled -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -* OPT: -eva-show-progress -eva-no-builtins-auto -check -slicing-level 2 -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -* OPT: -eva-show-progress -eva-no-builtins-auto -check -slicing-level 2 -slice-return strlen -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check +* STDOPT: +"-eva-no-builtins-auto -check -slicing-level 0 -slice-return uncalled -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check" +* STDOPT: +"-eva-no-builtins-auto -check -slicing-level 2 -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check" +* STDOPT: +"-eva-no-builtins-auto -check -slicing-level 2 -slice-return strlen -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check" * * * diff --git a/tests/slicing/top2.i b/tests/slicing/top2.i index 6f3aeeb35d8..b84b8b99425 100644 --- a/tests/slicing/top2.i +++ b/tests/slicing/top2.i @@ -1,6 +1,6 @@ /* run.config -* OPT: -eva-show-progress -check -slicing-level 2 -slice-pragma main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -* OPT: -eva-show-progress -check -slicing-level 2 -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check +* STDOPT: +"-slicing-level 2 -slice-pragma main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " +* STDOPT: +"-slicing-level 2 -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check " */ diff --git a/tests/slicing/undef-fun.i b/tests/slicing/undef-fun.i index 27de9327f7d..59ac0c5e648 100644 --- a/tests/slicing/undef-fun.i +++ b/tests/slicing/undef-fun.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -slice-undef-functions -slice-return f -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i + STDOPT: +"-slice-undef-functions -slice-return f -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " diff --git a/tests/slicing/unitialized.c b/tests/slicing/unitialized.c index 0978ec2279e..70693467a8a 100644 --- a/tests/slicing/unitialized.c +++ b/tests/slicing/unitialized.c @@ -1,8 +1,8 @@ /* run.config - OPT: -eva-show-progress -slice-pragma g -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -slice-assert g -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -slice-assert main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -slice-return g -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i + STDOPT: +"-eva-show-progress -slice-pragma g -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-eva-show-progress -slice-assert g -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-eva-show-progress -slice-assert main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-eva-show-progress -slice-return g -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " */ #ifdef __FRAMAC__ //@ assigns \result \from \nothing; diff --git a/tests/slicing/unravel-flavors.i b/tests/slicing/unravel-flavors.i index 93f3476e7e3..29815de861c 100644 --- a/tests/slicing/unravel-flavors.i +++ b/tests/slicing/unravel-flavors.i @@ -1,8 +1,8 @@ /* run.config - OPT: -eva-show-progress -slice-undef-functions -slice-return send1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -slice-undef-functions -slice-return send2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -slice-undef-functions -slice-return send3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -slice-undef-functions -slice-return send4 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i + STDOPT: +"-slice-undef-functions -slice-return send1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-slice-undef-functions -slice-return send2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-slice-undef-functions -slice-return send3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-slice-undef-functions -slice-return send4 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " */ /* Small example derived from examples given for UNRAVEL tool : */ diff --git a/tests/slicing/unravel-point.i b/tests/slicing/unravel-point.i index fefd3835b84..02cad10a907 100644 --- a/tests/slicing/unravel-point.i +++ b/tests/slicing/unravel-point.i @@ -1,9 +1,9 @@ /* run.config - OPT: -eva-show-progress -calldeps -slice-return send1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress - OPT: -eva-show-progress -calldeps -slice-return send2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress - OPT: -eva-show-progress -calldeps -slice-return send3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress - OPT: -eva-show-progress -calldeps -slice-return send4 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress - OPT: -eva-show-progress -calldeps -slice-return send1 -slice-return send4 -journal-disable -then-on 'Slicing export' -eva-show-progress -calldeps -slice-return send1_slice_1 -print -then-on 'Slicing export 2' -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress + STDOPT: +"-calldeps -slice-return send1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" + STDOPT: +"-calldeps -slice-return send2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" + STDOPT: +"-calldeps -slice-return send3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" + STDOPT: +"-calldeps -slice-return send4 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" + STDOPT: +"-calldeps -slice-return send1 -slice-return send4 -journal-disable -then-on 'Slicing export' -eva-show-progress -calldeps -slice-return send1_slice_1 -print -then-on 'Slicing export 2' -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" diff --git a/tests/slicing/unravel-variance.i b/tests/slicing/unravel-variance.i index 1f49b4cb822..e30a4aebcb2 100644 --- a/tests/slicing/unravel-variance.i +++ b/tests/slicing/unravel-variance.i @@ -1,9 +1,9 @@ /* run.config - OPT: -eva-show-progress -slice-calls printf1 -journal-disable -float-normal -remove-redundant-alarms -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -slice-calls printf2 -journal-disable -float-normal -remove-redundant-alarms -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -slice-calls printf3 -journal-disable -float-normal -remove-redundant-alarms -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -slice-calls printf4 -journal-disable -float-normal -remove-redundant-alarms -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -slice-calls printf5 -journal-disable -float-normal -remove-redundant-alarms -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i + STDOPT: +"-slice-calls printf1 -journal-disable -float-normal -remove-redundant-alarms -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-slice-calls printf2 -journal-disable -float-normal -remove-redundant-alarms -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-slice-calls printf3 -journal-disable -float-normal -remove-redundant-alarms -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-slice-calls printf4 -journal-disable -float-normal -remove-redundant-alarms -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-slice-calls printf5 -journal-disable -float-normal -remove-redundant-alarms -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " */ /* Small example devired from examples given for UNRAVEL tool : */ diff --git a/tests/slicing/unsupported.i b/tests/slicing/unsupported.i index d4a027718c6..c7c3afd735d 100644 --- a/tests/slicing/unsupported.i +++ b/tests/slicing/unsupported.i @@ -1,6 +1,6 @@ /* run.config - OPT: -eva-show-progress -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -sparecode + STDOPT: +"-slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-sparecode" */ int main() { diff --git a/tests/slicing/use_spec.i b/tests/slicing/use_spec.i index e6692b1ba7b..40af146f8c5 100644 --- a/tests/slicing/use_spec.i +++ b/tests/slicing/use_spec.i @@ -1,6 +1,6 @@ /* run.config - OPT: -eva-show-progress -eva-use-spec f -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i - OPT: -eva-show-progress -main main2 -slicing-level 3 -slice-undef-functions -eva-use-spec h -slice-return main2 -journal-disable -slicing-keep-annotations -then-on 'Slicing export' -set-project-as-default -print -eva -eva-show-progress -eva-use-spec='-@all' + STDOPT: +" -eva-use-spec f -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -eva-show-progress" + STDOPT: +"-main main2 -slicing-level 3 -slice-undef-functions -eva-use-spec h -slice-return main2 -journal-disable -slicing-keep-annotations -then-on 'Slicing export' -set-project-as-default -print -eva -eva-use-spec='-@all' -eva-show-progress" diff --git a/tests/slicing/variadic.c b/tests/slicing/variadic.c index 852d33ec09b..7dbecd49222 100644 --- a/tests/slicing/variadic.c +++ b/tests/slicing/variadic.c @@ -1,9 +1,9 @@ /* run.config - OPT: -eva-show-progress -slice-return f3 -no-slice-callers -journal-disable -then-on 'Slicing export' -print - OPT: -eva-show-progress -slice-return f3 -no-slice-callers -journal-disable -variadic-no-translation -then-last -print - OPT: -eva-show-progress -slice-return f3 -journal-disable -then-on 'Slicing export' -print - OPT: -eva-show-progress -slice-return main -journal-disable -then-on 'Slicing export' -print - OPT: -eva-show-progress -slice-return main -slicing-level 3 -journal-disable -then-on 'Slicing export' -print + STDOPT: +"-eva-show-progress -slice-return f3 -no-slice-callers -journal-disable -then-on 'Slicing export' -print" + STDOPT: +"-eva-show-progress -slice-return f3 -no-slice-callers -journal-disable -variadic-no-translation -then-last -print" + STDOPT: +"-eva-show-progress -slice-return f3 -journal-disable -then-on 'Slicing export' -print" + STDOPT: +"-eva-show-progress -slice-return main -journal-disable -then-on 'Slicing export' -print" + STDOPT: +"-eva-show-progress -slice-return main -slicing-level 3 -journal-disable -then-on 'Slicing export' -print" */ #include "../pdg/variadic.c" -- GitLab From 4993b30c3058c1f6210f5a99b2c9a8f0195a4fad Mon Sep 17 00:00:00 2001 From: Valentin Perrelle <valentin.perrelle@cea.fr> Date: Thu, 7 Mar 2019 18:02:25 +0100 Subject: [PATCH 175/376] [Eva] Adjustment proposal for default power values. --- src/plugins/value/value_parameters.ml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/plugins/value/value_parameters.ml b/src/plugins/value/value_parameters.ml index b7d58f50470..e6d47c54189 100644 --- a/src/plugins/value/value_parameters.ml +++ b/src/plugins/value/value_parameters.ml @@ -658,7 +658,7 @@ module ILevel = let () = add_precision_dep ILevel.parameter let () = ILevel.add_aliases ["-val-ilevel"] let () = ILevel.add_update_hook (fun _ i -> Ival.set_small_cardinal i) -let () = ILevel.set_range 4 128 +let () = ILevel.set_range 4 256 let () = Parameter_customize.set_group precision_tuning module SemanticUnrollingLevel = @@ -1372,7 +1372,11 @@ let set (type t) (module P: Parameter_sig.S with type t = t) t = else printf " option %s set to %s." P.name str; end -let slevel_power = [| 0; 10; 25; 50; 75; 100; 150; 200; 300; 400; 500; |] +(* power 0 1 2 3 4 5 6 7 8 9 10 *) +let slevel_power = [| 0; 10; 20; 50; 100; 200; 500; 1000; 2000; 5000; 10000 |] +let ilevel_power = [| 8; 12; 16; 24; 32; 64; 128; 256; 256; 256; 256 |] +let plevel_power = [| 10; 20; 40; 70; 100; 150; 200; 300; 500; 700; 1000 |] + let set_analysis option_name n = if Fast.is_set () && option_name <> Fast.name @@ -1381,11 +1385,11 @@ let set_analysis option_name n = then incompatible_meta_options (); feedback "Option %s detected, \ automatic configuration of the analysis:" option_name; - set (module (MinLoopUnroll)) (n / 2); + set (module (MinLoopUnroll)) (max 0 (n - 4)); set (module (SemanticUnrollingLevel)) (slevel_power.(n)); set (module (WideningDelay)) (1 + n / 2); - set (module (ILevel)) (8 + 12 * n); - set (module (ArrayPrecisionLevel)) (50 * (n+1)); + set (module (ILevel)) (ilevel_power.(n)); + set (module (ArrayPrecisionLevel)) (plevel_power.(n)); set (module (LinearLevel)) (20 * n); set (module (RmAssert)) (n > 0); set (module (SymbolicLocsDomain)) (n > 0); -- GitLab From b38c2497c15f2ec1da6407834170a4a41f4e6080 Mon Sep 17 00:00:00 2001 From: Valentin Perrelle <valentin.perrelle@cea.fr> Date: Tue, 12 Mar 2019 15:47:09 +0100 Subject: [PATCH 176/376] [Eva] Up to eleven or it does not exist --- src/plugins/value/value_parameters.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/value/value_parameters.ml b/src/plugins/value/value_parameters.ml index e6d47c54189..35f989e7c0e 100644 --- a/src/plugins/value/value_parameters.ml +++ b/src/plugins/value/value_parameters.ml @@ -1372,10 +1372,10 @@ let set (type t) (module P: Parameter_sig.S with type t = t) t = else printf " option %s set to %s." P.name str; end -(* power 0 1 2 3 4 5 6 7 8 9 10 *) -let slevel_power = [| 0; 10; 20; 50; 100; 200; 500; 1000; 2000; 5000; 10000 |] -let ilevel_power = [| 8; 12; 16; 24; 32; 64; 128; 256; 256; 256; 256 |] -let plevel_power = [| 10; 20; 40; 70; 100; 150; 200; 300; 500; 700; 1000 |] +(* power 0 1 2 3 4 5 6 7 8 9 10 11 *) +let slevel_power = [| 0; 10; 20; 50; 100; 200; 500; 1000; 2000; 5000; 10000; 20000 |] +let ilevel_power = [| 8; 12; 16; 24; 32; 64; 128; 256; 256; 256; 256; 256 |] +let plevel_power = [| 10; 20; 40; 70; 100; 150; 200; 300; 500; 700; 1000; 2000 |] let set_analysis option_name n = -- GitLab From 5f9ef95a3cb00b541c4e7d9a61bb1c7357e7fa17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 18 Mar 2019 14:54:13 +0100 Subject: [PATCH 177/376] [Eva] Renames -eva-power into -eva-precision. --- src/plugins/value/value_parameters.ml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/plugins/value/value_parameters.ml b/src/plugins/value/value_parameters.ml index 35f989e7c0e..5dedbc7146f 100644 --- a/src/plugins/value/value_parameters.ml +++ b/src/plugins/value/value_parameters.ml @@ -1329,7 +1329,7 @@ module Fast = let option_name = "-eva-fast" let help = "Quick configuration for a fast (but rather imprecise) analysis. \ Opposite of (and incompatible with) -eva-precise. \ - Equivalent to -eva-power 0." + Equivalent to -eva-precision 0." end) let () = Parameter_customize.set_negative_option_name "" @@ -1339,13 +1339,13 @@ module Precise = let option_name = "-eva-precise" let help = "Quick configuration for a precise (but rather slow) analysis. \ Opposite of (and incompatible with) -eva-fast. \ - Equivalent to -eva-power 5." + Equivalent to -eva-precision 5." end) -module Power = +module Precision = Int (struct - let option_name = "-eva-power" + let option_name = "-eva-precision" let arg_name = "n" let default = -1 let help = "Meta-option that automatically sets up some Eva parameters \ @@ -1353,11 +1353,11 @@ module Power = from 0 (fastest but rather imprecise analysis) \ to 10 (accurate but potentially slow analysis)." end) -let () = Power.set_range (-1) 10 +let () = Precision.set_range (-1) 10 let incompatible_meta_options () = abort "The meta options %s, %s and %s are mutually incompatible." - Fast.name Precise.name Power.name + Fast.name Precise.name Precision.name (* Sets a parameter, unless is is already set. *) let set (type t) (module P: Parameter_sig.S with type t = t) t = @@ -1373,15 +1373,15 @@ let set (type t) (module P: Parameter_sig.S with type t = t) t = end (* power 0 1 2 3 4 5 6 7 8 9 10 11 *) -let slevel_power = [| 0; 10; 20; 50; 100; 200; 500; 1000; 2000; 5000; 10000; 20000 |] -let ilevel_power = [| 8; 12; 16; 24; 32; 64; 128; 256; 256; 256; 256; 256 |] -let plevel_power = [| 10; 20; 40; 70; 100; 150; 200; 300; 500; 700; 1000; 2000 |] +let slevel_power = [| 0; 10; 20; 50; 75; 100; 200; 500; 1000; 2000; 5000; 10000 |] +let ilevel_power = [| 8; 12; 16; 24; 32; 64; 128; 256; 256; 256; 256; 256 |] +let plevel_power = [| 10; 20; 40; 70; 100; 150; 200; 300; 500; 700; 1000; 2000 |] let set_analysis option_name n = if Fast.is_set () && option_name <> Fast.name || Precise.is_set () && option_name <> Precise.name - || Power.is_set () && option_name <> Power.name + || Precision.is_set () && option_name <> Precision.name then incompatible_meta_options (); feedback "Option %s detected, \ automatic configuration of the analysis:" option_name; @@ -1402,7 +1402,8 @@ let set_analysis option_name n = let () = Fast.add_update_hook (fun _ n -> if n then set_analysis Fast.name 0); Precise.add_update_hook (fun _ n -> if n then set_analysis Precise.name 5); - Power.add_update_hook (fun _ n -> if n >= 0 then set_analysis Power.name n) + Precision.add_update_hook + (fun _ n -> if n >= 0 then set_analysis Precision.name n) (* -------------------------------------------------------------------------- *) (* --- Freeze parameters. MUST GO LAST --- *) -- GitLab From 0c5be590d28835f77e30760d83c5adf31a07f1d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 18 Mar 2019 15:58:01 +0100 Subject: [PATCH 178/376] [Eva] Removes meta-options -eva-fast and -eva-precise. Only keeps -eva-precision. -eva-precision changes the paramaters even if they have already been set. -eva-precision -1 resets the options to their default value. --- src/plugins/value/value_parameters.ml | 94 +++++++++------------------ 1 file changed, 31 insertions(+), 63 deletions(-) diff --git a/src/plugins/value/value_parameters.ml b/src/plugins/value/value_parameters.ml index 5dedbc7146f..636ae594710 100644 --- a/src/plugins/value/value_parameters.ml +++ b/src/plugins/value/value_parameters.ml @@ -1322,26 +1322,6 @@ let () = MallocLevel.add_aliases ["-val-mlevel"] (* --- Meta options --- *) (* -------------------------------------------------------------------------- *) -let () = Parameter_customize.set_negative_option_name "" -module Fast = - False - (struct - let option_name = "-eva-fast" - let help = "Quick configuration for a fast (but rather imprecise) analysis. \ - Opposite of (and incompatible with) -eva-precise. \ - Equivalent to -eva-precision 0." - end) - -let () = Parameter_customize.set_negative_option_name "" -module Precise = - False - (struct - let option_name = "-eva-precise" - let help = "Quick configuration for a precise (but rather slow) analysis. \ - Opposite of (and incompatible with) -eva-fast. \ - Equivalent to -eva-precision 5." - end) - module Precision = Int (struct @@ -1351,59 +1331,47 @@ module Precision = let help = "Meta-option that automatically sets up some Eva parameters \ for a quick configuration of an analysis, \ from 0 (fastest but rather imprecise analysis) \ - to 10 (accurate but potentially slow analysis)." - end) -let () = Precision.set_range (-1) 10 - -let incompatible_meta_options () = - abort "The meta options %s, %s and %s are mutually incompatible." - Fast.name Precise.name Precision.name - -(* Sets a parameter, unless is is already set. *) -let set (type t) (module P: Parameter_sig.S with type t = t) t = - if P.is_set () - then printf " option %s has already been set, and is not modified." P.name - else - begin - P.set t; - let str = Typed_parameter.get_value P.parameter in - if P.is_default () - then printf " option %s kept at its default value: %s." P.name str - else printf " option %s set to %s." P.name str; - end + to 11 (accurate but potentially slow analysis)." + end) +let () = Precision.set_range (-1) 11 + +(* Sets a parameter to [t], or to its default value if [default] is true. *) +let set (type t) (module P: Parameter_sig.S with type t = t) ~default t = + if default then P.clear () else P.set t; + let str = Typed_parameter.get_value P.parameter in + let str = match P.parameter.Typed_parameter.accessor with + | Typed_parameter.String _ -> "\'" ^ str ^ "\'" + | _ -> str + in + printf " option %s set to %s%s." P.name str + (if P.is_default () then " (default value)" else "") (* power 0 1 2 3 4 5 6 7 8 9 10 11 *) let slevel_power = [| 0; 10; 20; 50; 75; 100; 200; 500; 1000; 2000; 5000; 10000 |] let ilevel_power = [| 8; 12; 16; 24; 32; 64; 128; 256; 256; 256; 256; 256 |] let plevel_power = [| 10; 20; 40; 70; 100; 150; 200; 300; 500; 700; 1000; 2000 |] +let get array n = if n < 0 then 0 else array.(n) let set_analysis option_name n = - if Fast.is_set () && option_name <> Fast.name - || Precise.is_set () && option_name <> Precise.name - || Precision.is_set () && option_name <> Precision.name - then incompatible_meta_options (); - feedback "Option %s detected, \ - automatic configuration of the analysis:" option_name; - set (module (MinLoopUnroll)) (max 0 (n - 4)); - set (module (SemanticUnrollingLevel)) (slevel_power.(n)); - set (module (WideningDelay)) (1 + n / 2); - set (module (ILevel)) (ilevel_power.(n)); - set (module (ArrayPrecisionLevel)) (plevel_power.(n)); - set (module (LinearLevel)) (20 * n); - set (module (RmAssert)) (n > 0); - set (module (SymbolicLocsDomain)) (n > 0); - set (module (EqualityDomain)) (n > 1); - set (module (EqualityCall)) (if n > 2 then "formals" else "none"); - set (module (GaugesDomain)) (n > 3); - set (module (SplitReturn)) (if n > 4 then "auto" else ""); + feedback "Option %s %i detected, \ + automatic configuration of the analysis:" option_name n; + let default = n < 0 in + set (module (MinLoopUnroll)) ~default (max 0 (n - 4)); + set (module (SemanticUnrollingLevel)) ~default (get slevel_power n); + set (module (WideningDelay)) ~default (1 + n / 2); + set (module (ILevel)) ~default (get ilevel_power n); + set (module (ArrayPrecisionLevel)) ~default (get plevel_power n); + set (module (LinearLevel)) ~default (20 * n); + set (module (RmAssert)) ~default (n > 0); + set (module (SymbolicLocsDomain)) ~default (n > 0); + set (module (EqualityDomain)) ~default (n > 1); + set (module (EqualityCall)) ~default (if n > 2 then "formals" else "none"); + set (module (GaugesDomain)) ~default (n > 3); + set (module (SplitReturn)) ~default (if n > 4 then "auto" else ""); () -let () = - Fast.add_update_hook (fun _ n -> if n then set_analysis Fast.name 0); - Precise.add_update_hook (fun _ n -> if n then set_analysis Precise.name 5); - Precision.add_update_hook - (fun _ n -> if n >= 0 then set_analysis Precision.name n) +let () = Precision.add_update_hook (fun _ n -> set_analysis Precision.name n) (* -------------------------------------------------------------------------- *) (* --- Freeze parameters. MUST GO LAST --- *) -- GitLab From 054665ece4d9e7c8030d0a9081f0c5d75fdb7de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 18 Mar 2019 16:00:00 +0100 Subject: [PATCH 179/376] [Eva] Gui: allows the user to change -eva-precision in the Eva panel. --- src/plugins/value/gui_files/register_gui.ml | 16 ++++++++++++---- src/plugins/value/value_parameters.mli | 3 +++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/plugins/value/gui_files/register_gui.ml b/src/plugins/value/gui_files/register_gui.ml index 80d4d7ebce2..33fcef5d778 100644 --- a/src/plugins/value/gui_files/register_gui.ml +++ b/src/plugins/value/gui_files/register_gui.ml @@ -113,16 +113,24 @@ let value_panel pack (main_ui:main_ui) = GPack.table ~packing:(box#pack ~expand:true ~fill:true) ~columns:2 () in let box_1_1 = GPack.hbox ~packing:(w#attach ~left:1 ~top:1) () in + let precision_refresh = + let tooltip = Value_parameters.Precision.parameter.Typed_parameter.help in + Gtk_helper.on_int ~lower:(-1) ~upper:11 ~tooltip + box_1_1 "precision (meta-option)" + Value_parameters.Precision.get + Value_parameters.Precision.set + in + let box_1_2 = GPack.hbox ~packing:(w#attach ~left:1 ~top:2) () in let slevel_refresh = let tooltip = Value_parameters.SemanticUnrollingLevel.parameter.Typed_parameter.help in Gtk_helper.on_int ~lower:0 ~upper:1000000 ~tooltip - box_1_1 "slevel" + box_1_2 "slevel" Value_parameters.SemanticUnrollingLevel.get Value_parameters.SemanticUnrollingLevel.set in - let box_1_2 = GPack.hbox ~packing:(w#attach ~left:1 ~top:2) () in + let box_1_3 = GPack.hbox ~packing:(w#attach ~left:1 ~top:3) () in let validator s = not (Kernel_function.Set.is_empty @@ -130,9 +138,9 @@ let value_panel pack (main_ui:main_ui) = in let main_refresh = Gtk_helper.on_string ~tooltip:Kernel.MainFunction.parameter.Typed_parameter.help - ~validator box_1_2 "main" Kernel.MainFunction.get Kernel.MainFunction.set + ~validator box_1_3 "main" Kernel.MainFunction.get Kernel.MainFunction.set in - let refresh () = slevel_refresh (); main_refresh() in + let refresh () = precision_refresh (); slevel_refresh (); main_refresh() in ignore (run_button#connect#pressed (fun () -> main_ui#protect ~cancelable:true diff --git a/src/plugins/value/value_parameters.mli b/src/plugins/value/value_parameters.mli index 66b79243da3..1d42262c972 100644 --- a/src/plugins/value/value_parameters.mli +++ b/src/plugins/value/value_parameters.mli @@ -149,6 +149,9 @@ module MallocFunctions: Parameter_sig.String_set module AllocReturnsNull: Parameter_sig.Bool module MallocLevel: Parameter_sig.Int +(** Meta-option *) +module Precision: Parameter_sig.Int + val parameters_correctness: Typed_parameter.t list val parameters_tuning: Typed_parameter.t list -- GitLab From 1969d12c8f781647f231b72609dc089314d7c938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 19 Mar 2019 14:00:21 +0100 Subject: [PATCH 180/376] [Eva] Do not apply the meta-option -eva-precision hook when loading a save file. As this can reset all saved states. Modified options will be set to their proper values anyway. --- src/plugins/value/value_parameters.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/value/value_parameters.ml b/src/plugins/value/value_parameters.ml index 636ae594710..54a063c765c 100644 --- a/src/plugins/value/value_parameters.ml +++ b/src/plugins/value/value_parameters.ml @@ -1371,7 +1371,7 @@ let set_analysis option_name n = set (module (SplitReturn)) ~default (if n > 4 then "auto" else ""); () -let () = Precision.add_update_hook (fun _ n -> set_analysis Precision.name n) +let () = Precision.add_set_hook (fun _ n -> set_analysis Precision.name n) (* -------------------------------------------------------------------------- *) (* --- Freeze parameters. MUST GO LAST --- *) -- GitLab From b280c4ac3680f882b5c8dc2712205f4ab03b0394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 19 Mar 2019 13:57:25 +0100 Subject: [PATCH 181/376] [Eva] Applies the meta-option -eva-precision only at the start of the analysis. And not each time the option is changed. --- src/plugins/value/engine/analysis.ml | 1 + src/plugins/value/value_parameters.ml | 76 ++++++++++++++++---------- src/plugins/value/value_parameters.mli | 4 ++ 3 files changed, 53 insertions(+), 28 deletions(-) diff --git a/src/plugins/value/engine/analysis.ml b/src/plugins/value/engine/analysis.ml index d11f2ec4640..65ba4b0c285 100644 --- a/src/plugins/value/engine/analysis.ml +++ b/src/plugins/value/engine/analysis.ml @@ -157,6 +157,7 @@ let reset_analyzer () = (* Builds the analyzer if needed, and run the analysis. *) let force_compute () = Ast.compute (); + Value_parameters.configure_precision (); let kf, lib_entry = Globals.entry_point () in reset_analyzer (); let module Analyzer = (val snd !ref_analyzer) in diff --git a/src/plugins/value/value_parameters.ml b/src/plugins/value/value_parameters.ml index 54a063c765c..ee36c857ced 100644 --- a/src/plugins/value/value_parameters.ml +++ b/src/plugins/value/value_parameters.ml @@ -1334,17 +1334,33 @@ module Precision = to 11 (accurate but potentially slow analysis)." end) let () = Precision.set_range (-1) 11 - -(* Sets a parameter to [t], or to its default value if [default] is true. *) -let set (type t) (module P: Parameter_sig.S with type t = t) ~default t = - if default then P.clear () else P.set t; - let str = Typed_parameter.get_value P.parameter in - let str = match P.parameter.Typed_parameter.accessor with - | Typed_parameter.String _ -> "\'" ^ str ^ "\'" - | _ -> str - in - printf " option %s set to %s%s." P.name str - (if P.is_default () then " (default value)" else "") +let () = add_precision_dep Precision.parameter + +(* Sets a parameter [P] to [t], unless it has already been set by another mean + that this function. *) +let set (type t) (module P: Parameter_sig.S with type t = t) = + let previous = ref (P.get ()) in + fun t -> + let already_set = P.is_set () && not (P.equal !previous (P.get ())) in + if not already_set then begin P.set t; previous := t end; + let str = Typed_parameter.get_value P.parameter in + let str = match P.parameter.Typed_parameter.accessor with + | Typed_parameter.String _ -> "\'" ^ str ^ "\'" + | _ -> str + in + printf " option %s %sset to %s%s." P.name + (if already_set then "already " else "") str + (if already_set && not (P.equal t (P.get ())) then " (not modified)" + else if P.is_default () then " (default value)" else "") + +(* List of configure functions to be called for -eva-precision. *) +let configures = ref [] + +(* Binds the parameter [P] to the function [f] that gives the parameter value + for a precision n. *) +let bind (type t) (module P: Parameter_sig.S with type t = t) f = + let set = set (module P) in + configures := (fun n -> set (f n)) :: !configures (* power 0 1 2 3 4 5 6 7 8 9 10 11 *) let slevel_power = [| 0; 10; 20; 50; 75; 100; 200; 500; 1000; 2000; 5000; 10000 |] @@ -1353,25 +1369,29 @@ let plevel_power = [| 10; 20; 40; 70; 100; 150; 200; 300; 500; 700; 1000; 200 let get array n = if n < 0 then 0 else array.(n) -let set_analysis option_name n = - feedback "Option %s %i detected, \ - automatic configuration of the analysis:" option_name n; - let default = n < 0 in - set (module (MinLoopUnroll)) ~default (max 0 (n - 4)); - set (module (SemanticUnrollingLevel)) ~default (get slevel_power n); - set (module (WideningDelay)) ~default (1 + n / 2); - set (module (ILevel)) ~default (get ilevel_power n); - set (module (ArrayPrecisionLevel)) ~default (get plevel_power n); - set (module (LinearLevel)) ~default (20 * n); - set (module (RmAssert)) ~default (n > 0); - set (module (SymbolicLocsDomain)) ~default (n > 0); - set (module (EqualityDomain)) ~default (n > 1); - set (module (EqualityCall)) ~default (if n > 2 then "formals" else "none"); - set (module (GaugesDomain)) ~default (n > 3); - set (module (SplitReturn)) ~default (if n > 4 then "auto" else ""); +let () = + bind (module MinLoopUnroll) (fun n -> max 0 (n - 4)); + bind (module SemanticUnrollingLevel) (get slevel_power); + bind (module WideningDelay) (fun n -> 1 + n / 2); + bind (module ILevel) (get ilevel_power); + bind (module ArrayPrecisionLevel) (get plevel_power); + bind (module LinearLevel) (fun n -> n * 20); + bind (module RmAssert) (fun n -> n > 0); + bind (module SymbolicLocsDomain) (fun n -> n > 0); + bind (module EqualityDomain) (fun n -> n > 1); + bind (module EqualityCall) (fun n -> if n > 2 then "formals" else "none"); + bind (module GaugesDomain) (fun n -> n > 3); + bind (module SplitReturn) (fun n -> if n > 4 then "auto" else ""); () -let () = Precision.add_set_hook (fun _ n -> set_analysis Precision.name n) +let set_analysis n = + feedback "Option %s %i detected, \ + automatic configuration of the analysis:" Precision.name n; + List.iter ((|>) n) (List.rev !configures) + +let configure_precision () = + let n = Precision.get () in + if n >= 0 then set_analysis n (* -------------------------------------------------------------------------- *) (* --- Freeze parameters. MUST GO LAST --- *) diff --git a/src/plugins/value/value_parameters.mli b/src/plugins/value/value_parameters.mli index 1d42262c972..1d6cd8c4e36 100644 --- a/src/plugins/value/value_parameters.mli +++ b/src/plugins/value/value_parameters.mli @@ -152,6 +152,10 @@ module MallocLevel: Parameter_sig.Int (** Meta-option *) module Precision: Parameter_sig.Int +(* Automatically sets some parameters according to the meta-option + -eva-precision. *) +val configure_precision: unit -> unit + val parameters_correctness: Typed_parameter.t list val parameters_tuning: Typed_parameter.t list -- GitLab From 34f43b4dd4111c9e5220b1408270e4d4d5f4ce2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 2 Apr 2019 14:30:25 +0200 Subject: [PATCH 182/376] [Eva] Fixes a comment. --- src/plugins/value/value_parameters.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/value/value_parameters.ml b/src/plugins/value/value_parameters.ml index ee36c857ced..82314cb1807 100644 --- a/src/plugins/value/value_parameters.ml +++ b/src/plugins/value/value_parameters.ml @@ -1336,8 +1336,8 @@ module Precision = let () = Precision.set_range (-1) 11 let () = add_precision_dep Precision.parameter -(* Sets a parameter [P] to [t], unless it has already been set by another mean - that this function. *) +(* Sets a parameter [P] to [t], unless it has already been set by any other + means. *) let set (type t) (module P: Parameter_sig.S with type t = t) = let previous = ref (P.get ()) in fun t -> -- GitLab From b424702b45e62bc37f39f236e984c300070b2433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 2 Apr 2019 16:04:30 +0200 Subject: [PATCH 183/376] [Eva] -eva-precision -1 resets analysis parameters to their default values. --- src/plugins/value/value_parameters.ml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/plugins/value/value_parameters.ml b/src/plugins/value/value_parameters.ml index 82314cb1807..7bd16282089 100644 --- a/src/plugins/value/value_parameters.ml +++ b/src/plugins/value/value_parameters.ml @@ -1340,9 +1340,12 @@ let () = add_precision_dep Precision.parameter means. *) let set (type t) (module P: Parameter_sig.S with type t = t) = let previous = ref (P.get ()) in - fun t -> + fun ~default t -> let already_set = P.is_set () && not (P.equal !previous (P.get ())) in - if not already_set then begin P.set t; previous := t end; + if not already_set then begin + if default then P.clear () else P.set t; + previous := P.get (); + end; let str = Typed_parameter.get_value P.parameter in let str = match P.parameter.Typed_parameter.accessor with | Typed_parameter.String _ -> "\'" ^ str ^ "\'" @@ -1360,7 +1363,7 @@ let configures = ref [] for a precision n. *) let bind (type t) (module P: Parameter_sig.S with type t = t) f = let set = set (module P) in - configures := (fun n -> set (f n)) :: !configures + configures := (fun n -> set ~default:(n < 0) (f n)) :: !configures (* power 0 1 2 3 4 5 6 7 8 9 10 11 *) let slevel_power = [| 0; 10; 20; 50; 75; 100; 200; 500; 1000; 2000; 5000; 10000 |] @@ -1390,8 +1393,7 @@ let set_analysis n = List.iter ((|>) n) (List.rev !configures) let configure_precision () = - let n = Precision.get () in - if n >= 0 then set_analysis n + if Precision.is_set () then set_analysis (Precision.get ()) (* -------------------------------------------------------------------------- *) (* --- Freeze parameters. MUST GO LAST --- *) -- GitLab From 95ec3228313fe308543131b8b8bfc101605b9588 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Tue, 15 Jan 2019 13:50:02 +0100 Subject: [PATCH 184/376] [rte] trivial annotations includes validation from syntaxical rules --- doc/rte/rte.tex | 3 +-- src/plugins/rte/options.ml | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/rte/rte.tex b/doc/rte/rte.tex index 65daa15731b..bea711914f6 100644 --- a/doc/rte/rte.tex +++ b/doc/rte/rte.tex @@ -875,8 +875,7 @@ left-values access \\ \lstinline |-rte-float-to-int| & boolean (true) & Generate annotations for casts from floating-point to integer \\ \hline -\lstinline |-rte-trivial-annotations| & boolean (true) & Generate status for -annotation through constant folding \\ +\lstinline |-rte-trivial-annotations| & boolean (true) & Generate all annotations even when they trivially hold \\ \hline \lstinline |-rte-warn| & boolean (true) & Emit warning on broken annotations \\ \hline diff --git a/src/plugins/rte/options.ml b/src/plugins/rte/options.ml index 0b629f7f994..5d780169596 100644 --- a/src/plugins/rte/options.ml +++ b/src/plugins/rte/options.ml @@ -90,14 +90,16 @@ module DoPointerCall = end) (* uses results of basic constant propagation in order to check - validity / invalidity of generated assertions, emitting a status if possible + validity / invalidity of generated assertions, emitting a status if possible. + Notice that annotations that can be considered valid from syntaxical rules + are also considered as trivial. *) module Trivial = False (struct let option_name = "-rte-trivial-annotations" - let help = "generate annotations for constant expressions, even when \ - they trivially hold" + let help = "generate all annotations even when they trivially hold \ + (from evaluation of constant expressions, syntactical rules...)" (* if on, evaluates constants in order to check if assertions are trivially true / false *) end) -- GitLab From 3f64f8aaff52d4a23eea72060ca59f7782577c77 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Thu, 7 Mar 2019 10:44:06 +0100 Subject: [PATCH 185/376] [rte/doc] add a reference to -warn-invalid-bool --- doc/rte/rte.tex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/rte/rte.tex b/doc/rte/rte.tex index bea711914f6..0a2b6b4f4ff 100644 --- a/doc/rte/rte.tex +++ b/doc/rte/rte.tex @@ -848,6 +848,9 @@ signed overflows \\ \lstinline|-warn-signed-downcast| & boolean (false) & Generate annotations for signed integer downcast \\ \hline +\lstinline|-warn-invalid-bool| & boolean (true) & Generate annotations for +\lstinline|_Bool| trap representations \\ +\hline \end{tabular} \caption{\framac kernel options, impacting \rte{}} \label{kernel} \end{center} -- GitLab From 064035c64146023003676b08c0789c30bfa95843 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Thu, 7 Mar 2019 12:27:05 +0100 Subject: [PATCH 186/376] [rte] accesses to local _Bool variables are considered as trivial annotations --- src/plugins/rte/rte.ml | 10 ++++- tests/rte/bool.i | 21 ++++++++- tests/rte/oracle/bool.res.oracle | 76 +++++++++++++++++++++++++++++++- 3 files changed, 101 insertions(+), 6 deletions(-) diff --git a/src/plugins/rte/rte.ml b/src/plugins/rte/rte.ml index b1f2b7ffaec..da6e7d1413b 100644 --- a/src/plugins/rte/rte.ml +++ b/src/plugins/rte/rte.ml @@ -497,8 +497,14 @@ let finite_float_assertion ~remove_trivial:_ ~on_alarm (fkind, exp) = let pointer_call ~remove_trivial:_ ~on_alarm (e, args) = on_alarm ~invalid:false (Alarms.Function_pointer (e, Some args)) -let bool_value ~remove_trivial:_ ~on_alarm lv = - on_alarm ~invalid:false (Alarms.Invalid_bool lv) +let bool_value ~remove_trivial ~on_alarm lv = + match remove_trivial, lv with + | true, (Var vi, NoOffset) + when (* consider as trivial accesses to ... *) + (not vi.vglob) && (* local variable or formal parameter when ... *) + (not vi.vaddrof) (* their address is not taken *) + -> () + | _ -> on_alarm ~invalid:false (Alarms.Invalid_bool lv) (* Local Variables: diff --git a/tests/rte/bool.i b/tests/rte/bool.i index d55bbd1b060..070a9fbcaf8 100644 --- a/tests/rte/bool.i +++ b/tests/rte/bool.i @@ -1,7 +1,11 @@ /* run.config -OPT: -warn-invalid-bool -rte -print +OPT: -warn-invalid-bool -rte -print -then -rte-trivial-annotations -rte -print */ +/* The test asks for two execution of RTE plug-in: + - a first one without trivial annotations (default behavior) + - a second one with trivial annotations (-rte-trivial-annotations) +*/ struct s_bool { char c; _Bool b; } sb; _Bool ko1 () { @@ -18,9 +22,22 @@ _Bool ko2 () { } extern _Bool f(void) ; -_Bool g (void) { +/* There is no rte in 'ok1' statements (needs -rte-no-trivial-annotations). + If there is some during its execution, + that is into the statements of the called functions. +*/ +_Bool ok1 (void) { _Bool x = f() ; _Bool y = ko2(); if (x) return y; return x; } + +/* There is no rte when converting to _Bool (needs -rte-no-trivial-annotations), + nor for access to local variables or formal parameters + when their address is not taken. +*/ +extern int g(_Bool,_Bool) ; +_Bool ok2 (int a,_Bool b) { + return g(a>0, b); +} diff --git a/tests/rte/oracle/bool.res.oracle b/tests/rte/oracle/bool.res.oracle index a6565da2f86..4e7ccef2f73 100644 --- a/tests/rte/oracle/bool.res.oracle +++ b/tests/rte/oracle/bool.res.oracle @@ -1,7 +1,66 @@ [kernel] Parsing tests/rte/bool.i (no preprocessing) -[rte] annotating function g [rte] annotating function ko1 [rte] annotating function ko2 +[rte] annotating function ok1 +[rte] annotating function ok2 +/* Generated by Frama-C */ +struct s_bool { + char c ; + _Bool b ; +}; +struct s_bool sb; +_Bool ko1(void) +{ + _Bool __retres; + char *p = & sb.c; + /*@ assert rte: mem_access: \valid(p + 1); */ + *(p + 1) = (char)17; + /*@ assert rte: bool_value: sb.b ≡ 0 ∨ sb.b ≡ 1; */ + __retres = sb.b; + return __retres; +} + +_Bool ko2(void) +{ + _Bool b; + char *p = (char *)(& b); + /*@ assert rte: mem_access: \valid(p); */ + *p = (char)17; + /*@ assert rte: bool_value: b ≡ 0 ∨ b ≡ 1; */ + return b; +} + +extern _Bool f(void); + +_Bool ok1(void) +{ + _Bool __retres; + _Bool x = f(); + _Bool y = ko2(); + if (x) { + __retres = y; + goto return_label; + } + __retres = x; + return_label: return __retres; +} + +extern int g(_Bool, _Bool); + +_Bool ok2(int a, _Bool b) +{ + _Bool __retres; + int tmp; + tmp = g((_Bool)(a > 0),b); + __retres = (_Bool)(tmp != 0); + return __retres; +} + + +[rte] annotating function ko1 +[rte] annotating function ko2 +[rte] annotating function ok1 +[rte] annotating function ok2 /* Generated by Frama-C */ struct s_bool { char c ; @@ -32,7 +91,7 @@ _Bool ko2(void) extern _Bool f(void); -_Bool g(void) +_Bool ok1(void) { _Bool __retres; _Bool x = f(); @@ -50,4 +109,17 @@ _Bool g(void) return __retres; } +extern int g(_Bool, _Bool); + +_Bool ok2(int a, _Bool b) +{ + _Bool __retres; + int tmp; + /*@ assert rte: bool_value: b ≡ 0 ∨ b ≡ 1; */ + tmp = g((_Bool)(a > 0),b); + __retres = (_Bool)(tmp != 0); + /*@ assert rte: bool_value: __retres ≡ 0 ∨ __retres ≡ 1; */ + return __retres; +} + -- GitLab From 00c703718db1cf80cc0b8f5b2e1b47e2b946ccea Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Thu, 7 Mar 2019 12:44:52 +0100 Subject: [PATCH 187/376] [rte/doc] adds missing reference to some -warn-xxx options of the kernel --- doc/rte/rte.tex | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/rte/rte.tex b/doc/rte/rte.tex index 0a2b6b4f4ff..da0de6d2b5c 100644 --- a/doc/rte/rte.tex +++ b/doc/rte/rte.tex @@ -848,9 +848,18 @@ signed overflows \\ \lstinline|-warn-signed-downcast| & boolean (false) & Generate annotations for signed integer downcast \\ \hline +\lstinline|-warn-left-shift-negative| & boolean (true) & Generate annotations for +left shift on negative values \\ +\hline +\lstinline|-warn-right-shift-negative| & boolean (false) & Generate annotations for +right shift on negative values \\ +\hline \lstinline|-warn-invalid-bool| & boolean (true) & Generate annotations for \lstinline|_Bool| trap representations \\ \hline +\lstinline|-warn-special-float| & string: \lstinline|non-finite|, (\lstinline|nan|) or \lstinline|none| & generate annotations when +special floats are produced: infinite floats or NaN (by default), only on NaN or never. \\ +\hline \end{tabular} \caption{\framac kernel options, impacting \rte{}} \label{kernel} \end{center} -- GitLab From 38ac3c98d914f8ae3949eaf097d363ecdcefa392 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Thu, 7 Mar 2019 13:00:50 +0100 Subject: [PATCH 188/376] [rte/doc] removes reference to -rte-all option that does not exist any more --- doc/rte/rte.tex | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/doc/rte/rte.tex b/doc/rte/rte.tex index da0de6d2b5c..0cf774f0889 100644 --- a/doc/rte/rte.tex +++ b/doc/rte/rte.tex @@ -788,48 +788,6 @@ check existing annotations before generation. This behaviour does not happen if \rte{} is used in the context of a Frama-C project~\cite{framacdev}: the annotations are not generated twice. -The option \lstinline|-rte-all| has a special behavior: if selected, the options -\lstinline|-warn-signed-overflow|, \lstinline|-warn-signed-downcast|, -\lstinline|-rte-div|, \lstinline|-rte-shift|, \lstinline|-rte-mem| -and \lstinline|-rte-float-to-int| are also selected. The option -\lstinline|-rte-all| is selected by default. - -The special behavior of \lstinline|-rte-all| implies that \rte{} generates by -default annotations for all the runtime-errors (more precisely, undefined and -implementation-defined behaviors) it handles. The user should explicitly add -\lstinline|-warn-unsigned-overflow| and \lstinline|-warn-unsigned-downcast| (not -entailed by \lstinline|-rte-all|) to generated unsigned overflows annotations -and unsigned downcasts annotations respectively, which are valid as of -\cnn{}. - -On the other hand, to generate only a subset of possible annotations, one has to -use \lstinline|-rte-no-all| in conjunction with other positive options. For -instance, used in conjunction with \lstinline|-rte-mem| alone, -only annotations for the validity of memory access would be generated. - -Some examples: - -\begin{itemize} - -\item - -\lstinline|frama-c -rte -rte-select f,g -rte-no-all -rte-mem|: only generate -annotations for memory accesses, and only for call-sites found in functions -\lstinline|f| and \lstinline|g|. - -\item - -\lstinline|frama-c -rte -rte-no-all -warn-unsigned-overflow|: only generate -annotations for unsigned overflows, for the whole C program. - -\item - -\texttt{frama-c -rte -warn-unsigned-overflow -rte-no-trivial-annotations}: -generate all possible annotations (unsigned overflows included), -but do not try to evaluate their status through constant folding. - -\end{itemize} - \begin{table} \begin{center} \begin{tabular}{|l|l|p{8cm}|} @@ -873,9 +831,6 @@ special floats are produced: infinite floats or NaN (by default), only on NaN or \hline \lstinline|-rte| & boolean (false) & Enable \rte{} plug-in \\ \hline -\lstinline|-rte-all| & boolean (true) & Enable all runtime-errors annotations -\\ -\hline \lstinline|-rte-div| & boolean (false) & Generate annotations for division by zero \\ \hline -- GitLab From 9c70fcbc8e64a46a1864306dc179021cf6af3b55 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Tue, 2 Apr 2019 16:57:50 +0200 Subject: [PATCH 189/376] [rte] typos --- src/plugins/rte/options.ml | 2 +- tests/rte/bool.i | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/rte/options.ml b/src/plugins/rte/options.ml index 5d780169596..fb4af071484 100644 --- a/src/plugins/rte/options.ml +++ b/src/plugins/rte/options.ml @@ -98,7 +98,7 @@ module Trivial = False (struct let option_name = "-rte-trivial-annotations" - let help = "generate all annotations even when they trivially hold \ + let help = "generate all annotations even if they trivially hold \ (from evaluation of constant expressions, syntactical rules...)" (* if on, evaluates constants in order to check if assertions are trivially true / false *) diff --git a/tests/rte/bool.i b/tests/rte/bool.i index 070a9fbcaf8..4c0f20d8595 100644 --- a/tests/rte/bool.i +++ b/tests/rte/bool.i @@ -2,7 +2,7 @@ OPT: -warn-invalid-bool -rte -print -then -rte-trivial-annotations -rte -print */ -/* The test asks for two execution of RTE plug-in: +/* The test asks for two executions of RTE plug-in: - a first one without trivial annotations (default behavior) - a second one with trivial annotations (-rte-trivial-annotations) */ -- GitLab From dddf3870639f9fe08b13c45146ff66ba69918e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Wed, 3 Apr 2019 09:56:47 +0200 Subject: [PATCH 190/376] [Eva] Updates test oracles for alternative domains. --- tests/builtins/diff_apron | 4 +- tests/builtins/diff_bitwise | 4 +- tests/builtins/diff_equalities | 28 +++++------ tests/builtins/diff_gauges | 48 +++++++++++++++--- tests/builtins/diff_symblocs | 20 ++++---- tests/idct/diff_apron | 12 ++--- tests/idct/diff_equalities | 90 +++++++++++++++++----------------- tests/idct/diff_gauges | 4 +- tests/value/diff_apron | 6 +-- tests/value/diff_gauges | 51 ++++++++++++------- 10 files changed, 159 insertions(+), 108 deletions(-) diff --git a/tests/builtins/diff_apron b/tests/builtins/diff_apron index 7bad8145315..6e0afb298cf 100644 --- a/tests/builtins/diff_apron +++ b/tests/builtins/diff_apron @@ -1,9 +1,9 @@ diff tests/builtins/oracle/Longinit_sequencer.res.oracle tests/builtins/oracle_apron/Longinit_sequencer.res.oracle -320c320 +323c323 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_apron/Longinit_sequencer.sav -556c556 +562c562 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_apron/Longinit_sequencer.sav diff --git a/tests/builtins/diff_bitwise b/tests/builtins/diff_bitwise index 4994cdff7e3..a446ce5ec81 100644 --- a/tests/builtins/diff_bitwise +++ b/tests/builtins/diff_bitwise @@ -1,9 +1,9 @@ diff tests/builtins/oracle/Longinit_sequencer.res.oracle tests/builtins/oracle_bitwise/Longinit_sequencer.res.oracle -320c320 +323c323 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_bitwise/Longinit_sequencer.sav -556c556 +562c562 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_bitwise/Longinit_sequencer.sav diff --git a/tests/builtins/diff_equalities b/tests/builtins/diff_equalities index dc9d2d37177..534763b2be1 100644 --- a/tests/builtins/diff_equalities +++ b/tests/builtins/diff_equalities @@ -1,17 +1,17 @@ diff tests/builtins/oracle/Longinit_sequencer.res.oracle tests/builtins/oracle_equalities/Longinit_sequencer.res.oracle -320c320 +323c323 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_equalities/Longinit_sequencer.sav -556c556 +562c562 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_equalities/Longinit_sequencer.sav diff tests/builtins/oracle/alloc_weak.res.oracle tests/builtins/oracle_equalities/alloc_weak.res.oracle -34,35d33 +36,37d35 < [eva:alarm] tests/builtins/alloc_weak.c:30: Warning: < accessing uninitialized left-value. assert \initialized(p); -898c896 +900c898 < r ∈ [--..--] --- > r ∈ {42} @@ -301,31 +301,31 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_equaliti > __malloc_main_l97[0]; __malloc_main_l114[0..3]; __malloc_main_l127; > __malloc_main_l127_0[0..1]; __malloc_main_l127_1[0..2]; diff tests/builtins/oracle/imprecise.res.oracle tests/builtins/oracle_equalities/imprecise.res.oracle -96a97,98 +100a101,102 > [kernel] tests/builtins/imprecise.c:51: > imprecise size for variable v3 (abstract type 'struct u') -216a219,220 +224a227,228 > [kernel] tests/builtins/imprecise.c:111: > more than 200(300) elements to enumerate. Approximating. -225a230,231 +233a238,239 > [kernel] tests/builtins/imprecise.c:114: > more than 200(300) elements to enumerate. Approximating. -229,232d234 +237,240d242 < [kernel] tests/builtins/imprecise.c:111: < more than 200(300) elements to enumerate. Approximating. < [kernel] tests/builtins/imprecise.c:114: < more than 200(300) elements to enumerate. Approximating. diff tests/builtins/oracle/linked_list.1.res.oracle tests/builtins/oracle_equalities/linked_list.1.res.oracle -422a423,424 +455a456,457 > [kernel] tests/builtins/linked_list.c:19: > more than 100(128) elements to enumerate. Approximating. -470a473,474 +506a509,510 > [kernel] tests/builtins/linked_list.c:43: > more than 100(128) elements to enumerate. Approximating. -472a477,478 +508a513,514 > [kernel] tests/builtins/linked_list.c:44: > more than 100(128) elements to enumerate. Approximating. -558,561d563 +600,603d605 < [kernel] tests/builtins/linked_list.c:43: < more than 100(128) elements to enumerate. Approximating. < [kernel] tests/builtins/linked_list.c:44: @@ -585,11 +585,11 @@ diff tests/builtins/oracle/malloc-optimistic.res.oracle tests/builtins/oracle_eq --- > [eva] tests/builtins/malloc-optimistic.c:122: Frama_C_show_each: [30..99] diff tests/builtins/oracle/write-const.res.oracle tests/builtins/oracle_equalities/write-const.res.oracle -78c78 +84c84 < tmp ∈ {{ &a ; &b }} --- > tmp ∈ {{ &b }} -99c99 +107c107 < tmp ∈ {{ &a ; &b }} --- > tmp ∈ {{ &b }} diff --git a/tests/builtins/diff_gauges b/tests/builtins/diff_gauges index b3a160758ab..f8f6c848e6d 100644 --- a/tests/builtins/diff_gauges +++ b/tests/builtins/diff_gauges @@ -1,14 +1,14 @@ diff tests/builtins/oracle/Longinit_sequencer.res.oracle tests/builtins/oracle_gauges/Longinit_sequencer.res.oracle -320c320 +323c323 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_gauges/Longinit_sequencer.sav -556c556 +562c562 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_gauges/Longinit_sequencer.sav diff tests/builtins/oracle/linked_list.0.res.oracle tests/builtins/oracle_gauges/linked_list.0.res.oracle -1052a1053,1058 +1094a1095,1100 > [eva] computing for function printf_va_1 <- main. > Called from tests/builtins/linked_list.c:51. > [eva] Done for function printf_va_1 @@ -16,7 +16,7 @@ diff tests/builtins/oracle/linked_list.0.res.oracle tests/builtins/oracle_gauges > Called from tests/builtins/linked_list.c:51. > [eva] Done for function printf_va_1 diff tests/builtins/oracle/linked_list.1.res.oracle tests/builtins/oracle_gauges/linked_list.1.res.oracle -556a557,562 +598a599,604 > [eva] computing for function printf_va_1 <- main. > Called from tests/builtins/linked_list.c:51. > [eva] Done for function printf_va_1 @@ -39,10 +39,10 @@ diff tests/builtins/oracle/memcpy.res.oracle tests/builtins/oracle_gauges/memcpy 167a168,169 > [eva] tests/builtins/memcpy.c:96: Call to builtin memcpy > [eva] tests/builtins/memcpy.c:96: Call to builtin memcpy -446a449 +448a451 > [eva] tests/builtins/memcpy.c:230: starting to merge loop iterations diff tests/builtins/oracle/realloc.res.oracle tests/builtins/oracle_gauges/realloc.res.oracle -644a645,957 +689a690,1038 > [eva] tests/builtins/realloc.c:152: Call to builtin realloc > [eva:malloc] bases_to_realloc: {__realloc_w_main10_l152} > [eva:malloc] tests/builtins/realloc.c:152: @@ -54,6 +54,9 @@ diff tests/builtins/oracle/realloc.res.oracle tests/builtins/oracle_gauges/reall > __fc_heap_status ∈ [--..--] > __fc_random_counter ∈ [--..--] > __fc_rand_max ∈ {32767} +> __fc_random48_init ∈ {0} +> __fc_random48_counter[0..2] ∈ [--..--] +> __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} > __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} > [1] ∈ {{ NULL ; &S_1___fc_env[0] }} > [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -80,6 +83,9 @@ diff tests/builtins/oracle/realloc.res.oracle tests/builtins/oracle_gauges/reall > __fc_heap_status ∈ [--..--] > __fc_random_counter ∈ [--..--] > __fc_rand_max ∈ {32767} +> __fc_random48_init ∈ {0} +> __fc_random48_counter[0..2] ∈ [--..--] +> __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} > __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} > [1] ∈ {{ NULL ; &S_1___fc_env[0] }} > [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -106,6 +112,9 @@ diff tests/builtins/oracle/realloc.res.oracle tests/builtins/oracle_gauges/reall > __fc_heap_status ∈ [--..--] > __fc_random_counter ∈ [--..--] > __fc_rand_max ∈ {32767} +> __fc_random48_init ∈ {0} +> __fc_random48_counter[0..2] ∈ [--..--] +> __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} > __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} > [1] ∈ {{ NULL ; &S_1___fc_env[0] }} > [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -132,6 +141,9 @@ diff tests/builtins/oracle/realloc.res.oracle tests/builtins/oracle_gauges/reall > __fc_heap_status ∈ [--..--] > __fc_random_counter ∈ [--..--] > __fc_rand_max ∈ {32767} +> __fc_random48_init ∈ {0} +> __fc_random48_counter[0..2] ∈ [--..--] +> __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} > __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} > [1] ∈ {{ NULL ; &S_1___fc_env[0] }} > [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -158,6 +170,9 @@ diff tests/builtins/oracle/realloc.res.oracle tests/builtins/oracle_gauges/reall > __fc_heap_status ∈ [--..--] > __fc_random_counter ∈ [--..--] > __fc_rand_max ∈ {32767} +> __fc_random48_init ∈ {0} +> __fc_random48_counter[0..2] ∈ [--..--] +> __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} > __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} > [1] ∈ {{ NULL ; &S_1___fc_env[0] }} > [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -184,6 +199,9 @@ diff tests/builtins/oracle/realloc.res.oracle tests/builtins/oracle_gauges/reall > __fc_heap_status ∈ [--..--] > __fc_random_counter ∈ [--..--] > __fc_rand_max ∈ {32767} +> __fc_random48_init ∈ {0} +> __fc_random48_counter[0..2] ∈ [--..--] +> __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} > __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} > [1] ∈ {{ NULL ; &S_1___fc_env[0] }} > [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -210,6 +228,9 @@ diff tests/builtins/oracle/realloc.res.oracle tests/builtins/oracle_gauges/reall > __fc_heap_status ∈ [--..--] > __fc_random_counter ∈ [--..--] > __fc_rand_max ∈ {32767} +> __fc_random48_init ∈ {0} +> __fc_random48_counter[0..2] ∈ [--..--] +> __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} > __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} > [1] ∈ {{ NULL ; &S_1___fc_env[0] }} > [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -236,6 +257,9 @@ diff tests/builtins/oracle/realloc.res.oracle tests/builtins/oracle_gauges/reall > __fc_heap_status ∈ [--..--] > __fc_random_counter ∈ [--..--] > __fc_rand_max ∈ {32767} +> __fc_random48_init ∈ {0} +> __fc_random48_counter[0..2] ∈ [--..--] +> __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} > __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} > [1] ∈ {{ NULL ; &S_1___fc_env[0] }} > [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -262,6 +286,9 @@ diff tests/builtins/oracle/realloc.res.oracle tests/builtins/oracle_gauges/reall > __fc_heap_status ∈ [--..--] > __fc_random_counter ∈ [--..--] > __fc_rand_max ∈ {32767} +> __fc_random48_init ∈ {0} +> __fc_random48_counter[0..2] ∈ [--..--] +> __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} > __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} > [1] ∈ {{ NULL ; &S_1___fc_env[0] }} > [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -289,6 +316,9 @@ diff tests/builtins/oracle/realloc.res.oracle tests/builtins/oracle_gauges/reall > __fc_heap_status ∈ [--..--] > __fc_random_counter ∈ [--..--] > __fc_rand_max ∈ {32767} +> __fc_random48_init ∈ {0} +> __fc_random48_counter[0..2] ∈ [--..--] +> __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} > __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} > [1] ∈ {{ NULL ; &S_1___fc_env[0] }} > [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -315,6 +345,9 @@ diff tests/builtins/oracle/realloc.res.oracle tests/builtins/oracle_gauges/reall > __fc_heap_status ∈ [--..--] > __fc_random_counter ∈ [--..--] > __fc_rand_max ∈ {32767} +> __fc_random48_init ∈ {0} +> __fc_random48_counter[0..2] ∈ [--..--] +> __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} > __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} > [1] ∈ {{ NULL ; &S_1___fc_env[0] }} > [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -341,6 +374,9 @@ diff tests/builtins/oracle/realloc.res.oracle tests/builtins/oracle_gauges/reall > __fc_heap_status ∈ [--..--] > __fc_random_counter ∈ [--..--] > __fc_rand_max ∈ {32767} +> __fc_random48_init ∈ {0} +> __fc_random48_counter[0..2] ∈ [--..--] +> __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} > __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} > [1] ∈ {{ NULL ; &S_1___fc_env[0] }} > [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} diff --git a/tests/builtins/diff_symblocs b/tests/builtins/diff_symblocs index 72f7c197356..fc36c7d36a2 100644 --- a/tests/builtins/diff_symblocs +++ b/tests/builtins/diff_symblocs @@ -1,40 +1,40 @@ diff tests/builtins/oracle/Longinit_sequencer.res.oracle tests/builtins/oracle_symblocs/Longinit_sequencer.res.oracle -320c320 +323c323 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_symblocs/Longinit_sequencer.sav -556c556 +562c562 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_symblocs/Longinit_sequencer.sav diff tests/builtins/oracle/alloc_weak.res.oracle tests/builtins/oracle_symblocs/alloc_weak.res.oracle -34,35d33 +36,37d35 < [eva:alarm] tests/builtins/alloc_weak.c:30: Warning: < accessing uninitialized left-value. assert \initialized(p); -898c896 +900c898 < r ∈ [--..--] --- > r ∈ {42} diff tests/builtins/oracle/imprecise.res.oracle tests/builtins/oracle_symblocs/imprecise.res.oracle -216a217,218 +224a225,226 > [kernel] tests/builtins/imprecise.c:111: > more than 200(300) elements to enumerate. Approximating. -225a228,229 +233a236,237 > [kernel] tests/builtins/imprecise.c:114: > more than 200(300) elements to enumerate. Approximating. -229,232d232 +237,240d240 < [kernel] tests/builtins/imprecise.c:111: < more than 200(300) elements to enumerate. Approximating. < [kernel] tests/builtins/imprecise.c:114: < more than 200(300) elements to enumerate. Approximating. diff tests/builtins/oracle/linked_list.1.res.oracle tests/builtins/oracle_symblocs/linked_list.1.res.oracle -470a471,472 +506a507,508 > [kernel] tests/builtins/linked_list.c:43: > more than 100(128) elements to enumerate. Approximating. -472a475,476 +508a511,512 > [kernel] tests/builtins/linked_list.c:44: > more than 100(128) elements to enumerate. Approximating. -558,561d561 +600,603d603 < [kernel] tests/builtins/linked_list.c:43: < more than 100(128) elements to enumerate. Approximating. < [kernel] tests/builtins/linked_list.c:44: diff --git a/tests/idct/diff_apron b/tests/idct/diff_apron index e3b1cc3498b..5ba6a7afd0f 100644 --- a/tests/idct/diff_apron +++ b/tests/idct/diff_apron @@ -37,7 +37,7 @@ diff tests/idct/oracle/ieee_1180_1990.res.oracle tests/idct/oracle_apron/ieee_11 > Called from tests/idct/ieee_1180_1990.c:85. > [eva] Recording results for IEEE_1180_1990_rand > [eva] Done for function IEEE_1180_1990_rand -412,430c424,461 +413,431c425,462 < [eva] tests/idct/ieee_1180_1990.c:85: < Reusing old results for call to IEEE_1180_1990_rand < [eva] tests/idct/ieee_1180_1990.c:85: @@ -96,7 +96,7 @@ diff tests/idct/oracle/ieee_1180_1990.res.oracle tests/idct/oracle_apron/ieee_11 > Called from tests/idct/ieee_1180_1990.c:260. > [eva] Recording results for idct > [eva] Done for function idct -455,459c486,497 +456,460c487,498 < [eva] tests/idct/ieee_1180_1990.c:282: < Reusing old results for call to IEEE_1180_1990_dctf < [eva] tests/idct/ieee_1180_1990.c:283: @@ -115,7 +115,7 @@ diff tests/idct/oracle/ieee_1180_1990.res.oracle tests/idct/oracle_apron/ieee_11 > Called from tests/idct/ieee_1180_1990.c:284. > [eva] Recording results for idct > [eva] Done for function idct -486,504c524,561 +487,505c525,562 < [eva] tests/idct/ieee_1180_1990.c:85: < Reusing old results for call to IEEE_1180_1990_rand < [eva] tests/idct/ieee_1180_1990.c:85: @@ -174,7 +174,7 @@ diff tests/idct/oracle/ieee_1180_1990.res.oracle tests/idct/oracle_apron/ieee_11 > Called from tests/idct/ieee_1180_1990.c:306. > [eva] Recording results for idct > [eva] Done for function idct -529,533c586,597 +530,534c587,598 < [eva] tests/idct/ieee_1180_1990.c:328: < Reusing old results for call to IEEE_1180_1990_dctf < [eva] tests/idct/ieee_1180_1990.c:329: @@ -193,7 +193,7 @@ diff tests/idct/oracle/ieee_1180_1990.res.oracle tests/idct/oracle_apron/ieee_11 > Called from tests/idct/ieee_1180_1990.c:330. > [eva] Recording results for idct > [eva] Done for function idct -557,570c621,1920 +558,571c622,1921 < [eva] tests/idct/ieee_1180_1990.c:85: < Reusing old results for call to IEEE_1180_1990_rand < [eva] tests/idct/ieee_1180_1990.c:85: @@ -1509,7 +1509,7 @@ diff tests/idct/oracle/ieee_1180_1990.res.oracle tests/idct/oracle_apron/ieee_11 > Called from tests/idct/ieee_1180_1990.c:85. > [eva] Recording results for IEEE_1180_1990_rand > [eva] Done for function IEEE_1180_1990_rand -625,870c1975,2102 +626,871c1976,2103 < [eva] tests/idct/ieee_1180_1990.c:214: Reusing old results for call to idct < [eva] tests/idct/ieee_1180_1990.c:236: < Reusing old results for call to IEEE_1180_1990_dctf diff --git a/tests/idct/diff_equalities b/tests/idct/diff_equalities index c05946b24e4..6d1b02bed20 100644 --- a/tests/idct/diff_equalities +++ b/tests/idct/diff_equalities @@ -1,23 +1,23 @@ diff tests/idct/oracle/ieee_1180_1990.res.oracle tests/idct/oracle_equalities/ieee_1180_1990.res.oracle -355a356,357 -> [eva] tests/idct/ieee_1180_1990.c:219: Warning: +356a357,358 +> [eva:signed-overflow] tests/idct/ieee_1180_1990.c:219: Warning: > 2's complement assumed for overflow -359a362,363 -> [eva] tests/idct/ieee_1180_1990.c:220: Warning: +360a363,364 +> [eva:signed-overflow] tests/idct/ieee_1180_1990.c:220: Warning: > 2's complement assumed for overflow -365,366d368 -< [eva] tests/idct/ieee_1180_1990.c:219: Warning: +366,367d369 +< [eva:signed-overflow] tests/idct/ieee_1180_1990.c:219: Warning: < 2's complement assumed for overflow -391a394,395 -> [eva] tests/idct/ieee_1180_1990.c:243: Warning: +392a395,396 +> [eva:signed-overflow] tests/idct/ieee_1180_1990.c:243: Warning: > 2's complement assumed for overflow -395a400,401 -> [eva] tests/idct/ieee_1180_1990.c:244: Warning: +396a401,402 +> [eva:signed-overflow] tests/idct/ieee_1180_1990.c:244: Warning: > 2's complement assumed for overflow -401,402d406 -< [eva] tests/idct/ieee_1180_1990.c:243: Warning: +402,403d407 +< [eva:signed-overflow] tests/idct/ieee_1180_1990.c:243: Warning: < 2's complement assumed for overflow -423a428,435 +424a429,436 > [eva] tests/idct/ieee_1180_1990.c:85: > Reusing old results for call to IEEE_1180_1990_rand > [eva] tests/idct/ieee_1180_1990.c:85: @@ -26,25 +26,25 @@ diff tests/idct/oracle/ieee_1180_1990.res.oracle tests/idct/oracle_equalities/ie > Reusing old results for call to IEEE_1180_1990_rand > [eva] tests/idct/ieee_1180_1990.c:85: > Reusing old results for call to IEEE_1180_1990_rand -436a449,450 -> [eva] tests/idct/ieee_1180_1990.c:265: Warning: +437a450,451 +> [eva:signed-overflow] tests/idct/ieee_1180_1990.c:265: Warning: > 2's complement assumed for overflow -440a455,456 -> [eva] tests/idct/ieee_1180_1990.c:266: Warning: +441a456,457 +> [eva:signed-overflow] tests/idct/ieee_1180_1990.c:266: Warning: > 2's complement assumed for overflow -446,447d461 -< [eva] tests/idct/ieee_1180_1990.c:265: Warning: +447,448d462 +< [eva:signed-overflow] tests/idct/ieee_1180_1990.c:265: Warning: < 2's complement assumed for overflow -465a480,481 -> [eva] tests/idct/ieee_1180_1990.c:289: Warning: +466a481,482 +> [eva:signed-overflow] tests/idct/ieee_1180_1990.c:289: Warning: > 2's complement assumed for overflow -469a486,487 -> [eva] tests/idct/ieee_1180_1990.c:290: Warning: +470a487,488 +> [eva:signed-overflow] tests/idct/ieee_1180_1990.c:290: Warning: > 2's complement assumed for overflow -475,476d492 -< [eva] tests/idct/ieee_1180_1990.c:289: Warning: +476,477d493 +< [eva:signed-overflow] tests/idct/ieee_1180_1990.c:289: Warning: < 2's complement assumed for overflow -497a514,521 +498a515,522 > [eva] tests/idct/ieee_1180_1990.c:85: > Reusing old results for call to IEEE_1180_1990_rand > [eva] tests/idct/ieee_1180_1990.c:85: @@ -53,25 +53,25 @@ diff tests/idct/oracle/ieee_1180_1990.res.oracle tests/idct/oracle_equalities/ie > Reusing old results for call to IEEE_1180_1990_rand > [eva] tests/idct/ieee_1180_1990.c:85: > Reusing old results for call to IEEE_1180_1990_rand -510a535,536 -> [eva] tests/idct/ieee_1180_1990.c:311: Warning: +511a536,537 +> [eva:signed-overflow] tests/idct/ieee_1180_1990.c:311: Warning: > 2's complement assumed for overflow -514a541,542 -> [eva] tests/idct/ieee_1180_1990.c:312: Warning: +515a542,543 +> [eva:signed-overflow] tests/idct/ieee_1180_1990.c:312: Warning: > 2's complement assumed for overflow -520,521d547 -< [eva] tests/idct/ieee_1180_1990.c:311: Warning: +521,522d548 +< [eva:signed-overflow] tests/idct/ieee_1180_1990.c:311: Warning: < 2's complement assumed for overflow -539a566,567 -> [eva] tests/idct/ieee_1180_1990.c:335: Warning: +540a567,568 +> [eva:signed-overflow] tests/idct/ieee_1180_1990.c:335: Warning: > 2's complement assumed for overflow -543a572,573 -> [eva] tests/idct/ieee_1180_1990.c:336: Warning: +544a573,574 +> [eva:signed-overflow] tests/idct/ieee_1180_1990.c:336: Warning: > 2's complement assumed for overflow -549,550d578 -< [eva] tests/idct/ieee_1180_1990.c:335: Warning: +550,551d579 +< [eva:signed-overflow] tests/idct/ieee_1180_1990.c:335: Warning: < 2's complement assumed for overflow -570a599,606 +571a600,607 > [eva] tests/idct/ieee_1180_1990.c:85: > Reusing old results for call to IEEE_1180_1990_rand > [eva] tests/idct/ieee_1180_1990.c:85: @@ -80,7 +80,7 @@ diff tests/idct/oracle/ieee_1180_1990.res.oracle tests/idct/oracle_equalities/ie > Reusing old results for call to IEEE_1180_1990_rand > [eva] tests/idct/ieee_1180_1990.c:85: > Reusing old results for call to IEEE_1180_1990_rand -578a615,632 +579a616,633 > [eva] tests/idct/ieee_1180_1990.c:100: > Call to builtin Frama_C_sqrt for function sqrt > [eva] tests/idct/ieee_1180_1990.c:101: @@ -99,13 +99,13 @@ diff tests/idct/oracle/ieee_1180_1990.res.oracle tests/idct/oracle_equalities/ie > Call to builtin Frama_C_cos for function cos > [eva] tests/idct/ieee_1180_1990.c:100: > Call to builtin Frama_C_sqrt for function sqrt -580a635,636 +581a636,637 > [eva] tests/idct/ieee_1180_1990.c:100: > Call to builtin Frama_C_sqrt for function sqrt -582a639,640 +583a640,641 > [eva] tests/idct/ieee_1180_1990.c:100: > Call to builtin Frama_C_sqrt for function sqrt -604a663,676 +605a664,677 > [eva] tests/idct/ieee_1180_1990.c:140: > Call to builtin Frama_C_sqrt for function sqrt > [eva] tests/idct/ieee_1180_1990.c:141: @@ -120,10 +120,10 @@ diff tests/idct/oracle/ieee_1180_1990.res.oracle tests/idct/oracle_equalities/ie > Call to builtin Frama_C_cos for function cos > [eva] tests/idct/ieee_1180_1990.c:140: > Call to builtin Frama_C_sqrt for function sqrt -606a679,680 +607a680,681 > [eva] tests/idct/ieee_1180_1990.c:140: > Call to builtin Frama_C_sqrt for function sqrt -608a683,688 +609a684,689 > [eva] tests/idct/ieee_1180_1990.c:140: > Call to builtin Frama_C_sqrt for function sqrt > [eva] tests/idct/ieee_1180_1990.c:141: diff --git a/tests/idct/diff_gauges b/tests/idct/diff_gauges index 2e026cd69ba..e7ae4765f4b 100644 --- a/tests/idct/diff_gauges +++ b/tests/idct/diff_gauges @@ -1,7 +1,7 @@ diff tests/idct/oracle/ieee_1180_1990.res.oracle tests/idct/oracle_gauges/ieee_1180_1990.res.oracle -578a579,580 +579a580,581 > [eva] tests/idct/ieee_1180_1990.c:100: > Call to builtin Frama_C_sqrt for function sqrt -604a607,608 +605a608,609 > [eva] tests/idct/ieee_1180_1990.c:140: > Call to builtin Frama_C_sqrt for function sqrt diff --git a/tests/value/diff_apron b/tests/value/diff_apron index 4db64f563c4..7b830e4e3d3 100644 --- a/tests/value/diff_apron +++ b/tests/value/diff_apron @@ -330,15 +330,15 @@ diff tests/value/oracle/gauges.res.oracle tests/value/oracle_apron/gauges.res.or < Frama_C_show_each: {-593; -592; -591; -590; -589; -588}, [0..2147483647] --- > Frama_C_show_each: {-593; -592; -591; -590; -589; -588}, [0..598] -780c760 +798c778 < n ∈ [-2147483648..99] --- > n ∈ [-2147483547..99] -783c763 +801c781 < i ∈ [0..2147483647] --- > i ∈ [10..2147483647] -819c799 +837c817 < i ∈ [0..2147483647] --- > i ∈ [0..21] diff --git a/tests/value/diff_gauges b/tests/value/diff_gauges index 4bd4e2a505c..99a2a77d76e 100644 --- a/tests/value/diff_gauges +++ b/tests/value/diff_gauges @@ -143,45 +143,48 @@ diff tests/value/oracle/gauges.res.oracle tests/value/oracle_gauges/gauges.res.o < Frama_C_show_each: {-593; -592; -591; -590; -589; -588}, [0..2147483647] --- > Frama_C_show_each: {-593; -592; -591; -590; -589; -588}, [99..119] -415a370,373 +418a373,376 > # Gauges domain: > V: [{[ p -> {{ &x }} > i -> {1} ]}] > s395: λ(0) -472a431,434 +478a437,440 > # Gauges domain: > V: [{[ i -> {1} ]}] > s395: λ([0 .. 1]) > {[ i -> {1} ]} -528a491,494 +537a500,503 > # Gauges domain: > V: [{[ i -> {1} ]}] > s395: λ([0 .. 2]) > {[ i -> {1} ]} -584a551,554 +596a563,566 > # Gauges domain: > V: [{[ i -> {1} ]}] > s395: λ([0 .. 10]) > {[ i -> {1} ]} -646a617,621 +661a632,636 > # Gauges domain: > V: [{[ p -> {{ &a }} > i -> {2} ]}] > s409: λ(0) > s408: λ(0) -704a680,684 +722a698,702 > # Gauges domain: > V: [{[ i -> {2} ]}] > s409: λ(0) > s408: λ([0 .. 1]) > {[ i -> {0} ]} -706a687,808 +724a705,832 > [eva] tests/value/gauges.c:325: > Frama_C_dump_each: > # Cvalue domain: > __fc_heap_status ∈ [--..--] > __fc_random_counter ∈ [--..--] > __fc_rand_max ∈ {32767} +> __fc_random48_init ∈ {0} +> __fc_random48_counter[0..2] ∈ [--..--] +> __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} > __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} > [1] ∈ {{ NULL ; &S_1___fc_env[0] }} > [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -243,6 +246,9 @@ diff tests/value/oracle/gauges.res.oracle tests/value/oracle_gauges/gauges.res.o > __fc_heap_status ∈ [--..--] > __fc_random_counter ∈ [--..--] > __fc_rand_max ∈ {32767} +> __fc_random48_init ∈ {0} +> __fc_random48_counter[0..2] ∈ [--..--] +> __fc_p_random48_counter ∈ {{ &__fc_random48_counter[0] }} > __fc_env[0] ∈ {{ NULL ; &S_0___fc_env[0] }} > [1] ∈ {{ NULL ; &S_1___fc_env[0] }} > [2..4095] ∈ {{ NULL ; &S_0___fc_env[0] ; &S_1___fc_env[0] }} @@ -298,53 +304,53 @@ diff tests/value/oracle/gauges.res.oracle tests/value/oracle_gauges/gauges.res.o > s408: λ([0 .. +oo]) > {[ i -> {0} ]} > ==END OF DUMP== -714a817,818 +732a841,842 > [eva] tests/value/gauges.c:343: Call to builtin malloc > [eva] tests/value/gauges.c:343: Call to builtin malloc -767,768c871,872 +785,786c895,896 < A ∈ {{ &A + [0..--],0%4 }} < B ∈ {{ &B + [0..--],0%4 }} --- > A ∈ {{ &A + [0..36],0%4 }} > B ∈ {{ &B + [0..36],0%4 }} -786c890 +804c914 < i ∈ {45; 46; 47; 48; 49; 50; 51} --- > i ∈ {45; 46; 47; 48} -792c896 +810c920 < i ∈ {-59; -58; -57; -56; -55; -54; -53} --- > i ∈ {-58; -57; -56; -55; -54; -53} -812c916 +830c940 < p ∈ {{ &u + [0..--],0%4 }} --- > p ∈ {{ &u + [0..400],0%4 }} -814c918 +832c942 < k ∈ [0..2147483647] --- > k ∈ [0..390] -819c923 +837c947 < i ∈ [0..2147483647] --- > i ∈ [0..21] -830,831c934,936 +848,849c958,960 < [1..9] ∈ {4; 5; 6; 7; 8; 9} or UNINITIALIZED < p ∈ {{ &y + [4..40],0%4 }} --- > [1..6] ∈ {4; 5; 6; 7; 8; 9} or UNINITIALIZED > [7..9] ∈ UNINITIALIZED > p ∈ {{ &y[7] }} -842c947 +860c971 < p ∈ {{ &T + [--..396],0%4 }} --- > p ∈ {{ &T + [-4..396],0%4 }} -977,978c1082,1083 +995,996c1106,1107 < p FROM p; A; B; n; p; A[0..9]; B[0..9] (and SELF) < \result FROM p; A; B; n; p; A[0..9]; B[0..9] --- > p FROM p; A; B; n; p; A[0..8]; B[0..8] (and SELF) > \result FROM p; A; B; n; p; A[0..8]; B[0..8] -1056c1161 +1074c1185 < p; A[0..9]; B[0..9] --- > p; A[0..8]; B[0..8] @@ -460,6 +466,15 @@ diff tests/value/oracle/loop_wvar.1.res.oracle tests/value/oracle_gauges/loop_wv --- > j ∈ [0..17] > k ∈ [0..11] +diff tests/value/oracle/loopfun.1.res.oracle tests/value/oracle_gauges/loopfun.1.res.oracle +9a10,12 +> [eva] tests/value/loopfun.i:23: starting to merge loop iterations +> [eva:loop-unroll] tests/value/loopfun.i:25: loop not completely unrolled +> [eva] tests/value/loopfun.i:25: starting to merge loop iterations +11a15 +> [eva] tests/value/loopfun.i:26: starting to merge loop iterations +13a18 +> [eva] tests/value/loopfun.i:27: starting to merge loop iterations diff tests/value/oracle/memexec.res.oracle tests/value/oracle_gauges/memexec.res.oracle 99a100 > [eva] tests/value/memexec.c:98: starting to merge loop iterations -- GitLab From 497cfc010ba65572fcd28f1486d99d0cd6b5cc0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Wed, 3 Apr 2019 11:01:39 +0200 Subject: [PATCH 191/376] [Eva] Modifies the gauges test. --- tests/value/diff_gauges | 24 ++++++++++++------------ tests/value/gauges.c | 4 ++-- tests/value/oracle/gauges.res.oracle | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/value/diff_gauges b/tests/value/diff_gauges index 99a2a77d76e..dd12f253ce7 100644 --- a/tests/value/diff_gauges +++ b/tests/value/diff_gauges @@ -147,33 +147,33 @@ diff tests/value/oracle/gauges.res.oracle tests/value/oracle_gauges/gauges.res.o > # Gauges domain: > V: [{[ p -> {{ &x }} > i -> {1} ]}] -> s395: λ(0) +> s398: λ(0) 478a437,440 > # Gauges domain: > V: [{[ i -> {1} ]}] -> s395: λ([0 .. 1]) +> s398: λ([0 .. 1]) > {[ i -> {1} ]} 537a500,503 > # Gauges domain: > V: [{[ i -> {1} ]}] -> s395: λ([0 .. 2]) +> s398: λ([0 .. 2]) > {[ i -> {1} ]} 596a563,566 > # Gauges domain: > V: [{[ i -> {1} ]}] -> s395: λ([0 .. 10]) +> s398: λ([0 .. 10]) > {[ i -> {1} ]} 661a632,636 > # Gauges domain: > V: [{[ p -> {{ &a }} > i -> {2} ]}] -> s409: λ(0) -> s408: λ(0) +> s412: λ(0) +> s411: λ(0) 722a698,702 > # Gauges domain: > V: [{[ i -> {2} ]}] -> s409: λ(0) -> s408: λ([0 .. 1]) +> s412: λ(0) +> s411: λ([0 .. 1]) > {[ i -> {0} ]} 724a705,832 > [eva] tests/value/gauges.c:325: @@ -236,8 +236,8 @@ diff tests/value/oracle/gauges.res.oracle tests/value/oracle_gauges/gauges.res.o > S_1___fc_env[0..1] ∈ [--..--] > # Gauges domain: > V: [{[ i -> {2} ]}] -> s409: λ(0) -> s408: λ([0 .. 2]) +> s412: λ(0) +> s411: λ([0 .. 2]) > {[ i -> {0} ]} > ==END OF DUMP== > [eva] tests/value/gauges.c:325: @@ -300,8 +300,8 @@ diff tests/value/oracle/gauges.res.oracle tests/value/oracle_gauges/gauges.res.o > S_1___fc_env[0..1] ∈ [--..--] > # Gauges domain: > V: [{[ i -> {2} ]}] -> s409: λ(0) -> s408: λ([0 .. +oo]) +> s412: λ(0) +> s411: λ([0 .. +oo]) > {[ i -> {0} ]} > ==END OF DUMP== 732a841,842 diff --git a/tests/value/gauges.c b/tests/value/gauges.c index cd1619e90e5..ab2963f70b4 100644 --- a/tests/value/gauges.c +++ b/tests/value/gauges.c @@ -170,12 +170,12 @@ void main8_aux (unsigned int n) { int *p = arr; do { Frama_C_show_each(n); - *p++ = n; + *p++ = n; // Invalid access memory if more than 65536 iterations. } while (--n); } void main8() { - main8_aux(0); + if (v) main8_aux(0); // This call can legitimately lead to bottom. } void main9() { diff --git a/tests/value/oracle/gauges.res.oracle b/tests/value/oracle/gauges.res.oracle index 18dd8eea6bd..fa19ee9d0ef 100644 --- a/tests/value/oracle/gauges.res.oracle +++ b/tests/value/oracle/gauges.res.oracle @@ -1163,7 +1163,7 @@ [inout] Out (internal) for function main8: \nothing [inout] Inputs for function main8: - \nothing + v [inout] Out (internal) for function main9: x[0..9]; y[0..9]; p; q; z; i; r [inout] Inputs for function main9: -- GitLab From b31f2ad2b966642034ec17411250504857b728d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 2 Apr 2019 17:06:50 +0200 Subject: [PATCH 192/376] [Eva] Always reduces the gauges states from the valuation on assignments. This can notably reduce the possible number of iterations after a widening. --- .../value/domains/gauges/gauges_domain.ml | 48 ++++---- tests/value/diff_gauges | 115 +++++++++++++----- 2 files changed, 109 insertions(+), 54 deletions(-) diff --git a/src/plugins/value/domains/gauges/gauges_domain.ml b/src/plugins/value/domains/gauges/gauges_domain.ml index 11b85c2cbe7..e726348a907 100644 --- a/src/plugins/value/domains/gauges/gauges_domain.ml +++ b/src/plugins/value/domains/gauges/gauges_domain.ml @@ -1174,27 +1174,6 @@ module D_Impl : Abstract_domain.S_with_Structure and type valuation := Valuation.t = struct - let update _valuation st = st (* TODO? *) - - exception Unassignable - - let assign _kinstr lv e _assignment valuation (state:state) = - let to_loc lv = - match Valuation.find_loc valuation lv with - | `Value r -> Precise_locs.imprecise_location r.loc - | `Top -> raise Unassignable - in - let to_val e = - match Valuation.find valuation e with - | `Top -> raise Unassignable - | `Value v -> - match v.value.initialized, v.value.escaping, v.value.v with - | true, false, `Value v -> v - | _ -> raise Unassignable - in - try `Value (G.assign to_loc to_val lv.lval e state) - with Unassignable -> `Value (kill lv.lloc state) - let assume_exp valuation e r state = if r.reductness = Created || r.reductness = Reduced then match e.enode with @@ -1220,10 +1199,35 @@ module D_Impl : Abstract_domain.S_with_Structure let assume_exp_bot valuation e r state = state >>- assume_exp valuation e r - let assume _ _ _ valuation state = + let assume_valuation valuation state = let assume_one = assume_exp_bot valuation in Valuation.fold assume_one valuation (`Value state) + let update valuation state = + Bottom.non_bottom (assume_valuation valuation state) + + let assume _ _ _ = assume_valuation + + exception Unassignable + + let assign _kinstr lv e _assignment valuation (state:state) = + let state = update valuation state in + let to_loc lv = + match Valuation.find_loc valuation lv with + | `Value r -> Precise_locs.imprecise_location r.loc + | `Top -> raise Unassignable + in + let to_val e = + match Valuation.find valuation e with + | `Top -> raise Unassignable + | `Value v -> + match v.value.initialized, v.value.escaping, v.value.v with + | true, false, `Value v -> v + | _ -> raise Unassignable + in + try `Value (G.assign to_loc to_val lv.lval e state) + with Unassignable -> `Value (kill lv.lloc state) + let finalize_call _stmt _call ~pre ~post = let state = match function_calls_handling with diff --git a/tests/value/diff_gauges b/tests/value/diff_gauges index dd12f253ce7..26c5b6d4c45 100644 --- a/tests/value/diff_gauges +++ b/tests/value/diff_gauges @@ -96,86 +96,104 @@ diff tests/value/oracle/gauges.res.oracle tests/value/oracle_gauges/gauges.res.o < [eva:alarm] tests/value/gauges.c:158: Warning: < out of bounds write. assert \valid(tmp); < (tmp from p--) -255,258d230 +227,231c203,205 +< [eva] tests/value/gauges.c:172: Frama_C_show_each: [2147483646..4294967294] +< [eva] tests/value/gauges.c:172: Frama_C_show_each: [1..4294967294] +< [eva] tests/value/gauges.c:172: Frama_C_show_each: [1..4294967294] +< [eva] tests/value/gauges.c:172: Frama_C_show_each: [1..4294967294] +< [eva] tests/value/gauges.c:172: Frama_C_show_each: [1..4294967294] +--- +> [eva] tests/value/gauges.c:172: Frama_C_show_each: [2147483647..4294967294] +> [eva] tests/value/gauges.c:172: Frama_C_show_each: [2147483647..4294967294] +> [eva] tests/value/gauges.c:172: Frama_C_show_each: [2147483647..4294967294] +235c209,210 +< [eva] tests/value/gauges.c:172: Frama_C_show_each: [1..4294967294] +--- +> [eva] tests/value/gauges.c:172: Frama_C_show_each: [2147483647..4294967294] +> [eva] tests/value/gauges.c:172: Frama_C_show_each: [2147483647..4294967294] +255,258d229 < [eva:alarm] tests/value/gauges.c:192: Warning: < out of bounds write. assert \valid(p); < [eva:alarm] tests/value/gauges.c:193: Warning: < out of bounds write. assert \valid(q); -266,271d237 +266,271d236 < [eva:alarm] tests/value/gauges.c:202: Warning: < out of bounds read. assert \valid_read(tmp); < (tmp from A++) < [eva:alarm] tests/value/gauges.c:202: Warning: < out of bounds read. assert \valid_read(tmp_0); < (tmp_0 from B++) -315,318c281 +299,300d263 +< [eva:alarm] tests/value/gauges.c:220: Warning: +< signed overflow. assert -2147483648 ≤ n - 1; +315,318c278 < [eva:alarm] tests/value/gauges.c:240: Warning: < signed overflow. assert j + 1 ≤ 2147483647; < [eva] tests/value/gauges.c:242: < Frama_C_show_each: {45; 46; 47; 48; 49; 50; 51}, [0..2147483647] --- > [eva] tests/value/gauges.c:242: Frama_C_show_each: {47; 48}, {6} -324,325d286 +324,325d283 < [eva:alarm] tests/value/gauges.c:251: Warning: < signed overflow. assert j + 1 ≤ 2147483647; -327c288 +327c285 < Frama_C_show_each: {48; 49; 50; 51; 52; 53; 54}, [0..2147483647] --- > Frama_C_show_each: {48; 49; 50; 51; 52; 53; 54}, {6; 7} -333,336c294 +333,336c291 < [eva:alarm] tests/value/gauges.c:263: Warning: < signed overflow. assert j + 1 ≤ 2147483647; < [eva] tests/value/gauges.c:265: < Frama_C_show_each: {-59; -58; -57; -56; -55; -54; -53}, [0..2147483647] --- > [eva] tests/value/gauges.c:265: Frama_C_show_each: {-58; -57}, {9} -342,343d299 +342,343d296 < [eva:alarm] tests/value/gauges.c:274: Warning: < signed overflow. assert j + 1 ≤ 2147483647; -345c301 +345c298 < Frama_C_show_each: {-64; -63; -62; -61; -60; -59; -58}, [0..2147483647] --- > Frama_C_show_each: {-64; -63; -62; -61; -60; -59; -58}, {9; 10} -353,354d308 +353,354d305 < [eva:alarm] tests/value/gauges.c:293: Warning: < signed overflow. assert j + 1 ≤ 2147483647; -356c310 +356c307 < Frama_C_show_each: {-593; -592; -591; -590; -589; -588}, [0..2147483647] --- > Frama_C_show_each: {-593; -592; -591; -590; -589; -588}, [99..119] -418a373,376 +418a370,373 > # Gauges domain: > V: [{[ p -> {{ &x }} > i -> {1} ]}] > s398: λ(0) -478a437,440 +478a434,437 > # Gauges domain: > V: [{[ i -> {1} ]}] > s398: λ([0 .. 1]) > {[ i -> {1} ]} -537a500,503 +537a497,500 > # Gauges domain: > V: [{[ i -> {1} ]}] > s398: λ([0 .. 2]) > {[ i -> {1} ]} -596a563,566 +596a560,563 > # Gauges domain: > V: [{[ i -> {1} ]}] > s398: λ([0 .. 10]) > {[ i -> {1} ]} -661a632,636 +661a629,633 > # Gauges domain: > V: [{[ p -> {{ &a }} > i -> {2} ]}] > s412: λ(0) > s411: λ(0) -722a698,702 +722a695,699 > # Gauges domain: > V: [{[ i -> {2} ]}] > s412: λ(0) > s411: λ([0 .. 1]) > {[ i -> {0} ]} -724a705,832 +724a702,829 > [eva] tests/value/gauges.c:325: > Frama_C_dump_each: > # Cvalue domain: @@ -304,53 +322,71 @@ diff tests/value/oracle/gauges.res.oracle tests/value/oracle_gauges/gauges.res.o > s411: λ([0 .. +oo]) > {[ i -> {0} ]} > ==END OF DUMP== -732a841,842 +732a838,839 > [eva] tests/value/gauges.c:343: Call to builtin malloc > [eva] tests/value/gauges.c:343: Call to builtin malloc -785,786c895,896 +785,786c892,893 < A ∈ {{ &A + [0..--],0%4 }} < B ∈ {{ &B + [0..--],0%4 }} --- > A ∈ {{ &A + [0..36],0%4 }} > B ∈ {{ &B + [0..36],0%4 }} -804c914 +798c905 +< n ∈ [-2147483648..99] +--- +> n ∈ [-2147483547..99] +804c911 < i ∈ {45; 46; 47; 48; 49; 50; 51} --- > i ∈ {45; 46; 47; 48} -810c920 +810c917 < i ∈ {-59; -58; -57; -56; -55; -54; -53} --- > i ∈ {-58; -57; -56; -55; -54; -53} -830c940 +830c937 < p ∈ {{ &u + [0..--],0%4 }} --- > p ∈ {{ &u + [0..400],0%4 }} -832c942 +832c939 < k ∈ [0..2147483647] --- > k ∈ [0..390] -837c947 +837c944 < i ∈ [0..2147483647] --- > i ∈ [0..21] -848,849c958,960 +848,849c955,957 < [1..9] ∈ {4; 5; 6; 7; 8; 9} or UNINITIALIZED < p ∈ {{ &y + [4..40],0%4 }} --- > [1..6] ∈ {4; 5; 6; 7; 8; 9} or UNINITIALIZED > [7..9] ∈ UNINITIALIZED > p ∈ {{ &y[7] }} -860c971 +860c968 < p ∈ {{ &T + [--..396],0%4 }} --- > p ∈ {{ &T + [-4..396],0%4 }} -995,996c1106,1107 +865,869c973 +< n ∈ {0} +< arr[0] ∈ {0} +< [1] ∈ {-1} +< [2..65535] ∈ [--..--] or UNINITIALIZED +< p ∈ {{ &arr + [12..--],0%4 }} +--- +> NON TERMINATING FUNCTION +972a1077 +> [from] Non-terminating function main8_aux (no dependencies) +995,996c1100,1101 < p FROM p; A; B; n; p; A[0..9]; B[0..9] (and SELF) < \result FROM p; A; B; n; p; A[0..9]; B[0..9] --- > p FROM p; A; B; n; p; A[0..8]; B[0..8] (and SELF) > \result FROM p; A; B; n; p; A[0..8]; B[0..8] -1074c1185 +1040c1145 +< NO EFFECTS +--- +> NON TERMINATING - NO EFFECTS +1074c1179 < p; A[0..9]; B[0..9] --- > p; A[0..8]; B[0..8] @@ -864,6 +900,10 @@ diff tests/value/oracle/reevaluate_alarms.res.oracle tests/value/oracle_gauges/r < [eva:alarm] tests/value/reevaluate_alarms.i:14: Warning: < out of bounds write. assert \valid(tmp); < (tmp from p++) +59c56 +< p ∈ {{ &T + [0..--],0%4 }} +--- +> p ∈ {{ &T{[0], [1], [2], [3], [4], [5]} }} 124,125d120 < [ - ] Assertion 'Eva,mem_access' (file tests/value/reevaluate_alarms.i, line 14) < tried with Eva. @@ -905,16 +945,22 @@ diff tests/value/oracle/undefined_sequence.0.res.oracle tests/value/oracle_gauge 101a103 > [eva] tests/value/undefined_sequence.i:49: starting to merge loop iterations diff tests/value/oracle/unroll.res.oracle tests/value/oracle_gauges/unroll.res.oracle -16a17 +13,14d12 +< [eva:alarm] tests/value/unroll.i:34: Warning: +< signed overflow. assert -2147483648 ≤ j - 1; +16a15 > [eva] tests/value/unroll.i:39: starting to merge loop iterations -26c27 +26c25 < j ∈ [-2147483648..-123] --- > j ∈ {-238} diff tests/value/oracle/unroll_simple.res.oracle tests/value/oracle_gauges/unroll_simple.res.oracle -11a12 +8,9d7 +< [eva:alarm] tests/value/unroll_simple.i:11: Warning: +< signed overflow. assert -2147483648 ≤ j - 1; +11a10 > [eva] tests/value/unroll_simple.i:16: starting to merge loop iterations -21c22 +21c20 < j ∈ [-2147483648..-126] --- > j ∈ {-250} @@ -950,3 +996,8 @@ diff tests/value/oracle/widen_on_non_monotonic.res.oracle tests/value/oracle_gau 25a26,27 > [eva] tests/value/widen_on_non_monotonic.i:21: starting to merge loop iterations > [eva] tests/value/widen_on_non_monotonic.i:18: starting to merge loop iterations +diff tests/value/oracle/widen_overflow.res.oracle tests/value/oracle_gauges/widen_overflow.res.oracle +31a32,34 +> [eva] computing for function u <- main. +> Called from tests/value/widen_overflow.i:9. +> [eva] Done for function u -- GitLab From e5d3eee20903061765f86c4964d0473f0d17e914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Wed, 3 Apr 2019 13:39:59 +0200 Subject: [PATCH 193/376] [Eva] In abstract domains, update can return Bottom. --- src/plugins/value/domains/abstract_domain.mli | 2 +- src/plugins/value/domains/apron/apron_domain.ok.ml | 14 +++++--------- src/plugins/value/domains/cvalue/cvalue_domain.ml | 2 +- .../value/domains/cvalue/cvalue_transfer.ml | 12 +++++++----- src/plugins/value/domains/domain_builder.ml | 4 ++-- src/plugins/value/domains/domain_product.ml | 5 +++-- .../value/domains/equality/equality_domain.ml | 2 +- src/plugins/value/domains/gauges/gauges_domain.ml | 12 +++++------- src/plugins/value/domains/inout_domain.ml | 2 +- src/plugins/value/domains/offsm_domain.ml | 4 ++-- src/plugins/value/domains/simple_memory.ml | 9 +++++---- src/plugins/value/domains/symbolic_locs.ml | 8 ++++---- src/plugins/value/domains/unit_domain.ml | 2 +- src/plugins/value/engine/transfer_stmt.ml | 2 +- src/plugins/value/register.ml | 11 ++++++----- 15 files changed, 45 insertions(+), 46 deletions(-) diff --git a/src/plugins/value/domains/abstract_domain.mli b/src/plugins/value/domains/abstract_domain.mli index f2dc9ff30e5..b512325ade4 100644 --- a/src/plugins/value/domains/abstract_domain.mli +++ b/src/plugins/value/domains/abstract_domain.mli @@ -186,7 +186,7 @@ module type Transfer = sig (** [update valuation t] updates the state [t] by the values of expressions and the locations of lvalues stored in [valuation]. *) - val update : valuation -> state -> state + val update : valuation -> state -> state or_bottom (** [assign kinstr lv expr v valuation state] is the transfer function for the assignment [lv = expr] for [state]. It must return the state where the diff --git a/src/plugins/value/domains/apron/apron_domain.ok.ml b/src/plugins/value/domains/apron/apron_domain.ok.ml index 27aa29d81c1..e69f47ab862 100644 --- a/src/plugins/value/domains/apron/apron_domain.ok.ml +++ b/src/plugins/value/domains/apron/apron_domain.ok.ml @@ -451,11 +451,7 @@ module Make let array = Tcons1.array_make env (List.length constraints) in List.iteri (fun i c -> Tcons1.array_set array i c) constraints; let st = Abstract1.meet_tcons_array man state array in - if debug && Abstract1.is_bottom man st then - Value_parameters.result ~current:true ~once:true - "Bottom with state %a and constraints %a@." - Abstract1.print state (fun fmt a -> Tcons1.array_print fmt a) array; - st + if Abstract1.is_bottom man st then `Bottom else `Value st let _constraint_to_typ env state vars = let aux (var_apron, vi) = @@ -615,11 +611,11 @@ module Make in let constraints = Valuation.fold gather_constraints valuation [] in if constraints = [] - then state + then `Value state else meet_with_constraints env state constraints let assign _stmt lvalue expr _value valuation state = - let state = update valuation state in + update valuation state >>- fun state -> try let state = try @@ -642,7 +638,7 @@ module Make let assume _stmt exp bool valuation state = - let state = update valuation state in + update valuation state >>- fun state -> try let env = Abstract1.env state in let eval = make_eval state in @@ -656,7 +652,7 @@ module Make | Out_of_Scope _ -> `Value state let start_call _stmt call valuation state = - let state = update valuation state in + update valuation state >>- fun state -> let eval = make_eval state in let oracle = make_oracle valuation in let process_argument (vars, acc) arg = diff --git a/src/plugins/value/domains/cvalue/cvalue_domain.ml b/src/plugins/value/domains/cvalue/cvalue_domain.ml index 798c4ea72f7..995298130d6 100644 --- a/src/plugins/value/domains/cvalue/cvalue_domain.ml +++ b/src/plugins/value/domains/cvalue/cvalue_domain.ml @@ -227,7 +227,7 @@ module State = struct module T = Cvalue_transfer.Transfer (Valuation) - let update valuation (s, clob) = T.update valuation s, clob + let update valuation (s, clob) = T.update valuation s >>-: fun s -> s, clob let assign stmt lv expr assigned valuation (s, clob) = T.assign stmt lv expr assigned valuation s >>-: fun s -> diff --git a/src/plugins/value/domains/cvalue/cvalue_transfer.ml b/src/plugins/value/domains/cvalue/cvalue_transfer.ml index a53f6cf775e..1e9065ac7f3 100644 --- a/src/plugins/value/domains/cvalue/cvalue_transfer.ml +++ b/src/plugins/value/domains/cvalue/cvalue_transfer.ml @@ -90,11 +90,7 @@ module Transfer else t | _ -> t in - let s = Valuation.fold process valuation t in - s - - let assume _stmt _expr _positive valuation state = `Value (update valuation state) - + Valuation.fold process valuation t (* ---------------------------------------------------------------------- *) (* Assignments *) @@ -246,4 +242,10 @@ module Transfer let typ = Cil.typeOf expr in Eval_op.pretty_offsetmap typ fmt offsm | _ -> Format.fprintf fmt "%s" (Unicode.top_string ()) + + + (* ----------------- Export assumption functions -------------------------- *) + + let update valuation state = `Value (update valuation state) + let assume _stmt _expr _positive = update end diff --git a/src/plugins/value/domains/domain_builder.ml b/src/plugins/value/domains/domain_builder.ml index 108c1c4eada..b27b01329e1 100644 --- a/src/plugins/value/domains/domain_builder.ml +++ b/src/plugins/value/domains/domain_builder.ml @@ -79,7 +79,7 @@ module Make_Minimal and type loc = location) = struct - let update _valuation state = state + let update _valuation state = `Value state let assign kinstr lv expr _value _valuation state = Domain.assign kinstr lv.Eval.lval expr state @@ -227,7 +227,7 @@ module Complete_Simple_Cvalue (Domain: Simpler_domains.Simple_Cvalue) let record valuation = { find = find valuation; find_loc = find_loc valuation; } - let update _valuation state = state + let update _valuation state = `Value state let assign kinstr lv expr value valuation state = Domain.assign kinstr lv expr value (record valuation) state let assume stmt expr positive valuation state = diff --git a/src/plugins/value/domains/domain_product.ml b/src/plugins/value/domains/domain_product.ml index 35ada8461cc..fffc784d6c8 100644 --- a/src/plugins/value/domains/domain_product.ml +++ b/src/plugins/value/domains/domain_product.ml @@ -161,8 +161,9 @@ module Make module Right_Transfer = Right.Transfer (Right_Valuation) let update valuation (left, right) = - Left_Transfer.update valuation left, - Right_Transfer.update valuation right + Left_Transfer.update valuation left >>- fun left -> + Right_Transfer.update valuation right >>-: fun right -> + left, right let assign stmt lv expr value valuation (left, right) = Left_Transfer.assign stmt lv expr value valuation left >>- fun left -> diff --git a/src/plugins/value/domains/equality/equality_domain.ml b/src/plugins/value/domains/equality/equality_domain.ml index 69f1c355b3a..7ccb02c9721 100644 --- a/src/plugins/value/domains/equality/equality_domain.ml +++ b/src/plugins/value/domains/equality/equality_domain.ml @@ -338,7 +338,7 @@ module Make let deps = HCESet.fold (add_one_dep valuation) lvalues.read deps in HCESet.fold (add_one_dep valuation) lvalues.addr deps - let update _valuation state = state + let update _valuation state = `Value state let is_singleton = match get_cvalue with | None -> fun _ -> false diff --git a/src/plugins/value/domains/gauges/gauges_domain.ml b/src/plugins/value/domains/gauges/gauges_domain.ml index e726348a907..1af31275192 100644 --- a/src/plugins/value/domains/gauges/gauges_domain.ml +++ b/src/plugins/value/domains/gauges/gauges_domain.ml @@ -1199,19 +1199,16 @@ module D_Impl : Abstract_domain.S_with_Structure let assume_exp_bot valuation e r state = state >>- assume_exp valuation e r - let assume_valuation valuation state = + let update valuation state = let assume_one = assume_exp_bot valuation in Valuation.fold assume_one valuation (`Value state) - let update valuation state = - Bottom.non_bottom (assume_valuation valuation state) - - let assume _ _ _ = assume_valuation + let assume _ _ _ = update exception Unassignable let assign _kinstr lv e _assignment valuation (state:state) = - let state = update valuation state in + update valuation state >>- fun state -> let to_loc lv = match Valuation.find_loc valuation lv with | `Value r -> Precise_locs.imprecise_location r.loc @@ -1242,8 +1239,9 @@ module D_Impl : Abstract_domain.S_with_Structure match function_calls_handling with | FullInterprocedural -> update valuation state | IntraproceduralAll - | IntraproceduralNonReferenced -> G.empty + | IntraproceduralNonReferenced -> `Value G.empty in + state >>- fun state -> (* track [arg.formal] into [state]. Important for functions that receive a size as argument. *) let aux_arg state arg = diff --git a/src/plugins/value/domains/inout_domain.ml b/src/plugins/value/domains/inout_domain.ml index bd2e643f14d..12ba3cd1528 100644 --- a/src/plugins/value/domains/inout_domain.ml +++ b/src/plugins/value/domains/inout_domain.ml @@ -264,7 +264,7 @@ module Internal let finalize_call _stmt _call ~pre ~post = `Value (Transfer.catenate pre post) - let update _valuation state = state + let update _valuation state = `Value state let show_expr _valuation _state _fmt _expr = () end diff --git a/src/plugins/value/domains/offsm_domain.ml b/src/plugins/value/domains/offsm_domain.ml index c2653e2de79..9eb0b4ef308 100644 --- a/src/plugins/value/domains/offsm_domain.ml +++ b/src/plugins/value/domains/offsm_domain.ml @@ -129,7 +129,7 @@ module Internal : Domain_builder.InputDomain and type valuation := Valuation.t = struct - let update _valuation st = st (* TODO? *) + let update _valuation st = `Value st (* TODO? *) let kill loc state = Memory.add_binding ~exact:true state loc V_Or_Uninitialized.top @@ -171,7 +171,7 @@ module Internal : Domain_builder.InputDomain let finalize_call _stmt _call ~pre:_ ~post = `Value post - let start_call _stmt _call valuation state = `Value (update valuation state) + let start_call _stmt _call valuation state = update valuation state let show_expr _valuation _state _fmt _expr = () end diff --git a/src/plugins/value/domains/simple_memory.ml b/src/plugins/value/domains/simple_memory.ml index 4f27194587e..f312b589f11 100644 --- a/src/plugins/value/domains/simple_memory.ml +++ b/src/plugins/value/domains/simple_memory.ml @@ -247,25 +247,26 @@ module Make_Internal (Info: sig val name: string end) (Value: Value) = struct (* This function fills [state] according to the information available in [valuation]. This information is computed by Eva's engine for all the expressions involved in the current statement. *) - let update valuation state = + let assume_valuation valuation state = Valuation.fold (assume_exp valuation) valuation state (* Abstraction of an assignment. *) let assign _kinstr lv _expr value valuation state = (* Update the state with the information obtained from evaluating [lv] and [e] *) - let state = update valuation state in + let state = assume_valuation valuation state in (* Extract the abstract value *) let value = Eval.value_assigned value in (* Store the information [lv = e;] in the state *) let state = bind_loc lv.lloc lv.ltyp value state in `Value state + let update valuation state = `Value (assume_valuation valuation state) + (* Abstraction of a conditional. All information inferred by the engine is present in the valuation, and must be stored in the memory abstraction of the domain itself. *) - let assume _stmt _expr _pos valuation state = - `Value (update valuation state) + let assume _stmt _expr _pos = update let start_call _stmt call _valuation state = let bind_argument state argument = diff --git a/src/plugins/value/domains/symbolic_locs.ml b/src/plugins/value/domains/symbolic_locs.ml index 952cf517636..42db4cd7cb5 100644 --- a/src/plugins/value/domains/symbolic_locs.ml +++ b/src/plugins/value/domains/symbolic_locs.ml @@ -540,7 +540,7 @@ module Internal : Domain_builder.InputDomain state | _ -> state in - Valuation.fold aux valuation state + `Value (Valuation.fold aux valuation state) let store_value valuation lv loc state v = let loc = Precise_locs.imprecise_location loc in @@ -568,14 +568,14 @@ module Internal : Domain_builder.InputDomain (* perform [lv = e] in [state] *) let assign _kinstr lv _e v valuation state = - let state = update valuation state in + update valuation state >>- fun state -> match v with | Copy (_, vc) -> store_copy valuation lv lv.lloc state vc | Assign v -> store_value valuation lv.lval lv.lloc state v - let assume _stmt _exp _pos valuation state = `Value (update valuation state) + let assume _stmt _exp _pos valuation state = update valuation state - let start_call _stmt _call valuation state = `Value (update valuation state) + let start_call _stmt _call valuation state = update valuation state let finalize_call _stmt _call ~pre:_ ~post = `Value post diff --git a/src/plugins/value/domains/unit_domain.ml b/src/plugins/value/domains/unit_domain.ml index 62aba6028cf..4bb14526c7b 100644 --- a/src/plugins/value/domains/unit_domain.ml +++ b/src/plugins/value/domains/unit_domain.ml @@ -66,7 +66,7 @@ module Make and type loc = location) = struct - let update _ _ = () + let update _ _ = `Value () let assign _ _ _ _ _ _ = `Value () let assume _ _ _ _ _ = `Value () let start_call _ _ _ _ = `Value () diff --git a/src/plugins/value/engine/transfer_stmt.ml b/src/plugins/value/engine/transfer_stmt.ml index 2a2ac4ca72b..d3edae41ba2 100644 --- a/src/plugins/value/engine/transfer_stmt.ml +++ b/src/plugins/value/engine/transfer_stmt.ml @@ -412,7 +412,7 @@ module Make valuation >>- fun valuation -> Eva.assume ~valuation state argument.concrete post_value in - List.fold_left reduce_one_argument valuation reductions >>-: fun valuation -> + List.fold_left reduce_one_argument valuation reductions >>- fun valuation -> TF.update valuation state (* -------------------- Treat the results of a call ----------------------- *) diff --git a/src/plugins/value/register.ml b/src/plugins/value/register.ml index c3ec4215b3a..08b9174733a 100644 --- a/src/plugins/value/register.ml +++ b/src/plugins/value/register.ml @@ -191,6 +191,9 @@ let bot_state = function | `Bottom -> Cvalue.Model.bottom | `Value s -> s +let update valuation state = + bot_state (Transfer.update valuation state >>-: Cvalue_domain.project) + let rec eval_deps state e = match e.enode with | SizeOf _ | SizeOfE _ | SizeOfStr _ | AlignOf _ | AlignOfE _ | Const _ -> @@ -240,7 +243,7 @@ let eval_expr_with_valuation ?with_alarms deps state expr= match eval with | `Bottom -> (Cvalue.Model.bottom, deps, Cvalue.V.bottom), None | `Value (valuation, result) -> - let state = Cvalue_domain.project (Transfer.update valuation state) in + let state = update valuation state in (state, deps, result), Some valuation (* Compatibility layer between the old API of eval_exprs and the new evaluation @@ -274,8 +277,7 @@ module Eval = struct let eval, _alarms = Eva.reduce state expr positive in - bot_state (eval >>-: fun valuation -> - Cvalue_domain.project (Transfer.update valuation state)) + bot_state (eval >>-: fun valuation -> update valuation state) let lval_to_precise_loc_deps_state ?with_alarms ~deps state ~reduce_valid_index:(_:bool) lval = @@ -295,8 +297,7 @@ module Eval = struct notify_opt with_alarms alarms; match eval with | `Bottom -> Cvalue.Model.bottom, deps, Precise_locs.loc_bottom, (Cil.typeOfLval lval) - | `Value (valuation, loc, typ) -> - Cvalue_domain.project (Transfer.update valuation state), deps, loc, typ + | `Value (valuation, loc, typ) -> update valuation state, deps, loc, typ let lval_to_loc_deps_state ?with_alarms ~deps state ~reduce_valid_index lv = let state, deps, pl, typ = -- GitLab From e4bba7b66d9fb18e8cdafe36587e42ac5e6aefe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Wed, 3 Apr 2019 15:42:00 +0200 Subject: [PATCH 194/376] [tests] Slightly improves the refactoring of pdg tests. --- tests/pdg/calls_and_struct.c | 2 +- tests/pdg/const.i | 2 +- tests/pdg/globals.c | 6 +++--- tests/pdg/inter_alias.c | 2 +- tests/pdg/top_pdg_input.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/pdg/calls_and_struct.c b/tests/pdg/calls_and_struct.c index c1fcbdb79d3..c729527eb8e 100644 --- a/tests/pdg/calls_and_struct.c +++ b/tests/pdg/calls_and_struct.c @@ -1,6 +1,6 @@ /* run.config GCC: - OPT: -deps -input -out -inout -eva-show-progress -pdg -journal-disable -pdg-print -pdg-verbose 2 + STDOPT: +"-deps -input -out -inout -pdg" */ struct Tstr { int a; int b; int c; }; diff --git a/tests/pdg/const.i b/tests/pdg/const.i index 9b09ac698ac..10468a20036 100644 --- a/tests/pdg/const.i +++ b/tests/pdg/const.i @@ -1,5 +1,5 @@ /* run.config - STDOPT: #"-eva -pdg -out -input -deps -calldeps -eva-show-progress -pdg -pdg-print" + STDOPT: #"-eva -pdg -out -input -deps -calldeps -pdg" */ struct T1 { diff --git a/tests/pdg/globals.c b/tests/pdg/globals.c index da152f25a18..7f7311d87a3 100644 --- a/tests/pdg/globals.c +++ b/tests/pdg/globals.c @@ -1,8 +1,8 @@ /* run.config GCC: - STDOPT: #"-load-module pdg -eva -out -input -deps -main g -pdg-print -pdg-verbose 2" - STDOPT: #"-load-module pdg -eva -out -input -deps -main h -pdg-print -pdg-verbose 2" - STDOPT: #"-load-module pdg -eva -out -input -deps -main f -pdg-print -pdg-verbose 2" + STDOPT: #"-load-module pdg -eva -out -input -deps -main g" + STDOPT: #"-load-module pdg -eva -out -input -deps -main h" + STDOPT: #"-load-module pdg -eva -out -input -deps -main f" */ struct Tstr; extern int X; diff --git a/tests/pdg/inter_alias.c b/tests/pdg/inter_alias.c index 27905687fb9..28bfdad28e1 100644 --- a/tests/pdg/inter_alias.c +++ b/tests/pdg/inter_alias.c @@ -1,6 +1,6 @@ /* run.config GCC: - OPT: -eva -out -input -calldeps -eva-show-progress -pdg -journal-disable -pdg-print -pdg-verbose 2 + STDOPT: +"-eva -out -input -calldeps -pdg" */ int G; diff --git a/tests/pdg/top_pdg_input.c b/tests/pdg/top_pdg_input.c index 632bde8819a..7a0e2f57246 100644 --- a/tests/pdg/top_pdg_input.c +++ b/tests/pdg/top_pdg_input.c @@ -1,5 +1,5 @@ /* run.config - STDOPT: +"-eva -pdg -out -input -deps -no-results-function no_results -eva-no-builtins-auto -load-module pdg -pdg -journal-disable -pdg-print -pdg-verbose 2 -then -main main_asm" + STDOPT: +"-eva -pdg -out -input -deps -no-results-function no_results -eva-no-builtins-auto -load-module pdg -pdg -then -main main_asm" */ volatile int nondet; int no_results() {return 1;} -- GitLab From a2ca21f300c0603c574d0c70f7e713aa144db04d Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Wed, 3 Apr 2019 20:03:12 +0200 Subject: [PATCH 195/376] [tests] fix test extension --- tests/syntax/{libc_defs.h => libc_defs.c} | 0 tests/syntax/oracle/libc_defs.res.oracle | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename tests/syntax/{libc_defs.h => libc_defs.c} (100%) diff --git a/tests/syntax/libc_defs.h b/tests/syntax/libc_defs.c similarity index 100% rename from tests/syntax/libc_defs.h rename to tests/syntax/libc_defs.c diff --git a/tests/syntax/oracle/libc_defs.res.oracle b/tests/syntax/oracle/libc_defs.res.oracle index 0705f794ef5..22f21e2fa93 100644 --- a/tests/syntax/oracle/libc_defs.res.oracle +++ b/tests/syntax/oracle/libc_defs.res.oracle @@ -1,4 +1,4 @@ -[kernel] Parsing tests/syntax/libc_defs.h (with preprocessing) +[kernel] Parsing tests/syntax/libc_defs.c (with preprocessing) /* Generated by Frama-C */ #include "errno.c" #include "errno.h" -- GitLab From dc7fd4cfa5bec4a8dbd51483cd99ad2416d1c92d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 4 Apr 2019 10:11:18 +0200 Subject: [PATCH 196/376] [tests] Renames the macro VALUECONFIG into EVA_CONFIG. --- src/plugins/value/gen_test_config.sh | 4 ++-- tests/builtins/from_result.c | 2 +- tests/builtins/malloc-deps.i | 2 +- tests/builtins/malloc-size-zero.c | 4 ++-- tests/builtins/malloc.c | 2 +- tests/builtins/malloc_bug_tr.c | 2 +- tests/builtins/malloc_memexec.c | 2 +- tests/builtins/malloc_multiple.c | 2 +- tests/builtins/memcpy_invalid.c | 2 +- tests/builtins/test_config | 4 ++-- tests/builtins/test_config_apron | 4 ++-- tests/builtins/test_config_bitwise | 4 ++-- tests/builtins/test_config_equalities | 4 ++-- tests/builtins/test_config_gauges | 4 ++-- tests/builtins/test_config_symblocs | 4 ++-- tests/builtins/write-const.c | 2 +- tests/float/absorb.c | 2 +- tests/float/alarms.i | 6 +++--- tests/float/builtins.c | 2 +- tests/float/cond.c | 2 +- tests/float/const.i | 2 +- tests/float/extract_bits.i | 4 ++-- tests/float/init_float.i | 2 +- tests/float/nonlin.c | 8 ++++---- tests/float/precise_cos_sin.c | 2 +- tests/float/round10d.i | 2 +- tests/float/some.c | 4 ++-- tests/float/special_floats.i | 2 +- tests/libc/fc_libc.c | 2 +- tests/test_config | 4 ++-- tests/test_config_apron | 4 ++-- tests/test_config_bitwise | 4 ++-- tests/test_config_equalities | 4 ++-- tests/test_config_gauges | 4 ++-- tests/test_config_symblocs | 4 ++-- tests/value/align_char_array.c | 2 +- tests/value/array_initializer.i | 2 +- tests/value/array_zero_length.i | 6 +++--- tests/value/base_addr_offset_block_length.i | 2 +- tests/value/big_lib_entry.i | 2 +- tests/value/bitfield_longlong.c | 2 +- tests/value/bts1306.i | 2 +- tests/value/case_analysis.i | 2 +- tests/value/cond_integer_cast_of_float.i | 2 +- tests/value/const_typedef.i | 2 +- tests/value/constarraystructlibentry.i | 2 +- tests/value/context_free.i | 2 +- tests/value/dead_inout.i | 2 +- tests/value/div.i | 2 +- tests/value/fptr.i | 4 ++-- tests/value/from_call.i | 4 ++-- tests/value/ilevel.i | 2 +- tests/value/incorrect_reduce_expr.i | 2 +- tests/value/inout.i | 10 +++++----- tests/value/inout_formals.i | 2 +- tests/value/inout_proto.i | 2 +- tests/value/limits.c | 2 +- tests/value/logic_ptr_cast.i | 2 +- tests/value/loop_test.i | 4 ++-- tests/value/loop_wvar.i | 8 ++++---- tests/value/loopinv.c | 2 +- tests/value/machdep.c | 2 +- tests/value/nested_struct_init.i | 2 +- tests/value/origin.i | 4 ++-- tests/value/postcond_leaf.c | 2 +- tests/value/precond.c | 2 +- tests/value/precond2.c | 4 ++-- tests/value/protomain.i | 2 +- tests/value/recol.c | 4 ++-- tests/value/recursion.i | 4 ++-- tests/value/recursion2.i | 2 +- tests/value/redundant_alarms.c | 2 +- tests/value/replace_by_show_each.c | 2 +- tests/value/sign_of_bitfiled_int.c | 4 ++-- tests/value/simplify_cfg.i | 4 ++-- tests/value/ulongvslonglong.i | 4 ++-- tests/value/uninit_callstack.i | 2 +- tests/value/unknown_sizeof.i | 4 ++-- tests/value/use_spec.i | 4 ++-- tests/value/volatile2.i | 2 +- tests/value/widen_overflow.i | 2 +- 81 files changed, 123 insertions(+), 123 deletions(-) diff --git a/src/plugins/value/gen_test_config.sh b/src/plugins/value/gen_test_config.sh index 19d3397f175..b1085f08686 100755 --- a/src/plugins/value/gen_test_config.sh +++ b/src/plugins/value/gen_test_config.sh @@ -6,8 +6,8 @@ # accordingly. The syntax for the root test_config files is as follows # (2 lines): # -# MACRO: VALUECONFIG <options inherited in all tests> -# OPT: @VALUECONFIG@ <default options, inherited in tests that use STDOPT> +# MACRO: EVA_CONFIG <options inherited in all tests> +# OPT: @EVA_CONFIG@ <default options, inherited in tests that use STDOPT> # All tested domains declare -a domains=( diff --git a/tests/builtins/from_result.c b/tests/builtins/from_result.c index 4c8c5dc55a2..1076c7ca5bc 100644 --- a/tests/builtins/from_result.c +++ b/tests/builtins/from_result.c @@ -1,5 +1,5 @@ /* run.config* - OPT: @VALUECONFIG@ -eva-no-builtins-auto -deps -journal-disable + OPT: @EVA_CONFIG@ -eva-no-builtins-auto -deps -journal-disable */ #define malloc(n) Frama_C_malloc_fresh(n) #include "../../share/libc/stdlib.c" diff --git a/tests/builtins/malloc-deps.i b/tests/builtins/malloc-deps.i index bd7c49b8400..9c514cf7f03 100644 --- a/tests/builtins/malloc-deps.i +++ b/tests/builtins/malloc-deps.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -eva @VALUECONFIG@ -deps -calldeps -inout -slevel 5 -eva-msg-key malloc + OPT: -eva @EVA_CONFIG@ -deps -calldeps -inout -slevel 5 -eva-msg-key malloc */ //@ assigns \result \from \nothing; void *Frama_C_malloc_fresh(unsigned long n); diff --git a/tests/builtins/malloc-size-zero.c b/tests/builtins/malloc-size-zero.c index 4b6d9d25485..fdb0c68a789 100644 --- a/tests/builtins/malloc-size-zero.c +++ b/tests/builtins/malloc-size-zero.c @@ -1,6 +1,6 @@ /* run.config* - OPT: -eva @VALUECONFIG@ -eva-mlevel 3 - OPT: -eva @VALUECONFIG@ -eva-malloc-functions my_calloc + OPT: -eva @EVA_CONFIG@ -eva-mlevel 3 + OPT: -eva @EVA_CONFIG@ -eva-malloc-functions my_calloc */ #include <stdlib.h> diff --git a/tests/builtins/malloc.c b/tests/builtins/malloc.c index fd550da2c4e..eb00026fa89 100644 --- a/tests/builtins/malloc.c +++ b/tests/builtins/malloc.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -eva @VALUECONFIG@ -slevel 10 -eva-mlevel 0 + OPT: -eva @EVA_CONFIG@ -slevel 10 -eva-mlevel 0 */ void *Frama_C_malloc_by_stack(unsigned long i); diff --git a/tests/builtins/malloc_bug_tr.c b/tests/builtins/malloc_bug_tr.c index dd052d14484..98b3d323d6d 100644 --- a/tests/builtins/malloc_bug_tr.c +++ b/tests/builtins/malloc_bug_tr.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -eva @VALUECONFIG@ + OPT: -eva @EVA_CONFIG@ */ #include <stdlib.h> diff --git a/tests/builtins/malloc_memexec.c b/tests/builtins/malloc_memexec.c index 004e113f619..463f80de13f 100644 --- a/tests/builtins/malloc_memexec.c +++ b/tests/builtins/malloc_memexec.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -eva @VALUECONFIG@ -eva-memexec -deps -inout -eva-mlevel 0 + OPT: -eva @EVA_CONFIG@ -eva-memexec -deps -inout -eva-mlevel 0 */ //@ assigns \result; diff --git a/tests/builtins/malloc_multiple.c b/tests/builtins/malloc_multiple.c index 35e3141ad0c..6c807d486a2 100644 --- a/tests/builtins/malloc_multiple.c +++ b/tests/builtins/malloc_multiple.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -eva @VALUECONFIG@ -slevel 50 -eva-mlevel 5 + OPT: -eva @EVA_CONFIG@ -slevel 50 -eva-mlevel 5 */ #include<stdlib.h> #define MAX 10 diff --git a/tests/builtins/memcpy_invalid.c b/tests/builtins/memcpy_invalid.c index 60e26a8463b..cd0a7b35cf7 100644 --- a/tests/builtins/memcpy_invalid.c +++ b/tests/builtins/memcpy_invalid.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -eva @VALUECONFIG@ -journal-disable -calldeps + OPT: -eva @EVA_CONFIG@ -journal-disable -calldeps */ /*@ assigns \result \from min, max; diff --git a/tests/builtins/test_config b/tests/builtins/test_config index 08ed11b4566..0958b20e0f2 100644 --- a/tests/builtins/test_config +++ b/tests/builtins/test_config @@ -1,2 +1,2 @@ -MACRO: VALUECONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -OPT: -eva @VALUECONFIG@ -journal-disable -out -input -deps +MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null +OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/builtins/test_config_apron b/tests/builtins/test_config_apron index 376825b23c6..64f106d0bcf 100644 --- a/tests/builtins/test_config_apron +++ b/tests/builtins/test_config_apron @@ -1,2 +1,2 @@ -MACRO: VALUECONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-apron-oct -eva-msg-key experimental-ok -OPT: -eva @VALUECONFIG@ -journal-disable -out -input -deps +MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-apron-oct -eva-msg-key experimental-ok +OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/builtins/test_config_bitwise b/tests/builtins/test_config_bitwise index a7dce705fef..a084307a988 100644 --- a/tests/builtins/test_config_bitwise +++ b/tests/builtins/test_config_bitwise @@ -1,2 +1,2 @@ -MACRO: VALUECONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-bitwise-domain -OPT: -eva @VALUECONFIG@ -journal-disable -out -input -deps +MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-bitwise-domain +OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/builtins/test_config_equalities b/tests/builtins/test_config_equalities index bdbf2638f30..d10514a2cbe 100644 --- a/tests/builtins/test_config_equalities +++ b/tests/builtins/test_config_equalities @@ -1,2 +1,2 @@ -MACRO: VALUECONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-equality-domain -OPT: -eva @VALUECONFIG@ -journal-disable -out -input -deps +MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-equality-domain +OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/builtins/test_config_gauges b/tests/builtins/test_config_gauges index 49a71af4206..b233bc47b53 100644 --- a/tests/builtins/test_config_gauges +++ b/tests/builtins/test_config_gauges @@ -1,2 +1,2 @@ -MACRO: VALUECONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-gauges-domain -OPT: -eva @VALUECONFIG@ -journal-disable -out -input -deps +MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-gauges-domain +OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/builtins/test_config_symblocs b/tests/builtins/test_config_symblocs index 1e778cb9663..34daa69d9c5 100644 --- a/tests/builtins/test_config_symblocs +++ b/tests/builtins/test_config_symblocs @@ -1,2 +1,2 @@ -MACRO: VALUECONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-symbolic-locations-domain -OPT: -eva @VALUECONFIG@ -journal-disable -out -input -deps +MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-symbolic-locations-domain +OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/builtins/write-const.c b/tests/builtins/write-const.c index 1dc31cf43b1..89dfcdd91ae 100644 --- a/tests/builtins/write-const.c +++ b/tests/builtins/write-const.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -eva @VALUECONFIG@ -journal-disable -eva-builtins-auto -calldeps + OPT: -eva @EVA_CONFIG@ -journal-disable -eva-builtins-auto -calldeps */ // This test verifies that writing in a memory location that may be const diff --git a/tests/float/absorb.c b/tests/float/absorb.c index ca3e781a5f7..a71117b1674 100644 --- a/tests/float/absorb.c +++ b/tests/float/absorb.c @@ -1,7 +1,7 @@ /* run.config COMMENT: run.config is intentionally not-* EXECNOW: BIN absorb.sav LOG absorb_sav.res LOG absorb_sav.err FRAMAC_PLUGIN=tests/.empty @frama-c@ -journal-disable -save @PTEST_DIR@/result/absorb.sav @PTEST_FILE@ > @PTEST_DIR@/result/absorb_sav.res 2> @PTEST_DIR@/result/absorb_sav.err - EXECNOW: BIN absorb.sav2 LOG absorb_sav2.res LOG absorb_sav2.err @frama-c@ -load @PTEST_DIR@/result/absorb.sav -eva @VALUECONFIG@ -journal-disable -float-hex -save @PTEST_DIR@/result/absorb.sav2 > @PTEST_DIR@/result/absorb_sav2.res 2> @PTEST_DIR@/result/absorb_sav2.err + EXECNOW: BIN absorb.sav2 LOG absorb_sav2.res LOG absorb_sav2.err @frama-c@ -load @PTEST_DIR@/result/absorb.sav -eva @EVA_CONFIG@ -journal-disable -float-hex -save @PTEST_DIR@/result/absorb.sav2 > @PTEST_DIR@/result/absorb_sav2.res 2> @PTEST_DIR@/result/absorb_sav2.err OPT: -load @PTEST_DIR@/result/absorb.sav2 -deps -out -input */ /* run.config* diff --git a/tests/float/alarms.i b/tests/float/alarms.i index 4ab597abb76..8d60a075054 100644 --- a/tests/float/alarms.i +++ b/tests/float/alarms.i @@ -1,7 +1,7 @@ /* run.config* - OPT: -eva @VALUECONFIG@ -warn-special-float non-finite - OPT: -eva @VALUECONFIG@ -warn-special-float nan - OPT: -eva @VALUECONFIG@ -warn-special-float none + OPT: -eva @EVA_CONFIG@ -warn-special-float non-finite + OPT: -eva @EVA_CONFIG@ -warn-special-float nan + OPT: -eva @EVA_CONFIG@ -warn-special-float none */ union { long long l ; float f ; double d ; } u1, u2; diff --git a/tests/float/builtins.c b/tests/float/builtins.c index cd0301afa3e..1b2d53069a3 100644 --- a/tests/float/builtins.c +++ b/tests/float/builtins.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -eva @VALUECONFIG@ -then -main main_log_exp + OPT: -eva @EVA_CONFIG@ -then -main main_log_exp */ #include <__fc_builtin.h> diff --git a/tests/float/cond.c b/tests/float/cond.c index 10ff9866c04..89cc751c137 100644 --- a/tests/float/cond.c +++ b/tests/float/cond.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -eva @VALUECONFIG@ -journal-disable -float-hex + OPT: -eva @EVA_CONFIG@ -journal-disable -float-hex */ #include "__fc_builtin.h" diff --git a/tests/float/const.i b/tests/float/const.i index 24140b0286f..9e47e611f88 100644 --- a/tests/float/const.i +++ b/tests/float/const.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -eva @VALUECONFIG@ -float-hex -warn-decimal-float all -journal-disable -then -out -deps + OPT: -eva @EVA_CONFIG@ -float-hex -warn-decimal-float all -journal-disable -then -out -deps */ typedef double mydouble; diff --git a/tests/float/extract_bits.i b/tests/float/extract_bits.i index 1bbd4aa10ec..2f1c3b541cf 100644 --- a/tests/float/extract_bits.i +++ b/tests/float/extract_bits.i @@ -1,6 +1,6 @@ /* run.config* - OPT: -eva @VALUECONFIG@ -slevel 10 -big-ints-hex 0 -machdep ppc_32 -float-normal -warn-decimal-float all - OPT: -eva @VALUECONFIG@ -slevel 10 -big-ints-hex 0 -machdep x86_32 -float-normal -warn-decimal-float all + OPT: -eva @EVA_CONFIG@ -slevel 10 -big-ints-hex 0 -machdep ppc_32 -float-normal -warn-decimal-float all + OPT: -eva @EVA_CONFIG@ -slevel 10 -big-ints-hex 0 -machdep x86_32 -float-normal -warn-decimal-float all */ float f = 3.14; diff --git a/tests/float/init_float.i b/tests/float/init_float.i index 9812272d6da..83d69d1336e 100644 --- a/tests/float/init_float.i +++ b/tests/float/init_float.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -eva @VALUECONFIG@ -journal-disable -float-normal -lib-entry + OPT: -eva @EVA_CONFIG@ -journal-disable -float-normal -lib-entry */ typedef struct S { float y; } S; diff --git a/tests/float/nonlin.c b/tests/float/nonlin.c index 47d55d67984..fce3e9bc0c7 100644 --- a/tests/float/nonlin.c +++ b/tests/float/nonlin.c @@ -1,8 +1,8 @@ /* run.config* - OPT: -eva-msg-key nonlin -slevel 30 -eva @VALUECONFIG@ -cpp-extra-args="-DFLOAT=double" -float-hex -journal-disable -eva-subdivide-non-linear 0 - OPT: -eva-msg-key nonlin -slevel 30 -eva @VALUECONFIG@ -cpp-extra-args="-DFLOAT=double" -float-hex -journal-disable -eva-subdivide-non-linear 10 - OPT: -eva-msg-key nonlin -slevel 30 -eva @VALUECONFIG@ -cpp-extra-args="-DFLOAT=float" -float-hex -journal-disable -eva-subdivide-non-linear 0 - OPT: -eva-msg-key nonlin -slevel 30 -eva @VALUECONFIG@ -cpp-extra-args="-DFLOAT=float" -float-hex -journal-disable -eva-subdivide-non-linear 10 + OPT: -eva-msg-key nonlin -slevel 30 -eva @EVA_CONFIG@ -cpp-extra-args="-DFLOAT=double" -float-hex -journal-disable -eva-subdivide-non-linear 0 + OPT: -eva-msg-key nonlin -slevel 30 -eva @EVA_CONFIG@ -cpp-extra-args="-DFLOAT=double" -float-hex -journal-disable -eva-subdivide-non-linear 10 + OPT: -eva-msg-key nonlin -slevel 30 -eva @EVA_CONFIG@ -cpp-extra-args="-DFLOAT=float" -float-hex -journal-disable -eva-subdivide-non-linear 0 + OPT: -eva-msg-key nonlin -slevel 30 -eva @EVA_CONFIG@ -cpp-extra-args="-DFLOAT=float" -float-hex -journal-disable -eva-subdivide-non-linear 10 */ #include "__fc_builtin.h" diff --git a/tests/float/precise_cos_sin.c b/tests/float/precise_cos_sin.c index d7f40d0632f..19fde982cfb 100644 --- a/tests/float/precise_cos_sin.c +++ b/tests/float/precise_cos_sin.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -eva @VALUECONFIG@ -slevel 1000 -journal-disable -float-normal + OPT: -eva @EVA_CONFIG@ -slevel 1000 -journal-disable -float-normal */ #include <__fc_builtin.h> diff --git a/tests/float/round10d.i b/tests/float/round10d.i index b167a89914e..a11f0172aff 100644 --- a/tests/float/round10d.i +++ b/tests/float/round10d.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -eva @VALUECONFIG@ -float-normal -journal-disable -no-results + OPT: -eva @EVA_CONFIG@ -float-normal -journal-disable -no-results */ int main() diff --git a/tests/float/some.c b/tests/float/some.c index e8b66bfbd66..d7713ce8d71 100644 --- a/tests/float/some.c +++ b/tests/float/some.c @@ -1,6 +1,6 @@ /* run.config* - OPT: -eva-show-slevel 10 -slevel 100 -eva @VALUECONFIG@ -cpp-extra-args="-DFLOAT=double -DN=55" -float-normal -journal-disable -no-results - OPT: -slevel 100 -eva @VALUECONFIG@ -cpp-extra-args="-DFLOAT=float -DN=26" -float-normal -journal-disable -no-results + OPT: -eva-show-slevel 10 -slevel 100 -eva @EVA_CONFIG@ -cpp-extra-args="-DFLOAT=double -DN=55" -float-normal -journal-disable -no-results + OPT: -slevel 100 -eva @EVA_CONFIG@ -cpp-extra-args="-DFLOAT=float -DN=26" -float-normal -journal-disable -no-results */ FLOAT t[N] = { 1. } ; diff --git a/tests/float/special_floats.i b/tests/float/special_floats.i index ae1b880cdcd..191afecec7d 100644 --- a/tests/float/special_floats.i +++ b/tests/float/special_floats.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -eva @VALUECONFIG@ -warn-special-float none + OPT: -eva @EVA_CONFIG@ -warn-special-float none */ /* Tests on special float values NaN and infinites. */ diff --git a/tests/libc/fc_libc.c b/tests/libc/fc_libc.c index 7f27becef31..7f19d6c406a 100644 --- a/tests/libc/fc_libc.c +++ b/tests/libc/fc_libc.c @@ -2,7 +2,7 @@ EXECNOW: make -s @PTEST_DIR@/check_libc_naming_conventions.cmxs EXECNOW: make -s @PTEST_DIR@/check_const.cmxs EXECNOW: make -s @PTEST_DIR@/check_parsing_individual_headers.cmxs - OPT: -load-module @PTEST_DIR@/check_libc_naming_conventions -print -cpp-extra-args='-nostdinc -Ishare/libc' -metrics -metrics-libc -load-module @PTEST_DIR@/check_const -load-module metrics -eva @VALUECONFIG@ -then -lib-entry -no-print -metrics-no-libc + OPT: -load-module @PTEST_DIR@/check_libc_naming_conventions -print -cpp-extra-args='-nostdinc -Ishare/libc' -metrics -metrics-libc -load-module @PTEST_DIR@/check_const -load-module metrics -eva @EVA_CONFIG@ -then -lib-entry -no-print -metrics-no-libc OPT: -print -print-libc OPT: -load-module @PTEST_DIR@/check_parsing_individual_headers CMD: ./tests/libc/check_full_libc.sh diff --git a/tests/test_config b/tests/test_config index 2bc92fd4aea..00505a1606c 100644 --- a/tests/test_config +++ b/tests/test_config @@ -1,2 +1,2 @@ -MACRO: VALUECONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -OPT: -eva @VALUECONFIG@ -journal-disable -out -input -deps +MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic +OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/test_config_apron b/tests/test_config_apron index 322d4a9bc6a..dd60e0fbb23 100644 --- a/tests/test_config_apron +++ b/tests/test_config_apron @@ -1,2 +1,2 @@ -MACRO: VALUECONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-apron-oct -eva-msg-key experimental-ok -OPT: -eva @VALUECONFIG@ -journal-disable -out -input -deps +MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-apron-oct -eva-msg-key experimental-ok +OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/test_config_bitwise b/tests/test_config_bitwise index 8440d81deff..eee41b0bedc 100644 --- a/tests/test_config_bitwise +++ b/tests/test_config_bitwise @@ -1,2 +1,2 @@ -MACRO: VALUECONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-bitwise-domain -OPT: -eva @VALUECONFIG@ -journal-disable -out -input -deps +MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-bitwise-domain +OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/test_config_equalities b/tests/test_config_equalities index 18f6799ed4b..962b39797e8 100644 --- a/tests/test_config_equalities +++ b/tests/test_config_equalities @@ -1,2 +1,2 @@ -MACRO: VALUECONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-equality-domain -OPT: -eva @VALUECONFIG@ -journal-disable -out -input -deps +MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-equality-domain +OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/test_config_gauges b/tests/test_config_gauges index 1840804ec6c..3883074d978 100644 --- a/tests/test_config_gauges +++ b/tests/test_config_gauges @@ -1,2 +1,2 @@ -MACRO: VALUECONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-gauges-domain -OPT: -eva @VALUECONFIG@ -journal-disable -out -input -deps +MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-gauges-domain +OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/test_config_symblocs b/tests/test_config_symblocs index 197dd499d60..34c1fc35dbc 100644 --- a/tests/test_config_symblocs +++ b/tests/test_config_symblocs @@ -1,2 +1,2 @@ -MACRO: VALUECONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-symbolic-locations-domain -OPT: -eva @VALUECONFIG@ -journal-disable -out -input -deps +MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-symbolic-locations-domain +OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/value/align_char_array.c b/tests/value/align_char_array.c index 47c94d0dff2..de692f2f709 100644 --- a/tests/value/align_char_array.c +++ b/tests/value/align_char_array.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module inout,eva -eva @VALUECONFIG@ -cpp-extra-args="-DPTEST" -journal-disable + OPT: -no-autoload-plugins -load-module inout,eva -eva @EVA_CONFIG@ -cpp-extra-args="-DPTEST" -journal-disable */ diff --git a/tests/value/array_initializer.i b/tests/value/array_initializer.i index 37bce1c2594..04029accd9c 100644 --- a/tests/value/array_initializer.i +++ b/tests/value/array_initializer.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module inout,eva -eva @VALUECONFIG@ -then -eva-initialization-padding-globals maybe + OPT: -no-autoload-plugins -load-module inout,eva -eva @EVA_CONFIG@ -then -eva-initialization-padding-globals maybe */ int t[5] = { [2] = 3 }; diff --git a/tests/value/array_zero_length.i b/tests/value/array_zero_length.i index 68f536ad587..f84a4ebf84a 100644 --- a/tests/value/array_zero_length.i +++ b/tests/value/array_zero_length.i @@ -1,7 +1,7 @@ /* run.config* - OPT: -no-autoload-plugins -load-module inout,eva -eva @VALUECONFIG@ -journal-disable -machdep gcc_x86_32 - OPT: -no-autoload-plugins -load-module inout,eva -eva @VALUECONFIG@ -lib-entry -journal-disable -machdep gcc_x86_32 - OPT: -no-autoload-plugins -load-module inout,eva -eva @VALUECONFIG@ -lib-entry -journal-disable + OPT: -no-autoload-plugins -load-module inout,eva -eva @EVA_CONFIG@ -journal-disable -machdep gcc_x86_32 + OPT: -no-autoload-plugins -load-module inout,eva -eva @EVA_CONFIG@ -lib-entry -journal-disable -machdep gcc_x86_32 + OPT: -no-autoload-plugins -load-module inout,eva -eva @EVA_CONFIG@ -lib-entry -journal-disable */ char T[]; diff --git a/tests/value/base_addr_offset_block_length.i b/tests/value/base_addr_offset_block_length.i index 6242687662d..4a20889d500 100644 --- a/tests/value/base_addr_offset_block_length.i +++ b/tests/value/base_addr_offset_block_length.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module inout,eva -eva @VALUECONFIG@ -context-width 3 -then -slevel 3 + OPT: -no-autoload-plugins -load-module inout,eva -eva @EVA_CONFIG@ -context-width 3 -then -slevel 3 */ diff --git a/tests/value/big_lib_entry.i b/tests/value/big_lib_entry.i index c8f5b717e3d..88a7fbc821a 100644 --- a/tests/value/big_lib_entry.i +++ b/tests/value/big_lib_entry.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module inout,eva -eva @VALUECONFIG@ -lib-entry -context-width 4 -eva-initialization-padding-globals no + OPT: -no-autoload-plugins -load-module inout,eva -eva @EVA_CONFIG@ -lib-entry -context-width 4 -eva-initialization-padding-globals no */ typedef struct { diff --git a/tests/value/bitfield_longlong.c b/tests/value/bitfield_longlong.c index f2736abcc60..c2bdb9d6234 100644 --- a/tests/value/bitfield_longlong.c +++ b/tests/value/bitfield_longlong.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module inout,eva -eva @VALUECONFIG@ -cpp-extra-args="-Dprintf=Frama_C_show_each" -journal-disable + OPT: -no-autoload-plugins -load-module inout,eva -eva @EVA_CONFIG@ -cpp-extra-args="-Dprintf=Frama_C_show_each" -journal-disable */ struct X50 { long long int z:50; diff --git a/tests/value/bts1306.i b/tests/value/bts1306.i index 9510829da63..f6b51b85784 100644 --- a/tests/value/bts1306.i +++ b/tests/value/bts1306.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module from,inout,eva -constfold -slevel 0 -eva @VALUECONFIG@ -print -then -slevel 10 -eva -print + OPT: -no-autoload-plugins -load-module from,inout,eva -constfold -slevel 0 -eva @EVA_CONFIG@ -print -then -slevel 10 -eva -print */ void g(double x) { double y= x*x; } diff --git a/tests/value/case_analysis.i b/tests/value/case_analysis.i index ec27af6dac1..7d9214dd079 100644 --- a/tests/value/case_analysis.i +++ b/tests/value/case_analysis.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module inout,eva -eva @VALUECONFIG@ -slevel 30 -journal-disable -float-normal + OPT: -no-autoload-plugins -load-module inout,eva -eva @EVA_CONFIG@ -slevel 30 -journal-disable -float-normal */ diff --git a/tests/value/cond_integer_cast_of_float.i b/tests/value/cond_integer_cast_of_float.i index 3d7605a20e5..3a6d8768ec9 100644 --- a/tests/value/cond_integer_cast_of_float.i +++ b/tests/value/cond_integer_cast_of_float.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module eva -eva @VALUECONFIG@ -no-results -then -float-hex -main mainbis + OPT: -no-autoload-plugins -load-module eva -eva @EVA_CONFIG@ -no-results -then -float-hex -main mainbis */ typedef double D; typedef float F; diff --git a/tests/value/const_typedef.i b/tests/value/const_typedef.i index 5bbbe2b4ac6..d9f7f3677ca 100644 --- a/tests/value/const_typedef.i +++ b/tests/value/const_typedef.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module inout,eva -print -then -eva @VALUECONFIG@ -lib-entry -no-print + OPT: -no-autoload-plugins -load-module inout,eva -print -then -eva @EVA_CONFIG@ -lib-entry -no-print */ typedef int INT[3][3]; diff --git a/tests/value/constarraystructlibentry.i b/tests/value/constarraystructlibentry.i index 60b87c71f9c..96049bcde85 100644 --- a/tests/value/constarraystructlibentry.i +++ b/tests/value/constarraystructlibentry.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module inout,eva -eva @VALUECONFIG@ -lib-entry -eva-initialization-padding-globals yes -then -eva-initialization-padding-globals no + OPT: -no-autoload-plugins -load-module inout,eva -eva @EVA_CONFIG@ -lib-entry -eva-initialization-padding-globals yes -then -eva-initialization-padding-globals no */ const int t[] = { 1, 2, 3, 4, 5 } ; diff --git a/tests/value/context_free.i b/tests/value/context_free.i index 67ecd1b2ea5..19c6fe292ad 100644 --- a/tests/value/context_free.i +++ b/tests/value/context_free.i @@ -1,6 +1,6 @@ /* run.config* GCC: - OPT: -no-autoload-plugins -load-module inout,eva -eva @VALUECONFIG@ -lib-entry -main f -absolute-valid-range 0x200-0x199 -eva-msg-key initial-state -journal-disable + OPT: -no-autoload-plugins -load-module inout,eva -eva @EVA_CONFIG@ -lib-entry -main f -absolute-valid-range 0x200-0x199 -eva-msg-key initial-state -journal-disable */ diff --git a/tests/value/dead_inout.i b/tests/value/dead_inout.i index 27070fc23e5..8cf0b0271e6 100644 --- a/tests/value/dead_inout.i +++ b/tests/value/dead_inout.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module from,inout @VALUECONFIG@ -out -input -inout -inout -main main_all + OPT: -no-autoload-plugins -load-module from,inout @EVA_CONFIG@ -out -input -inout -inout -main main_all */ // This tests a potential imprecision with the computation of input and outputs if one forgets to test that a statement is dead diff --git a/tests/value/div.i b/tests/value/div.i index c19d8f8bfe5..dcea8cf46d4 100644 --- a/tests/value/div.i +++ b/tests/value/div.i @@ -1,6 +1,6 @@ /* run.config* STDOPT: #"-load-module scope -remove-redundant-alarms" - OPT: -no-autoload-plugins -load-module eva,inout -rte -then -eva @VALUECONFIG@ + OPT: -no-autoload-plugins -load-module eva,inout -rte -then -eva @EVA_CONFIG@ */ int X,Y,Z1,Z2,T,U1,U2,V,W1,W2; int a,b,d1,d2,d0,e; diff --git a/tests/value/fptr.i b/tests/value/fptr.i index f9d1014262b..88daeab0630 100644 --- a/tests/value/fptr.i +++ b/tests/value/fptr.i @@ -1,7 +1,7 @@ /* run.config* GCC: - OPT: -no-autoload-plugins -load-module from,inout,eva -eva @VALUECONFIG@ -journal-disable -then -deps -out - OPT: -no-autoload-plugins -load-module from,inout,eva -eva @VALUECONFIG@ -main main_uninit -journal-disable -then -deps -out + OPT: -no-autoload-plugins -load-module from,inout,eva -eva @EVA_CONFIG@ -journal-disable -then -deps -out + OPT: -no-autoload-plugins -load-module from,inout,eva -eva @EVA_CONFIG@ -main main_uninit -journal-disable -then -deps -out */ int R=77; volatile int v; int n; diff --git a/tests/value/from_call.i b/tests/value/from_call.i index 54942abc200..c510dd87608 100644 --- a/tests/value/from_call.i +++ b/tests/value/from_call.i @@ -1,6 +1,6 @@ /* run.config* - OPT: -no-autoload-plugins -load-module from,inout,users,eva -calldeps -eva @VALUECONFIG@ -journal-disable -users -then -input - OPT: -no-autoload-plugins -load-module from,eva @VALUECONFIG@ -deps -show-indirect-deps -journal-disable + OPT: -no-autoload-plugins -load-module from,inout,users,eva -calldeps -eva @EVA_CONFIG@ -journal-disable -users -then -input + OPT: -no-autoload-plugins -load-module from,eva @EVA_CONFIG@ -deps -show-indirect-deps -journal-disable */ int a,b,c,d; int x,y,z,t; diff --git a/tests/value/ilevel.i b/tests/value/ilevel.i index 9baf2a45b5a..9cb65bf8796 100644 --- a/tests/value/ilevel.i +++ b/tests/value/ilevel.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module inout,slicing,sparecode,eva -eva @VALUECONFIG@ -slice-return main -then-on "Slicing export" -eva -eva-ilevel 16 -eva-show-progress -then-on "default" -eva-ilevel 17 -then -eva-ilevel 48 + OPT: -no-autoload-plugins -load-module inout,slicing,sparecode,eva -eva @EVA_CONFIG@ -slice-return main -then-on "Slicing export" -eva -eva-ilevel 16 -eva-show-progress -then-on "default" -eva-ilevel 17 -then -eva-ilevel 48 */ // Test in particular that ilevel is by-project, even though it is an ocaml ref volatile int v; diff --git a/tests/value/incorrect_reduce_expr.i b/tests/value/incorrect_reduce_expr.i index d82d4c70d9c..0c7f22f6219 100644 --- a/tests/value/incorrect_reduce_expr.i +++ b/tests/value/incorrect_reduce_expr.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module inout,eva -eva @VALUECONFIG@ -absolute-valid-range 32-36 + OPT: -no-autoload-plugins -load-module inout,eva -eva @EVA_CONFIG@ -absolute-valid-range 32-36 */ char t[5]; diff --git a/tests/value/inout.i b/tests/value/inout.i index 886eb013822..2e00e3273ac 100644 --- a/tests/value/inout.i +++ b/tests/value/inout.i @@ -1,10 +1,10 @@ /* run.config* GCC: - OPT: -no-autoload-plugins -load-module from,inout @VALUECONFIG@ -inout -deps -main inout_11_0 -journal-disable - OPT: -no-autoload-plugins -load-module from,inout @VALUECONFIG@ -inout -deps -main inout_11_3 -journal-disable - OPT: -no-autoload-plugins -load-module from,inout @VALUECONFIG@ -inout -deps -main never_terminate -journal-disable - OPT: -no-autoload-plugins -load-module from,inout @VALUECONFIG@ -inout -deps -main may_not_terminate -journal-disable - OPT: -no-autoload-plugins -load-module from,inout @VALUECONFIG@ -inout -deps -main call_may_not_terminate -journal-disable + OPT: -no-autoload-plugins -load-module from,inout @EVA_CONFIG@ -inout -deps -main inout_11_0 -journal-disable + OPT: -no-autoload-plugins -load-module from,inout @EVA_CONFIG@ -inout -deps -main inout_11_3 -journal-disable + OPT: -no-autoload-plugins -load-module from,inout @EVA_CONFIG@ -inout -deps -main never_terminate -journal-disable + OPT: -no-autoload-plugins -load-module from,inout @EVA_CONFIG@ -inout -deps -main may_not_terminate -journal-disable + OPT: -no-autoload-plugins -load-module from,inout @EVA_CONFIG@ -inout -deps -main call_may_not_terminate -journal-disable */ int Xt, Xs, Xs_I, Ys, Ys_I, Z, I; diff --git a/tests/value/inout_formals.i b/tests/value/inout_formals.i index 6bbf367f21f..96883b0436b 100644 --- a/tests/value/inout_formals.i +++ b/tests/value/inout_formals.i @@ -1,5 +1,5 @@ /*run.config* - OPT: -no-autoload-plugins -load-module from,inout @VALUECONFIG@ -inout -input-with-formals -inout-with-formals + OPT: -no-autoload-plugins -load-module from,inout @EVA_CONFIG@ -inout -input-with-formals -inout-with-formals */ int x, y; diff --git a/tests/value/inout_proto.i b/tests/value/inout_proto.i index 2ca51c4b064..977b1591fed 100644 --- a/tests/value/inout_proto.i +++ b/tests/value/inout_proto.i @@ -1,5 +1,5 @@ /*run.config* - OPT: -no-autoload-plugins -load-module from,inout @VALUECONFIG@ -inout -input-with-formals -inout-with-formals -main main_main + OPT: -no-autoload-plugins -load-module from,inout @EVA_CONFIG@ -inout -input-with-formals -inout-with-formals -main main_main */ typedef unsigned char BYTE; diff --git a/tests/value/limits.c b/tests/value/limits.c index 081ea91f82d..965d689d109 100644 --- a/tests/value/limits.c +++ b/tests/value/limits.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module inout,eva -eva @VALUECONFIG@ -warn-signed-overflow + OPT: -no-autoload-plugins -load-module inout,eva -eva @EVA_CONFIG@ -warn-signed-overflow */ #include <limits.h> diff --git a/tests/value/logic_ptr_cast.i b/tests/value/logic_ptr_cast.i index 1d85185f09c..6f4c7af2f12 100644 --- a/tests/value/logic_ptr_cast.i +++ b/tests/value/logic_ptr_cast.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module eva -eva @VALUECONFIG@ -print -journal-disable -no-results + OPT: -no-autoload-plugins -load-module eva -eva @EVA_CONFIG@ -print -journal-disable -no-results */ int *p; int t[90]; diff --git a/tests/value/loop_test.i b/tests/value/loop_test.i index e4658984221..6b1e166139c 100644 --- a/tests/value/loop_test.i +++ b/tests/value/loop_test.i @@ -1,6 +1,6 @@ /* run.config* - OPT: -no-autoload-plugins -load-module from,inout,eva -eva @VALUECONFIG@ -main test_onzes -journal-disable - OPT: -no-autoload-plugins -load-module from,inout,eva -eva @VALUECONFIG@ -main test_cent_onzes -journal-disable + OPT: -no-autoload-plugins -load-module from,inout,eva -eva @EVA_CONFIG@ -main test_onzes -journal-disable + OPT: -no-autoload-plugins -load-module from,inout,eva -eva @EVA_CONFIG@ -main test_cent_onzes -journal-disable */ diff --git a/tests/value/loop_wvar.i b/tests/value/loop_wvar.i index 2d635fae34d..341e446a0ad 100644 --- a/tests/value/loop_wvar.i +++ b/tests/value/loop_wvar.i @@ -1,8 +1,8 @@ /* run.config* - OPT: -no-autoload-plugins -load-module eva,inout -no-annot -eva @VALUECONFIG@ -then -kernel-warn-key=annot-error=active -annot -eva -journal-disable - OPT: -no-autoload-plugins -load-module from,inout,eva -kernel-warn-key=annot-error=active -eva @VALUECONFIG@ -main main3 -journal-disable - OPT: -no-autoload-plugins -load-module eva,inout -kernel-warn-key=annot-error=active -eva @VALUECONFIG@ -main main_err1 -journal-disable - OPT: -no-autoload-plugins -load-module eva,inout -kernel-warn-key=annot-error=active -eva @VALUECONFIG@ -main main_err2 -journal-disable + OPT: -no-autoload-plugins -load-module eva,inout -no-annot -eva @EVA_CONFIG@ -then -kernel-warn-key=annot-error=active -annot -eva -journal-disable + OPT: -no-autoload-plugins -load-module from,inout,eva -kernel-warn-key=annot-error=active -eva @EVA_CONFIG@ -main main3 -journal-disable + OPT: -no-autoload-plugins -load-module eva,inout -kernel-warn-key=annot-error=active -eva @EVA_CONFIG@ -main main_err1 -journal-disable + OPT: -no-autoload-plugins -load-module eva,inout -kernel-warn-key=annot-error=active -eva @EVA_CONFIG@ -main main_err2 -journal-disable */ diff --git a/tests/value/loopinv.c b/tests/value/loopinv.c index 9da81346949..fbb89b089a4 100644 --- a/tests/value/loopinv.c +++ b/tests/value/loopinv.c @@ -1,5 +1,5 @@ /* run.config* -OPT: @VALUECONFIG@ -no-autoload-plugins -load-module from,inout,eva,report -slevel-function main2:20 -pp-annot -eva -then -report +OPT: @EVA_CONFIG@ -no-autoload-plugins -load-module from,inout,eva,report -slevel-function main2:20 -pp-annot -eva -then -report */ /*@ requires valid: \valid(&t[0..s-1]); diff --git a/tests/value/machdep.c b/tests/value/machdep.c index f2164ce8011..b9018794165 100644 --- a/tests/value/machdep.c +++ b/tests/value/machdep.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module from,inout,eva -eva @VALUECONFIG@ -cpp-extra-args="-DPTEST" -journal-disable -then -machdep x86_64 -then -machdep x86_16 + OPT: -no-autoload-plugins -load-module from,inout,eva -eva @EVA_CONFIG@ -cpp-extra-args="-DPTEST" -journal-disable -then -machdep x86_64 -then -machdep x86_16 */ #ifndef PTEST diff --git a/tests/value/nested_struct_init.i b/tests/value/nested_struct_init.i index 88d885ee6c8..f73a3e08021 100644 --- a/tests/value/nested_struct_init.i +++ b/tests/value/nested_struct_init.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module inout,eva -eva @VALUECONFIG@ -then -eva-initialization-padding-globals no -then -eva-initialization-padding-globals maybe -then -lib-entry -then -eva-initialization-padding-globals no -then -eva-initialization-padding-globals yes + OPT: -no-autoload-plugins -load-module inout,eva -eva @EVA_CONFIG@ -then -eva-initialization-padding-globals no -then -eva-initialization-padding-globals maybe -then -lib-entry -then -eva-initialization-padding-globals no -then -eva-initialization-padding-globals yes */ typedef signed char int8_t; diff --git a/tests/value/origin.i b/tests/value/origin.i index 4be9a4a8f12..e00c59f3ba6 100644 --- a/tests/value/origin.i +++ b/tests/value/origin.i @@ -1,7 +1,7 @@ /* run.config* GCC: - OPT: -no-autoload-plugins -load-module from,inout,eva @VALUECONFIG@ -eva -eva-warn-copy-indeterminate=-origin_misalign_2,-main -main main -journal-disable -then -out -deps - OPT: -no-autoload-plugins -load-module from,inout,eva @VALUECONFIG@ -eva -eva-warn-copy-indeterminate=-origin_misalign_2,-origin -main origin -journal-disable -then -out -deps + OPT: -no-autoload-plugins -load-module from,inout,eva @EVA_CONFIG@ -eva -eva-warn-copy-indeterminate=-origin_misalign_2,-main -main main -journal-disable -then -out -deps + OPT: -no-autoload-plugins -load-module from,inout,eva @EVA_CONFIG@ -eva -eva-warn-copy-indeterminate=-origin_misalign_2,-origin -main origin -journal-disable -then -out -deps */ char f(void); diff --git a/tests/value/postcond_leaf.c b/tests/value/postcond_leaf.c index b7171d4133a..37b99f53706 100644 --- a/tests/value/postcond_leaf.c +++ b/tests/value/postcond_leaf.c @@ -1,5 +1,5 @@ /* run.config* -OPT: -no-autoload-plugins @VALUECONFIG@ -load-module eva,inout,report -eva-no-show-progress -eva -eva-use-spec g1,g2,g3 -then -report +OPT: -no-autoload-plugins @EVA_CONFIG@ -load-module eva,inout,report -eva-no-show-progress -eva -eva-use-spec g1,g2,g3 -then -report */ /* Test what is printed when Value evaluates a post-condition: diff --git a/tests/value/precond.c b/tests/value/precond.c index 49b21d44e0a..a8c73729935 100644 --- a/tests/value/precond.c +++ b/tests/value/precond.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module from,inout,eva,report -lib-entry -eva @VALUECONFIG@ -then -report -report-print-properties -then -report-no-specialized + OPT: -no-autoload-plugins -load-module from,inout,eva,report -lib-entry -eva @EVA_CONFIG@ -then -report -report-print-properties -then -report-no-specialized */ diff --git a/tests/value/precond2.c b/tests/value/precond2.c index 9008ebd7220..be7006c890e 100644 --- a/tests/value/precond2.c +++ b/tests/value/precond2.c @@ -1,6 +1,6 @@ /* run.config* - OPT: -no-autoload-plugins -load-module from,inout,eva,report,rtegen -rte -then -eva @VALUECONFIG@ -then -report -report-print-properties - OPT: -no-autoload-plugins -load-module from,inout,eva,report,rtegen -eva @VALUECONFIG@ -then -rte -then -report -report-print-properties + OPT: -no-autoload-plugins -load-module from,inout,eva,report,rtegen -rte -then -eva @EVA_CONFIG@ -then -report -report-print-properties + OPT: -no-autoload-plugins -load-module from,inout,eva,report,rtegen -eva @EVA_CONFIG@ -then -rte -then -report -report-print-properties */ // Fuse with precond.c when bts #1208 is solved diff --git a/tests/value/protomain.i b/tests/value/protomain.i index 7e8a769384a..ff7e47cb0b4 100644 --- a/tests/value/protomain.i +++ b/tests/value/protomain.i @@ -1,4 +1,4 @@ /* run.config* - OPT: -no-autoload-plugins -load-module inout,eva -eva @VALUECONFIG@ + OPT: -no-autoload-plugins -load-module inout,eva -eva @EVA_CONFIG@ */ int main(int c, char **); diff --git a/tests/value/recol.c b/tests/value/recol.c index a19aaef5016..5d0d3e258ca 100644 --- a/tests/value/recol.c +++ b/tests/value/recol.c @@ -1,6 +1,6 @@ /* run.config* - OPT: -no-autoload-plugins -load-module eva,inout -eva @VALUECONFIG@ -slevel 100 -cpp-extra-args="-DPTEST " -journal-disable -no-warn-signed-overflow - OPT: -no-autoload-plugins -load-module eva,inout -eva @VALUECONFIG@ -slevel 100 -cpp-extra-args="-DPTEST " -journal-disable -machdep ppc_32 -no-warn-signed-overflow + OPT: -no-autoload-plugins -load-module eva,inout -eva @EVA_CONFIG@ -slevel 100 -cpp-extra-args="-DPTEST " -journal-disable -no-warn-signed-overflow + OPT: -no-autoload-plugins -load-module eva,inout -eva @EVA_CONFIG@ -slevel 100 -cpp-extra-args="-DPTEST " -journal-disable -machdep ppc_32 -no-warn-signed-overflow */ #ifndef PTEST diff --git a/tests/value/recursion.i b/tests/value/recursion.i index a7943ae37f2..2b916a17354 100644 --- a/tests/value/recursion.i +++ b/tests/value/recursion.i @@ -1,6 +1,6 @@ /*run.config* - OPT: -no-autoload-plugins -load-module from,inout,eva -lib-entry -main main -eva @VALUECONFIG@ -journal-disable - OPT: -no-autoload-plugins -load-module from,inout,eva -lib-entry -main main -eva @VALUECONFIG@ -eva-ignore-recursive-calls -journal-disable + OPT: -no-autoload-plugins -load-module from,inout,eva -lib-entry -main main -eva @EVA_CONFIG@ -journal-disable + OPT: -no-autoload-plugins -load-module from,inout,eva -lib-entry -main main -eva @EVA_CONFIG@ -eva-ignore-recursive-calls -journal-disable */ int G; diff --git a/tests/value/recursion2.i b/tests/value/recursion2.i index 7b2a209eda2..ec3ea022c9c 100644 --- a/tests/value/recursion2.i +++ b/tests/value/recursion2.i @@ -1,5 +1,5 @@ /*run.config* - OPT: -no-autoload-plugins -load-module from,inout,eva -eva @VALUECONFIG@ -journal-disable -then -input -out -inout + OPT: -no-autoload-plugins -load-module from,inout,eva -eva @EVA_CONFIG@ -journal-disable -then -input -out -inout */ int x, y; diff --git a/tests/value/redundant_alarms.c b/tests/value/redundant_alarms.c index 662a3f956db..cd26fec1a2c 100644 --- a/tests/value/redundant_alarms.c +++ b/tests/value/redundant_alarms.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module inout,scope,slicing,sparecode @VALUECONFIG@ -eva-warn-copy-indeterminate=-@all,main3 -scope-msg-key rm_asserts -scope-verbose 2 -remove-redundant-alarms -print -slice-threat main1 -then-on 'Slicing export' -print + OPT: -no-autoload-plugins -load-module inout,scope,slicing,sparecode @EVA_CONFIG@ -eva-warn-copy-indeterminate=-@all,main3 -scope-msg-key rm_asserts -scope-verbose 2 -remove-redundant-alarms -print -slice-threat main1 -then-on 'Slicing export' -print **/ volatile int v; diff --git a/tests/value/replace_by_show_each.c b/tests/value/replace_by_show_each.c index a100f63626e..51592b67f44 100644 --- a/tests/value/replace_by_show_each.c +++ b/tests/value/replace_by_show_each.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module from,inout,eva -eva @VALUECONFIG@ -inout -calldeps + OPT: -no-autoload-plugins -load-module from,inout,eva -eva @EVA_CONFIG@ -inout -calldeps */ #define show_each_1 Frama_C_show_each_1 diff --git a/tests/value/sign_of_bitfiled_int.c b/tests/value/sign_of_bitfiled_int.c index efe30e77e34..b69aa28c06b 100644 --- a/tests/value/sign_of_bitfiled_int.c +++ b/tests/value/sign_of_bitfiled_int.c @@ -1,6 +1,6 @@ /* run.config* - OPT: -no-autoload-plugins -load-module eva,inout -eva @VALUECONFIG@ -cpp-extra-args="-DPTEST" -journal-disable - OPT: -no-autoload-plugins -load-module eva,inout -machdep ppc_32 -eva @VALUECONFIG@ -cpp-extra-args="-DPTEST" -journal-disable + OPT: -no-autoload-plugins -load-module eva,inout -eva @EVA_CONFIG@ -cpp-extra-args="-DPTEST" -journal-disable + OPT: -no-autoload-plugins -load-module eva,inout -machdep ppc_32 -eva @EVA_CONFIG@ -cpp-extra-args="-DPTEST" -journal-disable */ diff --git a/tests/value/simplify_cfg.i b/tests/value/simplify_cfg.i index 7b0b780c204..5c1b0f1d719 100644 --- a/tests/value/simplify_cfg.i +++ b/tests/value/simplify_cfg.i @@ -1,6 +1,6 @@ /* run.config* - OPT: -no-autoload-plugins -load-module eva,inout -simplify-cfg -keep-switch -eva @VALUECONFIG@ -journal-disable - OPT: -no-autoload-plugins -load-module eva,inout -simplify-cfg -eva @VALUECONFIG@ -journal-disable + OPT: -no-autoload-plugins -load-module eva,inout -simplify-cfg -keep-switch -eva @EVA_CONFIG@ -journal-disable + OPT: -no-autoload-plugins -load-module eva,inout -simplify-cfg -eva @EVA_CONFIG@ -journal-disable */ int main(int x, int y) { diff --git a/tests/value/ulongvslonglong.i b/tests/value/ulongvslonglong.i index 54c7fe76c33..c945f20f881 100644 --- a/tests/value/ulongvslonglong.i +++ b/tests/value/ulongvslonglong.i @@ -1,6 +1,6 @@ /* run.config* - OPT: -no-autoload-plugins -load-module eva,inout -eva @VALUECONFIG@ -journal-disable -machdep x86_64 - OPT: -no-autoload-plugins -load-module eva,inout -eva @VALUECONFIG@ -journal-disable + OPT: -no-autoload-plugins -load-module eva,inout -eva @EVA_CONFIG@ -journal-disable -machdep x86_64 + OPT: -no-autoload-plugins -load-module eva,inout -eva @EVA_CONFIG@ -journal-disable */ int x; diff --git a/tests/value/uninit_callstack.i b/tests/value/uninit_callstack.i index 86a4a5e5e83..3c1d29d5765 100644 --- a/tests/value/uninit_callstack.i +++ b/tests/value/uninit_callstack.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module eva -eva @VALUECONFIG@ -eva-no-show-progress -eva-print-callstacks -journal-disable -no-results + OPT: -no-autoload-plugins -load-module eva -eva @EVA_CONFIG@ -eva-no-show-progress -eva-print-callstacks -journal-disable -no-results */ int *p, x; diff --git a/tests/value/unknown_sizeof.i b/tests/value/unknown_sizeof.i index 0d06b705a96..f3a1c3c0c65 100644 --- a/tests/value/unknown_sizeof.i +++ b/tests/value/unknown_sizeof.i @@ -1,6 +1,6 @@ /* run.config* - OPT: -no-autoload-plugins -load-module eva -eva @VALUECONFIG@ -main main1 - OPT: -no-autoload-plugins -load-module eva -eva @VALUECONFIG@ -main main2 + OPT: -no-autoload-plugins -load-module eva -eva @EVA_CONFIG@ -main main1 + OPT: -no-autoload-plugins -load-module eva -eva @EVA_CONFIG@ -main main2 */ struct s; diff --git a/tests/value/use_spec.i b/tests/value/use_spec.i index a98064c85ed..b22673b3052 100644 --- a/tests/value/use_spec.i +++ b/tests/value/use_spec.i @@ -1,6 +1,6 @@ /* run.config* - OPT: -no-autoload-plugins -load-module from,inout,eva -eva-use-spec f,h -eva @VALUECONFIG@ -inout -calldeps - OPT: -no-autoload-plugins -load-module from,inout,eva -eva-use-spec f,h -eva @VALUECONFIG@ -inout -calldeps -show-indirect-deps + OPT: -no-autoload-plugins -load-module from,inout,eva -eva-use-spec f,h -eva @EVA_CONFIG@ -inout -calldeps + OPT: -no-autoload-plugins -load-module from,inout,eva -eva-use-spec f,h -eva @EVA_CONFIG@ -inout -calldeps -show-indirect-deps */ diff --git a/tests/value/volatile2.i b/tests/value/volatile2.i index 4a2231374ad..f1088a88553 100644 --- a/tests/value/volatile2.i +++ b/tests/value/volatile2.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module from,inout,eva -print -eva @VALUECONFIG@ -machdep x86_16 + OPT: -no-autoload-plugins -load-module from,inout,eva -print -eva @EVA_CONFIG@ -machdep x86_16 */ diff --git a/tests/value/widen_overflow.i b/tests/value/widen_overflow.i index 36960e75ecf..9bf6480e808 100644 --- a/tests/value/widen_overflow.i +++ b/tests/value/widen_overflow.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -no-autoload-plugins -load-module eva,inout -eva @VALUECONFIG@ + OPT: -no-autoload-plugins -load-module eva,inout -eva @EVA_CONFIG@ */ int main() { -- GitLab From 88bf32369b130d81b7dc4d4c6fd3b3d430ee6f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 4 Apr 2019 10:24:52 +0200 Subject: [PATCH 197/376] [tests] New macro EVA_OPTIONS for the -eva- options used in the tests. Separate from EVA_CONFIG, which also disables the other plugins. --- tests/builtins/test_config | 3 ++- tests/builtins/test_config_apron | 3 ++- tests/builtins/test_config_bitwise | 3 ++- tests/builtins/test_config_equalities | 3 ++- tests/builtins/test_config_gauges | 3 ++- tests/builtins/test_config_symblocs | 3 ++- tests/test_config | 3 ++- tests/test_config_apron | 3 ++- tests/test_config_bitwise | 3 ++- tests/test_config_equalities | 3 ++- tests/test_config_gauges | 3 ++- tests/test_config_symblocs | 3 ++- 12 files changed, 24 insertions(+), 12 deletions(-) diff --git a/tests/builtins/test_config b/tests/builtins/test_config index 0958b20e0f2..d282269ed89 100644 --- a/tests/builtins/test_config +++ b/tests/builtins/test_config @@ -1,2 +1,3 @@ -MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null +MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null +MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/builtins/test_config_apron b/tests/builtins/test_config_apron index 64f106d0bcf..6a1f007bb7c 100644 --- a/tests/builtins/test_config_apron +++ b/tests/builtins/test_config_apron @@ -1,2 +1,3 @@ -MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-apron-oct -eva-msg-key experimental-ok +MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-apron-oct -eva-msg-key experimental-ok +MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/builtins/test_config_bitwise b/tests/builtins/test_config_bitwise index a084307a988..5bf90d048f4 100644 --- a/tests/builtins/test_config_bitwise +++ b/tests/builtins/test_config_bitwise @@ -1,2 +1,3 @@ -MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-bitwise-domain +MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-bitwise-domain +MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/builtins/test_config_equalities b/tests/builtins/test_config_equalities index d10514a2cbe..b688f61e3ea 100644 --- a/tests/builtins/test_config_equalities +++ b/tests/builtins/test_config_equalities @@ -1,2 +1,3 @@ -MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-equality-domain +MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-equality-domain +MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/builtins/test_config_gauges b/tests/builtins/test_config_gauges index b233bc47b53..a0865d46a8a 100644 --- a/tests/builtins/test_config_gauges +++ b/tests/builtins/test_config_gauges @@ -1,2 +1,3 @@ -MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-gauges-domain +MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-gauges-domain +MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/builtins/test_config_symblocs b/tests/builtins/test_config_symblocs index 34daa69d9c5..09e7ee9c363 100644 --- a/tests/builtins/test_config_symblocs +++ b/tests/builtins/test_config_symblocs @@ -1,2 +1,3 @@ -MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-symbolic-locations-domain +MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-symbolic-locations-domain +MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/test_config b/tests/test_config index 00505a1606c..10fa9a74e56 100644 --- a/tests/test_config +++ b/tests/test_config @@ -1,2 +1,3 @@ -MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic +MACRO: EVA_OPTIONS -eva-show-progress +MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/test_config_apron b/tests/test_config_apron index dd60e0fbb23..ccb5342259c 100644 --- a/tests/test_config_apron +++ b/tests/test_config_apron @@ -1,2 +1,3 @@ -MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-apron-oct -eva-msg-key experimental-ok +MACRO: EVA_OPTIONS -eva-show-progress -eva-apron-oct -eva-msg-key experimental-ok +MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/test_config_bitwise b/tests/test_config_bitwise index eee41b0bedc..146e7721ea2 100644 --- a/tests/test_config_bitwise +++ b/tests/test_config_bitwise @@ -1,2 +1,3 @@ -MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-bitwise-domain +MACRO: EVA_OPTIONS -eva-show-progress -eva-bitwise-domain +MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/test_config_equalities b/tests/test_config_equalities index 962b39797e8..1e592c46e5c 100644 --- a/tests/test_config_equalities +++ b/tests/test_config_equalities @@ -1,2 +1,3 @@ -MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-equality-domain +MACRO: EVA_OPTIONS -eva-show-progress -eva-equality-domain +MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/test_config_gauges b/tests/test_config_gauges index 3883074d978..7e0fb7cbdac 100644 --- a/tests/test_config_gauges +++ b/tests/test_config_gauges @@ -1,2 +1,3 @@ -MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-gauges-domain +MACRO: EVA_OPTIONS -eva-show-progress -eva-gauges-domain +MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/test_config_symblocs b/tests/test_config_symblocs index 34c1fc35dbc..77ad2e24740 100644 --- a/tests/test_config_symblocs +++ b/tests/test_config_symblocs @@ -1,2 +1,3 @@ -MACRO: EVA_CONFIG -eva-show-progress -no-autoload-plugins -load-module from,inout,eva,scope,variadic -eva-symbolic-locations-domain +MACRO: EVA_OPTIONS -eva-show-progress -eva-symbolic-locations-domain +MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps -- GitLab From 160c5c500b914852487004e26075a90c27c607e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 4 Apr 2019 10:37:49 +0200 Subject: [PATCH 198/376] [tests] Uses the EVA_OPTIONS macro in the builtins tests. --- tests/builtins/Longinit_sequencer.i | 4 ++-- tests/builtins/big_local_array.i | 8 ++++---- tests/builtins/oracle/Longinit_sequencer.res.oracle | 8 ++++++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tests/builtins/Longinit_sequencer.i b/tests/builtins/Longinit_sequencer.i index 4d9b50cd565..919f247cf5d 100644 --- a/tests/builtins/Longinit_sequencer.i +++ b/tests/builtins/Longinit_sequencer.i @@ -1,4 +1,4 @@ /* run.config* -EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs -OPT: -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs -eva-show-progress -res-file @PTEST_RESULT@ + EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs + OPT: @EVA_OPTIONS@ -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs -res-file @PTEST_RESULT@ */ diff --git a/tests/builtins/big_local_array.i b/tests/builtins/big_local_array.i index d6e1f531814..84322912cb6 100644 --- a/tests/builtins/big_local_array.i +++ b/tests/builtins/big_local_array.i @@ -1,8 +1,8 @@ /* run.config* -EXECNOW: make -s @PTEST_DIR@/big_local_array_script.cmxs -OPT: -eva-show-progress -print -journal-disable -eva -report -OPT: -load-module @PTEST_DIR@/big_local_array_script -then-on prj -print -report -OPT: -eva-show-progress -print -journal-disable -no-initialized-padding-locals -eva + EXECNOW: make -s @PTEST_DIR@/big_local_array_script.cmxs + OPT: @EVA_OPTIONS@ -print -journal-disable -eva -report + OPT: @EVA_OPTIONS@ -load-module @PTEST_DIR@/big_local_array_script -then-on prj -print -report + OPT: @EVA_OPTIONS@ -print -journal-disable -no-initialized-padding-locals -eva */ struct S { diff --git a/tests/builtins/oracle/Longinit_sequencer.res.oracle b/tests/builtins/oracle/Longinit_sequencer.res.oracle index 6deb10c4aea..2a0c3fd82a9 100644 --- a/tests/builtins/oracle/Longinit_sequencer.res.oracle +++ b/tests/builtins/oracle/Longinit_sequencer.res.oracle @@ -79,6 +79,8 @@ [eva] tests/builtins/long_init.c:77: Call to builtin free [eva] tests/builtins/long_init.c:77: function free: precondition 'freeable' got status valid. +[eva:malloc] tests/builtins/long_init.c:77: + strong free on bases: {__malloc_init_inner_l75} [eva] Recording results for init_inner [eva] Done for function init_inner [eva:locals-escaping] tests/builtins/long_init.c:85: Warning: @@ -161,6 +163,8 @@ [eva] tests/builtins/long_init.c:103: Call to builtin free [eva] tests/builtins/long_init.c:103: function free: precondition 'freeable' got status valid. +[eva:malloc] tests/builtins/long_init.c:103: + strong free on bases: {__malloc_init_inner_l73} [eva] tests/builtins/long_init.c:104: Call to builtin Frama_C_malloc_fresh for function malloc [eva] tests/builtins/long_init.c:104: allocating variable __malloc_main_l104 @@ -435,6 +439,8 @@ Values at end of function main: [eva] tests/builtins/long_init2.c:103: Call to builtin free [eva] tests/builtins/long_init2.c:103: function free: precondition 'freeable' got status valid. +[eva:malloc] tests/builtins/long_init2.c:103: + strong free on bases: {__malloc_init_inner_l73} [eva] tests/builtins/long_init2.c:104: Call to builtin Frama_C_malloc_fresh for function malloc [eva] tests/builtins/long_init2.c:104: allocating variable __malloc_main_l104 @@ -670,6 +676,8 @@ Values at end of function main: [eva] tests/builtins/long_init3.c:103: Call to builtin free [eva] tests/builtins/long_init3.c:103: function free: precondition 'freeable' got status valid. +[eva:malloc] tests/builtins/long_init3.c:103: + strong free on bases: {__malloc_init_inner_l73} [eva] tests/builtins/long_init3.c:104: Call to builtin Frama_C_malloc_fresh for function malloc [eva] tests/builtins/long_init3.c:104: allocating variable __malloc_main_l104 -- GitLab From 8e6f6df03909e98050dd53cd285adc9740172f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 4 Apr 2019 11:11:15 +0200 Subject: [PATCH 199/376] [tests] Uses the macro EVA_OPTIONS instead of option -eva-show-progress. --- tests/builtins/test_config | 2 +- tests/builtins/test_config_apron | 2 +- tests/builtins/test_config_bitwise | 2 +- tests/builtins/test_config_equalities | 2 +- tests/builtins/test_config_gauges | 2 +- tests/builtins/test_config_symblocs | 2 +- tests/constant_propagation/bts117.c | 4 +-- tests/constant_propagation/const_propagate.c | 4 +-- tests/constant_propagation/declaration.c | 2 +- tests/constant_propagation/declaration2.c | 2 +- .../introduction_of_non_explicit_cast.c | 2 +- tests/constant_propagation/test_config | 2 +- tests/impact/test_config | 2 +- tests/journal/control.i | 2 +- tests/libc/coverage.c | 2 +- tests/libc/test_config | 2 +- tests/misc/bts0541.c | 2 +- tests/misc/bts1347.i | 2 +- tests/misc/issue109.i | 2 +- tests/misc/log_twice.i | 2 +- tests/misc/widen_hints.c | 8 ++--- tests/pdg/bts1194.c | 2 +- tests/pdg/test_config | 2 +- tests/rte/value_rte.c | 2 +- tests/saveload/test_config | 2 +- tests/scope/bts383.c | 2 +- tests/scope/no-effect.i | 2 +- tests/scope/scope.c | 6 ++-- tests/scope/zones.c | 2 +- tests/slicing/adpcm.c | 2 +- tests/slicing/bts336.i | 16 +++++----- tests/slicing/bts709.c | 2 +- tests/slicing/combine.i | 2 +- tests/slicing/ex_spec_interproc.i | 2 +- tests/slicing/horwitz.i | 2 +- tests/slicing/mark_all_slices.i | 2 +- tests/slicing/merge.i | 2 +- tests/slicing/min_call.i | 2 +- tests/slicing/select_by_annot.i | 30 +++++++++---------- tests/slicing/select_simple.i | 2 +- tests/slicing/simple_intra_slice.i | 2 +- tests/slicing/slice_no_body.i | 2 +- tests/slicing/switch.i | 2 +- tests/slicing/test_config | 2 +- tests/slicing/unitialized.c | 8 ++--- tests/slicing/unravel-point.i | 10 +++---- tests/slicing/use_spec.i | 4 +-- tests/slicing/variadic.c | 10 +++---- tests/sparecode/test_config | 2 +- tests/spec/array_typedef.c | 2 +- tests/spec/assigns_result.i | 2 +- tests/spec/assigns_void.c | 2 +- tests/spec/behavior_assert.c | 4 +-- tests/spec/preprocess.c | 2 +- tests/spec/shifts.c | 2 +- tests/spec/statement_behavior.c | 2 +- tests/syntax/Refresh_visitor.i | 2 +- tests/syntax/copy_visitor.i | 2 +- tests/syntax/extern_init.i | 4 +-- tests/syntax/unroll_labels.i | 4 +-- tests/syntax/unroll_visit.i | 2 +- 61 files changed, 104 insertions(+), 104 deletions(-) diff --git a/tests/builtins/test_config b/tests/builtins/test_config index d282269ed89..e5aae733192 100644 --- a/tests/builtins/test_config +++ b/tests/builtins/test_config @@ -1,3 +1,3 @@ -MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null +MACRO: EVA_OPTIONS @EVA_OPTIONS@ -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/builtins/test_config_apron b/tests/builtins/test_config_apron index 6a1f007bb7c..98b3a98fc68 100644 --- a/tests/builtins/test_config_apron +++ b/tests/builtins/test_config_apron @@ -1,3 +1,3 @@ -MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-apron-oct -eva-msg-key experimental-ok +MACRO: EVA_OPTIONS @EVA_OPTIONS@ -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-apron-oct -eva-msg-key experimental-ok MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/builtins/test_config_bitwise b/tests/builtins/test_config_bitwise index 5bf90d048f4..fddf8d55557 100644 --- a/tests/builtins/test_config_bitwise +++ b/tests/builtins/test_config_bitwise @@ -1,3 +1,3 @@ -MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-bitwise-domain +MACRO: EVA_OPTIONS @EVA_OPTIONS@ -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-bitwise-domain MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/builtins/test_config_equalities b/tests/builtins/test_config_equalities index b688f61e3ea..6f71f51c4d9 100644 --- a/tests/builtins/test_config_equalities +++ b/tests/builtins/test_config_equalities @@ -1,3 +1,3 @@ -MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-equality-domain +MACRO: EVA_OPTIONS @EVA_OPTIONS@ -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-equality-domain MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/builtins/test_config_gauges b/tests/builtins/test_config_gauges index a0865d46a8a..3e142f5beb7 100644 --- a/tests/builtins/test_config_gauges +++ b/tests/builtins/test_config_gauges @@ -1,3 +1,3 @@ -MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-gauges-domain +MACRO: EVA_OPTIONS @EVA_OPTIONS@ -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-gauges-domain MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/builtins/test_config_symblocs b/tests/builtins/test_config_symblocs index 09e7ee9c363..f5dc3a45b44 100644 --- a/tests/builtins/test_config_symblocs +++ b/tests/builtins/test_config_symblocs @@ -1,3 +1,3 @@ -MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-symbolic-locations-domain +MACRO: EVA_OPTIONS @EVA_OPTIONS@ -eva-msg-key malloc -eva-warn-key malloc:weak=feedback -eva-no-alloc-returns-null -eva-symbolic-locations-domain MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/constant_propagation/bts117.c b/tests/constant_propagation/bts117.c index d7cd4b19655..420cd12e426 100644 --- a/tests/constant_propagation/bts117.c +++ b/tests/constant_propagation/bts117.c @@ -1,7 +1,7 @@ /* run.config OPT: -journal-disable -print -OPT: -journal-disable -semantic-const-folding -eva-show-progress -OPT: -journal-disable -sparecode-analysis -eva-show-progress +OPT: -journal-disable -semantic-const-folding @EVA_OPTIONS@ +OPT: -journal-disable -sparecode-analysis @EVA_OPTIONS@ */ int main1 (void) { diff --git a/tests/constant_propagation/const_propagate.c b/tests/constant_propagation/const_propagate.c index 4e9024ceedf..064fee49c0e 100644 --- a/tests/constant_propagation/const_propagate.c +++ b/tests/constant_propagation/const_propagate.c @@ -1,6 +1,6 @@ /* run.config - OPT: -eva -eva-show-progress -deps -out -input -scf -eva-show-progress -journal-disable - OPT: -scf -eva-show-progress -cast-from-constant -semantic-const-fold add3 -main init -journal-disable + OPT: -eva @EVA_OPTIONS@ -deps -out -input -scf -journal-disable + OPT: -scf @EVA_OPTIONS@ -cast-from-constant -semantic-const-fold add3 -main init -journal-disable */ int x,y,z; int TAB[10]; diff --git a/tests/constant_propagation/declaration.c b/tests/constant_propagation/declaration.c index 69495694b69..a9c764d083b 100644 --- a/tests/constant_propagation/declaration.c +++ b/tests/constant_propagation/declaration.c @@ -1,5 +1,5 @@ /* run.config - OPT: -eva -eva-show-progress -then -scf -eva-show-progress -then-on propagated -scf -eva-show-progress + OPT: -eva @EVA_OPTIONS@ -then -scf -then-on propagated -scf @EVA_OPTIONS@ */ void f(int *x, int *y, void (*p)(int *x, int *y)) { diff --git a/tests/constant_propagation/declaration2.c b/tests/constant_propagation/declaration2.c index 0c2135f988d..f44053abbdf 100644 --- a/tests/constant_propagation/declaration2.c +++ b/tests/constant_propagation/declaration2.c @@ -1,5 +1,5 @@ /* run.config - OPT: -eva -eva-show-progress -scf -eva-show-progress -journal-disable + OPT: -eva @EVA_OPTIONS@ -scf -journal-disable */ void f(int *x) { (*x)++; } diff --git a/tests/constant_propagation/introduction_of_non_explicit_cast.c b/tests/constant_propagation/introduction_of_non_explicit_cast.c index 9e95b6e88db..959842971ac 100644 --- a/tests/constant_propagation/introduction_of_non_explicit_cast.c +++ b/tests/constant_propagation/introduction_of_non_explicit_cast.c @@ -1,6 +1,6 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs -eva -eva-show-progress -deps -journal-disable + OPT: -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs -eva @EVA_OPTIONS@ -deps -journal-disable */ int x,y,z; diff --git a/tests/constant_propagation/test_config b/tests/constant_propagation/test_config index b174b4500a1..850779adb25 100644 --- a/tests/constant_propagation/test_config +++ b/tests/constant_propagation/test_config @@ -1 +1 @@ -OPT: -journal-disable -scf -eva-show-progress +OPT: -journal-disable -scf @EVA_OPTIONS@ diff --git a/tests/impact/test_config b/tests/impact/test_config index 867181e4aa3..c449d18f602 100644 --- a/tests/impact/test_config +++ b/tests/impact/test_config @@ -1 +1 @@ -OPT: -journal-disable -impact-print -eva-show-progress +OPT: -journal-disable -impact-print @EVA_OPTIONS@ diff --git a/tests/journal/control.i b/tests/journal/control.i index 8a7acc8e682..a136fc4ec7a 100644 --- a/tests/journal/control.i +++ b/tests/journal/control.i @@ -1,6 +1,6 @@ /* run.config COMMENT: do not compare generated journals since they depend on current time - EXECNOW: BIN control_journal.ml BIN control_journal_bis.ml (./bin/toplevel.opt -journal-enable -check -eva -deps -out -eva-show-progress -main f -journal-name tests/journal/result/control_journal.ml tests/journal/control.i && cp tests/journal/result/control_journal.ml tests/journal/result/control_journal_bis.ml) > /dev/null 2> /dev/null + EXECNOW: BIN control_journal.ml BIN control_journal_bis.ml (./bin/toplevel.opt -journal-enable -check -eva -deps -out @EVA_OPTIONS@ -main f -journal-name tests/journal/result/control_journal.ml tests/journal/control.i && cp tests/journal/result/control_journal.ml tests/journal/result/control_journal_bis.ml) > /dev/null 2> /dev/null CMD: FRAMAC_LIB=lib/fc ./bin/toplevel.byte OPT: -load-script tests/journal/result/control_journal -journal-disable CMD: FRAMAC_LIB=lib/fc ./bin/toplevel.byte diff --git a/tests/libc/coverage.c b/tests/libc/coverage.c index 40d98270dc8..2fa988b1e5d 100644 --- a/tests/libc/coverage.c +++ b/tests/libc/coverage.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -eva-no-builtins-auto -eva-show-progress share/libc/string.c -eva -slevel 6 -metrics-eva-cover -then -metrics-libc + OPT: -eva-no-builtins-auto @EVA_OPTIONS@ share/libc/string.c -eva -slevel 6 -metrics-eva-cover -then -metrics-libc */ #include "string.h" diff --git a/tests/libc/test_config b/tests/libc/test_config index b4e089126e4..cf5c5bb1835 100644 --- a/tests/libc/test_config +++ b/tests/libc/test_config @@ -1 +1 @@ -OPT: -eva -eva-show-progress -cpp-extra-args='-nostdinc -Ishare/libc' +OPT: -eva @EVA_CONFIG@ -cpp-extra-args='-nostdinc -Ishare/libc' diff --git a/tests/misc/bts0541.c b/tests/misc/bts0541.c index 4eb6a3004ba..6bbabaaa30c 100644 --- a/tests/misc/bts0541.c +++ b/tests/misc/bts0541.c @@ -1,5 +1,5 @@ /* run.config - OPT: -pp-annot -cpp-extra-args="-I./share/libc" -pp-annot -eva -eva-show-progress + OPT: -pp-annot -cpp-extra-args="-I./share/libc" -pp-annot -eva @EVA_CONFIG@ */ #include <stdbool.h> diff --git a/tests/misc/bts1347.i b/tests/misc/bts1347.i index 54f633c7bea..5650e0651c8 100644 --- a/tests/misc/bts1347.i +++ b/tests/misc/bts1347.i @@ -1,6 +1,6 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs -eva-show-progress -then -report + OPT: @EVA_OPTIONS@ -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs -then -report */ int f(int *x) { return *x; } int g(int *x) { return *(x++); } diff --git a/tests/misc/issue109.i b/tests/misc/issue109.i index 51c709c227b..e6d7a20671a 100644 --- a/tests/misc/issue109.i +++ b/tests/misc/issue109.i @@ -1,6 +1,6 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -eva -eva-show-progress -slevel-function main:10 -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs + OPT: -eva @EVA_CONFIG@ -slevel-function main:10 -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs */ void main() { int i, j = 0; diff --git a/tests/misc/log_twice.i b/tests/misc/log_twice.i index e5c6f3a5f23..1c1ed1cb63f 100644 --- a/tests/misc/log_twice.i +++ b/tests/misc/log_twice.i @@ -1,6 +1,6 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -load-module @PTEST_DIR@/@PTEST_NAME@ -eva-show-progress + OPT: @EVA_CONFIG@ -load-module @PTEST_DIR@/@PTEST_NAME@ */ int* f() { diff --git a/tests/misc/widen_hints.c b/tests/misc/widen_hints.c index 8badf6af2b7..9791791713a 100644 --- a/tests/misc/widen_hints.c +++ b/tests/misc/widen_hints.c @@ -1,8 +1,8 @@ /* run.config - OPT: -eva -eva-show-progress -cpp-extra-args=-DSYNTAX_ERRORS -kernel-warn-key=annot-error=active - OPT: -eva -eva-show-progress -cpp-extra-args=-DNONCONST - OPT: -eva -eva-show-progress -slevel 1 -eva-msg-key widen-hints - OPT: -eva -eva-show-progress -cpp-extra-args=-DALLGLOBAL -eva-msg-key widen-hints + OPT: -eva @EVA_CONFIG@ -cpp-extra-args=-DSYNTAX_ERRORS -kernel-warn-key=annot-error=active + OPT: -eva @EVA_CONFIG@ -cpp-extra-args=-DNONCONST + OPT: -eva @EVA_CONFIG@ -slevel 1 -eva-msg-key widen-hints + OPT: -eva @EVA_CONFIG@ -cpp-extra-args=-DALLGLOBAL -eva-msg-key widen-hints */ #define N 2 diff --git a/tests/pdg/bts1194.c b/tests/pdg/bts1194.c index 3cebc895ed2..baa829837c3 100644 --- a/tests/pdg/bts1194.c +++ b/tests/pdg/bts1194.c @@ -1,5 +1,5 @@ /* run.config - STDOPT: +"-eva -inout -pdg -calldeps -deps -then -slice-return main -then-last -print -eva-show-progress" + STDOPT: +"-eva -inout -pdg -calldeps -deps -then -slice-return main -then-last -print @EVA_OPTIONS@" */ int Y, X; diff --git a/tests/pdg/test_config b/tests/pdg/test_config index 864d6b8a7b6..d9d741191d1 100644 --- a/tests/pdg/test_config +++ b/tests/pdg/test_config @@ -1 +1 @@ -OPT: -journal-disable -eva-show-progress -pdg-print -pdg-verbose 2 +OPT: -journal-disable @EVA_OPTIONS@ -pdg-print -pdg-verbose 2 diff --git a/tests/rte/value_rte.c b/tests/rte/value_rte.c index a1ae69841b3..0587fca439d 100644 --- a/tests/rte/value_rte.c +++ b/tests/rte/value_rte.c @@ -1,5 +1,5 @@ /* run.config -OPT: -rte -then -eva-show-progress -eva -then -report +OPT: -rte -then -eva @EVA_OPTIONS@ -then -report */ #include "stdio.h" diff --git a/tests/saveload/test_config b/tests/saveload/test_config index 16c72227f60..1712a20359b 100644 --- a/tests/saveload/test_config +++ b/tests/saveload/test_config @@ -1 +1 @@ -OPT: -eva-show-progress +OPT: @EVA_OPTIONS@ diff --git a/tests/scope/bts383.c b/tests/scope/bts383.c index dcee5c7978a..db156cbcfc2 100644 --- a/tests/scope/bts383.c +++ b/tests/scope/bts383.c @@ -1,5 +1,5 @@ /* run.config - OPT: -eva -eva-show-progress -print -journal-disable -scope-verbose 1 -remove-redundant-alarms -context-width 3 + OPT: -eva @EVA_CONFIG@ -print -journal-disable -scope-verbose 1 -remove-redundant-alarms -context-width 3 */ /* echo '!Db.Scope.check_asserts();;' \ diff --git a/tests/scope/no-effect.i b/tests/scope/no-effect.i index 916b4fc6fbe..47f41d8fb6b 100644 --- a/tests/scope/no-effect.i +++ b/tests/scope/no-effect.i @@ -1,5 +1,5 @@ /* run.config - OPT: -eva-show-progress -eva -print -journal-disable -scope-verbose 1 -remove-redundant-alarms + OPT: @EVA_CONFIG@ -eva -print -journal-disable -scope-verbose 1 -remove-redundant-alarms */ typedef struct { diff --git a/tests/scope/scope.c b/tests/scope/scope.c index a0c63884270..8cb6670e5ee 100644 --- a/tests/scope/scope.c +++ b/tests/scope/scope.c @@ -1,7 +1,7 @@ /* run.config - OPT: -eva -eva-show-progress -main f -journal-disable - OPT: -eva -eva-show-progress -main f2 -journal-disable - OPT: -eva -eva-show-progress -main loop -journal-disable + OPT: -eva @EVA_CONFIG@ -main f -journal-disable + OPT: -eva @EVA_CONFIG@ -main f2 -journal-disable + OPT: -eva @EVA_CONFIG@ -main loop -journal-disable */ /* * bin/viewer.byte -main f tests/scope/scope.c -eva diff --git a/tests/scope/zones.c b/tests/scope/zones.c index 884e57b2162..acafbd74299 100644 --- a/tests/scope/zones.c +++ b/tests/scope/zones.c @@ -1,6 +1,6 @@ /* run.config # EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -load-module @PTEST_DIR@/@PTEST_NAME@ -eva -eva-show-progress -journal-disable + OPT: -load-module @PTEST_DIR@/@PTEST_NAME@ -eva @EVA_OPTIONS@ -journal-disable */ diff --git a/tests/slicing/adpcm.c b/tests/slicing/adpcm.c index f6a352643ec..559291e8913 100644 --- a/tests/slicing/adpcm.c +++ b/tests/slicing/adpcm.c @@ -1,6 +1,6 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs - STDOPT: +"-eva-show-progress -load-module ./tests/slicing/libSelect.cmxs -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs -ulevel -1 -deps -slicing-level 2 -journal-disable" + STDOPT: +"-load-module ./tests/slicing/libSelect.cmxs -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs -ulevel -1 -deps -slicing-level 2 -journal-disable" */ #include "tests/test/adpcm.c" diff --git a/tests/slicing/bts336.i b/tests/slicing/bts336.i index b1f75ffb65c..ddeee83be06 100644 --- a/tests/slicing/bts336.i +++ b/tests/slicing/bts336.i @@ -1,12 +1,12 @@ /* run.config - STDOPT: +"-slice-return main -calldeps -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" - STDOPT: +"-main main2 -slice-return main2 -calldeps -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" - STDOPT: +"-main main3 -slice-return main3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" - STDOPT: +"-journal-disable -main main3 -inout -calldeps -slice-return main3 -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -no-inout -eva-show-progress" - STDOPT: +"-journal-disable -main main -calldeps -slice-return main -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" - STDOPT: +"-journal-disable -main main4 -calldeps -slice-return main4 -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" - STDOPT: +"-journal-disable -main main4 -calldeps -slice-return main4 -slicing-level 3 -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" - STDOPT: +"-journal-disable -main main5 -calldeps -slice-return main5 -then-on 'Slicing export' -set-project-as-default -print -eva-show-progress -calldeps -slice-return main5 -then-on 'Slicing export 2' -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" + STDOPT: +"-slice-return main -calldeps -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" + STDOPT: +"-main main2 -slice-return main2 -calldeps -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" + STDOPT: +"-main main3 -slice-return main3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" + STDOPT: +"-journal-disable -main main3 -inout -calldeps -slice-return main3 -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -no-inout" + STDOPT: +"-journal-disable -main main -calldeps -slice-return main -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" + STDOPT: +"-journal-disable -main main4 -calldeps -slice-return main4 -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" + STDOPT: +"-journal-disable -main main4 -calldeps -slice-return main4 -slicing-level 3 -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" + STDOPT: +"-journal-disable -main main5 -calldeps -slice-return main5 -then-on 'Slicing export' -set-project-as-default -print @EVA_OPTIONS@ -calldeps -slice-return main5 -then-on 'Slicing export 2' -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" */ // something to do to have better results... int T[10]; diff --git a/tests/slicing/bts709.c b/tests/slicing/bts709.c index baf67e8b2e5..325e6ba2866 100644 --- a/tests/slicing/bts709.c +++ b/tests/slicing/bts709.c @@ -1,5 +1,5 @@ /* run.config - STDOPT: +"-eva-show-progress -slice-pragma func -no-unicode -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" + STDOPT: +"-slice-pragma func -no-unicode -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-deps" */ #include <assert.h> diff --git a/tests/slicing/combine.i b/tests/slicing/combine.i index 16d12c1adcd..df980abab59 100644 --- a/tests/slicing/combine.i +++ b/tests/slicing/combine.i @@ -1,7 +1,7 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs CMD: @frama-c@ -load-module tests/slicing/libSelect.cmxs -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -eva-show-progress -deps -journal-disable + OPT: @EVA_OPTIONS@ -deps -journal-disable */ //@ assigns \result \from x; diff --git a/tests/slicing/ex_spec_interproc.i b/tests/slicing/ex_spec_interproc.i index 962dd869e61..57bc27bc9ff 100644 --- a/tests/slicing/ex_spec_interproc.i +++ b/tests/slicing/ex_spec_interproc.i @@ -1,7 +1,7 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs CMD: @frama-c@ -load-module tests/slicing/libSelect.cmxs -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -eva-show-progress -deps -journal-disable + OPT: @EVA_OPTIONS@ -deps -journal-disable */ int X, Y; diff --git a/tests/slicing/horwitz.i b/tests/slicing/horwitz.i index 0178857313f..d12de9261ad 100644 --- a/tests/slicing/horwitz.i +++ b/tests/slicing/horwitz.i @@ -1,7 +1,7 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs CMD: @frama-c@ -load-module tests/slicing/libSelect.cmxs -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -eva-show-progress -deps -slicing-level 0 -journal-disable + OPT: @EVA_OPTIONS@ -deps -slicing-level 0 -journal-disable */ /* bin/toplevel.opt -deps -eva @PTEST_DIR@/@PTEST_NAME@.c */ diff --git a/tests/slicing/mark_all_slices.i b/tests/slicing/mark_all_slices.i index d2581222659..d3008f37ba9 100644 --- a/tests/slicing/mark_all_slices.i +++ b/tests/slicing/mark_all_slices.i @@ -1,7 +1,7 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs CMD: @frama-c@ -load-module tests/slicing/libSelect.cmxs -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -eva-show-progress -deps -slicing-level 3 -no-slice-callers -journal-disable + OPT: @EVA_OPTIONS@ -deps -slicing-level 3 -no-slice-callers -journal-disable */ int A, B, C, D; int A2, B2, C2, D2; diff --git a/tests/slicing/merge.i b/tests/slicing/merge.i index bf0509784e3..b255a2c2fe7 100644 --- a/tests/slicing/merge.i +++ b/tests/slicing/merge.i @@ -1,7 +1,7 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs CMD: @frama-c@ -load-module tests/slicing/libSelect.cmxs -load-module tests/slicing/libAnim.cmxs -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -eva-show-progress -deps -slicing-level 3 -journal-disable + OPT: @EVA_OPTIONS@ -deps -slicing-level 3 -journal-disable */ int G1, G2, G3; diff --git a/tests/slicing/min_call.i b/tests/slicing/min_call.i index f7cc89e6a8d..a06325b8a58 100644 --- a/tests/slicing/min_call.i +++ b/tests/slicing/min_call.i @@ -1,7 +1,7 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs CMD: @frama-c@ -load-module tests/slicing/libSelect.cmxs -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -eva-show-progress -deps -lib-entry -main g -journal-disable -slicing-level 3 + OPT: @EVA_OPTIONS@ -deps -lib-entry -main g -journal-disable -slicing-level 3 */ /* dummy source file in order to test minimal calls feature diff --git a/tests/slicing/select_by_annot.i b/tests/slicing/select_by_annot.i index a0cd4471cf1..b7411c47212 100644 --- a/tests/slicing/select_by_annot.i +++ b/tests/slicing/select_by_annot.i @@ -1,22 +1,22 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs CMD: @frama-c@ -load-module tests/slicing/libSelect.cmxs -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -eva-show-progress -deps -lib-entry -main main -journal-disable + OPT: @EVA_OPTIONS@ -deps -lib-entry -main main -journal-disable CMD: bin/toplevel.opt - OPT: -eva-show-progress -check -deps -lib-entry -main main -slice-pragma main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -lib-entry -main main -slice-assert main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -lib-entry -main main -slice-pragma modifS -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -lib-entry -main main -slice-pragma f1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -lib-entry -main main -slice-pragma f2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -lib-entry -main main -slice-pragma f3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -lib-entry -main main -slice-pragma f4 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -lib-entry -main main -slice-pragma f5 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -lib-entry -main main -slice-pragma f6 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -lib-entry -main main -slice-pragma f7 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -lib-entry -main main -slice-loop-inv f8 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -lib-entry -main main -slice-pragma f8 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -lib-entry -main main -slice-assert f8 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps - OPT: -eva-show-progress -check -deps -lib-entry -main main -slice-pragma f9 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + OPT: @EVA_OPTIONS@ -check -deps -lib-entry -main main -slice-pragma main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + OPT: @EVA_OPTIONS@ -check -deps -lib-entry -main main -slice-assert main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + OPT: @EVA_OPTIONS@ -check -deps -lib-entry -main main -slice-pragma modifS -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + OPT: @EVA_OPTIONS@ -check -deps -lib-entry -main main -slice-pragma f1 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + OPT: @EVA_OPTIONS@ -check -deps -lib-entry -main main -slice-pragma f2 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + OPT: @EVA_OPTIONS@ -check -deps -lib-entry -main main -slice-pragma f3 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + OPT: @EVA_OPTIONS@ -check -deps -lib-entry -main main -slice-pragma f4 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + OPT: @EVA_OPTIONS@ -check -deps -lib-entry -main main -slice-pragma f5 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + OPT: @EVA_OPTIONS@ -check -deps -lib-entry -main main -slice-pragma f6 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + OPT: @EVA_OPTIONS@ -check -deps -lib-entry -main main -slice-pragma f7 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + OPT: @EVA_OPTIONS@ -check -deps -lib-entry -main main -slice-loop-inv f8 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + OPT: @EVA_OPTIONS@ -check -deps -lib-entry -main main -slice-pragma f8 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + OPT: @EVA_OPTIONS@ -check -deps -lib-entry -main main -slice-assert f8 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps + OPT: @EVA_OPTIONS@ -check -deps -lib-entry -main main -slice-pragma f9 -no-slice-callers -journal-disable -then-on 'Slicing export' -set-project-as-default -print -check -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -check -no-deps */ diff --git a/tests/slicing/select_simple.i b/tests/slicing/select_simple.i index 9883f3ff583..28face32afa 100644 --- a/tests/slicing/select_simple.i +++ b/tests/slicing/select_simple.i @@ -1,7 +1,7 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs CMD: @frama-c@ -load-module tests/slicing/libSelect.cmxs -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -eva-show-progress -deps -journal-disable + OPT: @EVA_OPTIONS@ -deps -journal-disable */ /* dummy source file in order to test select_simple.ml */ diff --git a/tests/slicing/simple_intra_slice.i b/tests/slicing/simple_intra_slice.i index 72d49734dd7..b4d995b86b2 100644 --- a/tests/slicing/simple_intra_slice.i +++ b/tests/slicing/simple_intra_slice.i @@ -1,7 +1,7 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs CMD: @frama-c@ -load-module tests/slicing/libSelect.cmxs -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -eva-show-progress -deps -no-slice-callers -journal-disable + OPT: @EVA_OPTIONS@ -deps -no-slice-callers -journal-disable */ int Unknown; int G; diff --git a/tests/slicing/slice_no_body.i b/tests/slicing/slice_no_body.i index 2c58ae1277d..8e97f4c920a 100644 --- a/tests/slicing/slice_no_body.i +++ b/tests/slicing/slice_no_body.i @@ -1,7 +1,7 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs CMD: @frama-c@ -load-module tests/slicing/libSelect.cmxs -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -eva-show-progress -deps -lib-entry -main h -journal-disable + OPT: @EVA_OPTIONS@ -deps -lib-entry -main h -journal-disable */ int G; diff --git a/tests/slicing/switch.i b/tests/slicing/switch.i index 0b1ca36ce07..2d7bc906d95 100644 --- a/tests/slicing/switch.i +++ b/tests/slicing/switch.i @@ -1,7 +1,7 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs CMD: @frama-c@ -load-module tests/slicing/libSelect.cmxs -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs - OPT: -eva-show-progress -deps -journal-disable + OPT: @EVA_OPTIONS@ -deps -journal-disable */ int main (char choix) { int x = 0, y = 0, z = 0; diff --git a/tests/slicing/test_config b/tests/slicing/test_config index ab88cd0df15..94edfab69b0 100644 --- a/tests/slicing/test_config +++ b/tests/slicing/test_config @@ -1,2 +1,2 @@ EXECNOW: make -s tests/slicing/libSelect.cmxs tests/slicing/libAnim.cmxs -OPT: -eva-show-progress +OPT: @EVA_OPTIONS@ diff --git a/tests/slicing/unitialized.c b/tests/slicing/unitialized.c index 70693467a8a..ed41732199c 100644 --- a/tests/slicing/unitialized.c +++ b/tests/slicing/unitialized.c @@ -1,8 +1,8 @@ /* run.config - STDOPT: +"-eva-show-progress -slice-pragma g -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " - STDOPT: +"-eva-show-progress -slice-assert g -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " - STDOPT: +"-eva-show-progress -slice-assert main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " - STDOPT: +"-eva-show-progress -slice-return g -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-slice-pragma g -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-slice-assert g -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-slice-assert main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " + STDOPT: +"-slice-return g -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i " */ #ifdef __FRAMAC__ //@ assigns \result \from \nothing; diff --git a/tests/slicing/unravel-point.i b/tests/slicing/unravel-point.i index 02cad10a907..dc07a8049c2 100644 --- a/tests/slicing/unravel-point.i +++ b/tests/slicing/unravel-point.i @@ -1,9 +1,9 @@ /* run.config - STDOPT: +"-calldeps -slice-return send1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" - STDOPT: +"-calldeps -slice-return send2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" - STDOPT: +"-calldeps -slice-return send3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" - STDOPT: +"-calldeps -slice-return send4 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" - STDOPT: +"-calldeps -slice-return send1 -slice-return send4 -journal-disable -then-on 'Slicing export' -eva-show-progress -calldeps -slice-return send1_slice_1 -print -then-on 'Slicing export 2' -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps -eva-show-progress" + STDOPT: +"-calldeps -slice-return send1 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" + STDOPT: +"-calldeps -slice-return send2 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" + STDOPT: +"-calldeps -slice-return send3 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" + STDOPT: +"-calldeps -slice-return send4 -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" + STDOPT: +"-calldeps -slice-return send1 -slice-return send4 -journal-disable -then-on 'Slicing export' @EVA_OPTIONS@ -calldeps -slice-return send1_slice_1 -print -then-on 'Slicing export 2' -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -no-calldeps" diff --git a/tests/slicing/use_spec.i b/tests/slicing/use_spec.i index 40af146f8c5..72c572818b1 100644 --- a/tests/slicing/use_spec.i +++ b/tests/slicing/use_spec.i @@ -1,6 +1,6 @@ /* run.config - STDOPT: +" -eva-use-spec f -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -eva-show-progress" - STDOPT: +"-main main2 -slicing-level 3 -slice-undef-functions -eva-use-spec h -slice-return main2 -journal-disable -slicing-keep-annotations -then-on 'Slicing export' -set-project-as-default -print -eva -eva-use-spec='-@all' -eva-show-progress" + STDOPT: +" -eva-use-spec f -slice-return main -journal-disable -then-on 'Slicing export' -set-project-as-default -print -then -print -ocode @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i -then @PTEST_DIR@/result/ocode_@PTEST_NUMBER@_@PTEST_NAME@.i" + STDOPT: +"-main main2 -slicing-level 3 -slice-undef-functions -eva-use-spec h -slice-return main2 -journal-disable -slicing-keep-annotations -then-on 'Slicing export' -set-project-as-default -print -eva @EVA_OPTIONS@ -eva-use-spec='-@all'" diff --git a/tests/slicing/variadic.c b/tests/slicing/variadic.c index 7dbecd49222..9de40fa3f81 100644 --- a/tests/slicing/variadic.c +++ b/tests/slicing/variadic.c @@ -1,9 +1,9 @@ /* run.config - STDOPT: +"-eva-show-progress -slice-return f3 -no-slice-callers -journal-disable -then-on 'Slicing export' -print" - STDOPT: +"-eva-show-progress -slice-return f3 -no-slice-callers -journal-disable -variadic-no-translation -then-last -print" - STDOPT: +"-eva-show-progress -slice-return f3 -journal-disable -then-on 'Slicing export' -print" - STDOPT: +"-eva-show-progress -slice-return main -journal-disable -then-on 'Slicing export' -print" - STDOPT: +"-eva-show-progress -slice-return main -slicing-level 3 -journal-disable -then-on 'Slicing export' -print" + STDOPT: +"-slice-return f3 -no-slice-callers -journal-disable -then-on 'Slicing export' -print" + STDOPT: +"-slice-return f3 -no-slice-callers -journal-disable -variadic-no-translation -then-last -print" + STDOPT: +"-slice-return f3 -journal-disable -then-on 'Slicing export' -print" + STDOPT: +"-slice-return main -journal-disable -then-on 'Slicing export' -print" + STDOPT: +"-slice-return main -slicing-level 3 -journal-disable -then-on 'Slicing export' -print" */ #include "../pdg/variadic.c" diff --git a/tests/sparecode/test_config b/tests/sparecode/test_config index f46bc3e3975..a9330dd48d0 100644 --- a/tests/sparecode/test_config +++ b/tests/sparecode/test_config @@ -1 +1 @@ -OPT: -journal-disable -eva-show-progress -sparecode-debug 1 +OPT: -journal-disable @EVA_OPTIONS@ -sparecode-debug 1 diff --git a/tests/spec/array_typedef.c b/tests/spec/array_typedef.c index 428631d42b5..86387dcf427 100644 --- a/tests/spec/array_typedef.c +++ b/tests/spec/array_typedef.c @@ -1,5 +1,5 @@ /*run.config - OPT: -print -eva -eva-show-progress -journal-disable + OPT: -print -eva @EVA_CONFIG@ -journal-disable */ #define IP_FIELD 4 typedef int ip_address[IP_FIELD]; diff --git a/tests/spec/assigns_result.i b/tests/spec/assigns_result.i index ed6cce9a19e..f850166909e 100644 --- a/tests/spec/assigns_result.i +++ b/tests/spec/assigns_result.i @@ -1,5 +1,5 @@ /* run.config - STDOPT: +"-deps -eva-show-progress" + STDOPT: +"-deps @EVA_OPTIONS@" */ int X,Y; diff --git a/tests/spec/assigns_void.c b/tests/spec/assigns_void.c index dd592b430a5..6e70195b864 100644 --- a/tests/spec/assigns_void.c +++ b/tests/spec/assigns_void.c @@ -1,6 +1,6 @@ /* run.config OPT: -print -journal-disable -kernel-warn-key=annot-error=active - OPT: -eva -eva-show-progress -main g -print -no-annot -journal-disable + OPT: -eva @EVA_CONFIG@ -main g -print -no-annot -journal-disable */ //@ assigns *x; void f(void *x); diff --git a/tests/spec/behavior_assert.c b/tests/spec/behavior_assert.c index 6b0939f5160..2f5d7f97605 100644 --- a/tests/spec/behavior_assert.c +++ b/tests/spec/behavior_assert.c @@ -1,6 +1,6 @@ /* run.config -OPT: -eva -eva-show-progress -deps -out -input -journal-disable -lib-entry -OPT: -eva -eva-show-progress -deps -out -input -journal-disable +OPT: -eva @EVA_CONFIG@ -deps -out -input -journal-disable -lib-entry +OPT: -eva @EVA_CONFIG@ -deps -out -input -journal-disable */ int e; diff --git a/tests/spec/preprocess.c b/tests/spec/preprocess.c index db8406068d2..f22fa57e73e 100644 --- a/tests/spec/preprocess.c +++ b/tests/spec/preprocess.c @@ -1,5 +1,5 @@ /* run.config - OPT: -pp-annot -eva -eva-show-progress -journal-disable + OPT: -pp-annot -eva @EVA_CONFIG@ -journal-disable */ // see bts 1357 diff --git a/tests/spec/shifts.c b/tests/spec/shifts.c index 349f47cc445..a7d934e68da 100644 --- a/tests/spec/shifts.c +++ b/tests/spec/shifts.c @@ -1,5 +1,5 @@ /* run.config - OPT: -eva -eva-show-progress -deps -journal-disable + OPT: -eva @EVA_CONFIG@ -deps -journal-disable */ int e; diff --git a/tests/spec/statement_behavior.c b/tests/spec/statement_behavior.c index a07de2bcdd4..e91bc047236 100644 --- a/tests/spec/statement_behavior.c +++ b/tests/spec/statement_behavior.c @@ -1,5 +1,5 @@ /* run.config - OPT: -eva -eva-show-progress -inout -journal-disable + OPT: -eva @EVA_CONFIG@ -inout -journal-disable */ /*@ ensures \result == (int)(5 * x); */ diff --git a/tests/syntax/Refresh_visitor.i b/tests/syntax/Refresh_visitor.i index 0786760a68f..edf44c1c372 100644 --- a/tests/syntax/Refresh_visitor.i +++ b/tests/syntax/Refresh_visitor.i @@ -1,6 +1,6 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs -OPT: -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs -eva-show-progress +OPT: -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs @EVA_OPTIONS@ */ struct S { int i; }; diff --git a/tests/syntax/copy_visitor.i b/tests/syntax/copy_visitor.i index 5d4fe0c44c0..2f475d79ae7 100644 --- a/tests/syntax/copy_visitor.i +++ b/tests/syntax/copy_visitor.i @@ -1,5 +1,5 @@ /* run.config - STDOPT: +"-copy -eva -eva-show-progress" + STDOPT: +"-copy -eva @EVA_CONFIG@" */ struct S { int a; diff --git a/tests/syntax/extern_init.i b/tests/syntax/extern_init.i index f236a513e93..e6773ed7008 100644 --- a/tests/syntax/extern_init.i +++ b/tests/syntax/extern_init.i @@ -1,6 +1,6 @@ /* run.config -OPT: @PTEST_DIR@/@PTEST_NAME@_1.i @PTEST_DIR@/@PTEST_NAME@_2.i -eva -eva-show-progress -OPT: @PTEST_DIR@/@PTEST_NAME@_2.i @PTEST_DIR@/@PTEST_NAME@_1.i -eva -eva-show-progress +OPT: @PTEST_DIR@/@PTEST_NAME@_1.i @PTEST_DIR@/@PTEST_NAME@_2.i -eva @EVA_CONFIG@ +OPT: @PTEST_DIR@/@PTEST_NAME@_2.i @PTEST_DIR@/@PTEST_NAME@_1.i -eva @EVA_CONFIG@ */ extern int a[] ; diff --git a/tests/syntax/unroll_labels.i b/tests/syntax/unroll_labels.i index 16fd8a5807b..4807505a700 100644 --- a/tests/syntax/unroll_labels.i +++ b/tests/syntax/unroll_labels.i @@ -1,6 +1,6 @@ /* run.config - STDOPT: +"-eva -eva-show-progress" - STDOPT: +"-eva -eva-show-progress -main main2 -slevel 3" + STDOPT: +"-eva @EVA_CONFIG@" + STDOPT: +"-eva @EVA_CONFIG@ -main main2 -slevel 3" */ enum { SIX = 6 } ; volatile foo; diff --git a/tests/syntax/unroll_visit.i b/tests/syntax/unroll_visit.i index f086d3ab95f..38d55c380b6 100644 --- a/tests/syntax/unroll_visit.i +++ b/tests/syntax/unroll_visit.i @@ -1,5 +1,5 @@ /* run.config - STDOPT: +"-eva -eva-show-progress -deps -out -input -deps" + STDOPT: +"-eva @EVA_CONFIG@ -deps -out -input -deps" */ void main() { /*@ loop pragma UNROLL 2; */ -- GitLab From dde076695567e891bd9eefd3c75e3ea7e9cfe4dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 4 Apr 2019 13:58:49 +0200 Subject: [PATCH 200/376] [Eva] Updates test oracles for alternative domains. --- tests/builtins/diff_apron | 126 ++++++++++++++++++++++++++++++++- tests/builtins/diff_bitwise | 44 +++++++++++- tests/builtins/diff_equalities | 4 +- tests/builtins/diff_gauges | 4 +- tests/builtins/diff_symblocs | 4 +- 5 files changed, 172 insertions(+), 10 deletions(-) diff --git a/tests/builtins/diff_apron b/tests/builtins/diff_apron index 6e0afb298cf..7aadf1b8caf 100644 --- a/tests/builtins/diff_apron +++ b/tests/builtins/diff_apron @@ -1,12 +1,134 @@ diff tests/builtins/oracle/Longinit_sequencer.res.oracle tests/builtins/oracle_apron/Longinit_sequencer.res.oracle -323c323 +62,65c62,81 +< [eva] tests/builtins/long_init.c:29: Reusing old results for call to subanalyze +< [eva] tests/builtins/long_init.c:29: Reusing old results for call to subanalyze +< [eva] tests/builtins/long_init.c:29: Reusing old results for call to subanalyze +< [eva] tests/builtins/long_init.c:29: Reusing old results for call to subanalyze +--- +> [eva] computing for function subanalyze <- analyze <- init_inner <- init_outer <- +> main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- init_inner <- init_outer <- +> main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- init_inner <- init_outer <- +> main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- init_inner <- init_outer <- +> main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +153,154c169,216 +< [eva] tests/builtins/long_init.c:93: Reusing old results for call to analyze +< [eva] tests/builtins/long_init.c:94: Reusing old results for call to analyze +--- +> [eva] computing for function analyze <- main. +> Called from tests/builtins/long_init.c:93. +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] Recording results for analyze +> [eva] Done for function analyze +> [eva] computing for function analyze <- main. +> Called from tests/builtins/long_init.c:94. +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] Recording results for analyze +> [eva] Done for function analyze +327c389 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_apron/Longinit_sequencer.sav -562c562 +421,424c483,498 +< [eva] tests/builtins/long_init2.c:29: Reusing old results for call to subanalyze +< [eva] tests/builtins/long_init2.c:29: Reusing old results for call to subanalyze +< [eva] tests/builtins/long_init2.c:29: Reusing old results for call to subanalyze +< [eva] tests/builtins/long_init2.c:29: Reusing old results for call to subanalyze +--- +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init2.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init2.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init2.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init2.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +568c642 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_apron/Longinit_sequencer.sav +658,661c732,747 +< [eva] tests/builtins/long_init3.c:29: Reusing old results for call to subanalyze +< [eva] tests/builtins/long_init3.c:29: Reusing old results for call to subanalyze +< [eva] tests/builtins/long_init3.c:29: Reusing old results for call to subanalyze +< [eva] tests/builtins/long_init3.c:29: Reusing old results for call to subanalyze +--- +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init3.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init3.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init3.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init3.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze diff tests/builtins/oracle/allocated.0.res.oracle tests/builtins/oracle_apron/allocated.0.res.oracle 260a261,263 > [eva] tests/builtins/allocated.c:127: Call to builtin __fc_vla_alloc diff --git a/tests/builtins/diff_bitwise b/tests/builtins/diff_bitwise index a446ce5ec81..0017418c9fb 100644 --- a/tests/builtins/diff_bitwise +++ b/tests/builtins/diff_bitwise @@ -1,9 +1,49 @@ diff tests/builtins/oracle/Longinit_sequencer.res.oracle tests/builtins/oracle_bitwise/Longinit_sequencer.res.oracle -323c323 +153,154c153,188 +< [eva] tests/builtins/long_init.c:93: Reusing old results for call to analyze +< [eva] tests/builtins/long_init.c:94: Reusing old results for call to analyze +--- +> [eva] computing for function analyze <- main. +> Called from tests/builtins/long_init.c:93. +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] Recording results for analyze +> [eva] Done for function analyze +> [eva] computing for function analyze <- main. +> Called from tests/builtins/long_init.c:94. +> [eva] tests/builtins/long_init.c:29: Reusing old results for call to subanalyze +> [eva] tests/builtins/long_init.c:29: Reusing old results for call to subanalyze +> [eva] tests/builtins/long_init.c:29: Reusing old results for call to subanalyze +> [eva] tests/builtins/long_init.c:29: Reusing old results for call to subanalyze +> [eva] computing for function subanalyze <- analyze <- main. +> Called from tests/builtins/long_init.c:29. +> [eva] Recording results for subanalyze +> [eva] Done for function subanalyze +> [eva] Recording results for analyze +> [eva] Done for function analyze +327c361 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_bitwise/Longinit_sequencer.sav -562c562 +568c602 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_bitwise/Longinit_sequencer.sav diff --git a/tests/builtins/diff_equalities b/tests/builtins/diff_equalities index 534763b2be1..bb058d3aba7 100644 --- a/tests/builtins/diff_equalities +++ b/tests/builtins/diff_equalities @@ -1,9 +1,9 @@ diff tests/builtins/oracle/Longinit_sequencer.res.oracle tests/builtins/oracle_equalities/Longinit_sequencer.res.oracle -323c323 +327c327 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_equalities/Longinit_sequencer.sav -562c562 +568c568 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_equalities/Longinit_sequencer.sav diff --git a/tests/builtins/diff_gauges b/tests/builtins/diff_gauges index f8f6c848e6d..5a276d3cf19 100644 --- a/tests/builtins/diff_gauges +++ b/tests/builtins/diff_gauges @@ -1,9 +1,9 @@ diff tests/builtins/oracle/Longinit_sequencer.res.oracle tests/builtins/oracle_gauges/Longinit_sequencer.res.oracle -323c323 +327c327 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_gauges/Longinit_sequencer.sav -562c562 +568c568 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_gauges/Longinit_sequencer.sav diff --git a/tests/builtins/diff_symblocs b/tests/builtins/diff_symblocs index fc36c7d36a2..f82ea2c45a6 100644 --- a/tests/builtins/diff_symblocs +++ b/tests/builtins/diff_symblocs @@ -1,9 +1,9 @@ diff tests/builtins/oracle/Longinit_sequencer.res.oracle tests/builtins/oracle_symblocs/Longinit_sequencer.res.oracle -323c323 +327c327 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_symblocs/Longinit_sequencer.sav -562c562 +568c568 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_symblocs/Longinit_sequencer.sav -- GitLab From 49b04095b397dc140cb860fb79b723ba77dfebe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 1 Mar 2019 15:07:22 +0100 Subject: [PATCH 201/376] [Eva] Prints a summary of the analysis at the end. --- src/plugins/value/engine/compute_functions.ml | 1 + src/plugins/value/utils/value_results.ml | 230 ++++++++++++++++++ src/plugins/value/utils/value_results.mli | 2 + src/plugins/value/value_parameters.ml | 3 +- src/plugins/value/value_parameters.mli | 1 + 5 files changed, 236 insertions(+), 1 deletion(-) diff --git a/src/plugins/value/engine/compute_functions.ml b/src/plugins/value/engine/compute_functions.ml index 409a3b2a285..13a6e265714 100644 --- a/src/plugins/value/engine/compute_functions.ml +++ b/src/plugins/value/engine/compute_functions.ml @@ -347,6 +347,7 @@ module Make (Abstract: Abstractions.Eva) = struct Value_parameters.feedback "done for function %a" Kernel_function.pretty kf; post_analysis (); Abstract.Dom.post_analysis final_state; + Value_results.print_summary (); with | Db.Value.Aborted -> post_analysis_cleanup ~aborted:true; diff --git a/src/plugins/value/utils/value_results.ml b/src/plugins/value/utils/value_results.ml index c9db33d1cca..08ccbe8ea20 100644 --- a/src/plugins/value/utils/value_results.ml +++ b/src/plugins/value/utils/value_results.ml @@ -355,6 +355,236 @@ let merge r1 r2 = { main; before_states; after_states; kf_initial_states; kf_is_called; initial_state; initial_args; alarms; statuses; kf_callers } +(* ---------------------- Printing an analysis summary ---------------------- *) + +open Cil_types + +let plural count = if count = 1 then "" else "s" + +let consider_function vi = + not (Cil.is_builtin vi + || Cil.is_special_builtin vi.vname + || Cil.hasAttribute "fc_stdlib" vi.vattr + || Cil.hasAttribute "fc_stdlib_generated" vi.vattr) + +let print_coverage fmt = + let ignored, analyzed = ref 0, ref 0 + and dead, reachable = ref 0, ref 0 in + let is_reachable = Db.Value.is_reachable_stmt in + let do_stmt stmt = incr (if is_reachable stmt then reachable else dead) in + let visit fundec = + if consider_function fundec.svar then + if is_called (Globals.Functions.get fundec.svar) + then (incr analyzed; List.iter do_stmt fundec.sallstmts) + else incr ignored + in + Globals.Functions.iter_on_fundecs visit; + let all = !dead + !analyzed in + if all = 0 + then Format.fprintf fmt "No function to be analyzed.@;" + else + Format.fprintf fmt + "%i function%s analyzed (out of %i): %i%% coverage.@;" + !analyzed (plural !analyzed) all (!analyzed * 100 / all); + let total = !dead + !reachable in + if !analyzed > 0 && total > 0 then + Format.fprintf fmt + "In %s, %i statements reached (out of %i): %i%% coverage.@;" + (if !analyzed > 1 then "these functions" else "this function") + !reachable total (!reachable * 100 / total) + +let print_warning fmt = + let eva_warnings, eva_errors = ref 0, ref 0 + and kernel_warnings, kernel_errors = ref 0, ref 0 in + let report_event event = + let open Log in + match event.evt_kind, event.evt_plugin with + | Warning, "eva" when event.evt_category <> Some "alarm" -> incr eva_warnings + | Warning, name when name = Log.kernel_label_name -> incr kernel_warnings + | Error, "eva" when event.evt_category <> Some "alarm" -> incr eva_errors + | Error, name when name = Log.kernel_label_name -> incr kernel_errors + | _ -> () + in + Messages.iter report_event; + let total = !eva_errors + !eva_warnings + !kernel_errors + !kernel_warnings in + if total = 0 + then Format.fprintf fmt "No errors or warnings raised during the analysis.@;" + else + let print str errors warnings = + Format.fprintf fmt " by %-19s %3i error%s %3i warning%s@;" + (str ^ ":") errors (plural errors) warnings (plural warnings) + in + Format.fprintf fmt + "Some errors and warnings have been raised during the analysis:@;"; + print "the Eva analyzer" !eva_errors !eva_warnings; + print "the Frama-C kernel" !kernel_errors !kernel_warnings + +type alarms = + { division_by_zero: int ref; + memory_access: int ref; + index_out_of_bound: int ref; + overflow: int ref; + invalid_shift: int ref; + uninitialized: int ref; + dangling: int ref; + nan_or_infinite: int ref; + float_to_int: int ref; + others: int ref; } + +type statuses = { valid: int ref; unknown: int ref; invalid: int ref; } + +type report = + { alarms: statuses * alarms; + assertions: statuses; + preconds: statuses; } + +let empty_report () = + let empty () = { valid = ref 0; unknown = ref 0; invalid = ref 0 } in + let empty_alarms = + { division_by_zero = ref 0; + memory_access = ref 0; + index_out_of_bound = ref 0; + overflow = ref 0; + invalid_shift = ref 0; + uninitialized = ref 0; + dangling = ref 0; + nan_or_infinite = ref 0; + float_to_int = ref 0; + others = ref 0; } + in + { alarms = empty (), empty_alarms; + assertions = empty (); + preconds = empty (); } + +let report_alarm report alarm = + let open Alarms in + let counter = match alarm with + | Division_by_zero _ -> report.division_by_zero + | Memory_access _ -> report.memory_access + | Index_out_of_bound _ -> report.index_out_of_bound + | Invalid_shift _ -> report.invalid_shift + | Overflow _ -> report.overflow + | Uninitialized _ -> report.uninitialized + | Dangling _ -> report.dangling + | Is_nan_or_infinite _ + | Is_nan _ -> report.nan_or_infinite + | Float_to_int _ -> report.float_to_int + | _ -> report.others + in + incr counter + +let eva_emitter = Value_util.emitter + +let get_status ip = + let aux_status emitter status acc = + let emitter = Emitter.Usable_emitter.get emitter.Property_status.emitter in + if Emitter.equal eva_emitter emitter + then Some status + else acc + in + Property_status.fold_on_statuses aux_status ip None + +let report_status acc = function + | None -> () + | Some status -> match status with + | Property_status.Dont_know -> incr acc.unknown + | Property_status.True -> incr acc.valid + | Property_status.False_if_reachable + | Property_status.False_and_reachable -> incr acc.invalid + +let make_report () = + let report = empty_report () in + let report_property ip = + match ip with + | Property.IPCodeAnnot (_kf, _stmt, code_annot) -> + begin + let status = get_status ip in + match Alarms.find code_annot with + | None -> report_status report.assertions status + | Some alarm -> + let acc_status, acc_alarms = report.alarms in + report_status acc_status status; + report_alarm acc_alarms alarm + end + | Property.IPPropertyInstance _ -> + let status = get_status ip in + report_status report.preconds status + | _ -> () + in + Property_status.iter report_property; + report + +let print_alarms_kind fmt kind = + let print count str plural str' = + if !count > 0 then + Format.fprintf fmt " %4i %s%s%s@;" + !count str (if !count > 1 then plural else "") str' + in + print kind.division_by_zero "division" "s" " by zero"; + print kind.memory_access "invalid memory access" "es" ""; + print kind.index_out_of_bound "access" "es" " out of bounds index"; + print kind.overflow "integer overflow" "s" ""; + print kind.invalid_shift "invalid shift" "s" ""; + print kind.uninitialized "access" "es" " to uninitialized left-values"; + print kind.dangling "escaping address" "es" ""; + print kind.nan_or_infinite "nan or infinite floating-point value" "s" ""; + print kind.float_to_int "illegal conversion" "s" " from floating-point to integer"; + print kind.others "other" "s" "" + +let print_alarms fmt report = + let alarms, kind = report.alarms in + let total = !(alarms.unknown) + !(alarms.invalid) in + Format.fprintf fmt "%i alarm%s generated by the analysis" total (plural total); + if total = !(kind.others) + then Format.fprintf fmt ".@;" + else Format.fprintf fmt ":@;%a" print_alarms_kind kind; + let invalid = !(alarms.invalid) in + if invalid > 0 then + Format.fprintf fmt "%i of them %s sure alarm%s (invalid status).@;" + invalid (if invalid = 1 then "is a" else "are") (plural invalid) + +let print_properties fmt report = + let { assertions; preconds } = report in + let total acc = !(acc.valid) + !(acc.unknown) + !(acc.invalid) in + let total_assertions = total assertions + and total_preconds = total preconds in + let total = total_assertions + total_preconds in + if total = 0 + then + Format.fprintf fmt + "No logical properties have been reached by the analysis.@;" + else + let print_line header status total = + Format.fprintf fmt + " %-14s %4d valid %4d unknown %4d invalid %4d total@;" + header !(status.valid) !(status.unknown) !(status.invalid) total; + in + Format.fprintf fmt + "Evaluation of the logical properties reached by the analysis:@;"; + print_line "Assertions" assertions total_assertions; + print_line "Preconditions" preconds total_preconds; + let proven = !(assertions.valid) + !(preconds.valid) in + let proven = proven * 100 / total in + Format.fprintf fmt + "%i%% of the logical properties reached have been proven.@;" proven + +let print_summary fmt = + let bar = String.make 76 '-' in + let report = make_report () in + Format.fprintf fmt "%s@;" bar; + print_coverage fmt; + Format.fprintf fmt "%s@;" bar; + print_warning fmt; + Format.fprintf fmt "%s@;" bar; + print_alarms fmt report; + Format.fprintf fmt "%s@;" bar; + print_properties fmt report; + Format.fprintf fmt "%s" bar + +let print_summary () = + let dkey = Value_parameters.dkey_summary in + let header fmt = Format.fprintf fmt " ====== ANALYSIS SUMMARY ======" in + Value_parameters.printf ~header ~dkey ~level:1 " @[<v>%t@]" print_summary (* Local Variables: diff --git a/src/plugins/value/utils/value_results.mli b/src/plugins/value/utils/value_results.mli index ae92d8878ad..5238a634bbf 100644 --- a/src/plugins/value/utils/value_results.mli +++ b/src/plugins/value/utils/value_results.mli @@ -46,6 +46,8 @@ val change_callstacks: For technical reasons, the top of the callstack must currently be preserved. *) +(** Prints a summary of the analysis. *) +val print_summary: unit -> unit (* Local Variables: diff --git a/src/plugins/value/value_parameters.ml b/src/plugins/value/value_parameters.ml index 0f8cb4ca773..7b0254eb485 100644 --- a/src/plugins/value/value_parameters.ml +++ b/src/plugins/value/value_parameters.ml @@ -70,6 +70,7 @@ let () = add_plugin_output_aliases [ "value" ] (* Debug categories. *) let dkey_initial_state = register_category "initial-state" let dkey_final_states = register_category "final-states" +let dkey_summary = register_category "summary" let dkey_pointer_comparison = register_category "pointer-comparison" let dkey_cvalue_domain = register_category "d-cvalue" let dkey_incompatible_states = register_category "incompatible-states" @@ -80,7 +81,7 @@ let dkey_widening = register_category "widening" let () = let activate dkey = add_debug_keys dkey in List.iter activate - [dkey_initial_state; dkey_final_states; dkey_cvalue_domain] + [dkey_initial_state; dkey_final_states; dkey_summary; dkey_cvalue_domain] (* Warning categories. *) let wkey_alarm = register_warn_category "alarm" diff --git a/src/plugins/value/value_parameters.mli b/src/plugins/value/value_parameters.mli index 1edd3dac575..c6a81aa6e93 100644 --- a/src/plugins/value/value_parameters.mli +++ b/src/plugins/value/value_parameters.mli @@ -166,6 +166,7 @@ val parameters_abstractions: Typed_parameter.t list -value-msg-key="-initial_state,-final_state" *) val dkey_initial_state : category val dkey_final_states : category +val dkey_summary : category (** Warning category used when emitting an alarm in "warning" mode. *) val wkey_alarm: warn_category -- GitLab From 02c586ee37ec13576ca2e690647bda1ea9c42464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 4 Apr 2019 11:16:33 +0200 Subject: [PATCH 202/376] [Eva] Do not print the summary in Frama-C tests. As it is redundant with all the information displayed during the analysis. --- src/plugins/nonterm/tests/test_config | 2 +- src/plugins/variadic/tests/test_config | 2 +- tests/idct/ieee_1180_1990.c | 2 +- tests/test_config | 2 +- tests/test_config_apron | 2 +- tests/test_config_bitwise | 2 +- tests/test_config_equalities | 2 +- tests/test_config_gauges | 2 +- tests/test_config_symblocs | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/nonterm/tests/test_config b/src/plugins/nonterm/tests/test_config index 32af2023751..1d678ae3e1a 100644 --- a/src/plugins/nonterm/tests/test_config +++ b/src/plugins/nonterm/tests/test_config @@ -1 +1 @@ -OPT: -no-autoload-plugins -load-module from,inout,nonterm,scope -val -val-show-progress -then -nonterm -nonterm-verbose 2 +OPT: -no-autoload-plugins -load-module from,inout,nonterm,scope -val -val-show-progress -eva-msg-key=-summary -then -nonterm -nonterm-verbose 2 diff --git a/src/plugins/variadic/tests/test_config b/src/plugins/variadic/tests/test_config index 70aafaf12a6..9d83090791b 100644 --- a/src/plugins/variadic/tests/test_config +++ b/src/plugins/variadic/tests/test_config @@ -1 +1 @@ -OPT: -no-autoload-plugins -load-module from,inout,eva,variadic,scope -check -print -kernel-verbose 0 -variadic-verbose 2 -eva -slevel 10 -eva-msg-key=-initial-state -eva-no-show-progress -eva-print +OPT: -no-autoload-plugins -load-module from,inout,eva,variadic,scope -check -print -kernel-verbose 0 -variadic-verbose 2 -eva -slevel 10 -eva-msg-key=-initial-state,-summary -eva-no-show-progress -eva-print diff --git a/tests/idct/ieee_1180_1990.c b/tests/idct/ieee_1180_1990.c index 1f0f4325eeb..6c5b0285d74 100644 --- a/tests/idct/ieee_1180_1990.c +++ b/tests/idct/ieee_1180_1990.c @@ -1,6 +1,6 @@ /* run.config* GCC: - STDOPT: +"-load-module report,scope,variadic -float-normal -no-warn-signed-overflow tests/idct/idct.c -remove-redundant-alarms -eva-memexec -eva-builtin sqrt:Frama_C_sqrt,cos:Frama_C_cos -then -report -report-print-properties" + STDOPT: +"-eva-msg-key=summary -load-module report,scope,variadic -float-normal -no-warn-signed-overflow tests/idct/idct.c -remove-redundant-alarms -eva-memexec -eva-builtin sqrt:Frama_C_sqrt,cos:Frama_C_cos -then -report -report-print-properties" */ /* IEEE_1180_1990: a testbed for IDCT accuracy * Copyright (C) 2001 Renaud Pacalet diff --git a/tests/test_config b/tests/test_config index 10fa9a74e56..6efe608ac84 100644 --- a/tests/test_config +++ b/tests/test_config @@ -1,3 +1,3 @@ -MACRO: EVA_OPTIONS -eva-show-progress +MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key=-summary MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/test_config_apron b/tests/test_config_apron index ccb5342259c..2d6cff1926f 100644 --- a/tests/test_config_apron +++ b/tests/test_config_apron @@ -1,3 +1,3 @@ -MACRO: EVA_OPTIONS -eva-show-progress -eva-apron-oct -eva-msg-key experimental-ok +MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key=-summary -eva-apron-oct -eva-msg-key experimental-ok MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/test_config_bitwise b/tests/test_config_bitwise index 146e7721ea2..7e1be236655 100644 --- a/tests/test_config_bitwise +++ b/tests/test_config_bitwise @@ -1,3 +1,3 @@ -MACRO: EVA_OPTIONS -eva-show-progress -eva-bitwise-domain +MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key=-summary -eva-bitwise-domain MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/test_config_equalities b/tests/test_config_equalities index 1e592c46e5c..d84a7e2a8b2 100644 --- a/tests/test_config_equalities +++ b/tests/test_config_equalities @@ -1,3 +1,3 @@ -MACRO: EVA_OPTIONS -eva-show-progress -eva-equality-domain +MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key=-summary -eva-equality-domain MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/test_config_gauges b/tests/test_config_gauges index 7e0fb7cbdac..b6a460ae1e4 100644 --- a/tests/test_config_gauges +++ b/tests/test_config_gauges @@ -1,3 +1,3 @@ -MACRO: EVA_OPTIONS -eva-show-progress -eva-gauges-domain +MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key=-summary -eva-gauges-domain MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps diff --git a/tests/test_config_symblocs b/tests/test_config_symblocs index 77ad2e24740..47ce23088d4 100644 --- a/tests/test_config_symblocs +++ b/tests/test_config_symblocs @@ -1,3 +1,3 @@ -MACRO: EVA_OPTIONS -eva-show-progress -eva-symbolic-locations-domain +MACRO: EVA_OPTIONS -eva-show-progress -eva-msg-key=-summary -eva-symbolic-locations-domain MACRO: EVA_CONFIG @EVA_OPTIONS@ -no-autoload-plugins -load-module from,inout,eva,scope,variadic OPT: -eva @EVA_CONFIG@ -journal-disable -out -input -deps -- GitLab From febed78113f546a5ed08355fd0f2e0f5106828b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 4 Apr 2019 11:19:10 +0200 Subject: [PATCH 203/376] [Eva] Updates test oracles with the analysis summary. --- .../oracle/with_value.res.oracle | 12 ++++++ .../report/tests/report/oracle/csv.res.oracle | 40 +++++++++++++++++++ .../tests/wp_acsl/oracle/checks.0.res.oracle | 14 +++++++ ...iter_over_unregistered_function.res.oracle | 13 ++++++ .../oracle/no_fp_unsound_warning.0.res.oracle | 11 +++++ .../oracle/no_fp_unsound_warning.1.res.oracle | 11 +++++ tests/idct/oracle/ieee_1180_1990.res.oracle | 18 +++++++++ tests/impact/oracle/depend5.res.oracle | 11 +++++ tests/journal/oracle/control.0.res.oracle | 12 ++++++ tests/journal/oracle/control.1.res.oracle | 26 ++++++++++++ tests/journal/oracle/control2.res.oracle | 24 +++++++++++ tests/journal/oracle/control2_sav.res | 26 ++++++++++++ tests/journal/oracle/intra.res.oracle | 16 ++++++++ tests/metrics/oracle/func_ptr.0.res.oracle | 13 ++++++ tests/metrics/oracle/func_ptr.1.res.oracle | 13 ++++++ tests/metrics/oracle/libc.0.res.oracle | 14 +++++++ tests/metrics/oracle/libc.1.res.oracle | 14 +++++++ tests/metrics/oracle/reach.res.oracle | 11 +++++ tests/metrics/oracle/unreachable.res.oracle | 22 ++++++++++ tests/misc/oracle/bts1201.res.oracle | 28 +++++++++++++ tests/misc/oracle/change_main.res.oracle | 22 ++++++++++ tests/misc/oracle/ensures.res.oracle | 11 +++++ tests/misc/oracle/well_typed_alarm.res.oracle | 11 +++++ tests/saveload/oracle/basic_sav.1.res | 15 +++++++ tests/saveload/oracle/basic_sav.res | 15 +++++++ tests/saveload/oracle/bool_sav.res | 15 +++++++ tests/saveload/oracle/callbacks_initial.res | 11 +++++ tests/saveload/oracle/deps_sav.res | 12 ++++++ .../oracle/multi_project.1.res.oracle | 14 +++++++ tests/saveload/oracle/multi_project_sav.res | 14 +++++++ .../oracle/segfault_datatypes_sav.res | 12 ++++++ tests/saveload/oracle/sparecode_sav.res | 11 +++++ .../oracle/default_assigns_bts0966.res.oracle | 13 ++++++ tests/spec/oracle/logic_def.res.oracle | 14 +++++++ tests/syntax/oracle/copy_logic.res.oracle | 15 +++++++ .../loop-case-switch-for-unroll.0.res.oracle | 11 +++++ .../loop-case-switch-for-unroll.1.res.oracle | 11 +++++ .../loop-case-switch-for-unroll.2.res.oracle | 11 +++++ .../value/numerors/oracle/numerors.res.oracle | 16 ++++++++ 39 files changed, 603 insertions(+) diff --git a/src/plugins/loop_analysis/tests/loop_analysis/oracle/with_value.res.oracle b/src/plugins/loop_analysis/tests/loop_analysis/oracle/with_value.res.oracle index 504e31673b1..2532c0705de 100644 --- a/src/plugins/loop_analysis/tests/loop_analysis/oracle/with_value.res.oracle +++ b/src/plugins/loop_analysis/tests/loop_analysis/oracle/with_value.res.oracle @@ -412,6 +412,18 @@ i ∈ {-154} [eva:final-states] Values at end of function main: __retres ∈ {0} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 46 functions analyzed (out of 46): 100% coverage. + In these functions, 329 statements reached (out of 329): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 22 alarms generated by the analysis: + 22 integer overflows + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [loop] Functions with loops whose bounds we could not find: g1 g2 diff --git a/src/plugins/report/tests/report/oracle/csv.res.oracle b/src/plugins/report/tests/report/oracle/csv.res.oracle index 639393b8a5a..aaf1752f36f 100644 --- a/src/plugins/report/tests/report/oracle/csv.res.oracle +++ b/src/plugins/report/tests/report/oracle/csv.res.oracle @@ -67,6 +67,26 @@ r ∈ [-1.79769313486e+308 .. 1.79769313486e+308] [eva:final-states] Values at end of function main: +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 5 functions analyzed (out of 5): 100% coverage. + In these functions, 23 statements reached (out of 23): 100% coverage. + ---------------------------------------------------------------------------- + Some errors and warnings have been raised during the analysis: + by the Eva analyzer: 0 errors 0 warnings + by the Frama-C kernel: 0 errors 1 warning + ---------------------------------------------------------------------------- + 7 alarms generated by the analysis: + 2 accesses out of bounds index + 2 integer overflows + 2 accesses to uninitialized left-values + 1 nan or infinite floating-point value + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 0 valid 0 unknown 0 invalid 0 total + Preconditions 2 valid 4 unknown 1 invalid 7 total + 28% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- [report] Dumping properties in 'tests/report/result/csv.csv' [eva] Analyzing a complete application starting at main [eva] Computing initial state @@ -152,3 +172,23 @@ r ∈ [-1.79769313486e+308 .. 1.79769313486e+308] [eva:final-states] Values at end of function main: +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 5 functions analyzed (out of 5): 100% coverage. + In these functions, 23 statements reached (out of 23): 100% coverage. + ---------------------------------------------------------------------------- + Some errors and warnings have been raised during the analysis: + by the Eva analyzer: 0 errors 0 warnings + by the Frama-C kernel: 0 errors 1 warning + ---------------------------------------------------------------------------- + 7 alarms generated by the analysis: + 2 accesses out of bounds index + 2 integer overflows + 2 accesses to uninitialized left-values + 1 nan or infinite floating-point value + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 0 valid 0 unknown 0 invalid 0 total + Preconditions 2 valid 4 unknown 1 invalid 7 total + 28% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_acsl/oracle/checks.0.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle/checks.0.res.oracle index a99ec33e26d..bae891952be 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle/checks.0.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle/checks.0.res.oracle @@ -42,6 +42,20 @@ Prove: true. [eva] ====== VALUES COMPUTED ====== [eva:final-states] Values at end of function main: +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 5 statements reached (out of 5): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 0 valid 4 unknown 0 invalid 4 total + Preconditions 0 valid 0 unknown 0 invalid 0 total + 0% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- [report] Computing properties status... -------------------------------------------------------------------------------- --- Global Properties diff --git a/tests/callgraph/oracle/issue_55_iter_over_unregistered_function.res.oracle b/tests/callgraph/oracle/issue_55_iter_over_unregistered_function.res.oracle index 912046cbc68..f2b3a6b7386 100644 --- a/tests/callgraph/oracle/issue_55_iter_over_unregistered_function.res.oracle +++ b/tests/callgraph/oracle/issue_55_iter_over_unregistered_function.res.oracle @@ -9,6 +9,19 @@ [eva] done for function main [eva] tests/callgraph/issue_55_iter_over_unregistered_function.i:12: assertion 'Eva,initialization' got final status invalid. +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 3): 33% coverage. + In this function, 1 statements reached (out of 3): 33% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 1 alarm generated by the analysis: + 1 access to uninitialized left-values + 1 of them is a sure alarm (invalid status). + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [inout] InOut (internal) for function main: Operational inputs: q diff --git a/tests/callgraph/oracle/no_fp_unsound_warning.0.res.oracle b/tests/callgraph/oracle/no_fp_unsound_warning.0.res.oracle index f92e8ed4637..302afc81d0d 100644 --- a/tests/callgraph/oracle/no_fp_unsound_warning.0.res.oracle +++ b/tests/callgraph/oracle/no_fp_unsound_warning.0.res.oracle @@ -5,5 +5,16 @@ [eva:initial-state] Values of globals at initialization [eva] done for function main +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 1 statements reached (out of 1): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [inout] Out (internal) for function main: \nothing diff --git a/tests/callgraph/oracle/no_fp_unsound_warning.1.res.oracle b/tests/callgraph/oracle/no_fp_unsound_warning.1.res.oracle index 4f2c24befe2..69a91fb9cf5 100644 --- a/tests/callgraph/oracle/no_fp_unsound_warning.1.res.oracle +++ b/tests/callgraph/oracle/no_fp_unsound_warning.1.res.oracle @@ -5,6 +5,17 @@ [eva:initial-state] Values of globals at initialization [eva] done for function main +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 1 statements reached (out of 1): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [cg] Warning: using callgraph while option -cg-function-pointers is unset, result may be unsound [inout] Out (internal) for function main: \nothing diff --git a/tests/idct/oracle/ieee_1180_1990.res.oracle b/tests/idct/oracle/ieee_1180_1990.res.oracle index 701da61a7a2..a0c2c414fd9 100644 --- a/tests/idct/oracle/ieee_1180_1990.res.oracle +++ b/tests/idct/oracle/ieee_1180_1990.res.oracle @@ -971,6 +971,24 @@ idct_mc2[0..7][0..7] ∈ [-8192..8192] __retres ∈ {0; 1} S___fc_stdout[0..1] ∈ [--..--] +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 6 functions analyzed (out of 44): 13% coverage. + In these functions, 588 statements reached (out of 626): 93% coverage. + ---------------------------------------------------------------------------- + Some errors and warnings have been raised during the analysis: + by the Eva analyzer: 0 errors 42 warnings + by the Frama-C kernel: 0 errors 0 warnings + ---------------------------------------------------------------------------- + 72 alarms generated by the analysis: + 64 accesses to uninitialized left-values + 8 illegal conversions from floating-point to integer + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 0 valid 0 unknown 0 invalid 0 total + Preconditions 11 valid 0 unknown 0 invalid 11 total + 100% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- [from] Computing for function IEEE_1180_1990_rand [from] Done for function IEEE_1180_1990_rand [from] Computing for function IEEE_1180_1990_mkbk diff --git a/tests/impact/oracle/depend5.res.oracle b/tests/impact/oracle/depend5.res.oracle index 8ebb3a55b25..415d327aa48 100644 --- a/tests/impact/oracle/depend5.res.oracle +++ b/tests/impact/oracle/depend5.res.oracle @@ -17,6 +17,17 @@ [from] Computing for function main [from] Done for function main [eva] done for function main +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 3 functions analyzed (out of 3): 100% coverage. + In these functions, 13 statements reached (out of 13): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [from] ====== DISPLAYING CALLWISE DEPENDENCIES ====== [from] call to f at tests/impact/depend5.i:18 (by g): b FROM a; e diff --git a/tests/journal/oracle/control.0.res.oracle b/tests/journal/oracle/control.0.res.oracle index a04a28a513c..2ee981ccf35 100644 --- a/tests/journal/oracle/control.0.res.oracle +++ b/tests/journal/oracle/control.0.res.oracle @@ -16,6 +16,18 @@ [eva:final-states] Values at end of function f: x ∈ [0..2147483647] i ∈ {4} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 4): 25% coverage. + In this function, 9 statements reached (out of 12): 75% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 1 alarm generated by the analysis: + 1 integer overflow + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [from] Computing for function f [from] Done for function f [kernel] Warning: ignoring source files specified on the command line while loading a global initial context. diff --git a/tests/journal/oracle/control.1.res.oracle b/tests/journal/oracle/control.1.res.oracle index 0d4cd66ed39..55c6fcda9b2 100644 --- a/tests/journal/oracle/control.1.res.oracle +++ b/tests/journal/oracle/control.1.res.oracle @@ -16,6 +16,18 @@ [eva:final-states] Values at end of function f: x ∈ [0..2147483647] i ∈ {4} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 4): 25% coverage. + In this function, 9 statements reached (out of 12): 75% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 1 alarm generated by the analysis: + 1 integer overflow + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [from] Computing for function f [from] Done for function f [kernel] Warning: ignoring source files specified on the command line while loading a global initial context. @@ -42,6 +54,20 @@ [eva:final-states] Values at end of function f: x ∈ [0..2147483647] i ∈ {4} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 4): 25% coverage. + In this function, 9 statements reached (out of 12): 75% coverage. + ---------------------------------------------------------------------------- + Some errors and warnings have been raised during the analysis: + by the Eva analyzer: 0 errors 0 warnings + by the Frama-C kernel: 0 errors 1 warning + ---------------------------------------------------------------------------- + 1 alarm generated by the analysis: + 1 integer overflow + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [from] ====== DISPLAYING CALLWISE DEPENDENCIES ====== [from] entry point: x FROM x (and SELF) diff --git a/tests/journal/oracle/control2.res.oracle b/tests/journal/oracle/control2.res.oracle index 65f6972933b..f73d56171f0 100644 --- a/tests/journal/oracle/control2.res.oracle +++ b/tests/journal/oracle/control2.res.oracle @@ -15,6 +15,18 @@ [eva:final-states] Values at end of function f: x ∈ [0..2147483647] i ∈ {4} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 4): 25% coverage. + In this function, 9 statements reached (out of 12): 75% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 1 alarm generated by the analysis: + 1 integer overflow + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [from] Computing for function f [from] Done for function f [eva] Analyzing an incomplete application starting at f @@ -37,6 +49,18 @@ x ∈ [--..--] y ∈ [--..--] i ∈ {4} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 12 statements reached (out of 12): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 3 alarms generated by the analysis: + 3 integer overflows + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [from] Computing for function f [from] Done for function f [kernel] Warning: ignoring source files specified on the command line while loading a global initial context. diff --git a/tests/journal/oracle/control2_sav.res b/tests/journal/oracle/control2_sav.res index 3f2f015507e..cfefb777029 100644 --- a/tests/journal/oracle/control2_sav.res +++ b/tests/journal/oracle/control2_sav.res @@ -15,6 +15,18 @@ [eva:final-states] Values at end of function f: x ∈ [0..2147483647] i ∈ {4} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 4): 25% coverage. + In this function, 9 statements reached (out of 12): 75% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 1 alarm generated by the analysis: + 1 integer overflow + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [from] Computing for function f [from] Done for function f [kernel] Warning: ignoring source files specified on the command line while loading a global initial context. @@ -38,6 +50,20 @@ x ∈ [--..--] y ∈ [--..--] i ∈ {4} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 12 statements reached (out of 12): 100% coverage. + ---------------------------------------------------------------------------- + Some errors and warnings have been raised during the analysis: + by the Eva analyzer: 0 errors 0 warnings + by the Frama-C kernel: 0 errors 1 warning + ---------------------------------------------------------------------------- + 3 alarms generated by the analysis: + 3 integer overflows + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [from] Computing for function f [from] Done for function f [from] ====== DEPENDENCIES COMPUTED ====== diff --git a/tests/journal/oracle/intra.res.oracle b/tests/journal/oracle/intra.res.oracle index e2f814d04a5..5e39a5c278b 100644 --- a/tests/journal/oracle/intra.res.oracle +++ b/tests/journal/oracle/intra.res.oracle @@ -56,6 +56,22 @@ [eva] Done for function stop [eva] Recording results for main [eva] done for function main +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 8 functions analyzed (out of 9): 88% coverage. + In these functions, 58 statements reached (out of 59): 98% coverage. + ---------------------------------------------------------------------------- + Some errors and warnings have been raised during the analysis: + by the Eva analyzer: 0 errors 0 warnings + by the Frama-C kernel: 0 errors 1 warning + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 6 valid 0 unknown 0 invalid 6 total + Preconditions 0 valid 0 unknown 0 invalid 0 total + 100% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- [pdg] computing for function main [from] Computing for function param [from] Done for function param diff --git a/tests/metrics/oracle/func_ptr.0.res.oracle b/tests/metrics/oracle/func_ptr.0.res.oracle index 9ad14445a92..42898601069 100644 --- a/tests/metrics/oracle/func_ptr.0.res.oracle +++ b/tests/metrics/oracle/func_ptr.0.res.oracle @@ -46,6 +46,19 @@ bar ∈ {0} bar_extern ∈ {0} [eva] done for function main +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 8): 12% coverage. + In this function, 6 statements reached (out of 13): 46% coverage. + ---------------------------------------------------------------------------- + Some errors and warnings have been raised during the analysis: + by the Eva analyzer: 0 errors 0 warnings + by the Frama-C kernel: 0 errors 1 warning + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [metrics] Eva coverage statistics ======================= Syntactically reachable functions = 3 (out of 5) diff --git a/tests/metrics/oracle/func_ptr.1.res.oracle b/tests/metrics/oracle/func_ptr.1.res.oracle index e5937b139f6..70341559591 100644 --- a/tests/metrics/oracle/func_ptr.1.res.oracle +++ b/tests/metrics/oracle/func_ptr.1.res.oracle @@ -46,6 +46,19 @@ bar ∈ {0} bar_extern ∈ {0} [eva] done for function foobar +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 2 functions analyzed (out of 2): 100% coverage. + In these functions, 5 statements reached (out of 5): 100% coverage. + ---------------------------------------------------------------------------- + Some errors and warnings have been raised during the analysis: + by the Eva analyzer: 0 errors 0 warnings + by the Frama-C kernel: 0 errors 1 warning + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [metrics] Eva coverage statistics ======================= Syntactically reachable functions = 2 (out of 5) diff --git a/tests/metrics/oracle/libc.0.res.oracle b/tests/metrics/oracle/libc.0.res.oracle index 3cff2f1a191..76a9cd7cd79 100644 --- a/tests/metrics/oracle/libc.0.res.oracle +++ b/tests/metrics/oracle/libc.0.res.oracle @@ -38,6 +38,20 @@ [eva] using specification for function isalpha [eva] using specification for function isblank [eva] done for function main +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 4 functions analyzed (out of 4): 100% coverage. + In these functions, 10 statements reached (out of 10): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 0 valid 0 unknown 0 invalid 0 total + Preconditions 2 valid 0 unknown 0 invalid 2 total + 100% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- [metrics] Eva coverage statistics ======================= Syntactically reachable functions = 4 (out of 5) diff --git a/tests/metrics/oracle/libc.1.res.oracle b/tests/metrics/oracle/libc.1.res.oracle index 4f1b84793b0..890b92c6ed6 100644 --- a/tests/metrics/oracle/libc.1.res.oracle +++ b/tests/metrics/oracle/libc.1.res.oracle @@ -56,6 +56,20 @@ [eva] using specification for function isalpha [eva] using specification for function isblank [eva] done for function main +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 4 functions analyzed (out of 4): 100% coverage. + In these functions, 10 statements reached (out of 10): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 0 valid 0 unknown 0 invalid 0 total + Preconditions 2 valid 0 unknown 0 invalid 2 total + 100% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- [metrics] Eva coverage statistics ======================= Syntactically reachable functions = 7 (out of 76) diff --git a/tests/metrics/oracle/reach.res.oracle b/tests/metrics/oracle/reach.res.oracle index 3bf756a5a54..e568528660b 100644 --- a/tests/metrics/oracle/reach.res.oracle +++ b/tests/metrics/oracle/reach.res.oracle @@ -83,6 +83,17 @@ t[0] ∈ {{ &baz }} [1] ∈ {0} [eva] done for function main +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 6): 16% coverage. + In this function, 7 statements reached (out of 12): 58% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [metrics] Eva coverage statistics ======================= Syntactically reachable functions = 3 (out of 3) diff --git a/tests/metrics/oracle/unreachable.res.oracle b/tests/metrics/oracle/unreachable.res.oracle index ac7dad1c8c1..f542548237b 100644 --- a/tests/metrics/oracle/unreachable.res.oracle +++ b/tests/metrics/oracle/unreachable.res.oracle @@ -35,6 +35,17 @@ [eva:initial-state] Values of globals at initialization [eva] done for function main +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 5): 20% coverage. + In this function, 6 statements reached (out of 10): 60% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [metrics] Eva coverage statistics ======================= Syntactically reachable functions = 2 (out of 2) @@ -56,6 +67,17 @@ [eva:initial-state] Values of globals at initialization [eva] done for function foo +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 2 statements reached (out of 2): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [metrics] Eva coverage statistics ======================= Syntactically reachable functions = 1 (out of 2) diff --git a/tests/misc/oracle/bts1201.res.oracle b/tests/misc/oracle/bts1201.res.oracle index 1f86ad9db0e..bf9968e480c 100644 --- a/tests/misc/oracle/bts1201.res.oracle +++ b/tests/misc/oracle/bts1201.res.oracle @@ -6,12 +6,40 @@ [eva] tests/misc/bts1201.i:5: assertion got status valid. [eva] done for function main +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 2 statements reached (out of 2): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 1 valid 0 unknown 0 invalid 1 total + Preconditions 0 valid 0 unknown 0 invalid 0 total + 100% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- [eva] Analyzing a complete application starting at main2 [eva] Computing initial state [eva] Initial state computed [eva:initial-state] Values of globals at initialization [eva] done for function main2 +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 1 statements reached (out of 1): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 1 valid 0 unknown 0 invalid 1 total + Preconditions 0 valid 0 unknown 0 invalid 0 total + 100% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- /* Generated by Frama-C */ void main(void) { diff --git a/tests/misc/oracle/change_main.res.oracle b/tests/misc/oracle/change_main.res.oracle index 6b17595c9d5..b8d9d6fde81 100644 --- a/tests/misc/oracle/change_main.res.oracle +++ b/tests/misc/oracle/change_main.res.oracle @@ -8,6 +8,17 @@ [eva] ====== VALUES COMPUTED ====== [eva:final-states] Values at end of function f: +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 1 statements reached (out of 1): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [eva] Analyzing a complete application starting at g [eva] Computing initial state [eva] Initial state computed @@ -17,3 +28,14 @@ [eva] ====== VALUES COMPUTED ====== [eva:final-states] Values at end of function g: +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 1 statements reached (out of 1): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- diff --git a/tests/misc/oracle/ensures.res.oracle b/tests/misc/oracle/ensures.res.oracle index 7acf87d6161..ee0832cdeff 100644 --- a/tests/misc/oracle/ensures.res.oracle +++ b/tests/misc/oracle/ensures.res.oracle @@ -7,6 +7,17 @@ [eva:alarm] tests/misc/ensures.i:5: Warning: function main: postcondition got status invalid. [eva] done for function main +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 2 statements reached (out of 2): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [kernel] main: behavior default! **NOT** VALID according to Frama-C kernel (under hypotheses) [kernel] main: behavior default! **NOT** VALID according to Eva (under hypotheses) diff --git a/tests/misc/oracle/well_typed_alarm.res.oracle b/tests/misc/oracle/well_typed_alarm.res.oracle index 3ba7b848d76..cff9cdaaa88 100644 --- a/tests/misc/oracle/well_typed_alarm.res.oracle +++ b/tests/misc/oracle/well_typed_alarm.res.oracle @@ -7,6 +7,17 @@ [eva:alarm] tests/misc/well_typed_alarm.i:11: Warning: pointer comparison. assert \pointer_comparable((void *)p, (void *)q); [eva] done for function main +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 10 statements reached (out of 10): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 1 alarm generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- /* Generated by Frama-C */ int main(int c) { diff --git a/tests/saveload/oracle/basic_sav.1.res b/tests/saveload/oracle/basic_sav.1.res index 05605960620..d2c84cb5472 100644 --- a/tests/saveload/oracle/basic_sav.1.res +++ b/tests/saveload/oracle/basic_sav.1.res @@ -15,6 +15,21 @@ i ∈ [-2147483648..9] j ∈ {5} __retres ∈ {0} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 12 statements reached (out of 12): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 1 alarm generated by the analysis: + 1 integer overflow + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 1 valid 0 unknown 0 invalid 1 total + Preconditions 0 valid 0 unknown 0 invalid 0 total + 100% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- [from] Computing for function main [from] Done for function main [from] ====== DEPENDENCIES COMPUTED ====== diff --git a/tests/saveload/oracle/basic_sav.res b/tests/saveload/oracle/basic_sav.res index 05605960620..d2c84cb5472 100644 --- a/tests/saveload/oracle/basic_sav.res +++ b/tests/saveload/oracle/basic_sav.res @@ -15,6 +15,21 @@ i ∈ [-2147483648..9] j ∈ {5} __retres ∈ {0} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 12 statements reached (out of 12): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 1 alarm generated by the analysis: + 1 integer overflow + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 1 valid 0 unknown 0 invalid 1 total + Preconditions 0 valid 0 unknown 0 invalid 0 total + 100% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- [from] Computing for function main [from] Done for function main [from] ====== DEPENDENCIES COMPUTED ====== diff --git a/tests/saveload/oracle/bool_sav.res b/tests/saveload/oracle/bool_sav.res index 91b80def8d2..42cfadd177d 100644 --- a/tests/saveload/oracle/bool_sav.res +++ b/tests/saveload/oracle/bool_sav.res @@ -54,3 +54,18 @@ x ∈ {1} y ∈ {2} S___fc_stdout[0..1] ∈ [--..--] +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 2 functions analyzed (out of 2): 100% coverage. + In these functions, 24 statements reached (out of 24): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 1 alarm generated by the analysis: + 1 integer overflow + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 1 valid 0 unknown 0 invalid 1 total + Preconditions 5 valid 0 unknown 0 invalid 5 total + 100% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- diff --git a/tests/saveload/oracle/callbacks_initial.res b/tests/saveload/oracle/callbacks_initial.res index 7ae40acf192..25b036ba641 100644 --- a/tests/saveload/oracle/callbacks_initial.res +++ b/tests/saveload/oracle/callbacks_initial.res @@ -33,6 +33,17 @@ [from] Computing for function main1 [from] Done for function main1 [eva] done for function main1 +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 4 functions analyzed (out of 4): 100% coverage. + In these functions, 9 statements reached (out of 9): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [from] ====== DISPLAYING CALLWISE DEPENDENCIES ====== [from] call to f at tests/saveload/callbacks.i:16 (by g1): x FROM p diff --git a/tests/saveload/oracle/deps_sav.res b/tests/saveload/oracle/deps_sav.res index 40f9aeda114..c52779de1ee 100644 --- a/tests/saveload/oracle/deps_sav.res +++ b/tests/saveload/oracle/deps_sav.res @@ -14,6 +14,18 @@ i ∈ [-2147483648..9] j ∈ {5} __retres ∈ {0} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 11 statements reached (out of 11): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 1 alarm generated by the analysis: + 1 integer overflow + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [from] Computing for function main [from] Done for function main [from] ====== DEPENDENCIES COMPUTED ====== diff --git a/tests/saveload/oracle/multi_project.1.res.oracle b/tests/saveload/oracle/multi_project.1.res.oracle index 1cd5eaed301..1ca91d86729 100644 --- a/tests/saveload/oracle/multi_project.1.res.oracle +++ b/tests/saveload/oracle/multi_project.1.res.oracle @@ -18,6 +18,20 @@ x ∈ {2} y ∈ {4} __retres ∈ {8} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 2 functions analyzed (out of 2): 100% coverage. + In these functions, 7 statements reached (out of 7): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 1 valid 0 unknown 0 invalid 1 total + Preconditions 0 valid 0 unknown 0 invalid 0 total + 100% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- [kernel] Checking "foo" [kernel] Checking "foobar" [kernel] Checking "default" diff --git a/tests/saveload/oracle/multi_project_sav.res b/tests/saveload/oracle/multi_project_sav.res index c6cb667f227..6968a8ec6be 100644 --- a/tests/saveload/oracle/multi_project_sav.res +++ b/tests/saveload/oracle/multi_project_sav.res @@ -12,6 +12,20 @@ [eva] tests/saveload/multi_project.i:15: assertion got status valid. [eva] Recording results for main [eva] done for function main +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 2 functions analyzed (out of 2): 100% coverage. + In these functions, 7 statements reached (out of 7): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 1 valid 0 unknown 0 invalid 1 total + Preconditions 0 valid 0 unknown 0 invalid 0 total + 100% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- /* Generated by Frama-C */ int f(int x) { diff --git a/tests/saveload/oracle/segfault_datatypes_sav.res b/tests/saveload/oracle/segfault_datatypes_sav.res index a67d19e53c3..1cf0a3182aa 100644 --- a/tests/saveload/oracle/segfault_datatypes_sav.res +++ b/tests/saveload/oracle/segfault_datatypes_sav.res @@ -14,6 +14,18 @@ i ∈ [-2147483648..9] j ∈ {5} __retres ∈ {0} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 11 statements reached (out of 11): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 1 alarm generated by the analysis: + 1 integer overflow + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [from] Computing for function main [from] Done for function main [from] ====== DEPENDENCIES COMPUTED ====== diff --git a/tests/saveload/oracle/sparecode_sav.res b/tests/saveload/oracle/sparecode_sav.res index 87fe698cd5e..f1ac9d2f24d 100644 --- a/tests/saveload/oracle/sparecode_sav.res +++ b/tests/saveload/oracle/sparecode_sav.res @@ -19,6 +19,17 @@ [eva] Done for function f [eva] Recording results for main [eva] done for function main +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 2 functions analyzed (out of 2): 100% coverage. + In these functions, 9 statements reached (out of 9): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- [slicing] initializing slicing ... [slicing] interpreting slicing requests from the command line... [pdg] computing for function main diff --git a/tests/spec/oracle/default_assigns_bts0966.res.oracle b/tests/spec/oracle/default_assigns_bts0966.res.oracle index 7fb0bd7fa36..525ec649aff 100644 --- a/tests/spec/oracle/default_assigns_bts0966.res.oracle +++ b/tests/spec/oracle/default_assigns_bts0966.res.oracle @@ -16,6 +16,19 @@ [1] ∈ {1} [2..3] ∈ {0} __retres ∈ {0} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 7 statements reached (out of 7): 100% coverage. + ---------------------------------------------------------------------------- + Some errors and warnings have been raised during the analysis: + by the Eva analyzer: 0 errors 1 warning + by the Frama-C kernel: 0 errors 1 warning + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- /* Generated by Frama-C */ enum states { Init = 0, diff --git a/tests/spec/oracle/logic_def.res.oracle b/tests/spec/oracle/logic_def.res.oracle index 068ba78e31d..a363bbc1f4a 100644 --- a/tests/spec/oracle/logic_def.res.oracle +++ b/tests/spec/oracle/logic_def.res.oracle @@ -10,6 +10,20 @@ [eva:final-states] Values at end of function main: x ∈ {42} __retres ∈ {0} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 4 statements reached (out of 4): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 1 valid 0 unknown 0 invalid 1 total + Preconditions 0 valid 0 unknown 0 invalid 0 total + 100% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- /* Generated by Frama-C */ /*@ logic ℤ foo(int x) = x + 2; */ diff --git a/tests/syntax/oracle/copy_logic.res.oracle b/tests/syntax/oracle/copy_logic.res.oracle index 30b1c2e6d09..654c5e3a503 100644 --- a/tests/syntax/oracle/copy_logic.res.oracle +++ b/tests/syntax/oracle/copy_logic.res.oracle @@ -19,6 +19,21 @@ [eva:final-states] Values at end of function main: y ∈ [-2147483606..2147483647] __retres ∈ {0} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 6 statements reached (out of 6): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 1 alarm generated by the analysis: + 1 integer overflow + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 0 valid 2 unknown 0 invalid 2 total + Preconditions 0 valid 0 unknown 0 invalid 0 total + 0% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- /* Generated by Frama-C */ /*@ predicate p(int x) ; */ diff --git a/tests/syntax/oracle/loop-case-switch-for-unroll.0.res.oracle b/tests/syntax/oracle/loop-case-switch-for-unroll.0.res.oracle index 3d21e2b5379..4407cbebb99 100644 --- a/tests/syntax/oracle/loop-case-switch-for-unroll.0.res.oracle +++ b/tests/syntax/oracle/loop-case-switch-for-unroll.0.res.oracle @@ -112,6 +112,17 @@ x ∈ {32} n ∈ {0} gen_nondet_i ∈ {31} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 2 functions analyzed (out of 5): 40% coverage. + In these functions, 45 statements reached (out of 48): 93% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- /* Generated by Frama-C */ int gen_nondet(int line); diff --git a/tests/syntax/oracle/loop-case-switch-for-unroll.1.res.oracle b/tests/syntax/oracle/loop-case-switch-for-unroll.1.res.oracle index 92842431056..ccd8dec4937 100644 --- a/tests/syntax/oracle/loop-case-switch-for-unroll.1.res.oracle +++ b/tests/syntax/oracle/loop-case-switch-for-unroll.1.res.oracle @@ -112,6 +112,17 @@ x ∈ {32} n ∈ {0} gen_nondet_i ∈ {31} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 2 functions analyzed (out of 52): 3% coverage. + In these functions, 75 statements reached (out of 125): 60% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- /* Generated by Frama-C */ int gen_nondet(int line); diff --git a/tests/syntax/oracle/loop-case-switch-for-unroll.2.res.oracle b/tests/syntax/oracle/loop-case-switch-for-unroll.2.res.oracle index 817e4bba618..f029ae31917 100644 --- a/tests/syntax/oracle/loop-case-switch-for-unroll.2.res.oracle +++ b/tests/syntax/oracle/loop-case-switch-for-unroll.2.res.oracle @@ -112,6 +112,17 @@ x ∈ {32} n ∈ {0} gen_nondet_i ∈ {31} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 2 functions analyzed (out of 166): 1% coverage. + In these functions, 74 statements reached (out of 238): 31% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- /* Generated by Frama-C */ int gen_nondet(int line); diff --git a/tests/value/numerors/oracle/numerors.res.oracle b/tests/value/numerors/oracle/numerors.res.oracle index ed54ec83da0..b6bde3cbebb 100644 --- a/tests/value/numerors/oracle/numerors.res.oracle +++ b/tests/value/numerors/oracle/numerors.res.oracle @@ -292,3 +292,19 @@ [eva:final-states] Values at end of function main: Frama_C_entropy_source ∈ [--..--] __retres ∈ {0} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 29 functions analyzed (out of 29): 100% coverage. + In these functions, 257 statements reached (out of 257): 100% coverage. + ---------------------------------------------------------------------------- + Some errors and warnings have been raised during the analysis: + by the Eva analyzer: 0 errors 0 warnings + by the Frama-C kernel: 0 errors 3 warnings + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 0 valid 0 unknown 0 invalid 0 total + Preconditions 146 valid 0 unknown 0 invalid 146 total + 100% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- -- GitLab From 4bb7f8e636591eda34b661cbf7316da4573d9b49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 4 Apr 2019 14:18:04 +0200 Subject: [PATCH 204/376] [Eva] Updates alternative test oracles. --- tests/idct/diff_equalities | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/idct/diff_equalities b/tests/idct/diff_equalities index 6d1b02bed20..4ed73b90e44 100644 --- a/tests/idct/diff_equalities +++ b/tests/idct/diff_equalities @@ -130,3 +130,7 @@ diff tests/idct/oracle/ieee_1180_1990.res.oracle tests/idct/oracle_equalities/ie > Call to builtin Frama_C_cos for function cos > [eva] tests/idct/ieee_1180_1990.c:140: > Call to builtin Frama_C_sqrt for function sqrt +980c1060 +< by the Eva analyzer: 0 errors 42 warnings +--- +> by the Eva analyzer: 0 errors 48 warnings -- GitLab From fcc1c5400c05d92c03f6d26296031f291b2a3349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 4 Apr 2019 15:48:00 +0200 Subject: [PATCH 205/376] [Eva] Adds a new test for the analysis summary. --- tests/value/oracle/summary.0.res.oracle | 31 ++++++ tests/value/oracle/summary.1.res.oracle | 34 +++++++ tests/value/oracle/summary.2.res.oracle | 40 ++++++++ tests/value/oracle/summary.3.res.oracle | 122 ++++++++++++++++++++++++ tests/value/summary.i | 55 +++++++++++ 5 files changed, 282 insertions(+) create mode 100644 tests/value/oracle/summary.0.res.oracle create mode 100644 tests/value/oracle/summary.1.res.oracle create mode 100644 tests/value/oracle/summary.2.res.oracle create mode 100644 tests/value/oracle/summary.3.res.oracle create mode 100644 tests/value/summary.i diff --git a/tests/value/oracle/summary.0.res.oracle b/tests/value/oracle/summary.0.res.oracle new file mode 100644 index 00000000000..18d328c7689 --- /dev/null +++ b/tests/value/oracle/summary.0.res.oracle @@ -0,0 +1,31 @@ +[kernel] Parsing tests/value/summary.i (no preprocessing) +[eva] Analyzing a complete application starting at minimalist +[eva] Computing initial state +[eva] Initial state computed +[eva:initial-state] Values of globals at initialization + undet ∈ [--..--] + volatile_d ∈ [--..--] +[kernel:annot:missing-spec] tests/value/summary.i:18: Warning: + Neither code nor specification for function minimalist, generating default assigns from the prototype +[eva] using specification for function minimalist +[eva] done for function minimalist +[eva] ====== VALUES COMPUTED ====== +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + No function to be analyzed. + ---------------------------------------------------------------------------- + Some errors and warnings have been raised during the analysis: + by the Eva analyzer: 0 errors 0 warnings + by the Frama-C kernel: 0 errors 1 warning + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- +[from] ====== DEPENDENCIES COMPUTED ====== + These dependencies hold at termination for the executions that terminate: +[from] Function minimalist: +[from] Computing for function minimalist +[from] Done for function minimalist + NO EFFECTS +[from] ====== END OF DEPENDENCIES ====== diff --git a/tests/value/oracle/summary.1.res.oracle b/tests/value/oracle/summary.1.res.oracle new file mode 100644 index 00000000000..05e3490c3ef --- /dev/null +++ b/tests/value/oracle/summary.1.res.oracle @@ -0,0 +1,34 @@ +[kernel] Parsing tests/value/summary.i (no preprocessing) +[eva] Analyzing a complete application starting at minimal +[eva] Computing initial state +[eva] Initial state computed +[eva:initial-state] Values of globals at initialization + undet ∈ [--..--] + volatile_d ∈ [--..--] +[eva] Recording results for minimal +[eva] done for function minimal +[eva] ====== VALUES COMPUTED ====== +[eva:final-states] Values at end of function minimal: + +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 1 statements reached (out of 1): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- +[from] Computing for function minimal +[from] Done for function minimal +[from] ====== DEPENDENCIES COMPUTED ====== + These dependencies hold at termination for the executions that terminate: +[from] Function minimal: + NO EFFECTS +[from] ====== END OF DEPENDENCIES ====== +[inout] Out (internal) for function minimal: + \nothing +[inout] Inputs for function minimal: + \nothing diff --git a/tests/value/oracle/summary.2.res.oracle b/tests/value/oracle/summary.2.res.oracle new file mode 100644 index 00000000000..7326ccc8552 --- /dev/null +++ b/tests/value/oracle/summary.2.res.oracle @@ -0,0 +1,40 @@ +[kernel] Parsing tests/value/summary.i (no preprocessing) +[eva] Analyzing a complete application starting at bottom +[eva] Computing initial state +[eva] Initial state computed +[eva:initial-state] Values of globals at initialization + undet ∈ [--..--] + volatile_d ∈ [--..--] +[eva:alarm] tests/value/summary.i:14: Warning: division by zero. assert 0 ≢ 0; +[eva] Recording results for bottom +[eva] done for function bottom +[eva] tests/value/summary.i:14: + assertion 'Eva,division_by_zero' got final status invalid. +[eva] ====== VALUES COMPUTED ====== +[eva:final-states] Values at end of function bottom: + NON TERMINATING FUNCTION +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 2): 50% coverage. + In this function, 1 statements reached (out of 2): 50% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 1 alarm generated by the analysis: + 1 division by zero + 1 of them is a sure alarm (invalid status). + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- +[from] Computing for function bottom +[from] Non-terminating function bottom (no dependencies) +[from] Done for function bottom +[from] ====== DEPENDENCIES COMPUTED ====== + These dependencies hold at termination for the executions that terminate: +[from] Function bottom: + NON TERMINATING - NO EFFECTS +[from] ====== END OF DEPENDENCIES ====== +[inout] Out (internal) for function bottom: + x +[inout] Inputs for function bottom: + \nothing diff --git a/tests/value/oracle/summary.3.res.oracle b/tests/value/oracle/summary.3.res.oracle new file mode 100644 index 00000000000..58a58f35480 --- /dev/null +++ b/tests/value/oracle/summary.3.res.oracle @@ -0,0 +1,122 @@ +[kernel] Parsing tests/value/summary.i (no preprocessing) +[eva] Analyzing a complete application starting at main +[eva] Computing initial state +[eva] Initial state computed +[eva:initial-state] Values of globals at initialization + undet ∈ [--..--] + volatile_d ∈ [--..--] +[eva] computing for function alarms <- main. + Called from tests/value/summary.i:52. +[eva:alarm] tests/value/summary.i:26: Warning: + out of bounds read. assert \valid_read(p); +[eva:alarm] tests/value/summary.i:28: Warning: + out of bounds write. assert \valid(p); +[eva:alarm] tests/value/summary.i:29: Warning: + accessing out of bounds index. assert 0 ≤ undet; +[eva:alarm] tests/value/summary.i:29: Warning: + accessing out of bounds index. assert undet < 10; +[eva:alarm] tests/value/summary.i:30: Warning: + division by zero. assert undet ≢ 0; +[eva:alarm] tests/value/summary.i:31: Warning: + signed overflow. assert -2147483648 ≤ undet + undet; +[eva:alarm] tests/value/summary.i:31: Warning: + signed overflow. assert undet + undet ≤ 2147483647; +[eva:alarm] tests/value/summary.i:32: Warning: + invalid LHS operand for left shift. assert 0 ≤ undet; +[eva:alarm] tests/value/summary.i:32: Warning: + invalid RHS operand for shift. assert 0 ≤ undet < 32; +[eva:alarm] tests/value/summary.i:32: Warning: + signed overflow. assert undet << undet ≤ 2147483647; +[eva:alarm] tests/value/summary.i:33: Warning: + non-finite double value. assert \is_finite(volatile_d); +[eva:alarm] tests/value/summary.i:34: Warning: + non-finite double value. assert \is_finite((double)(d - d)); +[eva:alarm] tests/value/summary.i:35: Warning: + overflow in conversion from floating-point to integer. + assert -2147483649 < d; +[eva:alarm] tests/value/summary.i:35: Warning: + overflow in conversion from floating-point to integer. assert d < 2147483648; +[eva:alarm] tests/value/summary.i:38: Warning: + pointer subtraction. assert \base_addr(p) ≡ \base_addr(q); +[eva:alarm] tests/value/summary.i:39: Warning: + pointer comparison. assert \pointer_comparable((void *)p, (void *)q); +[eva:locals-escaping] tests/value/summary.i:42: Warning: + locals {z} escaping the scope of a block of alarms through p +[eva:alarm] tests/value/summary.i:44: Warning: + accessing left-value that contains escaping addresses. + assert ¬\dangling(&p); +[eva] Recording results for alarms +[eva] Done for function alarms +[eva] computing for function f <- main. + Called from tests/value/summary.i:53. +[kernel:annot:missing-spec] tests/value/summary.i:53: Warning: + Neither code nor specification for function f, generating default assigns from the prototype +[eva] using specification for function f +[eva] Done for function f +[eva] computing for function g <- main. + Called from tests/value/summary.i:54. +[kernel:annot:missing-spec] tests/value/summary.i:54: Warning: + Neither code nor specification for function g, generating default assigns from the prototype +[eva] using specification for function g +[eva] Done for function g +[eva] Recording results for main +[eva] done for function main +[eva] ====== VALUES COMPUTED ====== +[eva:final-states] Values at end of function alarms: + x ∈ [--..--] + y ∈ {0} + p ∈ {{ &x ; &y }} + q ∈ {{ &x ; &y }} + t[0..9] ∈ {0} + d ∈ [-2147483649. .. 2147483648.] +[eva:final-states] Values at end of function main: + +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 2 functions analyzed (out of 2): 100% coverage. + In these functions, 32 statements reached (out of 32): 100% coverage. + ---------------------------------------------------------------------------- + Some errors and warnings have been raised during the analysis: + by the Eva analyzer: 0 errors 1 warning + by the Frama-C kernel: 0 errors 2 warnings + ---------------------------------------------------------------------------- + 17 alarms generated by the analysis: + 1 division by zero + 2 invalid memory accesses + 2 accesses out of bounds index + 3 integer overflows + 2 invalid shifts + 1 escaping address + 2 nan or infinite floating-point values + 2 illegal conversions from floating-point to integer + 2 others + ---------------------------------------------------------------------------- + No logical properties have been reached by the analysis. + ---------------------------------------------------------------------------- +[from] Computing for function alarms +[from] Done for function alarms +[from] Computing for function main +[from] Computing for function f <-main +[from] Done for function f +[from] Computing for function g <-main +[from] Done for function g +[from] Done for function main +[from] ====== DEPENDENCIES COMPUTED ====== + These dependencies hold at termination for the executions that terminate: +[from] Function alarms: + NO EFFECTS +[from] Function f: + NO EFFECTS +[from] Function g: + NO EFFECTS +[from] Function main: + NO EFFECTS +[from] ====== END OF DEPENDENCIES ====== +[inout] Out (internal) for function alarms: + x; y; p; q; t[0..9]; d +[inout] Inputs for function alarms: + undet; volatile_d +[inout] Out (internal) for function main: + \nothing +[inout] Inputs for function main: + undet; volatile_d diff --git a/tests/value/summary.i b/tests/value/summary.i new file mode 100644 index 00000000000..b037fa17050 --- /dev/null +++ b/tests/value/summary.i @@ -0,0 +1,55 @@ +/* run.config* + STDOPT: +"-eva-msg-key=summary -main minimalist" + STDOPT: +"-eva-msg-key=summary -main minimal" + STDOPT: +"-eva-msg-key=summary -main bottom" + STDOPT: +"-eva-msg-key=summary -main main" +*/ + +/* Tests the summary on the smallest possible program. */ +void minimalist (); +void minimal () {} + +/* Sure alarm and non-terminating function. */ +void bottom () { + int x = 10 / 0; +} + +volatile int undet; +volatile double volatile_d; + +/* Tests the summary on most kinds of alarms. */ +void alarms () { + int x = 0, y = 0; + int *p, *q; + int t[10] = {0}; + p = &x + undet; + x = *p; // invalid read memory access + p = &x + undet; + *p = x; // invalid write memory access + x = t[undet]; // out of bound index + uninitialized read + x = 100 / undet; // division by zero + x = undet + undet; // overflow + x = undet << undet; // invalid shift + double d = volatile_d; + d = d - d; // nan and infinite floating-point value + x = (int) d; // invalid cast from floating-point to integer + p = undet ? &x : &y; + q = undet ? &y : &x; + if (undet) x = p - q; // invalid pointer comparison + if (p < q) x = 0; // invalid pointer comparison + if (undet) { + int z; + p = &z; // eva warning about escaping z + } + x = *p; // dangling pointer +} + +void f(void); +void g(void); + +// 2 kernel warnings, 1 eva warning, no error. +void main () { + alarms (); + f(); // kernel warning: no specification for function f + g(); // kernel warning: no specification for function g +} -- GitLab From b1192a64f8be490e1fed7c7dd7fb8af41b569405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 5 Apr 2019 10:38:47 +0200 Subject: [PATCH 206/376] [Wp] Disables the new Eva analysis summary in a test. --- src/plugins/wp/tests/wp_plugin/removed.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/wp/tests/wp_plugin/removed.i b/src/plugins/wp/tests/wp_plugin/removed.i index 060f7e15435..e865b65ae68 100644 --- a/src/plugins/wp/tests/wp_plugin/removed.i +++ b/src/plugins/wp/tests/wp_plugin/removed.i @@ -1,6 +1,6 @@ /* run.config_qualif CMD: @frama-c@ -wp-share ./share -wp-msg-key success-only -wp-par 1 -wp-timeout 100 -wp-steps 500 - OPT: -eva -then -wp -then -no-eva -warn-unsigned-overflow -wp + OPT: -eva -eva-msg-key=-summary -then -wp -then -no-eva -warn-unsigned-overflow -wp */ /* run.config -- GitLab From b8f3fe066109de6020943740c3a27a6c8777d193 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 8 Apr 2019 11:40:13 +0200 Subject: [PATCH 207/376] [obfuscator] test for issue 2433 --- tests/misc/obfuscate.c | 12 ++++++++++++ tests/misc/oracle/obfuscate.res.oracle | 25 +++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/tests/misc/obfuscate.c b/tests/misc/obfuscate.c index ade70e66898..f993479d0f7 100644 --- a/tests/misc/obfuscate.c +++ b/tests/misc/obfuscate.c @@ -59,3 +59,15 @@ int builtin_and_stdlib () { /*@ assert \true; */ return 1; } + +/* obfuscate names of arguments of function pointers. */ + +typedef void (*fct_ptr)(int x, int y); + +struct S { fct_ptr my_func; }; + +void implem(int c, int d) { }; + +struct S example_struct = { .my_func = implem }; + +void test_func(struct S* s) { s->my_func(3,4); example_struct.my_func(5,6); } diff --git a/tests/misc/oracle/obfuscate.res.oracle b/tests/misc/oracle/obfuscate.res.oracle index efd7abd9fba..0618abc8f7a 100644 --- a/tests/misc/oracle/obfuscate.res.oracle +++ b/tests/misc/oracle/obfuscate.res.oracle @@ -16,8 +16,11 @@ #define F2 f #define F3 logic #define F4 builtin_and_stdlib +#define F5 implem +#define F6 test_func // global variables #define G1 my_var +#define G2 example_struct // labels #define L1 end #define L2 end @@ -29,10 +32,13 @@ // logic variables #define LV1 I #define LV2 x +// fields +#define M1 my_func // predicates #define P1 never // types #define T1 my_enum +#define T2 S // local variables #define V1 x #define V2 __retres @@ -44,6 +50,9 @@ #define f1 p #define f2 f1 #define f3 p +#define f4 c +#define f5 d +#define f6 s /*********************************** */ /* end of dictionary for obfuscation */ /*********************************** */ @@ -64,6 +73,9 @@ enum T1 { E2 = 1, E3 = 4 }; +struct T2 { + void (*M1)(int x, int y) ; +}; int G1 = 0; /*@ global invariant LV1: G1 ≥ 0; @@ -130,4 +142,17 @@ int F4(void) return V6; } +void F5(int f4, int f5) +{ + return; +} + +struct T2 G2 = {.M1 = & F5}; +void F6(struct T2 *f6) +{ + (*(f6->M1))(3,4); + (*(G2.M1))(5,6); + return; +} + -- GitLab From 08f09ce231732447299984259fa0bb349fa1565f Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 8 Apr 2019 11:44:49 +0200 Subject: [PATCH 208/376] [obfuscator] linting --- .Makefile.lint | 1 - src/plugins/obfuscator/obfuscate.ml | 244 ++++++++++++++-------------- 2 files changed, 122 insertions(+), 123 deletions(-) diff --git a/.Makefile.lint b/.Makefile.lint index c74c7c5be98..a46b10f034d 100644 --- a/.Makefile.lint +++ b/.Makefile.lint @@ -325,7 +325,6 @@ ML_LINT_KO+=src/plugins/metrics/metrics_parameters.ml ML_LINT_KO+=src/plugins/metrics/register.ml ML_LINT_KO+=src/plugins/metrics/register_gui.ml ML_LINT_KO+=src/plugins/obfuscator/dictionary.ml -ML_LINT_KO+=src/plugins/obfuscator/obfuscate.ml ML_LINT_KO+=src/plugins/obfuscator/obfuscator_kind.ml ML_LINT_KO+=src/plugins/obfuscator/obfuscator_register.ml ML_LINT_KO+=src/plugins/obfuscator/options.ml diff --git a/src/plugins/obfuscator/obfuscate.ml b/src/plugins/obfuscator/obfuscate.ml index eba13df1132..5b6799903ac 100644 --- a/src/plugins/obfuscator/obfuscate.ml +++ b/src/plugins/obfuscator/obfuscate.ml @@ -23,7 +23,7 @@ open Cil_types open Cil_datatype -let warn kind name = +let warn kind name = Options.warning ~once:true "unobfuscated %s name `%s'" kind name let has_literal_string = ref false @@ -37,43 +37,43 @@ class visitor = object val id_pred_visited = Identified_predicate.Hashtbl.create 7 method! vglob_aux = function - | GType (ty,_) -> - if not (Cil.typeHasAttribute "fc_stdlib" ty.ttype) then - ty.tname <- Dictionary.fresh Obfuscator_kind.Type ty.tname; - Cil.DoChildren - | GVarDecl (v, _) | GVar (v, _, _) | GFun ({svar = v}, _) | GFunDecl (_, v, _) + | GType (ty,_) -> + if not (Cil.typeHasAttribute "fc_stdlib" ty.ttype) then + ty.tname <- Dictionary.fresh Obfuscator_kind.Type ty.tname; + Cil.DoChildren + | GVarDecl (v, _) | GVar (v, _, _) | GFun ({svar = v}, _) | GFunDecl (_, v, _) when Cil.is_unused_builtin v -> - Cil.SkipChildren - | _ -> - Cil.DoChildren + Cil.SkipChildren + | _ -> + Cil.DoChildren - method! vcompinfo ci = - ci.cname <- Dictionary.fresh Obfuscator_kind.Type ci.cname; + method! vcompinfo ci = + ci.cname <- Dictionary.fresh Obfuscator_kind.Type ci.cname; Cil.DoChildren - method! venuminfo ei = - ei.ename <- Dictionary.fresh Obfuscator_kind.Type ei.ename; + method! venuminfo ei = + ei.ename <- Dictionary.fresh Obfuscator_kind.Type ei.ename; Cil.DoChildren method! vfieldinfo fi = - fi.fname <- Dictionary.fresh Obfuscator_kind.Field fi.fname; + fi.fname <- Dictionary.fresh Obfuscator_kind.Field fi.fname; Cil.DoChildren - method! venumitem ei = - ei.einame <- Dictionary.fresh Obfuscator_kind.Enum ei.einame; + method! venumitem ei = + ei.einame <- Dictionary.fresh Obfuscator_kind.Enum ei.einame; Cil.DoChildren method! vexpr e = match e.enode with - | Const(CStr str) -> - has_literal_string := true; - (* ignore the result: will be handle by hacking the pretty printer *) - (try - ignore (Dictionary.id_of_literal_string str) - with Not_found -> - ignore (Dictionary.fresh Obfuscator_kind.Literal_string str)); - Cil.SkipChildren - | _ -> - Cil.DoChildren + | Const(CStr str) -> + has_literal_string := true; + (* ignore the result: will be handle by hacking the pretty printer *) + (try + ignore (Dictionary.id_of_literal_string str) + with Not_found -> + ignore (Dictionary.fresh Obfuscator_kind.Literal_string str)); + Cil.SkipChildren + | _ -> + Cil.DoChildren method! vvdec vi = (* Varinfo can be visited (and obfuscated) more than once: @@ -92,11 +92,11 @@ class visitor = object vi.vname <- Dictionary.fresh Obfuscator_kind.Function vi.vname end else begin - let add = + let add = if vi.vglob then Dictionary.fresh Obfuscator_kind.Global_var else if vi.vformal then Dictionary.fresh Obfuscator_kind.Formal_var else Dictionary.fresh Obfuscator_kind.Local_var - in + in vi.vname <- add vi.vname; end; Varinfo.Hashtbl.add varinfos_visited vi (); @@ -107,25 +107,25 @@ class visitor = object match lvi.lv_kind with | LVGlobal | LVFormal | LVQuant | LVLocal -> if Logic_var.Hashtbl.mem logic_vars_visited lvi then - Cil.SkipChildren + Cil.SkipChildren else begin - lvi.lv_name <- Dictionary.fresh Obfuscator_kind.Logic_var lvi.lv_name; - Logic_var.Hashtbl.add logic_vars_visited lvi (); - Cil.DoChildren + lvi.lv_name <- Dictionary.fresh Obfuscator_kind.Logic_var lvi.lv_name; + Logic_var.Hashtbl.add logic_vars_visited lvi (); + Cil.DoChildren end - | LVC -> + | LVC -> Cil.SkipChildren method! vstmt_aux stmt = - let labels = + let labels = List.map - (function - | Label(s, loc, true) -> - (* only obfuscate user's labels, not Cil's ones *) - let s' = Dictionary.fresh Obfuscator_kind.Label s in - Label(s', loc, true) - | Label(_, _, false) | Case _ | Default _ as label -> label) - stmt.labels + (function + | Label(s, loc, true) -> + (* only obfuscate user's labels, not Cil's ones *) + let s' = Dictionary.fresh Obfuscator_kind.Label s in + Label(s', loc, true) + | Label(_, _, false) | Case _ | Default _ as label -> label) + stmt.labels in stmt.labels <- labels; Cil.DoChildren @@ -143,21 +143,21 @@ class visitor = object Cil.ChangeDoChildrenPost (p', Extlib.id) end - method! vterm t = + method! vterm t = List.iter (fun s -> warn "term" s) t.term_name; Cil.DoChildren method! vannotation = function - | Daxiomatic(str, _, _, _) -> - warn "axiomatic" str; - Cil.DoChildren - | Dlemma(str, axiom, _, _, _, _, _) -> - warn (if axiom then "axiom" else "lemma") str; - Cil.DoChildren - | _ -> - Cil.DoChildren + | Daxiomatic(str, _, _, _) -> + warn "axiomatic" str; + Cil.DoChildren + | Dlemma(str, axiom, _, _, _, _, _) -> + warn (if axiom then "axiom" else "lemma") str; + Cil.DoChildren + | _ -> + Cil.DoChildren - method! vmodel_info mi = + method! vmodel_info mi = warn "model" mi.mi_name; Cil.DoChildren @@ -174,14 +174,14 @@ class visitor = object Cil.DoChildren method! vattr = function - | Attr(str, _) | AttrAnnot str -> - warn "attribute" str; - Cil.DoChildren + | Attr(str, _) | AttrAnnot str -> + warn "attribute" str; + Cil.DoChildren - method! vattrparam p = + method! vattrparam p = (match p with - | AStr str | ACons(str, _) | ADot(_, str) -> warn "attribute parameter" str - | _ -> ()); + | AStr str | ACons(str, _) | ADot(_, str) -> warn "attribute parameter" str + | _ -> ()); Cil.DoChildren initializer has_literal_string := false @@ -192,79 +192,79 @@ let obfuscate_behaviors () = (* inheriting method vbehavior or vspec does not work since only a copy of the piece of spec is provided. *) Globals.Functions.iter - (fun kf -> - let h = Datatype.String.Hashtbl.create 7 in - Annotations.iter_behaviors - (fun emitter b -> - if Emitter.equal emitter Emitter.end_user - && not (Cil.is_default_behavior b) - then begin - Annotations.remove_behavior ~force:true emitter kf b; - let new_ = Dictionary.fresh Obfuscator_kind.Behavior b.b_name in - Datatype.String.Hashtbl.add h b.b_name new_; - b.b_name <- new_; - Annotations.add_behaviors emitter kf [ b ]; - end) - kf; - let handle_bnames iter remove add = - iter - (fun emitter l -> - remove emitter kf l; - add emitter kf (List.map (Datatype.String.Hashtbl.find h) l)) - kf - in - handle_bnames - Annotations.iter_complete - (fun e kf l -> Annotations.remove_complete e kf l) - (fun e kf l -> Annotations.add_complete e kf l); - handle_bnames - Annotations.iter_disjoint - (fun e kf l -> Annotations.remove_disjoint e kf l) - (fun e kf l -> Annotations.add_disjoint e kf l)) + (fun kf -> + let h = Datatype.String.Hashtbl.create 7 in + Annotations.iter_behaviors + (fun emitter b -> + if Emitter.equal emitter Emitter.end_user + && not (Cil.is_default_behavior b) + then begin + Annotations.remove_behavior ~force:true emitter kf b; + let new_ = Dictionary.fresh Obfuscator_kind.Behavior b.b_name in + Datatype.String.Hashtbl.add h b.b_name new_; + b.b_name <- new_; + Annotations.add_behaviors emitter kf [ b ]; + end) + kf; + let handle_bnames iter remove add = + iter + (fun emitter l -> + remove emitter kf l; + add emitter kf (List.map (Datatype.String.Hashtbl.find h) l)) + kf + in + handle_bnames + Annotations.iter_complete + (fun e kf l -> Annotations.remove_complete e kf l) + (fun e kf l -> Annotations.add_complete e kf l); + handle_bnames + Annotations.iter_disjoint + (fun e kf l -> Annotations.remove_disjoint e kf l) + (fun e kf l -> Annotations.add_disjoint e kf l)) module UpdatePrinter (X: Printer.PrinterClass) = struct -(* obfuscated printer *) -class printer = object - inherit X.printer as super - method! constant fmt = function - | CStr str -> Format.fprintf fmt "%s" (Dictionary.id_of_literal_string str) - | c -> super#constant fmt c + (* obfuscated printer *) + class printer = object + inherit X.printer as super + method! constant fmt = function + | CStr str -> Format.fprintf fmt "%s" (Dictionary.id_of_literal_string str) + | c -> super#constant fmt c - method! file fmt ast = - if !has_literal_string then begin - let string_fmt = - if Options.Literal_string.is_default () then fmt - else begin - let file = Options.Literal_string.get () in - try - let cout = open_out file in - Format.formatter_of_out_channel cout - with Sys_error _ as exn -> - Options.error "@[cannot generate the literal string dictionary \ -into file `%s':@ %s@]" - file - (Printexc.to_string exn); - fmt - end - in - Format.fprintf string_fmt "\ + method! file fmt ast = + if !has_literal_string then begin + let string_fmt = + if Options.Literal_string.is_default () then fmt + else begin + let file = Options.Literal_string.get () in + try + let cout = open_out file in + Format.formatter_of_out_channel cout + with Sys_error _ as exn -> + Options.error "@[cannot generate the literal string dictionary \ + into file `%s':@ %s@]" + file + (Printexc.to_string exn); + fmt + end + in + Format.fprintf string_fmt "\ /* *********************************************************** */@\n\ /* start of dictionary required to compile the obfuscated code */@\n\ /* *********************************************************** */@\n"; - Dictionary.pretty_kind string_fmt Obfuscator_kind.Literal_string; - Format.fprintf string_fmt "\ + Dictionary.pretty_kind string_fmt Obfuscator_kind.Literal_string; + Format.fprintf string_fmt "\ /* ********************************************************* */@\n\ /* end of dictionary required to compile the obfuscated code */@\n\ /* ********************************************************* */@\n@\n"; - if fmt != string_fmt then begin - Format.pp_print_flush string_fmt (); - Format.fprintf fmt "\ + if fmt != string_fmt then begin + Format.pp_print_flush string_fmt (); + Format.fprintf fmt "\ /* include the dictionary of literal strings */@\n\ -@[#include \"%s\"@]@\n@\n" - (Options.Literal_string.get ()) - end - end; - super#file fmt ast +@[#include \"%s\"@]@\n@\n" + (Options.Literal_string.get ()) + end + end; + super#file fmt ast end end @@ -272,8 +272,8 @@ end let obfuscate () = Dictionary.mark_as_computed (); obfuscate_behaviors (); - Visitor.visitFramacFileSameGlobals - (new visitor :> Visitor.frama_c_visitor) + Visitor.visitFramacFileSameGlobals + (new visitor :> Visitor.frama_c_visitor) (Ast.get ()); Printer.update_printer (module UpdatePrinter: Printer.PrinterExtension) -- GitLab From c8c254febbe66b94c350b947ea99afb5f8c47bb0 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 8 Apr 2019 11:56:17 +0200 Subject: [PATCH 209/376] [obfuscator] Renames parameters in function pointers Fixes external issue 2433 --- src/plugins/obfuscator/obfuscate.ml | 17 ++++++++++++++++- src/plugins/obfuscator/obfuscator_kind.ml | 3 +++ src/plugins/obfuscator/obfuscator_kind.mli | 1 + tests/misc/oracle/long_ident.res.oracle | 4 ++++ tests/misc/oracle/obfuscate.res.oracle | 11 ++++++++++- 5 files changed, 34 insertions(+), 2 deletions(-) diff --git a/src/plugins/obfuscator/obfuscate.ml b/src/plugins/obfuscator/obfuscate.ml index 5b6799903ac..4b48f22da13 100644 --- a/src/plugins/obfuscator/obfuscate.ml +++ b/src/plugins/obfuscator/obfuscate.ml @@ -36,12 +36,27 @@ class visitor = object val logic_vars_visited = Logic_var.Hashtbl.create 7 val id_pred_visited = Identified_predicate.Hashtbl.create 7 + method! vtype = function + | TFun(t, args, variadic, attrs) -> + let args' = + match args with + | None -> None + | Some l -> + Some + (List.map + (fun (s,t,a) -> + (Dictionary.fresh Obfuscator_kind.Formal_in_type s, t, a)) l) + in + Cil.ChangeDoChildrenPost(TFun(t,args',variadic,attrs), Extlib.id) + | _ -> Cil.DoChildren + method! vglob_aux = function | GType (ty,_) -> if not (Cil.typeHasAttribute "fc_stdlib" ty.ttype) then ty.tname <- Dictionary.fresh Obfuscator_kind.Type ty.tname; Cil.DoChildren - | GVarDecl (v, _) | GVar (v, _, _) | GFun ({svar = v}, _) | GFunDecl (_, v, _) + | GVarDecl (v, _) | GVar (v, _, _) + | GFun ({svar = v}, _) | GFunDecl (_, v, _) when Cil.is_unused_builtin v -> Cil.SkipChildren | _ -> diff --git a/src/plugins/obfuscator/obfuscator_kind.ml b/src/plugins/obfuscator/obfuscator_kind.ml index 47633a9a28a..80ba427b2ba 100644 --- a/src/plugins/obfuscator/obfuscator_kind.ml +++ b/src/plugins/obfuscator/obfuscator_kind.ml @@ -25,6 +25,7 @@ type k = | Enum | Field | Formal_var + | Formal_in_type | Function | Global_var | Label @@ -41,6 +42,7 @@ let name_of_kind = function | Enum -> "enum" | Field -> "field" | Formal_var -> "formal variable" + | Formal_in_type -> "formal variable in fun type" | Function -> "function" | Global_var -> "global variable" | Label -> "label" @@ -57,6 +59,7 @@ let prefix = function | Enum -> "E" | Field -> "M" | Formal_var -> "f" + | Formal_in_type -> "ft" | Function -> "F" | Global_var -> "G" | Label -> "L" diff --git a/src/plugins/obfuscator/obfuscator_kind.mli b/src/plugins/obfuscator/obfuscator_kind.mli index 25685566b88..ac5fc7d8384 100644 --- a/src/plugins/obfuscator/obfuscator_kind.mli +++ b/src/plugins/obfuscator/obfuscator_kind.mli @@ -25,6 +25,7 @@ type k = | Enum | Field | Formal_var + | Formal_in_type | Function | Global_var | Label diff --git a/tests/misc/oracle/long_ident.res.oracle b/tests/misc/oracle/long_ident.res.oracle index 5b634422ab1..bfe69779d74 100644 --- a/tests/misc/oracle/long_ident.res.oracle +++ b/tests/misc/oracle/long_ident.res.oracle @@ -18,6 +18,10 @@ #define f1 q #define f2 X_9999999999999999999999999999999999999999999999999999_0 #define f3 p +// formal variable in fun types +#define ft1 q +#define ft2 X_9999999999999999999999999999999999999999999999999999_0 +#define ft3 p /*********************************** */ /* end of dictionary for obfuscation */ /*********************************** */ diff --git a/tests/misc/oracle/obfuscate.res.oracle b/tests/misc/oracle/obfuscate.res.oracle index 0618abc8f7a..124447020ca 100644 --- a/tests/misc/oracle/obfuscate.res.oracle +++ b/tests/misc/oracle/obfuscate.res.oracle @@ -53,6 +53,15 @@ #define f4 c #define f5 d #define f6 s +// formal variable in fun types +#define ft1 x +#define ft2 y +#define ft3 p +#define ft4 f1 +#define ft5 p +#define ft6 c +#define ft7 d +#define ft8 s /*********************************** */ /* end of dictionary for obfuscation */ /*********************************** */ @@ -74,7 +83,7 @@ enum T1 { E3 = 4 }; struct T2 { - void (*M1)(int x, int y) ; + void (*M1)(int ft1, int ft2) ; }; int G1 = 0; /*@ global invariant LV1: G1 ≥ 0; -- GitLab From 1790a17fe88f6ecabe7e7519cd9f3c4d61c1311d Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 8 Apr 2019 12:25:54 +0200 Subject: [PATCH 210/376] [obfuscator] more linting --- .Makefile.lint | 4 --- src/plugins/obfuscator/dictionary.ml | 22 +++++++------- src/plugins/obfuscator/obfuscator_kind.ml | 30 +++++++++---------- src/plugins/obfuscator/obfuscator_register.ml | 16 +++++----- src/plugins/obfuscator/options.ml | 24 +++++++-------- 5 files changed, 46 insertions(+), 50 deletions(-) diff --git a/.Makefile.lint b/.Makefile.lint index a46b10f034d..435f216117e 100644 --- a/.Makefile.lint +++ b/.Makefile.lint @@ -324,10 +324,6 @@ ML_LINT_KO+=src/plugins/metrics/metrics_gui.ml ML_LINT_KO+=src/plugins/metrics/metrics_parameters.ml ML_LINT_KO+=src/plugins/metrics/register.ml ML_LINT_KO+=src/plugins/metrics/register_gui.ml -ML_LINT_KO+=src/plugins/obfuscator/dictionary.ml -ML_LINT_KO+=src/plugins/obfuscator/obfuscator_kind.ml -ML_LINT_KO+=src/plugins/obfuscator/obfuscator_register.ml -ML_LINT_KO+=src/plugins/obfuscator/options.ml ML_LINT_KO+=src/plugins/occurrence/Occurrence.mli ML_LINT_KO+=src/plugins/occurrence/options.ml ML_LINT_KO+=src/plugins/occurrence/register.ml diff --git a/src/plugins/obfuscator/dictionary.ml b/src/plugins/obfuscator/dictionary.ml index 1ae55c07c0c..aae72b82af2 100644 --- a/src/plugins/obfuscator/dictionary.ml +++ b/src/plugins/obfuscator/dictionary.ml @@ -28,7 +28,7 @@ module Dictionary = let name = "Obfuscator.Dictionary" let size = 97 let dependencies = [ Ast.self ] - end) + end) module Literal_strings = State_builder.Hashtbl @@ -38,14 +38,14 @@ module Literal_strings = let name = "Obfuscator.Literal_strings" let size = 17 let dependencies = [ Dictionary.self ] - end) + end) let fresh kind name = let h = Dictionary.memo (fun _ -> Datatype.String.Hashtbl.create 17) kind in let idx = Datatype.String.Hashtbl.length h + 1 in let fresh = Obfuscator_kind.prefix kind ^ string_of_int idx in Datatype.String.Hashtbl.add h fresh name; - if kind = Obfuscator_kind.Literal_string && not (Literal_strings.mem name) + if kind = Obfuscator_kind.Literal_string && not (Literal_strings.mem name) then Literal_strings.add name fresh; fresh @@ -56,8 +56,8 @@ let iter_sorted_kind f k h = let f = f k in Datatype.String.Hashtbl.iter_sorted f h -let iter_sorted f = - let cmp k1 k2 = +let iter_sorted f = + let cmp k1 k2 = Datatype.String.compare (Obfuscator_kind.prefix k1) (Obfuscator_kind.prefix k2) @@ -67,7 +67,7 @@ let iter_sorted f = let pretty_entry fmt k = Format.fprintf fmt "// %as@\n" Obfuscator_kind.pretty k; let quote = k = Obfuscator_kind.Literal_string in - fun new_ old -> + fun new_ old -> if quote then Format.fprintf fmt "#define %s %S@\n" new_ old else Format.fprintf fmt "#define %s %s@\n" new_ old @@ -75,18 +75,18 @@ let pretty_kind fmt k = try let h = Dictionary.find k in iter_sorted_kind (pretty_entry fmt) k h - with Not_found -> + with Not_found -> () let pretty fmt = - Format.fprintf fmt "\ + Format.fprintf fmt "\ /* *********************************** */@\n\ /* start of dictionary for obfuscation */@\n\ /* *********************************** */@\n"; iter_sorted - (fun k -> - if k = Obfuscator_kind.Literal_string then fun _ _ -> () - else pretty_entry fmt k); + (fun k -> + if k = Obfuscator_kind.Literal_string then fun _ _ -> () + else pretty_entry fmt k); Format.fprintf fmt "\ /*********************************** */@\n\ /* end of dictionary for obfuscation */@\n\ diff --git a/src/plugins/obfuscator/obfuscator_kind.ml b/src/plugins/obfuscator/obfuscator_kind.ml index 80ba427b2ba..404e7c51084 100644 --- a/src/plugins/obfuscator/obfuscator_kind.ml +++ b/src/plugins/obfuscator/obfuscator_kind.ml @@ -72,21 +72,21 @@ let prefix = function | Logic_constructor -> "LC" include Datatype.Make_with_collections -(struct - type t = k - let name = "Obfuscator.kind" - let reprs = [ Global_var ] - let hash (k:k) = Hashtbl.hash k - let equal (k1:k) k2 = k1 = k2 - let compare (k1:k) k2 = Transitioning.Stdlib.compare k1 k2 - let varname _ = "k" - let internal_pretty_code = Datatype.undefined - let copy = Datatype.identity - let structural_descr = Structural_descr.t_abstract - let rehash = Datatype.identity - let mem_project = Datatype.never_any_project - let pretty fmt k = Format.fprintf fmt "%s" (name_of_kind k) - end) + (struct + type t = k + let name = "Obfuscator.kind" + let reprs = [ Global_var ] + let hash (k:k) = Hashtbl.hash k + let equal (k1:k) k2 = k1 = k2 + let compare (k1:k) k2 = Transitioning.Stdlib.compare k1 k2 + let varname _ = "k" + let internal_pretty_code = Datatype.undefined + let copy = Datatype.identity + let structural_descr = Structural_descr.t_abstract + let rehash = Datatype.identity + let mem_project = Datatype.never_any_project + let pretty fmt k = Format.fprintf fmt "%s" (name_of_kind k) + end) (* Local Variables: diff --git a/src/plugins/obfuscator/obfuscator_register.ml b/src/plugins/obfuscator/obfuscator_register.ml index 0674063a9bf..c7828f790a4 100644 --- a/src/plugins/obfuscator/obfuscator_register.ml +++ b/src/plugins/obfuscator/obfuscator_register.ml @@ -27,7 +27,7 @@ let disable_other_analyzers () = (Parameter_state.get_selection ()) (State_selection.Static.union (State_selection.of_list - (Kernel.CodeOutput.self :: Options.states)) + (Kernel.CodeOutput.self :: Options.states)) (* The command-line options that govern the creation of the AST must be preserved *) (State_selection.Static.with_codependencies Ast.self)) @@ -44,14 +44,14 @@ let force_run () = else begin let file = Options.Dictionary.get () in try - let cout = open_out file in - let fmt = Format.formatter_of_out_channel cout in - Dictionary.pretty fmt + let cout = open_out file in + let fmt = Format.formatter_of_out_channel cout in + Dictionary.pretty fmt with Sys_error _ as exn -> - Options.error - "@[cannot generate the dictionary into file `%s':@ %s@]" - file - (Printexc.to_string exn) + Options.error + "@[cannot generate the dictionary into file `%s':@ %s@]" + file + (Printexc.to_string exn) end; File.pretty_ast (); Printer.set_printer old_printer diff --git a/src/plugins/obfuscator/options.ml b/src/plugins/obfuscator/options.ml index 71c15870307..66278a7015f 100644 --- a/src/plugins/obfuscator/options.ml +++ b/src/plugins/obfuscator/options.ml @@ -21,19 +21,19 @@ (**************************************************************************) include Plugin.Register - (struct - let name = "obfuscator" - let shortname = "obfuscator" - let help = "obfuscator for confidential code" - end) + (struct + let name = "obfuscator" + let shortname = "obfuscator" + let help = "obfuscator for confidential code" + end) module Run = False (struct - let option_name = "-obfuscate" - let help = "print an obfuscated version of the input files and exit.\n\ -Disable any other Frama-C analysis." - end) + let option_name = "-obfuscate" + let help = "print an obfuscated version of the input files and exit.\n\ + Disable any other Frama-C analysis." + end) module Dictionary = Empty_string @@ -41,7 +41,7 @@ module Dictionary = let option_name = "-obfuscator-dictionary" let arg_name = "f" let help = "generate the dictionary into file <f> (on stdout by default)" - end) + end) module Literal_string = Empty_string @@ -49,8 +49,8 @@ module Literal_string = let option_name = "-obfuscator-string-dictionary" let arg_name = "f" let help = "generate the dictionary of literal strings into file <f> \ -(in the same place than the code by default)" - end) + (in the same place than the code by default)" + end) let states = [ Run.self; Dictionary.self; Literal_string.self ] -- GitLab From 2160fb75a479d67e6b7beb9c7f147b71a7860d11 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Thu, 4 Apr 2019 17:04:31 +0200 Subject: [PATCH 211/376] [configure] fix dependencies on Eva plugin; standardize Studia --- configure.in | 2 +- headers/header_spec.txt | 3 +- src/plugins/studia/.gitignore | 14 +--- src/plugins/studia/Makefile.in | 64 +++++++++++++++++++ src/plugins/studia/{Makefile => configure.ac} | 41 ++++++------ 5 files changed, 88 insertions(+), 36 deletions(-) create mode 100644 src/plugins/studia/Makefile.in rename src/plugins/studia/{Makefile => configure.ac} (71%) diff --git a/configure.in b/configure.in index 8abb2c18788..e5bd40a6513 100644 --- a/configure.in +++ b/configure.in @@ -774,7 +774,7 @@ plugin_require(inout,callgraph) ######### check_plugin(metrics,src/plugins/metrics,[support for metrics analysis],yes) -plugin_use(metrics,eva) +plugin_require(metrics,eva) plugin_use(metrics,gui) # occurrence diff --git a/headers/header_spec.txt b/headers/header_spec.txt index 2f826961dbc..8400bc0b75b 100644 --- a/headers/header_spec.txt +++ b/headers/header_spec.txt @@ -1073,7 +1073,8 @@ src/plugins/sparecode/spare_marks.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/sparecode/sparecode_params.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/sparecode/sparecode_params.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/sparecode/transform.ml: CEA_LGPL_OR_PROPRIETARY -src/plugins/studia/Makefile: CEA_LGPL_OR_PROPRIETARY +src/plugins/studia/Makefile.in: CEA_LGPL_OR_PROPRIETARY +src/plugins/studia/configure.ac: CEA_LGPL_OR_PROPRIETARY src/plugins/studia/options.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/studia/options.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/studia/reads.ml: CEA_LGPL_OR_PROPRIETARY diff --git a/src/plugins/studia/.gitignore b/src/plugins/studia/.gitignore index 3e06586e470..70edc7aaf5d 100644 --- a/src/plugins/studia/.gitignore +++ b/src/plugins/studia/.gitignore @@ -1,13 +1,3 @@ -*~ -*.cm* -*.annot -*.o -*_DEP -local_config.ml -.depend +/Makefile /tests/ptests_config -result -/gui -/top -/.Makefile.plugin.generated -/Studia.check_mli_exists +/tests/nonterm/result diff --git a/src/plugins/studia/Makefile.in b/src/plugins/studia/Makefile.in new file mode 100644 index 00000000000..8fed39590fc --- /dev/null +++ b/src/plugins/studia/Makefile.in @@ -0,0 +1,64 @@ +########################################################################## +# # +# This file is part of Frama-C. # +# # +# Copyright (C) 2007-2019 # +# CEA (Commissariat à l'énergie atomique et aux énergies # +# alternatives) # +# # +# you can redistribute it and/or modify it under the terms of the GNU # +# Lesser General Public License as published by the Free Software # +# Foundation, version 2.1. # +# # +# It is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Lesser General Public License for more details. # +# # +# See the GNU Lesser General Public License version 2.1 # +# for more details (enclosed in the file licenses/LGPLv2.1). # +# # +########################################################################## + +# Do not use ?= to initialize both below variables +# (fixed efficiency issue, see GNU Make manual, Section 8.11) +ifndef FRAMAC_SHARE +FRAMAC_SHARE :=$(shell frama-c-config -print-share-path) +endif +ifndef FRAMAC_LIBDIR +FRAMAC_LIBDIR :=$(shell frama-c-config -print-libpath) +endif + +################### +# Plug-in Setting # +################### + +PLUGIN_DIR ?=. +PLUGIN_ENABLE:=@ENABLE_STUDIA@ +PLUGIN_NAME:=Studia +PLUGIN_CMO:= options writes reads +PLUGIN_GUI_CMO:= studia_gui +PLUGIN_DISTRIBUTED:=$(PLUGIN_ENABLE) +PLUGIN_DISTRIB_EXTERNAL:= Makefile.in configure.ac configure +PLUGIN_DEPENDENCIES:=Eva +PLUGIN_NO_TEST:=no + +################ +# Generic part # +################ + +include $(FRAMAC_SHARE)/Makefile.dynamic + +##################################### +# Regenerating the Makefile on need # +##################################### + +ifeq ("$(FRAMAC_INTERNAL)","yes") +CONFIG_STATUS_DIR=$(FRAMAC_SRC) +else +CONFIG_STATUS_DIR=. +endif + +$(Studia_DIR)/Makefile: $(Studia_DIR)/Makefile.in \ + $(CONFIG_STATUS_DIR)/config.status + cd $(CONFIG_STATUS_DIR) && ./config.status --file $@ diff --git a/src/plugins/studia/Makefile b/src/plugins/studia/configure.ac similarity index 71% rename from src/plugins/studia/Makefile rename to src/plugins/studia/configure.ac index b7665d764aa..08d83084ebd 100644 --- a/src/plugins/studia/Makefile +++ b/src/plugins/studia/configure.ac @@ -20,31 +20,28 @@ # # ########################################################################## -####################### -# Frama-C Environment # -####################### +######################################## +# Studia as a standard Frama-C plug-in # +######################################## + +m4_define([plugin_file],Makefile.in) -ifndef FRAMAC_SHARE -FRAMAC_SHARE := $(shell frama-c-config -print-share-path) -endif +m4_define([FRAMAC_SHARE_ENV], + [m4_normalize(m4_esyscmd([echo $FRAMAC_SHARE]))]) -ifndef FRAMAC_LIBDIR -FRAMAC_LIBDIR := $(shell frama-c-config -print-libpath) -endif +m4_define([FRAMAC_SHARE], + [m4_ifval(FRAMAC_SHARE_ENV,[FRAMAC_SHARE_ENV], + [m4_esyscmd(frama-c -print-path)])]) -######################### -# Plug-in configuration # -######################### +m4_ifndef([FRAMAC_M4_MACROS], [m4_include(FRAMAC_SHARE/configure.ac)]) -PLUGIN_DIR ?=. -PLUGIN_NAME:=Studia -PLUGIN_CMO:=options writes reads -PLUGIN_GUI_CMO:=studia_gui -PLUGIN_DEPENDENCIES:=Eva -PLUGIN_DISTRIB_EXTERNAL:= Makefile +check_plugin(studia,PLUGIN_RELATIVE_PATH(plugin_file), + [support for studia plug-in],yes) -################ -# Generic part # -################ +plugin_require(studia,eva) + +####################### +# Generating Makefile # +####################### -include $(FRAMAC_SHARE)/Makefile.dynamic +write_plugin_config(Makefile) -- GitLab From b942b6873239598971d790d2210a073e12565c22 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Tue, 9 Apr 2019 10:30:25 +0200 Subject: [PATCH 212/376] [Dev] normalize .gitignore for some plugins --- src/plugins/loop_analysis/.gitignore | 1 + src/plugins/nonterm/.gitignore | 3 ++- src/plugins/obfuscator/.gitignore | 1 + src/plugins/report/.gitignore | 3 ++- src/plugins/studia/.gitignore | 3 ++- src/plugins/variadic/.gitignore | 1 + 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/plugins/loop_analysis/.gitignore b/src/plugins/loop_analysis/.gitignore index 5b03151da1c..0114e3d0f08 100644 --- a/src/plugins/loop_analysis/.gitignore +++ b/src/plugins/loop_analysis/.gitignore @@ -1,3 +1,4 @@ +/configure /Makefile /tests/ptests_config /tests/*/result diff --git a/src/plugins/nonterm/.gitignore b/src/plugins/nonterm/.gitignore index 70edc7aaf5d..0114e3d0f08 100644 --- a/src/plugins/nonterm/.gitignore +++ b/src/plugins/nonterm/.gitignore @@ -1,3 +1,4 @@ +/configure /Makefile /tests/ptests_config -/tests/nonterm/result +/tests/*/result diff --git a/src/plugins/obfuscator/.gitignore b/src/plugins/obfuscator/.gitignore index 5b03151da1c..0114e3d0f08 100644 --- a/src/plugins/obfuscator/.gitignore +++ b/src/plugins/obfuscator/.gitignore @@ -1,3 +1,4 @@ +/configure /Makefile /tests/ptests_config /tests/*/result diff --git a/src/plugins/report/.gitignore b/src/plugins/report/.gitignore index b0b245fa88d..0114e3d0f08 100644 --- a/src/plugins/report/.gitignore +++ b/src/plugins/report/.gitignore @@ -1,3 +1,4 @@ +/configure /Makefile /tests/ptests_config -/tests/report/result +/tests/*/result diff --git a/src/plugins/studia/.gitignore b/src/plugins/studia/.gitignore index 70edc7aaf5d..0114e3d0f08 100644 --- a/src/plugins/studia/.gitignore +++ b/src/plugins/studia/.gitignore @@ -1,3 +1,4 @@ +/configure /Makefile /tests/ptests_config -/tests/nonterm/result +/tests/*/result diff --git a/src/plugins/variadic/.gitignore b/src/plugins/variadic/.gitignore index 5b03151da1c..0114e3d0f08 100644 --- a/src/plugins/variadic/.gitignore +++ b/src/plugins/variadic/.gitignore @@ -1,3 +1,4 @@ +/configure /Makefile /tests/ptests_config /tests/*/result -- GitLab From 3e9e62d2ed821e307ad65dbc84bd41061b00ecae Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Tue, 9 Apr 2019 11:13:30 +0200 Subject: [PATCH 213/376] [Changelog] update Changelog w.r.t. !2221 --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index acdfc594a36..72d99563994 100644 --- a/Changelog +++ b/Changelog @@ -17,6 +17,8 @@ Open Source Release <next-release> ################################## +-* Obfuscator [2019/04/09] Also obfuscate formals in function pointer types. + Fixes #2433. - Inout [2019/04/01] Fix performance issue when initializing large arrays. - ACSL [2019/03/08] Add check annotation, similar to assert except that it does not introduce additional hypotheses on the program state -- GitLab From 286f33fce77b7655eb7e353a8d1547f7da9504ba Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Tue, 9 Apr 2019 13:51:31 +0200 Subject: [PATCH 214/376] [syntax] allow for one letter attributes. Fixes [external BTS 2432](https://bts.frama-c.com/view.php?id=2432) --- src/kernel_internals/typing/cabs2cil.ml | 14 ++++++++++---- src/libraries/stdlib/extlib.ml | 4 ++-- tests/syntax/attributes-declarations-definitions.c | 6 ++++++ .../attributes-declarations-definitions.res.oracle | 3 +++ 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index a66624a0fd6..7f5b53a7cd8 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -63,10 +63,16 @@ open Cil_types open Cil_datatype let stripUnderscore s = - let res = Extlib.strip_underscore s in - if res = "" then - Kernel.error ~once:true ~current:true "Invalid attribute name %s" s; - res + if String.length s = 1 then begin + if s = "_" then + Kernel.error ~once:true ~current:true "Invalid attribute name %s" s; + s + end else begin + let res = Extlib.strip_underscore s in + if res = "" then + Kernel.error ~once:true ~current:true "Invalid attribute name %s" s; + res + end let frama_c_keep_block = "FRAMA_C_KEEP_BLOCK" let () = Cil_printer.register_shallow_attribute frama_c_keep_block diff --git a/src/libraries/stdlib/extlib.ml b/src/libraries/stdlib/extlib.ml index df326129833..8e5d2022b9e 100644 --- a/src/libraries/stdlib/extlib.ml +++ b/src/libraries/stdlib/extlib.ml @@ -477,11 +477,11 @@ let make_unique_name mem ?(sep=" ") ?(start=2) from = let strip_underscore s = let l = String.length s in let rec start i = - if i >= l then l-1 + if i >= l then l else if s.[i] = '_' then start (i + 1) else i in let st = start 0 in - if st = l - 1 then "" + if st = l then "" else begin let rec finish i = (* We know that we will stop at >= st >= 0 *) diff --git a/tests/syntax/attributes-declarations-definitions.c b/tests/syntax/attributes-declarations-definitions.c index 82a09705250..9c7daac462a 100644 --- a/tests/syntax/attributes-declarations-definitions.c +++ b/tests/syntax/attributes-declarations-definitions.c @@ -45,3 +45,9 @@ iptr volatile h(const iptr ip3); void test(void) { int a, __attribute__((unused)) b; } + +int __attribute__((o)) one_letter_attribute; + +int __attribute__((_n)) one_letter_attribute_with_underscore; + +int __attribute__((e_)) one_letter_attribute_with_underscore_after; diff --git a/tests/syntax/oracle/attributes-declarations-definitions.res.oracle b/tests/syntax/oracle/attributes-declarations-definitions.res.oracle index 40ab5bd3e4c..52cada7b775 100644 --- a/tests/syntax/oracle/attributes-declarations-definitions.res.oracle +++ b/tests/syntax/oracle/attributes-declarations-definitions.res.oracle @@ -49,4 +49,7 @@ void test(void) return; } +int __attribute__((__o__)) one_letter_attribute; +int __attribute__((__n__)) one_letter_attribute_with_underscore; +int __attribute__((__e__)) one_letter_attribute_with_underscore_after; -- GitLab From fa23d793f07e9f10fcd28484db7307eec0c388f8 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Tue, 9 Apr 2019 15:12:59 +0200 Subject: [PATCH 215/376] [Changelog] update Changelog w.r.t. !2222 --- Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index 72d99563994..5dab589c8ce 100644 --- a/Changelog +++ b/Changelog @@ -17,6 +17,7 @@ Open Source Release <next-release> ################################## +-* Kernel [2019/04/09] Avoid crashing on one-letter attributes. Fixes #2432 -* Obfuscator [2019/04/09] Also obfuscate formals in function pointer types. Fixes #2433. - Inout [2019/04/01] Fix performance issue when initializing large arrays. -- GitLab From 9cc260b15cc8675a81192593d61b5c11584f2ec9 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Thu, 17 Jan 2019 19:25:53 +0100 Subject: [PATCH 216/376] [fc-script] add command for running ./configure --- bin/frama-c-script | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/bin/frama-c-script b/bin/frama-c-script index b797957eeb5..e5662b42c11 100755 --- a/bin/frama-c-script +++ b/bin/frama-c-script @@ -59,6 +59,13 @@ if [ $# -lt 1 ]; then echo " Monitors and summarizes multiple analyses dispatched by a Makefile" echo " in the current PWD." echo " Use $0 summary --help for more informations." + echo "" + echo " - configure <machdep>" + echo " Runs an existing configure script to only consider files" + echo " in Frama-C's libc; this will hopefully disable non-essential" + echo " and non-POSIX external libraries." + echo " <machdep> is necessary to define a required preprocessor symbol" + echo " (run 'frama-c -machdep' help to get the list of machdeps)." exit fi @@ -185,6 +192,16 @@ EOF fi } +configure_for_frama_c() { + if [ "$#" -eq 0 ]; then + echo "error: 'configure' command requires a machdep"; + exit 1 + fi + MACHDEP="$(echo $1 | tr a-z A-Z)" + echo $MACHDEP + CPP="gcc -E -nostdinc -fno-builtin -I${FRAMAC_SHARE}/libc -D__FC_MACHDEP_${MACHDEP}" ./configure +} + case "$command" in "make-template") shift; @@ -210,6 +227,10 @@ case "$command" in shift; ${FRAMAC_SHARE}/analysis-scripts/summary.py "$@"; ;; + "configure") + shift; + configure_for_frama_c "$@"; + ;; *) echo "error: unrecognized command: $command" esac -- GitLab From 4ce11c1b31dd824bf2ca9f24d5eb444c6e7fb0e7 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Fri, 18 Jan 2019 19:59:07 +0100 Subject: [PATCH 217/376] [fc-script] use relative paths in results of find-fun --- share/analysis-scripts/find_fun.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/analysis-scripts/find_fun.py b/share/analysis-scripts/find_fun.py index b8a3565da0b..5ef92a69b62 100755 --- a/share/analysis-scripts/find_fun.py +++ b/share/analysis-scripts/find_fun.py @@ -101,8 +101,8 @@ else: if possible_declarators != []: print("Possible declarations for function '%s' in the following file(s):" % fname) - print(" " + "\n ".join(possible_declarators)) + print(" " + "\n ".join(map(os.path.relpath, possible_declarators))) if possible_definers != []: print("Possible definitions for function '%s' in the following file(s):" % fname) - print(" " + "\n ".join(possible_definers)) + print(" " + "\n ".join(map(os.path.relpath, possible_definers))) -- GitLab From 3b0819714ef459d07cf166347d835378842cdb86 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Fri, 18 Jan 2019 19:58:44 +0100 Subject: [PATCH 218/376] [fc-script] add make-wrapper and normalize-jcdb scripts; improve find-fun --- Makefile | 2 + bin/frama-c-script | 91 ++++++++++++++++- headers/header_spec.txt | 1 + share/analysis-scripts/fc_stubs.c | 23 +++++ share/analysis-scripts/make_wrapper.py | 133 +++++++++++++++++++++++++ 5 files changed, 245 insertions(+), 5 deletions(-) create mode 100644 share/analysis-scripts/fc_stubs.c create mode 100755 share/analysis-scripts/make_wrapper.py diff --git a/Makefile b/Makefile index 4571affc6f8..94bfa0d32a6 100644 --- a/Makefile +++ b/Makefile @@ -262,6 +262,7 @@ DISTRIB_FILES:=\ share/analysis-scripts/frama_c_results.py \ share/analysis-scripts/git_utils.py \ share/analysis-scripts/list_files.py \ + share/analysis-scripts/make_wrapper.py \ share/analysis-scripts/parse-coverage.sh \ share/analysis-scripts/README.md \ share/analysis-scripts/results_display.py \ @@ -1915,6 +1916,7 @@ install:: install-lib share/analysis-scripts/frama_c_results.py \ share/analysis-scripts/git_utils.py \ share/analysis-scripts/list_files.py \ + share/analysis-scripts/make_wrapper.py \ share/analysis-scripts/parse-coverage.sh \ share/analysis-scripts/README.md \ share/analysis-scripts/results_display.py \ diff --git a/bin/frama-c-script b/bin/frama-c-script index e5662b42c11..e3dafca01d8 100755 --- a/bin/frama-c-script +++ b/bin/frama-c-script @@ -66,6 +66,14 @@ if [ $# -lt 1 ]; then echo " and non-POSIX external libraries." echo " <machdep> is necessary to define a required preprocessor symbol" echo " (run 'frama-c -machdep' help to get the list of machdeps)." + echo "" + echo " - make-wrapper <target> <args>" + echo " Runs 'make <target> <args>', parsing the output to suggest" + echo " useful commands in case of failure." + echo "" + echo " - normalize-jcdb [path/to/compile_commands.json]" + echo " Applies some transformations to an existing compile_commands.json" + echo " (such as relativizing paths) to improve portability" exit fi @@ -112,6 +120,7 @@ make_template() { dir="." fi path="$dir/GNUmakefile" + path_tmp="${path}.tmp" check_path_exists "$path" read -p "Main target name: " main if [[ ! ( "$main" =~ ^[a-zA-Z_0-9]+$ ) ]]; then @@ -122,9 +131,41 @@ make_template() { if [ "$sources" = "" ]; then sources="*.c" fi - sed "s/^MAIN_TARGET :=/MAIN_TARGET := ${main}/" "${FRAMAC_SHARE}/analysis-scripts/template.mk" > "${path}.tmp" - sed "s|\$(MAIN_TARGET).parse:|\$(MAIN_TARGET).parse: $sources|" "${path}.tmp" | sed "/# Remove these lines after defining the main target/{N;N;N;N;d;}" > "$path" - rm "${path}.tmp" + + add_main_stub=0 + read -p "Add stub for function main (only needed if it uses command-line arguments)? [y/N] " yn + case $yn in + [Yy]) + add_main_stub=1 + sources="fc_stubs.c $sources" + ;; + *) + ;; + esac + + sed "s/^MAIN_TARGET :=/MAIN_TARGET := ${main}/" "${FRAMAC_SHARE}/analysis-scripts/template.mk" > "$path" + sed "s|\$(MAIN_TARGET).parse:|\$(MAIN_TARGET).parse: $sources|" "$path" | sed "/# Remove these lines after defining the main target/{N;N;N;N;d;}" > "$path_tmp"; mv "$path_tmp" "$path" + if [ -e "compile_commands.json" ]; then + read -p "compile_commands.json exists, add option -json-compilation-database? [Y/n] " yn + case $yn in + [Nn]) + echo "Option not added; you can later add it to FCFLAGS." + ;; + *) + # the command below inserts a line after matching a given + # pattern; compatible with macOS sed + sed -e '/^FCFLAGS[[:space:]]\++=/a\ +\ \ -json-compilation-database .\\' "$path" > "$path_tmp"; mv "$path_tmp" "$path" + ;; + esac + fi + if [ $add_main_stub -eq 1 ]; then + check_path_exists "fc_stubs.c" + cp "${FRAMAC_SHARE}/analysis-scripts/fc_stubs.c" "./" + echo "Created stub for main function: fc_stubs.c" + sed -e '/^FCFLAGS[[:space:]]\++=/a\ +\ \ -main eva_main \\' "$path" > "$path_tmp"; mv "$path_tmp" "$path" + fi echo "Template created: $path" } @@ -198,8 +239,40 @@ configure_for_frama_c() { exit 1 fi MACHDEP="$(echo $1 | tr a-z A-Z)" - echo $MACHDEP - CPP="gcc -E -nostdinc -fno-builtin -I${FRAMAC_SHARE}/libc -D__FC_MACHDEP_${MACHDEP}" ./configure + shift + CPP="gcc -E -nostdinc -fno-builtin -I${FRAMAC_SHARE}/libc -D__FC_MACHDEP_${MACHDEP}" ./configure "$@" +} + +normalize_jcdb() { + path="" + if [ "$#" -eq 0 ]; then + path="./compile_commands.json" + else + path="$1" + fi + if [ ! -e "$path" ]; then + echo "error: cannot find file: $path"; + exit 1 + fi + sed "s|$PWD/||g" "$path" > "${path}.tmp" + cmp -s "$path" "${path}.tmp" + if [ $? -eq 0 ]; then + echo "No changes to be applied to $path" + rm "${path}.tmp" + else + echo "Differences to be applied to $path:" + diff -u0 "$path" "${path}.tmp" + read -p "Normalize $path? [y/N] " yn + case $yn in + [Yy]) + mv "${path}.tmp" "$path" + echo "Normalization applied to $path" + ;; + *) + echo "Exiting without overwriting." + exit 0;; + esac + fi } case "$command" in @@ -231,6 +304,14 @@ case "$command" in shift; configure_for_frama_c "$@"; ;; + "make-wrapper") + shift; + ${FRAMAC_SHARE}/analysis-scripts/make_wrapper.py "$0" "$@"; + ;; + "normalize-jcdb") + shift; + normalize_jcdb "$@"; + ;; *) echo "error: unrecognized command: $command" esac diff --git a/headers/header_spec.txt b/headers/header_spec.txt index 8400bc0b75b..52cb9fa3d6b 100644 --- a/headers/header_spec.txt +++ b/headers/header_spec.txt @@ -128,6 +128,7 @@ share/analysis-scripts/find_fun.py: .ignore share/analysis-scripts/flamegraph.pl: CDDL share/analysis-scripts/git_utils.py: .ignore share/analysis-scripts/list_files.py: .ignore +share/analysis-scripts/make_wrapper.py: .ignore share/analysis-scripts/parse-coverage.sh: .ignore share/analysis-scripts/README.md: .ignore share/analysis-scripts/results_display.py: .ignore diff --git a/share/analysis-scripts/fc_stubs.c b/share/analysis-scripts/fc_stubs.c new file mode 100644 index 00000000000..ca1ed39a3ba --- /dev/null +++ b/share/analysis-scripts/fc_stubs.c @@ -0,0 +1,23 @@ +// Stub for a main function which reads arguments from the command line, to be +// used by the Eva plug-in. +// This stub emulates non-deterministic input of up to 5 arguments, each up +// to 256 characters long. This is sufficient to ensure arbitrary input in +// virtually every case. +// Do not forget to add option '-main eva_main' in order to use this stub. + +#ifdef __FRAMAC__ +# include "__fc_builtin.h" +int main(int, char **); +static volatile int nondet; +int eva_main() { + int argc = Frama_C_interval(0, 5); + char argv0[256], argv1[256], argv2[256], argv3[256], argv4[256]; + char *argv[5] = {argv0, argv1, argv2, argv3, argv4}; + //@ loop unroll 5; + for (int i = 0; i < 5; i++) { + Frama_C_make_unknown(argv[i], 255); + argv[i][255] = 0; + } + return main(argc, argv); +} +#endif // __FRAMAC__ diff --git a/share/analysis-scripts/make_wrapper.py b/share/analysis-scripts/make_wrapper.py new file mode 100755 index 00000000000..050643df89c --- /dev/null +++ b/share/analysis-scripts/make_wrapper.py @@ -0,0 +1,133 @@ +#!/usr/bin/env python3 +#-*- coding: utf-8 -*- +########################################################################## +# # +# This file is part of Frama-C. # +# # +# Copyright (C) 2007-2018 # +# CEA (Commissariat à l'énergie atomique et aux énergies # +# alternatives) # +# # +# you can redistribute it and/or modify it under the terms of the GNU # +# Lesser General Public License as published by the Free Software # +# Foundation, version 2.1. # +# # +# It is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Lesser General Public License for more details. # +# # +# See the GNU Lesser General Public License version 2.1 # +# for more details (enclosed in the file licenses/LGPLv2.1). # +# # +########################################################################## + +# This script serves as wrapper to 'make' (when using the analysis-scripts +# GNUmakefile template): it parses the output and suggests useful commands +# whenever it can, by calling frama-c-script itself. + +import subprocess +import sys +import os +import re +from functools import partial + +if len(sys.argv) < 3: + print("usage: %s path-to-frama-c-script target" % sys.argv[0]) + print(" Builds the specified target, parsing the output to") + print(" identify and recommend actions in case of failure.") + print(" The first argument must be the path to the frama-c-script") + print(" binary.") + sys.exit(1) + +framac_script = sys.argv[1] +target = sys.argv[2] +args = sys.argv[3:] + +out = subprocess.Popen(['make', target] + args, + stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + +output = out.communicate()[0].decode('utf-8') + +re_missing_spec = re.compile("Neither code nor specification for function ([^,]+),") +re_recursive_call_start = re.compile("detected recursive call") +re_recursive_call_end = re.compile("Use -eva-ignore-recursive-calls to ignore") + +tips = [] + +lines = iter(output.splitlines()) +for line in lines: + print(line) + match = re_missing_spec.search(line) + if match: + fname = match.group(1) + def action(fname): + out = subprocess.Popen([framac_script, "find-fun", fname], + stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + output = out.communicate()[0].decode('utf-8') + re_possible_definers = re.compile("Possible definitions for function") + find_fun_lines = iter(output.splitlines()) + for find_fun_line in find_fun_lines: + if re_possible_definers.match(find_fun_line): + found_files = [next(find_fun_lines)] + while True: + try: + found_files.append(next(find_fun_lines)) + except StopIteration: + if len(found_files) > 1: + print("Found several files defining function '" + + fname + "', cannot recommend automatically.") + print("Check which one is appropriate and add it " + + "to the list of sources to be parsed:") + print("\n".join(found_files)) + else: + print("Add the following file to the list of " + + "sources to be parsed:\n" + found_files[0]) + return + print("Could not find any files defining " + fname + ".") + print("Find the sources defining it and add them, " + + "or provide a stub.") + tip = {"message": "Found function with missing spec: " + fname + "\n" + + " Looking for files defining it...", + "action":partial(action, fname) + } + tips.append(tip) + else: + match = re_recursive_call_start.search(line) + if match: + def action(): + print("Consider patching or stubbing the recursive call, " + + "then re-run the analysis.") + msg_lines = [] + line = next(lines) + while True: + match = re_recursive_call_end.search(line) + if match: + tip = {"message": "Found recursive call at:\n" + + "\n".join(msg_lines), + "action":action + } + tips.append(tip) + break + else: + msg_lines.append(line) + try: + line = next(lines) + except StopIteration: + print("** Error: EOF without ending recursive call stack?") + assert False + +if tips != []: + print("") + print("***** make-wrapper recommendations *****") + print("") + counter = 1 + print("*** recommendation #" + str(counter) + " ***") + print("") + for tip in tips: + if counter > 1: + print("") + print("*** recommendation #" + str(counter) + " ***") + print(str(counter) + ". " + tip["message"]) + counter += 1 + tip["action"]() -- GitLab From 550c4f1107650fbbbac32e898b4fc30399fdc158 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Mon, 1 Apr 2019 19:00:58 +0200 Subject: [PATCH 219/376] [Kernel] fix parsing of quotes in -json-compilation-database --- .../ast_queries/json_compilation_database.ok.ml | 4 ++++ tests/jcdb/jcdb.c | 2 +- tests/jcdb/oracle/jcdb.1.res.oracle | 1 + tests/jcdb/with_arguments.json | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/kernel_services/ast_queries/json_compilation_database.ok.ml b/src/kernel_services/ast_queries/json_compilation_database.ok.ml index 2442e726b6a..8d31f5b6709 100644 --- a/src/kernel_services/ast_queries/json_compilation_database.ok.ml +++ b/src/kernel_services/ast_queries/json_compilation_database.ok.ml @@ -81,6 +81,10 @@ let split_command_args s = let c = String.get s i in let new_state, new_acc = match state, prev_c, c with + | Outside_quote, '\\', c when c = '\"' || c = '\'' -> + (* escaped quote, continue with previous arg *) + Buffer.add_char buf c; + state, acc | Outside_quote, _, q when q = '\'' || q = '\"' -> (* continue previous arg with q *) Buffer.add_char buf q; diff --git a/tests/jcdb/jcdb.c b/tests/jcdb/jcdb.c index ddf00afcd0a..f2389fe2e8a 100644 --- a/tests/jcdb/jcdb.c +++ b/tests/jcdb/jcdb.c @@ -1,7 +1,7 @@ /* run.config EXECNOW: make -s @PTEST_DIR@/@PTEST_NAME@.cmxs OPT: -json-compilation-database @PTEST_DIR@ -print -OPT: -json-compilation-database @PTEST_DIR@/with_arguments.json -print +OPT: @PTEST_DIR@/jcdb2.c -json-compilation-database @PTEST_DIR@/with_arguments.json -print OPT: -json-compilation-database @PTEST_DIR@/with_arguments.json -no-autoload-plugins -load-module @PTEST_DIR@/@PTEST_NAME@.cmxs EXECNOW: LOG list_files.res LOG list_files.err share/analysis-scripts/list_files.py @PTEST_DIR@/compile_commands_working.json > @PTEST_DIR@/result/list_files.res 2> @PTEST_DIR@/result/list_files.err */ diff --git a/tests/jcdb/oracle/jcdb.1.res.oracle b/tests/jcdb/oracle/jcdb.1.res.oracle index 87d1d04f76f..3fbf07641f3 100644 --- a/tests/jcdb/oracle/jcdb.1.res.oracle +++ b/tests/jcdb/oracle/jcdb.1.res.oracle @@ -1,4 +1,5 @@ [kernel] Parsing tests/jcdb/jcdb.c (with preprocessing) +[kernel] Parsing tests/jcdb/jcdb2.c (with preprocessing) /* Generated by Frama-C */ #include "errno.h" #include "stdarg.h" diff --git a/tests/jcdb/with_arguments.json b/tests/jcdb/with_arguments.json index 49b11f5d572..4217869b5ea 100644 --- a/tests/jcdb/with_arguments.json +++ b/tests/jcdb/with_arguments.json @@ -16,5 +16,9 @@ "-UTOUNDEF" ], "file": "jcdb.c" + }, + { "directory": "tests/jcdb", + "command": "/usr/bin/cc -DONION_VERSION=\\\"0.1.tr\\\" -Ibla -o jcdb2.o -c jcdb2.c jcdb.c", + "file": "jcdb2.c" } ] -- GitLab From cb548af6e1f76d1a6bb6c339af2fae1aa9abd8b3 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Thu, 11 Apr 2019 16:48:00 +0200 Subject: [PATCH 220/376] [fc-script] fix distribution of files from !2116 --- Makefile | 2 ++ headers/header_spec.txt | 1 + 2 files changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 94bfa0d32a6..5d51fd0d81a 100644 --- a/Makefile +++ b/Makefile @@ -256,6 +256,7 @@ DISTRIB_FILES:=\ share/analysis-scripts/concat-csv.sh \ share/analysis-scripts/clone.sh \ $(wildcard share/analysis-scripts/examples/*) \ + share/analysis-scripts/fc_stubs.c \ share/analysis-scripts/find_fun.py \ share/analysis-scripts/flamegraph.pl \ share/analysis-scripts/frama-c.mk \ @@ -1910,6 +1911,7 @@ install:: install-lib share/analysis-scripts/cmd-dep.sh \ share/analysis-scripts/concat-csv.sh \ share/analysis-scripts/clone.sh \ + share/analysis-scripts/fc_stubs.c \ share/analysis-scripts/find_fun.py \ share/analysis-scripts/flamegraph.pl \ share/analysis-scripts/frama-c.mk \ diff --git a/headers/header_spec.txt b/headers/header_spec.txt index 52cb9fa3d6b..7a59f56fa0a 100644 --- a/headers/header_spec.txt +++ b/headers/header_spec.txt @@ -115,6 +115,7 @@ ptests/ptests.ml: CEA_LGPL share/_frama-c: CEA_LGPL share/analysis-scripts/benchmark_database.py: .ignore share/analysis-scripts/clone.sh: .ignore +share/analysis-scripts/fc_stubs.c: .ignore share/analysis-scripts/frama-c.mk: CEA_LGPL share/analysis-scripts/frama_c_results.py: .ignore share/analysis-scripts/cmd-dep.sh: .ignore -- GitLab From 10612471932e5951b0ad391b2800891f5d8e2466 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Fri, 12 Apr 2019 09:02:11 +0200 Subject: [PATCH 221/376] [tests] add missing test --- tests/jcdb/jcdb2.c | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tests/jcdb/jcdb2.c diff --git a/tests/jcdb/jcdb2.c b/tests/jcdb/jcdb2.c new file mode 100644 index 00000000000..80dcbded2b7 --- /dev/null +++ b/tests/jcdb/jcdb2.c @@ -0,0 +1,4 @@ +/* run.config + DONTRUN: + COMMENT: only used to test parsing of options in with_arguments.json +*/ -- GitLab From f277c11a7e0e4b6376297f80a65b22a8fd6c7587 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Mon, 15 Apr 2019 10:18:43 +0200 Subject: [PATCH 222/376] [ACSL] grammar extension for ACSL-importer --- src/kernel_internals/parsing/logic_parser.mly | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kernel_internals/parsing/logic_parser.mly b/src/kernel_internals/parsing/logic_parser.mly index 4f81bcc7f24..4682d062852 100644 --- a/src/kernel_internals/parsing/logic_parser.mly +++ b/src/kernel_internals/parsing/logic_parser.mly @@ -921,12 +921,12 @@ ext_global_clause: | INCLUDE string SEMICOLON { let b,s = $2 in Ext_include(b,s, loc()) } ; -ext_global_specs_opt: +ext_global_specs_opt: | /* empty */ { [] } | ext_global_specs { $1 } ; -ext_global_specs: +ext_global_specs: | ext_global_spec { [$1] } | ext_global_spec ext_global_specs { $1::$2 } ; @@ -934,8 +934,8 @@ ext_global_specs: ext_global_spec: | ext_module_markup ext_global_clauses_opt ext_module_specs { (Some $1),$2,$3 } -| ext_module_markup - { (Some $1),[],[] } +| ext_module_markup ext_global_clauses_opt + { (Some $1),$2,[] } ; ext_module_specs_opt: -- GitLab From 74d37020884d0c003aaff282cf8ecbe3c0e9c8c0 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Tue, 9 Apr 2019 18:49:54 +0200 Subject: [PATCH 223/376] [Gui] avoid resetting Properties panel when unfolding bullets --- src/plugins/gui/design.ml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/plugins/gui/design.ml b/src/plugins/gui/design.ml index 1e8d0334f1e..cbcc2b5f8f7 100644 --- a/src/plugins/gui/design.ml +++ b/src/plugins/gui/design.ml @@ -1338,12 +1338,15 @@ class main_window () : main_window_extension_points = method private statusbar = statusbar method lower_notebook = lower_notebook - method reset () = + method private reset_no_extensions () = Gui_parameters.debug ~dkey "Redisplaying gui"; Globals_GUI.clear (); current_buffer_state <- original_reactive_buffer; self#file_tree#reset (); - (self#menu_manager ())#refresh (); + (self#menu_manager ())#refresh () + + method reset () = + self#reset_no_extensions (); reset_extensions self#toplevel; if History.is_empty () then ( self#default_screen ()) @@ -1527,7 +1530,7 @@ class main_window () : main_window_extension_points = try let stmt = Hashtbl.find Feedback.call_sites line in Pretty_source.fold_preconds_at_callsite stmt; - self#reset (); + self#reset_no_extensions (); (* give some time for the sourceview to recompute its height, otherwise scrolling is broken. *) let has_stabilized = ref false in -- GitLab From c4daae632d636bd4010661376490babf22125399 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Fri, 12 Apr 2019 16:16:19 +0200 Subject: [PATCH 224/376] [ACSL] fixes parsing issues about C fields --- src/kernel_internals/parsing/logic_parser.mly | 72 ++++++++++--------- tests/spec/kw.c | 6 ++ tests/spec/oracle/kw.res.oracle | 37 ++++++++++ 3 files changed, 81 insertions(+), 34 deletions(-) diff --git a/src/kernel_internals/parsing/logic_parser.mly b/src/kernel_internals/parsing/logic_parser.mly index 4682d062852..3c14abf92a6 100644 --- a/src/kernel_internals/parsing/logic_parser.mly +++ b/src/kernel_internals/parsing/logic_parser.mly @@ -1765,15 +1765,23 @@ any_identifier_non_logic: | identifier_or_typename { $1 } | non_logic_keyword { $1 } -identifier_or_typename: +identifier_or_typename: /* allowed as C field names */ +| TYPENAME { $1 } /* followed by the same list than 'identifier' */ | IDENTIFIER { $1 } -| TYPENAME { $1 } +/* token list used inside ascl clauses: */ +| BEHAVIORS { "behaviors" } +| LABEL { "label" } +| READS { "reads" } +| WRITES { "writes" } ; -identifier: +identifier: /* part included into 'identifier_or_typename', but duplicated to avoid parsing conflicts */ | IDENTIFIER { $1 } -| READS { "reads" } -| WRITES { "writes" } +/* token list used inside ascl clauses: */ +| BEHAVIORS { "behaviors" } +| LABEL { "label" } +| READS { "reads" } +| WRITES { "writes" } ; bounded_var: @@ -1786,30 +1794,30 @@ bounded_var: ; c_keyword: -| CASE { "case" } -| CHAR { "char" } -| BOOLEAN { "boolean" } -| BOOL { "_Bool" } -| CONST { "const" } -| DOUBLE { "double" } -| ELSE { "else" } -| ENUM { "enum" } -| FLOAT { "float" } -| IF { "if" } -| INT { "int" } -| LONG { "long" } -| SHORT { "short" } -| SIGNED { "signed" } -| SIZEOF { "sizeof" } -| STATIC { "static" } -| STRUCT { "struct" } -| UNION { "union" } +| CHAR { "char" } +| BOOLEAN { "boolean" } +| BOOL { "_Bool" } +| CONST { "const" } +| DOUBLE { "double" } +| ENUM { "enum" } +| ELSE { "else" } +| FLOAT { "float" } +| IF { "if" } +| INT { "int" } +| LONG { "long" } +| SHORT { "short" } +| SIGNED { "signed" } +| SIZEOF { "sizeof" } +| STATIC { "static" } +| STRUCT { "struct" } +| UNION { "union" } | UNSIGNED { "unsigned" } -| VOID { "void" } +| VOID { "void" } ; acsl_c_keyword: -| FOR { "for" } +| CASE { "case" } +| FOR { "for" } | VOLATILE { "volatile" } ; @@ -1848,7 +1856,7 @@ is_acsl_decl_or_code_annot: | LEMMA { "lemma" } | LOOP { "loop" } | PRAGMA { "pragma" } -| PREDICATE { "predicate" } +| PREDICATE { "predicate" } | SLICE { "slice" } | TYPE { "type" } | MODEL { "model" } @@ -1858,12 +1866,8 @@ is_acsl_decl_or_code_annot: ; is_acsl_other: -| BEHAVIORS { "behaviors" } -| INTEGER { "integer" } -| LABEL { "label" } -| READS { "reads" } -| REAL { "real" } -| WRITES { "writes" } +| INTEGER { "integer" (* token that cannot be used in C fields *) } +| REAL { "real" (* token that cannot be used in C fields *) } ; is_ext_spec: @@ -1876,7 +1880,7 @@ is_ext_spec: ; keyword: -| LOGIC { "logic" } +| LOGIC { "logic" } | non_logic_keyword { $1 } ; @@ -1887,7 +1891,7 @@ non_logic_keyword: | is_acsl_spec { $1 } | is_acsl_decl_or_code_annot { $1 } | is_acsl_other { $1 } -| CUSTOM { "custom" } +| CUSTOM { "custom" (* token that cannot be used in C fields *) } ; bs_keyword: diff --git a/tests/spec/kw.c b/tests/spec/kw.c index eb7b4e0b8fb..e57a4869f38 100644 --- a/tests/spec/kw.c +++ b/tests/spec/kw.c @@ -11,6 +11,12 @@ assert behavior = 0; int main () { //@ slevel 4; behavior++; + struct custom { int reads, behaviors, label ; } writes; + //@ assert custom: writes.reads + writes.behaviors <= \let global = writes.label; global; + struct at { int module, function, global ; } include; + //@ assert at: include.function + include.module <= \let behaviors = include.global ; behaviors; + struct loop { int requires, ensures, checks ; } assert; + //@ assert loop: assert.ensures + assert.ensures <= \let reads = assert.checks; reads ; return 0; } diff --git a/tests/spec/oracle/kw.res.oracle b/tests/spec/oracle/kw.res.oracle index b9d920cb849..151e9f04be6 100644 --- a/tests/spec/oracle/kw.res.oracle +++ b/tests/spec/oracle/kw.res.oracle @@ -1,6 +1,21 @@ [kernel] Parsing tests/spec/kw.c (with preprocessing) /* Generated by Frama-C */ typedef int assert; +struct custom { + int reads ; + int behaviors ; + int label ; +}; +struct at { + int module ; + int function ; + int global ; +}; +struct loop { + int requires ; + int ensures ; + int checks ; +}; assert behavior = 0; /*@ logic assert foo(assert x) = x; */ @@ -12,8 +27,30 @@ assert behavior = 0; int main(void) { int __retres; + struct custom writes; + struct at include; + struct loop assert; /*@ slevel 4; */ behavior ++; + /*@ + assert + custom: + writes.reads + writes.behaviors ≤ (\let global = writes.label; global); + */ + ; + /*@ + assert + at: + include.function + include.module ≤ + (\let behaviors = include.global; behaviors); + */ + ; + /*@ + assert + loop: + assert.ensures + assert.ensures ≤ (\let reads = assert.checks; reads); + */ + ; __retres = 0; return __retres; } -- GitLab From 26324b9b0f3f4fe48fc9f1f964a305143ee2e109 Mon Sep 17 00:00:00 2001 From: Valentin Perrelle <valentin.perrelle@cea.fr> Date: Tue, 24 Apr 2018 19:49:09 +0200 Subject: [PATCH 225/376] [Eva] Implement trace partitioning. --- Makefile | 6 +- headers/header_spec.txt | 16 +- .../value/engine/basic_partitioning.ml | 313 -------------- .../value/engine/legacy_partitioning.ml | 217 ---------- src/plugins/value/engine/partition.ml | 325 +++++++++++++++ src/plugins/value/engine/partition.mli | 119 ++++++ .../value/engine/partitioned_dataflow.ml | 172 ++------ src/plugins/value/engine/partitioning.ml | 1 + src/plugins/value/engine/partitioning.mli | 1 + .../value/engine/partitioning_parameters.ml | 129 ++++++ ...ioning.mli => partitioning_parameters.mli} | 3 +- .../value/engine/state_partitioning.mli | 42 +- .../value/engine/trace_partitioning.ml | 386 ++++++++++++++++++ ...artitioning.mli => trace_partitioning.mli} | 1 + src/plugins/value/slevel/per_stmt_slevel.ml | 77 +--- .../value/utils/partitioning_annots.ml | 175 ++++++++ ...oll_annots.mli => partitioning_annots.mli} | 15 +- src/plugins/value/utils/unroll_annots.ml | 54 --- src/plugins/value/value_parameters.ml | 63 ++- src/plugins/value/value_parameters.mli | 11 +- tests/misc/unroll_annots.c | 22 - .../oracle/partitioning-annots.0.res.oracle | 26 ++ .../oracle/partitioning-annots.1.res.oracle | 68 +++ .../oracle/partitioning-annots.2.res.oracle | 76 ++++ .../oracle/partitioning-annots.3.res.oracle | 67 +++ .../oracle/partitioning-annots.4.res.oracle | 39 ++ .../oracle/partitioning-annots.5.res.oracle | 38 ++ tests/value/partitioning-annots.c | 121 ++++++ 28 files changed, 1719 insertions(+), 864 deletions(-) delete mode 100644 src/plugins/value/engine/basic_partitioning.ml delete mode 100644 src/plugins/value/engine/legacy_partitioning.ml create mode 100644 src/plugins/value/engine/partition.ml create mode 100644 src/plugins/value/engine/partition.mli create mode 100644 src/plugins/value/engine/partitioning_parameters.ml rename src/plugins/value/engine/{legacy_partitioning.mli => partitioning_parameters.mli} (95%) create mode 100644 src/plugins/value/engine/trace_partitioning.ml rename src/plugins/value/engine/{basic_partitioning.mli => trace_partitioning.mli} (99%) create mode 100644 src/plugins/value/utils/partitioning_annots.ml rename src/plugins/value/utils/{unroll_annots.mli => partitioning_annots.mli} (80%) delete mode 100644 src/plugins/value/utils/unroll_annots.ml delete mode 100644 tests/misc/unroll_annots.c create mode 100644 tests/value/oracle/partitioning-annots.0.res.oracle create mode 100644 tests/value/oracle/partitioning-annots.1.res.oracle create mode 100644 tests/value/oracle/partitioning-annots.2.res.oracle create mode 100644 tests/value/oracle/partitioning-annots.3.res.oracle create mode 100644 tests/value/oracle/partitioning-annots.4.res.oracle create mode 100644 tests/value/oracle/partitioning-annots.5.res.oracle create mode 100644 tests/value/partitioning-annots.c diff --git a/Makefile b/Makefile index 5d51fd0d81a..411ebb702e9 100644 --- a/Makefile +++ b/Makefile @@ -877,7 +877,7 @@ PLUGIN_DISTRIB_EXTERNAL+= \ PLUGIN_CMO:= slevel/split_strategy value_parameters \ utils/value_perf utils/value_util utils/red_statuses \ utils/mark_noresults \ - utils/widen_hints_ext utils/widen utils/unroll_annots \ + utils/widen_hints_ext utils/widen utils/partitioning_annots \ engine/split_return \ slevel/per_stmt_slevel \ utils/library_functions \ @@ -918,8 +918,8 @@ PLUGIN_CMO:= slevel/split_strategy value_parameters \ engine/subdivided_evaluation engine/evaluation engine/abstractions \ engine/recursion engine/transfer_stmt engine/transfer_specification \ engine/partitioning engine/mem_exec \ - engine/legacy_partitioning engine/basic_partitioning \ - engine/loop_partitioning engine/partitioned_dataflow \ + engine/partition engine/partitioning_parameters engine/trace_partitioning \ + engine/partitioned_dataflow \ engine/initialization \ engine/compute_functions engine/analysis register PLUGIN_CMI:= values/abstract_value values/abstract_location \ diff --git a/headers/header_spec.txt b/headers/header_spec.txt index 7a59f56fa0a..e94bb4bef29 100644 --- a/headers/header_spec.txt +++ b/headers/header_spec.txt @@ -1170,24 +1170,22 @@ src/plugins/value/engine/abstractions.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/abstractions.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/analysis.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/analysis.mli: CEA_LGPL_OR_PROPRIETARY -src/plugins/value/engine/basic_partitioning.ml: CEA_LGPL_OR_PROPRIETARY -src/plugins/value/engine/basic_partitioning.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/compute_functions.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/compute_functions.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/evaluation.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/evaluation.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/initialization.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/initialization.mli: CEA_LGPL_OR_PROPRIETARY -src/plugins/value/engine/legacy_partitioning.ml: CEA_LGPL_OR_PROPRIETARY -src/plugins/value/engine/legacy_partitioning.mli: CEA_LGPL_OR_PROPRIETARY -src/plugins/value/engine/loop_partitioning.ml: CEA_LGPL_OR_PROPRIETARY -src/plugins/value/engine/loop_partitioning.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/mem_exec.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/mem_exec.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/partitioned_dataflow.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/partitioned_dataflow.mli: CEA_LGPL_OR_PROPRIETARY +src/plugins/value/engine/partition.ml: CEA_LGPL_OR_PROPRIETARY +src/plugins/value/engine/partition.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/partitioning.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/partitioning.mli: CEA_LGPL_OR_PROPRIETARY +src/plugins/value/engine/partitioning_parameters.ml: CEA_LGPL_OR_PROPRIETARY +src/plugins/value/engine/partitioning_parameters.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/recursion.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/recursion.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/split_return.ml: CEA_LGPL_OR_PROPRIETARY @@ -1195,6 +1193,8 @@ src/plugins/value/engine/split_return.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/state_partitioning.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/subdivided_evaluation.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/subdivided_evaluation.mli: CEA_LGPL_OR_PROPRIETARY +src/plugins/value/engine/trace_partitioning.ml: CEA_LGPL_OR_PROPRIETARY +src/plugins/value/engine/trace_partitioning.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/transfer_logic.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/transfer_logic.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/transfer_specification.ml: CEA_LGPL_OR_PROPRIETARY @@ -1239,9 +1239,9 @@ src/plugins/value/utils/red_statuses.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/utils/red_statuses.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/utils/library_functions.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/utils/library_functions.mli: CEA_LGPL_OR_PROPRIETARY -src/plugins/value/utils/unroll_annots.ml: CEA_LGPL_OR_PROPRIETARY -src/plugins/value/utils/unroll_annots.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/utils/mark_noresults.ml: CEA_LGPL_OR_PROPRIETARY +src/plugins/value/utils/partitioning_annots.ml: CEA_LGPL_OR_PROPRIETARY +src/plugins/value/utils/partitioning_annots.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/utils/state_import.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/utils/state_import.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/utils/structure.ml: CEA_LGPL_OR_PROPRIETARY diff --git a/src/plugins/value/engine/basic_partitioning.ml b/src/plugins/value/engine/basic_partitioning.ml deleted file mode 100644 index 4a790f63214..00000000000 --- a/src/plugins/value/engine/basic_partitioning.ml +++ /dev/null @@ -1,313 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat à l'énergie atomique et aux énergies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -open Cil_types -open Bottom.Type -open State_partitioning - - -module Make (Domain : Domain) (Param : Param) = -struct - include Param - module Partition = Partitioning.Make (Domain) - - type state = Domain.t - - (** Stores contains what have been already computed at a fixed control - point. - Propagation contrains what have changed since last iteration and needs - to be propagated. - Widening records previous states used in widening operations and keep - tracks of the number of iterations remaining before next widening. - - How states are stored: - - Eternal states are states which, once propagated, we are sure they - will stay until the end of the analysis. This means they have not - been widened, and thus cannot descend or disapear. - - When states have been widened and/or joined due to the lack of - slevel, they are put in the ultimate state. - - Eternal states that can't be propagated due to the lack of slevel - are doomed to wander into the limbo state. It is a join of all those - states. - With these rules, the ultimate state at one point is the join of the - limbo state and the ultimate states of the predecessors. - The field [size] store a value compatible with the legacy way of - counting the number of eternal states in the store. *) - type store = { - size_limit : int; - merge : bool; - mutable eternal_states : Partition.t; - mutable ultimate_state : state or_bottom; - mutable limbo_state : state or_bottom; - mutable size : int; - } - - type propagation = { - mutable eternal_propagation : state list; - mutable ultimate_propagation : state or_bottom option; - mutable widening_depth : int; - mutable current_depth : int; - } - - type shadow = { - mutable transfered_eternals : int; - mutable shadowed_ultimate : state or_bottom; - } - - type widening = { - stmt : stmt; - mutable widened_state : state or_bottom; - mutable previous_state : state or_bottom; - mutable widening_counter : int; - } - - (* Constructors *) - - let empty_store ~(stmt : stmt option) : store = - let size_limit, merge = match stmt with - | None -> max_int, false - | Some stmt -> slevel stmt, merge stmt - in - { - size_limit; merge; - eternal_states = Partition.empty (); - ultimate_state = `Bottom; - limbo_state = `Bottom; - size = 0; - } - - let empty_propagation () : propagation = - { - eternal_propagation = []; - ultimate_propagation = None; - widening_depth = max_int; - current_depth = 0; - } - - let empty_shadow () : shadow = - { - transfered_eternals = 0; - shadowed_ultimate = `Bottom; - } - - let empty_widening ~(stmt : stmt option) : widening = - { - stmt = Extlib.opt_conv Cil.invalidStmt stmt; - widened_state = `Bottom; - previous_state = `Bottom; - widening_counter = widening_delay; - } - - let initial_propagation (states : state list) = - let empty = empty_propagation () in - { empty with eternal_propagation = states } - - (* Pretty printing *) - - let pretty_eternal (fmt : Format.formatter) (v : Domain.t) : unit = - Format.fprintf fmt "eternal state %a@\n" Domain.pretty v - - let pretty_ultimate (fmt : Format.formatter) (v : Domain.t) : unit = - Format.fprintf fmt "ultimate state %a@\n" Domain.pretty v - - let pretty_store (fmt : Format.formatter) (s : store) : unit = - List.iter (pretty_eternal fmt) (Partition.to_list s.eternal_states); - if not (Bottom.is_bottom s.ultimate_state) then - pretty_ultimate fmt (Bottom.non_bottom s.ultimate_state) - - let pretty_propagation (fmt : Format.formatter) (p : propagation) = - List.iter (pretty_eternal fmt) p.eternal_propagation; - Extlib.may (Bottom.pretty pretty_ultimate fmt) p.ultimate_propagation - - (* Accessors *) - - let expanded (s : store) : state list = - Bottom.add_to_list s.ultimate_state (Partition.to_list s.eternal_states) - - let smashed (s : store) : state or_bottom = - let l = expanded s in - Domain.join_list l - - let is_empty_store (s : store) : bool = - s.size = 0 && Bottom.is_bottom s.ultimate_state - - let is_empty_propagation (p : propagation) : bool = - p.eternal_propagation = [] && not (Extlib.has_some p.ultimate_propagation) - - let is_empty_shadow (s : shadow) : bool = - s.transfered_eternals = 0 && Bottom.is_bottom s.shadowed_ultimate - - let store_size (s : store) : int = - s.size - - let propagation_size (p : propagation) : int = - List.length p.eternal_propagation + - match p.ultimate_propagation with - | None | Some `Bottom -> 0 - | Some (`Value _) -> 1 - - (* Reset state (for hierchical convergence) *) - - let reset_store (s : store) : unit = - s.ultimate_state <- `Bottom - - let reset_propagation (p : propagation) : unit = - p.ultimate_propagation <- None; - p.widening_depth <- max_int - - let reset_shadow (s : shadow) : unit = - s.shadowed_ultimate <- `Bottom - - let reset_widening (w : widening) : unit = - w.widened_state <- `Bottom; - w.previous_state <- `Bottom; - w.widening_counter <- widening_delay - - let reset_widening_counter (w : widening) : unit = - w.widening_counter <- max w.widening_counter (widening_period - 1) - - (* Operators *) - - let clear_propagation (p : propagation) : unit = - p.eternal_propagation <- []; - p.ultimate_propagation <- None; - p.widening_depth <- max_int; - p.current_depth <- 0 - - let transfer (f : state list -> state list) (p : propagation) : unit = - let transfer_ultimate state' = - state' >>- fun x -> Domain.join_list (f [x]) - in - if p.eternal_propagation <> [] then - p.eternal_propagation <- f p.eternal_propagation; - p.ultimate_propagation <- - Extlib.opt_map transfer_ultimate p.ultimate_propagation - - let merge ~(into : propagation) (source : propagation) : unit = - if Extlib.has_some source.ultimate_propagation then - into.ultimate_propagation <- source.ultimate_propagation; - into.eternal_propagation <- - source.eternal_propagation @ into.eternal_propagation; - into.widening_depth <- source.widening_depth; - into.current_depth <- source.current_depth - - let join (sources : (propagation*shadow) list) (dest : store): propagation = - let ultimates_changed = ref false in - (* Update source shadow with source propagation *) - let update (eternals,ultimates) (p,s) = - begin match p.ultimate_propagation with - | None -> () - | Some state' -> - if not (Bottom.equal Domain.equal state' s.shadowed_ultimate) then - ultimates_changed := true; - s.shadowed_ultimate <- state' - end; - s.transfered_eternals <- s.transfered_eternals + - List.length p.eternal_propagation; - p.eternal_propagation @ eternals, - Bottom.add_to_list s.shadowed_ultimate ultimates - in - let eternals, ultimates = List.fold_left update ([],[]) sources in - (* Create a new propagation *) - let p = empty_propagation () in - let current_depth acc (p,_s) = max p.current_depth acc - and widening_depth acc (p,_s) = min p.widening_depth acc in - p.current_depth <- List.fold_left current_depth 0 sources; - p.widening_depth <- List.fold_left widening_depth max_int sources; - (* Add all eternal states *) - dest.size <- dest.size + List.length eternals; - let states = Partition.merge_set_return_new eternals dest.eternal_states in - (* Merge / Merge after loop : join eternal states being propagated *) - let states = - if dest.merge - then Bottom.to_list (Domain.join_list states) - else states - in - (* Do we have too many eternal states ? *) - if dest.size > dest.size_limit then - begin - (* Send excess states into limbo *) - dest.limbo_state <- Domain.join_list ~into:dest.limbo_state states; - ultimates_changed := true - end else - p.eternal_propagation <- states; - (* Join ultimate states *) - if !ultimates_changed then - begin - let inputs = Bottom.add_to_list dest.limbo_state ultimates in - let state' = Domain.join_list inputs in - if not (Bottom.equal Domain.equal state' dest.ultimate_state) then - p.ultimate_propagation <- Some state'; - dest.ultimate_state <- state' - end; - p - - let widen (_s : store) (w : widening) (p : propagation) : bool = - let ultimate_stable = - match p.ultimate_propagation with - | None -> true - | Some current_state -> - let previous_state = w.previous_state in - w.previous_state <- current_state; - w.widening_counter <- w.widening_counter - 1; - match previous_state, current_state with - | _, `Bottom -> true - | `Bottom, `Value _ -> false - | `Value prev, `Value curr -> - if Domain.is_included curr prev then - true - else if w.widening_counter >= 0 then - false - else begin - Value_parameters.feedback ~level:1 ~once:true ~current:true - ~dkey:Value_parameters.dkey_widening - "applying a widening at this point"; - let prev = match w.widened_state with - | `Value v -> Domain.join prev v - | `Bottom -> prev - in - let next = Domain.widen kf w.stmt prev (Domain.join prev curr) in - p.ultimate_propagation <- Some (`Value next); - p.widening_depth <- min p.widening_depth p.current_depth; - w.previous_state <- `Value next; - w.widened_state <- `Value next; - w.widening_counter <- widening_period - 1; - false - end - in - ultimate_stable && p.eternal_propagation = [] - - let enter_loop (p : propagation) (_ : loop) = - p.current_depth <- p.current_depth + 1 - - let leave_loop (p : propagation) (_ : loop) = - p.current_depth <- p.current_depth - 1; - match p.ultimate_propagation with - (* We leave the loop where the ultimate have been widened. - It becomes eternal again. *) - | Some state' when p.current_depth < p.widening_depth -> - p.ultimate_propagation <- None; - p.eternal_propagation <- Bottom.add_to_list state' p.eternal_propagation - | _ -> () - - let next_loop_iteration (_p : propagation) (_ : loop) = () -end diff --git a/src/plugins/value/engine/legacy_partitioning.ml b/src/plugins/value/engine/legacy_partitioning.ml deleted file mode 100644 index bb2b4660552..00000000000 --- a/src/plugins/value/engine/legacy_partitioning.ml +++ /dev/null @@ -1,217 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat à l'énergie atomique et aux énergies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - - -open Cil_types -open Bottom.Type -open State_partitioning - -module Make (Domain : Domain) (Param : Param) = -struct - include Param - module Partition = Partitioning.Make (Domain) - - type state = Domain.t - - type store = { - size_limit : int; - merge : bool; - mutable eternal_states : Partition.t; - mutable ultimate_state : state or_bottom; - mutable size : int; - } - - type propagation = { - mutable states : state list; - } - - type shadow = { - mutable transfered_states : int; - } - - type widening = { - stmt : stmt; - mutable widened_state : state or_bottom; - mutable previous_state : state or_bottom; - mutable widening_counter : int; - } - - (* Constructors *) - - let empty_store ~(stmt : stmt option) : store = - let size_limit, merge = match stmt with - | None -> max_int, false - | Some stmt -> slevel stmt, merge stmt - in - { - size_limit; merge; - eternal_states = Partition.empty (); - ultimate_state = `Bottom; - size = 0; - } - - let empty_propagation () : propagation = - { states = [] } - - let empty_shadow () : shadow = - { transfered_states = 0 } - - let empty_widening ~(stmt : stmt option) : widening = - { - stmt = Extlib.opt_conv Cil.invalidStmt stmt; - widened_state = `Bottom; - previous_state = `Bottom; - widening_counter = widening_delay; - } - - let initial_propagation (states : state list) : propagation = - { states } - - (* Pretty printing *) - - let pretty_eternal (fmt : Format.formatter) (v : Domain.t) : unit = - Format.fprintf fmt "eternal state %a@\n" Domain.pretty v - - let pretty_ultimate (fmt : Format.formatter) (v : Domain.t) : unit = - Format.fprintf fmt "ultimate state %a@\n" Domain.pretty v - - let pretty_store (fmt : Format.formatter) (s : store) : unit = - List.iter (pretty_eternal fmt) (Partition.to_list s.eternal_states); - if not (Bottom.is_bottom s.ultimate_state) then - pretty_ultimate fmt (Bottom.non_bottom s.ultimate_state) - - let pretty_propagation (fmt : Format.formatter) (p : propagation) = - List.iter (pretty_eternal fmt) p.states - - (* Accessors *) - - let expanded (s : store) : state list = - Bottom.add_to_list s.ultimate_state (Partition.to_list s.eternal_states) - - let smashed (s : store) : state or_bottom = - let l = expanded s in - Domain.join_list l - - let is_empty_store (s : store) : bool = - s.size = 0 && Bottom.is_bottom s.ultimate_state - - let is_empty_propagation (p : propagation) : bool = - p.states = [] - - let is_empty_shadow (s : shadow) : bool = - s.transfered_states = 0 - - let store_size (s : store) : int = - s.size - - let propagation_size (p : propagation) : int = - List.length p.states - - (* Reset state (for hierchical convergence) *) - - let reset_store (s : store) : unit = - s.ultimate_state <- `Bottom - - let reset_propagation (p : propagation) : unit = - p.states <- [] - - let reset_shadow (_s : shadow) : unit = () - - let reset_widening (w : widening) : unit = - w.widened_state <- `Bottom; - w.previous_state <- `Bottom; - w.widening_counter <- widening_delay - - let reset_widening_counter w = - w.widening_counter <- max w.widening_counter (widening_period - 1) - - (* Operators *) - - let clear_propagation (p : propagation) : unit = - p.states <- [] - - let transfer (f : state list -> state list) (p : propagation) : unit = - if p.states <> [] then - p.states <- f p.states - - let merge ~(into : propagation) (source : propagation) : unit = - into.states <- source.states @ into.states - - let join (sources : (propagation*shadow) list) (dest : store) : propagation = - (* Update source stores with source propagation *) - let update acc (p,s) = - let size = List.length p.states in - s.transfered_states <- s.transfered_states + size; - dest.size <- dest.size + size; - Partition.merge_set_return_new p.states dest.eternal_states @ acc - in - let new_states = List.fold_left update [] sources in - (* Create a new propagation *) - let p = { states = new_states } in - (* Merge / Merge after loop : join eternal states being propagated *) - if dest.merge then - p.states <- Bottom.to_list (Domain.join_list p.states); - (* Do we have too many eternal states ? *) - if dest.size > dest.size_limit then - begin - let state' = Domain.join_list ~into:dest.ultimate_state p.states in - if Bottom.is_included Domain.is_included state' dest.ultimate_state then - p.states <- [] - else begin - dest.ultimate_state <- state'; - p.states <- Bottom.to_list state' - end - end; - p - - let widen (s : store) (w : widening) (p : propagation) : bool = - let current_state = s.ultimate_state - and previous_state = w.previous_state in - if not (Bottom.is_bottom current_state) then begin - w.previous_state <- current_state; - w.widening_counter <- w.widening_counter - 1; - match previous_state, current_state with - | _, `Bottom | `Bottom, _ -> () - | `Value prev, `Value curr -> - if Domain.is_included curr prev then - p.states <- [] - else if w.widening_counter < 0 then begin - Value_parameters.feedback ~level:1 ~once:true ~current:true - ~dkey:Value_parameters.dkey_widening - "applying a widening at this point"; - let prev = match w.widened_state with - | `Value v -> Domain.join prev v - | `Bottom -> prev - in - let next = Domain.widen kf w.stmt prev (Domain.join prev curr) in - p.states <- [next]; - w.previous_state <- `Value next; - w.widened_state <- `Value next; - w.widening_counter <- widening_period - 1 - end - end; - p.states = [] - - let enter_loop (_p : propagation) (_ : loop) = () - let leave_loop (_p : propagation) (_ : loop) = () - let next_loop_iteration (_p : propagation) (_ : loop) = () -end diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml new file mode 100644 index 00000000000..44642d2a166 --- /dev/null +++ b/src/plugins/value/engine/partition.ml @@ -0,0 +1,325 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + +(* Utility function on options *) +let opt_flatten (type a) (o : a option option) : a option = + Extlib.opt_conv None o + +module LvalMap = Cil_datatype.LvalStructEq.Map +module IList = Datatype.List (Datatype.Int) + +type branch = int + +type key = { + ration_stamp : int option; + transfer_stamp : int option; + branches : branch list; + loops : int list; + static_split : Integer.t LvalMap.t; + dynamic_split : Integer.t LvalMap.t; +} + +module Key = +struct + type t = key + + let compare k1 k2 = + let (<?>) c (cmp,x,y) = + if c = 0 then cmp x y else c + in + Extlib.opt_compare (-) k1.ration_stamp k2.ration_stamp + <?> (Extlib.opt_compare (-), k1.transfer_stamp, k2.transfer_stamp) + <?> (IList.compare, k1.loops, k2.loops) + <?> (LvalMap.compare Integer.compare, k1.static_split, k2.static_split) + <?> (LvalMap.compare Integer.compare, k1.dynamic_split, k2.dynamic_split) + <?> (IList.compare, k1.branches, k2.branches) +end + +module KMap = Map.Make (Key) + + +type 'a partition = 'a KMap.t + +type action = + | Enter_loop + | Leave_loop + | Incr_loop of int + | Branch of branch * int + | Ration of int + | Ration_merge of int option + | Transfer_merge + | Static_split of Cil_types.lval + | Dynamic_split of Cil_types.lval + | Static_merge of Cil_types.lval + | Dynamic_merge of Cil_types.lval + | Update_dynamic_splits + +exception InvalidAction + + +module type InputDomain = +sig + type t + + exception Cant_split + + val join : t -> t -> t + val split : t -> Cil_types.lval -> (Integer.t * t) list +end + + +module Make (Domain : InputDomain) = +struct + type t = Domain.t partition + type state = Domain.t + + let empty : 'a partition = + KMap.empty + + let empty_key : key = { + ration_stamp = None; + transfer_stamp = None; + branches = []; + loops = []; + static_split = LvalMap.empty; + dynamic_split = LvalMap.empty; + } + + let is_empty (p : 'a partition) : bool = + KMap.is_empty p + + let initial (l : 'a list) : 'a partition = + let stamp = ref 0 in + let add p state = + let k = { empty_key with ration_stamp = Some !stamp } in + incr stamp; + KMap.add k state p + in + List.fold_left add KMap.empty l + + let add (p : t) (k : key) (x : state) : t = + (* Join states with the same key *) + let x = + try + Domain.join (KMap.find k p) x + with Not_found -> x + in + KMap.add k x p + + let add_list (p : t) (l : (key * state) list) : t = + List.fold_left (fun p (k,x) -> add p k x) p l + + let split_state ~(static : bool) (lval : Cil_types.lval) + (key : key) (state : state) : (key * state) list = + try + let update_key (v,x) = + let k = + if static then + { key with static_split = LvalMap.add lval v key.static_split } + else + { key with dynamic_split = LvalMap.add lval v key.dynamic_split } + in + (k,x) + in + List.map update_key (Domain.split state lval) + with Domain.Cant_split -> + [(key,state)] + + let split ~(static : bool) (p : t) (lval : Cil_types.lval) = + let add_split key state p = + add_list p (split_state ~static lval key state) + in + KMap.fold add_split p KMap.empty + + let update_dynamic_splits p = + (* Update one state *) + let update_state key state p = + (* Split the states in the list l for the given lval *) + let update_lval lval _ l = + let static = false in + List.fold_left (fun l (k,s) -> split_state ~static lval k s @ l) [] l + in + (* Foreach lval in original state: split *) + let l = LvalMap.fold update_lval key.dynamic_split [(key,state)] in + add_list p l + in + KMap.fold update_state p KMap.empty + + let map_keys (f : key -> key) (p : t) = + KMap.fold (fun k x acc -> add acc (f k) x) p empty + + let transfer_keys p = function + | Static_split lval -> + split ~static:true p lval + + | Dynamic_split lval -> + split ~static:false p lval + + | Update_dynamic_splits -> + update_dynamic_splits p + + | action -> (* Simple map transfer functions *) + let transfer = match action with + | Static_split _ | Dynamic_split _ | Update_dynamic_splits -> + assert false (* Handled above *) + + | Enter_loop -> fun k -> + { k with loops = 0 :: k.loops } + + | Leave_loop -> fun k -> + begin match k.loops with + | [] -> raise InvalidAction + | _ :: tl -> { k with loops = tl } + end + + | Incr_loop limit -> fun k -> + begin match k.loops with + | [] -> raise InvalidAction + | h :: tl -> + if h >= limit then + k + else + { k with loops = h + 1 :: tl } + end + + | Branch (b,max) -> fun k -> + let list_start l i = + let rec aux acc i = function + | [] -> acc + | _ when i <= 0 -> List.rev acc + | x :: l -> aux (x :: acc) (i - 1) l + in + aux [] i l + in + if max > 0 then + { k with branches = b :: list_start k.branches (max - 1) } + else if k.branches <> [] then + { k with branches = [] } + else + k + + | Ration (min) -> + let r = ref min in + fun k -> + let ration_stamp = Some !r in + incr r; + { k with ration_stamp } + + | Ration_merge ration_stamp -> fun k -> + { k with ration_stamp } + + | Transfer_merge -> fun k -> + { k with transfer_stamp = None } + + | Static_merge lval -> fun k -> + { k with static_split = LvalMap.remove lval k.static_split } + + | Dynamic_merge lval -> fun k -> + { k with dynamic_split = LvalMap.remove lval k.dynamic_split } + in + map_keys transfer p + + let map_states (f : 'a -> 'a) (p : 'a partition) : 'a partition = + KMap.map f p + + let transfer_states (f : 'a -> 'a list) (p : 'a partition) : 'a partition = + let transfer_one k x p = + let t = ref 0 in + let add p y = + let k' = { k with transfer_stamp = Some !t } in + incr t; + KMap.add k' y p + in + match f x with + | [y] -> KMap.add k y p + | l -> List.fold_left add p l + in + KMap.fold transfer_one p KMap.empty + + (* + let legacy_transfer_states (f : 'a list -> 'a list) (p : 'a partition) + : 'a partition = + (* Group the states in buckets, where each bucket is a list of states + with the same key except for the ration stamp *) + let fill_buckets k x buckets = + (* Ignore the ration stamp *) + let k = { k with ration_stamp = None } in + (* Find the bucket *) + let contents = + try KMap.find k buckets + with Not_found -> [] + in + (* Add the state to the bucket *) + KMap.add k (x :: contents) buckets + in + let buckets = KMap.fold fill_buckets p KMap.empty in + (* Apply the transfer function to each bucket *) + let result = KMap.map f buckets in + (* Rebuild a partition by rationing out all the states *) + let r = ref 0 in + let ration_bucket k bucket acc = + let ration_one acc x = + let k' = { k with ration_stamp = Some !r } in + incr r; + KMap.add k' x acc + in + List.fold_left ration_one acc bucket + in + KMap.fold ration_bucket result KMap.empty *) + + let find = KMap.find + let replace = KMap.add + + let to_list (p : 'a partition) : 'a list = + KMap.fold (fun _k x l -> x :: l) p [] + + let size (p : 'a partition) : int = + KMap.fold (fun _k _x n -> n + 1) p 0 + + + let merge (f : 'a option -> 'b option -> 'c option) (p1 : 'a partition) + (p2 : 'b partition) : 'c partition = + KMap.merge (fun _k o1 o2 -> f o1 o2) p1 p2 + + (* Almost like Map.union of Ocaml 4.03.0 *) + let union (f : 'a -> 'a -> 'a) (p1 : 'a partition) + (p2 : 'a partition) : 'a partition = + let g _k o1 o2 = + match o1 with + | None -> o2 + | Some x1 -> + match o2 with + | None -> o1 + | Some x2 -> Some (f x1 x2) + in + KMap.merge g p1 p2 + + let iter (f : 'a -> unit) (p : 'a partition) : unit = + KMap.iter (fun _k x -> f x) p + + let filter_keys (f : key -> bool) (p : 'a partition) : 'a partition = + KMap.filter (fun k _x -> f k) p + + let map_filter (f : key -> 'a -> 'b option) (p : 'a partition) + : 'b partition = + KMap.merge (fun k o _ -> opt_flatten (Extlib.opt_map (f k) o)) p KMap.empty +end diff --git a/src/plugins/value/engine/partition.mli b/src/plugins/value/engine/partition.mli new file mode 100644 index 00000000000..161b95ca6ba --- /dev/null +++ b/src/plugins/value/engine/partition.mli @@ -0,0 +1,119 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + +(* A state partition is a collection of states, each of which is identified + by a unique key. The key identifies the reason for which we want to keep + the state separate from the others. The partitioning method will involve + updating the key. If at some point two states share the same key, it means + that the partitioning method decided to not consider those states separately + anymore and that they should be joined together. + + The key have several fields, one for each kind of partitioning. + + - Ration stamps: These modelize the legacy slevel. Each state is given + a ration stamp (represented by an integer) until there is no slevel left. + It is an option type, when there is no more ration stamp, this field is + set to None; each new state will not be distinguished by this field. + - Branches: This field enumerate the last branches taken to reach this + state. The partitioning may chose how the branches are identified, but it + is a First-In-First-Out set. + - Loops: This field stores the loop iterations needed to reach this state + for each loop we are currently in. It is stored in reverse order + (innermost loop first) + - Static/Dynamic splits: + + Note on implementation. These partitions are implemented as map from keys + to states. We chose to have the same partition for stores, propagation and + widenings so the combination of propagation + store or propagation + + widening can be done as a map2 operation. However, this involve some tricks + to make keys be always distinguished in propagation, like giving them new + ration stamps. It may have been more natural to consider that propagations + are lists, allowing states to have the same key. +*) + +type branch = int + +module LvalMap = Cil_datatype.LvalStructEq.Map + +type key = private { + ration_stamp : int option; + transfer_stamp : int option; + branches : branch list; + loops : int list; + static_split : Integer.t LvalMap.t; + dynamic_split : Integer.t LvalMap.t; +} + +type 'a partition + +type action = + | Enter_loop + | Leave_loop + | Incr_loop of int (* the parameter is the unroll limit *) + | Branch of branch * int (* branch taken, max branches in history *) + | Ration of int (* starting ration stamp *) + | Ration_merge of int option (* new ration stamp for the merge state *) + | Transfer_merge + | Static_split of Cil_types.lval + | Dynamic_split of Cil_types.lval + | Static_merge of Cil_types.lval + | Dynamic_merge of Cil_types.lval + | Update_dynamic_splits + +exception InvalidAction + + +module type InputDomain = +sig + type t + + exception Cant_split + + val join : t -> t -> t + val split : t -> Cil_types.lval -> (Integer.t * t) list +end + + +module Make (Domain : InputDomain) : +sig + type t = Domain.t partition + type state = Domain.t + + val empty : 'a partition + val is_empty : 'a partition -> bool + val initial : 'a list -> 'a partition + val size : 'a partition -> int + val to_list : 'a partition -> 'a list + + val find : key -> 'a partition -> 'a + val replace : key -> 'a -> 'a partition -> 'a partition + val merge : ('a option -> 'b option -> 'c option) -> 'a partition + -> 'b partition -> 'c partition + val union : ('a -> 'a -> 'a) -> 'a partition -> 'a partition -> 'a partition + + val iter : ('a -> unit) -> 'a partition -> unit + val transfer_keys : t -> action -> t + val filter_keys : (key -> bool) -> 'a partition -> 'a partition + val map_states : ('a -> 'a) -> 'a partition -> 'a partition + val transfer_states : ('a -> 'a list) -> 'a partition -> 'a partition + val map_filter : (key -> 'a -> 'b option) -> 'a partition -> 'b partition +end diff --git a/src/plugins/value/engine/partitioned_dataflow.ml b/src/plugins/value/engine/partitioned_dataflow.ml index 8621a85292a..e3d842a247f 100644 --- a/src/plugins/value/engine/partitioned_dataflow.ml +++ b/src/plugins/value/engine/partitioned_dataflow.ml @@ -39,9 +39,6 @@ let check_signals, signal_abort = let dkey = Value_parameters.dkey_iterator let dkey_callbacks = Value_parameters.dkey_callbacks -let is_return s = match s.skind with Return _ -> true | _ -> false -let is_loop s = match s.skind with Loop _ -> true | _ -> false - let blocks_share_locals b1 b2 = match b1.blocals, b2.blocals with | [], [] -> true @@ -88,108 +85,27 @@ module Make_Dataflow let interpreter_mode = Value_parameters.InterpreterMode.get () - let slevel (stmt : stmt) : int = - if is_return stmt || interpreter_mode then - max_int - else match Per_stmt_slevel.local kf with - | Per_stmt_slevel.Global i -> i - | Per_stmt_slevel.PerStmt f -> f stmt - - let merge_after_loop : bool = - Kernel_function.Set.mem kf - (Value_parameters.SlevelMergeAfterLoop.get ()) - - let merge (stmt : stmt) : bool = - is_loop stmt && merge_after_loop - || - match Per_stmt_slevel.merge kf with - | Per_stmt_slevel.NoMerge -> false - | Per_stmt_slevel.Merge f -> f stmt - - let default_loop_unroll : int = Value_parameters.MinLoopUnroll.get () - - let unroll (stmt : stmt) : int = - let local_unroll = match Unroll_annots.get_unroll_terms stmt with - | [] -> - let is_attribute a = Cil.hasAttribute a stmt.sattr in - begin - match List.filter is_attribute ["for" ; "while" ; "dowhile"] with - | [] -> () - | loop_kind :: _ -> - let wkey = - if loop_kind = "for" - then Value_parameters.wkey_missing_loop_unroll_for - else Value_parameters.wkey_missing_loop_unroll - in - Value_parameters.warning - ~wkey ~source:(fst (Cil_datatype.Stmt.loc stmt)) ~once:true - "%s loop without unroll annotation" loop_kind - end; - None - | [t] -> - (* Inlines the value of const variables in [t]. *) - let global_init vi = - try (Globals.Vars.find vi).init with Not_found -> None - in - let t = - Cil.visitCilTerm (new Logic_utils.simplify_const_lval global_init) t - in - begin match Logic_utils.constFoldTermToInt t with - | Some n -> Some (Integer.to_int n) - | None -> - Kernel.warning ~once:true ~current:true - "invalid term, not integer: %a" - Printer.pp_term t; - None - end - | _ -> - Kernel.warning ~once:true ~current:true - "ignoring invalid unroll annotation"; - None - in match local_unroll with - | Some n -> n - | None -> default_loop_unroll - let slevel_display_step : int = Value_parameters.ShowSlevel.get () + (* Ideally, the slevel parameter should not be used anymore in this file + but it is still required for logic interpretation *) + let slevel = + let module P = Partitioning_parameters.Make (AnalysisParam) in + P.slevel - (* --- Abstract values storage --- *) - - module Domain = struct - include Domain - let join_list ?(into : t or_bottom = `Bottom) (l : t list) : t or_bottom = - List.fold_left - (fun acc v -> Bottom.join join acc (`Value v)) - into l - end - - module PartitioningParam = struct - type loop = stmt - let kf = kf - let widening_delay = Value_parameters.WideningDelay.get () - let widening_period = Value_parameters.WideningPeriod.get () - let slevel = slevel - let merge = merge - let unroll = unroll - end - - module type P = - State_partitioning.Partition with type state = Domain.t - and type loop = PartitioningParam.loop - - let partition_module = - if descending_iteration = NoIteration - then (module Loop_partitioning.Make (Domain) (PartitioningParam) : P) - else (module Basic_partitioning.Make (Domain) (PartitioningParam) : P) + (* --- Abstract values storage --- *) - module Partition = (val partition_module: P) + module Partition = Trace_partitioning.Make (Domain) (AnalysisParam) type store = Partition.store type widening = Partition.widening type propagation = Partition.propagation - type shadow = Partition.shadow + + type edge_info = { + mutable fireable : bool (* Does any states survive the transition ? *) + } (* --- Interpreted automata --- *) @@ -226,8 +142,8 @@ module Make_Dataflow | `Value state -> state let initial_propagation = - Partition.initial_propagation (States.to_list initial_states), - Partition.empty_shadow () + -1, (* dummy edge identifier *) + Partition.initial_propagation (States.to_list initial_states) let post_conditions = ref false @@ -259,7 +175,7 @@ module Make_Dataflow VertexTable.create control_point_count let w_table : widening VertexTable.t = VertexTable.create 7 - let e_table : (propagation * shadow) EdgeTable.t = + let e_table : (propagation * edge_info) EdgeTable.t = EdgeTable.create transition_count (* Default (Initial) stores on vertex and edges *) @@ -267,18 +183,21 @@ module Make_Dataflow Partition.empty_store ~stmt:v.vertex_start_of let default_vertex_widening (v : vertex) () : widening = Partition.empty_widening ~stmt:v.vertex_start_of - let default_edge_store () : propagation * shadow = - Partition.empty_propagation (), Partition.empty_shadow () + let default_edge_propagation () : propagation * edge_info = + Partition.empty_propagation (), { fireable = false } (* Get the stores associated to a control point or edge *) let get_vertex_store (v : vertex) : store = VertexTable.find_or_add v_table v ~default:(default_vertex_store v) let get_vertex_widening (v : vertex) : widening = VertexTable.find_or_add w_table v ~default:(default_vertex_widening v) - let get_edge_propagation (e : vertex edge) : propagation * shadow = - EdgeTable.find_or_add e_table e ~default:default_edge_store - let get_pred_propagations (v : vertex) : (propagation * shadow) list = - List.map (fun (_,e,_) -> get_edge_propagation e) (G.pred_e graph v) + let get_edge_propagation (e : vertex edge) : propagation * edge_info = + EdgeTable.find_or_add e_table e ~default:default_edge_propagation + let get_pred_propagations (v : vertex) : ('branch * propagation) list = + let get (_,e,_) = + e.edge_key, fst (get_edge_propagation e) + in + List.map get (G.pred_e graph v) let get_succ_propagations (v : vertex) : propagation list = List.map (fun (_,e,_) -> fst (get_edge_propagation e)) (G.succ_e graph v) @@ -305,6 +224,12 @@ module Make_Dataflow type state = Domain.t + (** Join every state in the list *) + let smash (l : state list) : state or_bottom = + match l with + | [] -> `Bottom + | v1 :: l -> `Value (List.fold_left Domain.join v1 l) + (* Thse lifting function helps to uniformize the transfer functions to a common signature *) @@ -382,10 +307,6 @@ module Make_Dataflow let transfer_return (stmt : stmt) (return_exp : exp option) (states : state list) : state list = - (** Join every state in the list and put the result in a singleton. *) - let smash (l : state list) : state list = - Bottom.to_list (Domain.join_list l) - in (* Deconstruct return statement *) let return_var = match return_exp with | Some {enode = Lval (Var v, NoOffset)} -> Some v @@ -411,12 +332,12 @@ module Make_Dataflow begin match return_exp with | Some return_exp -> let split_states = Transfer.split_final_states kf return_exp i states in - let states' = List.map Domain.join_list split_states in + let states' = List.map smash split_states in Bottom.all states' | None -> - smash states + Bottom.to_list (smash states) end - | Split_strategy.NoSplit -> smash states + | Split_strategy.NoSplit -> Bottom.to_list (smash states) | Split_strategy.FullSplit -> states (* Last case not possible : already transformed into SplitEqList *) | Split_strategy.SplitAuto -> assert false @@ -529,13 +450,15 @@ module Make_Dataflow let process_edge (v1,e,v2 : G.edge) : unit = let {edge_transition=transition; edge_kinstr=kinstr} = e in - let propagation,_shadow = get_edge_propagation e in + let propagation,edge_info = get_edge_propagation e in !Db.progress (); check_signals (); current_ki := kinstr; Cil.CurrentLoc.set e.edge_loc; Partition.transfer (transfer_transition transition) propagation; - process_loop_transitions v1 v2 propagation + process_loop_transitions v1 v2 propagation; + if not (Partition.is_empty_propagation propagation) then + edge_info.fireable <- true let update_vertex ?(widening : bool = false) (v : vertex) : bool = (* Set location if possible *) @@ -586,7 +509,7 @@ module Make_Dataflow false in (* Reset sources *) - List.iter (fun (p,_) -> Partition.clear_propagation p) sources; + List.iter (fun (_,p) -> Partition.clear_propagation p) sources; (* Dispatch to successors *) List.iter (fun p2 -> Partition.merge p ~into:p2) (get_succ_propagations v); (* Return wether the iterator should stop or not *) @@ -619,21 +542,6 @@ module Make_Dataflow | _ -> (* Several successors - failure *) Value_parameters.abort "Do not know which branch to take. Stopping." - let reset_component (vertex_list : vertex list) : unit = - let reset_edge (_,e,_) = - let p,s = get_edge_propagation e in - Partition.reset_propagation p; - Partition.reset_shadow s; - in - let reset_vertex v = - let s = get_vertex_store v - and w = get_vertex_widening v in - Partition.reset_store s; - Partition.reset_widening w; - List.iter reset_edge (G.succ_e graph v) - in - List.iter reset_vertex vertex_list - let rec iterate_list (l : wto) = List.iter iterate_element l and iterate_element = function @@ -644,7 +552,7 @@ module Make_Dataflow Otherwise, only resets the widening counter for this component. This is especially useful for nested loops. *) if hierachical_convergence - then reset_component (v :: Wto.flatten w) + then () (* reset_component (v :: Wto.flatten w) *) else Partition.reset_widening_counter (get_vertex_widening v); (* Iterate until convergence *) let iteration_count = ref 0 in @@ -715,12 +623,12 @@ module Make_Dataflow | Then -> Db.Value.mask_then | Else -> Db.Value.mask_else in - let shadow = snd (get_edge_propagation e) in + let edge_info = snd (get_edge_propagation e) in let old_status = try StmtTable.find table stmt with Not_found -> 0 and status = - if Partition.is_empty_shadow shadow then 0 else mask + if edge_info.fireable then mask else 0 in let new_status = old_status lor status in StmtTable.replace table stmt new_status; diff --git a/src/plugins/value/engine/partitioning.ml b/src/plugins/value/engine/partitioning.ml index 3b6f292b4f6..c40be57a5bc 100644 --- a/src/plugins/value/engine/partitioning.ml +++ b/src/plugins/value/engine/partitioning.ml @@ -33,6 +33,7 @@ module type S = sig type t val empty: unit -> t + val add : state -> t -> bool val merge_set_return_new: state list -> t -> state list val join: t -> state or_bottom val to_list: t -> state list diff --git a/src/plugins/value/engine/partitioning.mli b/src/plugins/value/engine/partitioning.mli index 40bb50a1f25..4ecc2ee21ff 100644 --- a/src/plugins/value/engine/partitioning.mli +++ b/src/plugins/value/engine/partitioning.mli @@ -34,6 +34,7 @@ module type S = sig val empty: unit -> t + val add : state -> t -> bool val merge_set_return_new: state list -> t -> state list val join: t -> state or_bottom diff --git a/src/plugins/value/engine/partitioning_parameters.ml b/src/plugins/value/engine/partitioning_parameters.ml new file mode 100644 index 00000000000..d625a9ef865 --- /dev/null +++ b/src/plugins/value/engine/partitioning_parameters.ml @@ -0,0 +1,129 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + +open State_partitioning +open Value_parameters +open Partitioning_annots +open Cil_types + +let is_return s = match s.skind with Return _ -> true | _ -> false +let is_loop s = match s.skind with Loop _ -> true | _ -> false + +let warn ?(current = true) = Kernel.warning ~once:true ~current + +module Make (Kf : Kf) : Parameters = +struct + let kf = Kf.kf + + let widening_delay = WideningDelay.get () + let widening_period = WideningPeriod.get () + + let interpreter_mode = InterpreterMode.get () + + let slevel stmt = + if is_return stmt || interpreter_mode then + max_int + else match Per_stmt_slevel.local kf with + | Per_stmt_slevel.Global i -> i + | Per_stmt_slevel.PerStmt f -> f stmt + + let merge_after_loop = SlevelMergeAfterLoop.mem kf + + let merge stmt = + is_loop stmt && merge_after_loop + || + match Per_stmt_slevel.merge kf with + | Per_stmt_slevel.NoMerge -> false + | Per_stmt_slevel.Merge f -> f stmt + + let default_loop_unroll = MinLoopUnroll.get () + + let unroll stmt = + let local_unroll = match get_unroll_annot stmt with + | [] -> + let is_attribute a = Cil.hasAttribute a stmt.sattr in + begin + match List.filter is_attribute ["for" ; "while" ; "dowhile"] with + | [] -> () + | loop_kind :: _ -> + let wkey = + if loop_kind = "for" + then Value_parameters.wkey_missing_loop_unroll_for + else Value_parameters.wkey_missing_loop_unroll + in + Value_parameters.warning + ~wkey ~source:(fst (Cil_datatype.Stmt.loc stmt)) ~once:true + "%s loop without unroll annotation" loop_kind + end; + None + | [t] -> + (* Inlines the value of const variables in [t]. *) + let global_init vi = + try (Globals.Vars.find vi).init with Not_found -> None + in + let t = + Cil.visitCilTerm (new Logic_utils.simplify_const_lval global_init) t + in + begin match Logic_utils.constFoldTermToInt t with + | Some n -> Some (Integer.to_int n) + | None -> + warn "invalid term, not integer: %a" Printer.pp_term t; + None + end + | _ -> + warn "ignoring invalid unroll annotation"; + None + in match local_unroll with + | Some n -> n + | None -> default_loop_unroll + + let history_size = HistoryPartitioning.get () + + let universal_splits = + let add name l = + try + let vi = Globals.Vars.find_from_astinfo name VGlobal in + Cil.var vi :: l + with Not_found -> + warn ~current:false "cannot find the global variable %s for value \ + partitioning" name; + l + in + ValuePartitioning.fold add [] + + let flow_actions stmt = + let term_to_lval = function + | {term_node = TLval tlv} -> + !Db.Properties.Interp.term_lval_to_lval ~result:None tlv + | _ -> + warn "split/merge expressions must be lvalues"; + raise Exit + in + let map_annot acc t = + try + match t with + | FlowSplit t -> Partition.Static_split (term_to_lval t) :: acc + | FlowMerge t -> Partition.Static_merge (term_to_lval t) :: acc + with Exit -> acc (* Impossible to convert term to lval *) + in + List.fold_left map_annot [] (get_flow_annot stmt) +end diff --git a/src/plugins/value/engine/legacy_partitioning.mli b/src/plugins/value/engine/partitioning_parameters.mli similarity index 95% rename from src/plugins/value/engine/legacy_partitioning.mli rename to src/plugins/value/engine/partitioning_parameters.mli index 9006e977b10..177cb8752a1 100644 --- a/src/plugins/value/engine/legacy_partitioning.mli +++ b/src/plugins/value/engine/partitioning_parameters.mli @@ -20,4 +20,5 @@ (* *) (**************************************************************************) -module Make : State_partitioning.Partitioning +module Make (Kf : State_partitioning.Kf) : State_partitioning.Parameters + diff --git a/src/plugins/value/engine/state_partitioning.mli b/src/plugins/value/engine/state_partitioning.mli index b9958356da1..7395634a2c1 100644 --- a/src/plugins/value/engine/state_partitioning.mli +++ b/src/plugins/value/engine/state_partitioning.mli @@ -22,34 +22,32 @@ open Bottom.Type -module type Param = +type branch = Partition.branch +type loop = Cil_types.stmt + +module type Kf = +sig + val kf : Cil_types.kernel_function +end + +module type Parameters = sig - type loop - val kf : Cil_types.kernel_function val widening_delay : int val widening_period : int val slevel : Cil_types.stmt -> int val merge : Cil_types.stmt -> bool val unroll : loop -> int -end - -module type Domain = -sig - include Partitioning.Domain - val join_list : ?into:t or_bottom -> t list -> t or_bottom + val history_size : int + val universal_splits : Cil_types.lval list + val flow_actions : Cil_types.stmt -> Partition.action list end module type Partition = sig - type loop (** Loops identifiers *) type state (** The states being partitioned *) type store (** The storage of a partition *) type propagation (** Only contains states which needs to be propagated, i.e. states which have not been propagated yet *) - type shadow (** The shadow of a propagation remembers all the previous - propagations ; shadows are useful before joins during - descending sequences or to find if a transition is - fireable *) type widening (** Widening informations *) @@ -57,7 +55,6 @@ sig val empty_store : stmt:Cil_types.stmt option -> store val empty_propagation : unit -> propagation - val empty_shadow : unit -> shadow val empty_widening : stmt:Cil_types.stmt option -> widening (** Build the initial propagation for the entry point of a function. *) @@ -76,7 +73,6 @@ sig val smashed : store -> state or_bottom val is_empty_store : store -> bool val is_empty_propagation : propagation -> bool - val is_empty_shadow : shadow -> bool val store_size : store -> int val propagation_size : propagation -> int @@ -88,7 +84,6 @@ sig val reset_store : store -> unit val reset_propagation : propagation -> unit - val reset_shadow : shadow -> unit val reset_widening : widening -> unit (** Resets (or just delays) the widening counter. Used on nested loops, to @@ -120,10 +115,8 @@ sig together inside the propagation is allowed. *) val merge : into:propagation -> propagation -> unit - (** Join all incoming propagations into the given store. Each propagation is - paired with a shadow of the previous propagations on the same edge. This - function returns a set of states which still need to be propagated past - the store. + (** Join all incoming propagations into the given store. This function returns + a set of states which still need to be propagated past the store. If a state from the propagations is included in another state which has already been propagated, it may be removed from the output propagation. @@ -134,7 +127,7 @@ sig This function also interprets partitioning annotations at the store vertex (slevel, splits, merges, ...) which will generally change the current partitioning. *) - val join : (propagation * shadow) list -> store -> propagation + val join : (branch * propagation) list -> store -> propagation (** Widen a propagation at the position of the given store. The widening object keeps track of the previous widenings to ensure termination. The @@ -148,7 +141,8 @@ sig end +module type Domain = Partitioning.Domain + module type Partitioning = - functor (Domain : Domain) (Param : Param) -> + functor (Domain : Domain) (Kf : Kf) -> Partition with type state = Domain.t - and type loop = Param.loop diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml new file mode 100644 index 00000000000..081851332d4 --- /dev/null +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -0,0 +1,386 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + +open Cil_types +open Bottom.Type +open State_partitioning +open Partition + + +module Make (Domain : Domain) (Kf : Kf) = +struct + module Parameters = Partitioning_parameters.Make (Kf) + + open Kf + open Parameters + + (* Add the split function to the domain *) + module Domain = + struct + include Domain + + module Val = struct + include Main_values.CVal + include Structure.Open (Structure.Key_Value) (Main_values.CVal) + let reduce t = t + end + + module Eva = + Evaluation.Make + (Val) + (Main_locations.PLoc) + (Cvalue_domain.State) + + exception Cant_split + + (* TODO: size of split limit *) + let split state lval = + (* Whenever the split fail, warn the user and exit with an exception *) + let fail message = + Value_parameters.warning ~once:true message; + raise Cant_split + in + (* Get the cvalue *) + let cvalue = match get Cvalue_domain.key with + | Some get_cvalue -> get_cvalue state + | None -> fail "cannot partition by value when the CValue domain is not\ + active" + in + (* Retrieve the location of the lval *) + let cstate = Cvalue_domain.inject cvalue in + let location = match Eva.lvaluate ~for_writing:true cstate lval with + | `Value (_valuation, loc, _typ), _alarmset -> + Precise_locs.imprecise_location loc + | `Bottom, _alarmset -> + fail "cannot partition by value on an imprecise lvalue" + in + (* Extract the ival *) + let ival = + try + let v = Cvalue.Model.find cvalue location in + Cvalue.V.project_ival v + with Cvalue.V.Not_based_on_null -> + fail "cannot partition by value on pointers" + in + (* Build a state with the lvalue set to a singleton *) + let build i acc = + let v = Cvalue.V.inject_int i in + let cvalue = Cvalue.Model.add_binding ~exact:true cvalue location v in + let new_state = set Cvalue_domain.key cvalue state in + (i,new_state) :: acc + in + (* For each integer of the ival, build a new state *) + try + Ival.fold_int build ival [] + with Abstract_interp.Error_Top -> + fail "too many values to partition by value on" + end + + module Index = Partitioning.Make (Domain) + module Partition = Partition.Make (Domain) + + type state = Domain.t + + type store = { + size_limit : int; + merge : bool; + flow_actions : action list; + store_stmt : stmt option; + store_index : Index.t; + mutable store_partition : state partition; + mutable store_size : int; + } + + type propagation = { + mutable partition : state partition; + } + + type widening_state = { + widened_state : state option; + previous_state : state; + widening_counter : int; + } + + type widening = { + widening_stmt : stmt; + mutable widening_partition : widening_state partition; + } + + (* Constructors *) + + let empty_store ~(stmt : stmt option) : store = + let size_limit, merge, flow_actions = match stmt with + | None -> max_int, false, [] + | Some stmt -> slevel stmt, merge stmt, flow_actions stmt + in + { + size_limit; merge; flow_actions; + store_stmt = stmt; + store_index = Index.empty (); + store_partition = Partition.empty; + store_size = 0; + } + + let empty_propagation () : propagation = + { partition = Partition.empty } + + let empty_widening ~(stmt : stmt option) : widening = + { + widening_stmt = Extlib.opt_conv Cil.invalidStmt stmt; + widening_partition = Partition.empty; + } + + let initial_propagation (states : state list) : propagation = + let partition = Partition.initial states in + (* Split the initial partition according to the global split seetings *) + let split partition lval = + Partition.transfer_keys partition (Dynamic_split lval) + in + let partition = List.fold_left split partition universal_splits in + { partition } + + + (* Pretty printing *) + + let pretty_store (fmt : Format.formatter) (s : store) : unit = + Partition.iter (Domain.pretty fmt) s.store_partition + + let pretty_propagation (fmt : Format.formatter) (p : propagation) = + Partition.iter (Domain.pretty fmt) p.partition + + + (* Accessors *) + + let expanded (s : store) : state list = + Partition.to_list s.store_partition + + let smashed (s : store) : state or_bottom = + match expanded s with + | [] -> `Bottom + | v1 :: l -> `Value (List.fold_left Domain.join v1 l) + + let is_empty_store (s : store) : bool = + Partition.is_empty s.store_partition + + let is_empty_propagation (p : propagation) : bool = + Partition.is_empty p.partition + + let store_size (s : store) : int = + s.store_size + + let propagation_size (p : propagation) : int = + Partition.size p.partition + + + (* Partition transfer functions *) + + let enter_loop (p : propagation) (_i : loop) = + p.partition <- Partition.transfer_keys p.partition Enter_loop + + let leave_loop (p : propagation) (_i : loop) = + p.partition <- Partition.transfer_keys p.partition Leave_loop + + let next_loop_iteration (p : propagation) (i : loop) = + let limit = unroll i in + p.partition <- Partition.transfer_keys p.partition (Incr_loop limit) + + + (* Reset state (for hierchical convergence) *) + + let reset_store (s : store) : unit = + let is_eternal key = + key.ration_stamp <> None + in + s.store_partition <- Partition.filter_keys is_eternal s.store_partition + + let reset_propagation (p : propagation) : unit = + p.partition <- Partition.empty + + let reset_widening (w : widening) : unit = + w.widening_partition <- Partition.empty + + let reset_widening_counter (w : widening) : unit = + let reset w = + { w with widening_counter = max w.widening_counter (widening_period - 1) } + in + w.widening_partition <- Partition.map_states reset w.widening_partition + + + (* Operators *) + + let clear_propagation (p : propagation) : unit = + p.partition <- Partition.empty + + let transfer (f : state list -> state list) (p : propagation) : unit = + p.partition <- Partition.transfer_states (fun s -> f [s]) p.partition + + let merge ~(into : propagation) (source : propagation) : unit = + (* TODO: state the precondition for this to be correct *) + let merge_two dest src = (* Erase the destination *) + if Extlib.has_some src + then src + else dest + in + into.partition <- Partition.merge merge_two into.partition source.partition + + let join (sources : (branch*propagation) list) (dest : store) + : propagation = + let is_loop_head = + match dest.store_stmt with + | Some {skind=Cil_types.Loop _} -> true + | _ -> false + in + let current_ration = ref dest.store_size in + (* Update states counters *) + let count acc (_b,p) = + acc + Partition.size p.partition + in + dest.store_size <- List.fold_left count dest.store_size sources; + (* Get every source propagation *) + let source_partitions = + match sources with + | [(_,p)] -> [p.partition] + | sources -> + (* Several branches ; partition according to the incoming branch *) + let get (b,p) = + Partition.transfer_keys p.partition (Branch (b,history_size)) + in + List.map get sources + in + (* Handle ration stamps *) + let slevel_exceeded = dest.store_size > dest.size_limit in + let rationing = + if slevel_exceeded then + (* No more slevel, no more ration tickets *) + fun p -> Partition.transfer_keys p (Ration_merge None) + else if dest.merge then + (* Merge / Merge after loop : a unique ration stamp for all *) + fun p -> Partition.transfer_keys p (Ration_merge (Some !current_ration)) + else begin fun p -> + (* Attribute a ration stamp to each individual state *) + let p = Partition.transfer_keys p (Ration !current_ration) in + current_ration := !current_ration + Partition.size p; + p + end + in + let source_partitions = List.map rationing source_partitions in + (* Handle Split / Merge operations *) + let do_flow_actions partition = + let actions = + dest.flow_actions @ [Update_dynamic_splits ; Transfer_merge] + in + List.fold_left Partition.transfer_keys partition actions + in + let source_partitions = List.map do_flow_actions source_partitions in + (* Merge incomming propagations *) + let union = Partition.union Domain.join in + let partition = List.fold_left union Partition.empty source_partitions in + (* Add states to the store but filter out already propagated states *) + let update key current_state = + (* Inclusion test *) + let state = + try + let previous_state = Partition.find key dest.store_partition in + if Domain.is_included current_state previous_state then + (* The current state is included in the previous; stop *) + None + else begin + (* Propagate the join of the two states *) + if is_loop_head then + Value_parameters.feedback ~level:1 ~once:true ~current:true + "starting to merge loop iterations"; + Some (Domain.join previous_state current_state) + end + with + (* There is no previous state, propagate normally *) + Not_found -> Some current_state + in + (* Add the propagated state to the store *) + let add s = + dest.store_partition <- Partition.replace key s dest.store_partition; + in + Extlib.may add state; + (* Filter out already propagated states *) + Extlib.opt_filter (fun s -> Index.add s dest.store_index) state + in + let partition = Partition.map_filter update partition in + { partition } + + + let widen (_s : store) (w : widening) (p : propagation) : bool = + let stmt = w.widening_stmt in + (* Auxiliary function to update the result *) + let update key widening_state = + w.widening_partition <- + Partition.replace key widening_state w.widening_partition + in + (* Apply widening to each leaf *) + let widen_one key curr = + try + (* Search for an already existing widening state *) + let wstate = Partition.find key w.widening_partition in + (* Update the widening state *) + update key { + wstate with + previous_state = curr; + widening_counter = wstate.widening_counter - 1 + }; + (* Propagated state decreases, stop to propagate *) + if Domain.is_included curr wstate.previous_state then + None + (* Widening is delayed *) + else if wstate.widening_counter > 0 then begin + Some curr + (* Apply widening *) + end else begin + Value_parameters.feedback ~level:1 ~once:true ~current:true + ~dkey:Value_parameters.dkey_widening + "applying a widening at this point"; + (* We join the previous widening state with the previous iteration + state so as to allow the intermediate(s) iteration(s) (between + two widenings) to stabilize at least a part of the state. *) + let prev = match wstate.widened_state with + | Some v -> Domain.join wstate.previous_state v + | None -> wstate.previous_state + in + let next = Domain.widen kf stmt prev (Domain.join prev curr) in + update key { + previous_state = next; + widened_state = Some next; + widening_counter = widening_period - 1; + }; + Some next + end + with Not_found -> + (* The key is not in the widening state; add it if slevel is not + exceeded *) + if key.ration_stamp = None then + update key { + widened_state = None; + previous_state = curr; + widening_counter = widening_delay - 1; + }; + Some curr + in + p.partition <- Partition.map_filter widen_one p.partition; + Partition.is_empty p.partition +end diff --git a/src/plugins/value/engine/basic_partitioning.mli b/src/plugins/value/engine/trace_partitioning.mli similarity index 99% rename from src/plugins/value/engine/basic_partitioning.mli rename to src/plugins/value/engine/trace_partitioning.mli index 9006e977b10..07d509e4b5c 100644 --- a/src/plugins/value/engine/basic_partitioning.mli +++ b/src/plugins/value/engine/trace_partitioning.mli @@ -21,3 +21,4 @@ (**************************************************************************) module Make : State_partitioning.Partitioning + diff --git a/src/plugins/value/slevel/per_stmt_slevel.ml b/src/plugins/value/slevel/per_stmt_slevel.ml index 4c9b5b4fe09..ca504df3bae 100644 --- a/src/plugins/value/slevel/per_stmt_slevel.ml +++ b/src/plugins/value/slevel/per_stmt_slevel.ml @@ -21,6 +21,7 @@ (**************************************************************************) open Cil_types +open Partitioning_annots module G = struct type t = kernel_function @@ -39,54 +40,6 @@ end module Dfs = Graph.Traverse.Dfs(G) -(* We use the following encoding to store the directives in the AST: *) -type local_slevel = - | LMerge (* encoded as '"merge"' *) - | LDefault (* encoded as '"default"' *) - | LLocal of int (* encoded as 'Const i' *) - -let retrieve_annot lt = - match lt with - | [{term_node = TConst (Integer (i, _))}] -> - LLocal (Integer.to_int i) - | [{term_node = TConst (LStr "default")}] -> LDefault - | [{term_node = TConst (LStr "merge")}] -> LMerge - | _ -> LDefault (* be kind. Someone is bound to write a visitor that will - simplify our term into something unrecognizable... *) - -let () = Logic_typing.register_code_annot_next_stmt_extension "slevel" false - (fun ~typing_context:_ ~loc args -> - let abort () = - Value_parameters.abort ~source:(fst loc) "Invalid slevel directive" - in - let open Logic_ptree in - let p = match args with - | [{lexpr_node = PLvar ("default" | "merge" as s)}] -> - Logic_const.tstring s - | [{lexpr_node = PLconstant (IntConstant i)}] -> - begin - try - let i = int_of_string i in - if i < 0 then abort (); - Logic_const.tinteger i - with Failure _ -> abort () - end - | _ -> abort () - in - Ext_terms [p] - ) - -let () = Cil_printer.register_code_annot_extension "slevel" - (fun _pp fmt lp -> - match lp with - | Ext_id _ | Ext_preds _ -> assert false - | Ext_terms lt -> - match retrieve_annot lt with - | LDefault -> Format.pp_print_string fmt "default" - | LMerge -> Format.pp_print_string fmt "merge" - | LLocal i -> Format.pp_print_int fmt i - ) - type slevel = | Global of int | PerStmt of (stmt -> int) @@ -111,19 +64,9 @@ module DatatypeMerge = Datatype.Make(struct let mem_project = Datatype.never_any_project end) -let extract_slevel_directive s = - let rec find_one l = - match l with - | [] -> None - | {annot_content = AExtended(_,_,(_,"slevel", _, _,Ext_terms lp))} :: _ -> - Some (retrieve_annot lp) - | _ :: q -> find_one q - in - find_one (Annotations.code_annot s) - let kf_contains_slevel_directive kf = List.exists - (fun stmt -> extract_slevel_directive stmt <> None) + (fun stmt -> get_slevel_annot stmt <> None) (Kernel_function.get_definition kf).sallstmts let compute kf = @@ -139,15 +82,15 @@ let compute kf = (* Before visiting the successors of the statement: push or pop according to directive *) let pre s = - match extract_slevel_directive s with - | None | Some LMerge as d -> + match get_slevel_annot s with + | None | Some SlevelMerge as d -> Cil_datatype.Stmt.Hashtbl.add h_local s (Stack.top local_slevel); if d <> None then Cil_datatype.Stmt.Hashtbl.add h_merge s (); - | Some (LLocal i) -> + | Some (SlevelLocal i) -> if debug then Format.printf "Vising split %d, pushing %d@." s.sid i; Cil_datatype.Stmt.Hashtbl.add h_local s i; Stack.push i local_slevel; - | Some LDefault -> + | Some SlevelDefault -> let top = Stack.pop local_slevel in if debug then Format.printf "Visiting merge %d, poping (prev %d)@." s.sid top; @@ -157,12 +100,12 @@ let compute kf = (* after the visit of a statement and its successors. Do the converse operation of pre *) and post s = - match extract_slevel_directive s with - | None | Some LMerge -> () - | Some (LLocal _) -> + match get_slevel_annot s with + | None | Some SlevelMerge -> () + | Some (SlevelLocal _) -> if debug then Format.printf "Leaving split %d, poping@." s.sid; ignore (Stack.pop local_slevel); - | Some LDefault -> + | Some SlevelDefault -> (* slevel on nodes above s *) let above = Cil_datatype.Stmt.Hashtbl.find h_local s in (* slevel on s and on the nodes below *) diff --git a/src/plugins/value/utils/partitioning_annots.ml b/src/plugins/value/utils/partitioning_annots.ml new file mode 100644 index 00000000000..55908660a05 --- /dev/null +++ b/src/plugins/value/utils/partitioning_annots.ml @@ -0,0 +1,175 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + +open Cil_types +open Logic_ptree + +[@@@ warning "-42"] + +type slevel_annotation = + | SlevelMerge + | SlevelDefault + | SlevelLocal of int + +type unroll_annotation = term + +type flow_annotation = + | FlowSplit of term + | FlowMerge of term + + +exception Parse_error + +module type Annotation = +sig + type t + + val name : string + val is_loop_annot : bool + val parse : typing_context:Logic_typing.typing_context -> lexpr list -> t + val export : t -> acsl_extension_kind + val import : acsl_extension_kind -> t + val print : Format.formatter -> t -> unit +end + +module Register (M : Annotation) = +struct + include M + + let typing_ext ~typing_context ~loc args = + try export (parse ~typing_context args) + with Parse_error -> + typing_context.Logic_typing.error loc "Invalid %s directive" name + + let printer_ext _pp fmt lp = + print fmt (import lp) + + let () = + if is_loop_annot then begin + Logic_typing.register_code_annot_next_loop_extension name false typing_ext; + Cil_printer.register_loop_annot_extension name printer_ext + end else begin + Logic_typing.register_code_annot_next_stmt_extension name false typing_ext; + Cil_printer.register_code_annot_extension name printer_ext + end + + let get stmt = + let filter_add _emitter annot acc = + match annot.annot_content with + | Cil_types.AExtended (_, is_loop_annot', (_,name',_,_,data)) + when name' = name && is_loop_annot' = is_loop_annot -> + import data :: acc + | _ -> acc + in + List.rev (Annotations.fold_code_annot filter_add stmt []) +end + + +module Slevel = Register (struct + type t = slevel_annotation + + let name = "slevel" + let is_loop_annot = false + + let parse ~typing_context:_ = function + | [{lexpr_node = PLvar "default"}] -> SlevelDefault + | [{lexpr_node = PLvar "merge"}] -> SlevelMerge + | [{lexpr_node = PLconstant (IntConstant i)}] -> + let i = + try int_of_string i + with Failure _ -> raise Parse_error + in + if i < 0 then raise Parse_error; + SlevelLocal i + | _ -> raise Parse_error + + let export = function + | SlevelDefault -> Ext_terms [Logic_const.tstring "default"] + | SlevelMerge -> Ext_terms [Logic_const.tstring "merge"] + | SlevelLocal i -> Ext_terms [Logic_const.tinteger i] + + let import = function + | Ext_terms [{term_node}] -> + begin match term_node with + | TConst (LStr "default") -> SlevelDefault + | TConst (LStr "merge") -> SlevelMerge + | TConst (Integer (i, _)) -> SlevelLocal (Integer.to_int i) + | _ -> SlevelDefault (* be kind. Someone is bound to write a visitor that + will simplify our term into something + unrecognizable... *) + end + | _ -> assert false + + let print fmt = function + | SlevelDefault -> Format.pp_print_string fmt "default" + | SlevelMerge -> Format.pp_print_string fmt "merge" + | SlevelLocal i -> Format.pp_print_int fmt i + end) + +module SimpleTermAnnotation = +struct + type t = term + + let parse ~typing_context = function + | [t] -> + let open Logic_typing in + typing_context.type_term typing_context typing_context.pre_state t + | _ -> raise Parse_error + + let export t = + Ext_terms [t] + + let import = function + | Ext_terms [t] -> t + | _ -> assert false + + let print = Printer.pp_term +end + +module Unroll = Register (struct + include SimpleTermAnnotation + let name = "unroll" + let is_loop_annot = true + end) + +module Split = Register (struct + include SimpleTermAnnotation + let name = "split" + let is_loop_annot = false + end) + +module Merge = Register (struct + include SimpleTermAnnotation + let name = "merge" + let is_loop_annot = false + end) + + +let get_slevel_annot stmt = + try Some (List.hd (Slevel.get stmt)) + with Failure _ -> None + +let get_unroll_annot stmt = Unroll.get stmt + +let get_flow_annot stmt = + List.map (fun a -> FlowSplit a) (Split.get stmt) @ + List.map (fun a -> FlowMerge a) (Merge.get stmt) diff --git a/src/plugins/value/utils/unroll_annots.mli b/src/plugins/value/utils/partitioning_annots.mli similarity index 80% rename from src/plugins/value/utils/unroll_annots.mli rename to src/plugins/value/utils/partitioning_annots.mli index f47d4f9ea36..264cd94a5f0 100644 --- a/src/plugins/value/utils/unroll_annots.mli +++ b/src/plugins/value/utils/partitioning_annots.mli @@ -20,8 +20,17 @@ (* *) (**************************************************************************) -(** Syntax extension for unrolling annotations, used by Eva. *) +type slevel_annotation = + | SlevelMerge + | SlevelDefault + | SlevelLocal of int -open Cil_types +type unroll_annotation = Cil_types.term -val get_unroll_terms : stmt -> term list +type flow_annotation = + | FlowSplit of Cil_types.term + | FlowMerge of Cil_types.term + +val get_slevel_annot : Cil_types.stmt -> slevel_annotation option +val get_unroll_annot : Cil_types.stmt -> unroll_annotation list +val get_flow_annot : Cil_types.stmt -> flow_annotation list diff --git a/src/plugins/value/utils/unroll_annots.ml b/src/plugins/value/utils/unroll_annots.ml deleted file mode 100644 index 3c2ae1c955c..00000000000 --- a/src/plugins/value/utils/unroll_annots.ml +++ /dev/null @@ -1,54 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat à l'énergie atomique et aux énergies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -open Cil_types - -exception Parse_error of string option - -let parse_error ?msg () = raise (Parse_error msg) - -let () = Logic_typing.register_code_annot_next_loop_extension "unroll" false - begin fun ~typing_context ~loc:_ args -> - match args with - | [arg] -> - let open Logic_typing in - Ext_terms - [typing_context.type_term typing_context typing_context.pre_state arg] - | _ -> parse_error ~msg:"must be a single term" () - end - -let () = Cil_printer.register_behavior_extension "unroll" - begin fun _pp fmt lp -> - match lp with - | Ext_terms [t] -> Printer.pp_term fmt t - | Ext_id _ | Ext_preds _ | Ext_terms _ -> assert false - end - -let get_unroll_terms stmt = - Annotations.fold_code_annot - (fun _emitter annot acc -> - match annot with - | {annot_content = - AExtended (_, true, (_, "unroll", _,_,Ext_terms [term]))} -> - term :: acc - | _ -> acc - ) stmt [] diff --git a/src/plugins/value/value_parameters.ml b/src/plugins/value/value_parameters.ml index 7b0254eb485..051104b6512 100644 --- a/src/plugins/value/value_parameters.ml +++ b/src/plugins/value/value_parameters.ml @@ -589,6 +589,8 @@ let () = InitializationPaddingGlobals.add_aliases ["-val-initialization-padding- (* --- Tuning --- *) (* ------------------------------------------------------------------------- *) +(* --- Iteration strategy --- *) + let () = Parameter_customize.set_group precision_tuning let () = Parameter_customize.is_invisible () module DescendingIteration = @@ -645,22 +647,7 @@ module WideningPeriod = let () = WideningDelay.set_range ~min:1 ~max:max_int let () = add_precision_dep WideningPeriod.parameter -let () = Parameter_customize.set_group precision_tuning -module ILevel = - Int - (struct - let option_name = "-eva-ilevel" - let default = 8 - let arg_name = "n" - let help = - "Sets of integers are represented as sets up to <n> elements. \ - Above, intervals with congruence information are used \ - (defaults to 8, must be between 4 and 128)" - end) -let () = add_precision_dep ILevel.parameter -let () = ILevel.add_aliases ["-val-ilevel"] -let () = ILevel.add_update_hook (fun _ i -> Ival.set_small_cardinal i) -let () = ILevel.set_range 4 256 +(* --- Partitioning --- *) let () = Parameter_customize.set_group precision_tuning module SemanticUnrollingLevel = @@ -727,6 +714,31 @@ module MinLoopUnroll = let () = add_precision_dep MinLoopUnroll.parameter let () = MinLoopUnroll.set_range 0 max_int +let () = Parameter_customize.set_group precision_tuning +module HistoryPartitioning = + Int + (struct + let option_name = "-eva-partition-history" + let arg_name = "n" + let default = 0 + let help = + "keep states distincts as long as the <n> last branching in their\ + traces are also distinct. (A value of 0 deactivate this feature)" + end) +let () = add_precision_dep HistoryPartitioning.parameter +let () = HistoryPartitioning.set_range 0 max_int + +let () = Parameter_customize.set_group precision_tuning +module ValuePartitioning = + String_set + (struct + let option_name = "-eva-partition-value" + let help = "partition the space of reachable states according to the \ + possible values of the global(s) variable(s) V." + let arg_name = "V" + end) +let () = add_precision_dep ValuePartitioning.parameter + let () = Parameter_customize.set_group precision_tuning let () = Parameter_customize.argument_may_be_fundecl () module SplitReturnFunction = @@ -780,6 +792,25 @@ let () = let () = add_precision_dep SplitReturn.parameter let () = SplitReturn.add_aliases ["-val-split-return"] +(* --- Misc --- *) + +let () = Parameter_customize.set_group precision_tuning +module ILevel = + Int + (struct + let option_name = "-eva-ilevel" + let default = 8 + let arg_name = "n" + let help = + "Sets of integers are represented as sets up to <n> elements. \ + Above, intervals with congruence information are used \ + (defaults to 8, must be between 4 and 128)" + end) +let () = add_precision_dep ILevel.parameter +let () = ILevel.add_aliases ["-val-ilevel"] +let () = ILevel.add_update_hook (fun _ i -> Ival.set_small_cardinal i) +let () = ILevel.set_range 4 256 + let () = Parameter_customize.set_group precision_tuning let () = Parameter_customize.argument_may_be_fundecl () module BuiltinsOverrides = diff --git a/src/plugins/value/value_parameters.mli b/src/plugins/value/value_parameters.mli index c6a81aa6e93..c6891422da3 100644 --- a/src/plugins/value/value_parameters.mli +++ b/src/plugins/value/value_parameters.mli @@ -72,6 +72,11 @@ module WarnCopyIndeterminate: Parameter_sig.Kernel_function_set module IgnoreRecursiveCalls: Parameter_sig.Bool +module DescendingIteration: Parameter_sig.String +module HierarchicalConvergence: Parameter_sig.Bool +module WideningDelay: Parameter_sig.Int +module WideningPeriod: Parameter_sig.Int + module SemanticUnrollingLevel: Parameter_sig.Int module SlevelFunction: Parameter_sig.Map with type key = Cil_types.kernel_function @@ -80,11 +85,9 @@ module SlevelFunction: module SlevelMergeAfterLoop: Parameter_sig.Kernel_function_set module MinLoopUnroll : Parameter_sig.Int +module HistoryPartitioning : Parameter_sig.Int +module ValuePartitioning : Parameter_sig.String_set -module DescendingIteration: Parameter_sig.String -module HierarchicalConvergence: Parameter_sig.Bool -module WideningDelay: Parameter_sig.Int -module WideningPeriod: Parameter_sig.Int module ArrayPrecisionLevel: Parameter_sig.Int module AllocatedContextValid: Parameter_sig.Bool diff --git a/tests/misc/unroll_annots.c b/tests/misc/unroll_annots.c deleted file mode 100644 index 9154b42da50..00000000000 --- a/tests/misc/unroll_annots.c +++ /dev/null @@ -1,22 +0,0 @@ -#define N 10 -int a[N], b[N]; - -int main() { - //@ loop unroll N; - for (int i = 0; i < N; i++) { - //@ loop unroll 1; - for (int j = 0; j < N; j++) { - a[i] = 42; - } - } - - //@ loop unroll 1; - for (int i = 0; i < N; i++) { - //@ loop unroll N; - for (int j = 0; j < N; j++) { - b[j] = 42; - } - } - - return 0; -} diff --git a/tests/value/oracle/partitioning-annots.0.res.oracle b/tests/value/oracle/partitioning-annots.0.res.oracle new file mode 100644 index 00000000000..75f64a73b09 --- /dev/null +++ b/tests/value/oracle/partitioning-annots.0.res.oracle @@ -0,0 +1,26 @@ +[kernel] Parsing tests/value/partitioning-annots.c (with preprocessing) +[eva] Analyzing a complete application starting at test_unroll +[eva] Computing initial state +[eva] Initial state computed +[eva:initial-state] Values of globals at initialization + k ∈ {0} +[eva] tests/value/partitioning-annots.c:25: starting to merge loop iterations +[eva] tests/value/partitioning-annots.c:33: starting to merge loop iterations +[eva] tests/value/partitioning-annots.c:35: starting to merge loop iterations +[eva] Recording results for test_unroll +[eva] done for function test_unroll +[eva] ====== VALUES COMPUTED ====== +[eva:final-states] Values at end of function test_unroll: + a[0..9] ∈ {42} + b[0..9] ∈ {42} +[from] Computing for function test_unroll +[from] Done for function test_unroll +[from] ====== DEPENDENCIES COMPUTED ====== + These dependencies hold at termination for the executions that terminate: +[from] Function test_unroll: + NO EFFECTS +[from] ====== END OF DEPENDENCIES ====== +[inout] Out (internal) for function test_unroll: + a[0..9]; b[0..9]; i; j; i_0; j_0 +[inout] Inputs for function test_unroll: + \nothing diff --git a/tests/value/oracle/partitioning-annots.1.res.oracle b/tests/value/oracle/partitioning-annots.1.res.oracle new file mode 100644 index 00000000000..8778196f4ad --- /dev/null +++ b/tests/value/oracle/partitioning-annots.1.res.oracle @@ -0,0 +1,68 @@ +[kernel] Parsing tests/value/partitioning-annots.c (with preprocessing) +[eva] Analyzing a complete application starting at test_split +[eva] Computing initial state +[eva] Initial state computed +[eva:initial-state] Values of globals at initialization + k ∈ {0} +[eva] computing for function Frama_C_interval <- test_split. + Called from tests/value/partitioning-annots.c:47. +[eva] using specification for function Frama_C_interval +[eva] tests/value/partitioning-annots.c:47: + function Frama_C_interval: precondition 'order' got status valid. +[eva] Done for function Frama_C_interval +[eva] computing for function Frama_C_interval <- test_split. + Called from tests/value/partitioning-annots.c:48. +[eva] tests/value/partitioning-annots.c:48: + function Frama_C_interval: precondition 'order' got status valid. +[eva] Done for function Frama_C_interval +[eva] tests/value/partitioning-annots.c:54: + Frama_C_show_each_before_first_split: {0; 1}, {0; 1; 2}, {0} +[eva] tests/value/partitioning-annots.c:57: + Frama_C_show_each_before_second_split: {0}, {0; 1; 2}, {0} +[eva] tests/value/partitioning-annots.c:57: + Frama_C_show_each_before_second_split: {1}, {0; 1; 2}, {1} +[eva] tests/value/partitioning-annots.c:59: + Frama_C_show_each_before_first_merge: {0}, {0}, {0} +[eva] tests/value/partitioning-annots.c:59: + Frama_C_show_each_before_first_merge: {0}, {1}, {0} +[eva] tests/value/partitioning-annots.c:59: + Frama_C_show_each_before_first_merge: {0}, {2}, {0} +[eva] tests/value/partitioning-annots.c:59: + Frama_C_show_each_before_first_merge: {1}, {0}, {1} +[eva] tests/value/partitioning-annots.c:59: + Frama_C_show_each_before_first_merge: {1}, {1}, {1} +[eva] tests/value/partitioning-annots.c:59: + Frama_C_show_each_before_first_merge: {1}, {2}, {1} +[eva] tests/value/partitioning-annots.c:61: + Frama_C_show_each_before_second_merge: {0; 1}, {0}, {0; 1} +[eva] tests/value/partitioning-annots.c:61: + Frama_C_show_each_before_second_merge: {0; 1}, {1}, {0; 1} +[eva] tests/value/partitioning-annots.c:61: + Frama_C_show_each_before_second_merge: {0; 1}, {2}, {0; 1} +[eva] tests/value/partitioning-annots.c:63: + Frama_C_show_each_end: {0; 1}, {0; 1; 2}, {0; 1} +[eva] Recording results for test_split +[eva] done for function test_split +[eva] ====== VALUES COMPUTED ====== +[eva:final-states] Values at end of function test_split: + Frama_C_entropy_source ∈ [--..--] + k ∈ {0; 1} + i ∈ {0; 1} + j ∈ {0; 1; 2} +[from] Computing for function test_split +[from] Computing for function Frama_C_interval <-test_split +[from] Done for function Frama_C_interval +[from] Done for function test_split +[from] ====== DEPENDENCIES COMPUTED ====== + These dependencies hold at termination for the executions that terminate: +[from] Function Frama_C_interval: + Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) + \result FROM Frama_C_entropy_source; min; max +[from] Function test_split: + Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) + k FROM Frama_C_entropy_source +[from] ====== END OF DEPENDENCIES ====== +[inout] Out (internal) for function test_split: + Frama_C_entropy_source; k; i; j +[inout] Inputs for function test_split: + Frama_C_entropy_source; k diff --git a/tests/value/oracle/partitioning-annots.2.res.oracle b/tests/value/oracle/partitioning-annots.2.res.oracle new file mode 100644 index 00000000000..c41cff4e899 --- /dev/null +++ b/tests/value/oracle/partitioning-annots.2.res.oracle @@ -0,0 +1,76 @@ +[kernel] Parsing tests/value/partitioning-annots.c (with preprocessing) +[eva] Analyzing a complete application starting at test_split +[eva] Computing initial state +[eva] Initial state computed +[eva:initial-state] Values of globals at initialization + k ∈ {0} +[eva] computing for function Frama_C_interval <- test_split. + Called from tests/value/partitioning-annots.c:47. +[eva] using specification for function Frama_C_interval +[eva] tests/value/partitioning-annots.c:47: + function Frama_C_interval: precondition 'order' got status valid. +[eva] Done for function Frama_C_interval +[eva] computing for function Frama_C_interval <- test_split. + Called from tests/value/partitioning-annots.c:48. +[eva] tests/value/partitioning-annots.c:48: + function Frama_C_interval: precondition 'order' got status valid. +[eva] Done for function Frama_C_interval +[eva] tests/value/partitioning-annots.c:54: + Frama_C_show_each_before_first_split: {0; 1}, {0; 1; 2}, {0} +[eva] tests/value/partitioning-annots.c:57: + Frama_C_show_each_before_second_split: {0}, {0; 1; 2}, {0} +[eva] tests/value/partitioning-annots.c:57: + Frama_C_show_each_before_second_split: {1}, {0; 1; 2}, {1} +[eva] tests/value/partitioning-annots.c:59: + Frama_C_show_each_before_first_merge: {0}, {0}, {0} +[eva] tests/value/partitioning-annots.c:59: + Frama_C_show_each_before_first_merge: {0}, {1}, {0} +[eva] tests/value/partitioning-annots.c:59: + Frama_C_show_each_before_first_merge: {0}, {2}, {0} +[eva] tests/value/partitioning-annots.c:59: + Frama_C_show_each_before_first_merge: {1}, {0}, {1} +[eva] tests/value/partitioning-annots.c:59: + Frama_C_show_each_before_first_merge: {1}, {1}, {1} +[eva] tests/value/partitioning-annots.c:59: + Frama_C_show_each_before_first_merge: {1}, {2}, {1} +[eva] tests/value/partitioning-annots.c:61: + Frama_C_show_each_before_second_merge: {0}, {0}, {0} +[eva] tests/value/partitioning-annots.c:61: + Frama_C_show_each_before_second_merge: {1}, {0}, {1} +[eva] tests/value/partitioning-annots.c:61: + Frama_C_show_each_before_second_merge: {0}, {1}, {0} +[eva] tests/value/partitioning-annots.c:61: + Frama_C_show_each_before_second_merge: {1}, {1}, {1} +[eva] tests/value/partitioning-annots.c:61: + Frama_C_show_each_before_second_merge: {0}, {2}, {0} +[eva] tests/value/partitioning-annots.c:61: + Frama_C_show_each_before_second_merge: {1}, {2}, {1} +[eva] tests/value/partitioning-annots.c:63: + Frama_C_show_each_end: {0}, {0; 1; 2}, {0} +[eva] tests/value/partitioning-annots.c:63: + Frama_C_show_each_end: {1}, {0; 1; 2}, {1} +[eva] Recording results for test_split +[eva] done for function test_split +[eva] ====== VALUES COMPUTED ====== +[eva:final-states] Values at end of function test_split: + Frama_C_entropy_source ∈ [--..--] + k ∈ {0; 1} + i ∈ {0; 1} + j ∈ {0; 1; 2} +[from] Computing for function test_split +[from] Computing for function Frama_C_interval <-test_split +[from] Done for function Frama_C_interval +[from] Done for function test_split +[from] ====== DEPENDENCIES COMPUTED ====== + These dependencies hold at termination for the executions that terminate: +[from] Function Frama_C_interval: + Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) + \result FROM Frama_C_entropy_source; min; max +[from] Function test_split: + Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) + k FROM Frama_C_entropy_source +[from] ====== END OF DEPENDENCIES ====== +[inout] Out (internal) for function test_split: + Frama_C_entropy_source; k; i; j +[inout] Inputs for function test_split: + Frama_C_entropy_source; k diff --git a/tests/value/oracle/partitioning-annots.3.res.oracle b/tests/value/oracle/partitioning-annots.3.res.oracle new file mode 100644 index 00000000000..276bbc7d393 --- /dev/null +++ b/tests/value/oracle/partitioning-annots.3.res.oracle @@ -0,0 +1,67 @@ +[kernel] Parsing tests/value/partitioning-annots.c (with preprocessing) +[eva] Analyzing a complete application starting at test_loop_split +[eva] Computing initial state +[eva] Initial state computed +[eva:initial-state] Values of globals at initialization + k ∈ {0} +[eva] computing for function Frama_C_interval <- test_loop_split. + Called from tests/value/partitioning-annots.c:81. +[eva] using specification for function Frama_C_interval +[eva] tests/value/partitioning-annots.c:81: + function Frama_C_interval: precondition 'order' got status valid. +[eva] Done for function Frama_C_interval +[eva] computing for function Frama_C_interval <- test_loop_split. + Called from tests/value/partitioning-annots.c:81. +[eva] Done for function Frama_C_interval +[eva] tests/value/partitioning-annots.c:79: starting to merge loop iterations +[eva] computing for function Frama_C_interval <- test_loop_split. + Called from tests/value/partitioning-annots.c:81. +[eva] Done for function Frama_C_interval +[eva] computing for function Frama_C_interval <- test_loop_split. + Called from tests/value/partitioning-annots.c:81. +[eva] Done for function Frama_C_interval +[eva] computing for function Frama_C_interval <- test_loop_split. + Called from tests/value/partitioning-annots.c:81. +[eva] Done for function Frama_C_interval +[eva] computing for function Frama_C_interval <- test_loop_split. + Called from tests/value/partitioning-annots.c:81. +[eva] Done for function Frama_C_interval +[eva:alarm] tests/value/partitioning-annots.c:88: Warning: + accessing uninitialized left-value. assert \initialized(&A[i]); +[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {0}, {42} +[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {1}, {42} +[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {2}, {42} +[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {3}, {42} +[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {4}, {42} +[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {5}, {42} +[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {6}, {42} +[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {7}, {42} +[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {8}, {42} +[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {9}, {42} +[eva] tests/value/partitioning-annots.c:94: assertion got status valid. +[eva] tests/value/partitioning-annots.c:97: + Frama_C_show_each: {{ "Value 42 not found" }} +[eva] Recording results for test_loop_split +[eva] done for function test_loop_split +[eva] ====== VALUES COMPUTED ====== +[eva:final-states] Values at end of function test_loop_split: + Frama_C_entropy_source ∈ [--..--] + A[0] ∈ [0..100] + [1..9] ∈ [0..100] or UNINITIALIZED + i ∈ [0..10] +[from] Computing for function test_loop_split +[from] Computing for function Frama_C_interval <-test_loop_split +[from] Done for function Frama_C_interval +[from] Done for function test_loop_split +[from] ====== DEPENDENCIES COMPUTED ====== + These dependencies hold at termination for the executions that terminate: +[from] Function Frama_C_interval: + Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) + \result FROM Frama_C_entropy_source; min; max +[from] Function test_loop_split: + Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) +[from] ====== END OF DEPENDENCIES ====== +[inout] Out (internal) for function test_loop_split: + Frama_C_entropy_source; A[0..9]; i +[inout] Inputs for function test_loop_split: + Frama_C_entropy_source diff --git a/tests/value/oracle/partitioning-annots.4.res.oracle b/tests/value/oracle/partitioning-annots.4.res.oracle new file mode 100644 index 00000000000..a2c98fb07a7 --- /dev/null +++ b/tests/value/oracle/partitioning-annots.4.res.oracle @@ -0,0 +1,39 @@ +[kernel] Parsing tests/value/partitioning-annots.c (with preprocessing) +[eva] Analyzing a complete application starting at test_history +[eva] Computing initial state +[eva] Initial state computed +[eva:initial-state] Values of globals at initialization + k ∈ {0} +[eva] computing for function Frama_C_interval <- test_history. + Called from tests/value/partitioning-annots.c:103. +[eva] using specification for function Frama_C_interval +[eva] tests/value/partitioning-annots.c:103: + function Frama_C_interval: precondition 'order' got status valid. +[eva] Done for function Frama_C_interval +[eva] tests/value/partitioning-annots.c:109: Frama_C_show_each: {0; 1}, {0; 1} +[eva:alarm] tests/value/partitioning-annots.c:112: Warning: + division by zero. assert j ≢ 0; +[eva] Recording results for test_history +[eva] done for function test_history +[eva] ====== VALUES COMPUTED ====== +[eva:final-states] Values at end of function test_history: + Frama_C_entropy_source ∈ [--..--] + i ∈ {0; 1} + j ∈ {0; 1} + k_0 ∈ {1} +[from] Computing for function test_history +[from] Computing for function Frama_C_interval <-test_history +[from] Done for function Frama_C_interval +[from] Done for function test_history +[from] ====== DEPENDENCIES COMPUTED ====== + These dependencies hold at termination for the executions that terminate: +[from] Function Frama_C_interval: + Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) + \result FROM Frama_C_entropy_source; min; max +[from] Function test_history: + Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) +[from] ====== END OF DEPENDENCIES ====== +[inout] Out (internal) for function test_history: + Frama_C_entropy_source; i; j; k_0 +[inout] Inputs for function test_history: + Frama_C_entropy_source diff --git a/tests/value/oracle/partitioning-annots.5.res.oracle b/tests/value/oracle/partitioning-annots.5.res.oracle new file mode 100644 index 00000000000..d0d38833a46 --- /dev/null +++ b/tests/value/oracle/partitioning-annots.5.res.oracle @@ -0,0 +1,38 @@ +[kernel] Parsing tests/value/partitioning-annots.c (with preprocessing) +[eva] Analyzing a complete application starting at test_history +[eva] Computing initial state +[eva] Initial state computed +[eva:initial-state] Values of globals at initialization + k ∈ {0} +[eva] computing for function Frama_C_interval <- test_history. + Called from tests/value/partitioning-annots.c:103. +[eva] using specification for function Frama_C_interval +[eva] tests/value/partitioning-annots.c:103: + function Frama_C_interval: precondition 'order' got status valid. +[eva] Done for function Frama_C_interval +[eva] tests/value/partitioning-annots.c:109: Frama_C_show_each: {1}, {1} +[eva] tests/value/partitioning-annots.c:109: Frama_C_show_each: {0}, {0} +[eva] Recording results for test_history +[eva] done for function test_history +[eva] ====== VALUES COMPUTED ====== +[eva:final-states] Values at end of function test_history: + Frama_C_entropy_source ∈ [--..--] + i ∈ {0; 1} + j ∈ {0; 1} + k_0 ∈ {1} +[from] Computing for function test_history +[from] Computing for function Frama_C_interval <-test_history +[from] Done for function Frama_C_interval +[from] Done for function test_history +[from] ====== DEPENDENCIES COMPUTED ====== + These dependencies hold at termination for the executions that terminate: +[from] Function Frama_C_interval: + Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) + \result FROM Frama_C_entropy_source; min; max +[from] Function test_history: + Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) +[from] ====== END OF DEPENDENCIES ====== +[inout] Out (internal) for function test_history: + Frama_C_entropy_source; i; j; k_0 +[inout] Inputs for function test_history: + Frama_C_entropy_source diff --git a/tests/value/partitioning-annots.c b/tests/value/partitioning-annots.c new file mode 100644 index 00000000000..0e22c9b32f0 --- /dev/null +++ b/tests/value/partitioning-annots.c @@ -0,0 +1,121 @@ +/* run.config* + GCC: + STDOPT: #"-main test_unroll" + STDOPT: #"-main test_split" + STDOPT: +"-main test_split -eva-partition-value k" + STDOPT: #"-main test_loop_split -eva-partition-history 1" + STDOPT: #"-main test_history -eva-partition-history 0" + STDOPT: #"-main test_history -eva-partition-history 1" + */ + +#include "__fc_builtin.h" + +#define N 10 + +void test_unroll() +{ + int a[N], b[N]; + + // The inner loop needs to be unrolled to allow strong updates + // The outer loops doesn't need to be unrolled + + //@ loop unroll N; + for (int i = 0; i < N; i++) { + //@ loop unroll 1; + for (int j = 0; j < N; j++) { + a[i] = 42; + } + } + + // This time the outer loop needs unrolling but not the inner loop + + //@ loop unroll 1; + for (int i = 0; i < N; i++) { + //@ loop unroll N; + for (int j = 0; j < N; j++) { + b[j] = 42; + } + } + + // At the end, we must have both arrays a and b to be fully initialized at 42 +} + +int k; + +void test_split() +{ + int i = Frama_C_interval(0,1); + int j = Frama_C_interval(0,2); + + // The splits are done on i and j and undone in the same order + // If global dynamic split is done on k, since it is equaly to i, merge i will + // have no effects. + + Frama_C_show_each_before_first_split(i,j,k); + //@ split i; + k = i; + Frama_C_show_each_before_second_split(i,j,k); + //@ split j; + Frama_C_show_each_before_first_merge(i,j,k); + //@ merge i; + Frama_C_show_each_before_second_merge(i,j,k); + //@ merge j; + Frama_C_show_each_end(i,j,k); +} + +void test_loop_split() +{ + int A[N]; + int i; + + // In this example we can split on the value of the loop index in order to + // keep the relation between i and the value A[i] found in the array to be + // equal to 42. + // However, since the split is not dynamic, an history partitioning must be + // added to distinguish between the two states that share i = 9 : those who + // left the loop at the break point and those who left after the loop test. + + // Init a random array + for (i = 0 ; i < N ; i ++) + { + A[i] = Frama_C_interval(0,100); + } + + // Search for some value + for (i = 0 ; i < N ; i++) + { + //@ split i; + if (A[i] == 42) + break; + } + + if (i < N) { + Frama_C_show_each(i, A[i]); + //@ assert A[i] == 42; + } + else { + Frama_C_show_each("Value 42 not found"); + } +} + +void test_history() +{ + int i = Frama_C_interval(0,1); + int j = 0, k = 1; + + if (i) + j = 1; + + Frama_C_show_each(i, j); + + if (i) + k = k / j; +} + +void main(void) +{ + test_unroll(); + test_split(); + test_loop_split(); +} + -- GitLab From aed92e803dc74657e046aea8de50506514658096 Mon Sep 17 00:00:00 2001 From: Valentin Perrelle <valentin.perrelle@cea.fr> Date: Wed, 6 Jun 2018 16:32:17 +0200 Subject: [PATCH 226/376] [Eva] Extends value partitioning to any expression, not just lvalues --- src/plugins/value/engine/partition.ml | 63 +++++++++--------- src/plugins/value/engine/partition.mli | 16 ++--- .../value/engine/partitioned_dataflow.ml | 2 +- .../value/engine/partitioning_parameters.ml | 19 +++--- .../value/engine/state_partitioning.mli | 8 ++- .../value/engine/trace_partitioning.ml | 64 ++----------------- src/plugins/value/engine/transfer_stmt.ml | 51 +++++++++++++++ src/plugins/value/engine/transfer_stmt.mli | 5 ++ 8 files changed, 118 insertions(+), 110 deletions(-) diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index 44642d2a166..64e2e6c5d80 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -24,7 +24,7 @@ let opt_flatten (type a) (o : a option option) : a option = Extlib.opt_conv None o -module LvalMap = Cil_datatype.LvalStructEq.Map +module ExpMap = Cil_datatype.ExpStructEq.Map module IList = Datatype.List (Datatype.Int) type branch = int @@ -34,8 +34,8 @@ type key = { transfer_stamp : int option; branches : branch list; loops : int list; - static_split : Integer.t LvalMap.t; - dynamic_split : Integer.t LvalMap.t; + static_split : Integer.t ExpMap.t; + dynamic_split : Integer.t ExpMap.t; } module Key = @@ -49,8 +49,8 @@ struct Extlib.opt_compare (-) k1.ration_stamp k2.ration_stamp <?> (Extlib.opt_compare (-), k1.transfer_stamp, k2.transfer_stamp) <?> (IList.compare, k1.loops, k2.loops) - <?> (LvalMap.compare Integer.compare, k1.static_split, k2.static_split) - <?> (LvalMap.compare Integer.compare, k1.dynamic_split, k2.dynamic_split) + <?> (ExpMap.compare Integer.compare, k1.static_split, k2.static_split) + <?> (ExpMap.compare Integer.compare, k1.dynamic_split, k2.dynamic_split) <?> (IList.compare, k1.branches, k2.branches) end @@ -67,10 +67,10 @@ type action = | Ration of int | Ration_merge of int option | Transfer_merge - | Static_split of Cil_types.lval - | Dynamic_split of Cil_types.lval - | Static_merge of Cil_types.lval - | Dynamic_merge of Cil_types.lval + | Static_split of Cil_types.exp + | Dynamic_split of Cil_types.exp + | Static_merge of Cil_types.exp + | Dynamic_merge of Cil_types.exp | Update_dynamic_splits exception InvalidAction @@ -83,7 +83,7 @@ sig exception Cant_split val join : t -> t -> t - val split : t -> Cil_types.lval -> (Integer.t * t) list + val split : t -> Cil_types.exp -> (Integer.t * t) list end @@ -100,8 +100,8 @@ struct transfer_stamp = None; branches = []; loops = []; - static_split = LvalMap.empty; - dynamic_split = LvalMap.empty; + static_split = ExpMap.empty; + dynamic_split = ExpMap.empty; } let is_empty (p : 'a partition) : bool = @@ -128,38 +128,38 @@ struct let add_list (p : t) (l : (key * state) list) : t = List.fold_left (fun p (k,x) -> add p k x) p l - let split_state ~(static : bool) (lval : Cil_types.lval) + let split_state ~(static : bool) (exp : Cil_types.exp) (key : key) (state : state) : (key * state) list = try let update_key (v,x) = let k = if static then - { key with static_split = LvalMap.add lval v key.static_split } + { key with static_split = ExpMap.add exp v key.static_split } else - { key with dynamic_split = LvalMap.add lval v key.dynamic_split } + { key with dynamic_split = ExpMap.add exp v key.dynamic_split } in (k,x) in - List.map update_key (Domain.split state lval) + List.map update_key (Domain.split state exp) with Domain.Cant_split -> [(key,state)] - let split ~(static : bool) (p : t) (lval : Cil_types.lval) = + let split ~(static : bool) (p : t) (exp : Cil_types.exp) = let add_split key state p = - add_list p (split_state ~static lval key state) + add_list p (split_state ~static exp key state) in KMap.fold add_split p KMap.empty let update_dynamic_splits p = (* Update one state *) let update_state key state p = - (* Split the states in the list l for the given lval *) - let update_lval lval _ l = + (* Split the states in the list l for the given exp *) + let update_exp exp _ l = let static = false in - List.fold_left (fun l (k,s) -> split_state ~static lval k s @ l) [] l + List.fold_left (fun l (k,s) -> split_state ~static exp k s @ l) [] l in - (* Foreach lval in original state: split *) - let l = LvalMap.fold update_lval key.dynamic_split [(key,state)] in + (* Foreach exp in original state: split *) + let l = ExpMap.fold update_exp key.dynamic_split [(key,state)] in add_list p l in KMap.fold update_state p KMap.empty @@ -168,11 +168,11 @@ struct KMap.fold (fun k x acc -> add acc (f k) x) p empty let transfer_keys p = function - | Static_split lval -> - split ~static:true p lval + | Static_split exp -> + split ~static:true p exp - | Dynamic_split lval -> - split ~static:false p lval + | Dynamic_split exp -> + split ~static:false p exp | Update_dynamic_splits -> update_dynamic_splits p @@ -230,11 +230,11 @@ struct | Transfer_merge -> fun k -> { k with transfer_stamp = None } - | Static_merge lval -> fun k -> - { k with static_split = LvalMap.remove lval k.static_split } + | Static_merge exp -> fun k -> + { k with static_split = ExpMap.remove exp k.static_split } - | Dynamic_merge lval -> fun k -> - { k with dynamic_split = LvalMap.remove lval k.dynamic_split } + | Dynamic_merge exp -> fun k -> + { k with dynamic_split = ExpMap.remove exp k.dynamic_split } in map_keys transfer p @@ -247,6 +247,7 @@ struct let add p y = let k' = { k with transfer_stamp = Some !t } in incr t; + assert (not (KMap.mem k' p)); KMap.add k' y p in match f x with diff --git a/src/plugins/value/engine/partition.mli b/src/plugins/value/engine/partition.mli index 161b95ca6ba..6d2c5a27f3a 100644 --- a/src/plugins/value/engine/partition.mli +++ b/src/plugins/value/engine/partition.mli @@ -52,15 +52,15 @@ type branch = int -module LvalMap = Cil_datatype.LvalStructEq.Map +module ExpMap = Cil_datatype.ExpStructEq.Map type key = private { ration_stamp : int option; transfer_stamp : int option; branches : branch list; loops : int list; - static_split : Integer.t LvalMap.t; - dynamic_split : Integer.t LvalMap.t; + static_split : Integer.t ExpMap.t; + dynamic_split : Integer.t ExpMap.t; } type 'a partition @@ -73,10 +73,10 @@ type action = | Ration of int (* starting ration stamp *) | Ration_merge of int option (* new ration stamp for the merge state *) | Transfer_merge - | Static_split of Cil_types.lval - | Dynamic_split of Cil_types.lval - | Static_merge of Cil_types.lval - | Dynamic_merge of Cil_types.lval + | Static_split of Cil_types.exp + | Dynamic_split of Cil_types.exp + | Static_merge of Cil_types.exp + | Dynamic_merge of Cil_types.exp | Update_dynamic_splits exception InvalidAction @@ -89,7 +89,7 @@ sig exception Cant_split val join : t -> t -> t - val split : t -> Cil_types.lval -> (Integer.t * t) list + val split : t -> Cil_types.exp -> (Integer.t * t) list end diff --git a/src/plugins/value/engine/partitioned_dataflow.ml b/src/plugins/value/engine/partitioned_dataflow.ml index e3d842a247f..14ede992285 100644 --- a/src/plugins/value/engine/partitioned_dataflow.ml +++ b/src/plugins/value/engine/partitioned_dataflow.ml @@ -97,7 +97,7 @@ module Make_Dataflow (* --- Abstract values storage --- *) - module Partition = Trace_partitioning.Make (Domain) (AnalysisParam) + module Partition = Trace_partitioning.Make (Domain) (Transfer) (AnalysisParam) type store = Partition.store type widening = Partition.widening diff --git a/src/plugins/value/engine/partitioning_parameters.ml b/src/plugins/value/engine/partitioning_parameters.ml index d625a9ef865..87d8cd6fd75 100644 --- a/src/plugins/value/engine/partitioning_parameters.ml +++ b/src/plugins/value/engine/partitioning_parameters.ml @@ -102,7 +102,7 @@ struct let add name l = try let vi = Globals.Vars.find_from_astinfo name VGlobal in - Cil.var vi :: l + Cil.evar vi :: l with Not_found -> warn ~current:false "cannot find the global variable %s for value \ partitioning" name; @@ -111,19 +111,18 @@ struct ValuePartitioning.fold add [] let flow_actions stmt = - let term_to_lval = function - | {term_node = TLval tlv} -> - !Db.Properties.Interp.term_lval_to_lval ~result:None tlv - | _ -> - warn "split/merge expressions must be lvalues"; - raise Exit + let term_to_exp term = + !Db.Properties.Interp.term_to_exp ~result:None term in let map_annot acc t = try match t with - | FlowSplit t -> Partition.Static_split (term_to_lval t) :: acc - | FlowMerge t -> Partition.Static_merge (term_to_lval t) :: acc - with Exit -> acc (* Impossible to convert term to lval *) + | FlowSplit t -> Partition.Static_split (term_to_exp t) :: acc + | FlowMerge t -> Partition.Static_merge (term_to_exp t) :: acc + with + Db.Properties.Interp.No_conversion -> + warn "split/merge expressions must be valid expressions"; + acc (* Impossible to convert term to lval *) in List.fold_left map_annot [] (get_flow_annot stmt) end diff --git a/src/plugins/value/engine/state_partitioning.mli b/src/plugins/value/engine/state_partitioning.mli index 7395634a2c1..86956872280 100644 --- a/src/plugins/value/engine/state_partitioning.mli +++ b/src/plugins/value/engine/state_partitioning.mli @@ -38,7 +38,7 @@ sig val merge : Cil_types.stmt -> bool val unroll : loop -> int val history_size : int - val universal_splits : Cil_types.lval list + val universal_splits : Cil_types.exp list val flow_actions : Cil_types.stmt -> Partition.action list end @@ -143,6 +143,8 @@ end module type Domain = Partitioning.Domain -module type Partitioning = - functor (Domain : Domain) (Kf : Kf) -> +module type Partitioning = functor + (Domain : Abstract_domain.External) + (Transfer : Transfer_stmt.S with type state = Domain.t) + (Kf : Kf) -> Partition with type state = Domain.t diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index 081851332d4..c93ab0ad40d 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -26,7 +26,10 @@ open State_partitioning open Partition -module Make (Domain : Domain) (Kf : Kf) = +module Make + (Domain : Abstract_domain.External) + (Transfer : Transfer_stmt.S with type state = Domain.t) + (Kf : Kf) = struct module Parameters = Partitioning_parameters.Make (Kf) @@ -36,63 +39,10 @@ struct (* Add the split function to the domain *) module Domain = struct - include Domain + exception Cant_split = Transfer.Cant_split + let split = Transfer.split_by_value - module Val = struct - include Main_values.CVal - include Structure.Open (Structure.Key_Value) (Main_values.CVal) - let reduce t = t - end - - module Eva = - Evaluation.Make - (Val) - (Main_locations.PLoc) - (Cvalue_domain.State) - - exception Cant_split - - (* TODO: size of split limit *) - let split state lval = - (* Whenever the split fail, warn the user and exit with an exception *) - let fail message = - Value_parameters.warning ~once:true message; - raise Cant_split - in - (* Get the cvalue *) - let cvalue = match get Cvalue_domain.key with - | Some get_cvalue -> get_cvalue state - | None -> fail "cannot partition by value when the CValue domain is not\ - active" - in - (* Retrieve the location of the lval *) - let cstate = Cvalue_domain.inject cvalue in - let location = match Eva.lvaluate ~for_writing:true cstate lval with - | `Value (_valuation, loc, _typ), _alarmset -> - Precise_locs.imprecise_location loc - | `Bottom, _alarmset -> - fail "cannot partition by value on an imprecise lvalue" - in - (* Extract the ival *) - let ival = - try - let v = Cvalue.Model.find cvalue location in - Cvalue.V.project_ival v - with Cvalue.V.Not_based_on_null -> - fail "cannot partition by value on pointers" - in - (* Build a state with the lvalue set to a singleton *) - let build i acc = - let v = Cvalue.V.inject_int i in - let cvalue = Cvalue.Model.add_binding ~exact:true cvalue location v in - let new_state = set Cvalue_domain.key cvalue state in - (i,new_state) :: acc - in - (* For each integer of the ival, build a new state *) - try - Ival.fold_int build ival [] - with Abstract_interp.Error_Top -> - fail "too many values to partition by value on" + include Domain end module Index = Partitioning.Make (Domain) diff --git a/src/plugins/value/engine/transfer_stmt.ml b/src/plugins/value/engine/transfer_stmt.ml index 22ec00d8c54..b3cea597c20 100644 --- a/src/plugins/value/engine/transfer_stmt.ml +++ b/src/plugins/value/engine/transfer_stmt.ml @@ -40,6 +40,8 @@ module type S = sig state -> (stmt * lval list * lval list * lval list * stmt ref list) list -> unit or_bottom val enter_scope: kernel_function -> varinfo list -> state -> state + exception Cant_split + val split_by_value: state -> exp -> (Integer.t * state) list type call_result = { states: state list or_bottom; cacheable: Value_types.cacheable; @@ -872,6 +874,55 @@ module Make (Abstract: Abstractions.Eva) = struct in List.fold_left initialize_volatile state vars + + (* ------------------------------------------------------------------------ *) + (* Split by value *) + (* ------------------------------------------------------------------------ *) + + exception Cant_split + + let split_by_value state exp = + (* Whenever the split fails, warn the user and raise an exception *) + let fail message = + Value_parameters.warning ~once:true message; + raise Cant_split + in + (* Evaluate the expression *) + let valuation, value = match Eval.evaluate ~reduction:false state exp with + | `Value (valuation, value), alarms when Alarmset.is_empty alarms -> + valuation, value + | _ -> + fail "the split expression cannot be evaluated safely on all states"; + in + (* Get the cvalue *) + let cvalue = match Value.get Main_values.cvalue_key with + | Some get_cvalue -> get_cvalue value + | None -> fail "cannot partition by value when the CValue domain is not\ + active" + in + (* Extract the ival *) + let ival = + try + Cvalue.V.project_ival cvalue + with Cvalue.V.Not_based_on_null -> + fail "cannot partition by value on pointers" + in + (* Build a state with the lvalue set to a singleton *) + let build i acc = + let value = Value.inject_int (Cil.typeOf exp) i in + match Eval.assume ~valuation state exp value with + | `Value valuation -> + (i, TF.update valuation state) :: acc + | _ -> (* This value cannot be set in the state ; the evaluation of + expr was unprecise *) + acc + in + (* For each integer of the ival, build a new state *) + begin try + Ival.fold_int build ival [] + with Abstract_interp.Error_Top -> + fail "too many values to partition by value on" + end end diff --git a/src/plugins/value/engine/transfer_stmt.mli b/src/plugins/value/engine/transfer_stmt.mli index a2e64699a2e..7d8cee112e8 100644 --- a/src/plugins/value/engine/transfer_stmt.mli +++ b/src/plugins/value/engine/transfer_stmt.mli @@ -51,6 +51,11 @@ module type S = sig val enter_scope: kernel_function -> varinfo list -> state -> state + exception Cant_split + + val split_by_value: state -> exp -> (Integer.t * state) list + + type call_result = { states: state list or_bottom; cacheable: Value_types.cacheable; -- GitLab From 1e0fcae9f2dd450b60a5461798ab74aa93537077 Mon Sep 17 00:00:00 2001 From: Valentin Perrelle <valentin.perrelle@cea.fr> Date: Fri, 10 Aug 2018 16:47:11 +0200 Subject: [PATCH 227/376] [Eva] Add more general annotations for loop unrolling --- src/plugins/value/engine/partition.ml | 102 +++++++++++------- src/plugins/value/engine/partition.mli | 18 +++- .../value/engine/partitioning_parameters.ml | 78 ++++++-------- .../value/engine/partitioning_parameters.mli | 1 - .../value/engine/state_partitioning.mli | 6 +- .../value/engine/trace_partitioning.ml | 30 +++--- .../value/engine/trace_partitioning.mli | 1 - src/plugins/value/engine/transfer_stmt.ml | 45 +++++--- src/plugins/value/engine/transfer_stmt.mli | 4 +- .../value/utils/partitioning_annots.ml | 37 +++++-- .../value/utils/partitioning_annots.mli | 2 +- src/plugins/value/value_parameters.ml | 28 +++-- src/plugins/value/value_parameters.mli | 1 + .../oracle/partitioning-annots.0.res.oracle | 22 +++- .../oracle/partitioning-annots.1.res.oracle | 34 +++--- .../oracle/partitioning-annots.2.res.oracle | 42 ++++---- .../oracle/partitioning-annots.3.res.oracle | 42 ++++---- .../oracle/partitioning-annots.4.res.oracle | 8 +- .../oracle/partitioning-annots.5.res.oracle | 8 +- tests/value/partitioning-annots.c | 26 ++++- 20 files changed, 322 insertions(+), 213 deletions(-) diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index 64e2e6c5d80..54a03072c68 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -25,7 +25,8 @@ let opt_flatten (type a) (o : a option option) : a option = Extlib.opt_conv None o module ExpMap = Cil_datatype.ExpStructEq.Map -module IList = Datatype.List (Datatype.Int) +module LoopList = Datatype.List (Datatype.Pair (Datatype.Int) (Datatype.Int)) +module BranchList = Datatype.List (Datatype.Int) type branch = int @@ -33,7 +34,7 @@ type key = { ration_stamp : int option; transfer_stamp : int option; branches : branch list; - loops : int list; + loops : (int * int) list; static_split : Integer.t ExpMap.t; dynamic_split : Integer.t ExpMap.t; } @@ -48,21 +49,40 @@ struct in Extlib.opt_compare (-) k1.ration_stamp k2.ration_stamp <?> (Extlib.opt_compare (-), k1.transfer_stamp, k2.transfer_stamp) - <?> (IList.compare, k1.loops, k2.loops) + <?> (LoopList.compare, k1.loops, k2.loops) <?> (ExpMap.compare Integer.compare, k1.static_split, k2.static_split) <?> (ExpMap.compare Integer.compare, k1.dynamic_split, k2.dynamic_split) - <?> (IList.compare, k1.branches, k2.branches) + <?> (BranchList.compare, k1.branches, k2.branches) end module KMap = Map.Make (Key) type 'a partition = 'a KMap.t +type 'a transfer_function = (key * 'a) list -> (key * 'a) list + +let stamp_after_transfer k = function + | [x] -> [(k,x)] + | l -> + let t = ref 0 in + let add acc x = + let k' = { k with transfer_stamp = Some !t } in + incr t; + (k',x) :: acc + in + List.fold_left add [] l + +let update_after_call k l = + List.map (fun x -> k,x) l + +type unroll_limit = + | ExpLimit of Cil_types.exp + | IntLimit of int type action = - | Enter_loop + | Enter_loop of unroll_limit | Leave_loop - | Incr_loop of int + | Incr_loop | Branch of branch * int | Ration of int | Ration_merge of int option @@ -80,10 +100,11 @@ module type InputDomain = sig type t - exception Cant_split + exception Operation_failed val join : t -> t -> t val split : t -> Cil_types.exp -> (Integer.t * t) list + val eval_exp_to_int : t -> Cil_types.exp -> int end @@ -141,7 +162,7 @@ struct (k,x) in List.map update_key (Domain.split state exp) - with Domain.Cant_split -> + with Domain.Operation_failed -> [(key,state)] let split ~(static : bool) (p : t) (exp : Cil_types.exp) = @@ -164,8 +185,13 @@ struct in KMap.fold update_state p KMap.empty - let map_keys (f : key -> key) (p : t) = - KMap.fold (fun k x acc -> add acc (f k) x) p empty + let map_keys (f : key -> state -> key) (p : t) = + KMap.fold (fun k x acc -> add acc (f k x) x) p empty + + let transfer (f : state transfer_function) (p : t) : t = + let l = KMap.fold (fun k x l -> (k,x) :: l) p [] in + let l' = f l in + add_list empty (l') let transfer_keys p = function | Static_split exp -> @@ -182,26 +208,32 @@ struct | Static_split _ | Dynamic_split _ | Update_dynamic_splits -> assert false (* Handled above *) - | Enter_loop -> fun k -> - { k with loops = 0 :: k.loops } + | Enter_loop limit_kind -> fun k x -> + let limit = try match limit_kind with + | ExpLimit exp -> Domain.eval_exp_to_int x exp + | IntLimit i -> i + with + | Domain.Operation_failed -> 0 + in + { k with loops = (0,limit) :: k.loops } - | Leave_loop -> fun k -> + | Leave_loop -> fun k _x -> begin match k.loops with - | [] -> raise InvalidAction - | _ :: tl -> { k with loops = tl } + | [] -> raise InvalidAction + | _ :: tl -> { k with loops = tl } end - | Incr_loop limit -> fun k -> + | Incr_loop -> fun k _x -> begin match k.loops with - | [] -> raise InvalidAction - | h :: tl -> - if h >= limit then - k - else - { k with loops = h + 1 :: tl } + | [] -> raise InvalidAction + | (h, limit) :: tl -> + if h >= limit then + k + else + { k with loops = (h + 1, limit) :: tl } end - | Branch (b,max) -> fun k -> + | Branch (b,max) -> fun k _x -> let list_start l i = let rec aux acc i = function | [] -> acc @@ -219,21 +251,21 @@ struct | Ration (min) -> let r = ref min in - fun k -> + fun k _x -> let ration_stamp = Some !r in incr r; { k with ration_stamp } - | Ration_merge ration_stamp -> fun k -> + | Ration_merge ration_stamp -> fun k _x -> { k with ration_stamp } - | Transfer_merge -> fun k -> + | Transfer_merge -> fun k _x -> { k with transfer_stamp = None } - | Static_merge exp -> fun k -> + | Static_merge exp -> fun k _x -> { k with static_split = ExpMap.remove exp k.static_split } - | Dynamic_merge exp -> fun k -> + | Dynamic_merge exp -> fun k _x -> { k with dynamic_split = ExpMap.remove exp k.dynamic_split } in map_keys transfer p @@ -243,16 +275,8 @@ struct let transfer_states (f : 'a -> 'a list) (p : 'a partition) : 'a partition = let transfer_one k x p = - let t = ref 0 in - let add p y = - let k' = { k with transfer_stamp = Some !t } in - incr t; - assert (not (KMap.mem k' p)); - KMap.add k' y p - in - match f x with - | [y] -> KMap.add k y p - | l -> List.fold_left add p l + let l = stamp_after_transfer k (f x) in + List.fold_left (fun p (k,x) -> KMap.add k x p) p l in KMap.fold transfer_one p KMap.empty @@ -321,6 +345,6 @@ struct KMap.filter (fun k _x -> f k) p let map_filter (f : key -> 'a -> 'b option) (p : 'a partition) - : 'b partition = + : 'b partition = KMap.merge (fun k o _ -> opt_flatten (Extlib.opt_map (f k) o)) p KMap.empty end diff --git a/src/plugins/value/engine/partition.mli b/src/plugins/value/engine/partition.mli index 6d2c5a27f3a..ee417755012 100644 --- a/src/plugins/value/engine/partition.mli +++ b/src/plugins/value/engine/partition.mli @@ -58,17 +58,25 @@ type key = private { ration_stamp : int option; transfer_stamp : int option; branches : branch list; - loops : int list; + loops : (int * int) list; static_split : Integer.t ExpMap.t; dynamic_split : Integer.t ExpMap.t; } type 'a partition +type 'a transfer_function = (key * 'a) list -> (key * 'a) list + +val stamp_after_transfer : key -> 'a list -> (key * 'a) list +val update_after_call : key -> 'a list -> (key * 'a) list + +type unroll_limit = + | ExpLimit of Cil_types.exp + | IntLimit of int type action = - | Enter_loop + | Enter_loop of unroll_limit | Leave_loop - | Incr_loop of int (* the parameter is the unroll limit *) + | Incr_loop | Branch of branch * int (* branch taken, max branches in history *) | Ration of int (* starting ration stamp *) | Ration_merge of int option (* new ration stamp for the merge state *) @@ -86,10 +94,11 @@ module type InputDomain = sig type t - exception Cant_split + exception Operation_failed val join : t -> t -> t val split : t -> Cil_types.exp -> (Integer.t * t) list + val eval_exp_to_int : t -> Cil_types.exp -> int end @@ -111,6 +120,7 @@ sig val union : ('a -> 'a -> 'a) -> 'a partition -> 'a partition -> 'a partition val iter : ('a -> unit) -> 'a partition -> unit + val transfer : state transfer_function -> t -> t val transfer_keys : t -> action -> t val filter_keys : (key -> bool) -> 'a partition -> 'a partition val map_states : ('a -> 'a) -> 'a partition -> 'a partition diff --git a/src/plugins/value/engine/partitioning_parameters.ml b/src/plugins/value/engine/partitioning_parameters.ml index 87d8cd6fd75..fd35427a043 100644 --- a/src/plugins/value/engine/partitioning_parameters.ml +++ b/src/plugins/value/engine/partitioning_parameters.ml @@ -55,46 +55,41 @@ struct | Per_stmt_slevel.NoMerge -> false | Per_stmt_slevel.Merge f -> f stmt - let default_loop_unroll = MinLoopUnroll.get () - - let unroll stmt = - let local_unroll = match get_unroll_annot stmt with - | [] -> - let is_attribute a = Cil.hasAttribute a stmt.sattr in - begin - match List.filter is_attribute ["for" ; "while" ; "dowhile"] with - | [] -> () - | loop_kind :: _ -> - let wkey = - if loop_kind = "for" - then Value_parameters.wkey_missing_loop_unroll_for - else Value_parameters.wkey_missing_loop_unroll - in - Value_parameters.warning - ~wkey ~source:(fst (Cil_datatype.Stmt.loc stmt)) ~once:true - "%s loop without unroll annotation" loop_kind - end; - None - | [t] -> - (* Inlines the value of const variables in [t]. *) - let global_init vi = - try (Globals.Vars.find vi).init with Not_found -> None - in - let t = - Cil.visitCilTerm (new Logic_utils.simplify_const_lval global_init) t - in - begin match Logic_utils.constFoldTermToInt t with - | Some n -> Some (Integer.to_int n) - | None -> - warn "invalid term, not integer: %a" Printer.pp_term t; - None - end + let term_to_exp term = + !Db.Properties.Interp.term_to_exp ~result:None term + + let min_loop_unroll = MinLoopUnroll.get () + + let default_loop_unroll = DefaultLoopUnroll.get () + + let warn_no_loop_unroll stmt = + let is_attribute a = Cil.hasAttribute a stmt.sattr in + match List.filter is_attribute ["for" ; "while" ; "dowhile"] with + | [] -> () + | loop_kind :: _ -> + let wkey = + if loop_kind = "for" + then Value_parameters.wkey_missing_loop_unroll_for + else Value_parameters.wkey_missing_loop_unroll + in + Value_parameters.warning + ~wkey ~source:(fst (Cil_datatype.Stmt.loc stmt)) ~once:true + "%s loop without unroll annotation" loop_kind + + let unroll stmt = + let default = Partition.IntLimit min_loop_unroll in + try match get_unroll_annot stmt with + | [] -> warn_no_loop_unroll stmt; default + | [None] -> Partition.IntLimit default_loop_unroll + | [(Some t)] -> Partition.ExpLimit (term_to_exp t) | _ -> warn "ignoring invalid unroll annotation"; - None - in match local_unroll with - | Some n -> n - | None -> default_loop_unroll + raise Exit + with + | Exit -> default + | Db.Properties.Interp.No_conversion -> + warn "loop unrolling parameters must be valid expressions"; + default let history_size = HistoryPartitioning.get () @@ -105,21 +100,18 @@ struct Cil.evar vi :: l with Not_found -> warn ~current:false "cannot find the global variable %s for value \ - partitioning" name; + partitioning" name; l in ValuePartitioning.fold add [] let flow_actions stmt = - let term_to_exp term = - !Db.Properties.Interp.term_to_exp ~result:None term - in let map_annot acc t = try match t with | FlowSplit t -> Partition.Static_split (term_to_exp t) :: acc | FlowMerge t -> Partition.Static_merge (term_to_exp t) :: acc - with + with Db.Properties.Interp.No_conversion -> warn "split/merge expressions must be valid expressions"; acc (* Impossible to convert term to lval *) diff --git a/src/plugins/value/engine/partitioning_parameters.mli b/src/plugins/value/engine/partitioning_parameters.mli index 177cb8752a1..57acfb7caab 100644 --- a/src/plugins/value/engine/partitioning_parameters.mli +++ b/src/plugins/value/engine/partitioning_parameters.mli @@ -21,4 +21,3 @@ (**************************************************************************) module Make (Kf : State_partitioning.Kf) : State_partitioning.Parameters - diff --git a/src/plugins/value/engine/state_partitioning.mli b/src/plugins/value/engine/state_partitioning.mli index 86956872280..223d3db8d60 100644 --- a/src/plugins/value/engine/state_partitioning.mli +++ b/src/plugins/value/engine/state_partitioning.mli @@ -27,7 +27,7 @@ type loop = Cil_types.stmt module type Kf = sig - val kf : Cil_types.kernel_function + val kf : Cil_types.kernel_function end module type Parameters = @@ -36,7 +36,7 @@ sig val widening_period : int val slevel : Cil_types.stmt -> int val merge : Cil_types.stmt -> bool - val unroll : loop -> int + val unroll : loop -> Partition.unroll_limit val history_size : int val universal_splits : Cil_types.exp list val flow_actions : Cil_types.stmt -> Partition.action list @@ -147,4 +147,4 @@ module type Partitioning = functor (Domain : Abstract_domain.External) (Transfer : Transfer_stmt.S with type state = Domain.t) (Kf : Kf) -> - Partition with type state = Domain.t + Partition with type state = Domain.t diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index c93ab0ad40d..1e4e6e679ee 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -39,8 +39,9 @@ struct (* Add the split function to the domain *) module Domain = struct - exception Cant_split = Transfer.Cant_split + exception Operation_failed = Transfer.Operation_failed let split = Transfer.split_by_value + let eval_exp_to_int = Transfer.eval_exp_to_int include Domain end @@ -143,15 +144,14 @@ struct (* Partition transfer functions *) - let enter_loop (p : propagation) (_i : loop) = - p.partition <- Partition.transfer_keys p.partition Enter_loop + let enter_loop (p : propagation) (i : loop) = + p.partition <- Partition.transfer_keys p.partition (Enter_loop (unroll i)) let leave_loop (p : propagation) (_i : loop) = p.partition <- Partition.transfer_keys p.partition Leave_loop - let next_loop_iteration (p : propagation) (i : loop) = - let limit = unroll i in - p.partition <- Partition.transfer_keys p.partition (Incr_loop limit) + let next_loop_iteration (p : propagation) (_i : loop) = + p.partition <- Partition.transfer_keys p.partition Incr_loop (* Reset state (for hierchical convergence) *) @@ -193,7 +193,7 @@ struct into.partition <- Partition.merge merge_two into.partition source.partition let join (sources : (branch*propagation) list) (dest : store) - : propagation = + : propagation = let is_loop_head = match dest.store_stmt with | Some {skind=Cil_types.Loop _} -> true @@ -261,7 +261,7 @@ struct Some (Domain.join previous_state current_state) end with - (* There is no previous state, propagate normally *) + (* There is no previous state, propagate normally *) Not_found -> Some current_state in (* Add the propagated state to the store *) @@ -297,10 +297,10 @@ struct (* Propagated state decreases, stop to propagate *) if Domain.is_included curr wstate.previous_state then None - (* Widening is delayed *) + (* Widening is delayed *) else if wstate.widening_counter > 0 then begin Some curr - (* Apply widening *) + (* Apply widening *) end else begin Value_parameters.feedback ~level:1 ~once:true ~current:true ~dkey:Value_parameters.dkey_widening @@ -309,8 +309,8 @@ struct state so as to allow the intermediate(s) iteration(s) (between two widenings) to stabilize at least a part of the state. *) let prev = match wstate.widened_state with - | Some v -> Domain.join wstate.previous_state v - | None -> wstate.previous_state + | Some v -> Domain.join wstate.previous_state v + | None -> wstate.previous_state in let next = Domain.widen kf stmt prev (Domain.join prev curr) in update key { @@ -325,9 +325,9 @@ struct exceeded *) if key.ration_stamp = None then update key { - widened_state = None; - previous_state = curr; - widening_counter = widening_delay - 1; + widened_state = None; + previous_state = curr; + widening_counter = widening_delay - 1; }; Some curr in diff --git a/src/plugins/value/engine/trace_partitioning.mli b/src/plugins/value/engine/trace_partitioning.mli index 07d509e4b5c..9006e977b10 100644 --- a/src/plugins/value/engine/trace_partitioning.mli +++ b/src/plugins/value/engine/trace_partitioning.mli @@ -21,4 +21,3 @@ (**************************************************************************) module Make : State_partitioning.Partitioning - diff --git a/src/plugins/value/engine/transfer_stmt.ml b/src/plugins/value/engine/transfer_stmt.ml index b3cea597c20..b580a94f532 100644 --- a/src/plugins/value/engine/transfer_stmt.ml +++ b/src/plugins/value/engine/transfer_stmt.ml @@ -40,8 +40,9 @@ module type S = sig state -> (stmt * lval list * lval list * lval list * stmt ref list) list -> unit or_bottom val enter_scope: kernel_function -> varinfo list -> state -> state - exception Cant_split + exception Operation_failed val split_by_value: state -> exp -> (Integer.t * state) list + val eval_exp_to_int: state -> exp -> int type call_result = { states: state list or_bottom; cacheable: Value_types.cacheable; @@ -876,37 +877,39 @@ module Make (Abstract: Abstractions.Eva) = struct (* ------------------------------------------------------------------------ *) - (* Split by value *) + (* Partitioning *) (* ------------------------------------------------------------------------ *) - exception Cant_split + exception Operation_failed - let split_by_value state exp = - (* Whenever the split fails, warn the user and raise an exception *) - let fail message = - Value_parameters.warning ~once:true message; - raise Cant_split - in + let fail ~exp message = + Value_parameters.warning ~source:(fst exp.eloc) ~once:true message; + raise Operation_failed + + let evaluate_exp_to_ival state exp = (* Evaluate the expression *) let valuation, value = match Eval.evaluate ~reduction:false state exp with | `Value (valuation, value), alarms when Alarmset.is_empty alarms -> valuation, value | _ -> - fail "the split expression cannot be evaluated safely on all states"; + fail ~exp "this partitioning parameter cannot be evaluated safely on all states" in (* Get the cvalue *) let cvalue = match Value.get Main_values.cvalue_key with | Some get_cvalue -> get_cvalue value - | None -> fail "cannot partition by value when the CValue domain is not\ - active" + | None -> fail ~exp "partitioning is disabled when the CValue domain is not active" in (* Extract the ival *) let ival = try Cvalue.V.project_ival cvalue with Cvalue.V.Not_based_on_null -> - fail "cannot partition by value on pointers" + fail ~exp "this partitioning parameter must evaluate to an integer" in + valuation, ival + + let split_by_value state exp = + let valuation, ival = evaluate_exp_to_ival state exp in (* Build a state with the lvalue set to a singleton *) let build i acc = let value = Value.inject_int (Cil.typeOf exp) i in @@ -919,10 +922,20 @@ module Make (Abstract: Abstractions.Eva) = struct in (* For each integer of the ival, build a new state *) begin try - Ival.fold_int build ival [] - with Abstract_interp.Error_Top -> - fail "too many values to partition by value on" + Ival.fold_int build ival [] + with Abstract_interp.Error_Top -> + fail ~exp "too many values to partition by value on" end + + let eval_exp_to_int state exp = + let _valuation, ival = evaluate_exp_to_ival state exp in + try + Integer.to_int (Ival.project_int ival) + with + | Ival.Not_Singleton_Int -> + fail ~exp "this partitioning parameter must evaluate to a singleton" + | Failure _ -> + fail ~exp "this partitioning parameter is too big" end diff --git a/src/plugins/value/engine/transfer_stmt.mli b/src/plugins/value/engine/transfer_stmt.mli index 7d8cee112e8..a38ed7e37d6 100644 --- a/src/plugins/value/engine/transfer_stmt.mli +++ b/src/plugins/value/engine/transfer_stmt.mli @@ -51,10 +51,10 @@ module type S = sig val enter_scope: kernel_function -> varinfo list -> state -> state - exception Cant_split + exception Operation_failed val split_by_value: state -> exp -> (Integer.t * state) list - + val eval_exp_to_int: state -> exp -> int type call_result = { states: state list or_bottom; diff --git a/src/plugins/value/utils/partitioning_annots.ml b/src/plugins/value/utils/partitioning_annots.ml index 55908660a05..bd43b3a7eb1 100644 --- a/src/plugins/value/utils/partitioning_annots.ml +++ b/src/plugins/value/utils/partitioning_annots.ml @@ -30,7 +30,7 @@ type slevel_annotation = | SlevelDefault | SlevelLocal of int -type unroll_annotation = term +type unroll_annotation = term option type flow_annotation = | FlowSplit of term @@ -110,12 +110,12 @@ module Slevel = Register (struct let import = function | Ext_terms [{term_node}] -> begin match term_node with - | TConst (LStr "default") -> SlevelDefault - | TConst (LStr "merge") -> SlevelMerge - | TConst (Integer (i, _)) -> SlevelLocal (Integer.to_int i) - | _ -> SlevelDefault (* be kind. Someone is bound to write a visitor that - will simplify our term into something - unrecognizable... *) + | TConst (LStr "default") -> SlevelDefault + | TConst (LStr "merge") -> SlevelMerge + | TConst (Integer (i, _)) -> SlevelLocal (Integer.to_int i) + | _ -> SlevelDefault (* be kind. Someone is bound to write a visitor that + will simplify our term into something + unrecognizable... *) end | _ -> assert false @@ -145,8 +145,29 @@ struct let print = Printer.pp_term end +module OptionalTermAnnotation = +struct + type t = term option + + let parse ~typing_context = function + | [] -> None + | [t] -> + let open Logic_typing in + Some (typing_context.type_term typing_context typing_context.pre_state t) + | _ -> raise Parse_error + + let export t = + Ext_terms (Extlib.list_of_opt t) + + let import = function + | Ext_terms l -> Extlib.opt_of_list l + | _ -> assert false + + let print = Pretty_utils.pp_opt Printer.pp_term +end + module Unroll = Register (struct - include SimpleTermAnnotation + include OptionalTermAnnotation let name = "unroll" let is_loop_annot = true end) diff --git a/src/plugins/value/utils/partitioning_annots.mli b/src/plugins/value/utils/partitioning_annots.mli index 264cd94a5f0..692a62221ec 100644 --- a/src/plugins/value/utils/partitioning_annots.mli +++ b/src/plugins/value/utils/partitioning_annots.mli @@ -25,7 +25,7 @@ type slevel_annotation = | SlevelDefault | SlevelLocal of int -type unroll_annotation = Cil_types.term +type unroll_annotation = Cil_types.term option type flow_annotation = | FlowSplit of Cil_types.term diff --git a/src/plugins/value/value_parameters.ml b/src/plugins/value/value_parameters.ml index 051104b6512..52a678fad49 100644 --- a/src/plugins/value/value_parameters.ml +++ b/src/plugins/value/value_parameters.ml @@ -714,17 +714,31 @@ module MinLoopUnroll = let () = add_precision_dep MinLoopUnroll.parameter let () = MinLoopUnroll.set_range 0 max_int +let () = Parameter_customize.set_group precision_tuning +module DefaultLoopUnroll = + Int + (struct + let option_name = "-eva-default-loop-unrolling" + let arg_name = "n" + let default = 100 + let help = + "defines the default limit for loop unrolling annotations which does\ + not explicitely provide a limit." + end) +let () = add_precision_dep DefaultLoopUnroll.parameter +let () = DefaultLoopUnroll.set_range 0 max_int + let () = Parameter_customize.set_group precision_tuning module HistoryPartitioning = Int (struct - let option_name = "-eva-partition-history" - let arg_name = "n" - let default = 0 - let help = - "keep states distincts as long as the <n> last branching in their\ - traces are also distinct. (A value of 0 deactivate this feature)" - end) + let option_name = "-eva-partition-history" + let arg_name = "n" + let default = 0 + let help = + "keep states distincts as long as the <n> last branching in their\ + traces are also distinct. (A value of 0 deactivate this feature)" + end) let () = add_precision_dep HistoryPartitioning.parameter let () = HistoryPartitioning.set_range 0 max_int diff --git a/src/plugins/value/value_parameters.mli b/src/plugins/value/value_parameters.mli index c6891422da3..8a25f756cad 100644 --- a/src/plugins/value/value_parameters.mli +++ b/src/plugins/value/value_parameters.mli @@ -85,6 +85,7 @@ module SlevelFunction: module SlevelMergeAfterLoop: Parameter_sig.Kernel_function_set module MinLoopUnroll : Parameter_sig.Int +module DefaultLoopUnroll : Parameter_sig.Int module HistoryPartitioning : Parameter_sig.Int module ValuePartitioning : Parameter_sig.String_set diff --git a/tests/value/oracle/partitioning-annots.0.res.oracle b/tests/value/oracle/partitioning-annots.0.res.oracle index 75f64a73b09..a94f8e71bdc 100644 --- a/tests/value/oracle/partitioning-annots.0.res.oracle +++ b/tests/value/oracle/partitioning-annots.0.res.oracle @@ -4,15 +4,28 @@ [eva] Initial state computed [eva:initial-state] Values of globals at initialization k ∈ {0} -[eva] tests/value/partitioning-annots.c:25: starting to merge loop iterations -[eva] tests/value/partitioning-annots.c:33: starting to merge loop iterations -[eva] tests/value/partitioning-annots.c:35: starting to merge loop iterations +[eva] tests/value/partitioning-annots.c:26: starting to merge loop iterations +[eva] tests/value/partitioning-annots.c:34: starting to merge loop iterations +[eva] tests/value/partitioning-annots.c:36: starting to merge loop iterations +[eva] tests/value/partitioning-annots.c:50: starting to merge loop iterations [eva] Recording results for test_unroll [eva] done for function test_unroll [eva] ====== VALUES COMPUTED ====== [eva:final-states] Values at end of function test_unroll: a[0..9] ∈ {42} b[0..9] ∈ {42} + c[0..9] ∈ {0} + d[0..9] ∈ {0} + [10..19] ∈ {0} or UNINITIALIZED + e[0] ∈ {1} + [1] ∈ {9} + [2] ∈ {36} + [3] ∈ {84} + [4..5] ∈ {126} + [6] ∈ {84} + [7] ∈ {36} + [8] ∈ {9} + [9] ∈ {1} [from] Computing for function test_unroll [from] Done for function test_unroll [from] ====== DEPENDENCIES COMPUTED ====== @@ -21,6 +34,7 @@ NO EFFECTS [from] ====== END OF DEPENDENCIES ====== [inout] Out (internal) for function test_unroll: - a[0..9]; b[0..9]; i; j; i_0; j_0 + a[0..9]; b[0..9]; c[0..9]; d[0..19]; e[0..9]; i; j; i_0; j_0; i_1; + i_2; i_3; j_1 [inout] Inputs for function test_unroll: \nothing diff --git a/tests/value/oracle/partitioning-annots.1.res.oracle b/tests/value/oracle/partitioning-annots.1.res.oracle index 8778196f4ad..7b572572277 100644 --- a/tests/value/oracle/partitioning-annots.1.res.oracle +++ b/tests/value/oracle/partitioning-annots.1.res.oracle @@ -5,41 +5,41 @@ [eva:initial-state] Values of globals at initialization k ∈ {0} [eva] computing for function Frama_C_interval <- test_split. - Called from tests/value/partitioning-annots.c:47. + Called from tests/value/partitioning-annots.c:69. [eva] using specification for function Frama_C_interval -[eva] tests/value/partitioning-annots.c:47: +[eva] tests/value/partitioning-annots.c:69: function Frama_C_interval: precondition 'order' got status valid. [eva] Done for function Frama_C_interval [eva] computing for function Frama_C_interval <- test_split. - Called from tests/value/partitioning-annots.c:48. -[eva] tests/value/partitioning-annots.c:48: + Called from tests/value/partitioning-annots.c:70. +[eva] tests/value/partitioning-annots.c:70: function Frama_C_interval: precondition 'order' got status valid. [eva] Done for function Frama_C_interval -[eva] tests/value/partitioning-annots.c:54: +[eva] tests/value/partitioning-annots.c:76: Frama_C_show_each_before_first_split: {0; 1}, {0; 1; 2}, {0} -[eva] tests/value/partitioning-annots.c:57: +[eva] tests/value/partitioning-annots.c:79: Frama_C_show_each_before_second_split: {0}, {0; 1; 2}, {0} -[eva] tests/value/partitioning-annots.c:57: +[eva] tests/value/partitioning-annots.c:79: Frama_C_show_each_before_second_split: {1}, {0; 1; 2}, {1} -[eva] tests/value/partitioning-annots.c:59: +[eva] tests/value/partitioning-annots.c:81: Frama_C_show_each_before_first_merge: {0}, {0}, {0} -[eva] tests/value/partitioning-annots.c:59: +[eva] tests/value/partitioning-annots.c:81: Frama_C_show_each_before_first_merge: {0}, {1}, {0} -[eva] tests/value/partitioning-annots.c:59: +[eva] tests/value/partitioning-annots.c:81: Frama_C_show_each_before_first_merge: {0}, {2}, {0} -[eva] tests/value/partitioning-annots.c:59: +[eva] tests/value/partitioning-annots.c:81: Frama_C_show_each_before_first_merge: {1}, {0}, {1} -[eva] tests/value/partitioning-annots.c:59: +[eva] tests/value/partitioning-annots.c:81: Frama_C_show_each_before_first_merge: {1}, {1}, {1} -[eva] tests/value/partitioning-annots.c:59: +[eva] tests/value/partitioning-annots.c:81: Frama_C_show_each_before_first_merge: {1}, {2}, {1} -[eva] tests/value/partitioning-annots.c:61: +[eva] tests/value/partitioning-annots.c:83: Frama_C_show_each_before_second_merge: {0; 1}, {0}, {0; 1} -[eva] tests/value/partitioning-annots.c:61: +[eva] tests/value/partitioning-annots.c:83: Frama_C_show_each_before_second_merge: {0; 1}, {1}, {0; 1} -[eva] tests/value/partitioning-annots.c:61: +[eva] tests/value/partitioning-annots.c:83: Frama_C_show_each_before_second_merge: {0; 1}, {2}, {0; 1} -[eva] tests/value/partitioning-annots.c:63: +[eva] tests/value/partitioning-annots.c:85: Frama_C_show_each_end: {0; 1}, {0; 1; 2}, {0; 1} [eva] Recording results for test_split [eva] done for function test_split diff --git a/tests/value/oracle/partitioning-annots.2.res.oracle b/tests/value/oracle/partitioning-annots.2.res.oracle index c41cff4e899..d4afe5dd536 100644 --- a/tests/value/oracle/partitioning-annots.2.res.oracle +++ b/tests/value/oracle/partitioning-annots.2.res.oracle @@ -5,49 +5,49 @@ [eva:initial-state] Values of globals at initialization k ∈ {0} [eva] computing for function Frama_C_interval <- test_split. - Called from tests/value/partitioning-annots.c:47. + Called from tests/value/partitioning-annots.c:69. [eva] using specification for function Frama_C_interval -[eva] tests/value/partitioning-annots.c:47: +[eva] tests/value/partitioning-annots.c:69: function Frama_C_interval: precondition 'order' got status valid. [eva] Done for function Frama_C_interval [eva] computing for function Frama_C_interval <- test_split. - Called from tests/value/partitioning-annots.c:48. -[eva] tests/value/partitioning-annots.c:48: + Called from tests/value/partitioning-annots.c:70. +[eva] tests/value/partitioning-annots.c:70: function Frama_C_interval: precondition 'order' got status valid. [eva] Done for function Frama_C_interval -[eva] tests/value/partitioning-annots.c:54: +[eva] tests/value/partitioning-annots.c:76: Frama_C_show_each_before_first_split: {0; 1}, {0; 1; 2}, {0} -[eva] tests/value/partitioning-annots.c:57: +[eva] tests/value/partitioning-annots.c:79: Frama_C_show_each_before_second_split: {0}, {0; 1; 2}, {0} -[eva] tests/value/partitioning-annots.c:57: +[eva] tests/value/partitioning-annots.c:79: Frama_C_show_each_before_second_split: {1}, {0; 1; 2}, {1} -[eva] tests/value/partitioning-annots.c:59: +[eva] tests/value/partitioning-annots.c:81: Frama_C_show_each_before_first_merge: {0}, {0}, {0} -[eva] tests/value/partitioning-annots.c:59: +[eva] tests/value/partitioning-annots.c:81: Frama_C_show_each_before_first_merge: {0}, {1}, {0} -[eva] tests/value/partitioning-annots.c:59: +[eva] tests/value/partitioning-annots.c:81: Frama_C_show_each_before_first_merge: {0}, {2}, {0} -[eva] tests/value/partitioning-annots.c:59: +[eva] tests/value/partitioning-annots.c:81: Frama_C_show_each_before_first_merge: {1}, {0}, {1} -[eva] tests/value/partitioning-annots.c:59: +[eva] tests/value/partitioning-annots.c:81: Frama_C_show_each_before_first_merge: {1}, {1}, {1} -[eva] tests/value/partitioning-annots.c:59: +[eva] tests/value/partitioning-annots.c:81: Frama_C_show_each_before_first_merge: {1}, {2}, {1} -[eva] tests/value/partitioning-annots.c:61: +[eva] tests/value/partitioning-annots.c:83: Frama_C_show_each_before_second_merge: {0}, {0}, {0} -[eva] tests/value/partitioning-annots.c:61: +[eva] tests/value/partitioning-annots.c:83: Frama_C_show_each_before_second_merge: {1}, {0}, {1} -[eva] tests/value/partitioning-annots.c:61: +[eva] tests/value/partitioning-annots.c:83: Frama_C_show_each_before_second_merge: {0}, {1}, {0} -[eva] tests/value/partitioning-annots.c:61: +[eva] tests/value/partitioning-annots.c:83: Frama_C_show_each_before_second_merge: {1}, {1}, {1} -[eva] tests/value/partitioning-annots.c:61: +[eva] tests/value/partitioning-annots.c:83: Frama_C_show_each_before_second_merge: {0}, {2}, {0} -[eva] tests/value/partitioning-annots.c:61: +[eva] tests/value/partitioning-annots.c:83: Frama_C_show_each_before_second_merge: {1}, {2}, {1} -[eva] tests/value/partitioning-annots.c:63: +[eva] tests/value/partitioning-annots.c:85: Frama_C_show_each_end: {0}, {0; 1; 2}, {0} -[eva] tests/value/partitioning-annots.c:63: +[eva] tests/value/partitioning-annots.c:85: Frama_C_show_each_end: {1}, {0; 1; 2}, {1} [eva] Recording results for test_split [eva] done for function test_split diff --git a/tests/value/oracle/partitioning-annots.3.res.oracle b/tests/value/oracle/partitioning-annots.3.res.oracle index 276bbc7d393..f8931c63442 100644 --- a/tests/value/oracle/partitioning-annots.3.res.oracle +++ b/tests/value/oracle/partitioning-annots.3.res.oracle @@ -5,41 +5,41 @@ [eva:initial-state] Values of globals at initialization k ∈ {0} [eva] computing for function Frama_C_interval <- test_loop_split. - Called from tests/value/partitioning-annots.c:81. + Called from tests/value/partitioning-annots.c:103. [eva] using specification for function Frama_C_interval -[eva] tests/value/partitioning-annots.c:81: +[eva] tests/value/partitioning-annots.c:103: function Frama_C_interval: precondition 'order' got status valid. [eva] Done for function Frama_C_interval [eva] computing for function Frama_C_interval <- test_loop_split. - Called from tests/value/partitioning-annots.c:81. + Called from tests/value/partitioning-annots.c:103. [eva] Done for function Frama_C_interval -[eva] tests/value/partitioning-annots.c:79: starting to merge loop iterations +[eva] tests/value/partitioning-annots.c:101: starting to merge loop iterations [eva] computing for function Frama_C_interval <- test_loop_split. - Called from tests/value/partitioning-annots.c:81. + Called from tests/value/partitioning-annots.c:103. [eva] Done for function Frama_C_interval [eva] computing for function Frama_C_interval <- test_loop_split. - Called from tests/value/partitioning-annots.c:81. + Called from tests/value/partitioning-annots.c:103. [eva] Done for function Frama_C_interval [eva] computing for function Frama_C_interval <- test_loop_split. - Called from tests/value/partitioning-annots.c:81. + Called from tests/value/partitioning-annots.c:103. [eva] Done for function Frama_C_interval [eva] computing for function Frama_C_interval <- test_loop_split. - Called from tests/value/partitioning-annots.c:81. + Called from tests/value/partitioning-annots.c:103. [eva] Done for function Frama_C_interval -[eva:alarm] tests/value/partitioning-annots.c:88: Warning: +[eva:alarm] tests/value/partitioning-annots.c:110: Warning: accessing uninitialized left-value. assert \initialized(&A[i]); -[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {0}, {42} -[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {1}, {42} -[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {2}, {42} -[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {3}, {42} -[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {4}, {42} -[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {5}, {42} -[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {6}, {42} -[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {7}, {42} -[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {8}, {42} -[eva] tests/value/partitioning-annots.c:93: Frama_C_show_each: {9}, {42} -[eva] tests/value/partitioning-annots.c:94: assertion got status valid. -[eva] tests/value/partitioning-annots.c:97: +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {0}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {1}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {2}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {3}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {4}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {5}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {6}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {7}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {8}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {9}, {42} +[eva] tests/value/partitioning-annots.c:116: assertion got status valid. +[eva] tests/value/partitioning-annots.c:119: Frama_C_show_each: {{ "Value 42 not found" }} [eva] Recording results for test_loop_split [eva] done for function test_loop_split diff --git a/tests/value/oracle/partitioning-annots.4.res.oracle b/tests/value/oracle/partitioning-annots.4.res.oracle index a2c98fb07a7..81e33a3bd19 100644 --- a/tests/value/oracle/partitioning-annots.4.res.oracle +++ b/tests/value/oracle/partitioning-annots.4.res.oracle @@ -5,13 +5,13 @@ [eva:initial-state] Values of globals at initialization k ∈ {0} [eva] computing for function Frama_C_interval <- test_history. - Called from tests/value/partitioning-annots.c:103. + Called from tests/value/partitioning-annots.c:125. [eva] using specification for function Frama_C_interval -[eva] tests/value/partitioning-annots.c:103: +[eva] tests/value/partitioning-annots.c:125: function Frama_C_interval: precondition 'order' got status valid. [eva] Done for function Frama_C_interval -[eva] tests/value/partitioning-annots.c:109: Frama_C_show_each: {0; 1}, {0; 1} -[eva:alarm] tests/value/partitioning-annots.c:112: Warning: +[eva] tests/value/partitioning-annots.c:131: Frama_C_show_each: {0; 1}, {0; 1} +[eva:alarm] tests/value/partitioning-annots.c:134: Warning: division by zero. assert j ≢ 0; [eva] Recording results for test_history [eva] done for function test_history diff --git a/tests/value/oracle/partitioning-annots.5.res.oracle b/tests/value/oracle/partitioning-annots.5.res.oracle index d0d38833a46..d9d5c942746 100644 --- a/tests/value/oracle/partitioning-annots.5.res.oracle +++ b/tests/value/oracle/partitioning-annots.5.res.oracle @@ -5,13 +5,13 @@ [eva:initial-state] Values of globals at initialization k ∈ {0} [eva] computing for function Frama_C_interval <- test_history. - Called from tests/value/partitioning-annots.c:103. + Called from tests/value/partitioning-annots.c:125. [eva] using specification for function Frama_C_interval -[eva] tests/value/partitioning-annots.c:103: +[eva] tests/value/partitioning-annots.c:125: function Frama_C_interval: precondition 'order' got status valid. [eva] Done for function Frama_C_interval -[eva] tests/value/partitioning-annots.c:109: Frama_C_show_each: {1}, {1} -[eva] tests/value/partitioning-annots.c:109: Frama_C_show_each: {0}, {0} +[eva] tests/value/partitioning-annots.c:131: Frama_C_show_each: {1}, {1} +[eva] tests/value/partitioning-annots.c:131: Frama_C_show_each: {0}, {0} [eva] Recording results for test_history [eva] done for function test_history [eva] ====== VALUES COMPUTED ====== diff --git a/tests/value/partitioning-annots.c b/tests/value/partitioning-annots.c index 0e22c9b32f0..5d6c7d3f98b 100644 --- a/tests/value/partitioning-annots.c +++ b/tests/value/partitioning-annots.c @@ -1,6 +1,6 @@ /* run.config* GCC: - STDOPT: #"-main test_unroll" + STDOPT: #"-main test_unroll -eva-default-loop-unrolling 10" STDOPT: #"-main test_split" STDOPT: +"-main test_split -eva-partition-value k" STDOPT: #"-main test_loop_split -eva-partition-history 1" @@ -12,9 +12,10 @@ #define N 10 + void test_unroll() { - int a[N], b[N]; + int a[N], b[N], c[N], d[2*N], e[N]; // The inner loop needs to be unrolled to allow strong updates // The outer loops doesn't need to be unrolled @@ -38,6 +39,27 @@ void test_unroll() } // At the end, we must have both arrays a and b to be fully initialized at 42 + + // Small loops can be unrolled without giving an unroll parameter + //@ loop unroll N; + for (int i = 0 ; i < N ; i++) + c[i] = 0; + + // Longer loops won't be completely unrolled when not giving a parameter + //@ loop unroll N; + for (int i = 0 ; i < 2*N ; i++) + d[i] = 0; + + // Variable unroll limits can be specified as long as they evaluate as + // a singleton in each state + //@ loop unroll N; + for (int i = 0 ; i < N ; i++) { + e[i] = 1; + //@ loop unroll i-1; + for (int j = i - 1 ; j > 0 ; j--) { + e[j] += e[j-1]; + } + } } int k; -- GitLab From b6cf5ea4ee5d2a3205eb725a5a2f564baf77c097 Mon Sep 17 00:00:00 2001 From: Valentin Perrelle <valentin.perrelle@cea.fr> Date: Fri, 19 Oct 2018 15:46:12 +0200 Subject: [PATCH 228/376] [Eva] Uniformize transfer functions and use association list instead of maps for flow --- src/kernel_services/abstract_interp/bottom.ml | 5 + .../abstract_interp/bottom.mli | 1 + src/plugins/value/engine/partition.ml | 278 +++++++-------- src/plugins/value/engine/partition.mli | 65 ++-- .../value/engine/partitioned_dataflow.ml | 325 +++++++++--------- .../value/engine/state_partitioning.mli | 66 ++-- .../value/engine/trace_partitioning.ml | 188 ++++++---- 7 files changed, 498 insertions(+), 430 deletions(-) diff --git a/src/kernel_services/abstract_interp/bottom.ml b/src/kernel_services/abstract_interp/bottom.ml index c6ae61d80ae..def68537529 100644 --- a/src/kernel_services/abstract_interp/bottom.ml +++ b/src/kernel_services/abstract_interp/bottom.ml @@ -134,6 +134,11 @@ let to_list = function | `Bottom -> [] | `Value v -> [v] +let of_list = function + | [] -> `Bottom + | [v] -> `Value v + | _ -> assert false + let bot_of_list = function | [] -> `Bottom | l -> `Value l diff --git a/src/kernel_services/abstract_interp/bottom.mli b/src/kernel_services/abstract_interp/bottom.mli index 7fca1504bf3..8c5a6ab97ce 100644 --- a/src/kernel_services/abstract_interp/bottom.mli +++ b/src/kernel_services/abstract_interp/bottom.mli @@ -69,6 +69,7 @@ module Bound_Lattice (** Conversion functions. *) val to_list: 'a or_bottom -> 'a list +val of_list: 'a list -> 'a or_bottom val bot_of_list: 'a list -> 'a list or_bottom val list_of_bot: 'a list or_bottom -> 'a list val all: 'a or_bottom list -> 'a list diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index 54a03072c68..cc63597feab 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -20,25 +20,50 @@ (* *) (**************************************************************************) -(* Utility function on options *) -let opt_flatten (type a) (o : a option option) : a option = - Extlib.opt_conv None o - module ExpMap = Cil_datatype.ExpStructEq.Map -module LoopList = Datatype.List (Datatype.Pair (Datatype.Int) (Datatype.Int)) +module IntPair = Datatype.Pair (Datatype.Int) (Datatype.Int) +module LoopList = Datatype.List (IntPair) module BranchList = Datatype.List (Datatype.Int) type branch = int type key = { - ration_stamp : int option; - transfer_stamp : int option; + ration_stamp : (int * int) option; branches : branch list; loops : (int * int) list; static_split : Integer.t ExpMap.t; dynamic_split : Integer.t ExpMap.t; } +let zero_key : key = { + ration_stamp = None; + branches = []; + loops = []; + static_split = ExpMap.empty; + dynamic_split = ExpMap.empty; +} + +let pretty_key fmt key = + begin match key.ration_stamp with + | Some (n,_) -> Format.fprintf fmt "#%d" n + | None -> () + end; + Pretty_utils.pp_list ~pre:"[@[" ~sep:" ;@ " ~suf:"@]]" + Format.pp_print_int + fmt + key.branches; + Pretty_utils.pp_list ~pre:"(@[" ~sep:" ;@ " ~suf:"@])" + (fun fmt (i,_j) -> Format.pp_print_int fmt i) + fmt + key.loops; + Pretty_utils.pp_list ~pre:"{@[" ~sep:" ;@ " ~suf:"@]}" + (fun fmt (e,i) -> Format.fprintf fmt "%a:%a" + Cil_printer.pp_exp e + (Integer.pretty ~hexa:false) i) + fmt + (ExpMap.bindings key.static_split @ ExpMap.bindings key.dynamic_split) + + module Key = struct type t = key @@ -47,8 +72,7 @@ struct let (<?>) c (cmp,x,y) = if c = 0 then cmp x y else c in - Extlib.opt_compare (-) k1.ration_stamp k2.ration_stamp - <?> (Extlib.opt_compare (-), k1.transfer_stamp, k2.transfer_stamp) + Extlib.opt_compare IntPair.compare k1.ration_stamp k2.ration_stamp <?> (LoopList.compare, k1.loops, k2.loops) <?> (ExpMap.compare Integer.compare, k1.static_split, k2.static_split) <?> (ExpMap.compare Integer.compare, k1.dynamic_split, k2.dynamic_split) @@ -61,20 +85,6 @@ module KMap = Map.Make (Key) type 'a partition = 'a KMap.t type 'a transfer_function = (key * 'a) list -> (key * 'a) list -let stamp_after_transfer k = function - | [x] -> [(k,x)] - | l -> - let t = ref 0 in - let add acc x = - let k' = { k with transfer_stamp = Some !t } in - incr t; - (k',x) :: acc - in - List.fold_left add [] l - -let update_after_call k l = - List.map (fun x -> k,x) l - type unroll_limit = | ExpLimit of Cil_types.exp | IntLimit of int @@ -85,8 +95,7 @@ type action = | Incr_loop | Branch of branch * int | Ration of int - | Ration_merge of int option - | Transfer_merge + | Ration_merge of (int*int) option | Static_split of Cil_types.exp | Dynamic_split of Cil_types.exp | Static_merge of Cil_types.exp @@ -108,46 +117,82 @@ sig end -module Make (Domain : InputDomain) = +let empty : 'a partition = + KMap.empty + +let is_empty (p : 'a partition) : bool = + KMap.is_empty p + +let size (p : 'a partition) : int = + KMap.fold (fun _k _x n -> n + 1) p 0 + +let to_list (p : 'a partition) : 'a list = + KMap.fold (fun _k x l -> x :: l) p [] + +let find = KMap.find +let replace = KMap.add + +let merge (f : 'a option -> 'b option -> 'c option) (p1 : 'a partition) + (p2 : 'b partition) : 'c partition = + KMap.merge (fun _k o1 o2 -> f o1 o2) p1 p2 + +let iter (f : 'a -> unit) (p : 'a partition) : unit = + KMap.iter (fun _k x -> f x) p + +let iteri (f : key -> 'a -> unit) (p : 'a partition) : unit = + KMap.iter f p + + +(* Utility function on options *) +let opt_flatten (type a) (o : a option option) : a option = + Extlib.opt_conv None o + +let map_states (f : 'a -> 'a) (p : 'a partition) : 'a partition = + KMap.map f p + +let filter_keys (f : key -> bool) (p : 'a partition) : 'a partition = + KMap.filter (fun k _x -> f k) p + +let map_filter (f : key -> 'a -> 'b option) (p : 'a partition) : 'b partition = + KMap.merge (fun k o _ -> opt_flatten (Extlib.opt_map (f k) o)) p KMap.empty + + +module MakeFlow (Domain : InputDomain) = struct - type t = Domain.t partition type state = Domain.t + type t = (key * state) list - let empty : 'a partition = - KMap.empty - - let empty_key : key = { - ration_stamp = None; - transfer_stamp = None; - branches = []; - loops = []; - static_split = ExpMap.empty; - dynamic_split = ExpMap.empty; - } - - let is_empty (p : 'a partition) : bool = - KMap.is_empty p - - let initial (l : 'a list) : 'a partition = - let stamp = ref 0 in - let add p state = - let k = { empty_key with ration_stamp = Some !stamp } in - incr stamp; - KMap.add k state p - in - List.fold_left add KMap.empty l - - let add (p : t) (k : key) (x : state) : t = - (* Join states with the same key *) - let x = - try - Domain.join (KMap.find k p) x - with Not_found -> x + let empty = [] + + let initial (p : 'a list) : t = + List.map (fun state -> zero_key, state) p + + let to_list (f : t) : state list = + List.map snd f + + let of_partition (p : state partition) : t = + KMap.fold (fun k x l -> (k,x) :: l) p [] + + let to_partition (p : t) : state partition = + let add p (k,x) = + (* Join states with the same key *) + let x' = + try + Domain.join (KMap.find k p) x + with Not_found -> x + in + KMap.add k x' p in - KMap.add k x p + List.fold_left add KMap.empty p - let add_list (p : t) (l : (key * state) list) : t = - List.fold_left (fun p (k,x) -> add p k x) p l + let is_empty (p : t) = + p = [] + + let size (p : t) = + List.length p + + let union (p1 : t) (p2 : t) : t = + p1 @ p2 let split_state ~(static : bool) (exp : Cil_types.exp) (key : key) (state : state) : (key * state) list = @@ -166,32 +211,29 @@ struct [(key,state)] let split ~(static : bool) (p : t) (exp : Cil_types.exp) = - let add_split key state p = - add_list p (split_state ~static exp key state) + let add_split acc (key,state) = + split_state ~static exp key state @ acc in - KMap.fold add_split p KMap.empty + List.fold_left add_split [] p let update_dynamic_splits p = (* Update one state *) - let update_state key state p = + let update_state acc (key,state) = (* Split the states in the list l for the given exp *) let update_exp exp _ l = let static = false in - List.fold_left (fun l (k,s) -> split_state ~static exp k s @ l) [] l + List.fold_left (fun l (k,x) -> split_state ~static exp k x @ l) [] l in (* Foreach exp in original state: split *) - let l = ExpMap.fold update_exp key.dynamic_split [(key,state)] in - add_list p l + ExpMap.fold update_exp key.dynamic_split [(key,state)] @ acc in - KMap.fold update_state p KMap.empty + List.fold_left update_state [] p - let map_keys (f : key -> state -> key) (p : t) = - KMap.fold (fun k x acc -> add acc (f k x) x) p empty + let map_keys (f : key -> state -> key) (p : t) : t = + List.map (fun (k,x) -> f k x, x) p let transfer (f : state transfer_function) (p : t) : t = - let l = KMap.fold (fun k x l -> (k,x) :: l) p [] in - let l' = f l in - add_list empty (l') + f p let transfer_keys p = function | Static_split exp -> @@ -252,16 +294,13 @@ struct | Ration (min) -> let r = ref min in fun k _x -> - let ration_stamp = Some !r in + let ration_stamp = Some (!r, 0) in incr r; { k with ration_stamp } - | Ration_merge ration_stamp -> fun k _x -> + | Ration_merge ration_stamp -> fun k _x -> { k with ration_stamp } - | Transfer_merge -> fun k _x -> - { k with transfer_stamp = None } - | Static_merge exp -> fun k _x -> { k with static_split = ExpMap.remove exp k.static_split } @@ -270,22 +309,27 @@ struct in map_keys transfer p - let map_states (f : 'a -> 'a) (p : 'a partition) : 'a partition = - KMap.map f p - - let transfer_states (f : 'a -> 'a list) (p : 'a partition) : 'a partition = - let transfer_one k x p = - let l = stamp_after_transfer k (f x) in - List.fold_left (fun p (k,x) -> KMap.add k x p) p l + let transfer_states (f : state -> state list) (p : t) : t = + let n = ref 0 in + let transfer acc (k,x) = + let add = + match k.ration_stamp with + (* No ration stam, just add the state to the list *) + | None -> fun l y -> (k,y) :: l + (* There is a ration stamp, set the second part of the stamp to a unique transfer number *) + | Some (s,_) -> fun l y -> + let k' = { k with ration_stamp = Some (s, !n) } in + incr n; + (k',y) :: l + in + List.fold_left add acc (f x) in - KMap.fold transfer_one p KMap.empty + List.fold_left transfer [] p - (* - let legacy_transfer_states (f : 'a list -> 'a list) (p : 'a partition) - : 'a partition = + let legacy_transfer_states (f : state list -> state list) (p : t) : t = (* Group the states in buckets, where each bucket is a list of states with the same key except for the ration stamp *) - let fill_buckets k x buckets = + let fill_buckets buckets (k,x) = (* Ignore the ration stamp *) let k = { k with ration_stamp = None } in (* Find the bucket *) @@ -296,55 +340,15 @@ struct (* Add the state to the bucket *) KMap.add k (x :: contents) buckets in - let buckets = KMap.fold fill_buckets p KMap.empty in + let buckets = List.fold_left fill_buckets KMap.empty p in (* Apply the transfer function to each bucket *) let result = KMap.map f buckets in - (* Rebuild a partition by rationing out all the states *) - let r = ref 0 in - let ration_bucket k bucket acc = - let ration_one acc x = - let k' = { k with ration_stamp = Some !r } in - incr r; - KMap.add k' x acc - in - List.fold_left ration_one acc bucket - in - KMap.fold ration_bucket result KMap.empty *) - - let find = KMap.find - let replace = KMap.add - - let to_list (p : 'a partition) : 'a list = - KMap.fold (fun _k x l -> x :: l) p [] - - let size (p : 'a partition) : int = - KMap.fold (fun _k _x n -> n + 1) p 0 - - - let merge (f : 'a option -> 'b option -> 'c option) (p1 : 'a partition) - (p2 : 'b partition) : 'c partition = - KMap.merge (fun _k o1 o2 -> f o1 o2) p1 p2 - - (* Almost like Map.union of Ocaml 4.03.0 *) - let union (f : 'a -> 'a -> 'a) (p1 : 'a partition) - (p2 : 'a partition) : 'a partition = - let g _k o1 o2 = - match o1 with - | None -> o2 - | Some x1 -> - match o2 with - | None -> o1 - | Some x2 -> Some (f x1 x2) + (* Rebuild the flow *) + let add_bucket k bucket acc = + List.map (fun x -> k,x) bucket @ acc in - KMap.merge g p1 p2 - - let iter (f : 'a -> unit) (p : 'a partition) : unit = - KMap.iter (fun _k x -> f x) p - - let filter_keys (f : key -> bool) (p : 'a partition) : 'a partition = - KMap.filter (fun k _x -> f k) p + KMap.fold add_bucket result [] - let map_filter (f : key -> 'a -> 'b option) (p : 'a partition) - : 'b partition = - KMap.merge (fun k o _ -> opt_flatten (Extlib.opt_map (f k) o)) p KMap.empty + let iter (f : state -> unit) (p : t) : unit = + List.iter (fun (_k,x) -> f x) p end diff --git a/src/plugins/value/engine/partition.mli b/src/plugins/value/engine/partition.mli index ee417755012..c817ca18685 100644 --- a/src/plugins/value/engine/partition.mli +++ b/src/plugins/value/engine/partition.mli @@ -55,20 +55,19 @@ type branch = int module ExpMap = Cil_datatype.ExpStructEq.Map type key = private { - ration_stamp : int option; - transfer_stamp : int option; + ration_stamp : (int * int) option; branches : branch list; loops : (int * int) list; static_split : Integer.t ExpMap.t; dynamic_split : Integer.t ExpMap.t; } +val pretty_key : Format.formatter -> key -> unit + + type 'a partition type 'a transfer_function = (key * 'a) list -> (key * 'a) list -val stamp_after_transfer : key -> 'a list -> (key * 'a) list -val update_after_call : key -> 'a list -> (key * 'a) list - type unroll_limit = | ExpLimit of Cil_types.exp | IntLimit of int @@ -79,8 +78,7 @@ type action = | Incr_loop | Branch of branch * int (* branch taken, max branches in history *) | Ration of int (* starting ration stamp *) - | Ration_merge of int option (* new ration stamp for the merge state *) - | Transfer_merge + | Ration_merge of (int * int) option (* new ration stamp for the merge state *) | Static_split of Cil_types.exp | Dynamic_split of Cil_types.exp | Static_merge of Cil_types.exp @@ -90,6 +88,25 @@ type action = exception InvalidAction +val empty : 'a partition +val is_empty : 'a partition -> bool +val size : 'a partition -> int + +val to_list : 'a partition -> 'a list + +val find : key -> 'a partition -> 'a +val replace : key -> 'a -> 'a partition -> 'a partition + +val merge : ('a option -> 'b option -> 'c option) -> 'a partition -> + 'b partition -> 'c partition + +val iter : ('a -> unit) -> 'a partition -> unit +val iteri : (key -> 'a -> unit) -> 'a partition -> unit +val filter_keys : (key -> bool) -> 'a partition -> 'a partition +val map_states : ('a -> 'a) -> 'a partition -> 'a partition +val map_filter : (key -> 'a -> 'b option) -> 'a partition -> 'b partition + + module type InputDomain = sig type t @@ -101,29 +118,27 @@ sig val eval_exp_to_int : t -> Cil_types.exp -> int end - -module Make (Domain : InputDomain) : +module MakeFlow (Domain : InputDomain) : sig - type t = Domain.t partition type state = Domain.t + type t - val empty : 'a partition - val is_empty : 'a partition -> bool - val initial : 'a list -> 'a partition - val size : 'a partition -> int - val to_list : 'a partition -> 'a list + val empty : t - val find : key -> 'a partition -> 'a - val replace : key -> 'a -> 'a partition -> 'a partition - val merge : ('a option -> 'b option -> 'c option) -> 'a partition - -> 'b partition -> 'c partition - val union : ('a -> 'a -> 'a) -> 'a partition -> 'a partition -> 'a partition + val initial : state list -> t + val to_list : t -> state list + val of_partition : state partition -> t + val to_partition : t -> state partition + + val is_empty : t -> bool + val size : t -> int + + val union : t -> t -> t - val iter : ('a -> unit) -> 'a partition -> unit val transfer : state transfer_function -> t -> t val transfer_keys : t -> action -> t - val filter_keys : (key -> bool) -> 'a partition -> 'a partition - val map_states : ('a -> 'a) -> 'a partition -> 'a partition - val transfer_states : ('a -> 'a list) -> 'a partition -> 'a partition - val map_filter : (key -> 'a -> 'b option) -> 'a partition -> 'b partition + val transfer_states : (state -> state list) -> t -> t + val legacy_transfer_states : (state list -> state list) -> t -> t + + val iter : (state -> unit) -> t -> unit end diff --git a/src/plugins/value/engine/partitioned_dataflow.ml b/src/plugins/value/engine/partitioned_dataflow.ml index 14ede992285..e1b461e4c09 100644 --- a/src/plugins/value/engine/partitioned_dataflow.ml +++ b/src/plugins/value/engine/partitioned_dataflow.ml @@ -100,8 +100,9 @@ module Make_Dataflow module Partition = Trace_partitioning.Make (Domain) (Transfer) (AnalysisParam) type store = Partition.store + type flow = Partition.flow + type tank = Partition.tank type widening = Partition.widening - type propagation = Partition.propagation type edge_info = { mutable fireable : bool (* Does any states survive the transition ? *) @@ -141,9 +142,10 @@ module Make_Dataflow | `Bottom -> Domain.top (* No analysis in this case. *) | `Value state -> state - let initial_propagation = - -1, (* dummy edge identifier *) - Partition.initial_propagation (States.to_list initial_states) + let initial_tank = + Partition.initial_tank (States.to_list initial_states) + let get_initial_flow () = + -1 (* Dummy edge id *), Partition.drain initial_tank let post_conditions = ref false @@ -175,7 +177,7 @@ module Make_Dataflow VertexTable.create control_point_count let w_table : widening VertexTable.t = VertexTable.create 7 - let e_table : (propagation * edge_info) EdgeTable.t = + let e_table : (tank * edge_info) EdgeTable.t = EdgeTable.create transition_count (* Default (Initial) stores on vertex and edges *) @@ -183,23 +185,18 @@ module Make_Dataflow Partition.empty_store ~stmt:v.vertex_start_of let default_vertex_widening (v : vertex) () : widening = Partition.empty_widening ~stmt:v.vertex_start_of - let default_edge_propagation () : propagation * edge_info = - Partition.empty_propagation (), { fireable = false } + let default_edge_tank () : tank * edge_info = + Partition.empty_tank (), { fireable = false } (* Get the stores associated to a control point or edge *) let get_vertex_store (v : vertex) : store = VertexTable.find_or_add v_table v ~default:(default_vertex_store v) let get_vertex_widening (v : vertex) : widening = VertexTable.find_or_add w_table v ~default:(default_vertex_widening v) - let get_edge_propagation (e : vertex edge) : propagation * edge_info = - EdgeTable.find_or_add e_table e ~default:default_edge_propagation - let get_pred_propagations (v : vertex) : ('branch * propagation) list = - let get (_,e,_) = - e.edge_key, fst (get_edge_propagation e) - in - List.map get (G.pred_e graph v) - let get_succ_propagations (v : vertex) : propagation list = - List.map (fun (_,e,_) -> fst (get_edge_propagation e)) (G.succ_e graph v) + let get_edge_data (e : vertex edge) : tank * edge_info = + EdgeTable.find_or_add e_table e ~default:default_edge_tank + let get_succ_tanks (v : vertex) : tank list = + List.map (fun (_,e,_) -> fst (get_edge_data e)) (G.succ_e graph v) module StmtTable = struct include Cil_datatype.Stmt.Hashtbl @@ -224,47 +221,54 @@ module Make_Dataflow type state = Domain.t - (** Join every state in the list *) - let smash (l : state list) : state or_bottom = - match l with - | [] -> `Bottom - | v1 :: l -> `Value (List.fold_left Domain.join v1 l) + type transfer_function = state -> state list + + let id : transfer_function = fun x -> [x] (* Thse lifting function helps to uniformize the transfer functions to a common signature *) - let lift (f : state -> state list) : state list -> state list = - fun l -> List.fold_left (fun acc x -> (f x) @ acc) [] l + let lift (f : state -> state) : transfer_function = + fun x -> [f x] + + let lift' (f : state -> state or_bottom) : transfer_function = + fun x -> Bottom.to_list (f x) + + let sequence (f1 : transfer_function) (f2 : transfer_function) + : transfer_function = + fun x -> List.fold_left (fun acc y -> f2 y @ acc) [] (f1 x) - let lift' (f : state -> state or_bottom) : state list -> state list = - fun l -> List.fold_left (fun acc x -> Bottom.add_to_list (f x) acc) [] l (* Tries to evaluate \assigns … \from … clauses for assembly code. *) - let transfer_asm (stmt : stmt) (states : state list) : state list = + let transfer_asm (stmt : stmt) : transfer_function = let asm_contracts = Annotations.code_annot stmt in match Logic_utils.extract_contract asm_contracts with | [] -> Value_util.warning_once_current "assuming assembly code has no effects in function %t" Value_util.pretty_current_cfunction_name; - states + id (* There should be only one statement contract, if any. *) | (_, spec) :: _ -> let assigns = Ast_info.merge_assigns_from_spec ~warn:false spec in - List.map (Spec.treat_statement_assigns assigns) states + lift (Spec.treat_statement_assigns assigns) let transfer_assume (stmt : stmt) (exp : exp) (kind : guard_kind) - (states : state list) : state list = + : transfer_function = let positive = (kind = Then) in - lift' (fun s -> Transfer.assume s stmt exp positive) states + lift' (fun s -> Transfer.assume s stmt exp positive) + + let transfer_assign (stmt : stmt) (dest : Cil_types.lval) (exp : exp) + : transfer_function = + lift' (fun s -> Transfer.assign s (Kstmt stmt) dest exp) - let transfer_enter (block : block) (states : state list) : state list = + let transfer_enter (block : block) : transfer_function = let vars = block_toplevel_locals block in - if vars = [] then states else List.map (Transfer.enter_scope kf vars) states + if vars = [] then id else lift (Transfer.enter_scope kf vars) - let transfer_leave (block : block) (states : state list) : state list = + let transfer_leave (block : block) : transfer_function = let vars = block.blocals in - if vars = [] then states else List.map (Domain.leave_scope kf vars) states + if vars = [] then id else lift (Domain.leave_scope kf vars) let transfer_call (stmt : stmt) (dest : lval option) (callee : exp) (args : exp list) (state : state) : state list = @@ -276,8 +280,7 @@ module Make_Dataflow cacheable := Value_types.NoCacheCallers; Bottom.list_of_bot result - let transfer_instr (stmt : stmt) (instr : instr) : state list -> state list = - let id states = states in + let transfer_instr (stmt : stmt) (instr : instr) : transfer_function = match instr with | Local_init (vi, AssignInit exp, _loc) -> let transfer state = @@ -294,11 +297,11 @@ module Make_Dataflow let state = Domain.enter_scope kf [vi] state in transfer_call stmt dest callee args state in - lift (Cil.treat_constructor_as_func as_func vi f args k loc) + Cil.treat_constructor_as_func as_func vi f args k loc | Set (dest, exp, _loc) -> - lift' (fun s -> Transfer.assign s (Kstmt stmt) dest exp) + transfer_assign stmt dest exp | Call (dest, callee, args, _loc) -> - lift (transfer_call stmt dest callee args) + transfer_call stmt dest callee args | Asm _ -> transfer_asm stmt | Skip _loc -> id @@ -306,7 +309,7 @@ module Make_Dataflow from the annotation table *) let transfer_return (stmt : stmt) (return_exp : exp option) - (states : state list) : state list = + : transfer_function = (* Deconstruct return statement *) let return_var = match return_exp with | Some {enode = Lval (Var v, NoOffset)} -> Some v @@ -314,62 +317,46 @@ module Make_Dataflow | _ -> assert false (* Cil invariant *) in (* Check postconditions *) - post_conditions := true; - let states = + let check_postconditions = fun state -> + post_conditions := true; if Value_util.skip_specifications kf then - states + [state] else match Logic.check_fct_postconditions kf active_behaviors Normal - ~pre_state:initial_state ~post_states:(States.of_list states) + ~pre_state:initial_state ~post_states:(States.singleton state) ~result:return_var with | `Bottom -> [] | `Value v -> States.to_list v - in - (* Split strategies *) - let states = match Split_return.kf_strategy kf with - | Split_strategy.SplitEqList i -> - begin match return_exp with - | Some return_exp -> - let split_states = Transfer.split_final_states kf return_exp i states in - let states' = List.map smash split_states in - Bottom.all states' - | None -> - Bottom.to_list (smash states) - end - | Split_strategy.NoSplit -> Bottom.to_list (smash states) - | Split_strategy.FullSplit -> states - (* Last case not possible : already transformed into SplitEqList *) - | Split_strategy.SplitAuto -> assert false - in (* Assign the return value *) - match return_exp with - | None -> - states - | Some return_exp -> - let vi_ret = Extlib.the (Library_functions.get_retres_vi kf) in - let return_lval = Var vi_ret, NoOffset in - let transfer state = - let state = Domain.enter_scope kf [vi_ret] state in - Transfer.assign state (Kstmt stmt) return_lval return_exp - in - lift' transfer states + and assign_retval = + match return_exp with + | None -> id + | Some return_exp -> + let vi_ret = Extlib.the (Library_functions.get_retres_vi kf) in + let return_lval = Var vi_ret, NoOffset in + let kstmt = Kstmt stmt in + fun state -> + let state = Domain.enter_scope kf [vi_ret] state in + let state' = Transfer.assign state kstmt return_lval return_exp in + Bottom.to_list state' + in + sequence check_postconditions assign_retval - let transfer_transition (t : vertex transition) (states : state list) : state list = + let transfer_transition (t : vertex transition) : transfer_function = match t with - | Skip -> states - | Return (return_exp,stmt) -> transfer_return stmt return_exp states - | Guard (exp,kind,stmt) -> transfer_assume stmt exp kind states - | Instr (instr,stmt) -> transfer_instr stmt instr states - | Enter (block) -> transfer_enter block states + | Skip -> id + | Return (return_exp,stmt) -> transfer_return stmt return_exp + | Guard (exp,kind,stmt) -> transfer_assume stmt exp kind + | Instr (instr,stmt) -> transfer_instr stmt instr + | Enter (block) -> transfer_enter block | Leave (block) when blocks_share_locals fundec.sbody block -> (* The variables from the toplevel block will be removed by the caller *) - states - | Leave (block) -> transfer_leave block states - | Prop _ -> states (* Annotations are interpreted in [transfer_statement]. *) + id + | Leave (block) -> transfer_leave block + | Prop _ -> id (* Annotations are interpreted in [transfer_statement]. *) - let transfer_statement_annot (stmt : stmt) ~(record : bool) - (states : state list) : state list = + let transfer_annotations (stmt : stmt) ~(record : bool) : transfer_function = let annots = (* We do not interpret annotations that come from statement contracts and everything previously emitted by Value (currently, alarms) *) @@ -378,29 +365,19 @@ module Make_Dataflow in List.map fst (Annotations.code_annot_emitter ~filter stmt) in - let interp_annot states ca = - Logic.interp_annot - ~limit:(slevel stmt) ~record - kf active_behaviors stmt ca - ~initial_state states - in - States.to_list (List.fold_left interp_annot (States.of_list states) annots) - - let get_cvalue = Domain.get Cvalue_domain.key - let gather_cvalues states = - match get_cvalue with - | Some get -> List.map get states - | None -> [] + fun state -> + let interp_annot states ca = + Logic.interp_annot + ~limit:(slevel stmt) ~record + kf active_behaviors stmt ca + ~initial_state states + in + States.to_list + (List.fold_left interp_annot (States.singleton state) annots) - let transfer_statement (stmt : stmt) (states : state list) : state list = - current_ki := Kstmt stmt; - (* Apply callback *) - (* TODO: apply on all domains. *) - let cvalue_states = gather_cvalues states in - Db.Value.Compute_Statement_Callbacks.apply - (stmt, Value_util.call_stack (), cvalue_states); + let transfer_statement (stmt : stmt) (state : state) : state list = (* Interpret annotations *) - let states = transfer_statement_annot stmt ~record:true states in + let states = transfer_annotations stmt ~record:true state in (* Check unspecified sequences *) match stmt.skind with | UnspecifiedSequence seq when Kernel.UnspecifiedAccess.get () -> @@ -419,24 +396,31 @@ module Make_Dataflow if x >= !max_displayed + slevel_display_step then begin let rounded = x / slevel_display_step * slevel_display_step in - Value_parameters.feedback ~once:true + Value_parameters.feedback ~once:true ~current:true "Semantic level unrolling superposing up to %d states" rounded; max_displayed := rounded; end - let process_loop_transitions (v1 : vertex) (v2 : vertex) (p : propagation) - : unit = + let process_partitioning_transitions (v1 : vertex) (v2 : vertex) + (transition : vertex transition) (f : flow) : unit = + (* Split return *) + begin match transition with + | Return (return_exp, _) -> + Partition.split_return f return_exp + | _ -> () + end; + (* Loop transitions *) let the_stmt v = Extlib.the v.vertex_start_of in let enter_loop v = - Partition.transfer (List.map (Domain.enter_loop (the_stmt v))) p; - Partition.enter_loop p (the_stmt v) + Partition.transfer (lift (Domain.enter_loop (the_stmt v))) f; + Partition.enter_loop f (the_stmt v) and leave_loop v = - Partition.transfer (List.map (Domain.leave_loop (the_stmt v))) p; - Partition.leave_loop p (the_stmt v) + Partition.transfer (lift (Domain.leave_loop (the_stmt v))) f; + Partition.leave_loop f (the_stmt v) and incr_loop_counter v = - Partition.transfer (List.map (Domain.incr_loop_counter (the_stmt v))) p; - Partition.next_loop_iteration p (the_stmt v) + Partition.transfer (lift (Domain.incr_loop_counter (the_stmt v))) f; + Partition.next_loop_iteration f (the_stmt v) in let loops_left, loops_entered = Interpreted_automata.get_wto_index_diff kf v1 v2 @@ -448,97 +432,116 @@ module Make_Dataflow if loop_incr then incr_loop_counter v2 - let process_edge (v1,e,v2 : G.edge) : unit = + let process_edge (v1,e,v2 : G.edge) : flow = let {edge_transition=transition; edge_kinstr=kinstr} = e in - let propagation,edge_info = get_edge_propagation e in + let tank,edge_info = get_edge_data e in + let flow = Partition.drain tank in !Db.progress (); check_signals (); current_ki := kinstr; Cil.CurrentLoc.set e.edge_loc; - Partition.transfer (transfer_transition transition) propagation; - process_loop_transitions v1 v2 propagation; - if not (Partition.is_empty_propagation propagation) then - edge_info.fireable <- true - - let update_vertex ?(widening : bool = false) (v : vertex) : bool = - (* Set location if possible *) - Extlib.may - (fun stmt -> Cil.CurrentLoc.set (Cil_datatype.Stmt.loc stmt)) - v.vertex_start_of; + Partition.transfer (transfer_transition transition) flow; + process_partitioning_transitions v1 v2 transition flow; + if not (Partition.is_empty_flow flow) then + edge_info.fireable <- true; + flow + + let get_cvalue = Domain.get Cvalue_domain.key + let gather_cvalues states = + match get_cvalue with + | Some get -> List.map get states + | None -> [] + + let call_statement_callbacks (stmt : stmt) (f : flow) : unit = + (* TODO: apply on all domains. *) + let states = Partition.contents f in + let cvalue_states = gather_cvalues states in + Db.Value.Compute_Statement_Callbacks.apply + (stmt, Value_util.call_stack (), cvalue_states) + + let update_vertex ?(widening : bool = false) (v : vertex) + (sources : ('branch * flow) list) : bool = + begin match v.vertex_start_of with + | Some stmt -> + (* Set location *) + current_ki := Kstmt stmt; + Cil.CurrentLoc.set (Cil_datatype.Stmt.loc stmt); + | None -> () + end; (* Get vertex store *) let store = get_vertex_store v in (* Join incoming s tates *) - let sources = get_pred_propagations v in - let sources = - if v == automaton.entry_point - then initial_propagation :: sources - else sources - in - let p = Partition.join sources store in + let f = Partition.join sources store in (* Output slevel related things *) let store_size = Partition.store_size store in + output_slevel store_size; begin match v.vertex_start_of with | Some stmt -> + (* Callbacks *) + call_statement_callbacks stmt f; + (* Transfer function associated to the statement *) + Partition.transfer (transfer_statement stmt) f; + (* Debug informations *) Value_parameters.debug ~dkey ~current:true "reached statement %d with %d / %d eternal states, %d to propagate" - stmt.sid store_size (slevel stmt) (Partition.propagation_size p) + stmt.sid store_size (slevel stmt) (Partition.flow_size f); | _ -> () end; - output_slevel store_size; - (* Transfer function associated to the statement *) - Extlib.may - (fun stmt -> Partition.transfer (transfer_statement stmt) p) - v.vertex_start_of; (* Widen if necessary *) let stable = - if Partition.is_empty_propagation p then + if Partition.is_empty_flow f then true else if widening then begin - let stable = Partition.widen store (get_vertex_widening v) p in + let stable = Partition.widen (get_vertex_widening v) f in (* Try to correct over-widenings *) let correct_over_widening stmt = (* Do *not* record the status after interpreting the annotation here. Possible unproven assertions have already been recorded when the assertion has been interpreted the first time higher in this function. *) - Partition.transfer (transfer_statement_annot stmt ~record:false) p + Partition.transfer (transfer_annotations stmt ~record:false) f in Extlib.may correct_over_widening v.vertex_start_of; stable end else false in - (* Reset sources *) - List.iter (fun (_,p) -> Partition.clear_propagation p) sources; (* Dispatch to successors *) - List.iter (fun p2 -> Partition.merge p ~into:p2) (get_succ_propagations v); + List.iter (fun into -> Partition.fill f ~into) (get_succ_tanks v); (* Return wether the iterator should stop or not *) stable let process_vertex ?(widening : bool = false) (v : vertex) : bool = (* Process predecessors *) - G.iter_pred_e process_edge graph v; + let process_source (_,e,_ as edge) = + e.edge_key, process_edge edge + in + let sources = List.map process_source (G.pred_e graph v) in + (* Add initial source *) + let sources = + if v <> automaton.entry_point + then sources + else get_initial_flow () :: sources + in (* Update the vertex *) - update_vertex ~widening v + update_vertex ~widening v sources - let rec simulate (v : vertex) : unit = + let rec simulate (v : vertex) (source : 'branch * flow) : unit = (* Update the current vertex *) - ignore (update_vertex v); + ignore (update_vertex v [source]); (* Try every possible successor *) - G.iter_succ_e process_edge graph v; - (* Find which edges were fireable *) - let add_if_fireable (_,e,succ) acc = - let p = fst (get_edge_propagation e) in - if Partition.is_empty_propagation p - then (Partition.clear_propagation p; acc) - else succ :: acc + let add_if_fireable (_,e,succ as edge) acc = + let f = process_edge edge in + if Partition.is_empty_flow f + then acc + else (e.edge_key,f,succ) :: acc in let successors = G.fold_succ_e add_if_fireable graph v [] in (* How many possible successors ? *) match successors with | [] -> () (* No successor - end of simulation *) - | [succ] -> (* One successor - continue simulation *) - simulate succ + | [b,f,succ] -> (* One successor - continue simulation *) + simulate succ (b,f) | _ -> (* Several successors - failure *) Value_parameters.abort "Do not know which branch to take. Stopping." @@ -583,8 +586,8 @@ module Make_Dataflow relevant.*) let mark_degeneration () = let f stmt (v,_) = - let l = get_succ_propagations v in - if not (List.for_all Partition.is_empty_propagation l) then + let l = get_succ_tanks v in + if not (List.for_all Partition.is_empty_tank l) then Value_util.DegenerationPoints.replace stmt false in StmtTable.iter f automaton.stmt_table; @@ -602,7 +605,7 @@ module Make_Dataflow let compute () : state list or_bottom = if interpreter_mode then - simulate automaton.entry_point + simulate automaton.entry_point (get_initial_flow ()) else begin let wto = Interpreted_automata.get_wto kf in iterate_list wto @@ -623,7 +626,7 @@ module Make_Dataflow | Then -> Db.Value.mask_then | Else -> Db.Value.mask_else in - let edge_info = snd (get_edge_propagation e) in + let edge_info = snd (get_edge_data e) in let old_status = try StmtTable.find table stmt with Not_found -> 0 diff --git a/src/plugins/value/engine/state_partitioning.mli b/src/plugins/value/engine/state_partitioning.mli index 223d3db8d60..5f2508badf7 100644 --- a/src/plugins/value/engine/state_partitioning.mli +++ b/src/plugins/value/engine/state_partitioning.mli @@ -45,36 +45,40 @@ end module type Partition = sig type state (** The states being partitioned *) - type store (** The storage of a partition *) - type propagation (** Only contains states which needs to be propagated, i.e. - states which have not been propagated yet *) + type store (** The storage of all states ever met at a control point *) + type flow (** A set of states which are currently propagated *) + type tank (** An organized temporary accumulation of flows *) type widening (** Widening informations *) (* --- Constructors --- *) val empty_store : stmt:Cil_types.stmt option -> store - val empty_propagation : unit -> propagation + val empty_flow : unit -> flow + val empty_tank : unit -> tank val empty_widening : stmt:Cil_types.stmt option -> widening - (** Build the initial propagation for the entry point of a function. *) - val initial_propagation : state list -> propagation + (** Build the initial tank for the entry point of a function. *) + val initial_tank : state list -> tank (* --- Pretty printing --- *) val pretty_store : Format.formatter -> store -> unit - val pretty_propagation : Format.formatter -> propagation -> unit + val pretty_flow : Format.formatter -> flow -> unit (* --- Accessors --- *) val expanded : store -> state list val smashed : store -> state or_bottom + val contents : flow -> state list val is_empty_store : store -> bool - val is_empty_propagation : propagation -> bool + val is_empty_flow : flow -> bool + val is_empty_tank : tank -> bool val store_size : store -> int - val propagation_size : propagation -> int + val flow_size : flow -> int + val tank_size : tank -> int (* --- Reset state (for hierchical convergence) --- *) @@ -83,7 +87,8 @@ sig been obtained after a widening. *) val reset_store : store -> unit - val reset_propagation : propagation -> unit + val reset_flow : flow -> unit + val reset_tank : tank -> unit val reset_widening : widening -> unit (** Resets (or just delays) the widening counter. Used on nested loops, to @@ -95,25 +100,24 @@ sig (* --- Partition transfer functions --- *) - val enter_loop : propagation -> loop -> unit - val leave_loop : propagation -> loop -> unit - val next_loop_iteration : propagation -> loop -> unit + val enter_loop : flow -> loop -> unit + val leave_loop : flow -> loop -> unit + val next_loop_iteration : flow -> loop -> unit + val split_return : flow -> Cil_types.exp option -> unit (* --- Operators --- *) - (** Remove all states from the propagation, leaving it empty as if it was just - created by [empty_propagation] *) - val clear_propagation : propagation -> unit + (** Remove all states from the tank, leaving it empty as if it was just + created by [empty_tank] *) + val drain : tank -> flow - (** Apply a transfer function to all the states of a propagation. *) - val transfer : (state list -> state list) -> propagation -> unit + (** Fill the states of the flow into the tank, modifying [into] inplace but + letting the flow unchanged *) + val fill: into:tank -> flow -> unit - (** Merge two propagations together, modifying [into] inplace. At the return - of the function, [into] should contain all the states of both original - propagations, or an overapproximation of this union: joining two states - together inside the propagation is allowed. *) - val merge : into:propagation -> propagation -> unit + (** Apply a transfer function to all the states of a propagation. *) + val transfer : (state -> state list) -> flow -> unit (** Join all incoming propagations into the given store. This function returns a set of states which still need to be propagated past the store. @@ -127,17 +131,13 @@ sig This function also interprets partitioning annotations at the store vertex (slevel, splits, merges, ...) which will generally change the current partitioning. *) - val join : (branch * propagation) list -> store -> propagation - - (** Widen a propagation at the position of the given store. The widening - object keeps track of the previous widenings to ensure termination. The - result is true when it is correct to end the propagation here, i.e. when - the current propagation is only carrying states which are included into - already propagated states. + val join : (branch * flow) list -> store -> flow - Note that the propagation given to [widen] *must* have been produced by - the [join] on the same store. *) - val widen : store -> widening -> propagation -> bool + (** Widen a tank. The widening object keeps track of the previous widenings to + ensure termination. The result is true when it is correct to end the + propagation here, i.e. when the current tank is only containng + states which are included into already propagated states. *) + val widen : widening -> flow -> bool end diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index 1e4e6e679ee..810f61e1a7a 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -44,10 +44,14 @@ struct let eval_exp_to_int = Transfer.eval_exp_to_int include Domain + + let smash = function + | [] -> [] + | v1 :: l -> [ List.fold_left join v1 l ] end module Index = Partitioning.Make (Domain) - module Partition = Partition.Make (Domain) + module Flow = Partition.MakeFlow (Domain) type state = Domain.t @@ -61,8 +65,12 @@ struct mutable store_size : int; } - type propagation = { - mutable partition : state partition; + type flow = { + mutable flow_states : Flow.t; + } + + type tank = { + mutable tank_states : state partition; } type widening_state = { @@ -91,8 +99,11 @@ struct store_size = 0; } - let empty_propagation () : propagation = - { partition = Partition.empty } + let empty_flow () : flow = + { flow_states = Flow.empty } + + let empty_tank () : tank = + { tank_states = Partition.empty } let empty_widening ~(stmt : stmt option) : widening = { @@ -100,14 +111,14 @@ struct widening_partition = Partition.empty; } - let initial_propagation (states : state list) : propagation = - let partition = Partition.initial states in + let initial_tank (states : state list) : tank = + let propagation = Flow.initial states in (* Split the initial partition according to the global split seetings *) - let split partition lval = - Partition.transfer_keys partition (Dynamic_split lval) + let split propagation lval = + Flow.transfer_keys propagation (Dynamic_split lval) in - let partition = List.fold_left split partition universal_splits in - { partition } + let states = List.fold_left split propagation universal_splits in + { tank_states = Flow.to_partition states } (* Pretty printing *) @@ -115,8 +126,8 @@ struct let pretty_store (fmt : Format.formatter) (s : store) : unit = Partition.iter (Domain.pretty fmt) s.store_partition - let pretty_propagation (fmt : Format.formatter) (p : propagation) = - Partition.iter (Domain.pretty fmt) p.partition + let pretty_flow (fmt : Format.formatter) (p : flow) = + Flow.iter (Domain.pretty fmt) p.flow_states (* Accessors *) @@ -125,33 +136,62 @@ struct Partition.to_list s.store_partition let smashed (s : store) : state or_bottom = - match expanded s with - | [] -> `Bottom - | v1 :: l -> `Value (List.fold_left Domain.join v1 l) + Bottom.of_list (Domain.smash (expanded s)) + + let contents (f : flow) : state list = + Flow.to_list f.flow_states let is_empty_store (s : store) : bool = Partition.is_empty s.store_partition - let is_empty_propagation (p : propagation) : bool = - Partition.is_empty p.partition + let is_empty_flow (f : flow) : bool = + Flow.is_empty f.flow_states + + let is_empty_tank (t : tank) : bool = + Partition.is_empty t.tank_states let store_size (s : store) : int = s.store_size - let propagation_size (p : propagation) : int = - Partition.size p.partition + let flow_size (f : flow) : int = + Flow.size f.flow_states + let tank_size (t : tank) : int = + Partition.size t.tank_states (* Partition transfer functions *) - let enter_loop (p : propagation) (i : loop) = - p.partition <- Partition.transfer_keys p.partition (Enter_loop (unroll i)) - - let leave_loop (p : propagation) (_i : loop) = - p.partition <- Partition.transfer_keys p.partition Leave_loop - - let next_loop_iteration (p : propagation) (_i : loop) = - p.partition <- Partition.transfer_keys p.partition Incr_loop + let loop_transfer p action = + p.flow_states <- Flow.transfer_keys p.flow_states action + + let enter_loop (p : flow) (i : loop) : unit = + loop_transfer p (Enter_loop (unroll i)) + + let leave_loop (p : flow) (_i : loop) : unit = + loop_transfer p Leave_loop + + let next_loop_iteration (p : flow) (_i : loop) : unit = + loop_transfer p Incr_loop + + let split_return (flow : flow) (return_exp : exp option) : unit = + (** Join every state in the list *) + let transfer_split states = + match Split_return.kf_strategy kf with + | Split_strategy.SplitEqList i -> + begin match return_exp with + | Some return_exp -> + let states = Transfer.split_final_states kf return_exp i states in + List.flatten (List.map Domain.smash states) + | None -> + Domain.smash states + end + | Split_strategy.NoSplit -> Domain.smash states + | Split_strategy.FullSplit -> states + (* Last case not possible : already transformed into SplitEqList *) + | Split_strategy.SplitAuto -> assert false + in + flow.flow_states <- + Flow.legacy_transfer_states transfer_split flow.flow_states (* Reset state (for hierchical convergence) *) @@ -162,8 +202,11 @@ struct in s.store_partition <- Partition.filter_keys is_eternal s.store_partition - let reset_propagation (p : propagation) : unit = - p.partition <- Partition.empty + let reset_flow (f : flow) : unit = + f.flow_states <- Flow.empty + + let reset_tank (t : tank) : unit = + t.tank_states <- Partition.empty let reset_widening (w : widening) : unit = w.widening_partition <- Partition.empty @@ -177,73 +220,68 @@ struct (* Operators *) - let clear_propagation (p : propagation) : unit = - p.partition <- Partition.empty - - let transfer (f : state list -> state list) (p : propagation) : unit = - p.partition <- Partition.transfer_states (fun s -> f [s]) p.partition + let drain (t : tank) : flow = + let flow_states = Flow.of_partition t.tank_states in + t.tank_states <- Partition.empty; + { flow_states } - let merge ~(into : propagation) (source : propagation) : unit = - (* TODO: state the precondition for this to be correct *) - let merge_two dest src = (* Erase the destination *) + let fill ~(into : tank) (f : flow) : unit = + let erase dest src = if Extlib.has_some src then src else dest in - into.partition <- Partition.merge merge_two into.partition source.partition + let new_states = Flow.to_partition f.flow_states in + into.tank_states <- Partition.merge erase into.tank_states new_states - let join (sources : (branch*propagation) list) (dest : store) - : propagation = + let transfer (f : state -> state list) (p : flow) : unit = + p.flow_states <- Flow.transfer_states f p.flow_states + + let join (sources : (branch*flow) list) (dest : store) : flow = let is_loop_head = match dest.store_stmt with | Some {skind=Cil_types.Loop _} -> true | _ -> false in - let current_ration = ref dest.store_size in - (* Update states counters *) - let count acc (_b,p) = - acc + Partition.size p.partition - in - dest.store_size <- List.fold_left count dest.store_size sources; - (* Get every source propagation *) - let source_partitions = + (* Get every source flow *) + let sources_states = match sources with - | [(_,p)] -> [p.partition] + | [(_,p)] -> [p.flow_states] | sources -> (* Several branches ; partition according to the incoming branch *) let get (b,p) = - Partition.transfer_keys p.partition (Branch (b,history_size)) + Flow.transfer_keys p.flow_states (Branch (b,history_size)) in List.map get sources in + (* Merge incomming flows *) + let flow_states = + List.fold_left Flow.union Flow.empty sources_states + in (* Handle ration stamps *) + let previous_store_size = dest.store_size in + dest.store_size <- dest.store_size + Flow.size flow_states; let slevel_exceeded = dest.store_size > dest.size_limit in - let rationing = + let rationing_action = if slevel_exceeded then (* No more slevel, no more ration tickets *) - fun p -> Partition.transfer_keys p (Ration_merge None) + Ration_merge None else if dest.merge then (* Merge / Merge after loop : a unique ration stamp for all *) - fun p -> Partition.transfer_keys p (Ration_merge (Some !current_ration)) - else begin fun p -> + Ration_merge (Some (previous_store_size, 0)) + else (* Attribute a ration stamp to each individual state *) - let p = Partition.transfer_keys p (Ration !current_ration) in - current_ration := !current_ration + Partition.size p; - p - end + Ration previous_store_size in - let source_partitions = List.map rationing source_partitions in (* Handle Split / Merge operations *) - let do_flow_actions partition = - let actions = - dest.flow_actions @ [Update_dynamic_splits ; Transfer_merge] - in - List.fold_left Partition.transfer_keys partition actions + let flow_actions = Update_dynamic_splits :: dest.flow_actions in + (* Execute actions *) + let actions = rationing_action :: flow_actions in + let flow_states = + List.fold_left Flow.transfer_keys flow_states actions in - let source_partitions = List.map do_flow_actions source_partitions in - (* Merge incomming propagations *) - let union = Partition.union Domain.join in - let partition = List.fold_left union Partition.empty source_partitions in + (* Join states with unique keys *) + let partition = Flow.to_partition flow_states in (* Add states to the store but filter out already propagated states *) let update key current_state = (* Inclusion test *) @@ -272,11 +310,11 @@ struct (* Filter out already propagated states *) Extlib.opt_filter (fun s -> Index.add s dest.store_index) state in - let partition = Partition.map_filter update partition in - { partition } + let partition' = Partition.map_filter update partition in + { flow_states = Flow.of_partition partition' } - let widen (_s : store) (w : widening) (p : propagation) : bool = + let widen (w : widening) (f : flow) : bool = let stmt = w.widening_stmt in (* Auxiliary function to update the result *) let update key widening_state = @@ -331,6 +369,8 @@ struct }; Some curr in - p.partition <- Partition.map_filter widen_one p.partition; - Partition.is_empty p.partition + let p = Flow.to_partition f.flow_states in + let p' = Partition.map_filter widen_one p in + f.flow_states <- Flow.of_partition p'; + Flow.is_empty f.flow_states end -- GitLab From 3f1af41e4a128af6f88e85cd3ecb0a5172b71969 Mon Sep 17 00:00:00 2001 From: Valentin Perrelle <valentin.perrelle@cea.fr> Date: Sun, 20 Jan 2019 21:40:43 +0100 Subject: [PATCH 229/376] [Eva] Update tests --- tests/builtins/oracle/alloc_weak.res.oracle | 24 ++- tests/builtins/oracle/allocated.1.res.oracle | 43 ++-- tests/builtins/oracle/memcpy.res.oracle | 3 +- .../oracle/realloc_multiple.1.res.oracle | 104 +++++----- tests/float/oracle/some.0.res.oracle | 15 +- tests/libc/oracle/string_c_strchr.res.oracle | 10 +- tests/libc/oracle/string_h.res.oracle | 3 +- tests/libc/oracle/unistd_h.0.res.oracle | 186 ++++++++---------- tests/libc/oracle/unistd_h.1.res.oracle | 186 ++++++++---------- .../slicing/oracle/if_many_values.res.oracle | 3 +- tests/value/oracle/bitwise.res.oracle | 4 +- tests/value/oracle/builtins_split.res.oracle | 141 ++++--------- .../hierarchical_convergence.res.oracle | 17 +- tests/value/oracle/initialized.res.oracle | 2 + tests/value/oracle/local_slevel.res.oracle | 12 +- .../value/oracle/narrow_behaviors.res.oracle | 34 ++-- tests/value/oracle/no_results.res.oracle | 90 ++++++--- .../oracle/partitioning-annots.1.res.oracle | 20 +- .../oracle/partitioning-annots.2.res.oracle | 32 +-- .../oracle/partitioning-annots.3.res.oracle | 18 +- .../oracle/partitioning-annots.5.res.oracle | 2 +- tests/value/oracle/postcondition.res.oracle | 4 +- tests/value/oracle/split_return.3.res.oracle | 28 +-- tests/value/oracle/split_return.4.res.oracle | 50 ++--- 24 files changed, 485 insertions(+), 546 deletions(-) diff --git a/tests/builtins/oracle/alloc_weak.res.oracle b/tests/builtins/oracle/alloc_weak.res.oracle index 8a75c273777..14c99ac21dc 100644 --- a/tests/builtins/oracle/alloc_weak.res.oracle +++ b/tests/builtins/oracle/alloc_weak.res.oracle @@ -41,14 +41,22 @@ Called from tests/builtins/alloc_weak.c:73. [eva] tests/builtins/alloc_weak.c:37: Call to builtin malloc [eva] tests/builtins/alloc_weak.c:37: allocating variable __malloc_main2_l37 -[eva] Semantic level unrolling superposing up to 100 states -[eva] Semantic level unrolling superposing up to 200 states -[eva] Semantic level unrolling superposing up to 300 states -[eva] Semantic level unrolling superposing up to 400 states -[eva] Semantic level unrolling superposing up to 500 states -[eva] Semantic level unrolling superposing up to 600 states -[eva] Semantic level unrolling superposing up to 700 states -[eva] Semantic level unrolling superposing up to 800 states +[eva] tests/builtins/alloc_weak.c:40: + Semantic level unrolling superposing up to 100 states +[eva] tests/builtins/alloc_weak.c:40: + Semantic level unrolling superposing up to 200 states +[eva] tests/builtins/alloc_weak.c:40: + Semantic level unrolling superposing up to 300 states +[eva] tests/builtins/alloc_weak.c:40: + Semantic level unrolling superposing up to 400 states +[eva] tests/builtins/alloc_weak.c:40: + Semantic level unrolling superposing up to 500 states +[eva] tests/builtins/alloc_weak.c:40: + Semantic level unrolling superposing up to 600 states +[eva] tests/builtins/alloc_weak.c:40: + Semantic level unrolling superposing up to 700 states +[eva] tests/builtins/alloc_weak.c:40: + Semantic level unrolling superposing up to 800 states [eva] Recording results for main2 [eva] Done for function main2 [eva] computing for function main3 <- main. diff --git a/tests/builtins/oracle/allocated.1.res.oracle b/tests/builtins/oracle/allocated.1.res.oracle index 7369e0f0ee7..0d4702a1322 100644 --- a/tests/builtins/oracle/allocated.1.res.oracle +++ b/tests/builtins/oracle/allocated.1.res.oracle @@ -191,64 +191,64 @@ [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_6 [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: - strong free on bases: {__malloc_main_l82_6} + strong free on bases: {__malloc_main_l82_2} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: - strong free on bases: {__malloc_main_l82_5} + strong free on bases: {__malloc_main_l82_3} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: strong free on bases: {__malloc_main_l82_4} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: - strong free on bases: {__malloc_main_l82_3} + strong free on bases: {__malloc_main_l82_5} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: - strong free on bases: {__malloc_main_l82_2} + strong free on bases: {__malloc_main_l82_6} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: - strong free on bases: {__malloc_main_l82_6} + strong free on bases: {__malloc_main_l82_2} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: - strong free on bases: {__malloc_main_l82_5} + strong free on bases: {__malloc_main_l82_3} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: strong free on bases: {__malloc_main_l82_4} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: - strong free on bases: {__malloc_main_l82_3} + strong free on bases: {__malloc_main_l82_5} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: - strong free on bases: {__malloc_main_l82_2} + strong free on bases: {__malloc_main_l82_6} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: - strong free on bases: {__malloc_main_l82_6} + strong free on bases: {__malloc_main_l82_2} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: - strong free on bases: {__malloc_main_l82_5} + strong free on bases: {__malloc_main_l82_3} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: strong free on bases: {__malloc_main_l82_4} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: - strong free on bases: {__malloc_main_l82_3} + strong free on bases: {__malloc_main_l82_5} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: - strong free on bases: {__malloc_main_l82_2} + strong free on bases: {__malloc_main_l82_6} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: - strong free on bases: {__malloc_main_l82_6} + strong free on bases: {__malloc_main_l82_2} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: - strong free on bases: {__malloc_main_l82_5} + strong free on bases: {__malloc_main_l82_3} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: strong free on bases: {__malloc_main_l82_4} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: - strong free on bases: {__malloc_main_l82_3} + strong free on bases: {__malloc_main_l82_5} [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: - strong free on bases: {__malloc_main_l82_2} + strong free on bases: {__malloc_main_l82_6} [eva] tests/builtins/allocated.c:82: Call to builtin Frama_C_malloc_fresh for function malloc [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_7 @@ -321,10 +321,13 @@ [eva] tests/builtins/allocated.c:82: Call to builtin Frama_C_malloc_fresh for function malloc [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_30 -[eva] Semantic level unrolling superposing up to 100 states -[eva] Semantic level unrolling superposing up to 200 states -[eva] Semantic level unrolling superposing up to 300 states -[eva] Semantic level unrolling superposing up to 400 states +[eva] tests/builtins/allocated.c:84: + Semantic level unrolling superposing up to 100 states +[eva] tests/builtins/allocated.c:84: + Semantic level unrolling superposing up to 200 states +[eva] :0: Semantic level unrolling superposing up to 300 states +[eva] tests/builtins/allocated.c:84: + Semantic level unrolling superposing up to 400 states [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: strong free on bases: {__malloc_main_l82_30} diff --git a/tests/builtins/oracle/memcpy.res.oracle b/tests/builtins/oracle/memcpy.res.oracle index 649c1f67a8f..6976af91e17 100644 --- a/tests/builtins/oracle/memcpy.res.oracle +++ b/tests/builtins/oracle/memcpy.res.oracle @@ -78,7 +78,8 @@ [eva] Done for function many [eva] computing for function init <- main <- main_all. Called from tests/builtins/memcpy.c:65. -[eva] Semantic level unrolling superposing up to 100 states +[eva] tests/builtins/memcpy.c:20: + Semantic level unrolling superposing up to 100 states [eva] Recording results for init [from] Computing for function init [from] Done for function init diff --git a/tests/builtins/oracle/realloc_multiple.1.res.oracle b/tests/builtins/oracle/realloc_multiple.1.res.oracle index 7f284578585..facf3d7f3a3 100644 --- a/tests/builtins/oracle/realloc_multiple.1.res.oracle +++ b/tests/builtins/oracle/realloc_multiple.1.res.oracle @@ -81,16 +81,20 @@ __fc_mbtowc_state ∈ [--..--] __fc_wctomb_state ∈ [--..--] Frama_C_entropy_source ∈ [--..--] - q ∈ {{ &__malloc_main1_l9[0] }} - r ∈ {{ &__malloc_main1_l12[0] }} - p ∈ {{ &__malloc_main1_l9[0] ; &__malloc_main1_l12[0] }} + q ∈ {{ &__malloc_main1_l9[0] }} or ESCAPINGADDR + r ∈ {{ &__malloc_main1_l12[0] }} or ESCAPINGADDR + p ∈ {{ &__malloc_main1_l9[0] ; &__malloc_main1_l12[0] }} or ESCAPINGADDR x ∈ {0; 1} - s ∈ {0} + s ∈ {{ &__realloc_main1_l23[0] ; &__realloc_main1_l23_0[0] }} v ∈ {1} S_0___fc_env[0..1] ∈ [--..--] S_1___fc_env[0..1] ∈ [--..--] __malloc_main1_l9[0..4] ∈ {5} __malloc_main1_l12[0..5] ∈ {6} + __realloc_main1_l23[0..5] ∈ {6} + [6] ∈ UNINITIALIZED + __realloc_main1_l23_0[0..4] ∈ {5} + [5..6] ∈ UNINITIALIZED ==END OF DUMP== [eva] tests/builtins/realloc_multiple.c:25: Frama_C_dump_each: @@ -108,28 +112,24 @@ __fc_mbtowc_state ∈ [--..--] __fc_wctomb_state ∈ [--..--] Frama_C_entropy_source ∈ [--..--] - q ∈ {{ &__malloc_main1_l9[0] }} or ESCAPINGADDR - r ∈ {{ &__malloc_main1_l12[0] }} or ESCAPINGADDR - p ∈ {{ &__malloc_main1_l9[0] ; &__malloc_main1_l12[0] }} or ESCAPINGADDR + q ∈ {{ &__malloc_main1_l9[0] }} + r ∈ {{ &__malloc_main1_l12[0] }} + p ∈ {{ &__malloc_main1_l9[0] ; &__malloc_main1_l12[0] }} x ∈ {0; 1} - s ∈ {{ &__realloc_main1_l23[0] ; &__realloc_main1_l23_0[0] }} + s ∈ {0} v ∈ {1} S_0___fc_env[0..1] ∈ [--..--] S_1___fc_env[0..1] ∈ [--..--] __malloc_main1_l9[0..4] ∈ {5} __malloc_main1_l12[0..5] ∈ {6} - __realloc_main1_l23[0..5] ∈ {6} - [6] ∈ UNINITIALIZED - __realloc_main1_l23_0[0..4] ∈ {5} - [5..6] ∈ UNINITIALIZED ==END OF DUMP== [eva] tests/builtins/realloc_multiple.c:26: Call to builtin free [eva] tests/builtins/realloc_multiple.c:26: function free: precondition 'freeable' got status valid. -[eva:malloc] tests/builtins/realloc_multiple.c:26: strong free on bases: {} -[eva] tests/builtins/realloc_multiple.c:26: Call to builtin free [eva:malloc] tests/builtins/realloc_multiple.c:26: weak free on bases: {__realloc_main1_l23, __realloc_main1_l23_0} +[eva] tests/builtins/realloc_multiple.c:26: Call to builtin free +[eva:malloc] tests/builtins/realloc_multiple.c:26: strong free on bases: {} [eva] Recording results for main1 [eva] Done for function main1 [eva] computing for function main2 <- main. @@ -212,16 +212,24 @@ __fc_mbtowc_state ∈ [--..--] __fc_wctomb_state ∈ [--..--] Frama_C_entropy_source ∈ [--..--] - q ∈ {{ &__malloc_main2_l30[0] }} - r ∈ {{ &__malloc_main2_l33[0] }} - p ∈ {{ NULL ; &__malloc_main2_l30[0] ; &__malloc_main2_l33[0] }} + q ∈ {{ &__malloc_main2_l30[0] }} or ESCAPINGADDR + r ∈ {{ &__malloc_main2_l33[0] }} or ESCAPINGADDR + p ∈ + {{ NULL ; &__malloc_main2_l30[0] ; &__malloc_main2_l33[0] }} or ESCAPINGADDR x ∈ {0; 1; 2} - s ∈ {0} + s ∈ + {{ &__realloc_main2_l45[0] ; &__realloc_main2_l45_0[0] ; + &__realloc_main2_l45_1[0] }} v ∈ {2} S_0___fc_env[0..1] ∈ [--..--] S_1___fc_env[0..1] ∈ [--..--] __malloc_main2_l30[0..4] ∈ {7} __malloc_main2_l33[0..5] ∈ {8} + __realloc_main2_l45[0..5] ∈ {8} + [6] ∈ UNINITIALIZED + __realloc_main2_l45_0[0..4] ∈ {7} + [5..6] ∈ UNINITIALIZED + __realloc_main2_l45_1[0..6] ∈ UNINITIALIZED ==END OF DUMP== [eva] tests/builtins/realloc_multiple.c:47: Frama_C_dump_each: @@ -239,33 +247,25 @@ __fc_mbtowc_state ∈ [--..--] __fc_wctomb_state ∈ [--..--] Frama_C_entropy_source ∈ [--..--] - q ∈ {{ &__malloc_main2_l30[0] }} or ESCAPINGADDR - r ∈ {{ &__malloc_main2_l33[0] }} or ESCAPINGADDR - p ∈ - {{ NULL ; &__malloc_main2_l30[0] ; &__malloc_main2_l33[0] }} or ESCAPINGADDR + q ∈ {{ &__malloc_main2_l30[0] }} + r ∈ {{ &__malloc_main2_l33[0] }} + p ∈ {{ NULL ; &__malloc_main2_l30[0] ; &__malloc_main2_l33[0] }} x ∈ {0; 1; 2} - s ∈ - {{ &__realloc_main2_l45[0] ; &__realloc_main2_l45_0[0] ; - &__realloc_main2_l45_1[0] }} + s ∈ {0} v ∈ {2} S_0___fc_env[0..1] ∈ [--..--] S_1___fc_env[0..1] ∈ [--..--] __malloc_main2_l30[0..4] ∈ {7} __malloc_main2_l33[0..5] ∈ {8} - __realloc_main2_l45[0..5] ∈ {8} - [6] ∈ UNINITIALIZED - __realloc_main2_l45_0[0..4] ∈ {7} - [5..6] ∈ UNINITIALIZED - __realloc_main2_l45_1[0..6] ∈ UNINITIALIZED ==END OF DUMP== [eva] tests/builtins/realloc_multiple.c:48: Call to builtin free [eva] tests/builtins/realloc_multiple.c:48: function free: precondition 'freeable' got status valid. -[eva:malloc] tests/builtins/realloc_multiple.c:48: strong free on bases: {} -[eva] tests/builtins/realloc_multiple.c:48: Call to builtin free [eva:malloc] tests/builtins/realloc_multiple.c:48: weak free on bases: {__realloc_main2_l45, __realloc_main2_l45_0, __realloc_main2_l45_1} +[eva] tests/builtins/realloc_multiple.c:48: Call to builtin free +[eva:malloc] tests/builtins/realloc_multiple.c:48: strong free on bases: {} [eva] Recording results for main2 [eva] Done for function main2 [eva] computing for function main3 <- main. @@ -312,8 +312,8 @@ __fc_wctomb_state ∈ [--..--] Frama_C_entropy_source ∈ [--..--] p ∈ {{ &__malloc_main3_l52 }} - q ∈ {{ &__malloc_main3_l53_0 }} - r ∈ {{ NULL ; &__malloc_main3_l52 ; &__malloc_main3_l53_0 }} + q ∈ {{ &__malloc_main3_l53 }} + r ∈ {{ NULL ; &__malloc_main3_l52 ; &__malloc_main3_l53 }} s ∈ UNINITIALIZED x ∈ UNINITIALIZED y ∈ UNINITIALIZED @@ -322,13 +322,13 @@ S_0___fc_env[0..1] ∈ [--..--] S_1___fc_env[0..1] ∈ [--..--] __malloc_main3_l52 ∈ {{ &x }} - __malloc_main3_l53_0 ∈ {{ &y }} + __malloc_main3_l53 ∈ {{ &y }} ==END OF DUMP== [eva] tests/builtins/realloc_multiple.c:65: Call to builtin Frama_C_realloc_multiple for function realloc [eva] tests/builtins/realloc_multiple.c:65: function realloc: precondition 'freeable' got status valid. -[eva:malloc] bases_to_realloc: {__malloc_main3_l53_0} +[eva:malloc] bases_to_realloc: {__malloc_main3_l53} [eva] tests/builtins/realloc_multiple.c:65: allocating variable __realloc_main3_l65 [eva:malloc] bases_to_realloc: {__malloc_main3_l52} @@ -338,13 +338,13 @@ [eva] tests/builtins/realloc_multiple.c:65: allocating variable __realloc_main3_l65_1 [eva:malloc] tests/builtins/realloc_multiple.c:65: - weak free on bases: {__malloc_main3_l52, __malloc_main3_l53_0} + weak free on bases: {__malloc_main3_l52, __malloc_main3_l53} +[eva:alarm] tests/builtins/realloc_multiple.c:66: Warning: + accessing uninitialized left-value. assert \initialized(s); [eva:alarm] tests/builtins/realloc_multiple.c:66: Warning: out of bounds read. assert \valid_read(s); [kernel] tests/builtins/realloc_multiple.c:66: Warning: all target addresses were invalid. This path is assumed to be dead. -[eva:alarm] tests/builtins/realloc_multiple.c:66: Warning: - accessing uninitialized left-value. assert \initialized(s); [eva] tests/builtins/realloc_multiple.c:67: Frama_C_dump_each: # Cvalue domain: @@ -362,9 +362,8 @@ __fc_wctomb_state ∈ [--..--] Frama_C_entropy_source ∈ [--..--] p ∈ {{ &__malloc_main3_l52 }} or ESCAPINGADDR - q ∈ {{ &__malloc_main3_l53_0 }} or ESCAPINGADDR - r ∈ - {{ NULL ; &__malloc_main3_l52 ; &__malloc_main3_l53_0 }} or ESCAPINGADDR + q ∈ {{ &__malloc_main3_l53 }} or ESCAPINGADDR + r ∈ {{ NULL ; &__malloc_main3_l52 ; &__malloc_main3_l53 }} or ESCAPINGADDR s ∈ {{ &__realloc_main3_l65[0] ; &__realloc_main3_l65_0[0] }} x ∈ {17} or UNINITIALIZED y ∈ {17} or UNINITIALIZED @@ -373,7 +372,7 @@ S_0___fc_env[0..1] ∈ [--..--] S_1___fc_env[0..1] ∈ [--..--] __malloc_main3_l52 ∈ {{ &x }} - __malloc_main3_l53_0 ∈ {{ &y }} + __malloc_main3_l53 ∈ {{ &y }} __realloc_main3_l65[0] ∈ {{ &y }} [1] ∈ UNINITIALIZED __realloc_main3_l65_0[0] ∈ {{ &x }} @@ -383,7 +382,7 @@ [eva:locals-escaping] tests/builtins/realloc_multiple.c:67: Warning: locals {x} escaping the scope of a block of main3 through __malloc_main3_l52 [eva:locals-escaping] tests/builtins/realloc_multiple.c:67: Warning: - locals {y} escaping the scope of a block of main3 through __malloc_main3_l53_0 + locals {y} escaping the scope of a block of main3 through __malloc_main3_l53 [eva:locals-escaping] tests/builtins/realloc_multiple.c:67: Warning: locals {y} escaping the scope of a block of main3 through __realloc_main3_l65 [eva:locals-escaping] tests/builtins/realloc_multiple.c:67: Warning: @@ -405,15 +404,14 @@ __fc_wctomb_state ∈ [--..--] Frama_C_entropy_source ∈ [--..--] p ∈ {{ &__malloc_main3_l52 }} or ESCAPINGADDR - q ∈ {{ &__malloc_main3_l53_0 }} or ESCAPINGADDR - r ∈ - {{ NULL ; &__malloc_main3_l52 ; &__malloc_main3_l53_0 }} or ESCAPINGADDR + q ∈ {{ &__malloc_main3_l53 }} or ESCAPINGADDR + r ∈ {{ NULL ; &__malloc_main3_l52 ; &__malloc_main3_l53 }} or ESCAPINGADDR s ∈ {{ &__realloc_main3_l65[0] ; &__realloc_main3_l65_0[0] }} v ∈ {3} S_0___fc_env[0..1] ∈ [--..--] S_1___fc_env[0..1] ∈ [--..--] __malloc_main3_l52 ∈ ESCAPINGADDR - __malloc_main3_l53_0 ∈ ESCAPINGADDR + __malloc_main3_l53 ∈ ESCAPINGADDR __realloc_main3_l65[0] ∈ ESCAPINGADDR [1] ∈ UNINITIALIZED __realloc_main3_l65_0[0] ∈ ESCAPINGADDR @@ -427,7 +425,7 @@ [eva] tests/builtins/realloc_multiple.c:70: function free: precondition 'freeable' got status valid. [eva:malloc] tests/builtins/realloc_multiple.c:70: - strong free on bases: {__malloc_main3_l53_0} + strong free on bases: {__malloc_main3_l53} [eva] Recording results for main3 [eva] Done for function main3 [eva] Recording results for main @@ -516,7 +514,7 @@ __fc_heap_status FROM __fc_heap_status (and SELF) Frama_C_entropy_source FROM Frama_C_entropy_source (and SELF) __malloc_main3_l52 FROM __fc_heap_status - __malloc_main3_l53_0 FROM __fc_heap_status + __malloc_main3_l53 FROM __fc_heap_status [from] Function main: __fc_heap_status FROM __fc_heap_status; v (and SELF) Frama_C_entropy_source FROM Frama_C_entropy_source; v (and SELF) @@ -525,7 +523,7 @@ __malloc_main2_l30[0..4] FROM __fc_heap_status; v (and SELF) __malloc_main2_l33[0..5] FROM __fc_heap_status; v (and SELF) __malloc_main3_l52 FROM __fc_heap_status; v (and SELF) - __malloc_main3_l53_0 FROM __fc_heap_status; v (and SELF) + __malloc_main3_l53 FROM __fc_heap_status; v (and SELF) [from] ====== END OF DEPENDENCIES ====== [inout] Out (internal) for function main1: __fc_heap_status; Frama_C_entropy_source; q; i; r; i_0; p; x; s; @@ -539,14 +537,14 @@ __fc_heap_status; Frama_C_entropy_source [inout] Out (internal) for function main3: __fc_heap_status; Frama_C_entropy_source; p; q; r; s; x; y; c; - __malloc_main3_l52; __malloc_main3_l53_0 + __malloc_main3_l52; __malloc_main3_l53 [inout] Inputs for function main3: __fc_heap_status; Frama_C_entropy_source; __realloc_main3_l65[0]; __realloc_main3_l65_0[0]; __realloc_main3_l65_1[0] [inout] Out (internal) for function main: __fc_heap_status; Frama_C_entropy_source; __malloc_main1_l9[0..4]; __malloc_main1_l12[0..5]; __malloc_main2_l30[0..4]; - __malloc_main2_l33[0..5]; __malloc_main3_l52; __malloc_main3_l53_0 + __malloc_main2_l33[0..5]; __malloc_main3_l52; __malloc_main3_l53 [inout] Inputs for function main: __fc_heap_status; Frama_C_entropy_source; __realloc_main3_l65[0]; __realloc_main3_l65_0[0]; __realloc_main3_l65_1[0] diff --git a/tests/float/oracle/some.0.res.oracle b/tests/float/oracle/some.0.res.oracle index 31cdda446cb..919ce1d7a0f 100644 --- a/tests/float/oracle/some.0.res.oracle +++ b/tests/float/oracle/some.0.res.oracle @@ -6,11 +6,16 @@ t[0] ∈ {1.0000000000000000} [1..54] ∈ {0} y ∈ {1.0000000000000000*2^-1} -[eva] Semantic level unrolling superposing up to 10 states -[eva] Semantic level unrolling superposing up to 20 states -[eva] Semantic level unrolling superposing up to 30 states -[eva] Semantic level unrolling superposing up to 40 states -[eva] Semantic level unrolling superposing up to 50 states +[eva] tests/float/some.c:11: + Semantic level unrolling superposing up to 10 states +[eva] tests/float/some.c:11: + Semantic level unrolling superposing up to 20 states +[eva] tests/float/some.c:11: + Semantic level unrolling superposing up to 30 states +[eva] tests/float/some.c:11: + Semantic level unrolling superposing up to 40 states +[eva] tests/float/some.c:11: + Semantic level unrolling superposing up to 50 states [eva] tests/float/some.c:16: Frama_C_dump_each: # Cvalue domain: diff --git a/tests/libc/oracle/string_c_strchr.res.oracle b/tests/libc/oracle/string_c_strchr.res.oracle index b6841160a62..cd933cfd49f 100644 --- a/tests/libc/oracle/string_c_strchr.res.oracle +++ b/tests/libc/oracle/string_c_strchr.res.oracle @@ -4,8 +4,10 @@ [eva] Initial state computed [eva:initial-state] Values of globals at initialization -[eva] Semantic level unrolling superposing up to 100 states -[eva] Semantic level unrolling superposing up to 200 states +[eva] tests/libc/string_c_strchr.c:57: + Semantic level unrolling superposing up to 100 states +[eva] tests/libc/string_c_strchr.c:59: + Semantic level unrolling superposing up to 200 states [eva] computing for function strchr <- main. Called from tests/libc/string_c_strchr.c:62. [eva] tests/libc/string_c_strchr.c:62: @@ -44,6 +46,8 @@ Called from tests/libc/string_c_strchr.c:67. [eva] tests/libc/string_c_strchr.c:67: function strchr: precondition 'valid_string_s' got status valid. +[eva] share/libc/string.c:229: + Semantic level unrolling superposing up to 100 states [eva] Recording results for strchr [eva] Done for function strchr [eva] computing for function strchr <- main. @@ -168,6 +172,8 @@ Called from tests/libc/string_c_strchr.c:87. [eva] tests/libc/string_c_strchr.c:87: function strchr: precondition 'valid_string_s' got status valid. +[eva] share/libc/string.c:229: + Semantic level unrolling superposing up to 200 states [eva] Recording results for strchr [eva] Done for function strchr [eva] computing for function strchr <- main. diff --git a/tests/libc/oracle/string_h.res.oracle b/tests/libc/oracle/string_h.res.oracle index 913d0fe0a7c..731e3e522c0 100644 --- a/tests/libc/oracle/string_h.res.oracle +++ b/tests/libc/oracle/string_h.res.oracle @@ -59,7 +59,8 @@ [eva] Done for function test_strstr [eva] computing for function test_strncat <- main. Called from tests/libc/string_h.c:115. -[eva] Semantic level unrolling superposing up to 100 states +[eva] tests/libc/string_h.c:34: + Semantic level unrolling superposing up to 100 states [eva] computing for function strncat <- test_strncat <- main. Called from tests/libc/string_h.c:36. [eva] using specification for function strncat diff --git a/tests/libc/oracle/unistd_h.0.res.oracle b/tests/libc/oracle/unistd_h.0.res.oracle index 78a30b4a80a..601aea128cd 100644 --- a/tests/libc/oracle/unistd_h.0.res.oracle +++ b/tests/libc/oracle/unistd_h.0.res.oracle @@ -222,12 +222,6 @@ [eva] computing for function getresgid <- main. Called from tests/libc/unistd_h.c:57. [eva] Done for function getresgid -[eva] computing for function getresgid <- main. - Called from tests/libc/unistd_h.c:57. -[eva] Done for function getresgid -[eva] computing for function getresgid <- main. - Called from tests/libc/unistd_h.c:57. -[eva] Done for function getresgid [eva] computing for function setresgid <- main. Called from tests/libc/unistd_h.c:59. [eva] using specification for function setresgid @@ -235,12 +229,6 @@ [eva] computing for function setresgid <- main. Called from tests/libc/unistd_h.c:59. [eva] Done for function setresgid -[eva] computing for function setresgid <- main. - Called from tests/libc/unistd_h.c:59. -[eva] Done for function setresgid -[eva] computing for function setresgid <- main. - Called from tests/libc/unistd_h.c:59. -[eva] Done for function setresgid [eva] tests/libc/unistd_h.c:60: assertion got status valid. [eva] computing for function getpid <- main. Called from tests/libc/unistd_h.c:62. @@ -255,18 +243,6 @@ [eva] computing for function getpid <- main. Called from tests/libc/unistd_h.c:62. [eva] Done for function getpid -[eva] computing for function getpid <- main. - Called from tests/libc/unistd_h.c:62. -[eva] Done for function getpid -[eva] computing for function getpid <- main. - Called from tests/libc/unistd_h.c:62. -[eva] Done for function getpid -[eva] computing for function getpid <- main. - Called from tests/libc/unistd_h.c:62. -[eva] Done for function getpid -[eva] computing for function getpid <- main. - Called from tests/libc/unistd_h.c:62. -[eva] Done for function getpid [eva] computing for function getppid <- main. Called from tests/libc/unistd_h.c:63. [eva] using specification for function getppid @@ -280,18 +256,6 @@ [eva] computing for function getppid <- main. Called from tests/libc/unistd_h.c:63. [eva] Done for function getppid -[eva] computing for function getppid <- main. - Called from tests/libc/unistd_h.c:63. -[eva] Done for function getppid -[eva] computing for function getppid <- main. - Called from tests/libc/unistd_h.c:63. -[eva] Done for function getppid -[eva] computing for function getppid <- main. - Called from tests/libc/unistd_h.c:63. -[eva] Done for function getppid -[eva] computing for function getppid <- main. - Called from tests/libc/unistd_h.c:63. -[eva] Done for function getppid [eva] computing for function getsid <- main. Called from tests/libc/unistd_h.c:64. [eva] using specification for function getsid @@ -305,18 +269,6 @@ [eva] computing for function getsid <- main. Called from tests/libc/unistd_h.c:64. [eva] Done for function getsid -[eva] computing for function getsid <- main. - Called from tests/libc/unistd_h.c:64. -[eva] Done for function getsid -[eva] computing for function getsid <- main. - Called from tests/libc/unistd_h.c:64. -[eva] Done for function getsid -[eva] computing for function getsid <- main. - Called from tests/libc/unistd_h.c:64. -[eva] Done for function getsid -[eva] computing for function getsid <- main. - Called from tests/libc/unistd_h.c:64. -[eva] Done for function getsid [eva] computing for function getuid <- main. Called from tests/libc/unistd_h.c:65. [eva] using specification for function getuid @@ -330,18 +282,6 @@ [eva] computing for function getuid <- main. Called from tests/libc/unistd_h.c:65. [eva] Done for function getuid -[eva] computing for function getuid <- main. - Called from tests/libc/unistd_h.c:65. -[eva] Done for function getuid -[eva] computing for function getuid <- main. - Called from tests/libc/unistd_h.c:65. -[eva] Done for function getuid -[eva] computing for function getuid <- main. - Called from tests/libc/unistd_h.c:65. -[eva] Done for function getuid -[eva] computing for function getuid <- main. - Called from tests/libc/unistd_h.c:65. -[eva] Done for function getuid [eva] computing for function getgid <- main. Called from tests/libc/unistd_h.c:66. [eva] using specification for function getgid @@ -355,18 +295,6 @@ [eva] computing for function getgid <- main. Called from tests/libc/unistd_h.c:66. [eva] Done for function getgid -[eva] computing for function getgid <- main. - Called from tests/libc/unistd_h.c:66. -[eva] Done for function getgid -[eva] computing for function getgid <- main. - Called from tests/libc/unistd_h.c:66. -[eva] Done for function getgid -[eva] computing for function getgid <- main. - Called from tests/libc/unistd_h.c:66. -[eva] Done for function getgid -[eva] computing for function getgid <- main. - Called from tests/libc/unistd_h.c:66. -[eva] Done for function getgid [eva] computing for function geteuid <- main. Called from tests/libc/unistd_h.c:67. [eva] using specification for function geteuid @@ -380,18 +308,6 @@ [eva] computing for function geteuid <- main. Called from tests/libc/unistd_h.c:67. [eva] Done for function geteuid -[eva] computing for function geteuid <- main. - Called from tests/libc/unistd_h.c:67. -[eva] Done for function geteuid -[eva] computing for function geteuid <- main. - Called from tests/libc/unistd_h.c:67. -[eva] Done for function geteuid -[eva] computing for function geteuid <- main. - Called from tests/libc/unistd_h.c:67. -[eva] Done for function geteuid -[eva] computing for function geteuid <- main. - Called from tests/libc/unistd_h.c:67. -[eva] Done for function geteuid [eva] computing for function getegid <- main. Called from tests/libc/unistd_h.c:68. [eva] using specification for function getegid @@ -405,18 +321,6 @@ [eva] computing for function getegid <- main. Called from tests/libc/unistd_h.c:68. [eva] Done for function getegid -[eva] computing for function getegid <- main. - Called from tests/libc/unistd_h.c:68. -[eva] Done for function getegid -[eva] computing for function getegid <- main. - Called from tests/libc/unistd_h.c:68. -[eva] Done for function getegid -[eva] computing for function getegid <- main. - Called from tests/libc/unistd_h.c:68. -[eva] Done for function getegid -[eva] computing for function getegid <- main. - Called from tests/libc/unistd_h.c:68. -[eva] Done for function getegid [eva] computing for function setegid <- main. Called from tests/libc/unistd_h.c:69. [eva] using specification for function setegid @@ -430,22 +334,19 @@ [eva] computing for function setegid <- main. Called from tests/libc/unistd_h.c:69. [eva] Done for function setegid -[eva] computing for function setegid <- main. - Called from tests/libc/unistd_h.c:69. -[eva] Done for function setegid -[eva] computing for function setegid <- main. - Called from tests/libc/unistd_h.c:69. -[eva] Done for function setegid -[eva] computing for function setegid <- main. - Called from tests/libc/unistd_h.c:69. -[eva] Done for function setegid -[eva] computing for function setegid <- main. - Called from tests/libc/unistd_h.c:69. -[eva] Done for function setegid [eva] computing for function seteuid <- main. Called from tests/libc/unistd_h.c:70. [eva] using specification for function seteuid [eva] Done for function seteuid +[eva] computing for function seteuid <- main. + Called from tests/libc/unistd_h.c:70. +[eva] Done for function seteuid +[eva] computing for function seteuid <- main. + Called from tests/libc/unistd_h.c:70. +[eva] Done for function seteuid +[eva] computing for function seteuid <- main. + Called from tests/libc/unistd_h.c:70. +[eva] Done for function seteuid [eva] computing for function setgid <- main. Called from tests/libc/unistd_h.c:71. [eva] using specification for function setgid @@ -453,6 +354,12 @@ [eva] computing for function setgid <- main. Called from tests/libc/unistd_h.c:71. [eva] Done for function setgid +[eva] computing for function setgid <- main. + Called from tests/libc/unistd_h.c:71. +[eva] Done for function setgid +[eva] computing for function setgid <- main. + Called from tests/libc/unistd_h.c:71. +[eva] Done for function setgid [eva] computing for function setuid <- main. Called from tests/libc/unistd_h.c:72. [eva] using specification for function setuid @@ -460,6 +367,12 @@ [eva] computing for function setuid <- main. Called from tests/libc/unistd_h.c:72. [eva] Done for function setuid +[eva] computing for function setuid <- main. + Called from tests/libc/unistd_h.c:72. +[eva] Done for function setuid +[eva] computing for function setuid <- main. + Called from tests/libc/unistd_h.c:72. +[eva] Done for function setuid [eva] computing for function setregid <- main. Called from tests/libc/unistd_h.c:73. [eva] using specification for function setregid @@ -467,6 +380,12 @@ [eva] computing for function setregid <- main. Called from tests/libc/unistd_h.c:73. [eva] Done for function setregid +[eva] computing for function setregid <- main. + Called from tests/libc/unistd_h.c:73. +[eva] Done for function setregid +[eva] computing for function setregid <- main. + Called from tests/libc/unistd_h.c:73. +[eva] Done for function setregid [eva] computing for function setreuid <- main. Called from tests/libc/unistd_h.c:74. [eva] using specification for function setreuid @@ -474,6 +393,12 @@ [eva] computing for function setreuid <- main. Called from tests/libc/unistd_h.c:74. [eva] Done for function setreuid +[eva] computing for function setreuid <- main. + Called from tests/libc/unistd_h.c:74. +[eva] Done for function setreuid +[eva] computing for function setreuid <- main. + Called from tests/libc/unistd_h.c:74. +[eva] Done for function setreuid [eva] computing for function getpgid <- main. Called from tests/libc/unistd_h.c:75. [eva] using specification for function getpgid @@ -481,6 +406,12 @@ [eva] computing for function getpgid <- main. Called from tests/libc/unistd_h.c:75. [eva] Done for function getpgid +[eva] computing for function getpgid <- main. + Called from tests/libc/unistd_h.c:75. +[eva] Done for function getpgid +[eva] computing for function getpgid <- main. + Called from tests/libc/unistd_h.c:75. +[eva] Done for function getpgid [eva] computing for function setpgid <- main. Called from tests/libc/unistd_h.c:75. [eva] using specification for function setpgid @@ -488,6 +419,12 @@ [eva] computing for function setpgid <- main. Called from tests/libc/unistd_h.c:75. [eva] Done for function setpgid +[eva] computing for function setpgid <- main. + Called from tests/libc/unistd_h.c:75. +[eva] Done for function setpgid +[eva] computing for function setpgid <- main. + Called from tests/libc/unistd_h.c:75. +[eva] Done for function setpgid [eva] computing for function getpgrp <- main. Called from tests/libc/unistd_h.c:76. [eva] using specification for function getpgrp @@ -495,12 +432,21 @@ [eva] computing for function getpgrp <- main. Called from tests/libc/unistd_h.c:76. [eva] Done for function getpgrp +[eva] computing for function getpgrp <- main. + Called from tests/libc/unistd_h.c:76. +[eva] Done for function getpgrp +[eva] computing for function getpgrp <- main. + Called from tests/libc/unistd_h.c:76. +[eva] Done for function getpgrp [eva] computing for function unlink <- main. Called from tests/libc/unistd_h.c:78. [eva] using specification for function unlink [eva] tests/libc/unistd_h.c:78: function unlink: precondition 'valid_string_path' got status valid. [eva] Done for function unlink +[eva] computing for function unlink <- main. + Called from tests/libc/unistd_h.c:78. +[eva] Done for function unlink [eva] computing for function isatty <- main. Called from tests/libc/unistd_h.c:80. [eva] using specification for function isatty @@ -508,6 +454,12 @@ [eva] computing for function isatty <- main. Called from tests/libc/unistd_h.c:80. [eva] Done for function isatty +[eva] computing for function isatty <- main. + Called from tests/libc/unistd_h.c:80. +[eva] Done for function isatty +[eva] computing for function isatty <- main. + Called from tests/libc/unistd_h.c:80. +[eva] Done for function isatty [eva] tests/libc/unistd_h.c:81: assertion got status valid. [eva] computing for function ttyname <- main. Called from tests/libc/unistd_h.c:82. @@ -516,6 +468,12 @@ [eva] computing for function ttyname <- main. Called from tests/libc/unistd_h.c:82. [eva] Done for function ttyname +[eva] computing for function ttyname <- main. + Called from tests/libc/unistd_h.c:82. +[eva] Done for function ttyname +[eva] computing for function ttyname <- main. + Called from tests/libc/unistd_h.c:82. +[eva] Done for function ttyname [eva] computing for function chown <- main. Called from tests/libc/unistd_h.c:84. [eva] using specification for function chown @@ -531,6 +489,18 @@ [eva] computing for function chown <- main. Called from tests/libc/unistd_h.c:84. [eva] Done for function chown +[eva] computing for function chown <- main. + Called from tests/libc/unistd_h.c:84. +[eva] Done for function chown +[eva] computing for function chown <- main. + Called from tests/libc/unistd_h.c:84. +[eva] Done for function chown +[eva] computing for function chown <- main. + Called from tests/libc/unistd_h.c:84. +[eva] Done for function chown +[eva] computing for function chown <- main. + Called from tests/libc/unistd_h.c:84. +[eva] Done for function chown [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== diff --git a/tests/libc/oracle/unistd_h.1.res.oracle b/tests/libc/oracle/unistd_h.1.res.oracle index 78e0c0de0e6..c0be6ee4a9a 100644 --- a/tests/libc/oracle/unistd_h.1.res.oracle +++ b/tests/libc/oracle/unistd_h.1.res.oracle @@ -222,12 +222,6 @@ [eva] computing for function getresgid <- main. Called from tests/libc/unistd_h.c:57. [eva] Done for function getresgid -[eva] computing for function getresgid <- main. - Called from tests/libc/unistd_h.c:57. -[eva] Done for function getresgid -[eva] computing for function getresgid <- main. - Called from tests/libc/unistd_h.c:57. -[eva] Done for function getresgid [eva] computing for function setresgid <- main. Called from tests/libc/unistd_h.c:59. [eva] using specification for function setresgid @@ -235,12 +229,6 @@ [eva] computing for function setresgid <- main. Called from tests/libc/unistd_h.c:59. [eva] Done for function setresgid -[eva] computing for function setresgid <- main. - Called from tests/libc/unistd_h.c:59. -[eva] Done for function setresgid -[eva] computing for function setresgid <- main. - Called from tests/libc/unistd_h.c:59. -[eva] Done for function setresgid [eva] tests/libc/unistd_h.c:60: assertion got status valid. [eva] computing for function getpid <- main. Called from tests/libc/unistd_h.c:62. @@ -255,18 +243,6 @@ [eva] computing for function getpid <- main. Called from tests/libc/unistd_h.c:62. [eva] Done for function getpid -[eva] computing for function getpid <- main. - Called from tests/libc/unistd_h.c:62. -[eva] Done for function getpid -[eva] computing for function getpid <- main. - Called from tests/libc/unistd_h.c:62. -[eva] Done for function getpid -[eva] computing for function getpid <- main. - Called from tests/libc/unistd_h.c:62. -[eva] Done for function getpid -[eva] computing for function getpid <- main. - Called from tests/libc/unistd_h.c:62. -[eva] Done for function getpid [eva] computing for function getppid <- main. Called from tests/libc/unistd_h.c:63. [eva] using specification for function getppid @@ -280,18 +256,6 @@ [eva] computing for function getppid <- main. Called from tests/libc/unistd_h.c:63. [eva] Done for function getppid -[eva] computing for function getppid <- main. - Called from tests/libc/unistd_h.c:63. -[eva] Done for function getppid -[eva] computing for function getppid <- main. - Called from tests/libc/unistd_h.c:63. -[eva] Done for function getppid -[eva] computing for function getppid <- main. - Called from tests/libc/unistd_h.c:63. -[eva] Done for function getppid -[eva] computing for function getppid <- main. - Called from tests/libc/unistd_h.c:63. -[eva] Done for function getppid [eva] computing for function getsid <- main. Called from tests/libc/unistd_h.c:64. [eva] using specification for function getsid @@ -305,18 +269,6 @@ [eva] computing for function getsid <- main. Called from tests/libc/unistd_h.c:64. [eva] Done for function getsid -[eva] computing for function getsid <- main. - Called from tests/libc/unistd_h.c:64. -[eva] Done for function getsid -[eva] computing for function getsid <- main. - Called from tests/libc/unistd_h.c:64. -[eva] Done for function getsid -[eva] computing for function getsid <- main. - Called from tests/libc/unistd_h.c:64. -[eva] Done for function getsid -[eva] computing for function getsid <- main. - Called from tests/libc/unistd_h.c:64. -[eva] Done for function getsid [eva] computing for function getuid <- main. Called from tests/libc/unistd_h.c:65. [eva] using specification for function getuid @@ -330,18 +282,6 @@ [eva] computing for function getuid <- main. Called from tests/libc/unistd_h.c:65. [eva] Done for function getuid -[eva] computing for function getuid <- main. - Called from tests/libc/unistd_h.c:65. -[eva] Done for function getuid -[eva] computing for function getuid <- main. - Called from tests/libc/unistd_h.c:65. -[eva] Done for function getuid -[eva] computing for function getuid <- main. - Called from tests/libc/unistd_h.c:65. -[eva] Done for function getuid -[eva] computing for function getuid <- main. - Called from tests/libc/unistd_h.c:65. -[eva] Done for function getuid [eva] computing for function getgid <- main. Called from tests/libc/unistd_h.c:66. [eva] using specification for function getgid @@ -355,18 +295,6 @@ [eva] computing for function getgid <- main. Called from tests/libc/unistd_h.c:66. [eva] Done for function getgid -[eva] computing for function getgid <- main. - Called from tests/libc/unistd_h.c:66. -[eva] Done for function getgid -[eva] computing for function getgid <- main. - Called from tests/libc/unistd_h.c:66. -[eva] Done for function getgid -[eva] computing for function getgid <- main. - Called from tests/libc/unistd_h.c:66. -[eva] Done for function getgid -[eva] computing for function getgid <- main. - Called from tests/libc/unistd_h.c:66. -[eva] Done for function getgid [eva] computing for function geteuid <- main. Called from tests/libc/unistd_h.c:67. [eva] using specification for function geteuid @@ -380,18 +308,6 @@ [eva] computing for function geteuid <- main. Called from tests/libc/unistd_h.c:67. [eva] Done for function geteuid -[eva] computing for function geteuid <- main. - Called from tests/libc/unistd_h.c:67. -[eva] Done for function geteuid -[eva] computing for function geteuid <- main. - Called from tests/libc/unistd_h.c:67. -[eva] Done for function geteuid -[eva] computing for function geteuid <- main. - Called from tests/libc/unistd_h.c:67. -[eva] Done for function geteuid -[eva] computing for function geteuid <- main. - Called from tests/libc/unistd_h.c:67. -[eva] Done for function geteuid [eva] computing for function getegid <- main. Called from tests/libc/unistd_h.c:68. [eva] using specification for function getegid @@ -405,18 +321,6 @@ [eva] computing for function getegid <- main. Called from tests/libc/unistd_h.c:68. [eva] Done for function getegid -[eva] computing for function getegid <- main. - Called from tests/libc/unistd_h.c:68. -[eva] Done for function getegid -[eva] computing for function getegid <- main. - Called from tests/libc/unistd_h.c:68. -[eva] Done for function getegid -[eva] computing for function getegid <- main. - Called from tests/libc/unistd_h.c:68. -[eva] Done for function getegid -[eva] computing for function getegid <- main. - Called from tests/libc/unistd_h.c:68. -[eva] Done for function getegid [eva] computing for function setegid <- main. Called from tests/libc/unistd_h.c:69. [eva] using specification for function setegid @@ -430,22 +334,19 @@ [eva] computing for function setegid <- main. Called from tests/libc/unistd_h.c:69. [eva] Done for function setegid -[eva] computing for function setegid <- main. - Called from tests/libc/unistd_h.c:69. -[eva] Done for function setegid -[eva] computing for function setegid <- main. - Called from tests/libc/unistd_h.c:69. -[eva] Done for function setegid -[eva] computing for function setegid <- main. - Called from tests/libc/unistd_h.c:69. -[eva] Done for function setegid -[eva] computing for function setegid <- main. - Called from tests/libc/unistd_h.c:69. -[eva] Done for function setegid [eva] computing for function seteuid <- main. Called from tests/libc/unistd_h.c:70. [eva] using specification for function seteuid [eva] Done for function seteuid +[eva] computing for function seteuid <- main. + Called from tests/libc/unistd_h.c:70. +[eva] Done for function seteuid +[eva] computing for function seteuid <- main. + Called from tests/libc/unistd_h.c:70. +[eva] Done for function seteuid +[eva] computing for function seteuid <- main. + Called from tests/libc/unistd_h.c:70. +[eva] Done for function seteuid [eva] computing for function setgid <- main. Called from tests/libc/unistd_h.c:71. [eva] using specification for function setgid @@ -453,6 +354,12 @@ [eva] computing for function setgid <- main. Called from tests/libc/unistd_h.c:71. [eva] Done for function setgid +[eva] computing for function setgid <- main. + Called from tests/libc/unistd_h.c:71. +[eva] Done for function setgid +[eva] computing for function setgid <- main. + Called from tests/libc/unistd_h.c:71. +[eva] Done for function setgid [eva] computing for function setuid <- main. Called from tests/libc/unistd_h.c:72. [eva] using specification for function setuid @@ -460,6 +367,12 @@ [eva] computing for function setuid <- main. Called from tests/libc/unistd_h.c:72. [eva] Done for function setuid +[eva] computing for function setuid <- main. + Called from tests/libc/unistd_h.c:72. +[eva] Done for function setuid +[eva] computing for function setuid <- main. + Called from tests/libc/unistd_h.c:72. +[eva] Done for function setuid [eva] computing for function setregid <- main. Called from tests/libc/unistd_h.c:73. [eva] using specification for function setregid @@ -467,6 +380,12 @@ [eva] computing for function setregid <- main. Called from tests/libc/unistd_h.c:73. [eva] Done for function setregid +[eva] computing for function setregid <- main. + Called from tests/libc/unistd_h.c:73. +[eva] Done for function setregid +[eva] computing for function setregid <- main. + Called from tests/libc/unistd_h.c:73. +[eva] Done for function setregid [eva] computing for function setreuid <- main. Called from tests/libc/unistd_h.c:74. [eva] using specification for function setreuid @@ -474,6 +393,12 @@ [eva] computing for function setreuid <- main. Called from tests/libc/unistd_h.c:74. [eva] Done for function setreuid +[eva] computing for function setreuid <- main. + Called from tests/libc/unistd_h.c:74. +[eva] Done for function setreuid +[eva] computing for function setreuid <- main. + Called from tests/libc/unistd_h.c:74. +[eva] Done for function setreuid [eva] computing for function getpgid <- main. Called from tests/libc/unistd_h.c:75. [eva] using specification for function getpgid @@ -481,6 +406,12 @@ [eva] computing for function getpgid <- main. Called from tests/libc/unistd_h.c:75. [eva] Done for function getpgid +[eva] computing for function getpgid <- main. + Called from tests/libc/unistd_h.c:75. +[eva] Done for function getpgid +[eva] computing for function getpgid <- main. + Called from tests/libc/unistd_h.c:75. +[eva] Done for function getpgid [eva] computing for function setpgid <- main. Called from tests/libc/unistd_h.c:75. [eva] using specification for function setpgid @@ -488,6 +419,12 @@ [eva] computing for function setpgid <- main. Called from tests/libc/unistd_h.c:75. [eva] Done for function setpgid +[eva] computing for function setpgid <- main. + Called from tests/libc/unistd_h.c:75. +[eva] Done for function setpgid +[eva] computing for function setpgid <- main. + Called from tests/libc/unistd_h.c:75. +[eva] Done for function setpgid [eva] computing for function getpgrp <- main. Called from tests/libc/unistd_h.c:76. [eva] using specification for function getpgrp @@ -495,12 +432,21 @@ [eva] computing for function getpgrp <- main. Called from tests/libc/unistd_h.c:76. [eva] Done for function getpgrp +[eva] computing for function getpgrp <- main. + Called from tests/libc/unistd_h.c:76. +[eva] Done for function getpgrp +[eva] computing for function getpgrp <- main. + Called from tests/libc/unistd_h.c:76. +[eva] Done for function getpgrp [eva] computing for function unlink <- main. Called from tests/libc/unistd_h.c:78. [eva] using specification for function unlink [eva] tests/libc/unistd_h.c:78: function unlink: precondition 'valid_string_path' got status valid. [eva] Done for function unlink +[eva] computing for function unlink <- main. + Called from tests/libc/unistd_h.c:78. +[eva] Done for function unlink [eva] computing for function isatty <- main. Called from tests/libc/unistd_h.c:80. [eva] using specification for function isatty @@ -508,6 +454,12 @@ [eva] computing for function isatty <- main. Called from tests/libc/unistd_h.c:80. [eva] Done for function isatty +[eva] computing for function isatty <- main. + Called from tests/libc/unistd_h.c:80. +[eva] Done for function isatty +[eva] computing for function isatty <- main. + Called from tests/libc/unistd_h.c:80. +[eva] Done for function isatty [eva] tests/libc/unistd_h.c:81: assertion got status valid. [eva] computing for function ttyname <- main. Called from tests/libc/unistd_h.c:82. @@ -516,6 +468,12 @@ [eva] computing for function ttyname <- main. Called from tests/libc/unistd_h.c:82. [eva] Done for function ttyname +[eva] computing for function ttyname <- main. + Called from tests/libc/unistd_h.c:82. +[eva] Done for function ttyname +[eva] computing for function ttyname <- main. + Called from tests/libc/unistd_h.c:82. +[eva] Done for function ttyname [eva] computing for function chown <- main. Called from tests/libc/unistd_h.c:84. [eva] using specification for function chown @@ -531,6 +489,18 @@ [eva] computing for function chown <- main. Called from tests/libc/unistd_h.c:84. [eva] Done for function chown +[eva] computing for function chown <- main. + Called from tests/libc/unistd_h.c:84. +[eva] Done for function chown +[eva] computing for function chown <- main. + Called from tests/libc/unistd_h.c:84. +[eva] Done for function chown +[eva] computing for function chown <- main. + Called from tests/libc/unistd_h.c:84. +[eva] Done for function chown +[eva] computing for function chown <- main. + Called from tests/libc/unistd_h.c:84. +[eva] Done for function chown [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== diff --git a/tests/slicing/oracle/if_many_values.res.oracle b/tests/slicing/oracle/if_many_values.res.oracle index 37a2e138f4e..b9a574da2ca 100644 --- a/tests/slicing/oracle/if_many_values.res.oracle +++ b/tests/slicing/oracle/if_many_values.res.oracle @@ -5,7 +5,8 @@ [eva] Initial state computed [eva:initial-state] Values of globals at initialization r ∈ {1} -[eva] Semantic level unrolling superposing up to 100 states +[eva] tests/slicing/if_many_values.i:8: + Semantic level unrolling superposing up to 100 states [eva] tests/slicing/if_many_values.i:8: starting to merge loop iterations [eva:alarm] tests/slicing/if_many_values.i:11: Warning: signed overflow. assert r + 1 ≤ 2147483647; diff --git a/tests/value/oracle/bitwise.res.oracle b/tests/value/oracle/bitwise.res.oracle index 29d9bbe2322..253b81df5d1 100644 --- a/tests/value/oracle/bitwise.res.oracle +++ b/tests/value/oracle/bitwise.res.oracle @@ -34,12 +34,12 @@ [eva] computing for function test4 <- main. Called from tests/value/bitwise.i:141. [eva] tests/value/bitwise.i:62: assertion got status valid. -[eva] tests/value/bitwise.i:64: Frama_C_show_each_1: [0..0x7FFFFFFF], {0} [eva] tests/value/bitwise.i:64: Frama_C_show_each_1: [0x80000000..0xFFFFFFFF], {0x80000000} -[eva] tests/value/bitwise.i:66: Frama_C_show_each_2: [0..0x7FFFFFFF], {0}, {0} +[eva] tests/value/bitwise.i:64: Frama_C_show_each_1: [0..0x7FFFFFFF], {0} [eva] tests/value/bitwise.i:66: Frama_C_show_each_2: [0..0x7FFFFFFF], {0}, {0x80000000} +[eva] tests/value/bitwise.i:66: Frama_C_show_each_2: [0..0x7FFFFFFF], {0}, {0} [eva] tests/value/bitwise.i:72: Frama_C_show_each_false: [0..0x7FFFFFFF] [eva] tests/value/bitwise.i:72: Frama_C_show_each_false: [0..0x7FFFFFFF] [eva] Recording results for test4 diff --git a/tests/value/oracle/builtins_split.res.oracle b/tests/value/oracle/builtins_split.res.oracle index f31146d1dea..150538b4442 100644 --- a/tests/value/oracle/builtins_split.res.oracle +++ b/tests/value/oracle/builtins_split.res.oracle @@ -29,8 +29,8 @@ [eva] tests/value/builtins_split.c:23: Frama_C_show_each_split: {{ &x ; &y }} [eva] tests/value/builtins_split.c:25: Call to builtin Frama_C_builtin_split_pointer -[eva] tests/value/builtins_split.c:26: Frama_C_show_each_split_pointer: {{ &x }} [eva] tests/value/builtins_split.c:26: Frama_C_show_each_split_pointer: {{ &y }} +[eva] tests/value/builtins_split.c:26: Frama_C_show_each_split_pointer: {{ &x }} [eva] Recording results for test1 [eva] Done for function test1 [eva] computing for function test2 <- main. @@ -62,40 +62,12 @@ [eva:alarm] tests/value/builtins_split.c:96: Warning: out of bounds read. assert \valid_read(&(ps->p)->p); [eva] tests/value/builtins_split.c:96: Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:96: Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:96: Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:96: Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:96: Call to builtin Frama_C_builtin_split_all [eva] tests/value/builtins_split.c:99: Frama_C_show_each_s_3: {{ &s5 + {4} }}, {{ &s3 + {4} }}, {{ &s1 }}, {1} [eva:alarm] tests/value/builtins_split.c:104: Warning: out of bounds read. assert \valid_read(&(ps->p)->p); [eva] tests/value/builtins_split.c:104: Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:104: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:104: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:104: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:104: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:104: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:104: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:104: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:104: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:104: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:104: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:104: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:104: - Call to builtin Frama_C_builtin_split_all [eva:alarm] tests/value/builtins_split.c:106: Warning: assertion got status invalid (stopping propagation). [eva] tests/value/builtins_split.c:106: assertion got status valid. @@ -107,51 +79,22 @@ Call to builtin Frama_C_builtin_split_all [eva] tests/value/builtins_split.c:112: Location ((ps->p)->p)->v points to too many values ([--..--]). Cannot split. -[eva] tests/value/builtins_split.c:112: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:112: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:112: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:112: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:112: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:112: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:112: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:112: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:112: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:112: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:112: - Call to builtin Frama_C_builtin_split_all -[eva] tests/value/builtins_split.c:112: - Call to builtin Frama_C_builtin_split_all [eva] tests/value/builtins_split.c:114: - Frama_C_show_each_s_5: - {{ &s6 + {4} }}, {{ &s4 + {4} }}, {{ &s2 }}, [-2147483648..2147483647] -[eva] tests/value/builtins_split.c:114: - Frama_C_show_each_s_5: {{ &s6 + {4} }}, {{ &s4 + {4} }}, {{ &s0 }}, {0} -[eva] tests/value/builtins_split.c:114: - Frama_C_show_each_s_5: {{ &s5 + {4} }}, {{ &s3 + {4} }}, {{ &s1 }}, {-1} -[eva] tests/value/builtins_split.c:114: - Frama_C_show_each_s_5: {{ &s5 + {4} }}, {{ &s3 + {4} }}, {{ &s0 }}, {0} + Frama_C_show_each_s_5: {{ &s5 + {4} }}, {{ &s4 + {4} }}, {{ &s0 }}, {0} [eva] tests/value/builtins_split.c:114: Frama_C_show_each_s_5: {{ &s5 + {4} }}, {{ &s4 + {4} }}, {{ &s2 }}, [-2147483648..2147483647] [eva] tests/value/builtins_split.c:114: - Frama_C_show_each_s_5: {{ &s5 + {4} }}, {{ &s4 + {4} }}, {{ &s0 }}, {0} + Frama_C_show_each_s_5: {{ &s5 + {4} }}, {{ &s3 + {4} }}, {{ &s0 }}, {0} [eva] tests/value/builtins_split.c:114: - Frama_C_show_each_s_5: - {{ &s6 + {4} }}, {{ &s4 + {4} }}, {{ &s2 }}, [-2147483648..2147483647] + Frama_C_show_each_s_5: {{ &s5 + {4} }}, {{ &s3 + {4} }}, {{ &s1 }}, {1} +[eva] tests/value/builtins_split.c:114: + Frama_C_show_each_s_5: {{ &s5 + {4} }}, {{ &s3 + {4} }}, {{ &s1 }}, {-1} [eva] tests/value/builtins_split.c:114: Frama_C_show_each_s_5: {{ &s6 + {4} }}, {{ &s4 + {4} }}, {{ &s0 }}, {0} [eva] tests/value/builtins_split.c:114: - Frama_C_show_each_s_5: {{ &s5 + {4} }}, {{ &s3 + {4} }}, {{ &s1 }}, {1} + Frama_C_show_each_s_5: + {{ &s6 + {4} }}, {{ &s4 + {4} }}, {{ &s2 }}, [-2147483648..2147483647] [eva] Recording results for test3 [eva] Done for function test3 [eva] computing for function test4 <- main. @@ -166,35 +109,35 @@ Location x_0 points to too many values ([-3..25]). Cannot split. [eva] tests/value/builtins_split.c:125: Frama_C_show_each_test4_1: [-3..25] [eva] tests/value/builtins_split.c:127: Call to builtin Frama_C_builtin_split -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {-3} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {-2} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {-1} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {0} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {1} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {2} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {3} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {4} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {5} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {6} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {7} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {8} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {9} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {10} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {11} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {12} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {13} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {14} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {15} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {16} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {17} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {18} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {19} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {20} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {21} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {22} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {23} -[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {24} [eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {25} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {24} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {23} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {22} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {21} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {20} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {19} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {18} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {17} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {16} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {15} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {14} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {13} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {12} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {11} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {10} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {9} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {8} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {7} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {6} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {5} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {4} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {3} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {2} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {1} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {0} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {-1} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {-2} +[eva] tests/value/builtins_split.c:128: Frama_C_show_each_test4_2: {-3} [eva] Recording results for test4 [eva] Done for function test4 [eva] computing for function test5 <- main. @@ -212,22 +155,22 @@ [eva] tests/value/builtins_split.c:145: Call to builtin Frama_C_builtin_split [eva] tests/value/builtins_split.c:146: Frama_C_domain_show_each_test6: - z : # Cvalue domain: {0} or UNINITIALIZED + z : # Cvalue domain: {5} or UNINITIALIZED [eva] tests/value/builtins_split.c:146: Frama_C_domain_show_each_test6: - z : # Cvalue domain: {1} or UNINITIALIZED + z : # Cvalue domain: {4} or UNINITIALIZED [eva] tests/value/builtins_split.c:146: Frama_C_domain_show_each_test6: - z : # Cvalue domain: {2} or UNINITIALIZED + z : # Cvalue domain: {3} or UNINITIALIZED [eva] tests/value/builtins_split.c:146: Frama_C_domain_show_each_test6: - z : # Cvalue domain: {3} or UNINITIALIZED + z : # Cvalue domain: {2} or UNINITIALIZED [eva] tests/value/builtins_split.c:146: Frama_C_domain_show_each_test6: - z : # Cvalue domain: {4} or UNINITIALIZED + z : # Cvalue domain: {1} or UNINITIALIZED [eva] tests/value/builtins_split.c:146: Frama_C_domain_show_each_test6: - z : # Cvalue domain: {5} or UNINITIALIZED + z : # Cvalue domain: {0} or UNINITIALIZED [eva] Recording results for test6 [eva] Done for function test6 [eva] Recording results for main diff --git a/tests/value/oracle/hierarchical_convergence.res.oracle b/tests/value/oracle/hierarchical_convergence.res.oracle index 01bce6d8a63..6109b4ff087 100644 --- a/tests/value/oracle/hierarchical_convergence.res.oracle +++ b/tests/value/oracle/hierarchical_convergence.res.oracle @@ -10,21 +10,18 @@ [eva] tests/value/hierarchical_convergence.c:7: starting to merge loop iterations [eva] tests/value/hierarchical_convergence.c:8: Frama_C_show_each: {0; 1} -[eva] tests/value/hierarchical_convergence.c:10: Frama_C_show_each: {1}, {0} [eva] tests/value/hierarchical_convergence.c:9: starting to merge loop iterations +[eva] tests/value/hierarchical_convergence.c:10: Frama_C_show_each: {1}, {0} [eva] tests/value/hierarchical_convergence.c:8: Frama_C_show_each: {0; 1; 2} -[eva] tests/value/hierarchical_convergence.c:10: Frama_C_show_each: {1; 2}, {0} -[eva] tests/value/hierarchical_convergence.c:10: - Frama_C_show_each: {1; 2}, {0; 1} -[eva] tests/value/hierarchical_convergence.c:8: Frama_C_show_each: [0..99] -[eva] tests/value/hierarchical_convergence.c:10: Frama_C_show_each: [1..99], {0} [eva] tests/value/hierarchical_convergence.c:10: - Frama_C_show_each: [1..99], {0; 1} + Frama_C_show_each: [1..2147483647], {0; 1} [eva] tests/value/hierarchical_convergence.c:10: - Frama_C_show_each: [1..99], {0; 1; 2} + Frama_C_show_each: [1..2147483647], {0; 1; 2} [eva] tests/value/hierarchical_convergence.c:10: - Frama_C_show_each: [1..99], [0..98] + Frama_C_show_each: [1..2147483647], [0..2147483646] +[eva:alarm] tests/value/hierarchical_convergence.c:7: Warning: + signed overflow. assert i + 1 ≤ 2147483647; [eva] tests/value/hierarchical_convergence.c:8: Frama_C_show_each: [0..99] [eva:alarm] tests/value/hierarchical_convergence.c:15: Warning: accessing uninitialized left-value. assert \initialized(&j); @@ -48,7 +45,7 @@ [from] ====== DEPENDENCIES COMPUTED ====== These dependencies hold at termination for the executions that terminate: [from] Function f: - \result FROM \nothing + \result FROM n [from] Function main: NO EFFECTS [from] ====== END OF DEPENDENCIES ====== diff --git a/tests/value/oracle/initialized.res.oracle b/tests/value/oracle/initialized.res.oracle index 527b4570d7e..79cf5c4a312 100644 --- a/tests/value/oracle/initialized.res.oracle +++ b/tests/value/oracle/initialized.res.oracle @@ -158,6 +158,8 @@ [eva] computing for function f <- g3 <- main. Called from tests/value/initialized.c:98. [eva] tests/value/initialized.c:11: starting to merge loop iterations +[eva:alarm] tests/value/initialized.c:8: Warning: + function f: postcondition got status invalid. [eva:alarm] tests/value/initialized.c:8: Warning: function f: postcondition got status unknown. [eva] Recording results for f diff --git a/tests/value/oracle/local_slevel.res.oracle b/tests/value/oracle/local_slevel.res.oracle index feccc39bc87..ecb1201e61c 100644 --- a/tests/value/oracle/local_slevel.res.oracle +++ b/tests/value/oracle/local_slevel.res.oracle @@ -88,7 +88,8 @@ [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {47} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {48} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {49} -[eva] Semantic level unrolling superposing up to 100 states +[eva] tests/value/local_slevel.i:43: + Semantic level unrolling superposing up to 100 states [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {50} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {51} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {52} @@ -139,7 +140,8 @@ [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {97} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {98} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {99} -[eva] Semantic level unrolling superposing up to 200 states +[eva] tests/value/local_slevel.i:43: + Semantic level unrolling superposing up to 200 states [eva] Recording results for main2 [eva] Done for function main2 [eva] Recording results for main @@ -466,7 +468,8 @@ void main(void) [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {47} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {48} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {49} -[eva] Semantic level unrolling superposing up to 100 states +[eva] tests/value/local_slevel.i:43: + Semantic level unrolling superposing up to 100 states [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {50} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {51} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {52} @@ -517,7 +520,8 @@ void main(void) [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {97} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {98} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {99} -[eva] Semantic level unrolling superposing up to 200 states +[eva] tests/value/local_slevel.i:43: + Semantic level unrolling superposing up to 200 states [eva] Recording results for main2 [eva] Done for function main2 [eva] Recording results for main diff --git a/tests/value/oracle/narrow_behaviors.res.oracle b/tests/value/oracle/narrow_behaviors.res.oracle index 6c5857f3dc1..387fa60829a 100644 --- a/tests/value/oracle/narrow_behaviors.res.oracle +++ b/tests/value/oracle/narrow_behaviors.res.oracle @@ -11,36 +11,37 @@ [eva] tests/value/narrow_behaviors.i:56: Frama_C_dump_each: # Cvalue domain: - nondet ∈ {0} - p{.x; .y} ∈ {1} + nondet ∈ [--..--] + p.x ∈ {2} + .y ∈ {1; 2} __retres ∈ UNINITIALIZED ==END OF DUMP== [eva] tests/value/narrow_behaviors.i:56: Frama_C_dump_each: # Cvalue domain: - nondet ∈ [--..--] - p.x ∈ {2} - .y ∈ {1; 2} + nondet ∈ {0} + p{.x; .y} ∈ {1} __retres ∈ UNINITIALIZED ==END OF DUMP== [eva] computing for function f2 <- main. Called from tests/value/narrow_behaviors.i:57. [eva] using specification for function f2 +[eva] Done for function f2 +[eva] computing for function f2 <- main. + Called from tests/value/narrow_behaviors.i:57. [eva] tests/value/narrow_behaviors.i:57: function f2, behavior b: assumes got status invalid; behavior not evaluated. [eva] tests/value/narrow_behaviors.i:57: function f2, behavior c: assumes got status invalid; behavior not evaluated. [eva] Done for function f2 -[eva] computing for function f2 <- main. - Called from tests/value/narrow_behaviors.i:57. -[eva] Done for function f2 [eva] tests/value/narrow_behaviors.i:57: Frama_C_dump_each: # Cvalue domain: - nondet ∈ {0} - p{.x; .y} ∈ {1} - q.x ∈ {1; 2} - .y ∈ {1} + nondet ∈ [--..--] + p.x ∈ {2} + .y ∈ {1; 2} + q.x ∈ {2} + .y ∈ {1; 2} __retres ∈ UNINITIALIZED ==END OF DUMP== [eva] tests/value/narrow_behaviors.i:57: @@ -56,11 +57,10 @@ [eva] tests/value/narrow_behaviors.i:57: Frama_C_dump_each: # Cvalue domain: - nondet ∈ [--..--] - p.x ∈ {2} - .y ∈ {1; 2} - q.x ∈ {2} - .y ∈ {1; 2} + nondet ∈ {0} + p{.x; .y} ∈ {1} + q.x ∈ {1; 2} + .y ∈ {1} __retres ∈ UNINITIALIZED ==END OF DUMP== [eva:alarm] tests/value/narrow_behaviors.i:61: Warning: diff --git a/tests/value/oracle/no_results.res.oracle b/tests/value/oracle/no_results.res.oracle index 2053346504c..b1bab125fb0 100644 --- a/tests/value/oracle/no_results.res.oracle +++ b/tests/value/oracle/no_results.res.oracle @@ -6,36 +6,66 @@ t[0..2999] ∈ {0} [eva] computing for function init <- main. Called from tests/value/no_results.c:19. -[eva] Semantic level unrolling superposing up to 100 states -[eva] Semantic level unrolling superposing up to 200 states -[eva] Semantic level unrolling superposing up to 300 states -[eva] Semantic level unrolling superposing up to 400 states -[eva] Semantic level unrolling superposing up to 500 states -[eva] Semantic level unrolling superposing up to 600 states -[eva] Semantic level unrolling superposing up to 700 states -[eva] Semantic level unrolling superposing up to 800 states -[eva] Semantic level unrolling superposing up to 900 states -[eva] Semantic level unrolling superposing up to 1000 states -[eva] Semantic level unrolling superposing up to 1100 states -[eva] Semantic level unrolling superposing up to 1200 states -[eva] Semantic level unrolling superposing up to 1300 states -[eva] Semantic level unrolling superposing up to 1400 states -[eva] Semantic level unrolling superposing up to 1500 states -[eva] Semantic level unrolling superposing up to 1600 states -[eva] Semantic level unrolling superposing up to 1700 states -[eva] Semantic level unrolling superposing up to 1800 states -[eva] Semantic level unrolling superposing up to 1900 states -[eva] Semantic level unrolling superposing up to 2000 states -[eva] Semantic level unrolling superposing up to 2100 states -[eva] Semantic level unrolling superposing up to 2200 states -[eva] Semantic level unrolling superposing up to 2300 states -[eva] Semantic level unrolling superposing up to 2400 states -[eva] Semantic level unrolling superposing up to 2500 states -[eva] Semantic level unrolling superposing up to 2600 states -[eva] Semantic level unrolling superposing up to 2700 states -[eva] Semantic level unrolling superposing up to 2800 states -[eva] Semantic level unrolling superposing up to 2900 states -[eva] Semantic level unrolling superposing up to 3000 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 100 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 200 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 300 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 400 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 500 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 600 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 700 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 800 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 900 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 1000 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 1100 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 1200 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 1300 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 1400 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 1500 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 1600 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 1700 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 1800 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 1900 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 2000 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 2100 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 2200 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 2300 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 2400 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 2500 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 2600 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 2700 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 2800 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 2900 states +[eva] tests/value/no_results.c:10: + Semantic level unrolling superposing up to 3000 states [eva] Recording results for init [eva] Done for function init [eva] computing for function f <- main. diff --git a/tests/value/oracle/partitioning-annots.1.res.oracle b/tests/value/oracle/partitioning-annots.1.res.oracle index 7b572572277..85ae6a30dc6 100644 --- a/tests/value/oracle/partitioning-annots.1.res.oracle +++ b/tests/value/oracle/partitioning-annots.1.res.oracle @@ -17,28 +17,28 @@ [eva] Done for function Frama_C_interval [eva] tests/value/partitioning-annots.c:76: Frama_C_show_each_before_first_split: {0; 1}, {0; 1; 2}, {0} -[eva] tests/value/partitioning-annots.c:79: - Frama_C_show_each_before_second_split: {0}, {0; 1; 2}, {0} [eva] tests/value/partitioning-annots.c:79: Frama_C_show_each_before_second_split: {1}, {0; 1; 2}, {1} +[eva] tests/value/partitioning-annots.c:79: + Frama_C_show_each_before_second_split: {0}, {0; 1; 2}, {0} [eva] tests/value/partitioning-annots.c:81: - Frama_C_show_each_before_first_merge: {0}, {0}, {0} -[eva] tests/value/partitioning-annots.c:81: - Frama_C_show_each_before_first_merge: {0}, {1}, {0} + Frama_C_show_each_before_first_merge: {1}, {2}, {1} [eva] tests/value/partitioning-annots.c:81: - Frama_C_show_each_before_first_merge: {0}, {2}, {0} + Frama_C_show_each_before_first_merge: {1}, {1}, {1} [eva] tests/value/partitioning-annots.c:81: Frama_C_show_each_before_first_merge: {1}, {0}, {1} [eva] tests/value/partitioning-annots.c:81: - Frama_C_show_each_before_first_merge: {1}, {1}, {1} + Frama_C_show_each_before_first_merge: {0}, {2}, {0} [eva] tests/value/partitioning-annots.c:81: - Frama_C_show_each_before_first_merge: {1}, {2}, {1} + Frama_C_show_each_before_first_merge: {0}, {1}, {0} +[eva] tests/value/partitioning-annots.c:81: + Frama_C_show_each_before_first_merge: {0}, {0}, {0} [eva] tests/value/partitioning-annots.c:83: - Frama_C_show_each_before_second_merge: {0; 1}, {0}, {0; 1} + Frama_C_show_each_before_second_merge: {0; 1}, {2}, {0; 1} [eva] tests/value/partitioning-annots.c:83: Frama_C_show_each_before_second_merge: {0; 1}, {1}, {0; 1} [eva] tests/value/partitioning-annots.c:83: - Frama_C_show_each_before_second_merge: {0; 1}, {2}, {0; 1} + Frama_C_show_each_before_second_merge: {0; 1}, {0}, {0; 1} [eva] tests/value/partitioning-annots.c:85: Frama_C_show_each_end: {0; 1}, {0; 1; 2}, {0; 1} [eva] Recording results for test_split diff --git a/tests/value/oracle/partitioning-annots.2.res.oracle b/tests/value/oracle/partitioning-annots.2.res.oracle index d4afe5dd536..343ee7f5639 100644 --- a/tests/value/oracle/partitioning-annots.2.res.oracle +++ b/tests/value/oracle/partitioning-annots.2.res.oracle @@ -17,38 +17,38 @@ [eva] Done for function Frama_C_interval [eva] tests/value/partitioning-annots.c:76: Frama_C_show_each_before_first_split: {0; 1}, {0; 1; 2}, {0} -[eva] tests/value/partitioning-annots.c:79: - Frama_C_show_each_before_second_split: {0}, {0; 1; 2}, {0} [eva] tests/value/partitioning-annots.c:79: Frama_C_show_each_before_second_split: {1}, {0; 1; 2}, {1} +[eva] tests/value/partitioning-annots.c:79: + Frama_C_show_each_before_second_split: {0}, {0; 1; 2}, {0} [eva] tests/value/partitioning-annots.c:81: - Frama_C_show_each_before_first_merge: {0}, {0}, {0} -[eva] tests/value/partitioning-annots.c:81: - Frama_C_show_each_before_first_merge: {0}, {1}, {0} + Frama_C_show_each_before_first_merge: {1}, {2}, {1} [eva] tests/value/partitioning-annots.c:81: - Frama_C_show_each_before_first_merge: {0}, {2}, {0} + Frama_C_show_each_before_first_merge: {1}, {1}, {1} [eva] tests/value/partitioning-annots.c:81: Frama_C_show_each_before_first_merge: {1}, {0}, {1} [eva] tests/value/partitioning-annots.c:81: - Frama_C_show_each_before_first_merge: {1}, {1}, {1} + Frama_C_show_each_before_first_merge: {0}, {2}, {0} [eva] tests/value/partitioning-annots.c:81: - Frama_C_show_each_before_first_merge: {1}, {2}, {1} -[eva] tests/value/partitioning-annots.c:83: - Frama_C_show_each_before_second_merge: {0}, {0}, {0} + Frama_C_show_each_before_first_merge: {0}, {1}, {0} +[eva] tests/value/partitioning-annots.c:81: + Frama_C_show_each_before_first_merge: {0}, {0}, {0} [eva] tests/value/partitioning-annots.c:83: - Frama_C_show_each_before_second_merge: {1}, {0}, {1} + Frama_C_show_each_before_second_merge: {1}, {2}, {1} [eva] tests/value/partitioning-annots.c:83: - Frama_C_show_each_before_second_merge: {0}, {1}, {0} + Frama_C_show_each_before_second_merge: {0}, {2}, {0} [eva] tests/value/partitioning-annots.c:83: Frama_C_show_each_before_second_merge: {1}, {1}, {1} [eva] tests/value/partitioning-annots.c:83: - Frama_C_show_each_before_second_merge: {0}, {2}, {0} + Frama_C_show_each_before_second_merge: {0}, {1}, {0} [eva] tests/value/partitioning-annots.c:83: - Frama_C_show_each_before_second_merge: {1}, {2}, {1} -[eva] tests/value/partitioning-annots.c:85: - Frama_C_show_each_end: {0}, {0; 1; 2}, {0} + Frama_C_show_each_before_second_merge: {1}, {0}, {1} +[eva] tests/value/partitioning-annots.c:83: + Frama_C_show_each_before_second_merge: {0}, {0}, {0} [eva] tests/value/partitioning-annots.c:85: Frama_C_show_each_end: {1}, {0; 1; 2}, {1} +[eva] tests/value/partitioning-annots.c:85: + Frama_C_show_each_end: {0}, {0; 1; 2}, {0} [eva] Recording results for test_split [eva] done for function test_split [eva] ====== VALUES COMPUTED ====== diff --git a/tests/value/oracle/partitioning-annots.3.res.oracle b/tests/value/oracle/partitioning-annots.3.res.oracle index f8931c63442..f0e69a170fe 100644 --- a/tests/value/oracle/partitioning-annots.3.res.oracle +++ b/tests/value/oracle/partitioning-annots.3.res.oracle @@ -28,16 +28,16 @@ [eva] Done for function Frama_C_interval [eva:alarm] tests/value/partitioning-annots.c:110: Warning: accessing uninitialized left-value. assert \initialized(&A[i]); -[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {0}, {42} -[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {1}, {42} -[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {2}, {42} -[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {3}, {42} -[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {4}, {42} -[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {5}, {42} -[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {6}, {42} -[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {7}, {42} -[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {8}, {42} [eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {9}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {8}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {7}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {6}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {5}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {4}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {3}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {2}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {1}, {42} +[eva] tests/value/partitioning-annots.c:115: Frama_C_show_each: {0}, {42} [eva] tests/value/partitioning-annots.c:116: assertion got status valid. [eva] tests/value/partitioning-annots.c:119: Frama_C_show_each: {{ "Value 42 not found" }} diff --git a/tests/value/oracle/partitioning-annots.5.res.oracle b/tests/value/oracle/partitioning-annots.5.res.oracle index d9d5c942746..801d0587fd9 100644 --- a/tests/value/oracle/partitioning-annots.5.res.oracle +++ b/tests/value/oracle/partitioning-annots.5.res.oracle @@ -10,8 +10,8 @@ [eva] tests/value/partitioning-annots.c:125: function Frama_C_interval: precondition 'order' got status valid. [eva] Done for function Frama_C_interval -[eva] tests/value/partitioning-annots.c:131: Frama_C_show_each: {1}, {1} [eva] tests/value/partitioning-annots.c:131: Frama_C_show_each: {0}, {0} +[eva] tests/value/partitioning-annots.c:131: Frama_C_show_each: {1}, {1} [eva] Recording results for test_history [eva] done for function test_history [eva] ====== VALUES COMPUTED ====== diff --git a/tests/value/oracle/postcondition.res.oracle b/tests/value/oracle/postcondition.res.oracle index 58d0668acc8..5dae70a929b 100644 --- a/tests/value/oracle/postcondition.res.oracle +++ b/tests/value/oracle/postcondition.res.oracle @@ -34,10 +34,10 @@ [eva] computing for function u <- get_index <- main. Called from tests/value/postcondition.i:20. [eva] Done for function u -[eva] tests/value/postcondition.i:12: - function get_index: postcondition got status valid. [eva:alarm] tests/value/postcondition.i:12: Warning: function get_index: postcondition got status unknown. +[eva] tests/value/postcondition.i:12: + function get_index: postcondition got status valid. [eva] Recording results for get_index [eva] Done for function get_index [eva] computing for function u <- main. diff --git a/tests/value/oracle/split_return.3.res.oracle b/tests/value/oracle/split_return.3.res.oracle index 1ad5a6b9498..bfdd36469af 100644 --- a/tests/value/oracle/split_return.3.res.oracle +++ b/tests/value/oracle/split_return.3.res.oracle @@ -26,12 +26,12 @@ Called from tests/value/split_return.i:48. [eva] Recording results for f2 [eva] Done for function f2 -[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {0}, {0} -[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {5}, {5} [eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {7}, {5} +[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {5}, {5} +[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {0}, {0} [eva] tests/value/split_return.i:51: assertion got status valid. -[eva] tests/value/split_return.i:53: Frama_C_show_each_f2_2: {5}, {5} [eva] tests/value/split_return.i:53: Frama_C_show_each_f2_2: {7}, {5} +[eva] tests/value/split_return.i:53: Frama_C_show_each_f2_2: {5}, {5} [eva] tests/value/split_return.i:54: assertion got status valid. [eva] Recording results for main2 [eva] Done for function main2 @@ -41,8 +41,8 @@ Called from tests/value/split_return.i:73. [eva] Recording results for f3 [eva] Done for function f3 -[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} [eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} +[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} [eva] tests/value/split_return.i:76: assertion got status valid. [eva] tests/value/split_return.i:78: assertion got status valid. [eva] Recording results for main3 @@ -53,8 +53,8 @@ Called from tests/value/split_return.i:73. [eva] Recording results for f3 [eva] Done for function f3 -[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} [eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} +[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} [eva] Recording results for main3 [eva] Done for function main3 [eva] computing for function main4 <- main. @@ -63,8 +63,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] tests/value/split_return.i:97: assertion got status valid. [eva] tests/value/split_return.i:99: assertion got status valid. [eva] Recording results for main4 @@ -75,8 +75,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main4 <- main. @@ -85,8 +85,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main4 <- main. @@ -95,8 +95,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main5 <- main. @@ -105,8 +105,8 @@ Called from tests/value/split_return.i:117. [eva] Recording results for f5 [eva] Done for function f5 -[eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {7}, {5} [eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {-2}, {0} +[eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {7}, {5} [eva] tests/value/split_return.i:120: assertion got status valid. [eva] tests/value/split_return.i:122: assertion got status valid. [eva] Recording results for main5 @@ -155,8 +155,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -165,8 +165,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -175,8 +175,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -185,8 +185,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main9 <- main. diff --git a/tests/value/oracle/split_return.4.res.oracle b/tests/value/oracle/split_return.4.res.oracle index 46c3281323e..060b00fe35e 100644 --- a/tests/value/oracle/split_return.4.res.oracle +++ b/tests/value/oracle/split_return.4.res.oracle @@ -29,12 +29,12 @@ Called from tests/value/split_return.i:48. [eva] Recording results for f2 [eva] Done for function f2 -[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {0}, {0} -[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {5}, {5} [eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {7}, {5} +[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {5}, {5} +[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {0}, {0} [eva] tests/value/split_return.i:51: assertion got status valid. -[eva] tests/value/split_return.i:53: Frama_C_show_each_f2_2: {5}, {5} [eva] tests/value/split_return.i:53: Frama_C_show_each_f2_2: {7}, {5} +[eva] tests/value/split_return.i:53: Frama_C_show_each_f2_2: {5}, {5} [eva] tests/value/split_return.i:54: assertion got status valid. [eva] Recording results for main2 [eva] Done for function main2 @@ -44,8 +44,8 @@ Called from tests/value/split_return.i:73. [eva] Recording results for f3 [eva] Done for function f3 -[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} [eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} +[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} [eva] tests/value/split_return.i:76: assertion got status valid. [eva] tests/value/split_return.i:78: assertion got status valid. [eva] Recording results for main3 @@ -56,8 +56,8 @@ Called from tests/value/split_return.i:73. [eva] Recording results for f3 [eva] Done for function f3 -[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} [eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} +[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} [eva] Recording results for main3 [eva] Done for function main3 [eva] computing for function main4 <- main. @@ -66,8 +66,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] tests/value/split_return.i:97: assertion got status valid. [eva] tests/value/split_return.i:99: assertion got status valid. [eva] Recording results for main4 @@ -78,8 +78,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main4 <- main. @@ -88,8 +88,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main4 <- main. @@ -98,8 +98,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main5 <- main. @@ -108,8 +108,8 @@ Called from tests/value/split_return.i:117. [eva] Recording results for f5 [eva] Done for function f5 -[eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {7}, {5} [eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {-2}, {0} +[eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {7}, {5} [eva] tests/value/split_return.i:120: assertion got status valid. [eva] tests/value/split_return.i:122: assertion got status valid. [eva] Recording results for main5 @@ -158,8 +158,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -168,8 +168,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -178,8 +178,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -188,8 +188,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main9 <- main. @@ -483,8 +483,8 @@ Called from tests/value/split_return.i:73. [eva] Recording results for f3 [eva] Done for function f3 -[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} [eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} +[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} [eva] Recording results for main3 [eva] Done for function main3 [eva] computing for function main3 <- main. @@ -493,8 +493,8 @@ Called from tests/value/split_return.i:73. [eva] Recording results for f3 [eva] Done for function f3 -[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} [eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} +[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} [eva] Recording results for main3 [eva] Done for function main3 [eva] computing for function main4 <- main. @@ -503,8 +503,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main4 <- main. @@ -513,8 +513,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main4 <- main. @@ -523,8 +523,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main4 <- main. @@ -533,8 +533,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main5 <- main. @@ -543,8 +543,8 @@ Called from tests/value/split_return.i:117. [eva] Recording results for f5 [eva] Done for function f5 -[eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {7}, {5} [eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {-2}, {0} +[eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {7}, {5} [eva] Recording results for main5 [eva] Done for function main5 [eva] computing for function main6 <- main. @@ -589,8 +589,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -599,8 +599,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -609,8 +609,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -619,8 +619,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main9 <- main. -- GitLab From 1fba88ff6ef5c82de831a765bec6f519ca4f3214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 26 Feb 2019 15:22:25 +0100 Subject: [PATCH 230/376] [Eva] Fixes the parsing of loop unroll N annotations by using constant folding. --- src/plugins/value/engine/partitioning_parameters.ml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/plugins/value/engine/partitioning_parameters.ml b/src/plugins/value/engine/partitioning_parameters.ml index fd35427a043..99c16a11e92 100644 --- a/src/plugins/value/engine/partitioning_parameters.ml +++ b/src/plugins/value/engine/partitioning_parameters.ml @@ -81,7 +81,18 @@ struct try match get_unroll_annot stmt with | [] -> warn_no_loop_unroll stmt; default | [None] -> Partition.IntLimit default_loop_unroll - | [(Some t)] -> Partition.ExpLimit (term_to_exp t) + | [(Some t)] -> begin + (* Inlines the value of const variables in [t]. *) + let global_init vi = + try (Globals.Vars.find vi).init with Not_found -> None + in + let t = + Cil.visitCilTerm (new Logic_utils.simplify_const_lval global_init) t + in + match Logic_utils.constFoldTermToInt t with + | Some n -> Partition.IntLimit (Integer.to_int n) + | None -> Partition.ExpLimit (term_to_exp t) + end | _ -> warn "ignoring invalid unroll annotation"; raise Exit -- GitLab From 3d2528899140eb3d1bab28ec0460ab6ccab94096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 26 Feb 2019 16:13:14 +0100 Subject: [PATCH 231/376] [Eva] Fixes indentation. --- src/plugins/value/engine/partition.ml | 4 ++-- src/plugins/value/engine/partitioned_dataflow.ml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index cc63597feab..77a8ef9fdcd 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -314,9 +314,9 @@ struct let transfer acc (k,x) = let add = match k.ration_stamp with - (* No ration stam, just add the state to the list *) + (* No ration stam, just add the state to the list *) | None -> fun l y -> (k,y) :: l - (* There is a ration stamp, set the second part of the stamp to a unique transfer number *) + (* There is a ration stamp, set the second part of the stamp to a unique transfer number *) | Some (s,_) -> fun l y -> let k' = { k with ration_stamp = Some (s, !n) } in incr n; diff --git a/src/plugins/value/engine/partitioned_dataflow.ml b/src/plugins/value/engine/partitioned_dataflow.ml index e1b461e4c09..5427d627832 100644 --- a/src/plugins/value/engine/partitioned_dataflow.ml +++ b/src/plugins/value/engine/partitioned_dataflow.ml @@ -406,9 +406,9 @@ module Make_Dataflow (transition : vertex transition) (f : flow) : unit = (* Split return *) begin match transition with - | Return (return_exp, _) -> - Partition.split_return f return_exp - | _ -> () + | Return (return_exp, _) -> + Partition.split_return f return_exp + | _ -> () end; (* Loop transitions *) let the_stmt v = Extlib.the v.vertex_start_of in -- GitLab From e229038de78f29ddf4258baa7f9a0625be923fd3 Mon Sep 17 00:00:00 2001 From: Valentin Perrelle <valentin.perrelle@cea.fr> Date: Wed, 27 Feb 2019 18:49:21 +0100 Subject: [PATCH 232/376] [Eva] Add / fix comments and small simplifications --- src/plugins/value/engine/partition.ml | 134 ++++++++---------- src/plugins/value/engine/partition.mli | 73 +++++----- .../value/engine/partitioning_parameters.ml | 44 +++--- .../value/engine/state_partitioning.mli | 21 +-- .../value/engine/trace_partitioning.ml | 17 +-- 5 files changed, 137 insertions(+), 152 deletions(-) diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index 77a8ef9fdcd..8b71d9866ca 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -20,6 +20,8 @@ (* *) (**************************************************************************) +(* --- Keys --- *) + module ExpMap = Cil_datatype.ExpStructEq.Map module IntPair = Datatype.Pair (Datatype.Int) (Datatype.Int) module LoopList = Datatype.List (IntPair) @@ -35,39 +37,19 @@ type key = { dynamic_split : Integer.t ExpMap.t; } -let zero_key : key = { - ration_stamp = None; - branches = []; - loops = []; - static_split = ExpMap.empty; - dynamic_split = ExpMap.empty; -} - -let pretty_key fmt key = - begin match key.ration_stamp with - | Some (n,_) -> Format.fprintf fmt "#%d" n - | None -> () - end; - Pretty_utils.pp_list ~pre:"[@[" ~sep:" ;@ " ~suf:"@]]" - Format.pp_print_int - fmt - key.branches; - Pretty_utils.pp_list ~pre:"(@[" ~sep:" ;@ " ~suf:"@])" - (fun fmt (i,_j) -> Format.pp_print_int fmt i) - fmt - key.loops; - Pretty_utils.pp_list ~pre:"{@[" ~sep:" ;@ " ~suf:"@]}" - (fun fmt (e,i) -> Format.fprintf fmt "%a:%a" - Cil_printer.pp_exp e - (Integer.pretty ~hexa:false) i) - fmt - (ExpMap.bindings key.static_split @ ExpMap.bindings key.dynamic_split) - - module Key = struct type t = key + (* Initial key, before any partitioning *) + let zero = { + ration_stamp = None; + branches = []; + loops = []; + static_split = ExpMap.empty; + dynamic_split = ExpMap.empty; + } + let compare k1 k2 = let (<?>) c (cmp,x,y) = if c = 0 then cmp x y else c @@ -77,12 +59,57 @@ struct <?> (ExpMap.compare Integer.compare, k1.static_split, k2.static_split) <?> (ExpMap.compare Integer.compare, k1.dynamic_split, k2.dynamic_split) <?> (BranchList.compare, k1.branches, k2.branches) + + let pretty fmt key = + begin match key.ration_stamp with + | Some (n,_) -> Format.fprintf fmt "#%d" n + | None -> () + end; + Pretty_utils.pp_list ~pre:"[@[" ~sep:" ;@ " ~suf:"@]]" + Format.pp_print_int + fmt + key.branches; + Pretty_utils.pp_list ~pre:"(@[" ~sep:" ;@ " ~suf:"@])" + (fun fmt (i,_j) -> Format.pp_print_int fmt i) + fmt + key.loops; + Pretty_utils.pp_list ~pre:"{@[" ~sep:" ;@ " ~suf:"@]}" + (fun fmt (e,i) -> Format.fprintf fmt "%a:%a" + Cil_printer.pp_exp e + (Integer.pretty ~hexa:false) i) + fmt + (ExpMap.bindings key.static_split @ ExpMap.bindings key.dynamic_split) end -module KMap = Map.Make (Key) +(* --- Partitions --- *) + +module KMap = Map.Make (Key) type 'a partition = 'a KMap.t + +let empty = KMap.empty +let find = KMap.find +let replace = KMap.add +let is_empty = KMap.is_empty +let size = KMap.cardinal +let iter = KMap.iter +let map = KMap.map +let filter = KMap.filter +let merge = KMap.merge + +let to_list (p : 'a partition) : 'a list = + KMap.fold (fun _k x l -> x :: l) p [] + +let map_filter (f : key -> 'a -> 'b option) (p : 'a partition) : 'b partition = + let opt_flatten (type a) (o : a option option) : a option = + Extlib.opt_conv None o + in + KMap.merge (fun k o _ -> opt_flatten (Extlib.opt_map (f k) o)) p KMap.empty + + +(* --- Partitioning actions --- *) + type 'a transfer_function = (key * 'a) list -> (key * 'a) list type unroll_limit = @@ -105,6 +132,8 @@ type action = exception InvalidAction +(* --- Flows --- *) + module type InputDomain = sig type t @@ -116,47 +145,6 @@ sig val eval_exp_to_int : t -> Cil_types.exp -> int end - -let empty : 'a partition = - KMap.empty - -let is_empty (p : 'a partition) : bool = - KMap.is_empty p - -let size (p : 'a partition) : int = - KMap.fold (fun _k _x n -> n + 1) p 0 - -let to_list (p : 'a partition) : 'a list = - KMap.fold (fun _k x l -> x :: l) p [] - -let find = KMap.find -let replace = KMap.add - -let merge (f : 'a option -> 'b option -> 'c option) (p1 : 'a partition) - (p2 : 'b partition) : 'c partition = - KMap.merge (fun _k o1 o2 -> f o1 o2) p1 p2 - -let iter (f : 'a -> unit) (p : 'a partition) : unit = - KMap.iter (fun _k x -> f x) p - -let iteri (f : key -> 'a -> unit) (p : 'a partition) : unit = - KMap.iter f p - - -(* Utility function on options *) -let opt_flatten (type a) (o : a option option) : a option = - Extlib.opt_conv None o - -let map_states (f : 'a -> 'a) (p : 'a partition) : 'a partition = - KMap.map f p - -let filter_keys (f : key -> bool) (p : 'a partition) : 'a partition = - KMap.filter (fun k _x -> f k) p - -let map_filter (f : key -> 'a -> 'b option) (p : 'a partition) : 'b partition = - KMap.merge (fun k o _ -> opt_flatten (Extlib.opt_map (f k) o)) p KMap.empty - - module MakeFlow (Domain : InputDomain) = struct type state = Domain.t @@ -165,7 +153,7 @@ struct let empty = [] let initial (p : 'a list) : t = - List.map (fun state -> zero_key, state) p + List.map (fun state -> Key.zero, state) p let to_list (f : t) : state list = List.map snd f @@ -314,7 +302,7 @@ struct let transfer acc (k,x) = let add = match k.ration_stamp with - (* No ration stam, just add the state to the list *) + (* No ration stamp, just add the state to the list *) | None -> fun l y -> (k,y) :: l (* There is a ration stamp, set the second part of the stamp to a unique transfer number *) | Some (s,_) -> fun l y -> diff --git a/src/plugins/value/engine/partition.mli b/src/plugins/value/engine/partition.mli index c817ca18685..69e115d0335 100644 --- a/src/plugins/value/engine/partition.mli +++ b/src/plugins/value/engine/partition.mli @@ -30,24 +30,29 @@ The key have several fields, one for each kind of partitioning. - Ration stamps: These modelize the legacy slevel. Each state is given - a ration stamp (represented by an integer) until there is no slevel left. + a ration stamp (represented by two integers) until there is no slevel + left. The first number is attributed by the store it comes from, the + second one is attributed by the last transfer. It is an option type, when there is no more ration stamp, this field is set to None; each new state will not be distinguished by this field. - - Branches: This field enumerate the last branches taken to reach this - state. The partitioning may chose how the branches are identified, but it + - Branches: This field enumerate the last junctions points passed through. + The partitioning may chose how the branches are identified, but it is a First-In-First-Out set. - Loops: This field stores the loop iterations needed to reach this state for each loop we are currently in. It is stored in reverse order - (innermost loop first) - - Static/Dynamic splits: - - Note on implementation. These partitions are implemented as map from keys - to states. We chose to have the same partition for stores, propagation and - widenings so the combination of propagation + store or propagation + - widening can be done as a map2 operation. However, this involve some tricks - to make keys be always distinguished in propagation, like giving them new - ration stamps. It may have been more natural to consider that propagations - are lists, allowing states to have the same key. + (innermost loop first) It also stores the maximum number of unrolling ; + this number varies from a state to another, as it is computed from + an expression evaluated when we enter the loop. + - Static/Dynamic splits: track the splits applied to the state as a map + from the expression of the split to the value of this expression. Since + the split creates states in which the expression evalutates to a + singleton, the values of the map are integers. + Static splits are only evaluated when the annotation is encountered + whereas dynamic splits are reevaluated regularly. + + A flow is a list of states accompanied by their key. It is used to + transfer states from one partition to another. It doesn't enforce unicity + of keys. *) type branch = int @@ -55,17 +60,32 @@ type branch = int module ExpMap = Cil_datatype.ExpStructEq.Map type key = private { - ration_stamp : (int * int) option; + ration_stamp : (int * int) option; (* store stamp / transfer stamp *) branches : branch list; - loops : (int * int) list; + loops : (int * int) list; (* current iteration / max unrolling *) static_split : Integer.t ExpMap.t; dynamic_split : Integer.t ExpMap.t; } -val pretty_key : Format.formatter -> key -> unit +type 'a partition +val empty : 'a partition +val is_empty : 'a partition -> bool +val size : 'a partition -> int +val to_list : 'a partition -> 'a list +val find : key -> 'a partition -> 'a +val replace : key -> 'a -> 'a partition -> 'a partition +val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a partition -> + 'b partition -> 'c partition +val iter : (key -> 'a -> unit) -> 'a partition -> unit +val filter : (key -> 'a -> bool) -> 'a partition -> 'a partition +val map : ('a -> 'a) -> 'a partition -> 'a partition +val map_filter : (key -> 'a -> 'b option) -> 'a partition -> 'b partition + + + +(* Partitioning actions *) -type 'a partition type 'a transfer_function = (key * 'a) list -> (key * 'a) list type unroll_limit = @@ -88,24 +108,7 @@ type action = exception InvalidAction -val empty : 'a partition -val is_empty : 'a partition -> bool -val size : 'a partition -> int - -val to_list : 'a partition -> 'a list - -val find : key -> 'a partition -> 'a -val replace : key -> 'a -> 'a partition -> 'a partition - -val merge : ('a option -> 'b option -> 'c option) -> 'a partition -> - 'b partition -> 'c partition - -val iter : ('a -> unit) -> 'a partition -> unit -val iteri : (key -> 'a -> unit) -> 'a partition -> unit -val filter_keys : (key -> bool) -> 'a partition -> 'a partition -val map_states : ('a -> 'a) -> 'a partition -> 'a partition -val map_filter : (key -> 'a -> 'b option) -> 'a partition -> 'b partition - +(* Flows *) module type InputDomain = sig diff --git a/src/plugins/value/engine/partitioning_parameters.ml b/src/plugins/value/engine/partitioning_parameters.ml index 99c16a11e92..9111ade0ea3 100644 --- a/src/plugins/value/engine/partitioning_parameters.ml +++ b/src/plugins/value/engine/partitioning_parameters.ml @@ -78,28 +78,28 @@ struct let unroll stmt = let default = Partition.IntLimit min_loop_unroll in - try match get_unroll_annot stmt with - | [] -> warn_no_loop_unroll stmt; default - | [None] -> Partition.IntLimit default_loop_unroll - | [(Some t)] -> begin - (* Inlines the value of const variables in [t]. *) - let global_init vi = - try (Globals.Vars.find vi).init with Not_found -> None - in - let t = - Cil.visitCilTerm (new Logic_utils.simplify_const_lval global_init) t - in - match Logic_utils.constFoldTermToInt t with - | Some n -> Partition.IntLimit (Integer.to_int n) - | None -> Partition.ExpLimit (term_to_exp t) - end - | _ -> - warn "ignoring invalid unroll annotation"; - raise Exit - with - | Exit -> default - | Db.Properties.Interp.No_conversion -> - warn "loop unrolling parameters must be valid expressions"; + match get_unroll_annot stmt with + | [] -> warn_no_loop_unroll stmt; default + | [None] -> Partition.IntLimit default_loop_unroll + | [(Some t)] -> begin + (* Inlines the value of const variables in [t]. *) + let global_init vi = + try (Globals.Vars.find vi).init with Not_found -> None + in + let t = + Cil.visitCilTerm (new Logic_utils.simplify_const_lval global_init) t + in + match Logic_utils.constFoldTermToInt t with + | Some n -> Partition.IntLimit (Integer.to_int n) + | None -> + try + Partition.ExpLimit (term_to_exp t) + with Db.Properties.Interp.No_conversion -> + warn "loop unrolling parameters must be valid expressions"; + default + end + | _ -> + warn "ignoring invalid unroll annotation"; default let history_size = HistoryPartitioning.get () diff --git a/src/plugins/value/engine/state_partitioning.mli b/src/plugins/value/engine/state_partitioning.mli index 5f2508badf7..8e330f01be9 100644 --- a/src/plugins/value/engine/state_partitioning.mli +++ b/src/plugins/value/engine/state_partitioning.mli @@ -22,8 +22,8 @@ open Bottom.Type -type branch = Partition.branch -type loop = Cil_types.stmt +type branch = Partition.branch (* Junction branch id in the control flow *) +type loop = Cil_types.stmt (* Loop head id *) module type Kf = sig @@ -50,7 +50,6 @@ sig type tank (** An organized temporary accumulation of flows *) type widening (** Widening informations *) - (* --- Constructors --- *) val empty_store : stmt:Cil_types.stmt option -> store @@ -61,13 +60,11 @@ sig (** Build the initial tank for the entry point of a function. *) val initial_tank : state list -> tank - (* --- Pretty printing --- *) val pretty_store : Format.formatter -> store -> unit val pretty_flow : Format.formatter -> flow -> unit - (* --- Accessors --- *) val expanded : store -> state list @@ -80,12 +77,10 @@ sig val flow_size : flow -> int val tank_size : tank -> int - (* --- Reset state (for hierchical convergence) --- *) (* These functions reset the part of the state of the analysis which has been obtained after a widening. *) - val reset_store : store -> unit val reset_flow : flow -> unit val reset_tank : tank -> unit @@ -97,7 +92,6 @@ sig depend on the outer loop. *) val reset_widening_counter : widening -> unit - (* --- Partition transfer functions --- *) val enter_loop : flow -> loop -> unit @@ -105,7 +99,6 @@ sig val next_loop_iteration : flow -> loop -> unit val split_return : flow -> Cil_types.exp option -> unit - (* --- Operators --- *) (** Remove all states from the tank, leaving it empty as if it was just @@ -133,12 +126,12 @@ sig current partitioning. *) val join : (branch * flow) list -> store -> flow - (** Widen a tank. The widening object keeps track of the previous widenings to - ensure termination. The result is true when it is correct to end the - propagation here, i.e. when the current tank is only containng - states which are included into already propagated states. *) + (** Widen a flow. The widening object keeps track of the previous widenings + and previous propagated states to ensure termination. The result is true + when it is correct to end the propagation here, i.e. when the flow + object is only containng states which are included into already propagated + states. *) val widen : widening -> flow -> bool - end module type Domain = Partitioning.Domain diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index 810f61e1a7a..a32d411f363 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -124,7 +124,7 @@ struct (* Pretty printing *) let pretty_store (fmt : Format.formatter) (s : store) : unit = - Partition.iter (Domain.pretty fmt) s.store_partition + Partition.iter (fun _key state -> Domain.pretty fmt state) s.store_partition let pretty_flow (fmt : Format.formatter) (p : flow) = Flow.iter (Domain.pretty fmt) p.flow_states @@ -159,6 +159,7 @@ struct let tank_size (t : tank) : int = Partition.size t.tank_states + (* Partition transfer functions *) let loop_transfer p action = @@ -197,10 +198,10 @@ struct (* Reset state (for hierchical convergence) *) let reset_store (s : store) : unit = - let is_eternal key = + let is_eternal key _state = key.ration_stamp <> None in - s.store_partition <- Partition.filter_keys is_eternal s.store_partition + s.store_partition <- Partition.filter is_eternal s.store_partition let reset_flow (f : flow) : unit = f.flow_states <- Flow.empty @@ -215,7 +216,7 @@ struct let reset w = { w with widening_counter = max w.widening_counter (widening_period - 1) } in - w.widening_partition <- Partition.map_states reset w.widening_partition + w.widening_partition <- Partition.map reset w.widening_partition (* Operators *) @@ -226,7 +227,7 @@ struct { flow_states } let fill ~(into : tank) (f : flow) : unit = - let erase dest src = + let erase _key dest src = if Extlib.has_some src then src else dest @@ -248,7 +249,7 @@ struct match sources with | [(_,p)] -> [p.flow_states] | sources -> - (* Several branches ; partition according to the incoming branch *) + (* Several branches -> partition according to the incoming branch *) let get (b,p) = Flow.transfer_keys p.flow_states (Branch (b,history_size)) in @@ -332,7 +333,7 @@ struct previous_state = curr; widening_counter = wstate.widening_counter - 1 }; - (* Propagated state decreases, stop to propagate *) + (* Propagated state decreases, stop propagating *) if Domain.is_included curr wstate.previous_state then None (* Widening is delayed *) @@ -359,7 +360,7 @@ struct Some next end with Not_found -> - (* The key is not in the widening state; add it if slevel is not + (* The key is not in the widening state; add the state if slevel is exceeded *) if key.ration_stamp = None then update key { -- GitLab From f8a34a4c0dfecdb9fbf13da7001f12a678b6792a Mon Sep 17 00:00:00 2001 From: Valentin Perrelle <valentin.perrelle@cea.fr> Date: Wed, 27 Feb 2019 19:35:12 +0100 Subject: [PATCH 233/376] [Eva] Allow to programatically add partitioning annotations --- .../value/utils/partitioning_annots.ml | 36 +++++++++++++++++-- .../value/utils/partitioning_annots.mli | 7 ++++ 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/plugins/value/utils/partitioning_annots.ml b/src/plugins/value/utils/partitioning_annots.ml index bd43b3a7eb1..f88bf5cf6cd 100644 --- a/src/plugins/value/utils/partitioning_annots.ml +++ b/src/plugins/value/utils/partitioning_annots.ml @@ -37,6 +37,22 @@ type flow_annotation = | FlowMerge of term +(* We use two representations for annotations : + - the high level representation (HL) which is exported from this module + - the low level representation (Cil) which is used by the kernel to store + any annotation + + Annotations in this module define the export and import function to go from + one to another. Then, the parse and print functions works directly on the + high level representation. + + add --+ + | + ACSL --> parse --+--> HL --> export --> Cil --> import --+--> HL --> print + | + +--> get +*) + exception Parse_error module type Annotation = @@ -81,6 +97,13 @@ struct | _ -> acc in List.rev (Annotations.fold_code_annot filter_add stmt []) + + let add ~emitter ~loc stmt annot = + let param = M.export annot in + let extension = Logic_const.new_acsl_extension "slevel" loc false param in + let annot_node = Cil_types.AExtended ([], false, extension) in + let code_annotation = Logic_const.new_code_annotation annot_node in + Annotations.add_code_annot emitter stmt code_annotation end @@ -113,8 +136,8 @@ module Slevel = Register (struct | TConst (LStr "default") -> SlevelDefault | TConst (LStr "merge") -> SlevelMerge | TConst (Integer (i, _)) -> SlevelLocal (Integer.to_int i) - | _ -> SlevelDefault (* be kind. Someone is bound to write a visitor that - will simplify our term into something + | _ -> SlevelDefault (* be kind. Someone is bound to write a visitor + that will simplify our term into something unrecognizable... *) end | _ -> assert false @@ -194,3 +217,12 @@ let get_unroll_annot stmt = Unroll.get stmt let get_flow_annot stmt = List.map (fun a -> FlowSplit a) (Split.get stmt) @ List.map (fun a -> FlowMerge a) (Merge.get stmt) + + +let add_slevel_annot = Slevel.add + +let add_unroll_annot = Unroll.add + +let add_flow_annot ~emitter ~loc stmt = function + | FlowSplit annot -> Split.add ~emitter ~loc stmt annot + | FlowMerge annot -> Merge.add ~emitter ~loc stmt annot diff --git a/src/plugins/value/utils/partitioning_annots.mli b/src/plugins/value/utils/partitioning_annots.mli index 692a62221ec..a95de0105a7 100644 --- a/src/plugins/value/utils/partitioning_annots.mli +++ b/src/plugins/value/utils/partitioning_annots.mli @@ -34,3 +34,10 @@ type flow_annotation = val get_slevel_annot : Cil_types.stmt -> slevel_annotation option val get_unroll_annot : Cil_types.stmt -> unroll_annotation list val get_flow_annot : Cil_types.stmt -> flow_annotation list + +val add_slevel_annot : emitter:Emitter.t -> loc:Cil_types.location -> + Cil_types.stmt -> slevel_annotation -> unit +val add_unroll_annot : emitter:Emitter.t -> loc:Cil_types.location -> + Cil_types.stmt -> unroll_annotation -> unit +val add_flow_annot : emitter:Emitter.t -> loc:Cil_types.location -> + Cil_types.stmt -> flow_annotation -> unit -- GitLab From bb7906ef343d9e676c39b300044352ae614f46ab Mon Sep 17 00:00:00 2001 From: Valentin Perrelle <valentin.perrelle@cea.fr> Date: Wed, 27 Feb 2019 19:49:16 +0100 Subject: [PATCH 234/376] [Eva] restore the hierarchical convergence feature --- .../value/engine/partitioned_dataflow.ml | 19 +++++++++++++++++-- .../hierarchical_convergence.res.oracle | 17 ++++++++++------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/plugins/value/engine/partitioned_dataflow.ml b/src/plugins/value/engine/partitioned_dataflow.ml index 5427d627832..127f9c35c51 100644 --- a/src/plugins/value/engine/partitioned_dataflow.ml +++ b/src/plugins/value/engine/partitioned_dataflow.ml @@ -465,7 +465,8 @@ module Make_Dataflow | Some stmt -> (* Set location *) current_ki := Kstmt stmt; - Cil.CurrentLoc.set (Cil_datatype.Stmt.loc stmt); + let current_loc = Cil_datatype.Stmt.loc stmt in + Cil.CurrentLoc.set current_loc | None -> () end; (* Get vertex store *) @@ -545,6 +546,20 @@ module Make_Dataflow | _ -> (* Several successors - failure *) Value_parameters.abort "Do not know which branch to take. Stopping." + let reset_component (vertex_list : vertex list) : unit = + let reset_edge (_,e,_) = + let t,_ = get_edge_data e in + Partition.reset_tank t + in + let reset_vertex v = + let s = get_vertex_store v + and w = get_vertex_widening v in + Partition.reset_store s; + Partition.reset_widening w; + List.iter reset_edge (G.succ_e graph v) + in + List.iter reset_vertex vertex_list + let rec iterate_list (l : wto) = List.iter iterate_element l and iterate_element = function @@ -555,7 +570,7 @@ module Make_Dataflow Otherwise, only resets the widening counter for this component. This is especially useful for nested loops. *) if hierachical_convergence - then () (* reset_component (v :: Wto.flatten w) *) + then reset_component (v :: Wto.flatten w) else Partition.reset_widening_counter (get_vertex_widening v); (* Iterate until convergence *) let iteration_count = ref 0 in diff --git a/tests/value/oracle/hierarchical_convergence.res.oracle b/tests/value/oracle/hierarchical_convergence.res.oracle index 6109b4ff087..01bce6d8a63 100644 --- a/tests/value/oracle/hierarchical_convergence.res.oracle +++ b/tests/value/oracle/hierarchical_convergence.res.oracle @@ -10,18 +10,21 @@ [eva] tests/value/hierarchical_convergence.c:7: starting to merge loop iterations [eva] tests/value/hierarchical_convergence.c:8: Frama_C_show_each: {0; 1} +[eva] tests/value/hierarchical_convergence.c:10: Frama_C_show_each: {1}, {0} [eva] tests/value/hierarchical_convergence.c:9: starting to merge loop iterations -[eva] tests/value/hierarchical_convergence.c:10: Frama_C_show_each: {1}, {0} [eva] tests/value/hierarchical_convergence.c:8: Frama_C_show_each: {0; 1; 2} +[eva] tests/value/hierarchical_convergence.c:10: Frama_C_show_each: {1; 2}, {0} +[eva] tests/value/hierarchical_convergence.c:10: + Frama_C_show_each: {1; 2}, {0; 1} +[eva] tests/value/hierarchical_convergence.c:8: Frama_C_show_each: [0..99] +[eva] tests/value/hierarchical_convergence.c:10: Frama_C_show_each: [1..99], {0} [eva] tests/value/hierarchical_convergence.c:10: - Frama_C_show_each: [1..2147483647], {0; 1} + Frama_C_show_each: [1..99], {0; 1} [eva] tests/value/hierarchical_convergence.c:10: - Frama_C_show_each: [1..2147483647], {0; 1; 2} + Frama_C_show_each: [1..99], {0; 1; 2} [eva] tests/value/hierarchical_convergence.c:10: - Frama_C_show_each: [1..2147483647], [0..2147483646] -[eva:alarm] tests/value/hierarchical_convergence.c:7: Warning: - signed overflow. assert i + 1 ≤ 2147483647; + Frama_C_show_each: [1..99], [0..98] [eva] tests/value/hierarchical_convergence.c:8: Frama_C_show_each: [0..99] [eva:alarm] tests/value/hierarchical_convergence.c:15: Warning: accessing uninitialized left-value. assert \initialized(&j); @@ -45,7 +48,7 @@ [from] ====== DEPENDENCIES COMPUTED ====== These dependencies hold at termination for the executions that terminate: [from] Function f: - \result FROM n + \result FROM \nothing [from] Function main: NO EFFECTS [from] ====== END OF DEPENDENCIES ====== -- GitLab From 1735758427f0d203a405d6175db6baa6663c7997 Mon Sep 17 00:00:00 2001 From: Valentin Perrelle <valentin.perrelle@cea.fr> Date: Fri, 1 Mar 2019 16:22:44 +0100 Subject: [PATCH 235/376] [Eva] set a limit to the number of possible partitioning splits --- src/plugins/value/engine/partition.ml | 62 ++++++++++------ src/plugins/value/engine/partition.mli | 29 ++++++-- .../value/engine/partitioning_parameters.ml | 8 ++- .../value/engine/state_partitioning.mli | 3 +- .../value/engine/trace_partitioning.ml | 7 +- src/plugins/value/engine/transfer_stmt.ml | 72 ++++++++++++++----- src/plugins/value/engine/transfer_stmt.mli | 3 +- src/plugins/value/value_parameters.ml | 13 ++++ src/plugins/value/value_parameters.mli | 1 + 9 files changed, 146 insertions(+), 52 deletions(-) diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index 8b71d9866ca..a1825d939ed 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -20,6 +20,19 @@ (* *) (**************************************************************************) +(* --- Split monitors --- *) + +type split_monitor = { + split_limit : int; + mutable split_values : Datatype.Integer.Set.t; +} + +let new_monitor ~split_limit = { + split_limit; + split_values = Datatype.Integer.Set.empty; +} + + (* --- Keys --- *) module ExpMap = Cil_datatype.ExpStructEq.Map @@ -33,8 +46,8 @@ type key = { ration_stamp : (int * int) option; branches : branch list; loops : (int * int) list; - static_split : Integer.t ExpMap.t; - dynamic_split : Integer.t ExpMap.t; + static_split : (Integer.t*split_monitor) ExpMap.t; + dynamic_split : (Integer.t*split_monitor) ExpMap.t; } module Key = @@ -54,10 +67,13 @@ struct let (<?>) c (cmp,x,y) = if c = 0 then cmp x y else c in + let compare_split (i1,_m1) (i2,_m2) = + Integer.compare i1 i2 + in Extlib.opt_compare IntPair.compare k1.ration_stamp k2.ration_stamp <?> (LoopList.compare, k1.loops, k2.loops) - <?> (ExpMap.compare Integer.compare, k1.static_split, k2.static_split) - <?> (ExpMap.compare Integer.compare, k1.dynamic_split, k2.dynamic_split) + <?> (ExpMap.compare compare_split, k1.static_split, k2.static_split) + <?> (ExpMap.compare compare_split, k1.dynamic_split, k2.dynamic_split) <?> (BranchList.compare, k1.branches, k2.branches) let pretty fmt key = @@ -74,7 +90,7 @@ struct fmt key.loops; Pretty_utils.pp_list ~pre:"{@[" ~sep:" ;@ " ~suf:"@]}" - (fun fmt (e,i) -> Format.fprintf fmt "%a:%a" + (fun fmt (e,(i,_m)) -> Format.fprintf fmt "%a:%a" Cil_printer.pp_exp e (Integer.pretty ~hexa:false) i) fmt @@ -123,8 +139,8 @@ type action = | Branch of branch * int | Ration of int | Ration_merge of (int*int) option - | Static_split of Cil_types.exp - | Dynamic_split of Cil_types.exp + | Static_split of (Cil_types.exp * split_monitor) + | Dynamic_split of (Cil_types.exp * split_monitor) | Static_merge of Cil_types.exp | Dynamic_merge of Cil_types.exp | Update_dynamic_splits @@ -141,7 +157,8 @@ sig exception Operation_failed val join : t -> t -> t - val split : t -> Cil_types.exp -> (Integer.t * t) list + val split : monitor:split_monitor -> + t -> Cil_types.exp -> (Integer.t * t) list val eval_exp_to_int : t -> Cil_types.exp -> int end @@ -182,25 +199,26 @@ struct let union (p1 : t) (p2 : t) : t = p1 @ p2 - let split_state ~(static : bool) (exp : Cil_types.exp) + let split_state ~monitor ~(static : bool) (exp : Cil_types.exp) (key : key) (state : state) : (key * state) list = try let update_key (v,x) = let k = + let m = monitor in if static then - { key with static_split = ExpMap.add exp v key.static_split } + { key with static_split = ExpMap.add exp (v,m) key.static_split } else - { key with dynamic_split = ExpMap.add exp v key.dynamic_split } + { key with dynamic_split = ExpMap.add exp (v,m) key.dynamic_split } in (k,x) in - List.map update_key (Domain.split state exp) + List.map update_key (Domain.split ~monitor state exp) with Domain.Operation_failed -> [(key,state)] - let split ~(static : bool) (p : t) (exp : Cil_types.exp) = + let split ~monitor ~(static : bool) (p : t) (exp : Cil_types.exp) = let add_split acc (key,state) = - split_state ~static exp key state @ acc + split_state ~monitor ~static exp key state @ acc in List.fold_left add_split [] p @@ -208,9 +226,11 @@ struct (* Update one state *) let update_state acc (key,state) = (* Split the states in the list l for the given exp *) - let update_exp exp _ l = - let static = false in - List.fold_left (fun l (k,x) -> split_state ~static exp k x @ l) [] l + let update_exp exp (_i,monitor) l = + let resplit acc (k,x) = + split_state ~monitor ~static:false exp k x @ acc + in + List.fold_left resplit [] l in (* Foreach exp in original state: split *) ExpMap.fold update_exp key.dynamic_split [(key,state)] @ acc @@ -224,11 +244,11 @@ struct f p let transfer_keys p = function - | Static_split exp -> - split ~static:true p exp + | Static_split (exp,monitor) -> + split ~monitor ~static:true p exp - | Dynamic_split exp -> - split ~static:false p exp + | Dynamic_split (exp,monitor) -> + split ~monitor ~static:false p exp | Update_dynamic_splits -> update_dynamic_splits p diff --git a/src/plugins/value/engine/partition.mli b/src/plugins/value/engine/partition.mli index 69e115d0335..9d2c65e8a9e 100644 --- a/src/plugins/value/engine/partition.mli +++ b/src/plugins/value/engine/partition.mli @@ -20,6 +20,16 @@ (* *) (**************************************************************************) +(* Split monitor : prevents splits from generating too many states *) + +type split_monitor = { + split_limit : int; + mutable split_values : Datatype.Integer.Set.t; +} + +val new_monitor : split_limit:int -> split_monitor + + (* A state partition is a collection of states, each of which is identified by a unique key. The key identifies the reason for which we want to keep the state separate from the others. The partitioning method will involve @@ -63,10 +73,17 @@ type key = private { ration_stamp : (int * int) option; (* store stamp / transfer stamp *) branches : branch list; loops : (int * int) list; (* current iteration / max unrolling *) - static_split : Integer.t ExpMap.t; - dynamic_split : Integer.t ExpMap.t; + static_split : (Integer.t * split_monitor) ExpMap.t; (* exp->value*monitor *) + dynamic_split : (Integer.t * split_monitor) ExpMap.t; (* exp->value*monitor *) } +module Key : sig + type t = key + val zero : t + val compare : t -> t -> int + val pretty : Format.formatter -> t -> unit +end + type 'a partition val empty : 'a partition @@ -83,7 +100,6 @@ val map : ('a -> 'a) -> 'a partition -> 'a partition val map_filter : (key -> 'a -> 'b option) -> 'a partition -> 'b partition - (* Partitioning actions *) type 'a transfer_function = (key * 'a) list -> (key * 'a) list @@ -99,8 +115,8 @@ type action = | Branch of branch * int (* branch taken, max branches in history *) | Ration of int (* starting ration stamp *) | Ration_merge of (int * int) option (* new ration stamp for the merge state *) - | Static_split of Cil_types.exp - | Dynamic_split of Cil_types.exp + | Static_split of (Cil_types.exp * split_monitor) + | Dynamic_split of (Cil_types.exp * split_monitor) | Static_merge of Cil_types.exp | Dynamic_merge of Cil_types.exp | Update_dynamic_splits @@ -117,7 +133,8 @@ sig exception Operation_failed val join : t -> t -> t - val split : t -> Cil_types.exp -> (Integer.t * t) list + val split : monitor:split_monitor -> + t -> Cil_types.exp -> (Integer.t * t) list val eval_exp_to_int : t -> Cil_types.exp -> int end diff --git a/src/plugins/value/engine/partitioning_parameters.ml b/src/plugins/value/engine/partitioning_parameters.ml index 9111ade0ea3..60ed14ebdc6 100644 --- a/src/plugins/value/engine/partitioning_parameters.ml +++ b/src/plugins/value/engine/partitioning_parameters.ml @@ -104,11 +104,14 @@ struct let history_size = HistoryPartitioning.get () + let split_limit = SplitLimit.get () + let universal_splits = let add name l = try let vi = Globals.Vars.find_from_astinfo name VGlobal in - Cil.evar vi :: l + let m = Partition.new_monitor split_limit in + Partition.Dynamic_split (Cil.evar vi, m) :: l with Not_found -> warn ~current:false "cannot find the global variable %s for value \ partitioning" name; @@ -119,8 +122,9 @@ struct let flow_actions stmt = let map_annot acc t = try + let m = Partition.new_monitor split_limit in match t with - | FlowSplit t -> Partition.Static_split (term_to_exp t) :: acc + | FlowSplit t -> Partition.Static_split (term_to_exp t,m) :: acc | FlowMerge t -> Partition.Static_merge (term_to_exp t) :: acc with Db.Properties.Interp.No_conversion -> diff --git a/src/plugins/value/engine/state_partitioning.mli b/src/plugins/value/engine/state_partitioning.mli index 8e330f01be9..f143d2671be 100644 --- a/src/plugins/value/engine/state_partitioning.mli +++ b/src/plugins/value/engine/state_partitioning.mli @@ -38,7 +38,8 @@ sig val merge : Cil_types.stmt -> bool val unroll : loop -> Partition.unroll_limit val history_size : int - val universal_splits : Cil_types.exp list + val split_limit : int + val universal_splits : Partition.action list val flow_actions : Cil_types.stmt -> Partition.action list end diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index a32d411f363..2411f49ce99 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -112,12 +112,9 @@ struct } let initial_tank (states : state list) : tank = - let propagation = Flow.initial states in + let flow = Flow.initial states in (* Split the initial partition according to the global split seetings *) - let split propagation lval = - Flow.transfer_keys propagation (Dynamic_split lval) - in - let states = List.fold_left split propagation universal_splits in + let states = List.fold_left Flow.transfer_keys flow universal_splits in { tank_states = Flow.to_partition states } diff --git a/src/plugins/value/engine/transfer_stmt.ml b/src/plugins/value/engine/transfer_stmt.ml index b580a94f532..31995a8720b 100644 --- a/src/plugins/value/engine/transfer_stmt.ml +++ b/src/plugins/value/engine/transfer_stmt.ml @@ -41,7 +41,8 @@ module type S = sig unit or_bottom val enter_scope: kernel_function -> varinfo list -> state -> state exception Operation_failed - val split_by_value: state -> exp -> (Integer.t * state) list + val split_by_value: monitor:Partition.split_monitor -> + state -> exp -> (Integer.t * state) list val eval_exp_to_int: state -> exp -> int type call_result = { states: state list or_bottom; @@ -883,49 +884,88 @@ module Make (Abstract: Abstractions.Eva) = struct exception Operation_failed let fail ~exp message = - Value_parameters.warning ~source:(fst exp.eloc) ~once:true message; - raise Operation_failed + let warn_and_raise message = + Value_parameters.warning ~source:(fst exp.eloc) ~once:true "%s" message; + raise Operation_failed + in + Pretty_utils.ksfprintf warn_and_raise message - let evaluate_exp_to_ival state exp = + let evaluate_exp_to_ival ?valuation state exp = (* Evaluate the expression *) - let valuation, value = match Eval.evaluate ~reduction:false state exp with + let valuation, value = + match Eval.evaluate ?valuation ~reduction:false state exp with | `Value (valuation, value), alarms when Alarmset.is_empty alarms -> valuation, value | _ -> - fail ~exp "this partitioning parameter cannot be evaluated safely on all states" + fail ~exp "this partitioning parameter cannot be evaluated safely on \ + all states" in (* Get the cvalue *) let cvalue = match Value.get Main_values.cvalue_key with | Some get_cvalue -> get_cvalue value - | None -> fail ~exp "partitioning is disabled when the CValue domain is not active" + | None -> fail ~exp "partitioning is disabled when the CValue domain is \ + not active" in (* Extract the ival *) let ival = try Cvalue.V.project_ival cvalue with Cvalue.V.Not_based_on_null -> - fail ~exp "this partitioning parameter must evaluate to an integer" + fail ~exp "this partitioning parameter must evaluatassumee to an integer" in valuation, ival - let split_by_value state exp = + exception Split_limit of Integer.t option + + let split_by_value ~monitor state exp = + let module SplitValues = Datatype.Integer.Set in let valuation, ival = evaluate_exp_to_ival state exp in (* Build a state with the lvalue set to a singleton *) let build i acc = let value = Value.inject_int (Cil.typeOf exp) i in match Eval.assume ~valuation state exp value with | `Value valuation -> - (i, TF.update valuation state) :: acc + (* Check the reduction *) + let state = TF.update valuation state in + let _,new_ival = evaluate_exp_to_ival ~valuation state exp in + if not (Ival.is_singleton_int new_ival) then + fail ~exp "failing to learn perfectly from split" ; + monitor.Partition.split_values <- + SplitValues.add i monitor.Partition.split_values; + (i, state) :: acc | _ -> (* This value cannot be set in the state ; the evaluation of expr was unprecise *) acc in - (* For each integer of the ival, build a new state *) - begin try - Ival.fold_int build ival [] - with Abstract_interp.Error_Top -> - fail ~exp "too many values to partition by value on" - end + try + (* Check the size of the ival *) + begin match Ival.cardinal ival with + | None -> raise (Split_limit None) + | Some c as count -> + if Integer.(gt c (of_int monitor.Partition.split_limit)) then + raise (Split_limit count) + end; + (* For each integer of the ival, build a new state *) + try + let result = Ival.fold_int build ival [] in + let c = SplitValues.cardinal monitor.Partition.split_values in + if c > monitor.Partition.split_limit then + raise (Split_limit (Some (Integer.of_int c))); + result + with Abstract_interp.Error_Top -> (* The ival is float *) + raise (Split_limit None) + with + | Split_limit count -> + let pp_count fmt = + match count with + | None -> () + | Some c -> Format.fprintf fmt " (%a)" (Integer.pretty ~hexa:false) c + in + fail ~exp "split on more than %d values%t prevented ; try to improve \ + the analysis precision or look at the option -eva-split-limit \ + to increase this limit." + monitor.Partition.split_limit pp_count + let eval_exp_to_int state exp = let _valuation, ival = evaluate_exp_to_ival state exp in diff --git a/src/plugins/value/engine/transfer_stmt.mli b/src/plugins/value/engine/transfer_stmt.mli index a38ed7e37d6..76bb4c92be0 100644 --- a/src/plugins/value/engine/transfer_stmt.mli +++ b/src/plugins/value/engine/transfer_stmt.mli @@ -53,7 +53,8 @@ module type S = sig exception Operation_failed - val split_by_value: state -> exp -> (Integer.t * state) list + val split_by_value: monitor:Partition.split_monitor -> + state -> exp -> (Integer.t * state) list val eval_exp_to_int: state -> exp -> int type call_result = { diff --git a/src/plugins/value/value_parameters.ml b/src/plugins/value/value_parameters.ml index 52a678fad49..86af38150b0 100644 --- a/src/plugins/value/value_parameters.ml +++ b/src/plugins/value/value_parameters.ml @@ -753,6 +753,19 @@ module ValuePartitioning = end) let () = add_precision_dep ValuePartitioning.parameter +let () = Parameter_customize.set_group precision_tuning +module SplitLimit = + Int + (struct + let option_name = "-eva-split-limit" + let arg_name = "N" + let default = 100 + let help = "prevents the split annotations or -eva-partition-value to \ + enumerate more than N cases" + end) +let () = add_precision_dep SplitLimit.parameter +let () = SplitLimit.set_range 0 max_int + let () = Parameter_customize.set_group precision_tuning let () = Parameter_customize.argument_may_be_fundecl () module SplitReturnFunction = diff --git a/src/plugins/value/value_parameters.mli b/src/plugins/value/value_parameters.mli index 8a25f756cad..fe24f33b22e 100644 --- a/src/plugins/value/value_parameters.mli +++ b/src/plugins/value/value_parameters.mli @@ -88,6 +88,7 @@ module MinLoopUnroll : Parameter_sig.Int module DefaultLoopUnroll : Parameter_sig.Int module HistoryPartitioning : Parameter_sig.Int module ValuePartitioning : Parameter_sig.String_set +module SplitLimit : Parameter_sig.Int module ArrayPrecisionLevel: Parameter_sig.Int -- GitLab From bfd6fc9df7dbaff714803d50da0f7870fafcf566 Mon Sep 17 00:00:00 2001 From: Valentin Perrelle <valentin.perrelle@cea.fr> Date: Wed, 20 Mar 2019 16:34:13 +0100 Subject: [PATCH 236/376] [Eva] Emit slevel consumption messages only when on a statement - prevents the wrong display of locations ; we always have a suitable from a statement --- src/plugins/value/engine/partitioned_dataflow.ml | 6 +++--- tests/builtins/oracle/allocated.1.res.oracle | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/value/engine/partitioned_dataflow.ml b/src/plugins/value/engine/partitioned_dataflow.ml index 127f9c35c51..3f03b79168e 100644 --- a/src/plugins/value/engine/partitioned_dataflow.ml +++ b/src/plugins/value/engine/partitioned_dataflow.ml @@ -473,15 +473,15 @@ module Make_Dataflow let store = get_vertex_store v in (* Join incoming s tates *) let f = Partition.join sources store in - (* Output slevel related things *) - let store_size = Partition.store_size store in - output_slevel store_size; begin match v.vertex_start_of with | Some stmt -> (* Callbacks *) call_statement_callbacks stmt f; (* Transfer function associated to the statement *) Partition.transfer (transfer_statement stmt) f; + (* Output slevel related things *) + let store_size = Partition.store_size store in + output_slevel store_size; (* Debug informations *) Value_parameters.debug ~dkey ~current:true "reached statement %d with %d / %d eternal states, %d to propagate" diff --git a/tests/builtins/oracle/allocated.1.res.oracle b/tests/builtins/oracle/allocated.1.res.oracle index 0d4702a1322..1d1a14a2671 100644 --- a/tests/builtins/oracle/allocated.1.res.oracle +++ b/tests/builtins/oracle/allocated.1.res.oracle @@ -325,7 +325,8 @@ Semantic level unrolling superposing up to 100 states [eva] tests/builtins/allocated.c:84: Semantic level unrolling superposing up to 200 states -[eva] :0: Semantic level unrolling superposing up to 300 states +[eva] tests/builtins/allocated.c:84: + Semantic level unrolling superposing up to 300 states [eva] tests/builtins/allocated.c:84: Semantic level unrolling superposing up to 400 states [eva] tests/builtins/allocated.c:87: Call to builtin free -- GitLab From 93f90b0d992d9016a911be961a8ad9f2dfd89336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 4 Apr 2019 16:55:05 +0200 Subject: [PATCH 237/376] [Eva] Fixes transfer_stmt: Domain.update can now return bottom. Also, when splitting a state according to an expression, do not use the valuation when re-evaluating the expression, as the expression has already been reduced in the valuation, so the "new value" will always be a singleton. --- src/plugins/value/engine/transfer_stmt.ml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/plugins/value/engine/transfer_stmt.ml b/src/plugins/value/engine/transfer_stmt.ml index 31995a8720b..47e410021e4 100644 --- a/src/plugins/value/engine/transfer_stmt.ml +++ b/src/plugins/value/engine/transfer_stmt.ml @@ -923,18 +923,21 @@ module Make (Abstract: Abstractions.Eva) = struct (* Build a state with the lvalue set to a singleton *) let build i acc = let value = Value.inject_int (Cil.typeOf exp) i in - match Eval.assume ~valuation state exp value with - | `Value valuation -> + let state = + Eval.assume ~valuation state exp value >>- fun valuation -> (* Check the reduction *) - let state = TF.update valuation state in - let _,new_ival = evaluate_exp_to_ival ~valuation state exp in + TF.update valuation state + in + match state with + | `Value state -> + let _,new_ival = evaluate_exp_to_ival state exp in if not (Ival.is_singleton_int new_ival) then fail ~exp "failing to learn perfectly from split" ; monitor.Partition.split_values <- SplitValues.add i monitor.Partition.split_values; (i, state) :: acc - | _ -> (* This value cannot be set in the state ; the evaluation of - expr was unprecise *) + | `Bottom -> (* This value cannot be set in the state ; the evaluation of + expr was unprecise *) acc in try -- GitLab From 89a3f6de378ea7441d58cb56eb70102059359419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 26 Mar 2019 10:54:28 +0100 Subject: [PATCH 238/376] [Eva] -eva-default-loop-unrolling becomes -eva-default-loop-unroll. --- src/plugins/value/value_parameters.ml | 6 +++--- tests/value/partitioning-annots.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/value/value_parameters.ml b/src/plugins/value/value_parameters.ml index 86af38150b0..5471f4b343f 100644 --- a/src/plugins/value/value_parameters.ml +++ b/src/plugins/value/value_parameters.ml @@ -718,11 +718,11 @@ let () = Parameter_customize.set_group precision_tuning module DefaultLoopUnroll = Int (struct - let option_name = "-eva-default-loop-unrolling" + let option_name = "-eva-default-loop-unroll" let arg_name = "n" let default = 100 let help = - "defines the default limit for loop unrolling annotations which does\ + "defines the default limit for loop unroll annotations that do\ not explicitely provide a limit." end) let () = add_precision_dep DefaultLoopUnroll.parameter @@ -737,7 +737,7 @@ module HistoryPartitioning = let default = 0 let help = "keep states distincts as long as the <n> last branching in their\ - traces are also distinct. (A value of 0 deactivate this feature)" + traces are also distinct. (A value of 0 deactivates this feature)" end) let () = add_precision_dep HistoryPartitioning.parameter let () = HistoryPartitioning.set_range 0 max_int diff --git a/tests/value/partitioning-annots.c b/tests/value/partitioning-annots.c index 5d6c7d3f98b..10dd8680c38 100644 --- a/tests/value/partitioning-annots.c +++ b/tests/value/partitioning-annots.c @@ -1,6 +1,6 @@ /* run.config* GCC: - STDOPT: #"-main test_unroll -eva-default-loop-unrolling 10" + STDOPT: #"-main test_unroll -eva-default-loop-unroll 10" STDOPT: #"-main test_split" STDOPT: +"-main test_split -eva-partition-value k" STDOPT: #"-main test_loop_split -eva-partition-history 1" -- GitLab From 070559582221f0492cbe2589882775177584327b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 26 Mar 2019 11:00:17 +0100 Subject: [PATCH 239/376] [Eva] Removes the now unused files loop_partitioning. --- src/plugins/value/engine/loop_partitioning.ml | 534 ------------------ .../value/engine/loop_partitioning.mli | 23 - 2 files changed, 557 deletions(-) delete mode 100644 src/plugins/value/engine/loop_partitioning.ml delete mode 100644 src/plugins/value/engine/loop_partitioning.mli diff --git a/src/plugins/value/engine/loop_partitioning.ml b/src/plugins/value/engine/loop_partitioning.ml deleted file mode 100644 index 03d1616d54c..00000000000 --- a/src/plugins/value/engine/loop_partitioning.ml +++ /dev/null @@ -1,534 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat à l'énergie atomique et aux énergies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - - -open Cil_types -open Bottom.Type -open State_partitioning - -let rec list_merge_two_last f = function - | ([] | [_]) as l -> l - | [ a ; b ] -> [ f a b ] - | x :: l -> x :: list_merge_two_last f l - - -module Make (Domain : Domain) (Param : Param) = -struct - include Param - module Partition = Partitioning.Make (Domain) - - (* Partitioning tree for set of states. - - Each internal node [Loop] corresponds to a partitioning over the iterations - of a loop: states corresponding to different iterations of a loop are - stored separately in a list. The list is sorted by increasing iterations: - the first element gathers states for the first iteration, and so on. When - reaching the unrolling limit of a loop, the last element gathers states for - all higher iterations. - - The root of the tree is the innermost loop. As we descend towards the - leaves, we move to the outer loops. The [Empty] constructor can be put in - place of any empty subtree. - - Functions (such as [map2] or [update]) that iterate simultaneously over two - trees assume that they have the same shape, i.e. that they partition the - same loops in the same order. However, an [Empty] node can match any shape: - when iterating over an empty subtree, the shape assertion will always hold. - Moreover, the lists for a same [Loop] node may have different lengths; - [Empty] nodes are then added to the shorter list to match the other one. *) - type 'a tree = - | Empty - | Leaf of 'a - | Loop of loop * ('a tree) list - - module Tree = - struct - let rec iter (f : 'a -> unit) (t : 'a tree) : unit = - match t with - | Empty -> () - | Leaf p -> f p - | Loop (_i,l) -> List.iter (iter f) l - - let rec map (f : 'a -> 'b) (t : 'a tree) : 'b tree = - match t with - | Empty -> Empty - | Leaf p -> Leaf (f p) - | Loop (i,l) -> Loop (i, List.map (map f) l) - - let rec fold (f : 'a -> 'b -> 'b) (t : 'a tree) (x : 'b) : 'b = - match t with - | Empty -> x - | Leaf p -> f p x - | Loop (_i,l) -> List.fold_left (fun x t -> fold f t x) x l - - let exists (f : 'a -> bool) (t : 'a tree) : bool = - try - iter (fun x -> if f x then raise Exit) t; - false - with Exit -> - true - - let list_decons : 'a tree list -> 'a tree * 'a tree list = function - | [] -> Empty, [] - | h :: t -> h, t - - let rec list_map2 (f : 'a tree -> 'b tree -> 'c tree) - (l1 : 'a tree list) (l2 : 'b tree list) : 'c tree list = - if l1 = [] && l2 = [] - then [] - else - let h1, t1 = list_decons l1 - and h2, t2 = list_decons l2 in - f h1 h2 :: list_map2 f t1 t2 - - let rec map2 (f : 'a option -> 'b option -> 'c option) - (t1 : 'a tree) (t2 : 'b tree) : 'c tree = - let to_leaf = function - | Some p -> Leaf p - | None -> Empty - in - match t1, t2 with - | Empty, Empty -> Empty - | Loop (i1, l1), Loop (i2, l2) -> - assert (i1 == i2); - Loop (i1, list_map2 (map2 f) l1 l2) - | Loop (i, l1), Empty -> - Loop (i, list_map2 (map2 f) l1 []) - | Empty, Loop (i, l2) -> - Loop (i, list_map2 (map2 f) [] l2) - | Leaf p1, Leaf p2 -> - to_leaf (f (Some p1) (Some p2)) - | Leaf p1, Empty -> - to_leaf (f (Some p1) None) - | Empty, Leaf p2 -> - to_leaf (f None (Some p2)) - | Loop _, Leaf _ - | Leaf _, Loop _ -> assert false - - (* Creates a tree from t1 updated with t2. When there is an empty node in - t1, creates a new one from ~def. When there is an empty node in t2, - keep the original node from t1. *) - let rec update ~(def : unit -> 'a) (f : 'a -> 'b -> unit) - (t1 : 'a tree) (t2 : 'b tree) : 'a tree = - match t2 with - | Empty -> t1 - | Loop (i, l2) -> - let l1 = match t1 with - | Empty -> [] - | Loop (i', l1) -> assert (i' == i); l1 - | _ -> assert false - in - Loop (i, list_map2 (update ~def f) l1 l2) - | Leaf p2 -> - let p1 = match t1 with - | Empty -> def () - | Leaf p -> p - | Loop _ -> assert false - in - f p1 p2; - Leaf p1 - - let rec merge merge_leaf t1 t2 = - match t1, t2 with - | _, Empty -> t1 - | Empty, _ -> t2 - | Leaf p1, Leaf p2 -> Leaf (merge_leaf p1 p2) - | Loop (i, l1), Loop (i', l2) -> - assert (i == i'); - Loop (i, list_map2 (merge merge_leaf) l1 l2) - | Leaf _, Loop _ | Loop _, Leaf _ -> assert false - - let pretty (printer : Format.formatter -> 'a -> unit) - (fmt : Format.formatter) (t : 'a tree) : unit = - let rec pretty indent t = - Format.fprintf fmt "%*s" (indent * 2) ""; - match t with - | Empty -> - Format.fprintf fmt "Empty@." - | Leaf leaf -> - Format.fprintf fmt "Leaf @[%a@]@." printer leaf - | Loop (_,l) -> - Format.fprintf fmt "Loop@."; - List.iter (pretty (indent+1)) l - in - pretty 0 t - end - - - type state = Domain.t - - (** Stores contains states which have already been propagated at a control - point. - - They are organized as a partitioning tree whose leaves are sets of states. - These sets are themselves partitioned into two parts. - - - Eternal states are states which once added will stay in the store - forever. - - Once the slevel has been exceeded, new propagated states are not - considered eternal; instead, they are joined into an ultimate state of - the corresponding leaf in the partition tree. - - The store also keeps information about the vertex it is associated with: - - the [size_limit] of eternal states (slevel) for this store; - - the presence of a [merge] operation on this store; - - the stmt, if applicable, starting at this store; - - a table indexing all the states of this store to speed up the inclusion - tests. *) - type store = { - size_limit : int; - merge : bool; - store_stmt : stmt option; - store_table : Partition.t; - mutable store_tree : store_leaf tree; - mutable store_size : int; - } - and store_leaf = { - mutable eternal_states : state list; - mutable ultimate_state : state or_bottom; - } - - (** Propagations, like stores, are organized as partitioning trees, which - help to keep track of how many iterations of each loop have been - necessary to reach these states. At the leaf nodes of these trees, we only - keep a list of propagated states. *) - type propagation = { - mutable propagation_tree : propagation_leaf tree; - } - and propagation_leaf = { - mutable states : state list; - } - - (** For this implementation, the [shadow] only remembers the number of - already propagated states on an edge. *) - type shadow = { - mutable transfered_states : int; - } - - (** The widening object allows widenings to be applied independently on each - leaf of the partitioning tree. To control widening, each leaf contains - - the widening counter telling how many iterations must be done before - widening - - the previous widening state, obtained after the last widening - - the previous iteration state, obtained the last time we went at this - point, even if there was no widening at this previous iteration. *) - type widening = { - widening_stmt : stmt; - mutable widening_tree : widening_leaf tree; - } - and widening_leaf = { - mutable widened_state : state or_bottom; - mutable previous_state : state or_bottom; - mutable widening_counter : int; - } - - - (** Tree manipulation *) - - let empty_store_leaf () : store_leaf = - { - eternal_states = []; - ultimate_state = `Bottom - } - - let empty_widening_leaf () : widening_leaf = - { - widened_state = `Bottom; - previous_state = `Bottom; - widening_counter = widening_delay; - } - - let is_empty_propagation_tree t = - not (Tree.exists (fun l -> l.states <> []) t) - - let join_propagation_tree t1 t2 = - let merge_leaf p1 p2 = { states = p2.states @ p1.states } in - Tree.merge merge_leaf t1 t2 - - (* Constructors *) - - let empty_store ~(stmt : stmt option) : store = - let size_limit, merge = match stmt with - | None -> max_int, false - | Some stmt -> slevel stmt, merge stmt - in - { - size_limit; merge; - store_stmt = stmt; - store_table = Partition.empty (); - store_tree = Empty; - store_size = 0; - } - - let empty_propagation () : propagation = - { propagation_tree = Empty } - - let empty_shadow () : shadow = - { transfered_states = 0 } - - let empty_widening ~(stmt : stmt option) : widening = - { - widening_stmt = Extlib.opt_conv Cil.invalidStmt stmt; - widening_tree = Empty; - } - - let initial_propagation (states : state list) : propagation = - { propagation_tree = Leaf { states } } - - (* Pretty printing *) - - let pretty_store_leaf (fmt : Format.formatter) (s : store_leaf) : unit = - List.iter (Domain.pretty fmt) s.eternal_states; - match s.ultimate_state with - | `Value state -> Domain.pretty fmt state - | `Bottom -> () - - let pretty_store (fmt : Format.formatter) (s : store) : unit = - Tree.iter (pretty_store_leaf fmt) s.store_tree - - let pretty_propagation_leaf (fmt : Format.formatter) (p : propagation_leaf) = - List.iter (Domain.pretty fmt) p.states - - let _pretty_propagation_tree (fmt : Format.formatter) (p : propagation) = - Tree.pretty pretty_propagation_leaf fmt p.propagation_tree - - let pretty_propagation (fmt : Format.formatter) (p : propagation) = - Tree.iter (pretty_propagation_leaf fmt) p.propagation_tree - - (* Accessors *) - - let expanded (s : store) : state list = - let collect s acc = - Bottom.add_to_list s.ultimate_state (s.eternal_states @ acc) - in - Tree.fold collect s.store_tree [] - - let smashed (s : store) : state or_bottom = - let l = expanded s in - Domain.join_list l - - let is_empty_store (s : store) : bool = - expanded s = [] - - let is_empty_propagation (p : propagation) : bool = - is_empty_propagation_tree p.propagation_tree - - let is_empty_shadow (s : shadow) : bool = - s.transfered_states = 0 - - let store_size (s : store) : int = - s.store_size - - let propagation_size (p : propagation) : int = - Tree.fold (fun p acc -> acc + List.length p.states) p.propagation_tree 0 - - (* Reset state (for hierchical convergence) *) - - let reset_store (s : store) : unit = - Tree.iter (fun s -> s.ultimate_state <- `Bottom) s.store_tree - - let reset_propagation (p : propagation) : unit = - p.propagation_tree <- Empty - - let reset_shadow (_s : shadow) : unit = () - - let reset_widening (w : widening) : unit = - let reset w = - w.widened_state <- `Bottom; - w.previous_state <- `Bottom; - w.widening_counter <- widening_delay - in - Tree.iter reset w.widening_tree - - let reset_widening_counter (w : widening) : unit = - let reset w = - w.widening_counter <- max w.widening_counter (widening_period - 1) - in - Tree.iter reset w.widening_tree - - (* Operators *) - - let clear_propagation (p : propagation) : unit = - p.propagation_tree <- Empty - - let transfer (f : state list -> state list) (p : propagation) : unit = - let f p = - let states = if p.states = [] then [] else f p.states in - { states } - in - p.propagation_tree <- Tree.map f p.propagation_tree - - let merge ~(into : propagation) (source : propagation) : unit = - into.propagation_tree <- join_propagation_tree into.propagation_tree - source.propagation_tree - - let join (sources : (propagation*shadow) list) (dest : store) : propagation = - (* Create a new propagation *) - let p = empty_propagation () in - (* Merge incomming propagations and update counters *) - let update acc (p,s) = - let size = propagation_size p in - s.transfered_states <- s.transfered_states + size; - (* The store size is incremented by the number of incoming states, even - if those states are not distinct or already propagated. This is for - compatibility with the original definition of slevel. *) - dest.store_size <- dest.store_size + size; - join_propagation_tree p.propagation_tree acc - in - p.propagation_tree <- List.fold_left update Empty sources; - (* Merge / Merge after loop : join leafs *) - if dest.merge then begin - let smash p = - { states = Bottom.to_list (Domain.join_list p.states) } - in - p.propagation_tree <- Tree.map smash p.propagation_tree; - end; - (* Filter states already propagated, on statement vertices only. *) - if dest.store_stmt <> None then begin - let update p = - { states = Partition.merge_set_return_new p.states dest.store_table } - in - p.propagation_tree <- Tree.map update p.propagation_tree; - end; - (* Do we exceed slevel ? *) - if dest.store_size <= dest.size_limit then begin - (* No, add the incoming states to the list of eternal states *) - let update s p = - s.eternal_states <- p.states @ s.eternal_states - in - dest.store_tree <- Tree.update ~def:empty_store_leaf update - dest.store_tree p.propagation_tree; - end else begin - (* Yes, add the incoming states as ultimate states *) - let transcend s p = - let state' = Domain.join_list p.states in - if Bottom.is_included Domain.is_included state' s.ultimate_state then - p.states <- [] - else begin - begin match dest.store_stmt with - | Some {skind=Cil_types.Loop _} when s.ultimate_state <> `Bottom -> - Value_parameters.feedback ~level:1 ~once:true ~current:true - "starting to merge loop iterations" - | _ -> () - end; - (* Join the new states in the previous ultimate state, and propagate - the result. We could propagate the new states only, but this is - kept for compatibility reasons. *) - let state' = Bottom.join Domain.join s.ultimate_state state' in - s.ultimate_state <- state'; - p.states <- Bottom.to_list state' - end - in - dest.store_tree <- Tree.update ~def:empty_store_leaf transcend - dest.store_tree p.propagation_tree - end; - p - - let widen (s : store) (w : widening) (p : propagation) : bool = - let stmt = w.widening_stmt in - (* Pair the store and propagation tree *) - let pair s p = - match s, p with - | Some s, Some p -> Some (s, p) - | None, Some _ -> assert false (* The propagated states are not stored! *) - | _, None -> None - in - let tree = Tree.map2 pair s.store_tree p.propagation_tree in - (* Apply widening to each leaf *) - let widen w (s,p) = - (* If the ultimate stored state is bottom but the propagation is not, we - did not consume all the slevel yet and we don't want to do anything, - in particular, we do not want to decrease the widening counter. *) - if not (Bottom.is_bottom s.ultimate_state) then begin - let current_state = s.ultimate_state in - let previous_state = w.previous_state in - w.previous_state <- current_state; - w.widening_counter <- w.widening_counter - 1; - match previous_state, current_state with - | _, `Bottom | `Bottom, _ -> () - | `Value prev, `Value curr -> - if Domain.is_included curr prev then - p.states <- [] - else if w.widening_counter < 0 then begin - Value_parameters.feedback ~level:1 ~once:true ~current:true - ~dkey:Value_parameters.dkey_widening - "applying a widening at this point"; - (* We join the previous widening state with the previous iteration - state so as to allow the intermediate(s) iteration(s) (between - two widenings) to stabilize at least a part of the state. *) - let prev = match w.widened_state with - | `Value v -> Domain.join prev v - | `Bottom -> prev - in - let next = Domain.widen kf stmt prev (Domain.join prev curr) in - p.states <- [next]; - w.previous_state <- `Value next; - w.widened_state <- `Value next; - w.widening_counter <- widening_period - 1 - end - end - in - w.widening_tree <- - Tree.update ~def:empty_widening_leaf widen w.widening_tree tree; - (* Is there still something to propagate ? *) - is_empty_propagation p - - - let enter_loop (p : propagation) (i : loop) = - p.propagation_tree <- Loop (i, [p.propagation_tree]) - - let leave_loop (p : propagation) (i : loop) = - p.propagation_tree <- - match p.propagation_tree with - | Empty -> Empty - | Loop (i', l) -> - assert (i == i'); - List.fold_left join_propagation_tree Empty l - | Leaf _ -> assert false - - let next_loop_iteration (p : propagation) (i : loop) = - p.propagation_tree <- - match p.propagation_tree with - | Empty -> Empty - | Loop (i', l) -> - assert (i == i'); - let n = unroll i in - let l = - if n <= 0 then l - else - let l = Empty :: l in - if List.length l <= n + 1 - then l - else begin - let merge t1 t2 = - if not (is_empty_propagation_tree t2) then - Value_parameters.warning ~once:true ~current:true - ~wkey:Value_parameters.wkey_loop_unroll - "loop not completely unrolled"; - join_propagation_tree t1 t2 - in - list_merge_two_last merge l - end - in - Loop (i', l) - | Leaf _ -> assert false -end diff --git a/src/plugins/value/engine/loop_partitioning.mli b/src/plugins/value/engine/loop_partitioning.mli deleted file mode 100644 index 9006e977b10..00000000000 --- a/src/plugins/value/engine/loop_partitioning.mli +++ /dev/null @@ -1,23 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat à l'énergie atomique et aux énergies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -module Make : State_partitioning.Partitioning -- GitLab From cb2a05059b0f3ce3fbc1fc0dced94af19b01dc77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 26 Mar 2019 16:56:23 +0100 Subject: [PATCH 240/376] [Eva] Fixes a typo in a message. --- src/plugins/value/engine/transfer_stmt.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/value/engine/transfer_stmt.ml b/src/plugins/value/engine/transfer_stmt.ml index 47e410021e4..1f193393075 100644 --- a/src/plugins/value/engine/transfer_stmt.ml +++ b/src/plugins/value/engine/transfer_stmt.ml @@ -911,7 +911,7 @@ module Make (Abstract: Abstractions.Eva) = struct try Cvalue.V.project_ival cvalue with Cvalue.V.Not_based_on_null -> - fail ~exp "this partitioning parameter must evaluatassumee to an integer" + fail ~exp "this partitioning parameter must evaluate to an integer" in valuation, ival -- GitLab From b2a7f4c30e265557404f421b43f313a52d3b5a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 5 Apr 2019 11:31:15 +0200 Subject: [PATCH 241/376] [Eva] Moves functions for partitioning from transfer_stmt into partition. --- src/plugins/value/engine/compute_functions.ml | 2 +- src/plugins/value/engine/partition.ml | 136 +++++++++++++++--- src/plugins/value/engine/partition.mli | 16 +-- .../value/engine/partitioned_dataflow.ml | 37 ++--- .../value/engine/partitioned_dataflow.mli | 22 +-- .../value/engine/state_partitioning.mli | 6 +- .../value/engine/trace_partitioning.ml | 30 ++-- src/plugins/value/engine/transfer_stmt.ml | 108 -------------- src/plugins/value/engine/transfer_stmt.mli | 6 - 9 files changed, 166 insertions(+), 197 deletions(-) diff --git a/src/plugins/value/engine/compute_functions.ml b/src/plugins/value/engine/compute_functions.ml index 13a6e265714..cac999676f6 100644 --- a/src/plugins/value/engine/compute_functions.ml +++ b/src/plugins/value/engine/compute_functions.ml @@ -144,7 +144,7 @@ module Make (Abstract: Abstractions.Eva) = struct module Computer = Partitioned_dataflow.Computer - (Abstract.Dom) (PowersetDomain) (Transfer) (Init) (Logic) (Spec) + (Abstract) (PowersetDomain) (Transfer) (Init) (Logic) (Spec) let initial_state = Init.initial_state diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index a1825d939ed..6c5c152d4d3 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -20,6 +20,8 @@ (* *) (**************************************************************************) +open Bottom.Type + (* --- Split monitors --- *) type split_monitor = { @@ -147,24 +149,11 @@ type action = exception InvalidAction - (* --- Flows --- *) -module type InputDomain = -sig - type t - - exception Operation_failed - - val join : t -> t -> t - val split : monitor:split_monitor -> - t -> Cil_types.exp -> (Integer.t * t) list - val eval_exp_to_int : t -> Cil_types.exp -> int -end - -module MakeFlow (Domain : InputDomain) = +module MakeFlow (Abstract: Abstractions.Eva) = struct - type state = Domain.t + type state = Abstract.Dom.t type t = (key * state) list let empty = [] @@ -183,7 +172,7 @@ struct (* Join states with the same key *) let x' = try - Domain.join (KMap.find k p) x + Abstract.Dom.join (KMap.find k p) x with Not_found -> x in KMap.add k x' p @@ -199,6 +188,113 @@ struct let union (p1 : t) (p2 : t) : t = p1 @ p2 + (* --- Evalution and split functions -------------------------------------- *) + + (* Domains transfer functions. *) + module TF = Abstract.Dom.Transfer (Abstract.Eval.Valuation) + + exception Operation_failed + + let fail ~exp message = + let source = fst exp.Cil_types.eloc in + let warn_and_raise message = + Value_parameters.warning ~source ~once:true "%s" message; + raise Operation_failed + in + Pretty_utils.ksfprintf warn_and_raise message + + let evaluate_exp_to_ival ?valuation state exp = + (* Evaluate the expression *) + let valuation, value = + match Abstract.Eval.evaluate ?valuation ~reduction:false state exp with + | `Value (valuation, value), alarms when Alarmset.is_empty alarms -> + valuation, value + | _ -> + fail ~exp "this partitioning parameter cannot be evaluated safely on \ + all states" + in + (* Get the cvalue *) + let cvalue = match Abstract.Val.get Main_values.cvalue_key with + | Some get_cvalue -> get_cvalue value + | None -> fail ~exp "partitioning is disabled when the CValue domain is \ + not active" + in + (* Extract the ival *) + let ival = + try + Cvalue.V.project_ival cvalue + with Cvalue.V.Not_based_on_null -> + fail ~exp "this partitioning parameter must evaluate to an integer" + in + valuation, ival + + exception Split_limit of Integer.t option + + let split_by_value ~monitor state exp = + let module SplitValues = Datatype.Integer.Set in + let valuation, ival = evaluate_exp_to_ival state exp in + (* Build a state with the lvalue set to a singleton *) + let build i acc = + let value = Abstract.Val.inject_int (Cil.typeOf exp) i in + let state = + Abstract.Eval.assume ~valuation state exp value >>- fun valuation -> + (* Check the reduction *) + TF.update valuation state + in + match state with + | `Value state -> + let _,new_ival = evaluate_exp_to_ival state exp in + if not (Ival.is_singleton_int new_ival) then + fail ~exp "failing to learn perfectly from split" ; + monitor.split_values <- + SplitValues.add i monitor.split_values; + (i, state) :: acc + | `Bottom -> (* This value cannot be set in the state ; the evaluation of + expr was unprecise *) + acc + in + try + (* Check the size of the ival *) + begin match Ival.cardinal ival with + | None -> raise (Split_limit None) + | Some c as count -> + if Integer.(gt c (of_int monitor.split_limit)) then + raise (Split_limit count) + end; + (* For each integer of the ival, build a new state *) + try + let result = Ival.fold_int build ival [] in + let c = SplitValues.cardinal monitor.split_values in + if c > monitor.split_limit then + raise (Split_limit (Some (Integer.of_int c))); + result + with Abstract_interp.Error_Top -> (* The ival is float *) + raise (Split_limit None) + with + | Split_limit count -> + let pp_count fmt = + match count with + | None -> () + | Some c -> Format.fprintf fmt " (%a)" (Integer.pretty ~hexa:false) c + in + fail ~exp "split on more than %d values%t prevented ; try to improve \ + the analysis precision or look at the option -eva-split-limit \ + to increase this limit." + monitor.split_limit pp_count + + + let eval_exp_to_int state exp = + let _valuation, ival = evaluate_exp_to_ival state exp in + try + Integer.to_int (Ival.project_int ival) + with + | Ival.Not_Singleton_Int -> + fail ~exp "this partitioning parameter must evaluate to a singleton" + | Failure _ -> + fail ~exp "this partitioning parameter is too big" + + (* --- Applying partitioning actions onto flows --------------------------- *) + let split_state ~monitor ~(static : bool) (exp : Cil_types.exp) (key : key) (state : state) : (key * state) list = try @@ -212,8 +308,8 @@ struct in (k,x) in - List.map update_key (Domain.split ~monitor state exp) - with Domain.Operation_failed -> + List.map update_key (split_by_value ~monitor state exp) + with Operation_failed -> [(key,state)] let split ~monitor ~(static : bool) (p : t) (exp : Cil_types.exp) = @@ -260,10 +356,10 @@ struct | Enter_loop limit_kind -> fun k x -> let limit = try match limit_kind with - | ExpLimit exp -> Domain.eval_exp_to_int x exp + | ExpLimit exp -> eval_exp_to_int x exp | IntLimit i -> i with - | Domain.Operation_failed -> 0 + | Operation_failed -> 0 in { k with loops = (0,limit) :: k.loops } diff --git a/src/plugins/value/engine/partition.mli b/src/plugins/value/engine/partition.mli index 9d2c65e8a9e..7c8ed9e5a81 100644 --- a/src/plugins/value/engine/partition.mli +++ b/src/plugins/value/engine/partition.mli @@ -126,21 +126,9 @@ exception InvalidAction (* Flows *) -module type InputDomain = +module MakeFlow (Abstract: Abstractions.Eva) : sig - type t - - exception Operation_failed - - val join : t -> t -> t - val split : monitor:split_monitor -> - t -> Cil_types.exp -> (Integer.t * t) list - val eval_exp_to_int : t -> Cil_types.exp -> int -end - -module MakeFlow (Domain : InputDomain) : -sig - type state = Domain.t + type state = Abstract.Dom.t type t val empty : t diff --git a/src/plugins/value/engine/partitioned_dataflow.ml b/src/plugins/value/engine/partitioned_dataflow.ml index 3f03b79168e..b22c6f12e9f 100644 --- a/src/plugins/value/engine/partitioned_dataflow.ml +++ b/src/plugins/value/engine/partitioned_dataflow.ml @@ -46,21 +46,25 @@ let blocks_share_locals b1 b2 = | _, _ -> false module Make_Dataflow - (Domain : Abstract_domain.External) - (States : Powerset.S with type state = Domain.t) - (Transfer : Transfer_stmt.S with type state = Domain.t) - (Init: Initialization.S with type state := Domain.t) - (Logic : Transfer_logic.S with type state = Domain.t + (Abstract : Abstractions.Eva) + (States : Powerset.S with type state = Abstract.Dom.t) + (Transfer : Transfer_stmt.S with type state = Abstract.Dom.t) + (Init: Initialization.S with type state := Abstract.Dom.t) + (Logic : Transfer_logic.S with type state = Abstract.Dom.t and type states = States.t) - (Spec: sig val treat_statement_assigns: assigns -> Domain.t -> Domain.t end) + (Spec: sig + val treat_statement_assigns: assigns -> Abstract.Dom.t -> Abstract.Dom.t + end) (AnalysisParam : sig val kf: kernel_function val call_kinstr: kinstr - val initial_state : Domain.t + val initial_state : Abstract.Dom.t end) () = struct + module Domain = Abstract.Dom + (* --- Analysis parameters --- *) let kf = AnalysisParam.kf @@ -97,7 +101,7 @@ module Make_Dataflow (* --- Abstract values storage --- *) - module Partition = Trace_partitioning.Make (Domain) (Transfer) (AnalysisParam) + module Partition = Trace_partitioning.Make (Abstract) (Transfer) (AnalysisParam) type store = Partition.store type flow = Partition.flow @@ -770,20 +774,21 @@ end module Computer - (Domain : Abstract_domain.External) - (States : Powerset.S with type state = Domain.t) - (Transfer : Transfer_stmt.S with type state = Domain.t - and type value = Domain.value) - (Init: Initialization.S with type state := Domain.state) - (Logic : Transfer_logic.S with type state = Domain.t + (Abstract : Abstractions.Eva) + (States : Powerset.S with type state = Abstract.Dom.t) + (Transfer : Transfer_stmt.S with type state = Abstract.Dom.t) + (Init: Initialization.S with type state := Abstract.Dom.t) + (Logic : Transfer_logic.S with type state = Abstract.Dom.t and type states = States.t) - (Spec: sig val treat_statement_assigns: assigns -> Domain.t -> Domain.t end) + (Spec: sig + val treat_statement_assigns: assigns -> Abstract.Dom.t -> Abstract.Dom.t + end) = struct let compute kf call_kinstr state = let module Dataflow = Make_Dataflow - (Domain) (States) (Transfer) (Init) (Logic) (Spec) + (Abstract) (States) (Transfer) (Init) (Logic) (Spec) (struct let kf = kf let call_kinstr = call_kinstr diff --git a/src/plugins/value/engine/partitioned_dataflow.mli b/src/plugins/value/engine/partitioned_dataflow.mli index e65f83e2d4f..d76886b5092 100644 --- a/src/plugins/value/engine/partitioned_dataflow.mli +++ b/src/plugins/value/engine/partitioned_dataflow.mli @@ -27,24 +27,26 @@ open Eval val signal_abort: unit -> unit module Computer - (* Abstract domain with partitioning. *) - (Domain: Abstract_domain.External) + (* Abstractions with the evaluator. *) + (Abstract: Abstractions.Eva) (* Set of states of abstract domain. *) - (States : Powerset.S with type state = Domain.t) + (States : Powerset.S with type state = Abstract.Dom.t) (* Transfer functions for statement on the abstract domain. *) - (Transfer : Transfer_stmt.S with type state = Domain.t - and type value = Domain.value) + (Transfer : Transfer_stmt.S with type state = Abstract.Dom.t + and type value = Abstract.Val.t) (* Initialization of local variables. *) - (Init: Initialization.S with type state := Domain.state) + (Init: Initialization.S with type state := Abstract.Dom.t) (* Transfer functions for the logic on the abstract domain. *) - (Logic : Transfer_logic.S with type state = Domain.t + (Logic : Transfer_logic.S with type state = Abstract.Dom.t and type states = States.t) - (Spec: sig val treat_statement_assigns: assigns -> Domain.t -> Domain.t end) + (Spec: sig + val treat_statement_assigns: assigns -> Abstract.Dom.t -> Abstract.Dom.t + end) : sig val compute: - kernel_function -> kinstr -> Domain.t -> - Domain.t list or_bottom * Value_types.cacheable + kernel_function -> kinstr -> Abstract.Dom.t -> + Abstract.Dom.t list or_bottom * Value_types.cacheable end diff --git a/src/plugins/value/engine/state_partitioning.mli b/src/plugins/value/engine/state_partitioning.mli index f143d2671be..fdaaec4ff31 100644 --- a/src/plugins/value/engine/state_partitioning.mli +++ b/src/plugins/value/engine/state_partitioning.mli @@ -138,7 +138,7 @@ end module type Domain = Partitioning.Domain module type Partitioning = functor - (Domain : Abstract_domain.External) - (Transfer : Transfer_stmt.S with type state = Domain.t) + (Abstract : Abstractions.Eva) + (Transfer : Transfer_stmt.S with type state = Abstract.Dom.t) (Kf : Kf) -> - Partition with type state = Domain.t + Partition with type state = Abstract.Dom.t diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index 2411f49ce99..9a86cf94ddc 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -27,8 +27,8 @@ open Partition module Make - (Domain : Abstract_domain.External) - (Transfer : Transfer_stmt.S with type state = Domain.t) + (Abstract: Abstractions.Eva) + (Transfer : Transfer_stmt.S with type state = Abstract.Dom.t) (Kf : Kf) = struct module Parameters = Partitioning_parameters.Make (Kf) @@ -36,22 +36,14 @@ struct open Kf open Parameters - (* Add the split function to the domain *) - module Domain = - struct - exception Operation_failed = Transfer.Operation_failed - let split = Transfer.split_by_value - let eval_exp_to_int = Transfer.eval_exp_to_int + module Domain = Abstract.Dom - include Domain - - let smash = function - | [] -> [] - | v1 :: l -> [ List.fold_left join v1 l ] - end + let smash_states = function + | [] -> [] + | v1 :: l -> [ List.fold_left Domain.join v1 l ] module Index = Partitioning.Make (Domain) - module Flow = Partition.MakeFlow (Domain) + module Flow = Partition.MakeFlow (Abstract) type state = Domain.t @@ -133,7 +125,7 @@ struct Partition.to_list s.store_partition let smashed (s : store) : state or_bottom = - Bottom.of_list (Domain.smash (expanded s)) + Bottom.of_list (smash_states (expanded s)) let contents (f : flow) : state list = Flow.to_list f.flow_states @@ -179,11 +171,11 @@ struct begin match return_exp with | Some return_exp -> let states = Transfer.split_final_states kf return_exp i states in - List.flatten (List.map Domain.smash states) + List.flatten (List.map smash_states states) | None -> - Domain.smash states + smash_states states end - | Split_strategy.NoSplit -> Domain.smash states + | Split_strategy.NoSplit -> smash_states states | Split_strategy.FullSplit -> states (* Last case not possible : already transformed into SplitEqList *) | Split_strategy.SplitAuto -> assert false diff --git a/src/plugins/value/engine/transfer_stmt.ml b/src/plugins/value/engine/transfer_stmt.ml index 1f193393075..c81a78f0133 100644 --- a/src/plugins/value/engine/transfer_stmt.ml +++ b/src/plugins/value/engine/transfer_stmt.ml @@ -40,10 +40,6 @@ module type S = sig state -> (stmt * lval list * lval list * lval list * stmt ref list) list -> unit or_bottom val enter_scope: kernel_function -> varinfo list -> state -> state - exception Operation_failed - val split_by_value: monitor:Partition.split_monitor -> - state -> exp -> (Integer.t * state) list - val eval_exp_to_int: state -> exp -> int type call_result = { states: state list or_bottom; cacheable: Value_types.cacheable; @@ -875,110 +871,6 @@ module Make (Abstract: Abstractions.Eva) = struct Domain.initialize_variable lval location ~initialized init_value state in List.fold_left initialize_volatile state vars - - - (* ------------------------------------------------------------------------ *) - (* Partitioning *) - (* ------------------------------------------------------------------------ *) - - exception Operation_failed - - let fail ~exp message = - let warn_and_raise message = - Value_parameters.warning ~source:(fst exp.eloc) ~once:true "%s" message; - raise Operation_failed - in - Pretty_utils.ksfprintf warn_and_raise message - - let evaluate_exp_to_ival ?valuation state exp = - (* Evaluate the expression *) - let valuation, value = - match Eval.evaluate ?valuation ~reduction:false state exp with - | `Value (valuation, value), alarms when Alarmset.is_empty alarms -> - valuation, value - | _ -> - fail ~exp "this partitioning parameter cannot be evaluated safely on \ - all states" - in - (* Get the cvalue *) - let cvalue = match Value.get Main_values.cvalue_key with - | Some get_cvalue -> get_cvalue value - | None -> fail ~exp "partitioning is disabled when the CValue domain is \ - not active" - in - (* Extract the ival *) - let ival = - try - Cvalue.V.project_ival cvalue - with Cvalue.V.Not_based_on_null -> - fail ~exp "this partitioning parameter must evaluate to an integer" - in - valuation, ival - - exception Split_limit of Integer.t option - - let split_by_value ~monitor state exp = - let module SplitValues = Datatype.Integer.Set in - let valuation, ival = evaluate_exp_to_ival state exp in - (* Build a state with the lvalue set to a singleton *) - let build i acc = - let value = Value.inject_int (Cil.typeOf exp) i in - let state = - Eval.assume ~valuation state exp value >>- fun valuation -> - (* Check the reduction *) - TF.update valuation state - in - match state with - | `Value state -> - let _,new_ival = evaluate_exp_to_ival state exp in - if not (Ival.is_singleton_int new_ival) then - fail ~exp "failing to learn perfectly from split" ; - monitor.Partition.split_values <- - SplitValues.add i monitor.Partition.split_values; - (i, state) :: acc - | `Bottom -> (* This value cannot be set in the state ; the evaluation of - expr was unprecise *) - acc - in - try - (* Check the size of the ival *) - begin match Ival.cardinal ival with - | None -> raise (Split_limit None) - | Some c as count -> - if Integer.(gt c (of_int monitor.Partition.split_limit)) then - raise (Split_limit count) - end; - (* For each integer of the ival, build a new state *) - try - let result = Ival.fold_int build ival [] in - let c = SplitValues.cardinal monitor.Partition.split_values in - if c > monitor.Partition.split_limit then - raise (Split_limit (Some (Integer.of_int c))); - result - with Abstract_interp.Error_Top -> (* The ival is float *) - raise (Split_limit None) - with - | Split_limit count -> - let pp_count fmt = - match count with - | None -> () - | Some c -> Format.fprintf fmt " (%a)" (Integer.pretty ~hexa:false) c - in - fail ~exp "split on more than %d values%t prevented ; try to improve \ - the analysis precision or look at the option -eva-split-limit \ - to increase this limit." - monitor.Partition.split_limit pp_count - - - let eval_exp_to_int state exp = - let _valuation, ival = evaluate_exp_to_ival state exp in - try - Integer.to_int (Ival.project_int ival) - with - | Ival.Not_Singleton_Int -> - fail ~exp "this partitioning parameter must evaluate to a singleton" - | Failure _ -> - fail ~exp "this partitioning parameter is too big" end diff --git a/src/plugins/value/engine/transfer_stmt.mli b/src/plugins/value/engine/transfer_stmt.mli index 76bb4c92be0..a2e64699a2e 100644 --- a/src/plugins/value/engine/transfer_stmt.mli +++ b/src/plugins/value/engine/transfer_stmt.mli @@ -51,12 +51,6 @@ module type S = sig val enter_scope: kernel_function -> varinfo list -> state -> state - exception Operation_failed - - val split_by_value: monitor:Partition.split_monitor -> - state -> exp -> (Integer.t * state) list - val eval_exp_to_int: state -> exp -> int - type call_result = { states: state list or_bottom; cacheable: Value_types.cacheable; -- GitLab From 1b4db518d548fa9f4d32a37023d9194766a20cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 5 Apr 2019 23:21:30 +0200 Subject: [PATCH 242/376] [Eva] Partition: removes unused functions. --- src/plugins/value/engine/partition.ml | 5 ----- src/plugins/value/engine/partition.mli | 3 --- 2 files changed, 8 deletions(-) diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index 6c5c152d4d3..869e39eba5e 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -128,8 +128,6 @@ let map_filter (f : key -> 'a -> 'b option) (p : 'a partition) : 'b partition = (* --- Partitioning actions --- *) -type 'a transfer_function = (key * 'a) list -> (key * 'a) list - type unroll_limit = | ExpLimit of Cil_types.exp | IntLimit of int @@ -336,9 +334,6 @@ struct let map_keys (f : key -> state -> key) (p : t) : t = List.map (fun (k,x) -> f k x, x) p - let transfer (f : state transfer_function) (p : t) : t = - f p - let transfer_keys p = function | Static_split (exp,monitor) -> split ~monitor ~static:true p exp diff --git a/src/plugins/value/engine/partition.mli b/src/plugins/value/engine/partition.mli index 7c8ed9e5a81..0845015461a 100644 --- a/src/plugins/value/engine/partition.mli +++ b/src/plugins/value/engine/partition.mli @@ -102,8 +102,6 @@ val map_filter : (key -> 'a -> 'b option) -> 'a partition -> 'b partition (* Partitioning actions *) -type 'a transfer_function = (key * 'a) list -> (key * 'a) list - type unroll_limit = | ExpLimit of Cil_types.exp | IntLimit of int @@ -143,7 +141,6 @@ sig val union : t -> t -> t - val transfer : state transfer_function -> t -> t val transfer_keys : t -> action -> t val transfer_states : (state -> state list) -> t -> t val legacy_transfer_states : (state list -> state list) -> t -> t -- GitLab From 747f3ad00abb083123fb920b90c755ffde1c9f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Wed, 27 Mar 2019 15:58:36 +0100 Subject: [PATCH 243/376] [Eva] Do not export partition key type. --- src/plugins/value/engine/partition.ml | 10 ++++++---- src/plugins/value/engine/partition.mli | 9 ++------- src/plugins/value/engine/trace_partitioning.ml | 6 ++---- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index 869e39eba5e..8c555ff0a8d 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -45,11 +45,11 @@ module BranchList = Datatype.List (Datatype.Int) type branch = int type key = { - ration_stamp : (int * int) option; + ration_stamp : (int * int) option; (* store stamp / transfer stamp *) branches : branch list; - loops : (int * int) list; - static_split : (Integer.t*split_monitor) ExpMap.t; - dynamic_split : (Integer.t*split_monitor) ExpMap.t; + loops : (int * int) list; (* current iteration / max unrolling *) + static_split : (Integer.t*split_monitor) ExpMap.t; (* exp->value*monitor *) + dynamic_split : (Integer.t*split_monitor) ExpMap.t; (* exp->value*monitor *) } module Key = @@ -97,6 +97,8 @@ struct (Integer.pretty ~hexa:false) i) fmt (ExpMap.bindings key.static_split @ ExpMap.bindings key.dynamic_split) + + let exceed_rationing key = key.ration_stamp = None end diff --git a/src/plugins/value/engine/partition.mli b/src/plugins/value/engine/partition.mli index 0845015461a..f5e03e8642f 100644 --- a/src/plugins/value/engine/partition.mli +++ b/src/plugins/value/engine/partition.mli @@ -69,19 +69,14 @@ type branch = int module ExpMap = Cil_datatype.ExpStructEq.Map -type key = private { - ration_stamp : (int * int) option; (* store stamp / transfer stamp *) - branches : branch list; - loops : (int * int) list; (* current iteration / max unrolling *) - static_split : (Integer.t * split_monitor) ExpMap.t; (* exp->value*monitor *) - dynamic_split : (Integer.t * split_monitor) ExpMap.t; (* exp->value*monitor *) -} +type key module Key : sig type t = key val zero : t val compare : t -> t -> int val pretty : Format.formatter -> t -> unit + val exceed_rationing: t -> bool end type 'a partition diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index 9a86cf94ddc..e3908276dd7 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -187,9 +187,7 @@ struct (* Reset state (for hierchical convergence) *) let reset_store (s : store) : unit = - let is_eternal key _state = - key.ration_stamp <> None - in + let is_eternal key _state = not (Key.exceed_rationing key) in s.store_partition <- Partition.filter is_eternal s.store_partition let reset_flow (f : flow) : unit = @@ -351,7 +349,7 @@ struct with Not_found -> (* The key is not in the widening state; add the state if slevel is exceeded *) - if key.ration_stamp = None then + if Key.exceed_rationing key then update key { widened_state = None; previous_state = curr; -- GitLab From 0850d5349ba30e255220b15525434727a70eead2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 5 Apr 2019 22:42:33 +0200 Subject: [PATCH 244/376] [Eva] Partition: do not export split_monitor, simplifies the split/merge actions. split_monitors are created and internally used by partition. New type split_kind to distinguish between static and dynamic splits, instead of using different constructors in the action type. --- src/plugins/value/engine/partition.ml | 39 +++++++++---------- src/plugins/value/engine/partition.mli | 18 ++------- .../value/engine/partitioning_parameters.ml | 14 ++++--- .../value/engine/state_partitioning.mli | 1 - 4 files changed, 30 insertions(+), 42 deletions(-) diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index 8c555ff0a8d..83a988cfd11 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -134,6 +134,8 @@ type unroll_limit = | ExpLimit of Cil_types.exp | IntLimit of int +type split_kind = Static | Dynamic + type action = | Enter_loop of unroll_limit | Leave_loop @@ -141,10 +143,8 @@ type action = | Branch of branch * int | Ration of int | Ration_merge of (int*int) option - | Static_split of (Cil_types.exp * split_monitor) - | Dynamic_split of (Cil_types.exp * split_monitor) - | Static_merge of Cil_types.exp - | Dynamic_merge of Cil_types.exp + | Split of Cil_types.exp * split_kind * int + | Merge of Cil_types.exp * split_kind | Update_dynamic_splits exception InvalidAction @@ -295,16 +295,15 @@ struct (* --- Applying partitioning actions onto flows --------------------------- *) - let split_state ~monitor ~(static : bool) (exp : Cil_types.exp) + let split_state ~monitor (kind : split_kind) (exp : Cil_types.exp) (key : key) (state : state) : (key * state) list = try + let add value map = ExpMap.add exp (value, monitor) map in let update_key (v,x) = let k = - let m = monitor in - if static then - { key with static_split = ExpMap.add exp (v,m) key.static_split } - else - { key with dynamic_split = ExpMap.add exp (v,m) key.dynamic_split } + match kind with + | Static -> { key with static_split = add v key.static_split } + | Dynamic -> { key with dynamic_split = add v key.dynamic_split } in (k,x) in @@ -312,9 +311,10 @@ struct with Operation_failed -> [(key,state)] - let split ~monitor ~(static : bool) (p : t) (exp : Cil_types.exp) = + let split ~limit (kind : split_kind) (exp : Cil_types.exp) (p : t) = + let monitor = new_monitor limit in let add_split acc (key,state) = - split_state ~monitor ~static exp key state @ acc + split_state ~monitor kind exp key state @ acc in List.fold_left add_split [] p @@ -324,7 +324,7 @@ struct (* Split the states in the list l for the given exp *) let update_exp exp (_i,monitor) l = let resplit acc (k,x) = - split_state ~monitor ~static:false exp k x @ acc + split_state ~monitor Dynamic exp k x @ acc in List.fold_left resplit [] l in @@ -337,18 +337,15 @@ struct List.map (fun (k,x) -> f k x, x) p let transfer_keys p = function - | Static_split (exp,monitor) -> - split ~monitor ~static:true p exp - - | Dynamic_split (exp,monitor) -> - split ~monitor ~static:false p exp + | Split (expr, kind, limit) -> + split ~limit kind expr p | Update_dynamic_splits -> update_dynamic_splits p | action -> (* Simple map transfer functions *) let transfer = match action with - | Static_split _ | Dynamic_split _ | Update_dynamic_splits -> + | Split _ | Update_dynamic_splits -> assert false (* Handled above *) | Enter_loop limit_kind -> fun k x -> @@ -402,10 +399,10 @@ struct | Ration_merge ration_stamp -> fun k _x -> { k with ration_stamp } - | Static_merge exp -> fun k _x -> + | Merge (exp, Static) -> fun k _x -> { k with static_split = ExpMap.remove exp k.static_split } - | Dynamic_merge exp -> fun k _x -> + | Merge (exp, Dynamic) -> fun k _x -> { k with dynamic_split = ExpMap.remove exp k.dynamic_split } in map_keys transfer p diff --git a/src/plugins/value/engine/partition.mli b/src/plugins/value/engine/partition.mli index f5e03e8642f..27f287d438d 100644 --- a/src/plugins/value/engine/partition.mli +++ b/src/plugins/value/engine/partition.mli @@ -20,16 +20,6 @@ (* *) (**************************************************************************) -(* Split monitor : prevents splits from generating too many states *) - -type split_monitor = { - split_limit : int; - mutable split_values : Datatype.Integer.Set.t; -} - -val new_monitor : split_limit:int -> split_monitor - - (* A state partition is a collection of states, each of which is identified by a unique key. The key identifies the reason for which we want to keep the state separate from the others. The partitioning method will involve @@ -101,6 +91,8 @@ type unroll_limit = | ExpLimit of Cil_types.exp | IntLimit of int +type split_kind = Static | Dynamic + type action = | Enter_loop of unroll_limit | Leave_loop @@ -108,10 +100,8 @@ type action = | Branch of branch * int (* branch taken, max branches in history *) | Ration of int (* starting ration stamp *) | Ration_merge of (int * int) option (* new ration stamp for the merge state *) - | Static_split of (Cil_types.exp * split_monitor) - | Dynamic_split of (Cil_types.exp * split_monitor) - | Static_merge of Cil_types.exp - | Dynamic_merge of Cil_types.exp + | Split of Cil_types.exp * split_kind * int + | Merge of Cil_types.exp * split_kind | Update_dynamic_splits exception InvalidAction diff --git a/src/plugins/value/engine/partitioning_parameters.ml b/src/plugins/value/engine/partitioning_parameters.ml index 60ed14ebdc6..3cd62544005 100644 --- a/src/plugins/value/engine/partitioning_parameters.ml +++ b/src/plugins/value/engine/partitioning_parameters.ml @@ -110,8 +110,7 @@ struct let add name l = try let vi = Globals.Vars.find_from_astinfo name VGlobal in - let m = Partition.new_monitor split_limit in - Partition.Dynamic_split (Cil.evar vi, m) :: l + Partition.Split (Cil.evar vi, Partition.Dynamic, split_limit) :: l with Not_found -> warn ~current:false "cannot find the global variable %s for value \ partitioning" name; @@ -120,12 +119,15 @@ struct ValuePartitioning.fold add [] let flow_actions stmt = + let kind = Partition.Static in let map_annot acc t = try - let m = Partition.new_monitor split_limit in - match t with - | FlowSplit t -> Partition.Static_split (term_to_exp t,m) :: acc - | FlowMerge t -> Partition.Static_merge (term_to_exp t) :: acc + let action = + match t with + | FlowSplit t -> Partition.Split (term_to_exp t, kind, split_limit) + | FlowMerge t -> Partition.Merge (term_to_exp t, kind) + in + action :: acc with Db.Properties.Interp.No_conversion -> warn "split/merge expressions must be valid expressions"; diff --git a/src/plugins/value/engine/state_partitioning.mli b/src/plugins/value/engine/state_partitioning.mli index fdaaec4ff31..d5b8df9227e 100644 --- a/src/plugins/value/engine/state_partitioning.mli +++ b/src/plugins/value/engine/state_partitioning.mli @@ -38,7 +38,6 @@ sig val merge : Cil_types.stmt -> bool val unroll : loop -> Partition.unroll_limit val history_size : int - val split_limit : int val universal_splits : Partition.action list val flow_actions : Cil_types.stmt -> Partition.action list end -- GitLab From ac77925fb1fb562fda40534370d371e145c50f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 5 Apr 2019 23:35:05 +0200 Subject: [PATCH 245/376] [Eva] New rationing implementation embedded in partition.ml. --- src/plugins/value/engine/partition.ml | 46 ++++++++++++++----- src/plugins/value/engine/partition.mli | 6 ++- .../value/engine/trace_partitioning.ml | 22 ++------- 3 files changed, 43 insertions(+), 31 deletions(-) diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index 83a988cfd11..ad833cba6dd 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -34,6 +34,22 @@ let new_monitor ~split_limit = { split_values = Datatype.Integer.Set.empty; } +(* --- Stamp rationing --- *) + +(* Stamps used to label states according to slevel. + The second integer is used to keep separate the different states resulting + from a transfer function producing a state list before a new stamping. *) +type stamp = (int * int) option (* store stamp / transfer stamp *) + +(* Stamp rationing according to the slevel. *) +type rationing = + { current: int ref; (* last used stamp. *) + limit: int; (* limit of available stamps; after, stamps are [None]. *) + merge: bool (* on merge slevel annotations or -eva-merge-after-loop, + merge the incoming states with one unique stamp. *) + } + +let new_rationing ~limit ~merge = { current = ref 0; limit; merge } (* --- Keys --- *) @@ -45,7 +61,7 @@ module BranchList = Datatype.List (Datatype.Int) type branch = int type key = { - ration_stamp : (int * int) option; (* store stamp / transfer stamp *) + ration_stamp : stamp; branches : branch list; loops : (int * int) list; (* current iteration / max unrolling *) static_split : (Integer.t*split_monitor) ExpMap.t; (* exp->value*monitor *) @@ -141,8 +157,7 @@ type action = | Leave_loop | Incr_loop | Branch of branch * int - | Ration of int - | Ration_merge of (int*int) option + | Ration of rationing | Split of Cil_types.exp * split_kind * int | Merge of Cil_types.exp * split_kind | Update_dynamic_splits @@ -389,15 +404,22 @@ struct else k - | Ration (min) -> - let r = ref min in - fun k _x -> - let ration_stamp = Some (!r, 0) in - incr r; - { k with ration_stamp } - - | Ration_merge ration_stamp -> fun k _x -> - { k with ration_stamp } + | Ration { current; limit; merge } -> + let length = List.length p in + (* The incoming states exceed the rationing limit: no more stamps. *) + if !current + length > limit then begin + current := limit; + fun k _ -> { k with ration_stamp = None } + end + (* If merge, a unique ration stamp for all incoming states. *) + else if merge then begin + current := !current + length; + fun k _ -> { k with ration_stamp = Some (!current, 0) } + end + (* Default case: a different stamp for each incoming state. *) + else + let stamp () = incr current; Some (!current, 0) in + fun k _ -> { k with ration_stamp = stamp () } | Merge (exp, Static) -> fun k _x -> { k with static_split = ExpMap.remove exp k.static_split } diff --git a/src/plugins/value/engine/partition.mli b/src/plugins/value/engine/partition.mli index 27f287d438d..10155a3d869 100644 --- a/src/plugins/value/engine/partition.mli +++ b/src/plugins/value/engine/partition.mli @@ -87,6 +87,9 @@ val map_filter : (key -> 'a -> 'b option) -> 'a partition -> 'b partition (* Partitioning actions *) +type rationing +val new_rationing: limit:int -> merge:bool -> rationing + type unroll_limit = | ExpLimit of Cil_types.exp | IntLimit of int @@ -98,8 +101,7 @@ type action = | Leave_loop | Incr_loop | Branch of branch * int (* branch taken, max branches in history *) - | Ration of int (* starting ration stamp *) - | Ration_merge of (int * int) option (* new ration stamp for the merge state *) + | Ration of rationing | Split of Cil_types.exp * split_kind * int | Merge of Cil_types.exp * split_kind | Update_dynamic_splits diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index e3908276dd7..701487999a2 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -48,8 +48,7 @@ struct type state = Domain.t type store = { - size_limit : int; - merge : bool; + rationing: Partition.rationing; flow_actions : action list; store_stmt : stmt option; store_index : Index.t; @@ -79,12 +78,13 @@ struct (* Constructors *) let empty_store ~(stmt : stmt option) : store = - let size_limit, merge, flow_actions = match stmt with + let limit, merge, flow_actions = match stmt with | None -> max_int, false, [] | Some stmt -> slevel stmt, merge stmt, flow_actions stmt in + let rationing = Partition.new_rationing ~limit ~merge in { - size_limit; merge; flow_actions; + rationing; flow_actions; store_stmt = stmt; store_index = Index.empty (); store_partition = Partition.empty; @@ -247,20 +247,8 @@ struct List.fold_left Flow.union Flow.empty sources_states in (* Handle ration stamps *) - let previous_store_size = dest.store_size in dest.store_size <- dest.store_size + Flow.size flow_states; - let slevel_exceeded = dest.store_size > dest.size_limit in - let rationing_action = - if slevel_exceeded then - (* No more slevel, no more ration tickets *) - Ration_merge None - else if dest.merge then - (* Merge / Merge after loop : a unique ration stamp for all *) - Ration_merge (Some (previous_store_size, 0)) - else - (* Attribute a ration stamp to each individual state *) - Ration previous_store_size - in + let rationing_action = Ration dest.rationing in (* Handle Split / Merge operations *) let flow_actions = Update_dynamic_splits :: dest.flow_actions in (* Execute actions *) -- GitLab From 9fb45638d91ad2d7d1c8fae47d892ff723c98ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 9 Apr 2019 11:01:16 +0200 Subject: [PATCH 246/376] [Eva] Embeds split_return in partition as a new partitioning action. Moves function split_by_evaluation from evaluation to partition. Moves function split_final_state from transfer_stmt to partition. New partitioning action Restrict, that restricts the rationing according to the evaluation of an expression into some expected values. --- src/plugins/value/engine/evaluation.ml | 39 ------ src/plugins/value/engine/evaluation.mli | 15 --- src/plugins/value/engine/partition.ml | 127 ++++++++++++++---- src/plugins/value/engine/partition.mli | 2 +- .../value/engine/trace_partitioning.ml | 41 +++--- src/plugins/value/engine/transfer_stmt.ml | 27 ---- src/plugins/value/engine/transfer_stmt.mli | 3 - tests/value/oracle/split_return.0.res.oracle | 2 +- tests/value/oracle/split_return.1.res.oracle | 2 +- tests/value/oracle/split_return.3.res.oracle | 28 ++-- tests/value/oracle/split_return.4.res.oracle | 50 +++---- 11 files changed, 164 insertions(+), 172 deletions(-) diff --git a/src/plugins/value/engine/evaluation.ml b/src/plugins/value/engine/evaluation.ml index bf0c38fa2cc..cc4018b105a 100644 --- a/src/plugins/value/engine/evaluation.ml +++ b/src/plugins/value/engine/evaluation.ml @@ -208,9 +208,6 @@ module type S = sig ?valuation:Valuation.t -> state -> exp -> bool -> Valuation.t evaluated val assume: ?valuation:Valuation.t -> state -> exp -> value -> Valuation.t or_bottom - val split_by_evaluation: - exp -> Integer.t list -> state list -> - (Integer.t * state list * bool) list * state list val eval_function_exp: exp -> ?args:exp list -> state -> (Kernel_function.t * Valuation.t) list evaluated val interpret_truth: @@ -1587,42 +1584,6 @@ module Make Bottom.bot_of_list list, alarms end | _ -> assert false - - let split_by_evaluation = match Value.get Main_values.cvalue_key with - | None -> fun _ _ states -> [], states - | Some get -> fun expr expected_values states -> - let typ = Cil.typeOf expr in - let eval acc state = - match fst (evaluate state expr) with - | `Bottom -> (state, `Bottom, false) :: acc - | `Value (_cache, value) -> - let zero_or_one = Cvalue.V.cardinal_zero_or_one (get value) in - (state, `Value value, zero_or_one) :: acc - in - let eval_states = List.fold_left eval [] states in - let match_expected_value expected_value states = - let process_one_state (eq, mess, neq) (s, v, zero_or_one as current) = - if Bottom.is_included Value.is_included expected_value v then - (* The integer on which we split is part of the result *) - if zero_or_one then - (s :: eq, mess, neq) (* Clean split *) - else - (eq, true, current :: neq) (* v is not exact: mess, i.e. no split *) - else - (eq, mess, current :: neq) (* Integer not in the result at all *) - in - List.fold_left process_one_state ([], false, []) states - in - let process_one_value (acc, states) i = - let value = `Value (Value.reduce (Value.inject_int typ i)) in - let eq, mess, neq = match_expected_value value states in - (i, eq, mess) :: acc, neq - in - let matched, tail = - List.fold_left process_one_value ([], eval_states) expected_values - in - matched, List.map (fun (s, _, _) -> s) tail - end diff --git a/src/plugins/value/engine/evaluation.mli b/src/plugins/value/engine/evaluation.mli index 9f263d86b36..ad8886669f2 100644 --- a/src/plugins/value/engine/evaluation.mli +++ b/src/plugins/value/engine/evaluation.mli @@ -94,21 +94,6 @@ module type S = sig ?valuation:Valuation.t -> state -> exp -> value -> Valuation.t or_bottom - (* Sorts a list of states by the evaluation of an expression, according to - a list of expected integer values. - [split_by_evaluation expr expected_values states] returns two list - (matched, tail) such as: - - for each element (i, states, mess) of the first list [matched], - i was in the list of integer [expected_values], [states] is the list of - input states where [expr] evaluates to exactly [i], and [mess] is true - if there was some other input state on which [expr] evaluates to a value - including [i] (but not equal to [i]). - - tail are the states on which [expr] does not evaluate to none of the - [expected_values]. *) - val split_by_evaluation: - exp -> Integer.t list -> state list -> - (Integer.t * state list * bool) list * state list - val eval_function_exp: exp -> ?args:exp list -> state -> (Kernel_function.t * Valuation.t) list evaluated diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index ad833cba6dd..8b7c530a1aa 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -158,6 +158,7 @@ type action = | Incr_loop | Branch of branch * int | Ration of rationing + | Restrict of Cil_types.exp * Integer.t list | Split of Cil_types.exp * split_kind * int | Merge of Cil_types.exp * split_kind | Update_dynamic_splits @@ -297,7 +298,6 @@ struct to increase this limit." monitor.split_limit pp_count - let eval_exp_to_int state exp = let _valuation, ival = evaluate_exp_to_ival state exp in try @@ -308,8 +308,105 @@ struct | Failure _ -> fail ~exp "this partitioning parameter is too big" + (* Sorts a list of states by the evaluation of an expression, according to + a list of expected integer values. + [split_by_evaluation expr expected_values states] returns two list + (matched, tail) such as: + - for each element (i, states, mess) of the first list [matched], + i was in the list of integer [expected_values], [states] is the list of + input states where [expr] evaluates to exactly [i], and [mess] is true + if there was some other input state on which [expr] evaluates to a value + including [i] (but not equal to [i]). + - tail are the states on which [expr] does not evaluate to none of the + [expected_values]. *) + let split_by_evaluation = match Abstract.Val.get Main_values.cvalue_key with + | None -> fun _ _ states -> [], states + | Some get -> fun expr expected_values states -> + let typ = Cil.typeOf expr in + let eval acc state = + match fst (Abstract.Eval.evaluate state expr) with + | `Bottom -> (state, `Bottom, false) :: acc + | `Value (_cache, value) -> + let zero_or_one = Cvalue.V.cardinal_zero_or_one (get value) in + (state, `Value value, zero_or_one) :: acc + in + let eval_states = List.fold_left eval [] states in + let match_expected_value expected_value states = + let process_one_state (eq, mess, neq) (s, v, zero_or_one as current) = + if Bottom.is_included Abstract.Val.is_included expected_value v then + (* The integer on which we split is part of the result *) + if zero_or_one then + (s :: eq, mess, neq) (* Clean split *) + else + (eq, true, current :: neq) (* v is not exact: mess, i.e. no split *) + else + (eq, mess, current :: neq) (* Integer not in the result at all *) + in + List.fold_left process_one_state ([], false, []) states + in + let process_one_value (acc, states) i = + let value = `Value Abstract.Val.(reduce (inject_int typ i)) in + let eq, mess, neq = match_expected_value value states in + (i, eq, mess) :: acc, neq + in + let matched, tail = + List.fold_left process_one_value ([], eval_states) expected_values + in + matched, List.map (fun (s, _, _) -> s) tail + + let smash_states = function + | [] -> [] + | v1 :: l -> [ List.fold_left Abstract.Dom.join v1 l ] + + (* In the list of [states], join states in which [expr] evaluates to the + same exact value in [expected_values] or to any other value. *) + let merge_by_value expr expected_values states = + let states = + if Cil.isIntegralOrPointerType (Cil.typeOf expr) + then + let matched, tail = + split_by_evaluation expr expected_values states + in + let process (i, states, mess) = + if mess then + Value_parameters.result ~once:true ~current:true + "cannot properly split on \\result == %a" + Abstract_interp.Int.pretty i; + states + in + tail :: List.map process matched + else [states] + in + List.flatten (List.map smash_states states) + (* --- Applying partitioning actions onto flows --------------------------- *) + (* Applies the transfer function [f] to the states whose partitioning keys + only differ by the ration stamp. [f] may smash those states, thus + restricting the rationing without affecting the other partitioning. *) + let restrict_rationing (f : state list -> state list) (p : t) : t = + (* Group the states in buckets, where each bucket is a list of states + with the same key except for the ration stamp *) + let fill_buckets buckets (k,x) = + (* Ignore the ration stamp *) + let k = { k with ration_stamp = None } in + (* Find the bucket *) + let contents = + try KMap.find k buckets + with Not_found -> [] + in + (* Add the state to the bucket *) + KMap.add k (x :: contents) buckets + in + let buckets = List.fold_left fill_buckets KMap.empty p in + (* Apply the transfer function to each bucket *) + let result = KMap.map f buckets in + (* Rebuild the flow *) + let add_bucket k bucket acc = + List.map (fun x -> k,x) bucket @ acc + in + KMap.fold add_bucket result [] + let split_state ~monitor (kind : split_kind) (exp : Cil_types.exp) (key : key) (state : state) : (key * state) list = try @@ -358,9 +455,12 @@ struct | Update_dynamic_splits -> update_dynamic_splits p + | Restrict (expr, expected_values) -> + restrict_rationing (merge_by_value expr expected_values) p + | action -> (* Simple map transfer functions *) let transfer = match action with - | Split _ | Update_dynamic_splits -> + | Restrict _ | Split _ | Update_dynamic_splits -> assert false (* Handled above *) | Enter_loop limit_kind -> fun k x -> @@ -446,29 +546,6 @@ struct in List.fold_left transfer [] p - let legacy_transfer_states (f : state list -> state list) (p : t) : t = - (* Group the states in buckets, where each bucket is a list of states - with the same key except for the ration stamp *) - let fill_buckets buckets (k,x) = - (* Ignore the ration stamp *) - let k = { k with ration_stamp = None } in - (* Find the bucket *) - let contents = - try KMap.find k buckets - with Not_found -> [] - in - (* Add the state to the bucket *) - KMap.add k (x :: contents) buckets - in - let buckets = List.fold_left fill_buckets KMap.empty p in - (* Apply the transfer function to each bucket *) - let result = KMap.map f buckets in - (* Rebuild the flow *) - let add_bucket k bucket acc = - List.map (fun x -> k,x) bucket @ acc - in - KMap.fold add_bucket result [] - let iter (f : state -> unit) (p : t) : unit = List.iter (fun (_k,x) -> f x) p end diff --git a/src/plugins/value/engine/partition.mli b/src/plugins/value/engine/partition.mli index 10155a3d869..ed7a1211289 100644 --- a/src/plugins/value/engine/partition.mli +++ b/src/plugins/value/engine/partition.mli @@ -102,6 +102,7 @@ type action = | Incr_loop | Branch of branch * int (* branch taken, max branches in history *) | Ration of rationing + | Restrict of Cil_types.exp * Integer.t list | Split of Cil_types.exp * split_kind * int | Merge of Cil_types.exp * split_kind | Update_dynamic_splits @@ -130,7 +131,6 @@ sig val transfer_keys : t -> action -> t val transfer_states : (state -> state list) -> t -> t - val legacy_transfer_states : (state list -> state list) -> t -> t val iter : (state -> unit) -> t -> unit end diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index 701487999a2..c4bb0eb2bb2 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -151,38 +151,37 @@ struct (* Partition transfer functions *) - let loop_transfer p action = + let transfer_action p action = p.flow_states <- Flow.transfer_keys p.flow_states action let enter_loop (p : flow) (i : loop) : unit = - loop_transfer p (Enter_loop (unroll i)) + transfer_action p (Enter_loop (unroll i)) let leave_loop (p : flow) (_i : loop) : unit = - loop_transfer p Leave_loop + transfer_action p Leave_loop let next_loop_iteration (p : flow) (_i : loop) : unit = - loop_transfer p Incr_loop + transfer_action p Incr_loop + + let empty_rationing = new_rationing ~limit:0 ~merge:false let split_return (flow : flow) (return_exp : exp option) : unit = - (** Join every state in the list *) - let transfer_split states = + let strategy = Split_return.kf_strategy kf in + if strategy <> Split_strategy.FullSplit + then + let smash () = + transfer_action flow (Ration empty_rationing); + let p = Flow.to_partition flow.flow_states in + flow.flow_states <- Flow.of_partition p + in match Split_return.kf_strategy kf with + (* SplitAuto already transformed into SplitEqList. *) + | Split_strategy.FullSplit | Split_strategy.SplitAuto -> assert false + | Split_strategy.NoSplit -> smash () | Split_strategy.SplitEqList i -> - begin match return_exp with - | Some return_exp -> - let states = Transfer.split_final_states kf return_exp i states in - List.flatten (List.map smash_states states) - | None -> - smash_states states - end - | Split_strategy.NoSplit -> smash_states states - | Split_strategy.FullSplit -> states - (* Last case not possible : already transformed into SplitEqList *) - | Split_strategy.SplitAuto -> assert false - in - flow.flow_states <- - Flow.legacy_transfer_states transfer_split flow.flow_states - + match return_exp with + | None -> smash () + | Some return_exp -> transfer_action flow (Restrict (return_exp, i)) (* Reset state (for hierchical convergence) *) diff --git a/src/plugins/value/engine/transfer_stmt.ml b/src/plugins/value/engine/transfer_stmt.ml index c81a78f0133..e7be6f8f582 100644 --- a/src/plugins/value/engine/transfer_stmt.ml +++ b/src/plugins/value/engine/transfer_stmt.ml @@ -33,8 +33,6 @@ module type S = sig val call: stmt -> lval option -> exp -> exp list -> state -> state list or_bottom * Value_types.cacheable - val split_final_states: - kernel_function -> exp -> Integer.t list -> state list -> state list list val check_unspecified_sequence: stmt -> state -> (stmt * lval list * lval list * lval list * stmt ref list) list -> @@ -764,31 +762,6 @@ module Make (Abstract: Abstractions.Eva) = struct in eval, !cacheable - - (* ------------------------------------------------------------------------ *) - (* Function Return *) - (* ------------------------------------------------------------------------ *) - - let split_final_states kf return_expr expected_values states = - let varinfo = match return_expr.enode with - | Lval (Var varinfo, NoOffset) -> varinfo - | _ -> assert false (* Cil invariant *) - in - if Cil.isIntegralOrPointerType varinfo.vtype - then - let matched, tail = - Eval.split_by_evaluation return_expr expected_values states - in - let process (i, states, mess) = - if mess then - Value_parameters.result ~once:true ~current:true - "%a: cannot properly split on \\result == %a" - Kernel_function.pretty kf Abstract_interp.Int.pretty i; - states - in - tail :: List.map process matched - else [states] - (* ------------------------------------------------------------------------ *) (* Unspecified Sequence *) (* ------------------------------------------------------------------------ *) diff --git a/src/plugins/value/engine/transfer_stmt.mli b/src/plugins/value/engine/transfer_stmt.mli index a2e64699a2e..567674a5f34 100644 --- a/src/plugins/value/engine/transfer_stmt.mli +++ b/src/plugins/value/engine/transfer_stmt.mli @@ -39,9 +39,6 @@ module type S = sig stmt -> lval option -> exp -> exp list -> state -> state list or_bottom * Value_types.cacheable - val split_final_states: - kernel_function -> exp -> Integer.t list -> state list -> state list list - val check_unspecified_sequence: Cil_types.stmt -> state -> diff --git a/tests/value/oracle/split_return.0.res.oracle b/tests/value/oracle/split_return.0.res.oracle index 342033647fd..073552cab4f 100644 --- a/tests/value/oracle/split_return.0.res.oracle +++ b/tests/value/oracle/split_return.0.res.oracle @@ -43,7 +43,7 @@ Called from tests/value/split_return.i:206. [eva] computing for function f3 <- main3 <- main. Called from tests/value/split_return.i:73. -[eva] tests/value/split_return.i:69: f3: cannot properly split on \result == -2 +[eva] tests/value/split_return.i:69: cannot properly split on \result == -2 [eva] Recording results for f3 [eva] Done for function f3 [eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2; 7}, {0; 5} diff --git a/tests/value/oracle/split_return.1.res.oracle b/tests/value/oracle/split_return.1.res.oracle index ff8657d99c4..27d86c75523 100644 --- a/tests/value/oracle/split_return.1.res.oracle +++ b/tests/value/oracle/split_return.1.res.oracle @@ -83,7 +83,7 @@ Called from tests/value/split_return.i:135. [eva:alarm] tests/value/split_return.i:130: Warning: assertion got status unknown. -[eva] tests/value/split_return.i:131: f6: cannot properly split on \result == 0 +[eva] tests/value/split_return.i:131: cannot properly split on \result == 0 [eva] Recording results for f6 [eva] Done for function f6 [eva] Recording results for main6 diff --git a/tests/value/oracle/split_return.3.res.oracle b/tests/value/oracle/split_return.3.res.oracle index bfdd36469af..1ad5a6b9498 100644 --- a/tests/value/oracle/split_return.3.res.oracle +++ b/tests/value/oracle/split_return.3.res.oracle @@ -26,12 +26,12 @@ Called from tests/value/split_return.i:48. [eva] Recording results for f2 [eva] Done for function f2 -[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {7}, {5} -[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {5}, {5} [eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {0}, {0} +[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {5}, {5} +[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {7}, {5} [eva] tests/value/split_return.i:51: assertion got status valid. -[eva] tests/value/split_return.i:53: Frama_C_show_each_f2_2: {7}, {5} [eva] tests/value/split_return.i:53: Frama_C_show_each_f2_2: {5}, {5} +[eva] tests/value/split_return.i:53: Frama_C_show_each_f2_2: {7}, {5} [eva] tests/value/split_return.i:54: assertion got status valid. [eva] Recording results for main2 [eva] Done for function main2 @@ -41,8 +41,8 @@ Called from tests/value/split_return.i:73. [eva] Recording results for f3 [eva] Done for function f3 -[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} [eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} +[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} [eva] tests/value/split_return.i:76: assertion got status valid. [eva] tests/value/split_return.i:78: assertion got status valid. [eva] Recording results for main3 @@ -53,8 +53,8 @@ Called from tests/value/split_return.i:73. [eva] Recording results for f3 [eva] Done for function f3 -[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} [eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} +[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} [eva] Recording results for main3 [eva] Done for function main3 [eva] computing for function main4 <- main. @@ -63,8 +63,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] tests/value/split_return.i:97: assertion got status valid. [eva] tests/value/split_return.i:99: assertion got status valid. [eva] Recording results for main4 @@ -75,8 +75,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main4 <- main. @@ -85,8 +85,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main4 <- main. @@ -95,8 +95,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main5 <- main. @@ -105,8 +105,8 @@ Called from tests/value/split_return.i:117. [eva] Recording results for f5 [eva] Done for function f5 -[eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {-2}, {0} [eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {7}, {5} +[eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {-2}, {0} [eva] tests/value/split_return.i:120: assertion got status valid. [eva] tests/value/split_return.i:122: assertion got status valid. [eva] Recording results for main5 @@ -155,8 +155,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -165,8 +165,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -175,8 +175,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -185,8 +185,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main9 <- main. diff --git a/tests/value/oracle/split_return.4.res.oracle b/tests/value/oracle/split_return.4.res.oracle index 060b00fe35e..46c3281323e 100644 --- a/tests/value/oracle/split_return.4.res.oracle +++ b/tests/value/oracle/split_return.4.res.oracle @@ -29,12 +29,12 @@ Called from tests/value/split_return.i:48. [eva] Recording results for f2 [eva] Done for function f2 -[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {7}, {5} -[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {5}, {5} [eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {0}, {0} +[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {5}, {5} +[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {7}, {5} [eva] tests/value/split_return.i:51: assertion got status valid. -[eva] tests/value/split_return.i:53: Frama_C_show_each_f2_2: {7}, {5} [eva] tests/value/split_return.i:53: Frama_C_show_each_f2_2: {5}, {5} +[eva] tests/value/split_return.i:53: Frama_C_show_each_f2_2: {7}, {5} [eva] tests/value/split_return.i:54: assertion got status valid. [eva] Recording results for main2 [eva] Done for function main2 @@ -44,8 +44,8 @@ Called from tests/value/split_return.i:73. [eva] Recording results for f3 [eva] Done for function f3 -[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} [eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} +[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} [eva] tests/value/split_return.i:76: assertion got status valid. [eva] tests/value/split_return.i:78: assertion got status valid. [eva] Recording results for main3 @@ -56,8 +56,8 @@ Called from tests/value/split_return.i:73. [eva] Recording results for f3 [eva] Done for function f3 -[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} [eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} +[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} [eva] Recording results for main3 [eva] Done for function main3 [eva] computing for function main4 <- main. @@ -66,8 +66,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] tests/value/split_return.i:97: assertion got status valid. [eva] tests/value/split_return.i:99: assertion got status valid. [eva] Recording results for main4 @@ -78,8 +78,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main4 <- main. @@ -88,8 +88,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main4 <- main. @@ -98,8 +98,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main5 <- main. @@ -108,8 +108,8 @@ Called from tests/value/split_return.i:117. [eva] Recording results for f5 [eva] Done for function f5 -[eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {-2}, {0} [eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {7}, {5} +[eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {-2}, {0} [eva] tests/value/split_return.i:120: assertion got status valid. [eva] tests/value/split_return.i:122: assertion got status valid. [eva] Recording results for main5 @@ -158,8 +158,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -168,8 +168,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -178,8 +178,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -188,8 +188,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main9 <- main. @@ -483,8 +483,8 @@ Called from tests/value/split_return.i:73. [eva] Recording results for f3 [eva] Done for function f3 -[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} [eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} +[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} [eva] Recording results for main3 [eva] Done for function main3 [eva] computing for function main3 <- main. @@ -493,8 +493,8 @@ Called from tests/value/split_return.i:73. [eva] Recording results for f3 [eva] Done for function f3 -[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} [eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} +[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} [eva] Recording results for main3 [eva] Done for function main3 [eva] computing for function main4 <- main. @@ -503,8 +503,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main4 <- main. @@ -513,8 +513,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main4 <- main. @@ -523,8 +523,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main4 <- main. @@ -533,8 +533,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] Recording results for main4 [eva] Done for function main4 [eva] computing for function main5 <- main. @@ -543,8 +543,8 @@ Called from tests/value/split_return.i:117. [eva] Recording results for f5 [eva] Done for function f5 -[eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {-2}, {0} [eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {7}, {5} +[eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {-2}, {0} [eva] Recording results for main5 [eva] Done for function main5 [eva] computing for function main6 <- main. @@ -589,8 +589,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -599,8 +599,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -609,8 +609,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main8 <- main. @@ -619,8 +619,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main9 <- main. -- GitLab From b1558368bee2236c098f53e03e94e3845af3ca5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 9 Apr 2019 15:40:27 +0200 Subject: [PATCH 247/376] [Eva] Simplifies split_return in partition. --- src/plugins/value/engine/partition.ml | 80 +++++++------------ .../value/engine/trace_partitioning.ml | 5 +- 2 files changed, 31 insertions(+), 54 deletions(-) diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index 8b7c530a1aa..83d8771f275 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -308,19 +308,16 @@ struct | Failure _ -> fail ~exp "this partitioning parameter is too big" - (* Sorts a list of states by the evaluation of an expression, according to - a list of expected integer values. - [split_by_evaluation expr expected_values states] returns two list - (matched, tail) such as: - - for each element (i, states, mess) of the first list [matched], - i was in the list of integer [expected_values], [states] is the list of - input states where [expr] evaluates to exactly [i], and [mess] is true - if there was some other input state on which [expr] evaluates to a value - including [i] (but not equal to [i]). - - tail are the states on which [expr] does not evaluate to none of the - [expected_values]. *) - let split_by_evaluation = match Abstract.Val.get Main_values.cvalue_key with - | None -> fun _ _ states -> [], states + let smash_states acc = function + | [] -> acc + | v1 :: l -> List.fold_left Abstract.Dom.join v1 l :: acc + + (* In a list of states, join the states in which the given expression + evaluates to: + - exactly the integer i from the list expected_values; + - anything else. *) + let merge_by_value = match Abstract.Val.get Main_values.cvalue_key with + | None -> fun _ _ states -> states | Some get -> fun expr expected_values states -> let typ = Cil.typeOf expr in let eval acc state = @@ -331,53 +328,30 @@ struct (state, `Value value, zero_or_one) :: acc in let eval_states = List.fold_left eval [] states in - let match_expected_value expected_value states = - let process_one_state (eq, mess, neq) (s, v, zero_or_one as current) = - if Bottom.is_included Abstract.Val.is_included expected_value v then - (* The integer on which we split is part of the result *) - if zero_or_one then - (s :: eq, mess, neq) (* Clean split *) - else - (eq, true, current :: neq) (* v is not exact: mess, i.e. no split *) - else - (eq, mess, current :: neq) (* Integer not in the result at all *) + let is_included = Bottom.is_included Abstract.Val.is_included in + let match_expected_value i states = + let expected_value = `Value Abstract.Val.(reduce (inject_int typ i)) in + let process_one_state (eq, neq) (s, v, zero_or_one as current) = + let included = is_included expected_value v in + if included && not zero_or_one + then + Value_parameters.result ~once:true ~current:true + "cannot properly split on \\result == %a" + Abstract_interp.Int.pretty i; + if included && zero_or_one + then s :: eq, neq + else eq, current :: neq in - List.fold_left process_one_state ([], false, []) states + List.fold_left process_one_state ([], []) states in let process_one_value (acc, states) i = - let value = `Value Abstract.Val.(reduce (inject_int typ i)) in - let eq, mess, neq = match_expected_value value states in - (i, eq, mess) :: acc, neq + let eq, neq = match_expected_value i states in + smash_states acc eq, neq in let matched, tail = List.fold_left process_one_value ([], eval_states) expected_values in - matched, List.map (fun (s, _, _) -> s) tail - - let smash_states = function - | [] -> [] - | v1 :: l -> [ List.fold_left Abstract.Dom.join v1 l ] - - (* In the list of [states], join states in which [expr] evaluates to the - same exact value in [expected_values] or to any other value. *) - let merge_by_value expr expected_values states = - let states = - if Cil.isIntegralOrPointerType (Cil.typeOf expr) - then - let matched, tail = - split_by_evaluation expr expected_values states - in - let process (i, states, mess) = - if mess then - Value_parameters.result ~once:true ~current:true - "cannot properly split on \\result == %a" - Abstract_interp.Int.pretty i; - states - in - tail :: List.map process matched - else [states] - in - List.flatten (List.map smash_states states) + smash_states matched (List.map (fun (s, _, _) -> s) tail) (* --- Applying partitioning actions onto flows --------------------------- *) diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index c4bb0eb2bb2..48379890f7f 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -181,7 +181,10 @@ struct | Split_strategy.SplitEqList i -> match return_exp with | None -> smash () - | Some return_exp -> transfer_action flow (Restrict (return_exp, i)) + | Some return_exp -> + if Cil.isIntegralOrPointerType (Cil.typeOf return_exp) + then transfer_action flow (Restrict (return_exp, i)) + else smash () (* Reset state (for hierchical convergence) *) -- GitLab From 709c3a629122781cc2c3e50321fd91b934d377db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 9 Apr 2019 16:21:38 +0200 Subject: [PATCH 248/376] [Eva] Rewrites split_return in partition. Creates stamps according to the evaluation of the returned expression in states. --- src/plugins/value/engine/partition.ml | 95 +++++-------------- .../value/engine/trace_partitioning.ml | 12 +-- tests/value/oracle/split_return.0.res.oracle | 4 +- tests/value/oracle/split_return.1.res.oracle | 10 +- tests/value/oracle/split_return.4.res.oracle | 2 +- 5 files changed, 37 insertions(+), 86 deletions(-) diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index 83d8771f275..89545afeba4 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -308,78 +308,29 @@ struct | Failure _ -> fail ~exp "this partitioning parameter is too big" - let smash_states acc = function - | [] -> acc - | v1 :: l -> List.fold_left Abstract.Dom.join v1 l :: acc - - (* In a list of states, join the states in which the given expression - evaluates to: - - exactly the integer i from the list expected_values; - - anything else. *) - let merge_by_value = match Abstract.Val.get Main_values.cvalue_key with - | None -> fun _ _ states -> states - | Some get -> fun expr expected_values states -> + (* --- Applying partitioning actions onto flows --------------------------- *) + + let stamp_by_value = match Abstract.Val.get Main_values.cvalue_key with + | None -> fun _ _ _ -> None + | Some get -> fun expr expected_values state -> let typ = Cil.typeOf expr in - let eval acc state = - match fst (Abstract.Eval.evaluate state expr) with - | `Bottom -> (state, `Bottom, false) :: acc - | `Value (_cache, value) -> - let zero_or_one = Cvalue.V.cardinal_zero_or_one (get value) in - (state, `Value value, zero_or_one) :: acc - in - let eval_states = List.fold_left eval [] states in - let is_included = Bottom.is_included Abstract.Val.is_included in - let match_expected_value i states = - let expected_value = `Value Abstract.Val.(reduce (inject_int typ i)) in - let process_one_state (eq, neq) (s, v, zero_or_one as current) = - let included = is_included expected_value v in - if included && not zero_or_one - then + let make stamp i = stamp, i, Abstract.Val.inject_int typ i in + let expected_values = List.mapi make expected_values in + match fst (Abstract.Eval.evaluate state expr) with + | `Bottom -> None + | `Value (_cache, value) -> + let is_included (_, _, v) = Abstract.Val.is_included v value in + match Transitioning.List.find_opt is_included expected_values with + | None -> None + | Some (stamp, i, _) -> + if Cvalue.V.cardinal_zero_or_one (get value) + then Some (stamp, 0) + else begin Value_parameters.result ~once:true ~current:true "cannot properly split on \\result == %a" Abstract_interp.Int.pretty i; - if included && zero_or_one - then s :: eq, neq - else eq, current :: neq - in - List.fold_left process_one_state ([], []) states - in - let process_one_value (acc, states) i = - let eq, neq = match_expected_value i states in - smash_states acc eq, neq - in - let matched, tail = - List.fold_left process_one_value ([], eval_states) expected_values - in - smash_states matched (List.map (fun (s, _, _) -> s) tail) - - (* --- Applying partitioning actions onto flows --------------------------- *) - - (* Applies the transfer function [f] to the states whose partitioning keys - only differ by the ration stamp. [f] may smash those states, thus - restricting the rationing without affecting the other partitioning. *) - let restrict_rationing (f : state list -> state list) (p : t) : t = - (* Group the states in buckets, where each bucket is a list of states - with the same key except for the ration stamp *) - let fill_buckets buckets (k,x) = - (* Ignore the ration stamp *) - let k = { k with ration_stamp = None } in - (* Find the bucket *) - let contents = - try KMap.find k buckets - with Not_found -> [] - in - (* Add the state to the bucket *) - KMap.add k (x :: contents) buckets - in - let buckets = List.fold_left fill_buckets KMap.empty p in - (* Apply the transfer function to each bucket *) - let result = KMap.map f buckets in - (* Rebuild the flow *) - let add_bucket k bucket acc = - List.map (fun x -> k,x) bucket @ acc - in - KMap.fold add_bucket result [] + None + end let split_state ~monitor (kind : split_kind) (exp : Cil_types.exp) (key : key) (state : state) : (key * state) list = @@ -429,12 +380,9 @@ struct | Update_dynamic_splits -> update_dynamic_splits p - | Restrict (expr, expected_values) -> - restrict_rationing (merge_by_value expr expected_values) p - | action -> (* Simple map transfer functions *) let transfer = match action with - | Restrict _ | Split _ | Update_dynamic_splits -> + | Split _ | Update_dynamic_splits -> assert false (* Handled above *) | Enter_loop limit_kind -> fun k x -> @@ -495,6 +443,9 @@ struct let stamp () = incr current; Some (!current, 0) in fun k _ -> { k with ration_stamp = stamp () } + | Restrict (expr, expected_values) -> fun k s -> + { k with ration_stamp = stamp_by_value expr expected_values s} + | Merge (exp, Static) -> fun k _x -> { k with static_split = ExpMap.remove exp k.static_split } diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index 48379890f7f..2f0ed37ad9e 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -169,22 +169,22 @@ struct let strategy = Split_return.kf_strategy kf in if strategy <> Split_strategy.FullSplit then - let smash () = - transfer_action flow (Ration empty_rationing); + let apply action = + transfer_action flow action; let p = Flow.to_partition flow.flow_states in flow.flow_states <- Flow.of_partition p in match Split_return.kf_strategy kf with (* SplitAuto already transformed into SplitEqList. *) | Split_strategy.FullSplit | Split_strategy.SplitAuto -> assert false - | Split_strategy.NoSplit -> smash () + | Split_strategy.NoSplit -> apply (Ration empty_rationing) | Split_strategy.SplitEqList i -> match return_exp with - | None -> smash () + | None -> apply (Ration empty_rationing) | Some return_exp -> if Cil.isIntegralOrPointerType (Cil.typeOf return_exp) - then transfer_action flow (Restrict (return_exp, i)) - else smash () + then apply (Restrict (return_exp, i)) + else apply (Ration empty_rationing) (* Reset state (for hierchical convergence) *) diff --git a/tests/value/oracle/split_return.0.res.oracle b/tests/value/oracle/split_return.0.res.oracle index 073552cab4f..91a2153418a 100644 --- a/tests/value/oracle/split_return.0.res.oracle +++ b/tests/value/oracle/split_return.0.res.oracle @@ -32,8 +32,8 @@ Called from tests/value/split_return.i:48. [eva] Recording results for f2 [eva] Done for function f2 -[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {5; 7}, {5} [eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {0}, {0} +[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {5; 7}, {5} [eva] tests/value/split_return.i:51: assertion got status valid. [eva] tests/value/split_return.i:53: Frama_C_show_each_f2_2: {5; 7}, {5} [eva] tests/value/split_return.i:54: assertion got status valid. @@ -72,8 +72,8 @@ Called from tests/value/split_return.i:117. [eva] Recording results for f5 [eva] Done for function f5 -[eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {7}, {5} [eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {-2}, {0} +[eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {7}, {5} [eva] tests/value/split_return.i:120: assertion got status valid. [eva] tests/value/split_return.i:122: assertion got status valid. [eva] Recording results for main5 diff --git a/tests/value/oracle/split_return.1.res.oracle b/tests/value/oracle/split_return.1.res.oracle index 27d86c75523..31917f83882 100644 --- a/tests/value/oracle/split_return.1.res.oracle +++ b/tests/value/oracle/split_return.1.res.oracle @@ -34,8 +34,8 @@ Called from tests/value/split_return.i:48. [eva] Recording results for f2 [eva] Done for function f2 -[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {5; 7}, {5} [eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {0}, {0} +[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {5; 7}, {5} [eva] tests/value/split_return.i:51: assertion got status valid. [eva] tests/value/split_return.i:53: Frama_C_show_each_f2_2: {5; 7}, {5} [eva] tests/value/split_return.i:54: assertion got status valid. @@ -47,8 +47,8 @@ Called from tests/value/split_return.i:73. [eva] Recording results for f3 [eva] Done for function f3 -[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} [eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {-2}, {0} +[eva] tests/value/split_return.i:74: Frama_C_show_each_f3: {7}, {5} [eva] tests/value/split_return.i:76: assertion got status valid. [eva] tests/value/split_return.i:78: assertion got status valid. [eva] Recording results for main3 @@ -59,8 +59,8 @@ Called from tests/value/split_return.i:94. [eva] Recording results for f4 [eva] Done for function f4 -[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {4}, {0} +[eva] tests/value/split_return.i:95: Frama_C_show_each_f4: {7}, {5} [eva] tests/value/split_return.i:97: assertion got status valid. [eva] tests/value/split_return.i:99: assertion got status valid. [eva] Recording results for main4 @@ -71,8 +71,8 @@ Called from tests/value/split_return.i:117. [eva] Recording results for f5 [eva] Done for function f5 -[eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {7}, {5} [eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {-2}, {0} +[eva] tests/value/split_return.i:118: Frama_C_show_each_f5: {7}, {5} [eva] tests/value/split_return.i:120: assertion got status valid. [eva] tests/value/split_return.i:122: assertion got status valid. [eva] Recording results for main5 @@ -104,8 +104,8 @@ Called from tests/value/split_return.i:171. [eva] Recording results for f8 [eva] Done for function f8 -[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {-1}, {0} +[eva] tests/value/split_return.i:172: Frama_C_show_each_then8: {4}, {{ &x }} [eva] Recording results for main8 [eva] Done for function main8 [eva] computing for function main9 <- main. diff --git a/tests/value/oracle/split_return.4.res.oracle b/tests/value/oracle/split_return.4.res.oracle index 46c3281323e..08cbe3aca44 100644 --- a/tests/value/oracle/split_return.4.res.oracle +++ b/tests/value/oracle/split_return.4.res.oracle @@ -472,8 +472,8 @@ Called from tests/value/split_return.i:48. [eva] Recording results for f2 [eva] Done for function f2 -[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {5; 7}, {5} [eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {0}, {0} +[eva] tests/value/split_return.i:49: Frama_C_show_each_f2: {5; 7}, {5} [eva] tests/value/split_return.i:53: Frama_C_show_each_f2_2: {5; 7}, {5} [eva] Recording results for main2 [eva] Done for function main2 -- GitLab From aa688ed67dd52e3a445104b115aed82b40fd1858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 29 Mar 2019 11:45:24 +0100 Subject: [PATCH 249/376] [Eva] Partition flows: new functions join_duplicate_keys and filter_map. join_duplicate_keys replaces the code `of_partition (to_partition)` in trace_partitioning, and is probably more efficient. filter_map is applied to flows instead of partitions. --- src/plugins/value/engine/partition.ml | 29 +++++++++++++++---- src/plugins/value/engine/partition.mli | 4 ++- .../value/engine/trace_partitioning.ml | 18 +++++------- 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index 89545afeba4..cedd0f86ffe 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -137,12 +137,6 @@ let merge = KMap.merge let to_list (p : 'a partition) : 'a list = KMap.fold (fun _k x l -> x :: l) p [] -let map_filter (f : key -> 'a -> 'b option) (p : 'a partition) : 'b partition = - let opt_flatten (type a) (o : a option option) : a option = - Extlib.opt_conv None o - in - KMap.merge (fun k o _ -> opt_flatten (Extlib.opt_map (f k) o)) p KMap.empty - (* --- Partitioning actions --- *) @@ -473,4 +467,27 @@ struct let iter (f : state -> unit) (p : t) : unit = List.iter (fun (_k,x) -> f x) p + + let join_duplicate_keys (p : t) : t = + let cmp (k, _) (k', _) = Key.compare k k' in + let p = List.fast_sort cmp p in + let rec aux acc (key, state) = function + | [] -> (key, state) :: acc + | (key', state') :: tl -> + if Key.compare key key' = 0 + then aux acc (key, Abstract.Dom.join state state') tl + else aux ((key, state) :: acc) (key', state') tl + in + match p with + | [] | [_] -> p + | e :: tl -> aux [] e tl + + let filter_map (f: key -> state -> state option) (p : t) : t = + let rec aux = function + | [] -> [] + | (key, x) :: tl -> match f key x with + | Some y -> (key, y) :: (aux tl) + | None -> aux tl + in + aux p end diff --git a/src/plugins/value/engine/partition.mli b/src/plugins/value/engine/partition.mli index ed7a1211289..6e5c2be9533 100644 --- a/src/plugins/value/engine/partition.mli +++ b/src/plugins/value/engine/partition.mli @@ -82,7 +82,6 @@ val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a partition -> val iter : (key -> 'a -> unit) -> 'a partition -> unit val filter : (key -> 'a -> bool) -> 'a partition -> 'a partition val map : ('a -> 'a) -> 'a partition -> 'a partition -val map_filter : (key -> 'a -> 'b option) -> 'a partition -> 'b partition (* Partitioning actions *) @@ -133,4 +132,7 @@ sig val transfer_states : (state -> state list) -> t -> t val iter : (state -> unit) -> t -> unit + val filter_map: (key -> state -> state option) -> t -> t + + val join_duplicate_keys: t -> t end diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index 2f0ed37ad9e..9c02b2708fe 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -170,9 +170,8 @@ struct if strategy <> Split_strategy.FullSplit then let apply action = - transfer_action flow action; - let p = Flow.to_partition flow.flow_states in - flow.flow_states <- Flow.of_partition p + let f = Flow.transfer_keys flow.flow_states action in + flow.flow_states <- Flow.join_duplicate_keys f in match Split_return.kf_strategy kf with (* SplitAuto already transformed into SplitEqList. *) @@ -258,8 +257,6 @@ struct let flow_states = List.fold_left Flow.transfer_keys flow_states actions in - (* Join states with unique keys *) - let partition = Flow.to_partition flow_states in (* Add states to the store but filter out already propagated states *) let update key current_state = (* Inclusion test *) @@ -288,8 +285,9 @@ struct (* Filter out already propagated states *) Extlib.opt_filter (fun s -> Index.add s dest.store_index) state in - let partition' = Partition.map_filter update partition in - { flow_states = Flow.of_partition partition' } + let flow = Flow.join_duplicate_keys flow_states in + let flow = Flow.filter_map update flow in + { flow_states = flow } let widen (w : widening) (f : flow) : bool = @@ -347,8 +345,8 @@ struct }; Some curr in - let p = Flow.to_partition f.flow_states in - let p' = Partition.map_filter widen_one p in - f.flow_states <- Flow.of_partition p'; + let flow = Flow.join_duplicate_keys f.flow_states in + let flow = Flow.filter_map widen_one flow in + f.flow_states <- flow; Flow.is_empty f.flow_states end -- GitLab From dfe644b4b7b17550ac438c8243e3413e5642bcc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 11 Apr 2019 14:46:35 +0200 Subject: [PATCH 250/376] [Eva] Removes function Bottom.of_list: inlines it in Trace_partitioning.smashed. --- src/kernel_services/abstract_interp/bottom.ml | 5 ----- src/kernel_services/abstract_interp/bottom.mli | 1 - src/plugins/value/engine/trace_partitioning.ml | 8 +++----- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/kernel_services/abstract_interp/bottom.ml b/src/kernel_services/abstract_interp/bottom.ml index def68537529..c6ae61d80ae 100644 --- a/src/kernel_services/abstract_interp/bottom.ml +++ b/src/kernel_services/abstract_interp/bottom.ml @@ -134,11 +134,6 @@ let to_list = function | `Bottom -> [] | `Value v -> [v] -let of_list = function - | [] -> `Bottom - | [v] -> `Value v - | _ -> assert false - let bot_of_list = function | [] -> `Bottom | l -> `Value l diff --git a/src/kernel_services/abstract_interp/bottom.mli b/src/kernel_services/abstract_interp/bottom.mli index 8c5a6ab97ce..7fca1504bf3 100644 --- a/src/kernel_services/abstract_interp/bottom.mli +++ b/src/kernel_services/abstract_interp/bottom.mli @@ -69,7 +69,6 @@ module Bound_Lattice (** Conversion functions. *) val to_list: 'a or_bottom -> 'a list -val of_list: 'a list -> 'a or_bottom val bot_of_list: 'a list -> 'a list or_bottom val list_of_bot: 'a list or_bottom -> 'a list val all: 'a or_bottom list -> 'a list diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index 9c02b2708fe..3e529ae6435 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -38,10 +38,6 @@ struct module Domain = Abstract.Dom - let smash_states = function - | [] -> [] - | v1 :: l -> [ List.fold_left Domain.join v1 l ] - module Index = Partitioning.Make (Domain) module Flow = Partition.MakeFlow (Abstract) @@ -125,7 +121,9 @@ struct Partition.to_list s.store_partition let smashed (s : store) : state or_bottom = - Bottom.of_list (smash_states (expanded s)) + match expanded s with + | [] -> `Bottom + | v1 :: l -> `Value (List.fold_left Domain.join v1 l) let contents (f : flow) : state list = Flow.to_list f.flow_states -- GitLab From 90723a44d14bfac014043bde4bfefcf9de09bd16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 8 Apr 2019 11:08:14 +0200 Subject: [PATCH 251/376] [Eva] Moves the signature from state_partitioning into trace_partitioning. Removes state_partitioning.mli. Since there is only one implementation of state_partitioning signature, there is no need to keep this separate file. --- Makefile | 1 - src/plugins/value/engine/partition.mli | 2 +- .../value/engine/partitioning_parameters.ml | 3 +- .../value/engine/partitioning_parameters.mli | 13 +- .../value/engine/state_partitioning.mli | 143 ------------------ .../value/engine/trace_partitioning.ml | 10 +- .../value/engine/trace_partitioning.mli | 98 +++++++++++- 7 files changed, 115 insertions(+), 155 deletions(-) delete mode 100644 src/plugins/value/engine/state_partitioning.mli diff --git a/Makefile b/Makefile index 411ebb702e9..9f7c9a8ba71 100644 --- a/Makefile +++ b/Makefile @@ -923,7 +923,6 @@ PLUGIN_CMO:= slevel/split_strategy value_parameters \ engine/initialization \ engine/compute_functions engine/analysis register PLUGIN_CMI:= values/abstract_value values/abstract_location \ - engine/state_partitioning \ domains/abstract_domain domains/simpler_domains PLUGIN_DEPENDENCIES:=Callgraph LoopAnalysis RteGen diff --git a/src/plugins/value/engine/partition.mli b/src/plugins/value/engine/partition.mli index 6e5c2be9533..672c0cb458b 100644 --- a/src/plugins/value/engine/partition.mli +++ b/src/plugins/value/engine/partition.mli @@ -55,7 +55,7 @@ of keys. *) -type branch = int +type branch = int (* Junction branch id in the control flow *) module ExpMap = Cil_datatype.ExpStructEq.Map diff --git a/src/plugins/value/engine/partitioning_parameters.ml b/src/plugins/value/engine/partitioning_parameters.ml index 3cd62544005..100803fa8c3 100644 --- a/src/plugins/value/engine/partitioning_parameters.ml +++ b/src/plugins/value/engine/partitioning_parameters.ml @@ -20,7 +20,6 @@ (* *) (**************************************************************************) -open State_partitioning open Value_parameters open Partitioning_annots open Cil_types @@ -30,7 +29,7 @@ let is_loop s = match s.skind with Loop _ -> true | _ -> false let warn ?(current = true) = Kernel.warning ~once:true ~current -module Make (Kf : Kf) : Parameters = +module Make (Kf : sig val kf: kernel_function end) = struct let kf = Kf.kf diff --git a/src/plugins/value/engine/partitioning_parameters.mli b/src/plugins/value/engine/partitioning_parameters.mli index 57acfb7caab..df2f76e600b 100644 --- a/src/plugins/value/engine/partitioning_parameters.mli +++ b/src/plugins/value/engine/partitioning_parameters.mli @@ -20,4 +20,15 @@ (* *) (**************************************************************************) -module Make (Kf : State_partitioning.Kf) : State_partitioning.Parameters +open Cil_types + +module Make (Kf : sig val kf: kernel_function end) : sig + val widening_delay : int + val widening_period : int + val slevel : stmt -> int + val merge : stmt -> bool + val unroll : stmt -> Partition.unroll_limit + val history_size : int + val universal_splits : Partition.action list + val flow_actions : stmt -> Partition.action list +end diff --git a/src/plugins/value/engine/state_partitioning.mli b/src/plugins/value/engine/state_partitioning.mli deleted file mode 100644 index d5b8df9227e..00000000000 --- a/src/plugins/value/engine/state_partitioning.mli +++ /dev/null @@ -1,143 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat à l'énergie atomique et aux énergies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -open Bottom.Type - -type branch = Partition.branch (* Junction branch id in the control flow *) -type loop = Cil_types.stmt (* Loop head id *) - -module type Kf = -sig - val kf : Cil_types.kernel_function -end - -module type Parameters = -sig - val widening_delay : int - val widening_period : int - val slevel : Cil_types.stmt -> int - val merge : Cil_types.stmt -> bool - val unroll : loop -> Partition.unroll_limit - val history_size : int - val universal_splits : Partition.action list - val flow_actions : Cil_types.stmt -> Partition.action list -end - -module type Partition = -sig - type state (** The states being partitioned *) - type store (** The storage of all states ever met at a control point *) - type flow (** A set of states which are currently propagated *) - type tank (** An organized temporary accumulation of flows *) - type widening (** Widening informations *) - - (* --- Constructors --- *) - - val empty_store : stmt:Cil_types.stmt option -> store - val empty_flow : unit -> flow - val empty_tank : unit -> tank - val empty_widening : stmt:Cil_types.stmt option -> widening - - (** Build the initial tank for the entry point of a function. *) - val initial_tank : state list -> tank - - (* --- Pretty printing --- *) - - val pretty_store : Format.formatter -> store -> unit - val pretty_flow : Format.formatter -> flow -> unit - - (* --- Accessors --- *) - - val expanded : store -> state list - val smashed : store -> state or_bottom - val contents : flow -> state list - val is_empty_store : store -> bool - val is_empty_flow : flow -> bool - val is_empty_tank : tank -> bool - val store_size : store -> int - val flow_size : flow -> int - val tank_size : tank -> int - - (* --- Reset state (for hierchical convergence) --- *) - - (* These functions reset the part of the state of the analysis which has - been obtained after a widening. *) - val reset_store : store -> unit - val reset_flow : flow -> unit - val reset_tank : tank -> unit - val reset_widening : widening -> unit - - (** Resets (or just delays) the widening counter. Used on nested loops, to - postpone the widening of the inner loop when iterating on the outer - loops. This is especially useful when the inner loop fixpoint does not - depend on the outer loop. *) - val reset_widening_counter : widening -> unit - - (* --- Partition transfer functions --- *) - - val enter_loop : flow -> loop -> unit - val leave_loop : flow -> loop -> unit - val next_loop_iteration : flow -> loop -> unit - val split_return : flow -> Cil_types.exp option -> unit - - (* --- Operators --- *) - - (** Remove all states from the tank, leaving it empty as if it was just - created by [empty_tank] *) - val drain : tank -> flow - - (** Fill the states of the flow into the tank, modifying [into] inplace but - letting the flow unchanged *) - val fill: into:tank -> flow -> unit - - (** Apply a transfer function to all the states of a propagation. *) - val transfer : (state -> state list) -> flow -> unit - - (** Join all incoming propagations into the given store. This function returns - a set of states which still need to be propagated past the store. - - If a state from the propagations is included in another state which has - already been propagated, it may be removed from the output propagation. - Likewise, if a state from a propagation is included in a state from - another propagation of the list (coming from another edge or iteration), - it may also be removed. - - This function also interprets partitioning annotations at the store - vertex (slevel, splits, merges, ...) which will generally change the - current partitioning. *) - val join : (branch * flow) list -> store -> flow - - (** Widen a flow. The widening object keeps track of the previous widenings - and previous propagated states to ensure termination. The result is true - when it is correct to end the propagation here, i.e. when the flow - object is only containng states which are included into already propagated - states. *) - val widen : widening -> flow -> bool -end - -module type Domain = Partitioning.Domain - -module type Partitioning = functor - (Abstract : Abstractions.Eva) - (Transfer : Transfer_stmt.S with type state = Abstract.Dom.t) - (Kf : Kf) -> - Partition with type state = Abstract.Dom.t diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index 3e529ae6435..b9aef2190db 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -22,14 +22,12 @@ open Cil_types open Bottom.Type -open State_partitioning open Partition - module Make (Abstract: Abstractions.Eva) (Transfer : Transfer_stmt.S with type state = Abstract.Dom.t) - (Kf : Kf) = + (Kf : sig val kf: kernel_function end) = struct module Parameters = Partitioning_parameters.Make (Kf) @@ -152,13 +150,13 @@ struct let transfer_action p action = p.flow_states <- Flow.transfer_keys p.flow_states action - let enter_loop (p : flow) (i : loop) : unit = + let enter_loop (p : flow) (i : stmt) : unit = transfer_action p (Enter_loop (unroll i)) - let leave_loop (p : flow) (_i : loop) : unit = + let leave_loop (p : flow) (_i : stmt) : unit = transfer_action p Leave_loop - let next_loop_iteration (p : flow) (_i : loop) : unit = + let next_loop_iteration (p : flow) (_i : stmt) : unit = transfer_action p Incr_loop let empty_rationing = new_rationing ~limit:0 ~merge:false diff --git a/src/plugins/value/engine/trace_partitioning.mli b/src/plugins/value/engine/trace_partitioning.mli index 9006e977b10..dd9dfaadeec 100644 --- a/src/plugins/value/engine/trace_partitioning.mli +++ b/src/plugins/value/engine/trace_partitioning.mli @@ -20,4 +20,100 @@ (* *) (**************************************************************************) -module Make : State_partitioning.Partitioning +open Bottom.Type + +module Make + (Abstract : Abstractions.Eva) + (Transfer : Transfer_stmt.S with type state = Abstract.Dom.t) + (Kf : sig val kf: Cil_types.kernel_function end) : +sig + type state = Abstract.Dom.t (** The states being partitioned *) + type store (** The storage of all states ever met at a control point *) + type flow (** A set of states which are currently propagated *) + type tank (** An organized temporary accumulation of flows *) + type widening (** Widening informations *) + + (* --- Constructors --- *) + + val empty_store : stmt:Cil_types.stmt option -> store + val empty_flow : unit -> flow + val empty_tank : unit -> tank + val empty_widening : stmt:Cil_types.stmt option -> widening + + (** Build the initial tank for the entry point of a function. *) + val initial_tank : state list -> tank + + (* --- Pretty printing --- *) + + val pretty_store : Format.formatter -> store -> unit + val pretty_flow : Format.formatter -> flow -> unit + + (* --- Accessors --- *) + + val expanded : store -> state list + val smashed : store -> state or_bottom + val contents : flow -> state list + val is_empty_store : store -> bool + val is_empty_flow : flow -> bool + val is_empty_tank : tank -> bool + val store_size : store -> int + val flow_size : flow -> int + val tank_size : tank -> int + + (* --- Reset state (for hierchical convergence) --- *) + + (* These functions reset the part of the state of the analysis which has + been obtained after a widening. *) + val reset_store : store -> unit + val reset_flow : flow -> unit + val reset_tank : tank -> unit + val reset_widening : widening -> unit + + (** Resets (or just delays) the widening counter. Used on nested loops, to + postpone the widening of the inner loop when iterating on the outer + loops. This is especially useful when the inner loop fixpoint does not + depend on the outer loop. *) + val reset_widening_counter : widening -> unit + + (* --- Partition transfer functions --- *) + + val enter_loop : flow -> Cil_types.stmt -> unit + val leave_loop : flow -> Cil_types.stmt -> unit + val next_loop_iteration : flow -> Cil_types.stmt -> unit + val split_return : flow -> Cil_types.exp option -> unit + + (* --- Operators --- *) + + (** Remove all states from the tank, leaving it empty as if it was just + created by [empty_tank] *) + val drain : tank -> flow + + (** Fill the states of the flow into the tank, modifying [into] inplace but + letting the flow unchanged *) + val fill : into:tank -> flow -> unit + + (** Apply a transfer function to all the states of a propagation. *) + val transfer : (state -> state list) -> flow -> unit + + (** Join all incoming propagations into the given store. This function returns + a set of states which still need to be propagated past the store. + + If a state from the propagations is included in another state which has + already been propagated, it may be removed from the output propagation. + Likewise, if a state from a propagation is included in a state from + another propagation of the list (coming from another edge or iteration), + it may also be removed. + + This function also interprets partitioning annotations at the store + vertex (slevel, splits, merges, ...) which will generally change the + current partitioning. *) + val join : (Partition.branch * flow) list -> store -> flow + + (** Widen a flow. The widening object keeps track of the previous widenings + and previous propagated states to ensure termination. The result is true + when it is correct to end the propagation here, i.e. when the flow + object is only containng states which are included into already propagated + states. *) + val widen : widening -> flow -> bool + +end -- GitLab From b830b2b12fe8bb3f2783c949a59686ec736b8664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 11 Apr 2019 15:12:14 +0200 Subject: [PATCH 252/376] [Eva] Renames partitioned_dataflow into iterator, partitioning into *_index. --- Makefile | 4 ++-- headers/header_spec.txt | 8 ++++---- src/plugins/value/engine/compute_functions.ml | 4 ++-- .../value/engine/{partitioned_dataflow.ml => iterator.ml} | 0 .../engine/{partitioned_dataflow.mli => iterator.mli} | 0 .../engine/{partitioning.ml => partitioning_index.ml} | 0 .../engine/{partitioning.mli => partitioning_index.mli} | 0 src/plugins/value/engine/trace_partitioning.ml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) rename src/plugins/value/engine/{partitioned_dataflow.ml => iterator.ml} (100%) rename src/plugins/value/engine/{partitioned_dataflow.mli => iterator.mli} (100%) rename src/plugins/value/engine/{partitioning.ml => partitioning_index.ml} (100%) rename src/plugins/value/engine/{partitioning.mli => partitioning_index.mli} (100%) diff --git a/Makefile b/Makefile index 9f7c9a8ba71..6ee2ea8d025 100644 --- a/Makefile +++ b/Makefile @@ -917,9 +917,9 @@ PLUGIN_CMO:= slevel/split_strategy value_parameters \ domains/cvalue/cvalue_domain \ engine/subdivided_evaluation engine/evaluation engine/abstractions \ engine/recursion engine/transfer_stmt engine/transfer_specification \ - engine/partitioning engine/mem_exec \ + engine/partitioning_index engine/mem_exec \ engine/partition engine/partitioning_parameters engine/trace_partitioning \ - engine/partitioned_dataflow \ + engine/iterator \ engine/initialization \ engine/compute_functions engine/analysis register PLUGIN_CMI:= values/abstract_value values/abstract_location \ diff --git a/headers/header_spec.txt b/headers/header_spec.txt index e94bb4bef29..98f4907dbfa 100644 --- a/headers/header_spec.txt +++ b/headers/header_spec.txt @@ -1176,14 +1176,14 @@ src/plugins/value/engine/evaluation.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/evaluation.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/initialization.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/initialization.mli: CEA_LGPL_OR_PROPRIETARY +src/plugins/value/engine/iterator.ml: CEA_LGPL_OR_PROPRIETARY +src/plugins/value/engine/iterator.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/mem_exec.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/mem_exec.mli: CEA_LGPL_OR_PROPRIETARY -src/plugins/value/engine/partitioned_dataflow.ml: CEA_LGPL_OR_PROPRIETARY -src/plugins/value/engine/partitioned_dataflow.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/partition.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/partition.mli: CEA_LGPL_OR_PROPRIETARY -src/plugins/value/engine/partitioning.ml: CEA_LGPL_OR_PROPRIETARY -src/plugins/value/engine/partitioning.mli: CEA_LGPL_OR_PROPRIETARY +src/plugins/value/engine/partitioning_index.ml: CEA_LGPL_OR_PROPRIETARY +src/plugins/value/engine/partitioning_index.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/partitioning_parameters.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/partitioning_parameters.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/value/engine/recursion.ml: CEA_LGPL_OR_PROPRIETARY diff --git a/src/plugins/value/engine/compute_functions.ml b/src/plugins/value/engine/compute_functions.ml index cac999676f6..d265352833e 100644 --- a/src/plugins/value/engine/compute_functions.ml +++ b/src/plugins/value/engine/compute_functions.ml @@ -124,7 +124,7 @@ let () = let handler (_signal: int) = !prev Sys.sigusr1; (* Call previous signal handler *) Value_parameters.warning "Stopping analysis at user request@."; - Partitioned_dataflow.signal_abort () + Iterator.signal_abort () in try match Sys.signal Sys.sigusr1 (Sys.Signal_handle handler) with @@ -143,7 +143,7 @@ module Make (Abstract: Abstractions.Eva) = struct module Init = Initialization.Make (Abstract.Dom) (Abstract.Eval) (Transfer) module Computer = - Partitioned_dataflow.Computer + Iterator.Computer (Abstract) (PowersetDomain) (Transfer) (Init) (Logic) (Spec) let initial_state = Init.initial_state diff --git a/src/plugins/value/engine/partitioned_dataflow.ml b/src/plugins/value/engine/iterator.ml similarity index 100% rename from src/plugins/value/engine/partitioned_dataflow.ml rename to src/plugins/value/engine/iterator.ml diff --git a/src/plugins/value/engine/partitioned_dataflow.mli b/src/plugins/value/engine/iterator.mli similarity index 100% rename from src/plugins/value/engine/partitioned_dataflow.mli rename to src/plugins/value/engine/iterator.mli diff --git a/src/plugins/value/engine/partitioning.ml b/src/plugins/value/engine/partitioning_index.ml similarity index 100% rename from src/plugins/value/engine/partitioning.ml rename to src/plugins/value/engine/partitioning_index.ml diff --git a/src/plugins/value/engine/partitioning.mli b/src/plugins/value/engine/partitioning_index.mli similarity index 100% rename from src/plugins/value/engine/partitioning.mli rename to src/plugins/value/engine/partitioning_index.mli diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index b9aef2190db..96c8bc8f5af 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -36,7 +36,7 @@ struct module Domain = Abstract.Dom - module Index = Partitioning.Make (Domain) + module Index = Partitioning_index.Make (Domain) module Flow = Partition.MakeFlow (Abstract) type state = Domain.t -- GitLab From 229c3410eb8c261fa2c1525ccf76f04f84658b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 11 Apr 2019 16:22:23 +0200 Subject: [PATCH 253/376] [Eva] Trace partitioning: makes the flow type non mutable. --- src/plugins/value/engine/iterator.ml | 77 +++++++++--------- .../value/engine/trace_partitioning.ml | 79 ++++++++----------- .../value/engine/trace_partitioning.mli | 28 +++---- 3 files changed, 82 insertions(+), 102 deletions(-) diff --git a/src/plugins/value/engine/iterator.ml b/src/plugins/value/engine/iterator.ml index b22c6f12e9f..a7f9573a00e 100644 --- a/src/plugins/value/engine/iterator.ml +++ b/src/plugins/value/engine/iterator.ml @@ -407,34 +407,32 @@ module Make_Dataflow end let process_partitioning_transitions (v1 : vertex) (v2 : vertex) - (transition : vertex transition) (f : flow) : unit = + (transition : vertex transition) (flow : flow) : flow = (* Split return *) - begin match transition with - | Return (return_exp, _) -> - Partition.split_return f return_exp - | _ -> () - end; + let flow = match transition with + | Return (return_exp, _) -> Partition.split_return flow return_exp + | _ -> flow + in (* Loop transitions *) let the_stmt v = Extlib.the v.vertex_start_of in - let enter_loop v = - Partition.transfer (lift (Domain.enter_loop (the_stmt v))) f; - Partition.enter_loop f (the_stmt v) - and leave_loop v = - Partition.transfer (lift (Domain.leave_loop (the_stmt v))) f; - Partition.leave_loop f (the_stmt v) - and incr_loop_counter v = - Partition.transfer (lift (Domain.incr_loop_counter (the_stmt v))) f; - Partition.next_loop_iteration f (the_stmt v) + let enter_loop f v = + let f = Partition.enter_loop f (the_stmt v) in + Partition.transfer (lift (Domain.enter_loop (the_stmt v))) f + and leave_loop f v = + let f = Partition.leave_loop f (the_stmt v) in + Partition.transfer (lift (Domain.leave_loop (the_stmt v))) f + and incr_loop_counter f v = + let f = Partition.next_loop_iteration f (the_stmt v) in + Partition.transfer (lift (Domain.incr_loop_counter (the_stmt v))) f in let loops_left, loops_entered = Interpreted_automata.get_wto_index_diff kf v1 v2 and loop_incr = Interpreted_automata.is_back_edge kf (v1,v2) in - List.iter leave_loop loops_left; - List.iter enter_loop loops_entered; - if loop_incr then - incr_loop_counter v2 + let flow = List.fold_left leave_loop flow loops_left in + let flow = List.fold_left enter_loop flow loops_entered in + if loop_incr then incr_loop_counter flow v2 else flow let process_edge (v1,e,v2 : G.edge) : flow = let {edge_transition=transition; edge_kinstr=kinstr} = e in @@ -444,8 +442,8 @@ module Make_Dataflow check_signals (); current_ki := kinstr; Cil.CurrentLoc.set e.edge_loc; - Partition.transfer (transfer_transition transition) flow; - process_partitioning_transitions v1 v2 transition flow; + let flow = Partition.transfer (transfer_transition transition) flow in + let flow = process_partitioning_transitions v1 v2 transition flow in if not (Partition.is_empty_flow flow) then edge_info.fireable <- true; flow @@ -476,45 +474,44 @@ module Make_Dataflow (* Get vertex store *) let store = get_vertex_store v in (* Join incoming s tates *) - let f = Partition.join sources store in - begin match v.vertex_start_of with + let flow = Partition.join sources store in + let flow = + match v.vertex_start_of with | Some stmt -> (* Callbacks *) - call_statement_callbacks stmt f; + call_statement_callbacks stmt flow; (* Transfer function associated to the statement *) - Partition.transfer (transfer_statement stmt) f; + let flow = Partition.transfer (transfer_statement stmt) flow in (* Output slevel related things *) let store_size = Partition.store_size store in output_slevel store_size; (* Debug informations *) Value_parameters.debug ~dkey ~current:true "reached statement %d with %d / %d eternal states, %d to propagate" - stmt.sid store_size (slevel stmt) (Partition.flow_size f); - | _ -> () - end; + stmt.sid store_size (slevel stmt) (Partition.flow_size flow); + flow + | _ -> flow + in (* Widen if necessary *) - let stable = - if Partition.is_empty_flow f then - true - else if widening then begin - let stable = Partition.widen (get_vertex_widening v) f in + let flow = + if widening && not (Partition.is_empty_flow flow) then begin + let flow = Partition.widen (get_vertex_widening v) flow in (* Try to correct over-widenings *) let correct_over_widening stmt = (* Do *not* record the status after interpreting the annotation here. Possible unproven assertions have already been recorded when the assertion has been interpreted the first time higher in this function. *) - Partition.transfer (transfer_annotations stmt ~record:false) f + Partition.transfer (transfer_annotations stmt ~record:false) flow in - Extlib.may correct_over_widening v.vertex_start_of; - stable + Extlib.may_map correct_over_widening ~dft:flow v.vertex_start_of end else - false + flow in (* Dispatch to successors *) - List.iter (fun into -> Partition.fill f ~into) (get_succ_tanks v); - (* Return wether the iterator should stop or not *) - stable + List.iter (fun into -> Partition.fill flow ~into) (get_succ_tanks v); + (* Return whether the iterator should stop or not *) + Partition.is_empty_flow flow let process_vertex ?(widening : bool = false) (v : vertex) : bool = (* Process predecessors *) diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index 96c8bc8f5af..eaa7a3ca361 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -50,9 +50,7 @@ struct mutable store_size : int; } - type flow = { - mutable flow_states : Flow.t; - } + type flow = Flow.t type tank = { mutable tank_states : state partition; @@ -85,8 +83,7 @@ struct store_size = 0; } - let empty_flow () : flow = - { flow_states = Flow.empty } + let empty_flow : flow = Flow.empty let empty_tank () : tank = { tank_states = Partition.empty } @@ -109,8 +106,8 @@ struct let pretty_store (fmt : Format.formatter) (s : store) : unit = Partition.iter (fun _key state -> Domain.pretty fmt state) s.store_partition - let pretty_flow (fmt : Format.formatter) (p : flow) = - Flow.iter (Domain.pretty fmt) p.flow_states + let pretty_flow (fmt : Format.formatter) (flow : flow) = + Flow.iter (Domain.pretty fmt) flow (* Accessors *) @@ -123,14 +120,14 @@ struct | [] -> `Bottom | v1 :: l -> `Value (List.fold_left Domain.join v1 l) - let contents (f : flow) : state list = - Flow.to_list f.flow_states + let contents (flow : flow) : state list = + Flow.to_list flow let is_empty_store (s : store) : bool = Partition.is_empty s.store_partition - let is_empty_flow (f : flow) : bool = - Flow.is_empty f.flow_states + let is_empty_flow (flow : flow) : bool = + Flow.is_empty flow let is_empty_tank (t : tank) : bool = Partition.is_empty t.tank_states @@ -138,8 +135,8 @@ struct let store_size (s : store) : int = s.store_size - let flow_size (f : flow) : int = - Flow.size f.flow_states + let flow_size (flow : flow) : int = + Flow.size flow let tank_size (t : tank) : int = Partition.size t.tank_states @@ -147,27 +144,24 @@ struct (* Partition transfer functions *) - let transfer_action p action = - p.flow_states <- Flow.transfer_keys p.flow_states action - - let enter_loop (p : flow) (i : stmt) : unit = - transfer_action p (Enter_loop (unroll i)) + let enter_loop (flow : flow) (i : stmt) : flow = + Flow.transfer_keys flow (Enter_loop (unroll i)) - let leave_loop (p : flow) (_i : stmt) : unit = - transfer_action p Leave_loop + let leave_loop (flow : flow) (_i : stmt) : flow = + Flow.transfer_keys flow Leave_loop - let next_loop_iteration (p : flow) (_i : stmt) : unit = - transfer_action p Incr_loop + let next_loop_iteration (flow : flow) (_i : stmt) : flow = + Flow.transfer_keys flow Incr_loop let empty_rationing = new_rationing ~limit:0 ~merge:false - let split_return (flow : flow) (return_exp : exp option) : unit = + let split_return (flow : flow) (return_exp : exp option) : flow = let strategy = Split_return.kf_strategy kf in - if strategy <> Split_strategy.FullSplit - then + if strategy = Split_strategy.FullSplit + then flow + else let apply action = - let f = Flow.transfer_keys flow.flow_states action in - flow.flow_states <- Flow.join_duplicate_keys f + Flow.join_duplicate_keys (Flow.transfer_keys flow action) in match Split_return.kf_strategy kf with (* SplitAuto already transformed into SplitEqList. *) @@ -187,9 +181,6 @@ struct let is_eternal key _state = not (Key.exceed_rationing key) in s.store_partition <- Partition.filter is_eternal s.store_partition - let reset_flow (f : flow) : unit = - f.flow_states <- Flow.empty - let reset_tank (t : tank) : unit = t.tank_states <- Partition.empty @@ -206,21 +197,20 @@ struct (* Operators *) let drain (t : tank) : flow = - let flow_states = Flow.of_partition t.tank_states in + let flow = Flow.of_partition t.tank_states in t.tank_states <- Partition.empty; - { flow_states } + flow - let fill ~(into : tank) (f : flow) : unit = + let fill ~(into : tank) (flow : flow) : unit = let erase _key dest src = if Extlib.has_some src then src else dest in - let new_states = Flow.to_partition f.flow_states in + let new_states = Flow.to_partition flow in into.tank_states <- Partition.merge erase into.tank_states new_states - let transfer (f : state -> state list) (p : flow) : unit = - p.flow_states <- Flow.transfer_states f p.flow_states + let transfer = Flow.transfer_states let join (sources : (branch*flow) list) (dest : store) : flow = let is_loop_head = @@ -231,11 +221,11 @@ struct (* Get every source flow *) let sources_states = match sources with - | [(_,p)] -> [p.flow_states] + | [(_,flow)] -> [flow] | sources -> (* Several branches -> partition according to the incoming branch *) - let get (b,p) = - Flow.transfer_keys p.flow_states (Branch (b,history_size)) + let get (b,flow) = + Flow.transfer_keys flow (Branch (b,history_size)) in List.map get sources in @@ -282,11 +272,10 @@ struct Extlib.opt_filter (fun s -> Index.add s dest.store_index) state in let flow = Flow.join_duplicate_keys flow_states in - let flow = Flow.filter_map update flow in - { flow_states = flow } + Flow.filter_map update flow - let widen (w : widening) (f : flow) : bool = + let widen (w : widening) (flow : flow) : flow = let stmt = w.widening_stmt in (* Auxiliary function to update the result *) let update key widening_state = @@ -341,8 +330,6 @@ struct }; Some curr in - let flow = Flow.join_duplicate_keys f.flow_states in - let flow = Flow.filter_map widen_one flow in - f.flow_states <- flow; - Flow.is_empty f.flow_states + let flow = Flow.join_duplicate_keys flow in + Flow.filter_map widen_one flow end diff --git a/src/plugins/value/engine/trace_partitioning.mli b/src/plugins/value/engine/trace_partitioning.mli index dd9dfaadeec..584134d4d14 100644 --- a/src/plugins/value/engine/trace_partitioning.mli +++ b/src/plugins/value/engine/trace_partitioning.mli @@ -29,14 +29,15 @@ module Make sig type state = Abstract.Dom.t (** The states being partitioned *) type store (** The storage of all states ever met at a control point *) + type tank (** The set of states that remains to propagate from a + control point. *) type flow (** A set of states which are currently propagated *) - type tank (** An organized temporary accumulation of flows *) - type widening (** Widening informations *) + type widening (** Widening information *) (* --- Constructors --- *) val empty_store : stmt:Cil_types.stmt option -> store - val empty_flow : unit -> flow + val empty_flow : flow val empty_tank : unit -> tank val empty_widening : stmt:Cil_types.stmt option -> widening @@ -65,7 +66,6 @@ sig (* These functions reset the part of the state of the analysis which has been obtained after a widening. *) val reset_store : store -> unit - val reset_flow : flow -> unit val reset_tank : tank -> unit val reset_widening : widening -> unit @@ -77,10 +77,10 @@ sig (* --- Partition transfer functions --- *) - val enter_loop : flow -> Cil_types.stmt -> unit - val leave_loop : flow -> Cil_types.stmt -> unit - val next_loop_iteration : flow -> Cil_types.stmt -> unit - val split_return : flow -> Cil_types.exp option -> unit + val enter_loop : flow -> Cil_types.stmt -> flow + val leave_loop : flow -> Cil_types.stmt -> flow + val next_loop_iteration : flow -> Cil_types.stmt -> flow + val split_return : flow -> Cil_types.exp option -> flow (* --- Operators --- *) @@ -88,12 +88,11 @@ sig created by [empty_tank] *) val drain : tank -> flow - (** Fill the states of the flow into the tank, modifying [into] inplace but - letting the flow unchanged *) + (** Fill the states of the flow into the tank, modifying [into] inplace. *) val fill : into:tank -> flow -> unit (** Apply a transfer function to all the states of a propagation. *) - val transfer : (state -> state list) -> flow -> unit + val transfer : (state -> state list) -> flow -> flow (** Join all incoming propagations into the given store. This function returns a set of states which still need to be propagated past the store. @@ -110,10 +109,7 @@ sig val join : (Partition.branch * flow) list -> store -> flow (** Widen a flow. The widening object keeps track of the previous widenings - and previous propagated states to ensure termination. The result is true - when it is correct to end the propagation here, i.e. when the flow - object is only containng states which are included into already propagated - states. *) - val widen : widening -> flow -> bool + and previous propagated states to ensure termination. *) + val widen : widening -> flow -> flow end -- GitLab From c4daa9021db3c040695ab00fb2bbf68fc4025913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 11 Apr 2019 16:53:32 +0200 Subject: [PATCH 254/376] [Eva] Trace_partitioning: makes the widening_state type mutable. Slightly simplifies the widening. --- .../value/engine/trace_partitioning.ml | 58 ++++++++----------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index eaa7a3ca361..de0cbb64c05 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -57,9 +57,9 @@ struct } type widening_state = { - widened_state : state option; - previous_state : state; - widening_counter : int; + mutable widened_state : state option; + mutable previous_state : state; + mutable widening_counter : int; } type widening = { @@ -274,60 +274,52 @@ struct let flow = Flow.join_duplicate_keys flow_states in Flow.filter_map update flow - let widen (w : widening) (flow : flow) : flow = let stmt = w.widening_stmt in - (* Auxiliary function to update the result *) - let update key widening_state = - w.widening_partition <- - Partition.replace key widening_state w.widening_partition - in (* Apply widening to each leaf *) let widen_one key curr = try (* Search for an already existing widening state *) - let wstate = Partition.find key w.widening_partition in + let w = Partition.find key w.widening_partition in + let previous_state = w.previous_state in (* Update the widening state *) - update key { - wstate with - previous_state = curr; - widening_counter = wstate.widening_counter - 1 - }; + w.previous_state <- curr; + w.widening_counter <- w.widening_counter - 1; (* Propagated state decreases, stop propagating *) - if Domain.is_included curr wstate.previous_state then + if Domain.is_included curr previous_state then None (* Widening is delayed *) - else if wstate.widening_counter > 0 then begin + else if w.widening_counter >= 0 then Some curr (* Apply widening *) - end else begin + else begin Value_parameters.feedback ~level:1 ~once:true ~current:true ~dkey:Value_parameters.dkey_widening "applying a widening at this point"; (* We join the previous widening state with the previous iteration state so as to allow the intermediate(s) iteration(s) (between two widenings) to stabilize at least a part of the state. *) - let prev = match wstate.widened_state with - | Some v -> Domain.join wstate.previous_state v - | None -> wstate.previous_state + let prev = match w.widened_state with + | Some v -> Domain.join previous_state v + | None -> previous_state in let next = Domain.widen kf stmt prev (Domain.join prev curr) in - update key { - previous_state = next; - widened_state = Some next; - widening_counter = widening_period - 1; - }; + w.previous_state <- next; + w.widened_state <- Some next; + w.widening_counter <- widening_period - 1; Some next end with Not_found -> (* The key is not in the widening state; add the state if slevel is - exceeded *) - if Key.exceed_rationing key then - update key { - widened_state = None; - previous_state = curr; - widening_counter = widening_delay - 1; - }; + exceeded. *) + if Key.exceed_rationing key then begin + let ws = + { widened_state = None; + previous_state = curr; + widening_counter = widening_delay - 1; } + in + w.widening_partition <- Partition.replace key ws w.widening_partition + end; Some curr in let flow = Flow.join_duplicate_keys flow in -- GitLab From 440a44b06f94c211b7a1a72b6d7c7e531baaef45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 11 Apr 2019 19:30:07 +0200 Subject: [PATCH 255/376] [Eva] Comments partition.mli. --- src/plugins/value/engine/partition.ml | 21 ++++ src/plugins/value/engine/partition.mli | 131 ++++++++++++++++--------- 2 files changed, 105 insertions(+), 47 deletions(-) diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index cedd0f86ffe..460becf5505 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -60,6 +60,27 @@ module BranchList = Datatype.List (Datatype.Int) type branch = int +(* The key have several fields, one for each kind of partitioning: + - Ration stamps: These modelize the legacy slevel. Each state is given + a ration stamp (represented by two integers) until there is no slevel + left. The first number is attributed by the store it comes from, the + second one is attributed by the last transfer. + It is an option type, when there is no more ration stamp, this field is + set to None; each new state will not be distinguished by this field. + - Branches: This field enumerate the last junctions points passed through. + The partitioning may chose how the branches are identified, but it + is a First-In-First-Out set. + - Loops: This field stores the loop iterations needed to reach this state + for each loop we are currently in. It is stored in reverse order + (innermost loop first) It also stores the maximum number of unrolling ; + this number varies from a state to another, as it is computed from + an expression evaluated when we enter the loop. + - Static/Dynamic splits: track the splits applied to the state as a map + from the expression of the split to the value of this expression. Since + the split creates states in which the expression evalutates to a + singleton, the values of the map are integers. + Static splits are only evaluated when the annotation is encountered + whereas dynamic splits are reevaluated regularly. *) type key = { ration_stamp : stamp; branches : branch list; diff --git a/src/plugins/value/engine/partition.mli b/src/plugins/value/engine/partition.mli index 672c0cb458b..52449a00e20 100644 --- a/src/plugins/value/engine/partition.mli +++ b/src/plugins/value/engine/partition.mli @@ -20,56 +20,36 @@ (* *) (**************************************************************************) -(* A state partition is a collection of states, each of which is identified - by a unique key. The key identifies the reason for which we want to keep - the state separate from the others. The partitioning method will involve - updating the key. If at some point two states share the same key, it means - that the partitioning method decided to not consider those states separately - anymore and that they should be joined together. - - The key have several fields, one for each kind of partitioning. - - - Ration stamps: These modelize the legacy slevel. Each state is given - a ration stamp (represented by two integers) until there is no slevel - left. The first number is attributed by the store it comes from, the - second one is attributed by the last transfer. - It is an option type, when there is no more ration stamp, this field is - set to None; each new state will not be distinguished by this field. - - Branches: This field enumerate the last junctions points passed through. - The partitioning may chose how the branches are identified, but it - is a First-In-First-Out set. - - Loops: This field stores the loop iterations needed to reach this state - for each loop we are currently in. It is stored in reverse order - (innermost loop first) It also stores the maximum number of unrolling ; - this number varies from a state to another, as it is computed from - an expression evaluated when we enter the loop. - - Static/Dynamic splits: track the splits applied to the state as a map - from the expression of the split to the value of this expression. Since - the split creates states in which the expression evalutates to a - singleton, the values of the map are integers. - Static splits are only evaluated when the annotation is encountered - whereas dynamic splits are reevaluated regularly. - - A flow is a list of states accompanied by their key. It is used to - transfer states from one partition to another. It doesn't enforce unicity - of keys. -*) - -type branch = int (* Junction branch id in the control flow *) - -module ExpMap = Cil_datatype.ExpStructEq.Map +(** A partition is a collection of states, each identified by a unique key. + The keys define the states partition: states with identical keys are joined + together, while states with different keys are maintained separate. + A key contains the reason for which a state must be kept separate from + others, or joined with similar states. + Partitioning actions allow updating the keys or spliting some states to + define or change the partition. Actions are applied to flows, in which + states with the same key are *not* automatically joined. This allows + applying mutliple actions before recomputing the partitions. Flows can then + be converted into partitions, thus merging states with identical keys. + + Flows are used to transfer states from one partition to another. Transfer + functions can be applied to flows; keys are maintained through transfer + functions, until partitioning actions update them. *) + +(** {2 Keys and partitions.} *) + +(** Partitioning keys attached to states. *) type key module Key : sig - type t = key - val zero : t - val compare : t -> t -> int - val pretty : Format.formatter -> t -> unit - val exceed_rationing: t -> bool + val zero : key (** Initial key: no partitioning. *) + val compare : key -> key -> int + val pretty : Format.formatter -> key -> unit + val exceed_rationing: key -> bool end -type 'a partition +(** Collection of states, each identified by a unique key. *) +type 'state partition val empty : 'a partition val is_empty : 'a partition -> bool @@ -84,33 +64,90 @@ val filter : (key -> 'a -> bool) -> 'a partition -> 'a partition val map : ('a -> 'a) -> 'a partition -> 'a partition -(* Partitioning actions *) +(** {2 Partitioning actions.} *) +type branch = int (** Junction branch id in the control flow *) + +(** Rationing are used to keep separate the [n] first states propagated at + a point, by creating unique stamp until the limit is reached. + Implementation of the option -eva-slevel. *) type rationing + +(** Creates a new rationing, that can be used successively on several flows. *) val new_rationing: limit:int -> merge:bool -> rationing +(** The unroll limit of a loop can be specified as an integer, or as a C + expression, which is evaluated when entering the loop in each incoming + state. The expression must always evaluate to a singleton integer. *) type unroll_limit = | ExpLimit of Cil_types.exp | IntLimit of int +(** Splits on an expression can be static or dynamic: + - static splits are processed once: the expression is only evaluated at the + split point, and the key is then kept unchanged until a merge. + - dynamic splits are regularly redone: the expression is re-evaluated, and + states are then split or merged accordingly. *) type split_kind = Static | Dynamic +(** These actions redefine the partitioning by updating keys or spliting states. + They are applied to all the pair (key, state) in a flow. *) type action = | Enter_loop of unroll_limit + (** Enters a loop in which the n first iterations will be kept separate: + creates an iteration counter at 0 for each states in the flow; states at + different iterations will be kept separate, untill reaching the + [unroll_limit]. Counters are incremented by the [Incr_loop] action. *) | Leave_loop + (** Leaves the current loop: removes its iteration counter. States that were + kept separate only by this iteration counter will be joined together. *) | Incr_loop - | Branch of branch * int (* branch taken, max branches in history *) + (** Increments the iteration counter of the current loop for all states in + the flow. States with different iteration counter are kept separate. *) + | Branch of branch * int + (** Identifies all the states in the flow as coming from [branch]. + They will be kept separated from states coming from other branches. + The integer is the maximum number of successive branches kept in the keys: + this action also removes the oldest branches from the keys to meet this + constraint. *) | Ration of rationing + (** Ensures that the first states encountered are kept separate, by creating a + unique ration stamp for each new state until the [limit] is reached. The + same rationing can be used on multiple flows. Applying a new rationing + replaces the previous one. + If the rationing has been created with [merge:true], all the states from + each flow receive the same stamp, but states from different flows receive + different stamps, until [limit] states have been tagged. *) | Restrict of Cil_types.exp * Integer.t list + (** [Restrict (exp, list)] restricts the rationing according to the evaluation + of the expression [exp]: + - for each integer [i] in [list], states in which [exp] evaluates exactly + to the singleton [i] receive the same unique stamp, and will thus be + joined together but kept separate from other states; + - all other states are joined together. + Previous rationing is erased and replaced by this new stamping. + Implementation of the option -eva-split-return. *) | Split of Cil_types.exp * split_kind * int + (** [Split (exp, kind, max)] tries to separate states such as the [exp] + evaluates to a singleton value in each state in the flow. If necessary and + possible, splits states into multiple states. States in which the [exp] + evaluates to different values will be kept separate. Gives up the split + if [exp] evaluates to more than [max] values. *) | Merge of Cil_types.exp * split_kind + (** Forgets the split of an expression: states that were kept separate only + by the split of this expression will be joined together. *) | Update_dynamic_splits + (** Updates dynamic splits by evaluating the expression and spliting the + states accordingly. *) exception InvalidAction -(* Flows *) +(** {2 Flows.} *) +(** Flows are used to transfer states from one partition to another, by + applying transfer functions and partitioning actions. They do not enforce + the unicity of keys. *) module MakeFlow (Abstract: Abstractions.Eva) : sig type state = Abstract.Dom.t -- GitLab From c27c5a102a681fbc7c89cdd10947ab585c7518f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 12 Apr 2019 10:28:44 +0200 Subject: [PATCH 256/376] [Eva] Partition: uses Extlib.list_first_n instead of reimplementing it. --- src/plugins/value/engine/partition.ml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index 460becf5505..bf2a5e2b66c 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -426,16 +426,8 @@ struct end | Branch (b,max) -> fun k _x -> - let list_start l i = - let rec aux acc i = function - | [] -> acc - | _ when i <= 0 -> List.rev acc - | x :: l -> aux (x :: acc) (i - 1) l - in - aux [] i l - in if max > 0 then - { k with branches = b :: list_start k.branches (max - 1) } + { k with branches = b :: Extlib.list_first_n (max - 1) k.branches } else if k.branches <> [] then { k with branches = [] } else -- GitLab From b8174c837ecd50d8b218c234ea5a2f98b5416300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 12 Apr 2019 14:38:22 +0200 Subject: [PATCH 257/376] [Eva] Comments and simplifies the interface of partitioning_index. --- .../value/engine/partitioning_index.ml | 32 ------------------- .../value/engine/partitioning_index.mli | 27 +++++++++------- 2 files changed, 15 insertions(+), 44 deletions(-) diff --git a/src/plugins/value/engine/partitioning_index.ml b/src/plugins/value/engine/partitioning_index.ml index c40be57a5bc..08a2f449cf0 100644 --- a/src/plugins/value/engine/partitioning_index.ml +++ b/src/plugins/value/engine/partitioning_index.ml @@ -20,34 +20,18 @@ (* *) (**************************************************************************) -open Eval - module type Domain = sig include Abstract_domain.Lattice include Datatype.S_with_collections with type t = state include Abstract_domain.Interface with type t := state end -module type S = sig - type state - type t - - val empty: unit -> t - val add : state -> t -> bool - val merge_set_return_new: state list -> t -> state list - val join: t -> state or_bottom - val to_list: t -> state list - val pretty : Format.formatter -> t -> unit -end - - (** Partition of the abstract states, computed for each node by the dataflow analysis. *) module Make (Domain : Domain) = struct - type state = Domain.t module Index = Hashtbl.Make (Cvalue_domain.Subpart) type t = { @@ -59,10 +43,6 @@ module Make let sentinel = Index.create 1 let empty () = { states = sentinel ; prefix = None ; others = [] } - let fold f {states; others} acc = - let acc = Index.fold (fun _k s acc -> f s acc) states acc in - List.fold_left (fun acc s -> f s acc) acc others - (* Optimizations relying on specific features of the cvalue domain. *) let distinct_subpart = match Domain.get Cvalue_domain.key with @@ -113,18 +93,6 @@ module Make then false else (Index.add states prefix state; true) - let merge_set_return_new states partition = - let f acc state = - let added = add state partition in - if added then state :: acc else acc - in - List.fold_left f [] states - - let join partition = - fold (fun v acc -> Bottom.join Domain.join (`Value v) acc) partition `Bottom - - let to_list p = Index.fold (fun _k v a -> v :: a) p.states p.others - let iter f { states; others } = Index.iter (fun _k v -> f v) states; List.iter f others diff --git a/src/plugins/value/engine/partitioning_index.mli b/src/plugins/value/engine/partitioning_index.mli index 4ecc2ee21ff..b4488a2eef7 100644 --- a/src/plugins/value/engine/partitioning_index.mli +++ b/src/plugins/value/engine/partitioning_index.mli @@ -20,7 +20,15 @@ (* *) (**************************************************************************) -open Eval +(** A partitioning index is a collection of states optimized to determine + if a new state is included in one of the states it contains — in a more + efficient way than to test the inclusion with all stored states. + Such an index is used to keep track of all the states already propagated + through a control point, and to rule out new incoming states included in + previous ones. + + Partitioning index relies on an heuristics on the cvalue domain, + and is very inefficient without it. *) module type Domain = sig include Abstract_domain.Lattice @@ -28,25 +36,20 @@ module type Domain = sig include Abstract_domain.Interface with type t := state end -module type S = sig - type state +module Make (Domain: Domain) : sig type t + (** Creates an empty index. *) val empty: unit -> t - val add : state -> t -> bool - val merge_set_return_new: state list -> t -> state list - val join: t -> state or_bottom - - val to_list: t -> state list + (** Adds a state into an index. Returns true if the state did not belong to + the index (and has indeed been added), and false if the index already + contained the state. *) + val add : Domain.t -> t -> bool val pretty : Format.formatter -> t -> unit end -module Make - (Domain: Domain) - : S with type state = Domain.t - (* Local Variables: -- GitLab From 7d3495e7b877859ba1d63135c11c077821e3dce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 15 Apr 2019 10:35:03 +0200 Subject: [PATCH 258/376] [Eva] Moves feedback messages about partitioning in trace_partitioning. --- src/plugins/value/engine/iterator.ml | 25 +----------- .../value/engine/trace_partitioning.ml | 40 ++++++++++++++----- 2 files changed, 32 insertions(+), 33 deletions(-) diff --git a/src/plugins/value/engine/iterator.ml b/src/plugins/value/engine/iterator.ml index a7f9573a00e..541d61dd21f 100644 --- a/src/plugins/value/engine/iterator.ml +++ b/src/plugins/value/engine/iterator.ml @@ -89,9 +89,6 @@ module Make_Dataflow let interpreter_mode = Value_parameters.InterpreterMode.get () - let slevel_display_step : int = - Value_parameters.ShowSlevel.get () - (* Ideally, the slevel parameter should not be used anymore in this file but it is still required for logic interpretation *) let slevel = @@ -394,18 +391,6 @@ module Make_Dataflow (* --- Iteration strategy ---*) - let output_slevel : int -> unit = - let max_displayed = ref 0 in - fun x -> - if x >= !max_displayed + slevel_display_step - then begin - let rounded = x / slevel_display_step * slevel_display_step in - Value_parameters.feedback ~once:true ~current:true - "Semantic level unrolling superposing up to %d states" - rounded; - max_displayed := rounded; - end - let process_partitioning_transitions (v1 : vertex) (v2 : vertex) (transition : vertex transition) (flow : flow) : flow = (* Split return *) @@ -481,15 +466,7 @@ module Make_Dataflow (* Callbacks *) call_statement_callbacks stmt flow; (* Transfer function associated to the statement *) - let flow = Partition.transfer (transfer_statement stmt) flow in - (* Output slevel related things *) - let store_size = Partition.store_size store in - output_slevel store_size; - (* Debug informations *) - Value_parameters.debug ~dkey ~current:true - "reached statement %d with %d / %d eternal states, %d to propagate" - stmt.sid store_size (slevel stmt) (Partition.flow_size flow); - flow + Partition.transfer (transfer_statement stmt) flow | _ -> flow in (* Widen if necessary *) diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index de0cbb64c05..71cb5fab948 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -42,12 +42,13 @@ struct type state = Domain.t type store = { - rationing: Partition.rationing; - flow_actions : action list; + rationing: Partition.rationing; (* slevel rationing at this point *) + flow_actions : action list; (* partitioning actions to be applied *) store_stmt : stmt option; - store_index : Index.t; - mutable store_partition : state partition; - mutable store_size : int; + store_index : Index.t; (* Index of all states stored: used to quickly remove + new states that have already been propagated. *) + mutable store_partition : state partition; (* partition of states *) + mutable incoming_states : int; (* number of incoming states. *) } type flow = Flow.t @@ -80,7 +81,7 @@ struct store_stmt = stmt; store_index = Index.empty (); store_partition = Partition.empty; - store_size = 0; + incoming_states = 0; } let empty_flow : flow = Flow.empty @@ -133,7 +134,7 @@ struct Partition.is_empty t.tank_states let store_size (s : store) : int = - s.store_size + Partition.size s.store_partition let flow_size (flow : flow) : int = Flow.size flow @@ -212,6 +213,25 @@ struct let transfer = Flow.transfer_states + let output_slevel : int -> unit = + let slevel_display_step = Value_parameters.ShowSlevel.get () in + let max_displayed = ref 0 in + fun x -> + if x >= !max_displayed + slevel_display_step + then + let rounded = x / slevel_display_step * slevel_display_step in + Value_parameters.feedback ~once:true ~current:true + "Semantic level unrolling superposing up to %d states" + rounded; + max_displayed := rounded + + let partitioning_feedback dest flow stmt = + output_slevel dest.incoming_states; + (* Debug information. *) + Value_parameters.debug ~dkey:Value_parameters.dkey_iterator ~current:true + "reached statement %d with %d incoming states, %d to propagate" + stmt.sid dest.incoming_states (flow_size flow) + let join (sources : (branch*flow) list) (dest : store) : flow = let is_loop_head = match dest.store_stmt with @@ -234,7 +254,7 @@ struct List.fold_left Flow.union Flow.empty sources_states in (* Handle ration stamps *) - dest.store_size <- dest.store_size + Flow.size flow_states; + dest.incoming_states <- dest.incoming_states + Flow.size flow_states; let rationing_action = Ration dest.rationing in (* Handle Split / Merge operations *) let flow_actions = Update_dynamic_splits :: dest.flow_actions in @@ -272,7 +292,9 @@ struct Extlib.opt_filter (fun s -> Index.add s dest.store_index) state in let flow = Flow.join_duplicate_keys flow_states in - Flow.filter_map update flow + let flow = Flow.filter_map update flow in + Extlib.may (partitioning_feedback dest flow) dest.store_stmt; + flow let widen (w : widening) (flow : flow) : flow = let stmt = w.widening_stmt in -- GitLab From 6cfa0e9e528f7fb3e5e0d06a93c22b0a037ebe08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 15 Apr 2019 14:26:54 +0200 Subject: [PATCH 259/376] [Eva] Changes "semantic level unrolling" into "trace partitioning" in a feedback. --- .../value/engine/trace_partitioning.ml | 2 +- tests/builtins/oracle/alloc_weak.res.oracle | 16 ++--- tests/builtins/oracle/allocated.1.res.oracle | 8 +-- tests/builtins/oracle/memcpy.res.oracle | 2 +- tests/float/oracle/some.0.res.oracle | 15 ++--- tests/libc/oracle/string_c_strchr.res.oracle | 10 ++-- tests/libc/oracle/string_h.res.oracle | 3 +- .../slicing/oracle/if_many_values.res.oracle | 2 +- tests/value/oracle/local_slevel.res.oracle | 8 +-- tests/value/oracle/no_results.res.oracle | 60 +++++++++---------- 10 files changed, 59 insertions(+), 67 deletions(-) diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index 71cb5fab948..2a63927373b 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -221,7 +221,7 @@ struct then let rounded = x / slevel_display_step * slevel_display_step in Value_parameters.feedback ~once:true ~current:true - "Semantic level unrolling superposing up to %d states" + "Trace partitioning superposing up to %d states" rounded; max_displayed := rounded diff --git a/tests/builtins/oracle/alloc_weak.res.oracle b/tests/builtins/oracle/alloc_weak.res.oracle index 14c99ac21dc..5a584e37268 100644 --- a/tests/builtins/oracle/alloc_weak.res.oracle +++ b/tests/builtins/oracle/alloc_weak.res.oracle @@ -42,21 +42,21 @@ [eva] tests/builtins/alloc_weak.c:37: Call to builtin malloc [eva] tests/builtins/alloc_weak.c:37: allocating variable __malloc_main2_l37 [eva] tests/builtins/alloc_weak.c:40: - Semantic level unrolling superposing up to 100 states + Trace partitioning superposing up to 100 states [eva] tests/builtins/alloc_weak.c:40: - Semantic level unrolling superposing up to 200 states + Trace partitioning superposing up to 200 states [eva] tests/builtins/alloc_weak.c:40: - Semantic level unrolling superposing up to 300 states + Trace partitioning superposing up to 300 states [eva] tests/builtins/alloc_weak.c:40: - Semantic level unrolling superposing up to 400 states + Trace partitioning superposing up to 400 states [eva] tests/builtins/alloc_weak.c:40: - Semantic level unrolling superposing up to 500 states + Trace partitioning superposing up to 500 states [eva] tests/builtins/alloc_weak.c:40: - Semantic level unrolling superposing up to 600 states + Trace partitioning superposing up to 600 states [eva] tests/builtins/alloc_weak.c:40: - Semantic level unrolling superposing up to 700 states + Trace partitioning superposing up to 700 states [eva] tests/builtins/alloc_weak.c:40: - Semantic level unrolling superposing up to 800 states + Trace partitioning superposing up to 800 states [eva] Recording results for main2 [eva] Done for function main2 [eva] computing for function main3 <- main. diff --git a/tests/builtins/oracle/allocated.1.res.oracle b/tests/builtins/oracle/allocated.1.res.oracle index 1d1a14a2671..0a541084637 100644 --- a/tests/builtins/oracle/allocated.1.res.oracle +++ b/tests/builtins/oracle/allocated.1.res.oracle @@ -322,13 +322,13 @@ Call to builtin Frama_C_malloc_fresh for function malloc [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_30 [eva] tests/builtins/allocated.c:84: - Semantic level unrolling superposing up to 100 states + Trace partitioning superposing up to 100 states [eva] tests/builtins/allocated.c:84: - Semantic level unrolling superposing up to 200 states + Trace partitioning superposing up to 200 states [eva] tests/builtins/allocated.c:84: - Semantic level unrolling superposing up to 300 states + Trace partitioning superposing up to 300 states [eva] tests/builtins/allocated.c:84: - Semantic level unrolling superposing up to 400 states + Trace partitioning superposing up to 400 states [eva] tests/builtins/allocated.c:87: Call to builtin free [eva:malloc] tests/builtins/allocated.c:87: strong free on bases: {__malloc_main_l82_30} diff --git a/tests/builtins/oracle/memcpy.res.oracle b/tests/builtins/oracle/memcpy.res.oracle index 6976af91e17..fffd2495d1d 100644 --- a/tests/builtins/oracle/memcpy.res.oracle +++ b/tests/builtins/oracle/memcpy.res.oracle @@ -79,7 +79,7 @@ [eva] computing for function init <- main <- main_all. Called from tests/builtins/memcpy.c:65. [eva] tests/builtins/memcpy.c:20: - Semantic level unrolling superposing up to 100 states + Trace partitioning superposing up to 100 states [eva] Recording results for init [from] Computing for function init [from] Done for function init diff --git a/tests/float/oracle/some.0.res.oracle b/tests/float/oracle/some.0.res.oracle index 919ce1d7a0f..adf1550160e 100644 --- a/tests/float/oracle/some.0.res.oracle +++ b/tests/float/oracle/some.0.res.oracle @@ -6,16 +6,11 @@ t[0] ∈ {1.0000000000000000} [1..54] ∈ {0} y ∈ {1.0000000000000000*2^-1} -[eva] tests/float/some.c:11: - Semantic level unrolling superposing up to 10 states -[eva] tests/float/some.c:11: - Semantic level unrolling superposing up to 20 states -[eva] tests/float/some.c:11: - Semantic level unrolling superposing up to 30 states -[eva] tests/float/some.c:11: - Semantic level unrolling superposing up to 40 states -[eva] tests/float/some.c:11: - Semantic level unrolling superposing up to 50 states +[eva] tests/float/some.c:11: Trace partitioning superposing up to 10 states +[eva] tests/float/some.c:11: Trace partitioning superposing up to 20 states +[eva] tests/float/some.c:11: Trace partitioning superposing up to 30 states +[eva] tests/float/some.c:11: Trace partitioning superposing up to 40 states +[eva] tests/float/some.c:11: Trace partitioning superposing up to 50 states [eva] tests/float/some.c:16: Frama_C_dump_each: # Cvalue domain: diff --git a/tests/libc/oracle/string_c_strchr.res.oracle b/tests/libc/oracle/string_c_strchr.res.oracle index cd933cfd49f..965af4a3862 100644 --- a/tests/libc/oracle/string_c_strchr.res.oracle +++ b/tests/libc/oracle/string_c_strchr.res.oracle @@ -5,9 +5,9 @@ [eva:initial-state] Values of globals at initialization [eva] tests/libc/string_c_strchr.c:57: - Semantic level unrolling superposing up to 100 states + Trace partitioning superposing up to 100 states [eva] tests/libc/string_c_strchr.c:59: - Semantic level unrolling superposing up to 200 states + Trace partitioning superposing up to 200 states [eva] computing for function strchr <- main. Called from tests/libc/string_c_strchr.c:62. [eva] tests/libc/string_c_strchr.c:62: @@ -46,8 +46,7 @@ Called from tests/libc/string_c_strchr.c:67. [eva] tests/libc/string_c_strchr.c:67: function strchr: precondition 'valid_string_s' got status valid. -[eva] share/libc/string.c:229: - Semantic level unrolling superposing up to 100 states +[eva] share/libc/string.c:229: Trace partitioning superposing up to 100 states [eva] Recording results for strchr [eva] Done for function strchr [eva] computing for function strchr <- main. @@ -172,8 +171,7 @@ Called from tests/libc/string_c_strchr.c:87. [eva] tests/libc/string_c_strchr.c:87: function strchr: precondition 'valid_string_s' got status valid. -[eva] share/libc/string.c:229: - Semantic level unrolling superposing up to 200 states +[eva] share/libc/string.c:229: Trace partitioning superposing up to 200 states [eva] Recording results for strchr [eva] Done for function strchr [eva] computing for function strchr <- main. diff --git a/tests/libc/oracle/string_h.res.oracle b/tests/libc/oracle/string_h.res.oracle index 731e3e522c0..66a8414bd90 100644 --- a/tests/libc/oracle/string_h.res.oracle +++ b/tests/libc/oracle/string_h.res.oracle @@ -59,8 +59,7 @@ [eva] Done for function test_strstr [eva] computing for function test_strncat <- main. Called from tests/libc/string_h.c:115. -[eva] tests/libc/string_h.c:34: - Semantic level unrolling superposing up to 100 states +[eva] tests/libc/string_h.c:34: Trace partitioning superposing up to 100 states [eva] computing for function strncat <- test_strncat <- main. Called from tests/libc/string_h.c:36. [eva] using specification for function strncat diff --git a/tests/slicing/oracle/if_many_values.res.oracle b/tests/slicing/oracle/if_many_values.res.oracle index b9a574da2ca..51574c7a555 100644 --- a/tests/slicing/oracle/if_many_values.res.oracle +++ b/tests/slicing/oracle/if_many_values.res.oracle @@ -6,7 +6,7 @@ [eva:initial-state] Values of globals at initialization r ∈ {1} [eva] tests/slicing/if_many_values.i:8: - Semantic level unrolling superposing up to 100 states + Trace partitioning superposing up to 100 states [eva] tests/slicing/if_many_values.i:8: starting to merge loop iterations [eva:alarm] tests/slicing/if_many_values.i:11: Warning: signed overflow. assert r + 1 ≤ 2147483647; diff --git a/tests/value/oracle/local_slevel.res.oracle b/tests/value/oracle/local_slevel.res.oracle index ecb1201e61c..5c81a0b8808 100644 --- a/tests/value/oracle/local_slevel.res.oracle +++ b/tests/value/oracle/local_slevel.res.oracle @@ -89,7 +89,7 @@ [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {48} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {49} [eva] tests/value/local_slevel.i:43: - Semantic level unrolling superposing up to 100 states + Trace partitioning superposing up to 100 states [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {50} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {51} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {52} @@ -141,7 +141,7 @@ [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {98} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {99} [eva] tests/value/local_slevel.i:43: - Semantic level unrolling superposing up to 200 states + Trace partitioning superposing up to 200 states [eva] Recording results for main2 [eva] Done for function main2 [eva] Recording results for main @@ -469,7 +469,7 @@ void main(void) [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {48} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {49} [eva] tests/value/local_slevel.i:43: - Semantic level unrolling superposing up to 100 states + Trace partitioning superposing up to 100 states [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {50} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {51} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {52} @@ -521,7 +521,7 @@ void main(void) [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {98} [eva] tests/value/local_slevel.i:37: Frama_C_show_each: {99} [eva] tests/value/local_slevel.i:43: - Semantic level unrolling superposing up to 200 states + Trace partitioning superposing up to 200 states [eva] Recording results for main2 [eva] Done for function main2 [eva] Recording results for main diff --git a/tests/value/oracle/no_results.res.oracle b/tests/value/oracle/no_results.res.oracle index b1bab125fb0..83759c6e7fe 100644 --- a/tests/value/oracle/no_results.res.oracle +++ b/tests/value/oracle/no_results.res.oracle @@ -7,65 +7,65 @@ [eva] computing for function init <- main. Called from tests/value/no_results.c:19. [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 100 states + Trace partitioning superposing up to 100 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 200 states + Trace partitioning superposing up to 200 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 300 states + Trace partitioning superposing up to 300 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 400 states + Trace partitioning superposing up to 400 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 500 states + Trace partitioning superposing up to 500 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 600 states + Trace partitioning superposing up to 600 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 700 states + Trace partitioning superposing up to 700 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 800 states + Trace partitioning superposing up to 800 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 900 states + Trace partitioning superposing up to 900 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 1000 states + Trace partitioning superposing up to 1000 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 1100 states + Trace partitioning superposing up to 1100 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 1200 states + Trace partitioning superposing up to 1200 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 1300 states + Trace partitioning superposing up to 1300 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 1400 states + Trace partitioning superposing up to 1400 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 1500 states + Trace partitioning superposing up to 1500 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 1600 states + Trace partitioning superposing up to 1600 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 1700 states + Trace partitioning superposing up to 1700 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 1800 states + Trace partitioning superposing up to 1800 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 1900 states + Trace partitioning superposing up to 1900 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 2000 states + Trace partitioning superposing up to 2000 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 2100 states + Trace partitioning superposing up to 2100 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 2200 states + Trace partitioning superposing up to 2200 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 2300 states + Trace partitioning superposing up to 2300 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 2400 states + Trace partitioning superposing up to 2400 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 2500 states + Trace partitioning superposing up to 2500 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 2600 states + Trace partitioning superposing up to 2600 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 2700 states + Trace partitioning superposing up to 2700 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 2800 states + Trace partitioning superposing up to 2800 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 2900 states + Trace partitioning superposing up to 2900 states [eva] tests/value/no_results.c:10: - Semantic level unrolling superposing up to 3000 states + Trace partitioning superposing up to 3000 states [eva] Recording results for init [eva] Done for function init [eva] computing for function f <- main. -- GitLab From 00c7630c5f6f6254e5fb04102e1341648f93c4f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 15 Apr 2019 14:41:45 +0200 Subject: [PATCH 260/376] [Eva] Partition: creates the split_monitor once when building the split action. And not at each application of the split action. --- src/plugins/value/engine/partition.ml | 9 ++++----- src/plugins/value/engine/partition.mli | 14 +++++++++++--- .../value/engine/partitioning_parameters.ml | 6 ++++-- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index bf2a5e2b66c..8c690af3db9 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -174,7 +174,7 @@ type action = | Branch of branch * int | Ration of rationing | Restrict of Cil_types.exp * Integer.t list - | Split of Cil_types.exp * split_kind * int + | Split of Cil_types.exp * split_kind * split_monitor | Merge of Cil_types.exp * split_kind | Update_dynamic_splits @@ -363,8 +363,7 @@ struct with Operation_failed -> [(key,state)] - let split ~limit (kind : split_kind) (exp : Cil_types.exp) (p : t) = - let monitor = new_monitor limit in + let split ~monitor (kind : split_kind) (exp : Cil_types.exp) (p : t) = let add_split acc (key,state) = split_state ~monitor kind exp key state @ acc in @@ -389,8 +388,8 @@ struct List.map (fun (k,x) -> f k x, x) p let transfer_keys p = function - | Split (expr, kind, limit) -> - split ~limit kind expr p + | Split (expr, kind, monitor) -> + split ~monitor kind expr p | Update_dynamic_splits -> update_dynamic_splits p diff --git a/src/plugins/value/engine/partition.mli b/src/plugins/value/engine/partition.mli index 52449a00e20..1a48bf6e154 100644 --- a/src/plugins/value/engine/partition.mli +++ b/src/plugins/value/engine/partition.mli @@ -90,6 +90,12 @@ type unroll_limit = states are then split or merged accordingly. *) type split_kind = Static | Dynamic +(** Split monitor: prevents splits from generating too many states. *) +type split_monitor + +(** Creates a new monitor that allows to split up to [split_limit] states. *) +val new_monitor: split_limit:int -> split_monitor + (** These actions redefine the partitioning by updating keys or spliting states. They are applied to all the pair (key, state) in a flow. *) type action = @@ -127,12 +133,14 @@ type action = - all other states are joined together. Previous rationing is erased and replaced by this new stamping. Implementation of the option -eva-split-return. *) - | Split of Cil_types.exp * split_kind * int - (** [Split (exp, kind, max)] tries to separate states such as the [exp] + | Split of Cil_types.exp * split_kind * split_monitor + (** [Split (exp, kind, monitor)] tries to separate states such as the [exp] evaluates to a singleton value in each state in the flow. If necessary and possible, splits states into multiple states. States in which the [exp] evaluates to different values will be kept separate. Gives up the split - if [exp] evaluates to more than [max] values. *) + if [exp] evaluates to more than [limit] values, [limit] being the split + limit of the [monitor]. A same monitor can be used for successive splits + on different flows. *) | Merge of Cil_types.exp * split_kind (** Forgets the split of an expression: states that were kept separate only by the split of this expression will be joined together. *) diff --git a/src/plugins/value/engine/partitioning_parameters.ml b/src/plugins/value/engine/partitioning_parameters.ml index 100803fa8c3..b480f4e425d 100644 --- a/src/plugins/value/engine/partitioning_parameters.ml +++ b/src/plugins/value/engine/partitioning_parameters.ml @@ -109,7 +109,8 @@ struct let add name l = try let vi = Globals.Vars.find_from_astinfo name VGlobal in - Partition.Split (Cil.evar vi, Partition.Dynamic, split_limit) :: l + let monitor = Partition.new_monitor ~split_limit in + Partition.Split (Cil.evar vi, Partition.Dynamic, monitor) :: l with Not_found -> warn ~current:false "cannot find the global variable %s for value \ partitioning" name; @@ -121,9 +122,10 @@ struct let kind = Partition.Static in let map_annot acc t = try + let monitor = Partition.new_monitor ~split_limit in let action = match t with - | FlowSplit t -> Partition.Split (term_to_exp t, kind, split_limit) + | FlowSplit t -> Partition.Split (term_to_exp t, kind, monitor) | FlowMerge t -> Partition.Merge (term_to_exp t, kind) in action :: acc -- GitLab From bfd7425d993ad711e9fc86460cdfa239379ef5a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 15 Apr 2019 14:58:08 +0200 Subject: [PATCH 261/376] [Eva] Restores the feedback when a loop is not completely unrolled. --- src/plugins/value/engine/partition.ml | 7 ++++++- tests/value/oracle/partitioning-annots.0.res.oracle | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/plugins/value/engine/partition.ml b/src/plugins/value/engine/partition.ml index 8c690af3db9..fcf0088095c 100644 --- a/src/plugins/value/engine/partition.ml +++ b/src/plugins/value/engine/partition.ml @@ -418,8 +418,13 @@ struct begin match k.loops with | [] -> raise InvalidAction | (h, limit) :: tl -> - if h >= limit then + if h >= limit then begin + if limit > 0 then + Value_parameters.warning ~once:true ~current:true + ~wkey:Value_parameters.wkey_loop_unroll + "loop not completely unrolled"; k + end else { k with loops = (h + 1, limit) :: tl } end diff --git a/tests/value/oracle/partitioning-annots.0.res.oracle b/tests/value/oracle/partitioning-annots.0.res.oracle index a94f8e71bdc..49addb21756 100644 --- a/tests/value/oracle/partitioning-annots.0.res.oracle +++ b/tests/value/oracle/partitioning-annots.0.res.oracle @@ -4,9 +4,15 @@ [eva] Initial state computed [eva:initial-state] Values of globals at initialization k ∈ {0} +[eva:loop-unroll] tests/value/partitioning-annots.c:26: + loop not completely unrolled [eva] tests/value/partitioning-annots.c:26: starting to merge loop iterations +[eva:loop-unroll] tests/value/partitioning-annots.c:34: + loop not completely unrolled [eva] tests/value/partitioning-annots.c:34: starting to merge loop iterations [eva] tests/value/partitioning-annots.c:36: starting to merge loop iterations +[eva:loop-unroll] tests/value/partitioning-annots.c:50: + loop not completely unrolled [eva] tests/value/partitioning-annots.c:50: starting to merge loop iterations [eva] Recording results for test_unroll [eva] done for function test_unroll -- GitLab From ed91c31c73e465d987bbd56e2f4202ff2d763eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 15 Apr 2019 15:05:15 +0200 Subject: [PATCH 262/376] [Eva] Removes unused oracle. --- tests/misc/oracle/unroll_annots.res.oracle | 32 ---------------------- 1 file changed, 32 deletions(-) delete mode 100644 tests/misc/oracle/unroll_annots.res.oracle diff --git a/tests/misc/oracle/unroll_annots.res.oracle b/tests/misc/oracle/unroll_annots.res.oracle deleted file mode 100644 index 0e37020e665..00000000000 --- a/tests/misc/oracle/unroll_annots.res.oracle +++ /dev/null @@ -1,32 +0,0 @@ -[kernel] Parsing tests/misc/unroll_annots.c (with preprocessing) -[eva] Analyzing a complete application starting at main -[eva] Computing initial state -[eva] Initial state computed -[eva:initial-state] Values of globals at initialization - a[0..9] ∈ {0} - b[0..9] ∈ {0} -[eva:loop-unroll] tests/misc/unroll_annots.c:8: loop not completely unrolled -[eva] tests/misc/unroll_annots.c:8: starting to merge loop iterations -[eva:loop-unroll] tests/misc/unroll_annots.c:14: loop not completely unrolled -[eva] tests/misc/unroll_annots.c:14: starting to merge loop iterations -[eva] tests/misc/unroll_annots.c:16: starting to merge loop iterations -[eva] Recording results for main -[eva] done for function main -[eva] ====== VALUES COMPUTED ====== -[eva:final-states] Values at end of function main: - a[0..9] ∈ {42} - b[0..9] ∈ {42} - __retres ∈ {0} -[from] Computing for function main -[from] Done for function main -[from] ====== DEPENDENCIES COMPUTED ====== - These dependencies hold at termination for the executions that terminate: -[from] Function main: - a[0..9] FROM \nothing (and SELF) - b[0..9] FROM \nothing (and SELF) - \result FROM \nothing -[from] ====== END OF DEPENDENCIES ====== -[inout] Out (internal) for function main: - a[0..9]; b[0..9]; i; j; i_0; j_0; __retres -[inout] Inputs for function main: - \nothing -- GitLab From 546ed1d8897a75ff7481c134a24c04f93bb6b136 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Mon, 15 Apr 2019 16:48:34 +0200 Subject: [PATCH 263/376] [OPAM] allows the use of the package alt-ergo-free as an alternative to alt-ergo --- opam/opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opam/opam b/opam/opam index 3b5bfd175e4..d8f0366beb9 100644 --- a/opam/opam +++ b/opam/opam @@ -92,7 +92,7 @@ depends: [ ( ( "lablgtk" { >= "2.18.2" } & "conf-gnomecanvas" ) | ( "lablgtk3" { >= "3.0.beta4" } & "lablgtk3-sourceview3")) "conf-gtksourceview" - "alt-ergo" + ( "alt-ergo-free" | "alt-ergo" ) "conf-graphviz" { post } ] -- GitLab From efcc3964395f8157aaef47725e247ce926934831 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Mon, 15 Apr 2019 16:44:47 +0200 Subject: [PATCH 264/376] [configure] fix landmarks and document it --- configure.in | 2 +- doc/developer/changes.tex | 1 + doc/developer/refman.tex | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index e5bd40a6513..cf7e595c785 100644 --- a/configure.in +++ b/configure.in @@ -400,7 +400,7 @@ if test "$ENABLE_LANDMARKS" = yes ; then AC_MSG_CHECKING(for Landmarks) LANDMARKS_PATH=$($OCAMLFIND query landmarks 2>/dev/null | tr -d '\r\n') LANDMARKS_PPX_PATH=$($OCAMLFIND query landmarks.ppx 2>/dev/null | tr -d '\r\n') - if test -f "$LANDMARKS_PATH/landmarks.$DYN_SUFFIX" -a -f "$LANDMARKS_PPX_PATH/ppx_landmarks"; then + if test -f "$LANDMARKS_PATH/landmark.$DYN_SUFFIX" -a -f "$LANDMARKS_PPX_PATH/ppx_landmarks.$DYN_SUFFIX"; then HAS_LANDMARKS="yes"; AC_MSG_RESULT(found) else diff --git a/doc/developer/changes.tex b/doc/developer/changes.tex index 41a4ee2c9fc..7e8eb0d889f 100644 --- a/doc/developer/changes.tex +++ b/doc/developer/changes.tex @@ -9,6 +9,7 @@ This chapter summarizes the major changes in this documentation between each \begin{itemize} \item \textbf{ACSL Extension}: Document new \texttt{status} flag for registration functions \item \textbf{Testing}: Document of usage \texttt{@@} in a directive +\item \textbf{Profiling with Landmarks}: New section \end{itemize} \section*{18.0 Argon} diff --git a/doc/developer/refman.tex b/doc/developer/refman.tex index 6eaa39440e1..2b6313b3054 100644 --- a/doc/developer/refman.tex +++ b/doc/developer/refman.tex @@ -868,6 +868,44 @@ one for regular tests (if more than one \verb|OPT|).\\ \caption{Predefined macros for ptests}\label{fig:ptests-macros} \end{figure} +\section{Profiling with Landmarks} \label{refman:landmarks}\codeidxdef{Landmarks} + +{\em Landmarks}\footnote{\url{https://github.com/LexiFi/landmarks}} is a +library for ``quick and dirty'' profiling of OCaml programs. It allows the +insertion of annotations in the code to enable profiling of specific parts of +it, but also an automatic mode, in which every function call is instrumented. +The Frama-C \texttt{configure} file is setup to enable usage of this library +when it is available (the usual way to install it is via the \texttt{landmarks} +opam package). + +For quick usage of the library: +\begin{itemize} +\item ensure that the \texttt{configure} script detected it + (there should be a line \texttt{checking for Landmarks... found}); +\item enable instrumentation {\em when compiling Frama-C's files}, that is, + when running \texttt{make}, by setting the environment variable + \verb+OCAML_LANDMARKS+. For instance, to enable automatic instrumentation + of every Frama-C function (note: this increases compilation time of Frama-C), + run: + +\begin{lstlisting} + OCAML_LANDMARKS=auto make +\end{lstlisting} + +\item enable instrumentation {\em during execution} of Frama-C, again using + \verb+OCAML_LANDMARKS+. Note that the \texttt{auto} parameter here is + implicit if you enabled it on the previous step. + For instance, run: + + \begin{lstlisting} + OCAML_LANDMARKS= bin/frama-c [files] [options] + \end{lstlisting} +\end{itemize} + +Commonly used options include \verb+output=landmarks.log+ to output the result +to a file instead of \texttt{stderr}. +Check \url{https://github.com/LexiFi/landmarks} for its documentation. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Local Variables: %%% TeX-master: "developer.tex" -- GitLab From 55e9427a2986b40d19bbd511d06545e86b196894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 16 Apr 2019 14:51:12 +0200 Subject: [PATCH 265/376] [Eva] Trace_partitioning: removes already propagated states only at statements. Restores a previous optimization. This is a useful optimization, as the inclusion tests between incoming states and already propagated states are very costly. --- src/plugins/value/engine/trace_partitioning.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index 2a63927373b..063afad6c95 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -288,8 +288,10 @@ struct dest.store_partition <- Partition.replace key s dest.store_partition; in Extlib.may add state; - (* Filter out already propagated states *) - Extlib.opt_filter (fun s -> Index.add s dest.store_index) state + (* Filter out already propagated states (only at statements). *) + if dest.store_stmt = None + then state + else Extlib.opt_filter (fun s -> Index.add s dest.store_index) state in let flow = Flow.join_duplicate_keys flow_states in let flow = Flow.filter_map update flow in -- GitLab From c38c133bdfdf8f417a20cb1c3558be093b693baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Wed, 17 Apr 2019 17:02:53 +0200 Subject: [PATCH 266/376] [Eva] Implements logic_assign in the bitwise domain. --- src/plugins/value/domains/offsm_domain.ml | 11 +- tests/builtins/diff_bitwise | 339 +++++++++++++++++++--- 2 files changed, 304 insertions(+), 46 deletions(-) diff --git a/src/plugins/value/domains/offsm_domain.ml b/src/plugins/value/domains/offsm_domain.ml index 9eb0b4ef308..8ab4ee60ca7 100644 --- a/src/plugins/value/domains/offsm_domain.ml +++ b/src/plugins/value/domains/offsm_domain.ml @@ -118,6 +118,9 @@ module Internal : Domain_builder.InputDomain type origin = unit (* ???? *) + let kill loc state = + Memory.add_binding ~exact:true state loc V_Or_Uninitialized.top + module Transfer (Valuation: Abstract_domain.Valuation with type value = value and type origin = origin @@ -131,9 +134,6 @@ module Internal : Domain_builder.InputDomain let update _valuation st = `Value st (* TODO? *) - let kill loc state = - Memory.add_binding ~exact:true state loc V_Or_Uninitialized.top - let store loc state v = let state' = match v with @@ -230,7 +230,10 @@ module Internal : Domain_builder.InputDomain let initialize_variable _ _ ~initialized:_ _ state = state (* Logic *) - let logic_assign _assign _location ~pre:_ _state = top + let logic_assign _assign location ~pre:_ state = + let loc = Precise_locs.imprecise_location location in + kill loc state + let evaluate_predicate _ _ _ = Alarmset.Unknown let reduce_by_predicate _ state _ _ = `Value state diff --git a/tests/builtins/diff_bitwise b/tests/builtins/diff_bitwise index 0017418c9fb..b20a057439a 100644 --- a/tests/builtins/diff_bitwise +++ b/tests/builtins/diff_bitwise @@ -1,49 +1,304 @@ diff tests/builtins/oracle/Longinit_sequencer.res.oracle tests/builtins/oracle_bitwise/Longinit_sequencer.res.oracle -153,154c153,188 -< [eva] tests/builtins/long_init.c:93: Reusing old results for call to analyze -< [eva] tests/builtins/long_init.c:94: Reusing old results for call to analyze ---- -> [eva] computing for function analyze <- main. -> Called from tests/builtins/long_init.c:93. -> [eva] computing for function subanalyze <- analyze <- main. -> Called from tests/builtins/long_init.c:29. -> [eva] Recording results for subanalyze -> [eva] Done for function subanalyze -> [eva] computing for function subanalyze <- analyze <- main. -> Called from tests/builtins/long_init.c:29. -> [eva] Recording results for subanalyze -> [eva] Done for function subanalyze -> [eva] computing for function subanalyze <- analyze <- main. -> Called from tests/builtins/long_init.c:29. -> [eva] Recording results for subanalyze -> [eva] Done for function subanalyze -> [eva] computing for function subanalyze <- analyze <- main. -> Called from tests/builtins/long_init.c:29. -> [eva] Recording results for subanalyze -> [eva] Done for function subanalyze -> [eva] computing for function subanalyze <- analyze <- main. -> Called from tests/builtins/long_init.c:29. -> [eva] Recording results for subanalyze -> [eva] Done for function subanalyze -> [eva] Recording results for analyze -> [eva] Done for function analyze -> [eva] computing for function analyze <- main. -> Called from tests/builtins/long_init.c:94. -> [eva] tests/builtins/long_init.c:29: Reusing old results for call to subanalyze -> [eva] tests/builtins/long_init.c:29: Reusing old results for call to subanalyze -> [eva] tests/builtins/long_init.c:29: Reusing old results for call to subanalyze -> [eva] tests/builtins/long_init.c:29: Reusing old results for call to subanalyze -> [eva] computing for function subanalyze <- analyze <- main. -> Called from tests/builtins/long_init.c:29. -> [eva] Recording results for subanalyze -> [eva] Done for function subanalyze -> [eva] Recording results for analyze -> [eva] Done for function analyze -327c361 +327c327 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_bitwise/Longinit_sequencer.sav -568c602 +568c568 < tests/builtins/result/Longinit_sequencer.sav --- > tests/builtins/result_bitwise/Longinit_sequencer.sav +diff tests/builtins/oracle/allocated.0.res.oracle tests/builtins/oracle_bitwise/allocated.0.res.oracle +260a261,263 +> [eva] tests/builtins/allocated.c:127: Call to builtin __fc_vla_alloc +> [eva:malloc] tests/builtins/allocated.c:127: +> resizing variable `__malloc_main_l127' (0..31/319) to fit 0..63/319 +diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_bitwise/allocated.1.res.oracle +191a192,197 +> [eva] tests/builtins/allocated.c:82: +> Call to builtin Frama_C_malloc_fresh for function malloc +> [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_7 +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_7} +208a215,217 +> strong free on bases: {__malloc_main_l82_7} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +223a233,235 +> strong free on bases: {__malloc_main_l82_7} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +238a251,253 +> strong free on bases: {__malloc_main_l82_7} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +254,256d268 +< [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_7 +< [eva] tests/builtins/allocated.c:82: +< Call to builtin Frama_C_malloc_fresh for function malloc +323a336,356 +> [eva] tests/builtins/allocated.c:82: +> Call to builtin Frama_C_malloc_fresh for function malloc +> [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_31 +> [eva] tests/builtins/allocated.c:82: +> Call to builtin Frama_C_malloc_fresh for function malloc +> [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_32 +> [eva] tests/builtins/allocated.c:82: +> Call to builtin Frama_C_malloc_fresh for function malloc +> [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_33 +> [eva] tests/builtins/allocated.c:82: +> Call to builtin Frama_C_malloc_fresh for function malloc +> [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_34 +> [eva] tests/builtins/allocated.c:82: +> Call to builtin Frama_C_malloc_fresh for function malloc +> [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_35 +> [eva] tests/builtins/allocated.c:82: +> Call to builtin Frama_C_malloc_fresh for function malloc +> [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_36 +> [eva] tests/builtins/allocated.c:82: +> Call to builtin Frama_C_malloc_fresh for function malloc +> [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_37 +326d358 +< [eva] Semantic level unrolling superposing up to 300 states +329a362,382 +> strong free on bases: {__malloc_main_l82_37} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_36} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_35} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_34} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_33} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_32} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_31} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +399c452,470 +< strong free on bases: {__malloc_main_l82_7} +--- +> strong free on bases: {__malloc_main_l82_37} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_36} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_35} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_34} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_33} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_32} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_31} +471c542,560 +< strong free on bases: {__malloc_main_l82_7} +--- +> strong free on bases: {__malloc_main_l82_37} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_36} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_35} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_34} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_33} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_32} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_31} +543c632,650 +< strong free on bases: {__malloc_main_l82_7} +--- +> strong free on bases: {__malloc_main_l82_37} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_36} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_35} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_34} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_33} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_32} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_31} +615c722,740 +< strong free on bases: {__malloc_main_l82_7} +--- +> strong free on bases: {__malloc_main_l82_37} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_36} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_35} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_34} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_33} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_32} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_31} +687c812,830 +< strong free on bases: {__malloc_main_l82_7} +--- +> strong free on bases: {__malloc_main_l82_37} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_36} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_35} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_34} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_33} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_32} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_31} +759c902,920 +< strong free on bases: {__malloc_main_l82_7} +--- +> strong free on bases: {__malloc_main_l82_37} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_36} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_35} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_34} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_33} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_32} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_31} +831c992,1010 +< strong free on bases: {__malloc_main_l82_7} +--- +> strong free on bases: {__malloc_main_l82_37} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_36} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_35} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_34} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_33} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_32} +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_31} +901,903c1080 +< [eva] tests/builtins/allocated.c:87: Call to builtin free +< [eva:malloc] tests/builtins/allocated.c:87: +< strong free on bases: {__malloc_main_l82_7} +--- +> [eva] Semantic level unrolling superposing up to 500 states +1065,1067c1242,1243 +< __malloc_main_l82_7[0] ∈ {21} or UNINITIALIZED +< [1] ∈ {24} or UNINITIALIZED +< [2] ∈ {27} or UNINITIALIZED +--- +> __malloc_main_l82_7[0] ∈ {14} or UNINITIALIZED +> [1] ∈ {17} or UNINITIALIZED +1136a1313,1333 +> __malloc_main_l82_31[0] ∈ {21} or UNINITIALIZED +> [1] ∈ {24} or UNINITIALIZED +> [2] ∈ {27} or UNINITIALIZED +> __malloc_main_l82_32[0] ∈ {21} or UNINITIALIZED +> [1] ∈ {24} or UNINITIALIZED +> [2] ∈ {27} or UNINITIALIZED +> __malloc_main_l82_33[0] ∈ {21} or UNINITIALIZED +> [1] ∈ {24} or UNINITIALIZED +> [2] ∈ {27} or UNINITIALIZED +> __malloc_main_l82_34[0] ∈ {21} or UNINITIALIZED +> [1] ∈ {24} or UNINITIALIZED +> [2] ∈ {27} or UNINITIALIZED +> __malloc_main_l82_35[0] ∈ {21} or UNINITIALIZED +> [1] ∈ {24} or UNINITIALIZED +> [2] ∈ {27} or UNINITIALIZED +> __malloc_main_l82_36[0] ∈ {21} or UNINITIALIZED +> [1] ∈ {24} or UNINITIALIZED +> [2] ∈ {27} or UNINITIALIZED +> __malloc_main_l82_37[0] ∈ {21} or UNINITIALIZED +> [1] ∈ {24} or UNINITIALIZED +> [2] ∈ {27} or UNINITIALIZED +1180c1377 +< __malloc_main_l82_7[0..2] FROM __fc_heap_status; nondet (and SELF) +--- +> __malloc_main_l82_7[0..1] FROM __fc_heap_status; nondet (and SELF) +1203a1401,1407 +> __malloc_main_l82_31[0..2] FROM __fc_heap_status; nondet (and SELF) +> __malloc_main_l82_32[0..2] FROM __fc_heap_status; nondet (and SELF) +> __malloc_main_l82_33[0..2] FROM __fc_heap_status; nondet (and SELF) +> __malloc_main_l82_34[0..2] FROM __fc_heap_status; nondet (and SELF) +> __malloc_main_l82_35[0..2] FROM __fc_heap_status; nondet (and SELF) +> __malloc_main_l82_36[0..2] FROM __fc_heap_status; nondet (and SELF) +> __malloc_main_l82_37[0..2] FROM __fc_heap_status; nondet (and SELF) +1227c1431 +< __malloc_main_l82_6[0..1]; __malloc_main_l82_7[0..2]; +--- +> __malloc_main_l82_6[0..1]; __malloc_main_l82_7[0..1]; +1239,1240c1443,1448 +< __malloc_main_l82_30[0..2]; __malloc_main_l97[0]; __malloc_main_l114[0..3]; +< __malloc_main_l127; __malloc_main_l127_0[0..1]; __malloc_main_l127_1[0..2]; +--- +> __malloc_main_l82_30[0..2]; __malloc_main_l82_31[0..2]; +> __malloc_main_l82_32[0..2]; __malloc_main_l82_33[0..2]; +> __malloc_main_l82_34[0..2]; __malloc_main_l82_35[0..2]; +> __malloc_main_l82_36[0..2]; __malloc_main_l82_37[0..2]; +> __malloc_main_l97[0]; __malloc_main_l114[0..3]; __malloc_main_l127; +> __malloc_main_l127_0[0..1]; __malloc_main_l127_1[0..2]; +diff tests/builtins/oracle/malloc-optimistic.res.oracle tests/builtins/oracle_bitwise/malloc-optimistic.res.oracle +1945a1946,1948 +> [eva] tests/builtins/malloc-optimistic.c:90: Call to builtin malloc +> [eva:malloc] tests/builtins/malloc-optimistic.c:90: +> resizing variable `__malloc_main7_l90' (0..31/3231) to fit 0..511/3231 -- GitLab From b59290770e0ed41c12a03bd0655365d5c58acf82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Wed, 17 Apr 2019 13:31:30 +0200 Subject: [PATCH 267/376] [Eva] The bitwise offsm_value returns `Bottom when reducing the cvalue to bottom. Fixes a crash in cvalue_forward, where values are assumed to be non bottom. --- src/plugins/value/values/offsm_value.ml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/plugins/value/values/offsm_value.ml b/src/plugins/value/values/offsm_value.ml index db062fd131d..a447493695d 100644 --- a/src/plugins/value/values/offsm_value.ml +++ b/src/plugins/value/values/offsm_value.ml @@ -499,22 +499,23 @@ module CvalueOffsm : Abstract_value.Internal with type t = V.t * offsm_or_top else p (* Refine the value component according to the contents of the offsetmap *) - let strengthen_v typ (v, o as p : t) : t = + let strengthen_v typ (v, o as p : t) : t or_bottom = match o with - | Top -> p + | Top -> `Value p | O o' -> let size = size typ in (* TODO: this should be done by the transfer function itself... *) let v = Cvalue_forward.reinterpret typ v in let v_o = V_Or_Uninitialized.get_v (basic_find ~size o') in let v_o = Cvalue_forward.reinterpret typ v_o in - (V.narrow v v_o, o) + let v = V.narrow v v_o in + if V.is_bottom v then `Bottom else `Value (v, o) let forward_unop typ op p = match op with | BNot -> let p' = strengthen_offsm typ p in - forward_unop typ op p' >>-: fun p'' -> + forward_unop typ op p' >>- fun p'' -> strengthen_v typ p'' | _ -> forward_unop typ op p @@ -523,7 +524,7 @@ module CvalueOffsm : Abstract_value.Internal with type t = V.t * offsm_or_top | BAnd | BOr | BXor -> let l = strengthen_offsm typ l in let r = strengthen_offsm typ r in - forward_binop typ op l r >>-: fun p -> + forward_binop typ op l r >>- fun p -> strengthen_v typ p | Shiftlt | Shiftrt -> let (v_r, _) = r in -- GitLab From c23684abfcf531b32d2dbeb7f6aa34e871c90c5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Wed, 17 Apr 2019 17:03:10 +0200 Subject: [PATCH 268/376] [Eva] Adds a test of the bitwise domain. --- tests/value/bitwise.i | 12 +++++++++ tests/value/diff_bitwise | 8 ++++++ tests/value/oracle/bitwise.res.oracle | 35 +++++++++++++++++++-------- 3 files changed, 45 insertions(+), 10 deletions(-) diff --git a/tests/value/bitwise.i b/tests/value/bitwise.i index 7803ea7f36d..10db311b22c 100644 --- a/tests/value/bitwise.i +++ b/tests/value/bitwise.i @@ -134,6 +134,17 @@ void bug4() { } } +/* See issue #639 and merge request #2230 on the bitwise domain. */ +void bug5() { + int x = v; + x = x | 2; + if (x == 8) { + x = x & 2; /* This branch is dead, but the bitwise domain leads to bottom + only after the operation x&2 and not before. */ + Frama_C_show_each_dead(x); + } +} + void main(void) { test1(); test2(); @@ -145,4 +156,5 @@ void main(void) { bug2(); bug3(); bug4(); + bug5(); } diff --git a/tests/value/diff_bitwise b/tests/value/diff_bitwise index be860471315..fbafb12ebb8 100644 --- a/tests/value/diff_bitwise +++ b/tests/value/diff_bitwise @@ -23,6 +23,14 @@ diff tests/value/oracle/addition.res.oracle tests/value/oracle_bitwise/addition. < (origin: Arithmetic {tests/value/addition.i:52}) }} --- > p10 ∈ {{ garbled mix of &{p1} }} +diff tests/value/oracle/bitwise.res.oracle tests/value/oracle_bitwise/bitwise.res.oracle +79c79,82 +< [eva] tests/value/bitwise.i:144: Frama_C_show_each_dead: {0} +--- +> [eva] tests/value/bitwise.i:142: +> The evaluation of the expression x & 2 +> led to bottom without alarms: +> at this point the product of states has no possible concretization. diff tests/value/oracle/bitwise_pointer.res.oracle tests/value/oracle_bitwise/bitwise_pointer.res.oracle 32,34c32 < [eva] tests/value/bitwise_pointer.i:18: diff --git a/tests/value/oracle/bitwise.res.oracle b/tests/value/oracle/bitwise.res.oracle index 29d9bbe2322..3ec23cec4bf 100644 --- a/tests/value/oracle/bitwise.res.oracle +++ b/tests/value/oracle/bitwise.res.oracle @@ -7,7 +7,7 @@ input[0..2] ∈ [--..--] s ∈ [--..--] [eva] computing for function test1 <- main. - Called from tests/value/bitwise.i:138. + Called from tests/value/bitwise.i:149. [eva] computing for function Frama_C_interval <- test1 <- main. Called from tests/value/bitwise.i:23. [eva] using specification for function Frama_C_interval @@ -21,18 +21,18 @@ [eva] Recording results for test1 [eva] Done for function test1 [eva] computing for function test2 <- main. - Called from tests/value/bitwise.i:139. + Called from tests/value/bitwise.i:150. [eva] computing for function Frama_C_interval <- test2 <- main. Called from tests/value/bitwise.i:50. [eva] Done for function Frama_C_interval [eva] Recording results for test2 [eva] Done for function test2 [eva] computing for function test3 <- main. - Called from tests/value/bitwise.i:140. + Called from tests/value/bitwise.i:151. [eva] Recording results for test3 [eva] Done for function test3 [eva] computing for function test4 <- main. - Called from tests/value/bitwise.i:141. + Called from tests/value/bitwise.i:152. [eva] tests/value/bitwise.i:62: assertion got status valid. [eva] tests/value/bitwise.i:64: Frama_C_show_each_1: [0..0x7FFFFFFF], {0} [eva] tests/value/bitwise.i:64: @@ -45,35 +45,40 @@ [eva] Recording results for test4 [eva] Done for function test4 [eva] computing for function and_or_rel <- main. - Called from tests/value/bitwise.i:142. + Called from tests/value/bitwise.i:153. [eva:alarm] tests/value/bitwise.i:87: Warning: assertion got status unknown. [eva] Recording results for and_or_rel [eva] Done for function and_or_rel [eva] computing for function double_neg <- main. - Called from tests/value/bitwise.i:143. + Called from tests/value/bitwise.i:154. [eva] Recording results for double_neg [eva] Done for function double_neg [eva] computing for function bug1 <- main. - Called from tests/value/bitwise.i:144. + Called from tests/value/bitwise.i:155. [eva] Recording results for bug1 [eva] Done for function bug1 [eva] computing for function bug2 <- main. - Called from tests/value/bitwise.i:145. + Called from tests/value/bitwise.i:156. [eva] tests/value/bitwise.i:114: Frama_C_show_each_then: [eva] tests/value/bitwise.i:114: Frama_C_show_each_else: [eva] Recording results for bug2 [eva] Done for function bug2 [eva] computing for function bug3 <- main. - Called from tests/value/bitwise.i:146. + Called from tests/value/bitwise.i:157. [eva] tests/value/bitwise.i:121: Frama_C_show_each: {0x41F656F}, {0xFBE09A91} [eva] Recording results for bug3 [eva] Done for function bug3 [eva] computing for function bug4 <- main. - Called from tests/value/bitwise.i:147. + Called from tests/value/bitwise.i:158. [eva] tests/value/bitwise.i:131: Frama_C_show_each_then: [eva] tests/value/bitwise.i:133: Frama_C_show_each_else: [eva] Recording results for bug4 [eva] Done for function bug4 +[eva] computing for function bug5 <- main. + Called from tests/value/bitwise.i:159. +[eva] tests/value/bitwise.i:144: Frama_C_show_each_dead: {0} +[eva] Recording results for bug5 +[eva] Done for function bug5 [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== @@ -96,6 +101,8 @@ [eva:final-states] Values at end of function bug4: g_2 ∈ {-1; 0} tmp_0 ∈ {-0x1578} +[eva:final-states] Values at end of function bug5: + x ∈ [-0x7FFFFFFE..0x7FFFFFFF] [eva:final-states] Values at end of function double_neg: i ∈ {5} j ∈ {0xFFFFFFFA} @@ -141,6 +148,8 @@ [from] Done for function bug3 [from] Computing for function bug4 [from] Done for function bug4 +[from] Computing for function bug5 +[from] Done for function bug5 [from] Computing for function double_neg [from] Done for function double_neg [from] Computing for function test1 @@ -169,6 +178,8 @@ NO EFFECTS [from] Function bug4: NO EFFECTS +[from] Function bug5: + NO EFFECTS [from] Function double_neg: NO EFFECTS [from] Function test1: @@ -202,6 +213,10 @@ g_2; tmp; tmp_0 [inout] Inputs for function bug4: v +[inout] Out (internal) for function bug5: + x +[inout] Inputs for function bug5: + v [inout] Out (internal) for function double_neg: i; j; k [inout] Inputs for function double_neg: -- GitLab From eef7ed476d6d6b2366353af198cb48c9063a37ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 18 Apr 2019 11:30:37 +0200 Subject: [PATCH 269/376] [Eva] Implements inject_int for the interval value used for the Apron domains. Fixes a bug when splitting on a value, as we compare the result of an evaluation with the value given by inject_int. --- src/plugins/value/values/main_values.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/value/values/main_values.ml b/src/plugins/value/values/main_values.ml index 155133c9fc9..f5bec06d977 100644 --- a/src/plugins/value/values/main_values.ml +++ b/src/plugins/value/values/main_values.ml @@ -164,7 +164,7 @@ module Interval = struct let zero = None let one = None let top_int = None - let inject_int _typ _i = None + let inject_int _typ i = Some (Ival.inject_singleton i) let assume_non_zero v = `Unknown v let assume_bounded _ _ v = `Unknown v -- GitLab From aefb889a9611e8dfe114da5cdab7344e83a545d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 18 Apr 2019 10:45:23 +0200 Subject: [PATCH 270/376] [Eva] Updates alternative test oracles. --- tests/builtins/diff_equalities | 59 ++++++++++--------- tests/builtins/diff_gauges | 4 +- tests/builtins/diff_symblocs | 2 +- tests/value/diff_apron | 47 ++++++++------- tests/value/diff_equalities | 80 ++++++++++++------------- tests/value/diff_gauges | 104 ++++++++++++++++----------------- tests/value/diff_symblocs | 80 ------------------------- 7 files changed, 153 insertions(+), 223 deletions(-) diff --git a/tests/builtins/diff_equalities b/tests/builtins/diff_equalities index bb058d3aba7..653e7459b35 100644 --- a/tests/builtins/diff_equalities +++ b/tests/builtins/diff_equalities @@ -11,34 +11,35 @@ diff tests/builtins/oracle/alloc_weak.res.oracle tests/builtins/oracle_equalitie 36,37d35 < [eva:alarm] tests/builtins/alloc_weak.c:30: Warning: < accessing uninitialized left-value. assert \initialized(p); -900c898 +908c906 < r ∈ [--..--] --- > r ∈ {42} diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_equalities/allocated.1.res.oracle -191a192,197 +191a192,194 > [eva] tests/builtins/allocated.c:82: > Call to builtin Frama_C_malloc_fresh for function malloc > [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_7 -> [eva] tests/builtins/allocated.c:87: Call to builtin free -> [eva:malloc] tests/builtins/allocated.c:87: -> strong free on bases: {__malloc_main_l82_7} -208a215,217 +208a212,214 > strong free on bases: {__malloc_main_l82_7} > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: -223a233,235 +223a230,232 > strong free on bases: {__malloc_main_l82_7} > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: -238a251,253 +238a248,250 > strong free on bases: {__malloc_main_l82_7} > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: -254,256d268 -< [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_7 +252,254c264,266 < [eva] tests/builtins/allocated.c:82: < Call to builtin Frama_C_malloc_fresh for function malloc +< [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_7 +--- +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_7} 323a336,356 > [eva] tests/builtins/allocated.c:82: > Call to builtin Frama_C_malloc_fresh for function malloc @@ -61,9 +62,10 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_equaliti > [eva] tests/builtins/allocated.c:82: > Call to builtin Frama_C_malloc_fresh for function malloc > [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_37 -326d358 -< [eva] Semantic level unrolling superposing up to 300 states -329a362,382 +329,330d361 +< Trace partitioning superposing up to 300 states +< [eva] tests/builtins/allocated.c:84: +333a365,385 > strong free on bases: {__malloc_main_l82_37} > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: @@ -85,7 +87,7 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_equaliti > strong free on bases: {__malloc_main_l82_31} > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: -399c452,470 +403c455,473 < strong free on bases: {__malloc_main_l82_7} --- > strong free on bases: {__malloc_main_l82_37} @@ -107,7 +109,7 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_equaliti > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: > strong free on bases: {__malloc_main_l82_31} -471c542,560 +475c545,563 < strong free on bases: {__malloc_main_l82_7} --- > strong free on bases: {__malloc_main_l82_37} @@ -129,7 +131,7 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_equaliti > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: > strong free on bases: {__malloc_main_l82_31} -543c632,650 +547c635,653 < strong free on bases: {__malloc_main_l82_7} --- > strong free on bases: {__malloc_main_l82_37} @@ -151,7 +153,7 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_equaliti > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: > strong free on bases: {__malloc_main_l82_31} -615c722,740 +619c725,743 < strong free on bases: {__malloc_main_l82_7} --- > strong free on bases: {__malloc_main_l82_37} @@ -173,7 +175,7 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_equaliti > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: > strong free on bases: {__malloc_main_l82_31} -687c812,830 +691c815,833 < strong free on bases: {__malloc_main_l82_7} --- > strong free on bases: {__malloc_main_l82_37} @@ -195,7 +197,7 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_equaliti > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: > strong free on bases: {__malloc_main_l82_31} -759c902,920 +763c905,923 < strong free on bases: {__malloc_main_l82_7} --- > strong free on bases: {__malloc_main_l82_37} @@ -217,7 +219,7 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_equaliti > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: > strong free on bases: {__malloc_main_l82_31} -831c992,1010 +835c995,1013 < strong free on bases: {__malloc_main_l82_7} --- > strong free on bases: {__malloc_main_l82_37} @@ -239,20 +241,21 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_equaliti > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: > strong free on bases: {__malloc_main_l82_31} -901,903c1080 +905,907c1083,1084 < [eva] tests/builtins/allocated.c:87: Call to builtin free < [eva:malloc] tests/builtins/allocated.c:87: < strong free on bases: {__malloc_main_l82_7} --- -> [eva] Semantic level unrolling superposing up to 500 states -1065,1067c1242,1243 +> [eva] tests/builtins/allocated.c:81: +> Trace partitioning superposing up to 500 states +1069,1071c1246,1247 < __malloc_main_l82_7[0] ∈ {21} or UNINITIALIZED < [1] ∈ {24} or UNINITIALIZED < [2] ∈ {27} or UNINITIALIZED --- > __malloc_main_l82_7[0] ∈ {14} or UNINITIALIZED > [1] ∈ {17} or UNINITIALIZED -1136a1313,1333 +1140a1317,1337 > __malloc_main_l82_31[0] ∈ {21} or UNINITIALIZED > [1] ∈ {24} or UNINITIALIZED > [2] ∈ {27} or UNINITIALIZED @@ -274,11 +277,11 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_equaliti > __malloc_main_l82_37[0] ∈ {21} or UNINITIALIZED > [1] ∈ {24} or UNINITIALIZED > [2] ∈ {27} or UNINITIALIZED -1180c1377 +1184c1381 < __malloc_main_l82_7[0..2] FROM __fc_heap_status; nondet (and SELF) --- > __malloc_main_l82_7[0..1] FROM __fc_heap_status; nondet (and SELF) -1203a1401,1407 +1207a1405,1411 > __malloc_main_l82_31[0..2] FROM __fc_heap_status; nondet (and SELF) > __malloc_main_l82_32[0..2] FROM __fc_heap_status; nondet (and SELF) > __malloc_main_l82_33[0..2] FROM __fc_heap_status; nondet (and SELF) @@ -286,11 +289,11 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_equaliti > __malloc_main_l82_35[0..2] FROM __fc_heap_status; nondet (and SELF) > __malloc_main_l82_36[0..2] FROM __fc_heap_status; nondet (and SELF) > __malloc_main_l82_37[0..2] FROM __fc_heap_status; nondet (and SELF) -1227c1431 +1231c1435 < __malloc_main_l82_6[0..1]; __malloc_main_l82_7[0..2]; --- > __malloc_main_l82_6[0..1]; __malloc_main_l82_7[0..1]; -1239,1240c1443,1448 +1243,1244c1447,1452 < __malloc_main_l82_30[0..2]; __malloc_main_l97[0]; __malloc_main_l114[0..3]; < __malloc_main_l127; __malloc_main_l127_0[0..1]; __malloc_main_l127_1[0..2]; --- diff --git a/tests/builtins/diff_gauges b/tests/builtins/diff_gauges index 5a276d3cf19..41ef15b15d1 100644 --- a/tests/builtins/diff_gauges +++ b/tests/builtins/diff_gauges @@ -36,10 +36,10 @@ diff tests/builtins/oracle/malloc-size-zero.1.res.oracle tests/builtins/oracle_g > [eva] Recording results for my_calloc > [eva] Done for function my_calloc diff tests/builtins/oracle/memcpy.res.oracle tests/builtins/oracle_gauges/memcpy.res.oracle -167a168,169 +168a169,170 > [eva] tests/builtins/memcpy.c:96: Call to builtin memcpy > [eva] tests/builtins/memcpy.c:96: Call to builtin memcpy -448a451 +449a452 > [eva] tests/builtins/memcpy.c:230: starting to merge loop iterations diff tests/builtins/oracle/realloc.res.oracle tests/builtins/oracle_gauges/realloc.res.oracle 689a690,1038 diff --git a/tests/builtins/diff_symblocs b/tests/builtins/diff_symblocs index f82ea2c45a6..9989eea8b41 100644 --- a/tests/builtins/diff_symblocs +++ b/tests/builtins/diff_symblocs @@ -11,7 +11,7 @@ diff tests/builtins/oracle/alloc_weak.res.oracle tests/builtins/oracle_symblocs/ 36,37d35 < [eva:alarm] tests/builtins/alloc_weak.c:30: Warning: < accessing uninitialized left-value. assert \initialized(p); -900c898 +908c906 < r ∈ [--..--] --- > r ∈ {42} diff --git a/tests/value/diff_apron b/tests/value/diff_apron index 7b830e4e3d3..2ead3a445bb 100644 --- a/tests/value/diff_apron +++ b/tests/value/diff_apron @@ -415,11 +415,11 @@ diff tests/value/oracle/local_slevel.res.oracle tests/value/oracle_apron/local_s < Frama_C_show_each: {-1}, [0..78],0%2, [0..4294967295] --- > Frama_C_show_each: {-1}, [0..78],0%2, [0..78] -150c142 +152c144 < r ∈ [--..--] --- > r ∈ [0..2147483647] -391,393c383,385 +393,395c385,387 < [eva] tests/value/local_slevel.i:18: Frama_C_show_each: {1}, {1}, {0; 1} < [eva] tests/value/local_slevel.i:18: Frama_C_show_each: {-1}, {0}, {0; 1} < [eva] tests/value/local_slevel.i:18: Frama_C_show_each: {1}, {1}, {0; 1; 2} @@ -427,15 +427,15 @@ diff tests/value/oracle/local_slevel.res.oracle tests/value/oracle_apron/local_s > [eva] tests/value/local_slevel.i:18: Frama_C_show_each: {1}, {1}, {1} > [eva] tests/value/local_slevel.i:18: Frama_C_show_each: {-1}, {0}, {0} > [eva] tests/value/local_slevel.i:18: Frama_C_show_each: {1}, {1}, {1} -396c388 +398c390 < Frama_C_show_each: {1}, [1..79],1%2, {0; 1; 2; 3} --- > Frama_C_show_each: {1}, [1..79],1%2, {1; 2; 3} -400c392 +402c394 < Frama_C_show_each: {1}, [1..79],1%2, {0; 1; 2; 3; 4} --- > Frama_C_show_each: {1}, [1..79],1%2, {1; 2; 3; 4} -404,412c396 +406,414c398 < Frama_C_show_each: {1}, [1..79],1%2, [0..2147483647] < [eva] tests/value/local_slevel.i:18: < Frama_C_show_each: {-1}, [0..78],0%2, [0..2147483647] @@ -447,11 +447,11 @@ diff tests/value/oracle/local_slevel.res.oracle tests/value/oracle_apron/local_s < Frama_C_show_each: {1}, [1..79],1%2, [0..4294967295] --- > Frama_C_show_each: {1}, [1..79],1%2, [1..79] -414c398 +416c400 < Frama_C_show_each: {-1}, [0..78],0%2, [0..4294967295] --- > Frama_C_show_each: {-1}, [0..78],0%2, [0..78] -528c512 +532c516 < r ∈ [--..--] --- > r ∈ [0..2147483647] @@ -618,10 +618,10 @@ diff tests/value/oracle/memexec.res.oracle tests/value/oracle_apron/memexec.res. > g_f5_1 ∈ [-2147483648..6] diff tests/value/oracle/modulo.res.oracle tests/value/oracle_apron/modulo.res.oracle 40a41,64 -> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [1..10], [1..9], [0..8] -> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [1..10], [-9..-1], [0..8] -> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [-10..-1], [1..9], [-8..0] > [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [-10..-1], [-9..-1], [-8..0] +> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [-10..-1], [1..9], [-8..0] +> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [1..10], [-9..-1], [0..8] +> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [1..10], [1..9], [0..8] > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: > [1..9], {1; 2; 3; 4; 5; 6; 7; 8}, {0; 1; 2; 3; 4; 5; 6; 7} @@ -636,37 +636,37 @@ diff tests/value/oracle/modulo.res.oracle tests/value/oracle_apron/modulo.res.or > [-9..-1], {-8; -7; -6; -5; -4; -3; -2; -1}, {-7; -6; -5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: -> {1; 2; 3; 4; 5; 6; 7; 8}, {-7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6} -> [eva] tests/value/modulo.i:41: -> Frama_C_show_each_1: > {-8; -7; -6; -5; -4; -3; -2; -1}, > {1; 2; 3; 4; 5; 6; 7}, > {-6; -5; -4; -3; -2; -1; 0} +> [eva] tests/value/modulo.i:41: +> Frama_C_show_each_1: +> {1; 2; 3; 4; 5; 6; 7; 8}, {-7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6} 50a75,98 -> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [1..10], [1..9], [0..8] -> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [1..10], [-9..-1], [0..8] > [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [-10..-1], [1..9], [-8..0] > [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [-10..-1], [-9..-1], [-8..0] -> [eva] tests/value/modulo.i:53: -> Frama_C_show_each_2: -> [1..9], {1; 2; 3; 4; 5; 6; 7; 8}, {0; 1; 2; 3; 4; 5; 6; 7} +> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [1..10], [1..9], [0..8] +> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [1..10], [-9..-1], [0..8] > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: > [-9..-1], {1; 2; 3; 4; 5; 6; 7; 8}, {-7; -6; -5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: -> [1..9], {-8; -7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6; 7} +> [1..9], {1; 2; 3; 4; 5; 6; 7; 8}, {0; 1; 2; 3; 4; 5; 6; 7} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: > [-9..-1], {-8; -7; -6; -5; -4; -3; -2; -1}, {-7; -6; -5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: -> {1; 2; 3; 4; 5; 6; 7; 8}, {-7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6} +> [1..9], {-8; -7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6; 7} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: > {-8; -7; -6; -5; -4; -3; -2; -1}, > {1; 2; 3; 4; 5; 6; 7}, > {-6; -5; -4; -3; -2; -1; 0} +> [eva] tests/value/modulo.i:53: +> Frama_C_show_each_2: +> {1; 2; 3; 4; 5; 6; 7; 8}, {-7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6} 60a109,110 > [eva] tests/value/modulo.i:64: Frama_C_show_each_3: [-10..10], [-9..9], [-8..8] > [eva] tests/value/modulo.i:64: Frama_C_show_each_3: [-9..9], [-8..8], [-7..7] @@ -714,6 +714,10 @@ diff tests/value/oracle/offsetmap.1.res.oracle tests/value/oracle_apron/offsetma > a ∈ {1; 6} > b ∈ {0; 1} > a7 ∈ {1} +diff tests/value/oracle/partitioning-annots.4.res.oracle tests/value/oracle_apron/partitioning-annots.4.res.oracle +14,15d13 +< [eva:alarm] tests/value/partitioning-annots.c:134: Warning: +< division by zero. assert j ≢ 0; diff tests/value/oracle/precise_locations.res.oracle tests/value/oracle_apron/precise_locations.res.oracle 32,35c32,47 < [eva] tests/value/precise_locations.i:39: Reusing old results for call to ct @@ -972,6 +976,9 @@ diff tests/value/oracle/unroll_simple.res.oracle tests/value/oracle_apron/unroll < j ∈ [-2147483648..-126] --- > j ∈ {-250} +diff tests/value/oracle/widen_on_non_monotonic.res.oracle tests/value/oracle_apron/widen_on_non_monotonic.res.oracle +25a26 +> [eva] tests/value/widen_on_non_monotonic.i:21: starting to merge loop iterations diff tests/value/oracle/with_comment.res.oracle tests/value/oracle_apron/with_comment.res.oracle 9,10d8 < [eva:alarm] tests/value/with_comment.i:21: Warning: diff --git a/tests/value/diff_equalities b/tests/value/diff_equalities index dff0951199d..821b7e3c2fc 100644 --- a/tests/value/diff_equalities +++ b/tests/value/diff_equalities @@ -379,10 +379,10 @@ diff tests/value/oracle/long_const.1.res.oracle tests/value/oracle_equalities/lo > [eva] Done for function LL_ABS diff tests/value/oracle/modulo.res.oracle tests/value/oracle_equalities/modulo.res.oracle 40a41,119 -> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [1..10], [1..9], [0..8] -> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [1..10], [-9..-1], [0..8] -> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [-10..-1], [1..9], [-8..0] > [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [-10..-1], [-9..-1], [-8..0] +> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [-10..-1], [1..9], [-8..0] +> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [1..10], [-9..-1], [0..8] +> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [1..10], [1..9], [0..8] > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: > [1..9], {1; 2; 3; 4; 5; 6; 7; 8}, {0; 1; 2; 3; 4; 5; 6; 7} @@ -397,10 +397,9 @@ diff tests/value/oracle/modulo.res.oracle tests/value/oracle_equalities/modulo.r > [-9..-1], {-8; -7; -6; -5; -4; -3; -2; -1}, {-7; -6; -5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: -> {1; 2; 3; 4; 5; 6; 7; 8}, {1; 2; 3; 4; 5; 6; 7}, {0; 1; 2; 3; 4; 5; 6} -> [eva] tests/value/modulo.i:41: -> Frama_C_show_each_1: -> {1; 2; 3; 4; 5; 6; 7; 8}, {-7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6} +> {-8; -7; -6; -5; -4; -3; -2; -1}, +> {-7; -6; -5; -4; -3; -2; -1}, +> {-6; -5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: > {-8; -7; -6; -5; -4; -3; -2; -1}, @@ -408,9 +407,10 @@ diff tests/value/oracle/modulo.res.oracle tests/value/oracle_equalities/modulo.r > {-6; -5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: -> {-8; -7; -6; -5; -4; -3; -2; -1}, -> {-7; -6; -5; -4; -3; -2; -1}, -> {-6; -5; -4; -3; -2; -1; 0} +> {1; 2; 3; 4; 5; 6; 7; 8}, {-7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6} +> [eva] tests/value/modulo.i:41: +> Frama_C_show_each_1: +> {1; 2; 3; 4; 5; 6; 7; 8}, {1; 2; 3; 4; 5; 6; 7}, {0; 1; 2; 3; 4; 5; 6} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: > {1; 2; 3; 4; 5; 6; 7}, {1; 2; 3; 4; 5; 6}, {0; 1; 2; 3; 4; 5} @@ -426,16 +426,16 @@ diff tests/value/oracle/modulo.res.oracle tests/value/oracle_equalities/modulo.r > {-6; -5; -4; -3; -2; -1}, > {-5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:41: -> Frama_C_show_each_1: {1; 2; 3; 4; 5; 6}, {1; 2; 3; 4; 5}, {0; 1; 2; 3; 4} -> [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: -> {1; 2; 3; 4; 5; 6}, {-5; -4; -3; -2; -1}, {0; 1; 2; 3; 4} +> {-6; -5; -4; -3; -2; -1}, {-5; -4; -3; -2; -1}, {-4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: > {-6; -5; -4; -3; -2; -1}, {1; 2; 3; 4; 5}, {-4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: -> {-6; -5; -4; -3; -2; -1}, {-5; -4; -3; -2; -1}, {-4; -3; -2; -1; 0} +> {1; 2; 3; 4; 5; 6}, {-5; -4; -3; -2; -1}, {0; 1; 2; 3; 4} +> [eva] tests/value/modulo.i:41: +> Frama_C_show_each_1: {1; 2; 3; 4; 5; 6}, {1; 2; 3; 4; 5}, {0; 1; 2; 3; 4} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: {1; 2; 3; 4; 5}, {1; 2; 3; 4}, {0; 1; 2; 3} > [eva] tests/value/modulo.i:41: @@ -445,13 +445,13 @@ diff tests/value/oracle/modulo.res.oracle tests/value/oracle_equalities/modulo.r > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: {-5; -4; -3; -2; -1}, {-4; -3; -2; -1}, {-3; -2; -1; 0} > [eva] tests/value/modulo.i:41: -> Frama_C_show_each_1: {1; 2; 3; 4}, {1; 2; 3}, {0; 1; 2} -> [eva] tests/value/modulo.i:41: -> Frama_C_show_each_1: {1; 2; 3; 4}, {-3; -2; -1}, {0; 1; 2} +> Frama_C_show_each_1: {-4; -3; -2; -1}, {-3; -2; -1}, {-2; -1; 0} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: {-4; -3; -2; -1}, {1; 2; 3}, {-2; -1; 0} > [eva] tests/value/modulo.i:41: -> Frama_C_show_each_1: {-4; -3; -2; -1}, {-3; -2; -1}, {-2; -1; 0} +> Frama_C_show_each_1: {1; 2; 3; 4}, {-3; -2; -1}, {0; 1; 2} +> [eva] tests/value/modulo.i:41: +> Frama_C_show_each_1: {1; 2; 3; 4}, {1; 2; 3}, {0; 1; 2} > [eva] tests/value/modulo.i:41: Frama_C_show_each_1: {1; 2; 3}, {1; 2}, {0; 1} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: {-3; -2; -1}, {1; 2}, {-1; 0} @@ -459,28 +459,22 @@ diff tests/value/oracle/modulo.res.oracle tests/value/oracle_equalities/modulo.r > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: {-3; -2; -1}, {-2; -1}, {-1; 0} 50a130,208 -> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [1..10], [1..9], [0..8] -> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [1..10], [-9..-1], [0..8] > [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [-10..-1], [1..9], [-8..0] > [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [-10..-1], [-9..-1], [-8..0] -> [eva] tests/value/modulo.i:53: -> Frama_C_show_each_2: -> [1..9], {1; 2; 3; 4; 5; 6; 7; 8}, {0; 1; 2; 3; 4; 5; 6; 7} +> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [1..10], [1..9], [0..8] +> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [1..10], [-9..-1], [0..8] > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: > [-9..-1], {1; 2; 3; 4; 5; 6; 7; 8}, {-7; -6; -5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: -> [1..9], {-8; -7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6; 7} +> [1..9], {1; 2; 3; 4; 5; 6; 7; 8}, {0; 1; 2; 3; 4; 5; 6; 7} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: > [-9..-1], {-8; -7; -6; -5; -4; -3; -2; -1}, {-7; -6; -5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: -> {1; 2; 3; 4; 5; 6; 7; 8}, {1; 2; 3; 4; 5; 6; 7}, {0; 1; 2; 3; 4; 5; 6} -> [eva] tests/value/modulo.i:53: -> Frama_C_show_each_2: -> {1; 2; 3; 4; 5; 6; 7; 8}, {-7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6} +> [1..9], {-8; -7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6; 7} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: > {-8; -7; -6; -5; -4; -3; -2; -1}, @@ -493,23 +487,24 @@ diff tests/value/oracle/modulo.res.oracle tests/value/oracle_equalities/modulo.r > {-6; -5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: -> {1; 2; 3; 4; 5; 6; 7}, {1; 2; 3; 4; 5; 6}, {0; 1; 2; 3; 4; 5} +> {1; 2; 3; 4; 5; 6; 7; 8}, {1; 2; 3; 4; 5; 6; 7}, {0; 1; 2; 3; 4; 5; 6} +> [eva] tests/value/modulo.i:53: +> Frama_C_show_each_2: +> {1; 2; 3; 4; 5; 6; 7; 8}, {-7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: > {-7; -6; -5; -4; -3; -2; -1}, {1; 2; 3; 4; 5; 6}, {-5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: -> {1; 2; 3; 4; 5; 6; 7}, {-6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5} +> {1; 2; 3; 4; 5; 6; 7}, {1; 2; 3; 4; 5; 6}, {0; 1; 2; 3; 4; 5} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: > {-7; -6; -5; -4; -3; -2; -1}, > {-6; -5; -4; -3; -2; -1}, > {-5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:53: -> Frama_C_show_each_2: {1; 2; 3; 4; 5; 6}, {1; 2; 3; 4; 5}, {0; 1; 2; 3; 4} -> [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: -> {1; 2; 3; 4; 5; 6}, {-5; -4; -3; -2; -1}, {0; 1; 2; 3; 4} +> {1; 2; 3; 4; 5; 6; 7}, {-6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: > {-6; -5; -4; -3; -2; -1}, {1; 2; 3; 4; 5}, {-4; -3; -2; -1; 0} @@ -517,27 +512,32 @@ diff tests/value/oracle/modulo.res.oracle tests/value/oracle_equalities/modulo.r > Frama_C_show_each_2: > {-6; -5; -4; -3; -2; -1}, {-5; -4; -3; -2; -1}, {-4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:53: -> Frama_C_show_each_2: {1; 2; 3; 4; 5}, {1; 2; 3; 4}, {0; 1; 2; 3} +> Frama_C_show_each_2: {1; 2; 3; 4; 5; 6}, {1; 2; 3; 4; 5}, {0; 1; 2; 3; 4} +> [eva] tests/value/modulo.i:53: +> Frama_C_show_each_2: +> {1; 2; 3; 4; 5; 6}, {-5; -4; -3; -2; -1}, {0; 1; 2; 3; 4} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: {-5; -4; -3; -2; -1}, {1; 2; 3; 4}, {-3; -2; -1; 0} > [eva] tests/value/modulo.i:53: -> Frama_C_show_each_2: {1; 2; 3; 4; 5}, {-4; -3; -2; -1}, {0; 1; 2; 3} +> Frama_C_show_each_2: {1; 2; 3; 4; 5}, {1; 2; 3; 4}, {0; 1; 2; 3} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: {-5; -4; -3; -2; -1}, {-4; -3; -2; -1}, {-3; -2; -1; 0} > [eva] tests/value/modulo.i:53: -> Frama_C_show_each_2: {1; 2; 3; 4}, {1; 2; 3}, {0; 1; 2} -> [eva] tests/value/modulo.i:53: -> Frama_C_show_each_2: {1; 2; 3; 4}, {-3; -2; -1}, {0; 1; 2} +> Frama_C_show_each_2: {1; 2; 3; 4; 5}, {-4; -3; -2; -1}, {0; 1; 2; 3} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: {-4; -3; -2; -1}, {1; 2; 3}, {-2; -1; 0} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: {-4; -3; -2; -1}, {-3; -2; -1}, {-2; -1; 0} -> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: {1; 2; 3}, {1; 2}, {0; 1} +> [eva] tests/value/modulo.i:53: +> Frama_C_show_each_2: {1; 2; 3; 4}, {1; 2; 3}, {0; 1; 2} +> [eva] tests/value/modulo.i:53: +> Frama_C_show_each_2: {1; 2; 3; 4}, {-3; -2; -1}, {0; 1; 2} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: {-3; -2; -1}, {1; 2}, {-1; 0} -> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: {1; 2; 3}, {-2; -1}, {0; 1} +> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: {1; 2; 3}, {1; 2}, {0; 1} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: {-3; -2; -1}, {-2; -1}, {-1; 0} +> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: {1; 2; 3}, {-2; -1}, {0; 1} 60a219,231 > [eva] tests/value/modulo.i:64: Frama_C_show_each_3: [-10..10], [-9..9], [-8..8] > [eva] tests/value/modulo.i:64: Frama_C_show_each_3: [-9..9], [-8..8], [-7..7] diff --git a/tests/value/diff_gauges b/tests/value/diff_gauges index 26c5b6d4c45..e0312fea2b9 100644 --- a/tests/value/diff_gauges +++ b/tests/value/diff_gauges @@ -447,11 +447,11 @@ diff tests/value/oracle/local_slevel.res.oracle tests/value/oracle_gauges/local_ < Frama_C_show_each: {-1}, [0..78],0%2, [0..4294967295] --- > Frama_C_show_each: {-1}, [0..78],0%2, [0..78] -150c142 +152c144 < r ∈ [--..--] --- > r ∈ [0..2147483647] -391,393c383,385 +393,395c385,387 < [eva] tests/value/local_slevel.i:18: Frama_C_show_each: {1}, {1}, {0; 1} < [eva] tests/value/local_slevel.i:18: Frama_C_show_each: {-1}, {0}, {0; 1} < [eva] tests/value/local_slevel.i:18: Frama_C_show_each: {1}, {1}, {0; 1; 2} @@ -459,15 +459,15 @@ diff tests/value/oracle/local_slevel.res.oracle tests/value/oracle_gauges/local_ > [eva] tests/value/local_slevel.i:18: Frama_C_show_each: {1}, {1}, {1} > [eva] tests/value/local_slevel.i:18: Frama_C_show_each: {-1}, {0}, {0} > [eva] tests/value/local_slevel.i:18: Frama_C_show_each: {1}, {1}, {1} -396c388 +398c390 < Frama_C_show_each: {1}, [1..79],1%2, {0; 1; 2; 3} --- > Frama_C_show_each: {1}, [1..79],1%2, {1; 2; 3} -400c392 +402c394 < Frama_C_show_each: {1}, [1..79],1%2, {0; 1; 2; 3; 4} --- > Frama_C_show_each: {1}, [1..79],1%2, {1; 2; 3; 4} -404,412c396 +406,414c398 < Frama_C_show_each: {1}, [1..79],1%2, [0..2147483647] < [eva] tests/value/local_slevel.i:18: < Frama_C_show_each: {-1}, [0..78],0%2, [0..2147483647] @@ -479,11 +479,11 @@ diff tests/value/oracle/local_slevel.res.oracle tests/value/oracle_gauges/local_ < Frama_C_show_each: {1}, [1..79],1%2, [0..4294967295] --- > Frama_C_show_each: {1}, [1..79],1%2, [1..79] -414c398 +416c400 < Frama_C_show_each: {-1}, [0..78],0%2, [0..4294967295] --- > Frama_C_show_each: {-1}, [0..78],0%2, [0..78] -528c512 +532c516 < r ∈ [--..--] --- > r ∈ [0..2147483647] @@ -516,10 +516,10 @@ diff tests/value/oracle/memexec.res.oracle tests/value/oracle_gauges/memexec.res > [eva] tests/value/memexec.c:98: starting to merge loop iterations diff tests/value/oracle/modulo.res.oracle tests/value/oracle_gauges/modulo.res.oracle 40a41,123 -> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [1..10], [1..9], [0..8] -> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [1..10], [-9..-1], [0..8] -> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [-10..-1], [1..9], [-8..0] > [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [-10..-1], [-9..-1], [-8..0] +> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [-10..-1], [1..9], [-8..0] +> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [1..10], [-9..-1], [0..8] +> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: [1..10], [1..9], [0..8] > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: > [1..9], {1; 2; 3; 4; 5; 6; 7; 8}, {0; 1; 2; 3; 4; 5; 6; 7} @@ -534,10 +534,9 @@ diff tests/value/oracle/modulo.res.oracle tests/value/oracle_gauges/modulo.res.o > [-9..-1], {-8; -7; -6; -5; -4; -3; -2; -1}, {-7; -6; -5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: -> {1; 2; 3; 4; 5; 6; 7; 8}, {1; 2; 3; 4; 5; 6; 7}, {0; 1; 2; 3; 4; 5; 6} -> [eva] tests/value/modulo.i:41: -> Frama_C_show_each_1: -> {1; 2; 3; 4; 5; 6; 7; 8}, {-7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6} +> {-8; -7; -6; -5; -4; -3; -2; -1}, +> {-7; -6; -5; -4; -3; -2; -1}, +> {-6; -5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: > {-8; -7; -6; -5; -4; -3; -2; -1}, @@ -545,9 +544,10 @@ diff tests/value/oracle/modulo.res.oracle tests/value/oracle_gauges/modulo.res.o > {-6; -5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: -> {-8; -7; -6; -5; -4; -3; -2; -1}, -> {-7; -6; -5; -4; -3; -2; -1}, -> {-6; -5; -4; -3; -2; -1; 0} +> {1; 2; 3; 4; 5; 6; 7; 8}, {-7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6} +> [eva] tests/value/modulo.i:41: +> Frama_C_show_each_1: +> {1; 2; 3; 4; 5; 6; 7; 8}, {1; 2; 3; 4; 5; 6; 7}, {0; 1; 2; 3; 4; 5; 6} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: > {1; 2; 3; 4; 5; 6; 7}, {1; 2; 3; 4; 5; 6}, {0; 1; 2; 3; 4; 5} @@ -563,16 +563,16 @@ diff tests/value/oracle/modulo.res.oracle tests/value/oracle_gauges/modulo.res.o > {-6; -5; -4; -3; -2; -1}, > {-5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:41: -> Frama_C_show_each_1: {1; 2; 3; 4; 5; 6}, {1; 2; 3; 4; 5}, {0; 1; 2; 3; 4} -> [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: -> {1; 2; 3; 4; 5; 6}, {-5; -4; -3; -2; -1}, {0; 1; 2; 3; 4} +> {-6; -5; -4; -3; -2; -1}, {-5; -4; -3; -2; -1}, {-4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: > {-6; -5; -4; -3; -2; -1}, {1; 2; 3; 4; 5}, {-4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: -> {-6; -5; -4; -3; -2; -1}, {-5; -4; -3; -2; -1}, {-4; -3; -2; -1; 0} +> {1; 2; 3; 4; 5; 6}, {-5; -4; -3; -2; -1}, {0; 1; 2; 3; 4} +> [eva] tests/value/modulo.i:41: +> Frama_C_show_each_1: {1; 2; 3; 4; 5; 6}, {1; 2; 3; 4; 5}, {0; 1; 2; 3; 4} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: {1; 2; 3; 4; 5}, {1; 2; 3; 4}, {0; 1; 2; 3} > [eva] tests/value/modulo.i:41: @@ -582,46 +582,40 @@ diff tests/value/oracle/modulo.res.oracle tests/value/oracle_gauges/modulo.res.o > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: {-5; -4; -3; -2; -1}, {-4; -3; -2; -1}, {-3; -2; -1; 0} > [eva] tests/value/modulo.i:41: -> Frama_C_show_each_1: {1; 2; 3; 4}, {1; 2; 3}, {0; 1; 2} -> [eva] tests/value/modulo.i:41: -> Frama_C_show_each_1: {1; 2; 3; 4}, {-3; -2; -1}, {0; 1; 2} +> Frama_C_show_each_1: {-4; -3; -2; -1}, {-3; -2; -1}, {-2; -1; 0} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: {-4; -3; -2; -1}, {1; 2; 3}, {-2; -1; 0} > [eva] tests/value/modulo.i:41: -> Frama_C_show_each_1: {-4; -3; -2; -1}, {-3; -2; -1}, {-2; -1; 0} +> Frama_C_show_each_1: {1; 2; 3; 4}, {-3; -2; -1}, {0; 1; 2} +> [eva] tests/value/modulo.i:41: +> Frama_C_show_each_1: {1; 2; 3; 4}, {1; 2; 3}, {0; 1; 2} > [eva] tests/value/modulo.i:41: Frama_C_show_each_1: {1; 2; 3}, {1; 2}, {0; 1} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: {-3; -2; -1}, {1; 2}, {-1; 0} > [eva] tests/value/modulo.i:41: Frama_C_show_each_1: {1; 2; 3}, {-2; -1}, {0; 1} > [eva] tests/value/modulo.i:41: > Frama_C_show_each_1: {-3; -2; -1}, {-2; -1}, {-1; 0} -> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: {1; 2}, {1}, {0} -> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: {1; 2}, {-1}, {0} -> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: {-2; -1}, {1}, {0} > [eva] tests/value/modulo.i:41: Frama_C_show_each_1: {-2; -1}, {-1}, {0} +> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: {-2; -1}, {1}, {0} +> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: {1; 2}, {-1}, {0} +> [eva] tests/value/modulo.i:41: Frama_C_show_each_1: {1; 2}, {1}, {0} 50a134,216 -> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [1..10], [1..9], [0..8] -> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [1..10], [-9..-1], [0..8] > [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [-10..-1], [1..9], [-8..0] > [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [-10..-1], [-9..-1], [-8..0] -> [eva] tests/value/modulo.i:53: -> Frama_C_show_each_2: -> [1..9], {1; 2; 3; 4; 5; 6; 7; 8}, {0; 1; 2; 3; 4; 5; 6; 7} +> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [1..10], [1..9], [0..8] +> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: [1..10], [-9..-1], [0..8] > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: > [-9..-1], {1; 2; 3; 4; 5; 6; 7; 8}, {-7; -6; -5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: -> [1..9], {-8; -7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6; 7} +> [1..9], {1; 2; 3; 4; 5; 6; 7; 8}, {0; 1; 2; 3; 4; 5; 6; 7} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: > [-9..-1], {-8; -7; -6; -5; -4; -3; -2; -1}, {-7; -6; -5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: -> {1; 2; 3; 4; 5; 6; 7; 8}, {1; 2; 3; 4; 5; 6; 7}, {0; 1; 2; 3; 4; 5; 6} -> [eva] tests/value/modulo.i:53: -> Frama_C_show_each_2: -> {1; 2; 3; 4; 5; 6; 7; 8}, {-7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6} +> [1..9], {-8; -7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6; 7} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: > {-8; -7; -6; -5; -4; -3; -2; -1}, @@ -634,23 +628,24 @@ diff tests/value/oracle/modulo.res.oracle tests/value/oracle_gauges/modulo.res.o > {-6; -5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: -> {1; 2; 3; 4; 5; 6; 7}, {1; 2; 3; 4; 5; 6}, {0; 1; 2; 3; 4; 5} +> {1; 2; 3; 4; 5; 6; 7; 8}, {1; 2; 3; 4; 5; 6; 7}, {0; 1; 2; 3; 4; 5; 6} +> [eva] tests/value/modulo.i:53: +> Frama_C_show_each_2: +> {1; 2; 3; 4; 5; 6; 7; 8}, {-7; -6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5; 6} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: > {-7; -6; -5; -4; -3; -2; -1}, {1; 2; 3; 4; 5; 6}, {-5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: -> {1; 2; 3; 4; 5; 6; 7}, {-6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5} +> {1; 2; 3; 4; 5; 6; 7}, {1; 2; 3; 4; 5; 6}, {0; 1; 2; 3; 4; 5} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: > {-7; -6; -5; -4; -3; -2; -1}, > {-6; -5; -4; -3; -2; -1}, > {-5; -4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:53: -> Frama_C_show_each_2: {1; 2; 3; 4; 5; 6}, {1; 2; 3; 4; 5}, {0; 1; 2; 3; 4} -> [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: -> {1; 2; 3; 4; 5; 6}, {-5; -4; -3; -2; -1}, {0; 1; 2; 3; 4} +> {1; 2; 3; 4; 5; 6; 7}, {-6; -5; -4; -3; -2; -1}, {0; 1; 2; 3; 4; 5} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: > {-6; -5; -4; -3; -2; -1}, {1; 2; 3; 4; 5}, {-4; -3; -2; -1; 0} @@ -658,31 +653,36 @@ diff tests/value/oracle/modulo.res.oracle tests/value/oracle_gauges/modulo.res.o > Frama_C_show_each_2: > {-6; -5; -4; -3; -2; -1}, {-5; -4; -3; -2; -1}, {-4; -3; -2; -1; 0} > [eva] tests/value/modulo.i:53: -> Frama_C_show_each_2: {1; 2; 3; 4; 5}, {1; 2; 3; 4}, {0; 1; 2; 3} +> Frama_C_show_each_2: {1; 2; 3; 4; 5; 6}, {1; 2; 3; 4; 5}, {0; 1; 2; 3; 4} +> [eva] tests/value/modulo.i:53: +> Frama_C_show_each_2: +> {1; 2; 3; 4; 5; 6}, {-5; -4; -3; -2; -1}, {0; 1; 2; 3; 4} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: {-5; -4; -3; -2; -1}, {1; 2; 3; 4}, {-3; -2; -1; 0} > [eva] tests/value/modulo.i:53: -> Frama_C_show_each_2: {1; 2; 3; 4; 5}, {-4; -3; -2; -1}, {0; 1; 2; 3} +> Frama_C_show_each_2: {1; 2; 3; 4; 5}, {1; 2; 3; 4}, {0; 1; 2; 3} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: {-5; -4; -3; -2; -1}, {-4; -3; -2; -1}, {-3; -2; -1; 0} > [eva] tests/value/modulo.i:53: -> Frama_C_show_each_2: {1; 2; 3; 4}, {1; 2; 3}, {0; 1; 2} -> [eva] tests/value/modulo.i:53: -> Frama_C_show_each_2: {1; 2; 3; 4}, {-3; -2; -1}, {0; 1; 2} +> Frama_C_show_each_2: {1; 2; 3; 4; 5}, {-4; -3; -2; -1}, {0; 1; 2; 3} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: {-4; -3; -2; -1}, {1; 2; 3}, {-2; -1; 0} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: {-4; -3; -2; -1}, {-3; -2; -1}, {-2; -1; 0} -> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: {1; 2; 3}, {1; 2}, {0; 1} +> [eva] tests/value/modulo.i:53: +> Frama_C_show_each_2: {1; 2; 3; 4}, {1; 2; 3}, {0; 1; 2} +> [eva] tests/value/modulo.i:53: +> Frama_C_show_each_2: {1; 2; 3; 4}, {-3; -2; -1}, {0; 1; 2} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: {-3; -2; -1}, {1; 2}, {-1; 0} -> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: {1; 2; 3}, {-2; -1}, {0; 1} +> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: {1; 2; 3}, {1; 2}, {0; 1} > [eva] tests/value/modulo.i:53: > Frama_C_show_each_2: {-3; -2; -1}, {-2; -1}, {-1; 0} -> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: {1; 2}, {1}, {0} -> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: {1; 2}, {-1}, {0} +> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: {1; 2; 3}, {-2; -1}, {0; 1} > [eva] tests/value/modulo.i:53: Frama_C_show_each_2: {-2; -1}, {1}, {0} > [eva] tests/value/modulo.i:53: Frama_C_show_each_2: {-2; -1}, {-1}, {0} +> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: {1; 2}, {1}, {0} +> [eva] tests/value/modulo.i:53: Frama_C_show_each_2: {1; 2}, {-1}, {0} 60a227,240 > [eva] tests/value/modulo.i:64: Frama_C_show_each_3: [-10..10], [-9..9], [-8..8] > [eva] tests/value/modulo.i:64: Frama_C_show_each_3: [-9..9], [-8..8], [-7..7] diff --git a/tests/value/diff_symblocs b/tests/value/diff_symblocs index 66cf8a0b6bf..fdad91d414b 100644 --- a/tests/value/diff_symblocs +++ b/tests/value/diff_symblocs @@ -50,86 +50,6 @@ diff tests/value/oracle/bitwise_reduction.res.oracle tests/value/oracle_symblocs < {0; 1}, {0; 1; 0x3000; 0x3001; 0x3200; 0x3201; 0xF000; 0xFF00} --- > {0; 1}, {0x3000; 0x3001; 0x3200; 0x3201; 0xF000; 0xFF00} -diff tests/value/oracle/builtins_split.res.oracle tests/value/oracle_symblocs/builtins_split.res.oracle -68a69,70 -> [eva] tests/value/builtins_split.c:96: Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:96: Call to builtin Frama_C_builtin_split_all -98a101,144 -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:104: -> Call to builtin Frama_C_builtin_split_all -133a180,209 -> [eva] tests/value/builtins_split.c:112: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:112: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:112: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:112: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:112: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:112: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:112: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:112: -> Call to builtin Frama_C_builtin_split_all -> [eva] tests/value/builtins_split.c:114: -> Frama_C_show_each_s_5: -> {{ &s6 + {4} }}, {{ &s4 + {4} }}, {{ &s2 }}, [-2147483648..2147483647] -> [eva] tests/value/builtins_split.c:114: -> Frama_C_show_each_s_5: {{ &s6 + {4} }}, {{ &s4 + {4} }}, {{ &s0 }}, {0} -> [eva] tests/value/builtins_split.c:114: -> Frama_C_show_each_s_5: {{ &s5 + {4} }}, {{ &s3 + {4} }}, {{ &s1 }}, {-1} -> [eva] tests/value/builtins_split.c:114: -> Frama_C_show_each_s_5: {{ &s5 + {4} }}, {{ &s3 + {4} }}, {{ &s0 }}, {0} -> [eva] tests/value/builtins_split.c:114: -> Frama_C_show_each_s_5: -> {{ &s5 + {4} }}, {{ &s4 + {4} }}, {{ &s2 }}, [-2147483648..2147483647] -> [eva] tests/value/builtins_split.c:114: -> Frama_C_show_each_s_5: {{ &s5 + {4} }}, {{ &s4 + {4} }}, {{ &s0 }}, {0} diff tests/value/oracle/incompatible_states.res.oracle tests/value/oracle_symblocs/incompatible_states.res.oracle 39,40d38 < [eva:alarm] tests/value/incompatible_states.c:53: Warning: -- GitLab From 59c600bec85d38ebaebdd0a30493de6d8dfaefdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 18 Apr 2019 14:08:42 +0200 Subject: [PATCH 271/376] [Eva] Trace_partitioning.fill joins states instead of keeping only the new ones. --- src/plugins/value/engine/trace_partitioning.ml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/value/engine/trace_partitioning.ml b/src/plugins/value/engine/trace_partitioning.ml index 063afad6c95..336e75f30ac 100644 --- a/src/plugins/value/engine/trace_partitioning.ml +++ b/src/plugins/value/engine/trace_partitioning.ml @@ -203,13 +203,13 @@ struct flow let fill ~(into : tank) (flow : flow) : unit = - let erase _key dest src = - if Extlib.has_some src - then src - else dest - in let new_states = Flow.to_partition flow in - into.tank_states <- Partition.merge erase into.tank_states new_states + let join _key dest src = match dest, src with + | Some dest, Some src -> Some (Domain.join dest src) + | Some v, None | None, Some v -> Some v + | None, None -> None + in + into.tank_states <- Partition.merge join into.tank_states new_states let transfer = Flow.transfer_states -- GitLab From fa182e5d0c5500180e7285ed5cb85d8782171f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 18 Apr 2019 15:34:57 +0200 Subject: [PATCH 272/376] [Kernel] Fixes Cil.constFold on expressions whose size is not 32 bits. Uses the operand equal to 0, instead of creating a new 0 expression which may have an incorrect type. --- src/kernel_services/ast_queries/cil.ml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/kernel_services/ast_queries/cil.ml b/src/kernel_services/ast_queries/cil.ml index d81e6a1031b..af7f23d2146 100644 --- a/src/kernel_services/ast_queries/cil.ml +++ b/src/kernel_services/ast_queries/cil.ml @@ -5615,11 +5615,11 @@ and constFoldBinOp ~loc (machdep: bool) bop e1 e2 tres = | Mult, Const(CInt64(i1,ik1,_)), Const(CInt64(i2,ik2,_)) when ik1 = ik2 -> kinteger64 ~loc ~kind:tk (Integer.mul i1 i2) | Mult, Const(CInt64(z,_,_)), _ - when Integer.equal z Integer.zero -> zero ~loc + when Integer.equal z Integer.zero -> e1'' | Mult, Const(CInt64(one,_,_)), _ when Integer.equal one Integer.one -> e2'' | Mult, _, Const(CInt64(z,_,_)) - when Integer.equal z Integer.zero -> zero ~loc + when Integer.equal z Integer.zero -> e2'' | Mult, _, Const(CInt64(one,_,_)) when Integer.equal one Integer.one -> e1'' | Div, Const(CInt64(i1,ik1,_)),Const(CInt64(i2,ik2,_)) when ik1 = ik2 -> @@ -5642,9 +5642,9 @@ and constFoldBinOp ~loc (machdep: bool) bop e1 e2 tres = | BAnd, Const(CInt64(i1,ik1,_)),Const(CInt64(i2,ik2,_)) when ik1 = ik2 -> kinteger64 ~loc ~kind:tk (Integer.logand i1 i2) | BAnd, Const(CInt64(z,_,_)), _ - when Integer.equal z Integer.zero -> zero ~loc + when Integer.equal z Integer.zero -> e1'' | BAnd, _, Const(CInt64(z,_,_)) - when Integer.equal z Integer.zero -> zero ~loc + when Integer.equal z Integer.zero -> e2'' | BOr, Const(CInt64(i1,ik1,_)),Const(CInt64(i2,ik2,_)) when ik1 = ik2 -> kinteger64 ~loc ~kind:tk (Integer.logor i1 i2) | BOr, _, _ when isZero e1' -> e2' @@ -5655,7 +5655,7 @@ and constFoldBinOp ~loc (machdep: bool) bop e1 e2 tres = when shiftInBounds i2 -> kinteger64 ~loc ~kind:tk (Integer.shift_left i1 i2) | Shiftlt, Const(CInt64(z,_,_)), _ - when Integer.equal z Integer.zero -> zero ~loc + when Integer.equal z Integer.zero -> e1'' | Shiftlt, _, Const(CInt64(z,_,_)) when Integer.equal z Integer.zero -> e1'' | Shiftrt, Const(CInt64(i1,ik1,_)),Const(CInt64(i2,_,_)) @@ -5666,7 +5666,7 @@ and constFoldBinOp ~loc (machdep: bool) bop e1 e2 tres = else kinteger64 ~loc ~kind:tk (Integer.shift_right i1 i2) | Shiftrt, Const(CInt64(z,_,_)), _ - when Integer.equal z Integer.zero -> zero ~loc + when Integer.equal z Integer.zero -> e1'' | Shiftrt, _, Const(CInt64(z,_,_)) when Integer.equal z Integer.zero -> e1'' | Eq, Const(CInt64(i1,ik1,_)),Const(CInt64(i2,ik2,_)) -> -- GitLab From d2fd8c40366087a717e02a6c224cde5bd3a174f0 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 18 Apr 2019 16:55:36 +0200 Subject: [PATCH 273/376] Tail recursion forever --- src/kernel_services/cmdline_parameters/parameter_state.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel_services/cmdline_parameters/parameter_state.ml b/src/kernel_services/cmdline_parameters/parameter_state.ml index ad30035bc25..a0fe49c3d85 100644 --- a/src/kernel_services/cmdline_parameters/parameter_state.ml +++ b/src/kernel_services/cmdline_parameters/parameter_state.ml @@ -31,7 +31,7 @@ let collections: State.Set.t ref = ref State.Set.empty let get_selection_gen ?(is_set=true) selection = let l = if is_set then - List.map fst selection + List.rev (List.rev_map fst selection) else List.fold_left (fun acc (x, b) -> if b then acc else x :: acc) -- GitLab From b2db5229cec238d6aa69039044a6badbe9443f56 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 18 Apr 2019 16:55:56 +0200 Subject: [PATCH 274/376] never, ever use non tailrec functions on block statement lists --- src/kernel_services/ast_queries/cil.ml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/kernel_services/ast_queries/cil.ml b/src/kernel_services/ast_queries/cil.ml index d81e6a1031b..108ffe37ef4 100644 --- a/src/kernel_services/ast_queries/cil.ml +++ b/src/kernel_services/ast_queries/cil.ml @@ -2213,16 +2213,16 @@ let flatten_transient_sub_blocks b = -> true | Some _ -> false in - let treat_one_stmt s = + let treat_one_stmt acc s = match s.skind with | Block b when is_transient_block b -> if previous_is_annot () then begin s.skind <- Block (block_of_transient b); prev := Some s; - [ s ] + s :: acc end else begin match s.labels, b.bstmts with - | [], _ -> prev:= None; b.bstmts + | [], _ -> prev:= None; List.rev_append b.bstmts acc | _, [] -> (* Empty block, but we have a label attached to the statement, so that it is difficult to get rid of it (see below). Replace with @@ -2230,7 +2230,7 @@ let flatten_transient_sub_blocks b = *) s.skind <- Instr (Skip (Cil_datatype.Stmt.loc s)); prev:=Some s; - [s] + s :: acc | _, s'::tl when s'.labels = [] -> (* res is the target of a label (either goto or case). Removing the block would imply updating the origin of the jump, which is @@ -2239,17 +2239,17 @@ let flatten_transient_sub_blocks b = the block, and return the list. *) s.skind <- s'.skind; prev:=None; - s :: tl + List.rev_append tl (s :: acc) | _ -> (* both the block and the first statement have labels. Just keep the block. *) s.skind <- Block (block_of_transient b); prev:=Some s; - [s] + s :: acc end - | _ -> prev:= Some s; [ s ] + | _ -> prev:= Some s; s :: acc in - b.bstmts <- List.concat (List.map treat_one_stmt b.bstmts); + b.bstmts <- List.rev (List.fold_left treat_one_stmt [] b.bstmts); b let stmt_of_instr_list_visitor ?loc l = -- GitLab From 006c7f62fea4050b62deda62a1a9c087b667c873 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 18 Apr 2019 17:01:38 +0200 Subject: [PATCH 275/376] More tailrec calls --- src/kernel_services/ast_queries/cil.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kernel_services/ast_queries/cil.ml b/src/kernel_services/ast_queries/cil.ml index 108ffe37ef4..f7e775767cf 100644 --- a/src/kernel_services/ast_queries/cil.ml +++ b/src/kernel_services/ast_queries/cil.ml @@ -3776,7 +3776,8 @@ and childrenExp (vis: cilVisitor) (e: exp) : exp = (List.map (fun i -> mkStmt (Instr i)) toPrepend) @ f.sbody.bstmts; if vis#behavior.is_copy_behavior then begin fix_succs_preds_block vis#behavior f.sbody; - f.sallstmts <- List.map vis#behavior.get_stmt f.sallstmts + f.sallstmts <- + List.rev (List.rev_map vis#behavior.get_stmt f.sallstmts) end; vis#reset_current_func (); f -- GitLab From 244f9a3dda247adbfb569ca06d20f0b4bbbd1552 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Mon, 21 Jan 2019 11:16:22 +0100 Subject: [PATCH 276/376] [Kernel] make yojson a mandatory dependence --- INSTALL.md | 2 +- Makefile | 14 ------- Makefile.generating | 1 - configure.in | 27 +++++-------- doc/userman/user-sources.tex | 5 +-- headers/header_spec.txt | 3 +- man/frama-c.1 | 2 - man/frama-c.1.md | 3 +- nix/default.nix | 2 +- opam/opam | 4 +- share/Makefile.config.in | 11 +---- src/kernel_internals/runtime/config.ml.in | 2 - src/kernel_internals/runtime/config.mli | 5 --- .../json_compilation_database.ko.ml | 34 ---------------- ...ase.ok.ml => json_compilation_database.ml} | 2 +- .../plugin_entry_points/kernel.ml | 40 +++---------------- .../plugin_entry_points/kernel.mli | 2 +- 17 files changed, 27 insertions(+), 132 deletions(-) delete mode 100644 src/kernel_services/ast_queries/json_compilation_database.ko.ml rename src/kernel_services/ast_queries/{json_compilation_database.ok.ml => json_compilation_database.ml} (99%) diff --git a/INSTALL.md b/INSTALL.md index 4fdc7fd8b30..a23be4576a5 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -88,7 +88,7 @@ Frama-C 18 (Argon): - mlgmpidl.1.2.7 (optional) - ocamlgraph.1.8.8 - why3.0.88.3 -- yojson.1.4.1 (optional) +- yojson.1.4.1 - zarith.1.7 Note: *pin recommended* indicates packages likely to become incompatible in diff --git a/Makefile b/Makefile index 5d51fd0d81a..1d64170d82c 100644 --- a/Makefile +++ b/Makefile @@ -646,20 +646,6 @@ GENERATED += $(addprefix src/kernel_internals/parsing/,\ logic_parser.mli logic_preprocess.ml) -ifeq ($(HAS_YOJSON),yes) -src/kernel_services/ast_queries/json_compilation_database.ml: \ - src/kernel_services/ast_queries/json_compilation_database.ok.ml share/Makefile.config - $(CP_IF_DIFF) $< $@ - $(CHMOD_RO) $@ -else -src/kernel_services/ast_queries/json_compilation_database.ml: \ - src/kernel_services/ast_queries/json_compilation_database.ko.ml share/Makefile.config - $(CP_IF_DIFF) $< $@ - $(CHMOD_RO) $@ -endif -GENERATED += src/kernel_services/ast_queries/json_compilation_database.ml - - .PHONY: check-logic-parser-wildcard check-logic-parser-wildcard: cd src/kernel_internals/parsing && ocaml check_logic_parser.ml diff --git a/Makefile.generating b/Makefile.generating index 568a02af72e..04faf2bbc7a 100644 --- a/Makefile.generating +++ b/Makefile.generating @@ -64,7 +64,6 @@ $(CONFIG_FILE): $(CONFIG_FILE).in VERSION VERSION_CODENAME share/Makefile.config -e "s|@COMPILATION_UNITS@|$(COMPILATION_UNITS)|" \ -e "s|@LIBRARY_NAMES@|$(foreach p,$(ALL_LIBRARY_NAMES),\"$p\";)|" \ -e "s|@OPTDOT@|$(OPTDOT)|" \ - -e "s|@HAS_YOJSON@|$(if $(filter yes,$(HAS_YOJSON)),true,false)|" \ -e "s|@EXE@|$(EXE)|" \ -e "s|@MAJOR_VERSION@|$(MAJOR_VERSION)|" \ -e "s|@MINOR_VERSION@|$(MINOR_VERSION)|" \ diff --git a/configure.in b/configure.in index e5bd40a6513..9d7af978abd 100644 --- a/configure.in +++ b/configure.in @@ -322,6 +322,17 @@ else AC_MSG_RESULT(found) fi +# yojson +######## + +AC_MSG_CHECKING(for Yojson) + +YOJSON=$($OCAMLFIND query yojson -format %v) +if test -z "$YOJSON" ; then + AC_MSG_ERROR(Cannot find yojson via ocamlfind \ +(requires yojson 1.4.1 or higher).) +fi + ################################################# # Check for other (optional) tools/libraries # ################################################# @@ -344,21 +355,6 @@ fi AC_CHECK_PROG(OTAGS,otags,otags,) -# yojson -######## - -AC_MSG_CHECKING(for Yojson) - -YOJSON_PATH=$($OCAMLFIND query yojson 2>/dev/null | tr -d '\r\n') -if test -f "$YOJSON_PATH/yojson.$OBJ_SUFFIX"; then - HAS_YOJSON="yes"; - AC_MSG_RESULT(found) -else - HAS_YOJSON="no"; - AC_MSG_RESULT(yojson not found. Kernel option -json-compilation-database won't be available.) -fi; - - # apron ######## @@ -1024,7 +1020,6 @@ AC_SUBST(VERBOSEMAKE) AC_SUBST(DEVELOPMENT) AC_SUBST(DOT) AC_SUBST(HAS_DOT) -AC_SUBST(HAS_YOJSON) AC_SUBST(HAS_APRON) AC_SUBST(HAS_MPFR) AC_SUBST(HAS_LANDMARKS) diff --git a/doc/userman/user-sources.tex b/doc/userman/user-sources.tex index d07054ba2be..0c352fbc84c 100644 --- a/doc/userman/user-sources.tex +++ b/doc/userman/user-sources.tex @@ -1,4 +1,4 @@ -\chapter{Preparing the Sources} +ojson\chapter{Preparing the Sources} \label{user-sources} This chapter explains how to specify the source files that form the @@ -49,8 +49,7 @@ directories (\texttt{-I} switches), as in \texttt{-cpp-extra-args="-DDEBUG -DARCH=ia32 -I./headers"}. If you have a JSON compilation database file\footnote{% - \url{http://clang.llvm.org/docs/JSONCompilationDatabase.html}} (and if your -\FramaC was compiled with \texttt{yojson} support), you can use + \url{http://clang.llvm.org/docs/JSONCompilationDatabase.html}}, you can use it to retrieve preprocessing macros such as \texttt{-D} and \texttt{-I} for each file in the database, via option \optiondef{-}{json-compilation-database} \texttt{<path>}, where \texttt{<path>} diff --git a/headers/header_spec.txt b/headers/header_spec.txt index 7a59f56fa0a..c60f329e2a1 100644 --- a/headers/header_spec.txt +++ b/headers/header_spec.txt @@ -528,9 +528,8 @@ src/kernel_services/ast_queries/file.ml: CEA_LGPL src/kernel_services/ast_queries/file.mli: CEA_LGPL src/kernel_services/ast_queries/filecheck.ml: CEA_LGPL src/kernel_services/ast_queries/filecheck.mli: CEA_LGPL -src/kernel_services/ast_queries/json_compilation_database.ko.ml: CEA_LGPL +src/kernel_services/ast_queries/json_compilation_database.ml: CEA_LGPL src/kernel_services/ast_queries/json_compilation_database.mli: CEA_LGPL -src/kernel_services/ast_queries/json_compilation_database.ok.ml: CEA_LGPL src/kernel_services/ast_queries/logic_const.ml: CEA_INRIA_LGPL src/kernel_services/ast_queries/logic_const.mli: CEA_INRIA_LGPL src/kernel_services/ast_queries/logic_env.ml: CEA_INRIA_LGPL diff --git a/man/frama-c.1 b/man/frama-c.1 index 8195efa760f..a9ad49458ae 100644 --- a/man/frama-c.1 +++ b/man/frama-c.1 @@ -383,8 +383,6 @@ specifications in \f[I]path\f[]. If \f[I]path\f[] is a directory, use \f[B]<path>/compile_commands.json\f[]. Disabled by default. -\f[B]Note\f[]: this option is only available if Frama\-C was compiled -with yojson support. .RS .RE .TP diff --git a/man/frama-c.1.md b/man/frama-c.1.md index 36031b4fd79..b4aece519c7 100644 --- a/man/frama-c.1.md +++ b/man/frama-c.1.md @@ -230,8 +230,7 @@ Defaults to **frama_c_journal**. for more information): each file preprocessed by Frama-C will include corresponding **-I** and **-D** flags according to the specifications in *path*. If *path* is a directory, use **\<path>/compile_commands.json**. -Disabled by default. **Note**: this option is only available if Frama-C was -compiled with yojson support. +Disabled by default. [-no]-keep-comments : tries to preserve comments when pretty-printing the source code. diff --git a/nix/default.nix b/nix/default.nix index 4cc5134a468..3717e307479 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -3,7 +3,7 @@ let mk_buildInputs = { opamPackages ? [] } : [ pkgs.gnugrep pkgs.gnused pkgs.autoconf pkgs.gnumake pkgs.gcc pkgs.ncurses pkgs.time pkgs.python3 pkgs.perl pkgs.file] ++ opam2nix.build { - specs = opam2nix.toSpecs ([ "ocamlfind" "zarith" "ocamlgraph" + specs = opam2nix.toSpecs ([ "ocamlfind" "zarith" "ocamlgraph" "yojson" { name = "coq"; constraint = "=8.7.2"; } ] ++ opamPackages ++ (if ocaml_version == "pkgs.ocaml-ng.ocamlPackages_4_02.ocaml" diff --git a/opam/opam b/opam/opam index d8f0366beb9..e5bb63baad4 100644 --- a/opam/opam +++ b/opam/opam @@ -94,10 +94,10 @@ depends: [ "conf-gtksourceview" ( "alt-ergo-free" | "alt-ergo" ) "conf-graphviz" { post } + "yojson" ] depopts: [ - "yojson" { build & >= "1.6.0" } "coq" { build } "why3" { build } "mlgmpidl" { build } @@ -116,8 +116,6 @@ conflicts: [ ] messages: [ - "Yojson enables kernel option -json-compilation-database" - {!yojson:installed} "Why3 can be used by the WP plug-in for running additional automatic solvers" {!why3:installed} "Coq can be used with the WP plug-in for proving interactively proof obligations" diff --git a/share/Makefile.config.in b/share/Makefile.config.in index af34cfa5a5c..f6b545148e7 100644 --- a/share/Makefile.config.in +++ b/share/Makefile.config.in @@ -120,9 +120,6 @@ endif # lablgnomecanvas HAS_GNOMECANVAS ?=@HAS_GNOMECANVAS@ -# yojson -HAS_YOJSON ?=@HAS_YOJSON@ - # apron HAS_APRON ?=@HAS_APRON@ @@ -160,9 +157,7 @@ THREAD_IS_KEYWORD ?=@THREAD_IS_KEYWORD@ TEST_DIRS_AS_PLUGIN:=\ dynamic dynamic_plugin journal saveload spec misc syntax cil \ pretty_printing builtins libc value fc_script -ifeq ("$(HAS_YOJSON)","yes") TEST_DIRS_AS_PLUGIN+=jcdb -endif PLUGIN_TESTS_LIST+=$(TEST_DIRS_AS_PLUGIN) ########################## @@ -190,16 +185,12 @@ ENABLE_USERS ?=@ENABLE_USERS@ ENABLE_EVA ?=@ENABLE_EVA@ #bytes is part of the stdlib, but is used as a transitional package. -LIBRARY_NAMES := findlib ocamlgraph unix str dynlink bytes zarith +LIBRARY_NAMES := findlib ocamlgraph unix str dynlink bytes zarith yojson ifeq ($(HAS_LANDMARKS),yes) LIBRARY_NAMES += landmarks landmarks.ppx endif -ifeq ($(HAS_YOJSON),yes) -LIBRARY_NAMES += yojson -endif - ifneq ($(ENABLE_GUI),no) LIBRARY_NAMES_GUI = $(LABLGTK) $(GTKSOURCEVIEW) ifeq ($(HAS_GNOMECANVAS),yes) diff --git a/src/kernel_internals/runtime/config.ml.in b/src/kernel_internals/runtime/config.ml.in index c0f5852814a..cb7c24c0576 100644 --- a/src/kernel_internals/runtime/config.ml.in +++ b/src/kernel_internals/runtime/config.ml.in @@ -97,6 +97,4 @@ let preprocessor_keep_comments = let compilation_unit_names = [@COMPILATION_UNITS@] let library_names = [@LIBRARY_NAMES@] -let has_yojson = @HAS_YOJSON@ - let dot = @OPTDOT@ diff --git a/src/kernel_internals/runtime/config.mli b/src/kernel_internals/runtime/config.mli index d223daf3b96..80c125ae0c0 100644 --- a/src/kernel_internals/runtime/config.mli +++ b/src/kernel_internals/runtime/config.mli @@ -130,11 +130,6 @@ val dot: string option @return [None] if `dot' is not installed. @since Carbon-20101201 *) -val has_yojson: bool -(** [true] if Frama-C has been compiled with yojson support. - @since Chlorine-20180501 -*) - (* Local Variables: compile-command: "make -C ../../.." diff --git a/src/kernel_services/ast_queries/json_compilation_database.ko.ml b/src/kernel_services/ast_queries/json_compilation_database.ko.ml deleted file mode 100644 index 1536859cce6..00000000000 --- a/src/kernel_services/ast_queries/json_compilation_database.ko.ml +++ /dev/null @@ -1,34 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat à l'énergie atomique et aux énergies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -let get_flags _ = - let db = Kernel.JsonCompilationDatabase.get () in - if db <> "" then begin - (* If Yojson is disabled, JsonCompilationDatabase prevents any attempt - to set the option to a non-empty string. If someone bypasses the - mechanism with an unsafe_set, they deserve a fatal error. - *) - Kernel.fatal - "Attempt to parse json compilation database %s \ - with a Frama-C compiled without Yojson support." db - end; - [] diff --git a/src/kernel_services/ast_queries/json_compilation_database.ok.ml b/src/kernel_services/ast_queries/json_compilation_database.ml similarity index 99% rename from src/kernel_services/ast_queries/json_compilation_database.ok.ml rename to src/kernel_services/ast_queries/json_compilation_database.ml index 8d31f5b6709..e813c4ddcb7 100644 --- a/src/kernel_services/ast_queries/json_compilation_database.ok.ml +++ b/src/kernel_services/ast_queries/json_compilation_database.ml @@ -131,7 +131,7 @@ let split_command_args s = never need quotes. *) let quote_define_argument arg = Format.sprintf "%S" arg -let parse_entry ?(cwd=Sys.getcwd()) (r : Yojson.Basic.t) = +let parse_entry ?(cwd=Sys.getcwd()) r = let open Yojson.Basic.Util in let filename = r |> member "file" |> to_string in let dirname = r |> member "directory" |> to_string_option |> Extlib.opt_conv "" in diff --git a/src/kernel_services/plugin_entry_points/kernel.ml b/src/kernel_services/plugin_entry_points/kernel.ml index 31065775b51..e77d3bf7ff4 100644 --- a/src/kernel_services/plugin_entry_points/kernel.ml +++ b/src/kernel_services/plugin_entry_points/kernel.ml @@ -1024,48 +1024,20 @@ module C11 = let () = Parameter_customize.set_group parsing let () = Parameter_customize.do_not_reset_on_copy () -module JsonCompilationDatabaseOption = +module JsonCompilationDatabase = String (struct - let module_name = "JsonCompilationDatabaseOption" + let module_name = "JsonCompilationDatabase" let option_name = "-json-compilation-database" let default = "" let arg_name = "path" let help = - if Fc_config.has_yojson then - "when set, preprocessing of each file will include corresponding \ - flags (e.g. -I, -D) from the JSON compilation database \ - specified by <path>. If <path> is a directory, use \ - '<path>/compile_commands.json'. Disabled by default. \ - NOTE: this requires Frama-C to be compiled with yojson support." - else - "Unsupported: recompile Frama-C with Yojson library to enable it" - end) - -(* This module holds the real value of the option. It is only updated - if Yojson support has been compiled. Otherwise, attempt to use - -json-compilation-database results in a warning. -*) -module JsonCompilationDatabase = - State_builder.Ref(Datatype.String) - (struct - let name = "JsonCompilationDatabase" - let dependencies = [ JsonCompilationDatabaseOption.self ] - let default () = "" + "when set, preprocessing of each file will include corresponding \ + flags (e.g. -I, -D) from the JSON compilation database \ + specified by <path>. If <path> is a directory, use \ + '<path>/compile_commands.json'. Disabled by default." end) -let () = - if Fc_config.has_yojson then - JsonCompilationDatabaseOption.add_set_hook - (fun _ new_opt -> JsonCompilationDatabase.set new_opt) - else begin - JsonCompilationDatabaseOption.add_set_hook - (fun _ _ -> - warning ~once:true - "trying to set -json-compilation-database even though Yojson \ - is not available. Ignoring argument.") - end - (* ************************************************************************* *) (** {2 Customizing Normalization} *) (* ************************************************************************* *) diff --git a/src/kernel_services/plugin_entry_points/kernel.mli b/src/kernel_services/plugin_entry_points/kernel.mli index c837fb5a091..cf9edf9d0fb 100644 --- a/src/kernel_services/plugin_entry_points/kernel.mli +++ b/src/kernel_services/plugin_entry_points/kernel.mli @@ -444,7 +444,7 @@ module ImplicitFunctionDeclaration: Parameter_sig.String module C11: Parameter_sig.Bool (** Behavior of option "-c11" *) -module JsonCompilationDatabase: State_builder.Ref with type data = string +module JsonCompilationDatabase: Parameter_sig.String (** Behavior of option "-json-compilation-database" *) (* ************************************************************************* *) -- GitLab From 6267f880b2dbff7e9eb627360edd8c4608399073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Bobot?= <francois.bobot@cea.fr> Date: Fri, 12 Apr 2019 16:27:36 +0200 Subject: [PATCH 277/376] [Nix] Export buildInputs --- nix/default.nix | 6 +++--- nix/frama-ci.nix | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nix/default.nix b/nix/default.nix index 3717e307479..04a61cb18b3 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -1,8 +1,8 @@ # paramaterised derivation with dependencies injected (callPackage style) { pkgs, stdenv, src ? ../., opam2nix, ocaml_version ? "ocaml-ng.ocamlPackages_4_05.ocaml", plugins ? { } }: -let mk_buildInputs = { opamPackages ? [] } : - [ pkgs.gnugrep pkgs.gnused pkgs.autoconf pkgs.gnumake pkgs.gcc pkgs.ncurses pkgs.time pkgs.python3 pkgs.perl pkgs.file] ++ opam2nix.build { +let mk_buildInputs = { opamPackages ? [], nixPackages ? [] } : + [ pkgs.gnugrep pkgs.gnused pkgs.autoconf pkgs.gnumake pkgs.gcc pkgs.ncurses pkgs.time pkgs.python3 pkgs.perl] ++ nixPackages ++ opam2nix.build { specs = opam2nix.toSpecs ([ "ocamlfind" "zarith" "ocamlgraph" "yojson" { name = "coq"; constraint = "=8.7.2"; } ] ++ opamPackages ++ @@ -15,7 +15,7 @@ let mk_buildInputs = { opamPackages ? [] } : in rec { - inherit src; + inherit src mk_buildInputs; buildInputs = mk_buildInputs {}; installed = main.out; main = stdenv.mkDerivation { diff --git a/nix/frama-ci.nix b/nix/frama-ci.nix index e26a55d0f05..3976ce7088a 100644 --- a/nix/frama-ci.nix +++ b/nix/frama-ci.nix @@ -5,8 +5,8 @@ let src = builtins.fetchGit { "url" = "https://bobot:${password}@git.frama-c.com/frama-c/Frama-CI.git"; "name" = "Frama-CI"; - "rev" = "70045f4252e668e0facad12d7db2c6ab83fc813b"; - "ref" = "master"; + "rev" = "ed541f6e3818da2bf31125740b8555acb086ca29"; + "ref" = "feature/andre/yojson-mandatory-dependence"; }; in { -- GitLab From 32e1e006041d9cb894763b93ecfffbf662b3a692 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 18 Apr 2019 18:29:12 +0200 Subject: [PATCH 278/376] =?UTF-8?q?[typing]=20cleaning=20up=20unused=20loc?= =?UTF-8?q?als,=20again=20=F0=9F=9A=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/kernel_internals/typing/cabs2cil.ml | 19 ++++++++++++++++--- tests/syntax/local-variable.i | 3 +++ tests/syntax/oracle/local-variable.res.oracle | 8 ++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index 7f5b53a7cd8..b66c18cb4e1 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -1628,13 +1628,26 @@ struct (fun (stmt, _, _, _, _) -> ignore (Cil.visitCilStmt vis stmt)) c.stmts - (* if we're about to drop a chunk, clean up locals of current func. *) - let clean_up_chunk_locals c = + let remove_locals l = !currentFunctionFDEC.slocals <- List.filter - (fun x -> not (List.exists (Cil_datatype.Varinfo.equal x) c.locals)) + (fun x -> not (List.exists (Cil_datatype.Varinfo.equal x) l)) !currentFunctionFDEC.slocals + let clean_up_block_locals (s, _, _, _, _) = + let vis = + object + inherit Cil.nopCilVisitor + method! vblock b = remove_locals b.blocals; DoChildren + end + in + ignore (Cil.visitCilStmt vis s) + + (* if we're about to drop a chunk, clean up locals of current func. *) + let clean_up_chunk_locals c = + remove_locals c.locals; + List.iter clean_up_block_locals c.stmts + (* Gathers locals of blocks. *) class locals_visitor () = object inherit Cil.nopCilVisitor diff --git a/tests/syntax/local-variable.i b/tests/syntax/local-variable.i index 52067d1dcec..6e6d1b453d0 100644 --- a/tests/syntax/local-variable.i +++ b/tests/syntax/local-variable.i @@ -10,3 +10,6 @@ void f() { int b; } } + +int c; +int g() { return 1 || (-1L || g(), c); } diff --git a/tests/syntax/oracle/local-variable.res.oracle b/tests/syntax/oracle/local-variable.res.oracle index e7cfa00d9cd..13981c13468 100644 --- a/tests/syntax/oracle/local-variable.res.oracle +++ b/tests/syntax/oracle/local-variable.res.oracle @@ -16,4 +16,12 @@ void f(void) return; } +int c; +int g(void) +{ + int __retres; + __retres = 1; + return __retres; +} + -- GitLab From 2463ed66c269cf8aea94f4fb295b1926f8159d02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Bobot?= <francois.bobot@cea.fr> Date: Fri, 19 Apr 2019 13:30:26 +0200 Subject: [PATCH 279/376] Change default branch from master to stable/potassium --- .gitlab-ci.yml | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 04fd07dcf36..a5287d1710c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ git-update: stage: git-update variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -21,7 +21,7 @@ frama-c: stage: build variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -33,7 +33,7 @@ lint: stage: build variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -46,7 +46,7 @@ tests: stage: tests variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -58,7 +58,7 @@ wp-qualif: stage: tests variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -71,7 +71,7 @@ genassigns: stage: tests variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -83,7 +83,7 @@ counter-examples: stage: tests variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -95,7 +95,7 @@ acsl-importer: stage: tests variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -107,7 +107,7 @@ volatile: stage: tests variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -119,7 +119,7 @@ E-ACSL: stage: tests variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -131,7 +131,7 @@ Security: stage: tests variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -143,7 +143,7 @@ CFP: stage: tests variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -155,7 +155,7 @@ build-distrib-tarball: stage: build variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -167,7 +167,7 @@ build-from-distrib-tarball: stage: tests variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -179,7 +179,7 @@ internal: stage: distrib_and_compatibility variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -198,7 +198,7 @@ internal: frama-c-ocaml-4.02: variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_02" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" <<: *frama-c-ocaml @@ -206,7 +206,7 @@ frama-c-ocaml-4.02: frama-c-ocaml-4.03: variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_03" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" <<: *frama-c-ocaml @@ -214,7 +214,7 @@ frama-c-ocaml-4.03: frama-c-ocaml-4.04: variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_04" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" <<: *frama-c-ocaml @@ -222,7 +222,7 @@ frama-c-ocaml-4.04: frama-c-ocaml-4.06: variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_06" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" <<: *frama-c-ocaml @@ -230,7 +230,7 @@ frama-c-ocaml-4.06: frama-c-ocaml-4.07: variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_07" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" <<: *frama-c-ocaml @@ -239,7 +239,7 @@ caveat-importer: stage: tests variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -251,7 +251,7 @@ mthread: stage: tests variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: @@ -263,7 +263,7 @@ pathcrawler: stage: tests variables: CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "master" + DEFAULT: "stable/potassium" OCAML: "4_05" FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: -- GitLab From 31c4b6df8c0c300157bd4684912ba333ccf44ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Bobot?= <francois.bobot@cea.fr> Date: Fri, 19 Apr 2019 13:36:39 +0200 Subject: [PATCH 280/376] [CI] Factorize variables definition --- .gitlab-ci.yml | 74 ++++---------------------------------------------- 1 file changed, 5 insertions(+), 69 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a5287d1710c..b2f5b097520 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,14 +4,16 @@ stages: - tests - distrib_and_compatibility +variables: + CURRENT: $CI_COMMIT_REF_NAME + DEFAULT: "stable/potassium" + FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" + #avoid a nix error https://github.com/NixOS/nix/issues/2087 git-update: stage: git-update variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh instantiate --eval -A frama-c.src.outPath tags: @@ -20,10 +22,7 @@ git-update: frama-c: stage: build variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A frama-c.installed tags: @@ -32,10 +31,7 @@ frama-c: lint: stage: build variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A frama-c.lint coverage: '/lint coverage: \d+\.\d+/' @@ -45,10 +41,7 @@ lint: tests: stage: tests variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A frama-c.tests tags: @@ -57,10 +50,7 @@ tests: wp-qualif: stage: tests variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A frama-c.wp-qualif tags: @@ -70,10 +60,7 @@ wp-qualif: genassigns: stage: tests variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A genassigns.tests tags: @@ -82,10 +69,7 @@ genassigns: counter-examples: stage: tests variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A counter-examples.tests tags: @@ -94,10 +78,7 @@ counter-examples: acsl-importer: stage: tests variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A acsl-importer.tests tags: @@ -106,10 +87,7 @@ acsl-importer: volatile: stage: tests variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A volatile.tests tags: @@ -118,10 +96,7 @@ volatile: E-ACSL: stage: tests variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A e-acsl.tests tags: @@ -130,10 +105,7 @@ E-ACSL: Security: stage: tests variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A security.tests tags: @@ -142,10 +114,7 @@ Security: CFP: stage: tests variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A context-from-precondition.tests tags: @@ -154,10 +123,7 @@ CFP: build-distrib-tarball: stage: build variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A frama-c.build-distrib-tarball tags: @@ -166,10 +132,7 @@ build-distrib-tarball: build-from-distrib-tarball: stage: tests variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A frama-c.build-from-distrib-tarball tags: @@ -178,10 +141,7 @@ build-from-distrib-tarball: internal: stage: distrib_and_compatibility variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A frama-c.internal tags: @@ -197,51 +157,33 @@ internal: frama-c-ocaml-4.02: variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_02" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" <<: *frama-c-ocaml frama-c-ocaml-4.03: variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_03" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" <<: *frama-c-ocaml frama-c-ocaml-4.04: variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_04" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" <<: *frama-c-ocaml frama-c-ocaml-4.06: variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_06" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" <<: *frama-c-ocaml frama-c-ocaml-4.07: variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_07" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" <<: *frama-c-ocaml caveat-importer: stage: tests variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A caveat-importer.tests tags: @@ -250,10 +192,7 @@ caveat-importer: mthread: stage: tests variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A mthread.tests tags: @@ -262,10 +201,7 @@ mthread: pathcrawler: stage: tests variables: - CURRENT: $CI_COMMIT_REF_NAME - DEFAULT: "stable/potassium" OCAML: "4_05" - FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA" script: - nix/frama-ci.sh build -A pathcrawler.tests tags: -- GitLab From 12d48dfc29616fedf258a9ace80f079845331836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 19 Apr 2019 14:12:20 +0200 Subject: [PATCH 281/376] [wp] update ranks in qualif tests --- .../wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json index 47905d279b0..910cff1aa78 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json @@ -36,12 +36,12 @@ "memcpy_loop_assigns": { "alt-ergo": { "total": 1, "valid": 1, - "rank": 43 }, + "rank": 40 }, "qed": { "total": 2, "valid": 2 }, "wp:main": { "total": 3, "valid": 3, - "rank": 43 } }, + "rank": 40 } }, "memcpy_ensures_result_ptr": { "qed": { "total": 1, "valid": 1 }, -- GitLab From 8ae5d5e9589c3a8d5379eb620fe7b0c812687ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 19 Apr 2019 15:11:25 +0200 Subject: [PATCH 282/376] [why3] update configuration for 1.0.0+ --- INSTALL.md | 6 +- nix/default.nix | 2 +- opam/opam | 5 +- src/plugins/wp/configure.ac | 8 +- src/plugins/wp/doc/manual/wp_plugin.tex | 111 ++++++++++++------------ 5 files changed, 65 insertions(+), 67 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index a23be4576a5..854f2dbba76 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -81,13 +81,13 @@ The following set of packages is known to be a working configuration for Frama-C 18 (Argon): - OCaml 4.05.0 -- alt-ergo.1.30 or, under a non-commercial license, alt-ergo.2.0.0 (pin recommended) +- alt-ergo.2.0.0 (pin recommanded) - apron.20160125 (optional) -- coq.8.7.2 (optional; pin recommended) +- coq.8.9.0 (optional; pin recommended) - lablgtk.2.18.5 - mlgmpidl.1.2.7 (optional) - ocamlgraph.1.8.8 -- why3.0.88.3 +- why3.1.2.0 - yojson.1.4.1 - zarith.1.7 diff --git a/nix/default.nix b/nix/default.nix index 04a61cb18b3..ee41f8418bb 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -150,7 +150,7 @@ rec { name = "frama-c-wp-qualif"; buildInputs = mk_buildInputs { opamPackages = [ { name = "alt-ergo"; constraint = "=2.0.0"; } - { name = "why3" ; constraint = "=0.88.3"; } + { name = "why3" ; constraint = "=1.2.0"; } ]; }; build_dir = main.build_dir; src = main.build_dir + "/dir.tar"; diff --git a/opam/opam b/opam/opam index e5bb63baad4..6b874e248e2 100644 --- a/opam/opam +++ b/opam/opam @@ -105,9 +105,8 @@ depopts: [ ] conflicts: [ - "why3-base" { < "0.88" } #for WP plug-in - "why3" { >= "1.0.0" } #for WP plug-in - "coq" { < "8.4.6" } #for WP plug-in + "why3-base" #for WP plug-in + "why3" { < "1.0.0" } #for WP plug-in "lablgtk" { < "2.18.2" } #for ocaml >= 4.02.1 "frama-c-e-acsl" #avoid mixing old releases of E-ACSL, it is already #distributed with this version of Frama-C diff --git a/src/plugins/wp/configure.ac b/src/plugins/wp/configure.ac index 34e1e4f5c31..c07fd5132cc 100644 --- a/src/plugins/wp/configure.ac +++ b/src/plugins/wp/configure.ac @@ -64,7 +64,7 @@ if test "$ENABLE_WP" != "no"; then if test "$COQC" = "yes" ; then COQVERSION=`coqc -v | sed -n -e 's|.*version* *\([[^ ]]*\) .*$|\1|p' ` case $COQVERSION in - 8.5*|8.6*|8.7*|trunk) + 8.8*|8.9*|trunk) AC_MSG_RESULT(coqc version $COQVERSION found) ;; *) @@ -73,7 +73,7 @@ if test "$ENABLE_WP" != "no"; then ;; esac else - AC_MSG_NOTICE(rerun configure to make wp using coq 8.5+) + AC_MSG_NOTICE(rerun configure to make wp using coq 8.8+) fi else COQC="no" @@ -86,7 +86,7 @@ if test "$ENABLE_WP" != "no"; then if test "$WHY3COQC" = "yes" ; then WHY3VERSION=`why3 --version | sed -n -e 's|.*version *\([[^ ]]*\)$|\1|p' ` case $WHY3VERSION in - 0.88*) + 1.*) AC_MSG_RESULT(why3 version $WHY3VERSION found) WHY3LIB=`why3 --print-libdir` if test -f $WHY3LIB/coq/BuiltIn.vo ; then @@ -102,7 +102,7 @@ if test "$ENABLE_WP" != "no"; then ;; esac else - AC_MSG_NOTICE(rerun configure to make wp using why3 0.88) + AC_MSG_NOTICE(rerun configure to make wp using why3 (1.0.0+)) fi else WHY3COQC="no" diff --git a/src/plugins/wp/doc/manual/wp_plugin.tex b/src/plugins/wp/doc/manual/wp_plugin.tex index 478983a60bd..1e70862cd8a 100644 --- a/src/plugins/wp/doc/manual/wp_plugin.tex +++ b/src/plugins/wp/doc/manual/wp_plugin.tex @@ -1,7 +1,7 @@ \chapter{Using the WP Plug-in} \label{wp-plugin} -The \textsf{WP} plug-in can be used from the \textsf{Frama-C} command line +The \textsf{WP} plug-in can be used from the \textsf{Frama-C} command line or within its graphical user interface. It is a dynamically loaded plug-in, distributed with the kernel since the \textsf{Carbon} release of \textsf{Frama-C}. @@ -34,11 +34,11 @@ The natively supported provers are: \begin{tabular}{crlc} Prover & Version & Download &\\ \hline - \textsf{Alt-Ergo} & \verb|0.99.1| to \verb|2.0.0| & + \textsf{Alt-Ergo} & \verb|1.0.0+| and \verb|2.0.0+| & \url{http://alt-ergo.ocamlpro.com} & \cite{AltErgo2006}\\ - \textsf{Coq} & \verb|8.5|, \verb|8.6| or \verb|8.7| & + \textsf{Coq} & \verb|8.9|, \verb|8.8| & \url{http://coq.inria.fr} & \cite{Coq84}\\ - \textsf{Why3} & \verb|0.88+| & + \textsf{Why3} & \verb|1.1.0+| & \url{http://why3.lri.fr} & \cite{Why3}\\ \end{tabular} \end{center} @@ -55,7 +55,7 @@ of \textsf{Frama-C/WP}. However, when using \textsf{Coq} and \textsf{Why-3}, it is better to install them before, or to re-configure and re-install \textsf{WP}, as explained below. -\paragraph{Configuration.} When using \textsf{Coq} and \textsf{Why-3}, pre-compiled +\paragraph{Configuration.} When using \textsf{Coq} and \textsf{Why-3}, pre-compiled libraries are built during the compilation of \textsf{Frama-C}, which speed up the proof process in a significant way. This behavior can be turned on/off at configure time, typically: @@ -63,14 +63,14 @@ turned on/off at configure time, typically: # configure --disable-wp-coq --disable-wp-why3 \end{logs} -\paragraph{Compilation.} If you want to compile the \textsf{Coq} and \textsf{Why-3} +\paragraph{Compilation.} If you want to compile the \textsf{Coq} and \textsf{Why-3} libraries manually, you can still run: \begin{logs} # make wp-coq wp-why3 # [sudo] make wp-coq-install \end{logs} -\paragraph{Remark.} The \textsf{Why}~\cite{Filliatre2003} prover is no longer supported +\paragraph{Remark.} The \textsf{Why}~\cite{Filliatre2003} prover is no longer supported since \textsf{WP} version \verb+0.7+ (Fluorine). \clearpage @@ -128,7 +128,7 @@ for more details. In the graphical user interface, there are also specific panels that display more details related to the \textsf{WP} plug-in, that we shortly describe below. -\paragraph{Source Panel.} On the center of the \textsf{Frama-C} window, the status +\paragraph{Source Panel.} On the center of the \textsf{Frama-C} window, the status of each code annotation is reported in the left margin. The meaning of icons is the same for all plug-ins in \textsf{Frama-C} and more precisely described in the general user's manual of the platform. The status emitted by the \textsf{WP} plug-in are: @@ -155,7 +155,7 @@ as proof-script editing for \textsf{Coq}. \paragraph{Interactive Proof Editor.} From the Goals Panel view, you can double-click on a row and open the \emph{interactive proof editor} panel as described in section~\ref{wp-proof-editor}. -\paragraph{Properties Panel.} This panel summarizes the consolidated +\paragraph{Properties Panel.} This panel summarizes the consolidated status of properties, from various plug-ins. This panel is not automatically refreshed. You should press the \texttt{Refresh} button to update it. This panel is described in more details in the general @@ -220,7 +220,7 @@ With memory model unmangled, the encoding in logic formulae is revealed and no l \subsection{Tactics} -The right panel display a palette of tactics to be applied on the current goal. Tooltips are provided to help the user understanding how to configure and run tactics. +The right panel display a palette of tactics to be applied on the current goal. Tooltips are provided to help the user understanding how to configure and run tactics. Only applicable tactics are displayed, with respect to current term or clause selected. Many tactics can be configured by the user to tune their effect. Click on the tactic button to toggle its control panel. Once a tactic is correctly configured, it can be applied by clicking its « Play » button. @@ -300,7 +300,7 @@ Any number of phase a. and b. can be executed and interleaved. This incrementall c. Consolidating the Bench. \begin{logs} - frama-c [...] -wp-prover script,alt-ergo + frama-c [...] -wp-prover script,alt-ergo \end{logs} This mode replays the automated proofs and the interactive ones, re-running Alt-Ergo on every WP goals and every proof tactic sub-goals. The user scripts are never modified — this is a replay mode only. @@ -448,12 +448,12 @@ the equality is decomposed into $N$ bit-tests equalities: \[\TACTIC{\Delta\models G}{% \begin{array}[t]{rcl} \Delta\phantom{)} &\models & 0 \leq a,b < 2^N \\ -\sigma(\Delta) & \models & \sigma(G) +\sigma(\Delta) & \models & \sigma(G) \end{array} }\] where $\sigma$ is the following subsitution: -\[ \sigma \equiv -\left[ a=b \quad \leftarrow +\[ \sigma \equiv +\left[ a=b \quad \leftarrow \bigwedge_{k\in 0..N-1} \mathtt{bit\_test}(a,k) = \mathtt{bit\_test}(b,k) \right] \] @@ -464,14 +464,14 @@ to the \textsf{ACSL} expression \lstinline{(a & (1 << k)) != 0}. The such patterns, and the a tactic is good way to reason over bits. \paragraph{Shift} Transform logical shifts into arithmetics\\ -For positive integers, logical shifts such as \lstinline{a << k} +For positive integers, logical shifts such as \lstinline{a << k} and \lstinline{a >> k} where \lstinline$k$ is a constant can be interpreted into a multiplication or a division by $2^k$. When selecting a logical-shift, the tactic performs: \[\TACTIC{\Delta\models G}{% \begin{array}[t]{rcl} \Delta\phantom{)} &\models& 0 \leq a \\ -\sigma(\Delta) &\models& \sigma(G) +\sigma(\Delta) &\models& \sigma(G) \end{array} }\] where: @@ -520,7 +520,7 @@ k|n, & a = n/k &\Longleftrightarrow& k.a = n \\ \neg(k|n), & k.a = n & \Longrightarrow & \mathtt{false} \\ 0<k, & a < k.(b+1) &\Longrightarrow& a/k < b \\ 0<k, 0<k', & k'.a < k.b &\Longrightarrow& a/k < b/k' \\ -n|k, n|k', & (k/n).a = (k'/n).b &\Longleftrightarrow& k.a = k'.b +n|k, n|k', & (k/n).a = (k'/n).b &\Longleftrightarrow& k.a = k'.b \end{array} \] @@ -533,7 +533,7 @@ with pattern $\mathtt{to\_iota(e)}$ where \texttt{iota} is a a machine-integer n \[\TACTIC{\Delta\models G}{% \begin{array}[t]{rcl} \Delta\phantom{)} &\models & a \leq e \leq b \\ -\sigma(\Delta) & \models & \sigma(G) +\sigma(\Delta) & \models & \sigma(G) \end{array} }\] where $\sigma = [ \mathtt{to\_iota}(e) \mapsto e ]$ and $[a..b]$ is the range @@ -616,13 +616,13 @@ let () = Strategy.register (new dummy) Then, simply extend your command line with the following options to make your strategy available from the interactive proof editor: \begin{logs} -> frama-c-gui -load-module dummy.ml [...] +> frama-c-gui -load-module dummy.ml [...] \end{logs} \paragraph{Note:} Loading custom strategies is only required when running the graphical user interface (\texttt{frama-c-gui}). When replaying scripts from the command line (\texttt{frama-c}), only custom tactics and custom composers actually involved in proofs are required to be loaded. The example custom strategy above is structured as follows. First we open the module \lstinline$Wp$ to simplify -access to the API. A custom strategy must be an instance of class-type \lstinline$Strategy.heuristic$, and we use a coercion here to explicit types. Methods \lstinline$#id$, \lstinline$#title$ and \lstinline$#descr$ are required and describes the strategy, making it available from the tactic panel in the graphical user interface. +access to the API. A custom strategy must be an instance of class-type \lstinline$Strategy.heuristic$, and we use a coercion here to explicit types. Methods \lstinline$#id$, \lstinline$#title$ and \lstinline$#descr$ are required and describes the strategy, making it available from the tactic panel in the graphical user interface. The actual heuristic code takes place in method \lstinline$#search$ which has the following type (consult the html API for details): \begin{lstlisting}[language=ocaml] @@ -630,12 +630,12 @@ The actual heuristic code takes place in method \lstinline$#search$ which has th \end{lstlisting} This method takes two parameters: a strategy registration callback and the sequent to prove. Each heuristic -is supposed to register any number of strategies to be tried on the provided sequent. In turn, each strategy +is supposed to register any number of strategies to be tried on the provided sequent. In turn, each strategy is a record consisting of a priority, a tactic, a target selection for the tactic and its arguments. It is possible to build such a record by hand, using custom or predefined tactics. However, it is much more convenient to use the helper functions from module \lstinline$Auto$ that directly build strategies. -In the example above, we inspect the structure of the goal, and when a conjunction is detected (\lstinline$And _$), +In the example above, we inspect the structure of the goal, and when a conjunction is detected (\lstinline$And _$), we decide to register a split tactic, thanks to the helper function \lstinline$Auto.split$. Default priority is \lstinline$1.0$ by convention. Pre-installed strategies would only use range $[0.5\ldots2.0]$ of priorities. You can use any value you want inside or outside this range. In the example below, we assign a high priority to the split of goal conjunctions, meaning that such a split should be tried first. \paragraph{Using Selections.} Tactics always need a \lstinline$selection$ target. Moreover, some tactics require additional parameters, also to be provided as \lstinline$selection$ values. Typically, consider the \lstinline$Auto.range$ tactic: @@ -758,9 +758,9 @@ interface of the programmatic API. \texttt{@invariant}, \texttt{@variant}, \texttt{@breaks}, \texttt{@continues}, \texttt{@returns}, \\ \texttt{\mbox{@complete\_behaviors}}, \texttt{\mbox{@disjoint\_behaviors}}. - \\ + \\ Properties can be prefixed with a minus sign to \emph{skip} the associated annotations. - For example \texttt{-wp-prop="-@assigns"} removes all \texttt{assigns} + For example \texttt{-wp-prop="-@assigns"} removes all \texttt{assigns} and \texttt{loop assigns} properties from the selection. \\ \textbf{Remark:} properties with name \verb+no_wp:+ are always and automatically @@ -792,7 +792,7 @@ are taken into account by \textsf{WP} plug-in as follows: These options impact the generation of proof-obligations for the ``\texttt{requires}'' contract of the main entry point. More precisely, if there is a main entry point, \emph{and} \texttt{-lib-entry} is not set: -\begin{itemize} +\begin{itemize} \item the global variables are set to their initial values at the beginning of the main entry point for all its properties to be established; \item special proof obligations are generated for the preconditions of the @@ -949,7 +949,7 @@ controlled by the following options: \begin{description} \item[\tt -wp-(no)-simpl] simplifies constant expressions and tautologies (default is: \texttt{yes}). -\item[\tt -wp-(no)-let] propagates equalities by substitutions +\item[\tt -wp-(no)-let] propagates equalities by substitutions and let-bindings (default is: \texttt{yes}). \item[\tt -wp-(no)-core] factorize common properties between branches (default is: \texttt{yes}). @@ -967,7 +967,7 @@ controlled by the following options: (default is: \texttt{yes}). \item[\tt -wp-(no)-init-summarize-array] summarize contiguous initializers with quantified formulae (default: \texttt{yes}). -\item[\tt -wp-(no)-simplify-is-cint] eliminates redundant constraints on integers +\item[\tt -wp-(no)-simplify-is-cint] eliminates redundant constraints on integers (default: \texttt{yes}). \item[\tt -wp-(no)-simplify-land-mask] tight constants in logical-and with unsigned integers (default: \texttt{yes}). @@ -1040,15 +1040,15 @@ version \verb+0.99+ of the prover, but more recent versions \verb+1.01+ or \item[\tt -wp-prover alt-ergo] selects \textsf{Alt-Ergo}. \item[\tt -wp-prover altgr-ergo] opens the graphical interface of \textsf{Alt-Ergo} when the goal is not proved. -\item[\tt -wp-steps <$n$>] sets the maximal number of \textsf{Alt-Ergo} +\item[\tt -wp-steps <$n$>] sets the maximal number of \textsf{Alt-Ergo} steps. This can be used as a machine-independent alternative to timeout. \item[\tt -wp-depth <$n$>] sets '\textit{stop}' and '\textit{age-limit}' parameters of \textsf{Alt-Ergo} such that $n$ cycles of quantifier instantiations are enabled. \item[\tt -wp-alt-ergo-opt <opt,...>] passes additional options to \textsf{Alt-Ergo} (default: none). -\item[\tt -wp-alt-ergo='<cmd>'] override the \verb+alt-ergo+ command. -\item[\tt -wp-altgr-ergo='<cmd>'] override the \verb+altgr-ergo+ command. +\item[\tt -wp-alt-ergo='<cmd>'] override the \verb+alt-ergo+ command. +\item[\tt -wp-altgr-ergo='<cmd>'] override the \verb+altgr-ergo+ command. \end{description} \hrule @@ -1095,7 +1095,7 @@ then save the proof scripts in order to replay them in batch mode. This conforms to Proof General 4.3 settings. The project file can be changed (see below). \item[\tt -wp-coq-project='<name>'] override the \verb+_CoqProject+ file name - for Emacs and Proof General. + for Emacs and Proof General. \end{description} \hrule @@ -1168,9 +1168,9 @@ procedures. This support is provided for \textsf{Alt-Ergo}, libraries and driver files are looked for. The current directory (implicitly added to that list) is always looked up first. - Relative directory names are relative to the current directory except - for names prefixed by the characters \texttt{++}. - In such a name, the directory is relative to the main \texttt{FRAMAC\_SHARE} + Relative directory names are relative to the current directory except + for names prefixed by the characters \texttt{++}. + In such a name, the directory is relative to the main \texttt{FRAMAC\_SHARE} directory. \item[\tt -wp-alt-ergo-lib <f,\ldots>] (\textbf{deprecated} use altergo.file in driver instead) looks for \textsf{Alt-Ergo} @@ -1214,13 +1214,13 @@ Each driver file contains a list of bindings with the following syntax: \textit{group}.\textit{field} &\texttt{:=} \textit{string} \\ \textit{group}.\textit{field} &\texttt{+=} \textit{string} \\ \texttt{type} & \textit{symbol} & \verb'=' \user{link} \verb';' \\ - \texttt{ctor} & \textit{type} \textit{symbol} + \texttt{ctor} & \textit{type} \textit{symbol} \verb'(' \textit{type}\ccc\textit{type} \verb')' & \verb'=' \user{link} \verb';' \\ - \texttt{logic} & \textit{type} \textit{symbol} + \texttt{logic} & \textit{type} \textit{symbol} \verb'(' \textit{type}\ccc\textit{type} \verb')' & \verb'=' \textit{property-tags} \user{link} \verb';' \\ - \texttt{predicate} & \textit{symbol} + \texttt{predicate} & \textit{symbol} \verb'(' \textit{type}\ccc\textit{type} \verb')' & \verb'=' \user{link} \verb';' \end{tabular} @@ -1253,10 +1253,10 @@ each existing signature. The same \user{link} symbol is used for all provers, and must be defined in the specified libraries, or in the external ones (see~\ref{prooflibs}). -It is also possible to specify different names +It is also possible to specify different names for each prover, with the following syntax: \texttt{\{coq=\user{a};altergo=\user{b};why3=\user{c}\}}. -Alternatively, a link-name can be an arbitrary string +Alternatively, a link-name can be an arbitrary string with patterns substituted by arguments, \verb="(%1+%2)"= for instance. When a library \user{lib} is specified, the loaded module depends on the @@ -1357,9 +1357,9 @@ We only discuss \textit{WP reports} in this section. Reports are generated with the following command-line options: \begin{description} -\item[\tt -wp-report <Rspec$_1$,...,Rspec$_n$>] specifies the list of +\item[\tt -wp-report <Rspec$_1$,...,Rspec$_n$>] specifies the list of reports to export. - Each value \texttt{Rspec$_i$} is a \textit{WP report} specification file + Each value \texttt{Rspec$_i$} is a \textit{WP report} specification file (described below). \item[\tt -wp-report-basename <name>] set the basename for exported reports (described below). @@ -1394,28 +1394,28 @@ among: where \textit{base} can be set with \texttt{-wp-report-basename} option. \item[\tt @ZERO "<\textit{text}>"] text to be printed for $0$-numbers. Default is \verb+"-"+. -\item[\tt @GLOBAL\_SECTION "<\textit{text}>"] text to be printed for the chapter name about globals -\item[\tt @AXIOMATIC\_SECTION "<\textit{text}>"] text to be printed for the chapter name about axiomatics +\item[\tt @GLOBAL\_SECTION "<\textit{text}>"] text to be printed for the chapter name about globals +\item[\tt @AXIOMATIC\_SECTION "<\textit{text}>"] text to be printed for the chapter name about axiomatics \item[\tt @FUNCTION\_SECTION "<\textit{text}>"] text to be printed for the chapter name about functions -\item[\tt @AXIOMATIC\_PREFIX "<\textit{text}>"] text to be printed before axiomatic names. +\item[\tt @AXIOMATIC\_PREFIX "<\textit{text}>"] text to be printed before axiomatic names. Default is \verb+"Axiomatic"+ (with a trailing space). \item[\tt @FUNCTION\_PREFIX "<\textit{text}>"] text to be printed before function names. Default is empty. \item[\tt @GLOBAL\_PREFIX "<\textit{text}>"] text to be printed before global property names. Default is \verb+"(Global)"+ (with a trailing space). -\item[\tt @LEMMA\_PREFIX "<\textit{text}>"] text to be printed before lemma names. +\item[\tt @LEMMA\_PREFIX "<\textit{text}>"] text to be printed before lemma names. Default is \verb+"Lemma"+ (with a trailing space). -\item[\tt @PROPERTY\_PREFIX "<\textit{text}>"] text to be printed before other property names. +\item[\tt @PROPERTY\_PREFIX "<\textit{text}>"] text to be printed before other property names. \end{description} The generated report consists of several optional parts, corresponding -to Head, Chapter and Tail sections of the wp-report specification file. -First, the head contents lines are produced. -Then the chapters and their sections are produced. +to Head, Chapter and Tail sections of the wp-report specification file. +First, the head contents lines are produced. +Then the chapters and their sections are produced. Finally, the Tail content lines are printed. The different chapters are about globals, axiomatics and functions. -Outputs for these chapters can be specified using these directives: +Outputs for these chapters can be specified using these directives: \begin{description} \item[\tt @CHAPTER] <\textit{chapter header...>} \item[\tt @GLOBAL] <\textit{global section contents...>} @@ -1435,7 +1435,7 @@ several categories of formatters (PO stands for \emph{Proof Obligations}): \begin{center} \begin{tabular}{ll} \textbf{Formatters} & \textbf{Description} \\ - \hline\hline + \hline\hline \verb+&<+{\it col}\verb+>:+ & insert spaces up to column \textit{col} \\ \verb+&&+ & prints a \verb+"&"+ \\ \verb+%%+ & prints a \verb+"%"+ \\ @@ -1454,7 +1454,7 @@ several categories of formatters (PO stands for \emph{Proof Obligations}): \begin{center} \begin{tabular}{ll} \hline - \textbf{Provers} \\ + \textbf{Provers} \\ (\verb+<+{\it prover}\verb+>+) & A prover name (see \texttt{-wp-prover}) \\ \hline \hline @@ -1484,7 +1484,7 @@ current names: \begin{center} \begin{tabular}{ll} \textbf{Names} & \textbf{Description} \\ - \hline\hline + \hline\hline \verb+%chapter+ & current chapter name \\ \verb+%section+ & current section name \\ \verb+%global+ & current global name (under the chapter about globals)\\ @@ -1524,18 +1524,17 @@ options, the user should be aware of the following precisions: \textsf{WP} plug-in generate proof-obligations for the selected properties. The values of theses options are never saved and they are cleared by \texttt{-then}. Hence, running \texttt{-wp-prop A} - \texttt{-then} \texttt{-wp-fct F} does what you expect: + \texttt{-then} \texttt{-wp-fct F} does what you expect: properties tagged by \texttt{A} are proved only once. \item[\tt -wp-print, -wp-prover, -wp-gen, -wp-detect.] These options do not generate new proof-obligations, but run other actions on all previously generated ones. For the same reasons, they are not saved and cleared by \texttt{-then}. \item[\tt -wp-xxx.] All other options are tunings that can be easily - turned on and off or set to the desired value. + turned on and off or set to the desired value. They are saved and kept across \texttt{-then} commands. \end{description} %----------------------------------------------------------------------------- % vim: spell spelllang=en - -- GitLab From 5559ba38628d0135d5df6f03b6b1d157757279dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 19 Apr 2019 14:56:29 +0200 Subject: [PATCH 283/376] [Eva] Adds a much needed test for arithmetic backward propagators. --- tests/value/backward_arith.i | 33 +++++++++++++++ tests/value/oracle/backward_arith.res.oracle | 44 ++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 tests/value/backward_arith.i create mode 100644 tests/value/oracle/backward_arith.res.oracle diff --git a/tests/value/backward_arith.i b/tests/value/backward_arith.i new file mode 100644 index 00000000000..a26120d37e8 --- /dev/null +++ b/tests/value/backward_arith.i @@ -0,0 +1,33 @@ +/* run.config* +*/ + +/* Test the soundness of arithmetic backward propagators. */ + +volatile int nondet; + +void unsigned_neg () { + unsigned int x = nondet; + unsigned int minus_ten = -10; /* minus_ten = 4294967286. */ + if (-x == minus_ten) + Frama_C_show_each_ten(x); + else + Frama_C_show_each_not_ten(x); + if (-x < minus_ten) + Frama_C_show_each_greater_than_ten_or_zero(x); + else + Frama_C_show_each_smaller_than_ten_but_zero(x); + if (-x == 10) + Frama_C_show_each_minus_ten(x); /* 4294967286 */ + else + Frama_C_show_each_not_minus_ten(x); /* not 4294967286 */ + if (-x < 10) + Frama_C_show_each_greater_than_minus_ten_or_zero(x); /* > 4294967286 or 0 */ + else + Frama_C_show_each_smaller_than_minus_ten_but_zero(x); /* <= 4294967286 but 0 */ +} + + +int main () { + unsigned_neg (); + return 0; +} diff --git a/tests/value/oracle/backward_arith.res.oracle b/tests/value/oracle/backward_arith.res.oracle new file mode 100644 index 00000000000..fc69e93b267 --- /dev/null +++ b/tests/value/oracle/backward_arith.res.oracle @@ -0,0 +1,44 @@ +[kernel] Parsing tests/value/backward_arith.i (no preprocessing) +[eva] Analyzing a complete application starting at main +[eva] Computing initial state +[eva] Initial state computed +[eva:initial-state] Values of globals at initialization + nondet ∈ [--..--] +[eva] computing for function unsigned_neg <- main. + Called from tests/value/backward_arith.i:31. +[eva] tests/value/backward_arith.i:14: + Frama_C_show_each_not_ten: [0..4294967295] +[eva] tests/value/backward_arith.i:16: + Frama_C_show_each_greater_than_ten_or_zero: {0} +[eva] tests/value/backward_arith.i:22: Frama_C_show_each_not_minus_ten: {0} +[eva] tests/value/backward_arith.i:24: + Frama_C_show_each_greater_than_minus_ten_or_zero: {0} +[eva] Recording results for unsigned_neg +[eva] Done for function unsigned_neg +[eva] Recording results for main +[eva] done for function main +[eva] ====== VALUES COMPUTED ====== +[eva:final-states] Values at end of function unsigned_neg: + x ∈ {0} + minus_ten ∈ {4294967286} +[eva:final-states] Values at end of function main: + __retres ∈ {0} +[from] Computing for function unsigned_neg +[from] Done for function unsigned_neg +[from] Computing for function main +[from] Done for function main +[from] ====== DEPENDENCIES COMPUTED ====== + These dependencies hold at termination for the executions that terminate: +[from] Function unsigned_neg: + NO EFFECTS +[from] Function main: + \result FROM \nothing +[from] ====== END OF DEPENDENCIES ====== +[inout] Out (internal) for function unsigned_neg: + x; minus_ten +[inout] Inputs for function unsigned_neg: + nondet +[inout] Out (internal) for function main: + __retres +[inout] Inputs for function main: + nondet -- GitLab From 62f4af1069ce3cc7f03d65835d889f0f3fdedb7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 19 Apr 2019 15:02:00 +0200 Subject: [PATCH 284/376] [Eva] Fixes the cvalue backward propagator for the unary - on unsigned types. --- src/plugins/value/values/cvalue_backward.ml | 3 ++- tests/value/oracle/backward_arith.res.oracle | 15 +++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/plugins/value/values/cvalue_backward.ml b/src/plugins/value/values/cvalue_backward.ml index 64356b2faf5..7f76385d6cc 100644 --- a/src/plugins/value/values/cvalue_backward.ml +++ b/src/plugins/value/values/cvalue_backward.ml @@ -313,7 +313,8 @@ let backward_unop ~typ_arg op ~arg:_ ~res = try let v = V.project_ival res in if Cil.isIntegralType typ_arg then - Some (V.inject_ival (Ival.neg_int v)) + let v = V.inject_ival (Ival.neg_int v) in + Some (Cvalue_forward.reinterpret typ_arg v) else begin assert (Cil.isFloatingType typ_arg); let f = Ival.project_float v in diff --git a/tests/value/oracle/backward_arith.res.oracle b/tests/value/oracle/backward_arith.res.oracle index fc69e93b267..af34524c922 100644 --- a/tests/value/oracle/backward_arith.res.oracle +++ b/tests/value/oracle/backward_arith.res.oracle @@ -6,20 +6,27 @@ nondet ∈ [--..--] [eva] computing for function unsigned_neg <- main. Called from tests/value/backward_arith.i:31. +[eva] tests/value/backward_arith.i:12: Frama_C_show_each_ten: {10} [eva] tests/value/backward_arith.i:14: Frama_C_show_each_not_ten: [0..4294967295] [eva] tests/value/backward_arith.i:16: - Frama_C_show_each_greater_than_ten_or_zero: {0} -[eva] tests/value/backward_arith.i:22: Frama_C_show_each_not_minus_ten: {0} + Frama_C_show_each_greater_than_ten_or_zero: [0..4294967295] +[eva] tests/value/backward_arith.i:18: + Frama_C_show_each_smaller_than_ten_but_zero: [1..10] +[eva] tests/value/backward_arith.i:20: Frama_C_show_each_minus_ten: {4294967286} +[eva] tests/value/backward_arith.i:22: + Frama_C_show_each_not_minus_ten: [0..4294967295] [eva] tests/value/backward_arith.i:24: - Frama_C_show_each_greater_than_minus_ten_or_zero: {0} + Frama_C_show_each_greater_than_minus_ten_or_zero: [0..4294967295] +[eva] tests/value/backward_arith.i:26: + Frama_C_show_each_smaller_than_minus_ten_but_zero: [1..4294967286] [eva] Recording results for unsigned_neg [eva] Done for function unsigned_neg [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== [eva:final-states] Values at end of function unsigned_neg: - x ∈ {0} + x ∈ [--..--] minus_ten ∈ {4294967286} [eva:final-states] Values at end of function main: __retres ∈ {0} -- GitLab From 53dbf909c042add5593344e95428acd2d15b50ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 19 Apr 2019 15:38:03 +0200 Subject: [PATCH 285/376] [wp/coq] local coq-ide targets --- src/plugins/wp/share/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/wp/share/Makefile b/src/plugins/wp/share/Makefile index c4adc837f46..6f2822825dd 100644 --- a/src/plugins/wp/share/Makefile +++ b/src/plugins/wp/share/Makefile @@ -53,6 +53,10 @@ $(WPLSHARE)/why3/%.vo: $(WPLSHARE)/why3/%.v echo "Coqc $@" @coqc -w none $(WHY3INCLUDES) $< +$(WPLSHARE)/why3/%.ide: $(WPLSHARE)/why3/%.v + echo "Coqide $@" + @coqide $(WHY3INCLUDES) $< + $(WPLSHARE)/why3/.depend: $(addprefix $(WPLSHARE)/, $(WHY3_COQ_SOURCES)) echo "Coqdep for $(WPLSHARE)/why3" @coqdep $(WHY3INCLUDES) $(WPLSHARE)/why3/*.v $(WPLSHARE)/why3/**/*.v > $@ @@ -84,6 +88,10 @@ $(WPLSHARE)/coqwp/%.vo: $(WPLSHARE)/coqwp/%.v echo "Coqc $<" coqc -w none $(COQWPINCLUDES) $< +$(WPLSHARE)/coqwp/%.ide: $(WPLSHARE)/coqwp/%.v + echo "Coqide $<" + coqide $(COQWPINCLUDES) $< + $(WPLSHARE)/coqwp/.depend: $(addprefix $(WPLSHARE)/, $(WP_COQ_SOURCES)) echo "Coqdep for $(WPLSHARE)/coqwp" @coqdep $(COQWPINCLUDES) $(WPLSHARE)/coqwp/*.v $(WPLSHARE)/coqwp/**/*.v > $@ -- GitLab From c3f546fca17fc36314a2897a2505062bd3fe2a91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 19 Apr 2019 15:38:28 +0200 Subject: [PATCH 286/376] [wp/why3] upgrade to why3 1.0.0+ --- src/plugins/wp/share/why3/Bits.v | 2 +- src/plugins/wp/share/why3/Cbits.v | 2 +- src/plugins/wp/share/why3/Cint.v | 3 +-- src/plugins/wp/share/why3/Memory.v | 18 +++++++++--------- src/plugins/wp/share/why3/Qedlib.v | 14 +++++++------- src/plugins/wp/share/why3/Vlist.v | 2 +- src/plugins/wp/share/why3/Zbits.v | 2 +- 7 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/plugins/wp/share/why3/Bits.v b/src/plugins/wp/share/why3/Bits.v index 0381e15181d..624a253f499 100644 --- a/src/plugins/wp/share/why3/Bits.v +++ b/src/plugins/wp/share/why3/Bits.v @@ -587,7 +587,7 @@ Qed. (** {@integer:} *) (** * Bits of Integers *) -Open Local Scope Z_scope. +Local Open Scope Z_scope. (** The bits representation of an integer consists of a bit function, packed with its trailing property. diff --git a/src/plugins/wp/share/why3/Cbits.v b/src/plugins/wp/share/why3/Cbits.v index aff75e9b1e9..c32a1cf32a5 100644 --- a/src/plugins/wp/share/why3/Cbits.v +++ b/src/plugins/wp/share/why3/Cbits.v @@ -167,7 +167,7 @@ Proof. Qed. Require Import Qedlib. -Open Local Scope Z_scope. +Local Open Scope Z_scope. (** * Bit extraction *) (** Tacticals *) diff --git a/src/plugins/wp/share/why3/Cint.v b/src/plugins/wp/share/why3/Cint.v index 3a7c0ab7042..1f80f9e6d32 100644 --- a/src/plugins/wp/share/why3/Cint.v +++ b/src/plugins/wp/share/why3/Cint.v @@ -117,7 +117,7 @@ Proof. intros x. unfold to_bool. induction (Z.eqb_spec x 0%Z) ; intuition. Qed. -Open Local Scope Z_scope. +Local Open Scope Z_scope. Definition to_range a b z := a + (z-a) mod (b-a). @@ -328,7 +328,6 @@ Proof. to_range. Qed. (** * C-Integer Conversions are identity when in-range *) -Open Local Scope Z_scope. Remark mod_kn_mod_n: forall (k:Z) (n:Z) (x:Z), k>0 -> n>0 -> (x mod (k*n)) mod n = x mod n. Proof. diff --git a/src/plugins/wp/share/why3/Memory.v b/src/plugins/wp/share/why3/Memory.v index a8aa1ff53a8..a586724d831 100644 --- a/src/plugins/wp/share/why3/Memory.v +++ b/src/plugins/wp/share/why3/Memory.v @@ -143,7 +143,7 @@ Definition separated (p:addr) (a:Z) (q:addr) (b:Z): Prop := (a <= 0%Z)%Z \/ (* Why3 assumption *) Definition eqmem {a:Type} {a_WT:WhyType a} (m1:(map.Map.map addr a)) (m2:(map.Map.map addr a)) (p:addr) (a1:Z): Prop := forall (q:addr), - (included q 1%Z p a1) -> ((map.Map.get m1 q) = (map.Map.get m2 q)). + (included q 1%Z p a1) -> ((m1 q) = (m2 q)). (* Why3 goal *) Definition havoc: forall {a:Type} {a_WT:WhyType a}, (map.Map.map addr a) -> @@ -160,16 +160,16 @@ Definition fhavoc {A : Type} (* Why3 assumption *) Definition valid_rw (m:(map.Map.map Z Z)) (p:addr) (n:Z): Prop := (0%Z < n)%Z -> ((0%Z < (base p))%Z /\ ((0%Z <= (offset p))%Z /\ - (((offset p) + n)%Z <= (map.Map.get m (base p)))%Z)). + (((offset p) + n)%Z <= (m (base p)))%Z)). (* Why3 assumption *) Definition valid_rd (m:(map.Map.map Z Z)) (p:addr) (n:Z): Prop := (0%Z < n)%Z -> ((~ (0%Z = (base p))) /\ ((0%Z <= (offset p))%Z /\ - (((offset p) + n)%Z <= (map.Map.get m (base p)))%Z)). + (((offset p) + n)%Z <= (m (base p)))%Z)). (* Why3 assumption *) Definition invalid (m:(map.Map.map Z Z)) (p:addr) (n:Z): Prop := - (0%Z < n)%Z -> (((map.Map.get m (base p)) <= (offset p))%Z \/ + (0%Z < n)%Z -> (((m (base p)) <= (offset p))%Z \/ (((offset p) + n)%Z <= 0%Z)%Z). (* Why3 goal *) @@ -184,7 +184,7 @@ Qed. (* Why3 goal *) Lemma valid_string : forall (m:(map.Map.map Z Z)), forall (p:addr), ((base p) < 0%Z)%Z -> (((0%Z <= (offset p))%Z /\ - ((offset p) < (map.Map.get m (base p)))%Z) -> ((valid_rd m p 1%Z) /\ + ((offset p) < (m (base p)))%Z) -> ((valid_rd m p 1%Z) /\ ~ (valid_rw m p 1%Z))). Proof. intros m p. @@ -251,7 +251,7 @@ Admitted. (* Why3 assumption *) Definition framed (m:(map.Map.map addr addr)): Prop := forall (p:addr), - ((region (base (map.Map.get m p))) <= 0%Z)%Z. + ((region (base (m p))) <= 0%Z)%Z. (* Why3 goal *) Lemma separated_included : forall (p:addr) (q:addr), forall (a:Z) (b:Z), @@ -318,9 +318,9 @@ Admitted. (* Why3 goal *) Lemma havoc_access : forall {a:Type} {a_WT:WhyType a}, forall (m0:(map.Map.map addr a)) (m1:(map.Map.map addr a)), forall (q:addr) - (p:addr), forall (a1:Z), ((separated q 1%Z p a1) -> ((map.Map.get (havoc m0 - m1 p a1) q) = (map.Map.get m1 q))) /\ ((~ (separated q 1%Z p a1)) -> - ((map.Map.get (havoc m0 m1 p a1) q) = (map.Map.get m0 q))). + (p:addr), forall (a1:Z), ((separated q 1%Z p a1) -> (((havoc m0 + m1 p a1) q) = (m1 q))) /\ ((~ (separated q 1%Z p a1)) -> + (((havoc m0 m1 p a1) q) = (m0 q))). Proof. intros a a_WT m0 m1 q p a1. Admitted. diff --git a/src/plugins/wp/share/why3/Qedlib.v b/src/plugins/wp/share/why3/Qedlib.v index 4156a9e3290..68c2a998c3d 100644 --- a/src/plugins/wp/share/why3/Qedlib.v +++ b/src/plugins/wp/share/why3/Qedlib.v @@ -211,8 +211,9 @@ Definition array (A : Type) := farray Z A. Hypothesis extensionality: forall (A B : Type) (f g : A -> B), (forall x, f x = g x) -> f = g. + Definition select {A B : Type} - (m : farray A B) (k : A) : B := @Map.get A (whytype1 m) B (whytype2 m) m k. + (m : farray A B) (k : A) : B := (access m k). Lemma farray_eq : forall A B (m1 m2 : farray A B), whytype1 m1 = whytype1 m2 -> whytype2 m1 = whytype2 m2 -> @@ -221,15 +222,14 @@ Proof. intros A B m1 m2. destruct m1. destruct m2. simpl. intros H1 H2; rewrite H1; rewrite H2 ; clear H1 H2. - destruct access0. destruct access1. compute. intro K. - rewrite (extensionality b b0 K). + rewrite (extensionality access0 access1 K). reflexivity. Qed. Definition update {A B : Type} (m : farray A B) (k : A) (v : B) : (farray A B) := - {| whytype1 := whytype1 m; whytype2 := whytype2 m; access := @Map.set A (whytype1 m) B (whytype2 m) m k v|}. + {| whytype1 := whytype1 m; whytype2 := whytype2 m; access := @Map.set A (whytype1 m) B (whytype2 m) (access m) k v|}. Notation " a .[ k ] " := (select a k) (at level 60). Notation " a .[ k <- v ] " := (update a k v) (at level 60). @@ -239,7 +239,7 @@ Lemma access_update : m.[k <- v].[k] = v. Proof. intros. - apply Map.Select_eq. + apply Map.set_def. reflexivity. Qed. @@ -248,8 +248,8 @@ Lemma access_update_neq : i <> j -> m.[ i <- v ].[j] = m.[j]. Proof. intros. - apply Map.Select_neq. - assumption. + apply Map.set_def. + auto. Qed. (** ** Division on Z *) diff --git a/src/plugins/wp/share/why3/Vlist.v b/src/plugins/wp/share/why3/Vlist.v index 18289871863..dfcb15ea7fd 100644 --- a/src/plugins/wp/share/why3/Vlist.v +++ b/src/plugins/wp/share/why3/Vlist.v @@ -64,7 +64,7 @@ Defined. Definition concat: forall {a:Type} {a_WT:WhyType a}, (list a) -> (list a) -> (list a). intros a a_WT. - Open Local Scope list_scope. + Local Open Scope list_scope. exact(fun u v => u ++ v). Defined. diff --git a/src/plugins/wp/share/why3/Zbits.v b/src/plugins/wp/share/why3/Zbits.v index e168e835e82..0c02116df5e 100644 --- a/src/plugins/wp/share/why3/Zbits.v +++ b/src/plugins/wp/share/why3/Zbits.v @@ -46,7 +46,7 @@ Require Import Qedlib. Require Import Bits. Require Import Psatz. -Open Local Scope Z_scope. +Local Open Scope Z_scope. Local Ltac omegaContradiction := cut False; [contradiction|omega]. -- GitLab From 9fe272f9f23c84a08eaa33d63b40d5ceb65587ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 19 Apr 2019 16:15:48 +0200 Subject: [PATCH 287/376] [wp/coq] update with why3 1.0.0 coq-libs --- src/plugins/wp/share/Makefile.resources | 3 + src/plugins/wp/share/coqwp/Bits.v | 2 +- src/plugins/wp/share/coqwp/Cbits.v | 2 +- src/plugins/wp/share/coqwp/Cint.v | 3 +- src/plugins/wp/share/coqwp/HighOrd.v | 25 +++ src/plugins/wp/share/coqwp/Memory.v | 18 +-- src/plugins/wp/share/coqwp/Qedlib.v | 14 +- src/plugins/wp/share/coqwp/Vlist.v | 2 +- src/plugins/wp/share/coqwp/Zbits.v | 2 +- src/plugins/wp/share/coqwp/bool/Bool.v | 67 ++++---- src/plugins/wp/share/coqwp/int/Abs.v | 31 ++-- .../wp/share/coqwp/int/ComputerDivision.v | 73 +++++---- .../wp/share/coqwp/int/Exponentiation.v | 151 ++++++++++++++++++ src/plugins/wp/share/coqwp/int/Int.v | 78 ++++----- src/plugins/wp/share/coqwp/int/MinMax.v | 61 +++---- src/plugins/wp/share/coqwp/int/Power.v | 132 +++++++++++++++ src/plugins/wp/share/coqwp/map/Const.v | 40 ++--- src/plugins/wp/share/coqwp/map/Map.v | 84 ++++------ src/plugins/wp/share/coqwp/real/Abs.v | 49 +++--- src/plugins/wp/share/coqwp/real/ExpLog.v | 42 ++--- src/plugins/wp/share/coqwp/real/FromInt.v | 39 +++-- src/plugins/wp/share/coqwp/real/MinMax.v | 59 ++++--- src/plugins/wp/share/coqwp/real/PowerReal.v | 72 ++++++--- src/plugins/wp/share/coqwp/real/Real.v | 113 +++++++------ src/plugins/wp/share/coqwp/real/RealInfix.v | 26 +-- src/plugins/wp/share/coqwp/real/Square.v | 39 +++-- .../wp/share/coqwp/real/Trigonometry.v | 98 +++++++----- 27 files changed, 872 insertions(+), 453 deletions(-) create mode 100644 src/plugins/wp/share/coqwp/HighOrd.v create mode 100644 src/plugins/wp/share/coqwp/int/Exponentiation.v create mode 100644 src/plugins/wp/share/coqwp/int/Power.v diff --git a/src/plugins/wp/share/Makefile.resources b/src/plugins/wp/share/Makefile.resources index ea63e1e8943..fdd317b4ee8 100644 --- a/src/plugins/wp/share/Makefile.resources +++ b/src/plugins/wp/share/Makefile.resources @@ -64,11 +64,14 @@ COQ_LIBS_CEA:= \ ## Used in share/coqwp only COQ_LIBS_INRIA:=\ BuiltIn.v \ + HighOrd.v \ bool/Bool.v \ int/Abs.v \ int/ComputerDivision.v \ + int/Exponentiation.v \ int/Int.v \ int/MinMax.v \ + int/Power.v \ map/Map.v \ map/Const.v \ real/Abs.v \ diff --git a/src/plugins/wp/share/coqwp/Bits.v b/src/plugins/wp/share/coqwp/Bits.v index 0381e15181d..624a253f499 100644 --- a/src/plugins/wp/share/coqwp/Bits.v +++ b/src/plugins/wp/share/coqwp/Bits.v @@ -587,7 +587,7 @@ Qed. (** {@integer:} *) (** * Bits of Integers *) -Open Local Scope Z_scope. +Local Open Scope Z_scope. (** The bits representation of an integer consists of a bit function, packed with its trailing property. diff --git a/src/plugins/wp/share/coqwp/Cbits.v b/src/plugins/wp/share/coqwp/Cbits.v index aff75e9b1e9..c32a1cf32a5 100644 --- a/src/plugins/wp/share/coqwp/Cbits.v +++ b/src/plugins/wp/share/coqwp/Cbits.v @@ -167,7 +167,7 @@ Proof. Qed. Require Import Qedlib. -Open Local Scope Z_scope. +Local Open Scope Z_scope. (** * Bit extraction *) (** Tacticals *) diff --git a/src/plugins/wp/share/coqwp/Cint.v b/src/plugins/wp/share/coqwp/Cint.v index 3a7c0ab7042..1f80f9e6d32 100644 --- a/src/plugins/wp/share/coqwp/Cint.v +++ b/src/plugins/wp/share/coqwp/Cint.v @@ -117,7 +117,7 @@ Proof. intros x. unfold to_bool. induction (Z.eqb_spec x 0%Z) ; intuition. Qed. -Open Local Scope Z_scope. +Local Open Scope Z_scope. Definition to_range a b z := a + (z-a) mod (b-a). @@ -328,7 +328,6 @@ Proof. to_range. Qed. (** * C-Integer Conversions are identity when in-range *) -Open Local Scope Z_scope. Remark mod_kn_mod_n: forall (k:Z) (n:Z) (x:Z), k>0 -> n>0 -> (x mod (k*n)) mod n = x mod n. Proof. diff --git a/src/plugins/wp/share/coqwp/HighOrd.v b/src/plugins/wp/share/coqwp/HighOrd.v new file mode 100644 index 00000000000..da42135acf8 --- /dev/null +++ b/src/plugins/wp/share/coqwp/HighOrd.v @@ -0,0 +1,25 @@ +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) + +Require Import BuiltIn. + +Definition func : forall (a:Type) (b:Type), Type. +intros a b. +exact (a -> b). +Defined. + +Definition infix_at: forall {a:Type} {a_WT:WhyType a} + {b:Type} {b_WT:WhyType b}, (a -> b) -> a -> b. +intros a aWT b bWT f x. +exact (f x). +Defined. + +Definition pred (a: Type) := func a bool. diff --git a/src/plugins/wp/share/coqwp/Memory.v b/src/plugins/wp/share/coqwp/Memory.v index a8aa1ff53a8..a586724d831 100644 --- a/src/plugins/wp/share/coqwp/Memory.v +++ b/src/plugins/wp/share/coqwp/Memory.v @@ -143,7 +143,7 @@ Definition separated (p:addr) (a:Z) (q:addr) (b:Z): Prop := (a <= 0%Z)%Z \/ (* Why3 assumption *) Definition eqmem {a:Type} {a_WT:WhyType a} (m1:(map.Map.map addr a)) (m2:(map.Map.map addr a)) (p:addr) (a1:Z): Prop := forall (q:addr), - (included q 1%Z p a1) -> ((map.Map.get m1 q) = (map.Map.get m2 q)). + (included q 1%Z p a1) -> ((m1 q) = (m2 q)). (* Why3 goal *) Definition havoc: forall {a:Type} {a_WT:WhyType a}, (map.Map.map addr a) -> @@ -160,16 +160,16 @@ Definition fhavoc {A : Type} (* Why3 assumption *) Definition valid_rw (m:(map.Map.map Z Z)) (p:addr) (n:Z): Prop := (0%Z < n)%Z -> ((0%Z < (base p))%Z /\ ((0%Z <= (offset p))%Z /\ - (((offset p) + n)%Z <= (map.Map.get m (base p)))%Z)). + (((offset p) + n)%Z <= (m (base p)))%Z)). (* Why3 assumption *) Definition valid_rd (m:(map.Map.map Z Z)) (p:addr) (n:Z): Prop := (0%Z < n)%Z -> ((~ (0%Z = (base p))) /\ ((0%Z <= (offset p))%Z /\ - (((offset p) + n)%Z <= (map.Map.get m (base p)))%Z)). + (((offset p) + n)%Z <= (m (base p)))%Z)). (* Why3 assumption *) Definition invalid (m:(map.Map.map Z Z)) (p:addr) (n:Z): Prop := - (0%Z < n)%Z -> (((map.Map.get m (base p)) <= (offset p))%Z \/ + (0%Z < n)%Z -> (((m (base p)) <= (offset p))%Z \/ (((offset p) + n)%Z <= 0%Z)%Z). (* Why3 goal *) @@ -184,7 +184,7 @@ Qed. (* Why3 goal *) Lemma valid_string : forall (m:(map.Map.map Z Z)), forall (p:addr), ((base p) < 0%Z)%Z -> (((0%Z <= (offset p))%Z /\ - ((offset p) < (map.Map.get m (base p)))%Z) -> ((valid_rd m p 1%Z) /\ + ((offset p) < (m (base p)))%Z) -> ((valid_rd m p 1%Z) /\ ~ (valid_rw m p 1%Z))). Proof. intros m p. @@ -251,7 +251,7 @@ Admitted. (* Why3 assumption *) Definition framed (m:(map.Map.map addr addr)): Prop := forall (p:addr), - ((region (base (map.Map.get m p))) <= 0%Z)%Z. + ((region (base (m p))) <= 0%Z)%Z. (* Why3 goal *) Lemma separated_included : forall (p:addr) (q:addr), forall (a:Z) (b:Z), @@ -318,9 +318,9 @@ Admitted. (* Why3 goal *) Lemma havoc_access : forall {a:Type} {a_WT:WhyType a}, forall (m0:(map.Map.map addr a)) (m1:(map.Map.map addr a)), forall (q:addr) - (p:addr), forall (a1:Z), ((separated q 1%Z p a1) -> ((map.Map.get (havoc m0 - m1 p a1) q) = (map.Map.get m1 q))) /\ ((~ (separated q 1%Z p a1)) -> - ((map.Map.get (havoc m0 m1 p a1) q) = (map.Map.get m0 q))). + (p:addr), forall (a1:Z), ((separated q 1%Z p a1) -> (((havoc m0 + m1 p a1) q) = (m1 q))) /\ ((~ (separated q 1%Z p a1)) -> + (((havoc m0 m1 p a1) q) = (m0 q))). Proof. intros a a_WT m0 m1 q p a1. Admitted. diff --git a/src/plugins/wp/share/coqwp/Qedlib.v b/src/plugins/wp/share/coqwp/Qedlib.v index 4156a9e3290..68c2a998c3d 100644 --- a/src/plugins/wp/share/coqwp/Qedlib.v +++ b/src/plugins/wp/share/coqwp/Qedlib.v @@ -211,8 +211,9 @@ Definition array (A : Type) := farray Z A. Hypothesis extensionality: forall (A B : Type) (f g : A -> B), (forall x, f x = g x) -> f = g. + Definition select {A B : Type} - (m : farray A B) (k : A) : B := @Map.get A (whytype1 m) B (whytype2 m) m k. + (m : farray A B) (k : A) : B := (access m k). Lemma farray_eq : forall A B (m1 m2 : farray A B), whytype1 m1 = whytype1 m2 -> whytype2 m1 = whytype2 m2 -> @@ -221,15 +222,14 @@ Proof. intros A B m1 m2. destruct m1. destruct m2. simpl. intros H1 H2; rewrite H1; rewrite H2 ; clear H1 H2. - destruct access0. destruct access1. compute. intro K. - rewrite (extensionality b b0 K). + rewrite (extensionality access0 access1 K). reflexivity. Qed. Definition update {A B : Type} (m : farray A B) (k : A) (v : B) : (farray A B) := - {| whytype1 := whytype1 m; whytype2 := whytype2 m; access := @Map.set A (whytype1 m) B (whytype2 m) m k v|}. + {| whytype1 := whytype1 m; whytype2 := whytype2 m; access := @Map.set A (whytype1 m) B (whytype2 m) (access m) k v|}. Notation " a .[ k ] " := (select a k) (at level 60). Notation " a .[ k <- v ] " := (update a k v) (at level 60). @@ -239,7 +239,7 @@ Lemma access_update : m.[k <- v].[k] = v. Proof. intros. - apply Map.Select_eq. + apply Map.set_def. reflexivity. Qed. @@ -248,8 +248,8 @@ Lemma access_update_neq : i <> j -> m.[ i <- v ].[j] = m.[j]. Proof. intros. - apply Map.Select_neq. - assumption. + apply Map.set_def. + auto. Qed. (** ** Division on Z *) diff --git a/src/plugins/wp/share/coqwp/Vlist.v b/src/plugins/wp/share/coqwp/Vlist.v index 18289871863..dfcb15ea7fd 100644 --- a/src/plugins/wp/share/coqwp/Vlist.v +++ b/src/plugins/wp/share/coqwp/Vlist.v @@ -64,7 +64,7 @@ Defined. Definition concat: forall {a:Type} {a_WT:WhyType a}, (list a) -> (list a) -> (list a). intros a a_WT. - Open Local Scope list_scope. + Local Open Scope list_scope. exact(fun u v => u ++ v). Defined. diff --git a/src/plugins/wp/share/coqwp/Zbits.v b/src/plugins/wp/share/coqwp/Zbits.v index e168e835e82..0c02116df5e 100644 --- a/src/plugins/wp/share/coqwp/Zbits.v +++ b/src/plugins/wp/share/coqwp/Zbits.v @@ -46,7 +46,7 @@ Require Import Qedlib. Require Import Bits. Require Import Psatz. -Open Local Scope Z_scope. +Local Open Scope Z_scope. Local Ltac omegaContradiction := cut False; [contradiction|omega]. diff --git a/src/plugins/wp/share/coqwp/bool/Bool.v b/src/plugins/wp/share/coqwp/bool/Bool.v index 64b159874c5..9038682132e 100644 --- a/src/plugins/wp/share/coqwp/bool/Bool.v +++ b/src/plugins/wp/share/coqwp/bool/Bool.v @@ -1,12 +1,13 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(**************************************************************************) +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) @@ -14,55 +15,61 @@ Require Import BuiltIn. Require BuiltIn. (* Why3 goal *) -Lemma andb_def : forall (x:bool) (y:bool), +Lemma andb_def : + forall (x:bool) (y:bool), ((Init.Datatypes.andb x y) = match x with - | true => y - | false => false - end). + | true => y + | false => false + end). Proof. intros x y. apply refl_equal. Qed. (* Why3 goal *) -Lemma orb_def : forall (x:bool) (y:bool), +Lemma orb_def : + forall (x:bool) (y:bool), ((Init.Datatypes.orb x y) = match x with - | false => y - | true => true - end). + | false => y + | true => true + end). Proof. intros x y. apply refl_equal. Qed. (* Why3 goal *) -Lemma notb_def : forall (x:bool), +Lemma notb_def : + forall (x:bool), ((Init.Datatypes.negb x) = match x with - | false => true - | true => false - end). + | false => true + | true => false + end). Proof. intros x. apply refl_equal. Qed. (* Why3 goal *) -Lemma xorb_def : forall (x:bool) (y:bool), - ((Init.Datatypes.xorb x y) = match x with - | false => y - | true => (Init.Datatypes.negb y) - end). +Lemma xorb_def : + forall (x:bool) (y:bool), + ((Init.Datatypes.xorb x y) = + match x with + | false => y + | true => (Init.Datatypes.negb y) + end). Proof. intros x y. destruct x; destruct y; auto. Qed. (* Why3 goal *) -Lemma implb_def : forall (x:bool) (y:bool), +Lemma implb_def : + forall (x:bool) (y:bool), ((Init.Datatypes.implb x y) = match x with - | false => true - | true => y - end). + | false => true + | true => y + end). Proof. now intros [|] [|]. Qed. diff --git a/src/plugins/wp/share/coqwp/int/Abs.v b/src/plugins/wp/share/coqwp/int/Abs.v index d5164fde983..5637e82b7da 100644 --- a/src/plugins/wp/share/coqwp/int/Abs.v +++ b/src/plugins/wp/share/coqwp/int/Abs.v @@ -1,12 +1,13 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(**************************************************************************) +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) @@ -18,9 +19,10 @@ Require int.Int. (* abs is replaced with (ZArith.BinInt.Z.abs x) by the coq driver *) (* Why3 goal *) -Lemma abs_def : forall (x:Z), ((0%Z <= x)%Z -> - ((ZArith.BinInt.Z.abs x) = x)) /\ ((~ (0%Z <= x)%Z) -> - ((ZArith.BinInt.Z.abs x) = (-x)%Z)). +Lemma abs_def : + forall (x:Z), + ((0%Z <= x)%Z -> ((ZArith.BinInt.Z.abs x) = x)) /\ + (~ (0%Z <= x)%Z -> ((ZArith.BinInt.Z.abs x) = (-x)%Z)). intros x. split ; intros H. now apply Zabs_eq. @@ -32,8 +34,9 @@ now apply Zgt_lt. Qed. (* Why3 goal *) -Lemma Abs_le : forall (x:Z) (y:Z), ((ZArith.BinInt.Z.abs x) <= y)%Z <-> - (((-y)%Z <= x)%Z /\ (x <= y)%Z). +Lemma Abs_le : + forall (x:Z) (y:Z), + ((ZArith.BinInt.Z.abs x) <= y)%Z <-> (((-y)%Z <= x)%Z /\ (x <= y)%Z). intros x y. zify. omega. diff --git a/src/plugins/wp/share/coqwp/int/ComputerDivision.v b/src/plugins/wp/share/coqwp/int/ComputerDivision.v index 043a92f2c90..c34926e4c2f 100644 --- a/src/plugins/wp/share/coqwp/int/ComputerDivision.v +++ b/src/plugins/wp/share/coqwp/int/ComputerDivision.v @@ -1,12 +1,13 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(**************************************************************************) +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) @@ -24,16 +25,18 @@ Require Import Zquot. (* mod1 is replaced with (ZArith.BinInt.Z.rem x x1) by the coq driver *) (* Why3 goal *) -Lemma Div_mod : forall (x:Z) (y:Z), (~ (y = 0%Z)) -> +Lemma Div_mod : + forall (x:Z) (y:Z), ~ (y = 0%Z) -> (x = ((y * (ZArith.BinInt.Z.quot x y))%Z + (ZArith.BinInt.Z.rem x y))%Z). intros x y _. apply Z.quot_rem'. Qed. (* Why3 goal *) -Lemma Div_bound : forall (x:Z) (y:Z), ((0%Z <= x)%Z /\ (0%Z < y)%Z) -> - ((0%Z <= (ZArith.BinInt.Z.quot x y))%Z /\ - ((ZArith.BinInt.Z.quot x y) <= x)%Z). +Lemma Div_bound : + forall (x:Z) (y:Z), ((0%Z <= x)%Z /\ (0%Z < y)%Z) -> + (0%Z <= (ZArith.BinInt.Z.quot x y))%Z /\ + ((ZArith.BinInt.Z.quot x y) <= x)%Z. intros x y (Hx,Hy). split. now apply Z.quot_pos. @@ -48,9 +51,10 @@ now rewrite <- H', Zquot_0_l. Qed. (* Why3 goal *) -Lemma Mod_bound : forall (x:Z) (y:Z), (~ (y = 0%Z)) -> - (((-(ZArith.BinInt.Z.abs y))%Z < (ZArith.BinInt.Z.rem x y))%Z /\ - ((ZArith.BinInt.Z.rem x y) < (ZArith.BinInt.Z.abs y))%Z). +Lemma Mod_bound : + forall (x:Z) (y:Z), ~ (y = 0%Z) -> + ((-(ZArith.BinInt.Z.abs y))%Z < (ZArith.BinInt.Z.rem x y))%Z /\ + ((ZArith.BinInt.Z.rem x y) < (ZArith.BinInt.Z.abs y))%Z. intros x y Zy. destruct (Zle_or_lt 0 x) as [Hx|Hx]. refine ((fun H => conj (Zlt_le_trans _ 0 _ _ (proj1 H)) (proj2 H)) _). @@ -63,14 +67,16 @@ now apply Zlt_le_weak. Qed. (* Why3 goal *) -Lemma Div_sign_pos : forall (x:Z) (y:Z), ((0%Z <= x)%Z /\ (0%Z < y)%Z) -> +Lemma Div_sign_pos : + forall (x:Z) (y:Z), ((0%Z <= x)%Z /\ (0%Z < y)%Z) -> (0%Z <= (ZArith.BinInt.Z.quot x y))%Z. intros x y (Hx, Hy). now apply Z.quot_pos. Qed. (* Why3 goal *) -Lemma Div_sign_neg : forall (x:Z) (y:Z), ((x <= 0%Z)%Z /\ (0%Z < y)%Z) -> +Lemma Div_sign_neg : + forall (x:Z) (y:Z), ((x <= 0%Z)%Z /\ (0%Z < y)%Z) -> ((ZArith.BinInt.Z.quot x y) <= 0%Z)%Z. intros x y (Hx, Hy). generalize (Z.quot_pos (-x) y). @@ -79,22 +85,26 @@ omega. Qed. (* Why3 goal *) -Lemma Mod_sign_pos : forall (x:Z) (y:Z), ((0%Z <= x)%Z /\ ~ (y = 0%Z)) -> +Lemma Mod_sign_pos : + forall (x:Z) (y:Z), ((0%Z <= x)%Z /\ ~ (y = 0%Z)) -> (0%Z <= (ZArith.BinInt.Z.rem x y))%Z. intros x y (Hx, Zy). now apply Zrem_lt_pos. Qed. (* Why3 goal *) -Lemma Mod_sign_neg : forall (x:Z) (y:Z), ((x <= 0%Z)%Z /\ ~ (y = 0%Z)) -> +Lemma Mod_sign_neg : + forall (x:Z) (y:Z), ((x <= 0%Z)%Z /\ ~ (y = 0%Z)) -> ((ZArith.BinInt.Z.rem x y) <= 0%Z)%Z. intros x y (Hx, Zy). now apply Zrem_lt_neg. Qed. (* Why3 goal *) -Lemma Rounds_toward_zero : forall (x:Z) (y:Z), (~ (y = 0%Z)) -> - ((ZArith.BinInt.Z.abs ((ZArith.BinInt.Z.quot x y) * y)%Z) <= (ZArith.BinInt.Z.abs x))%Z. +Lemma Rounds_toward_zero : + forall (x:Z) (y:Z), ~ (y = 0%Z) -> + ((ZArith.BinInt.Z.abs ((ZArith.BinInt.Z.quot x y) * y)%Z) <= + (ZArith.BinInt.Z.abs x))%Z. intros x y Zy. rewrite Zmult_comm. zify. @@ -114,21 +124,25 @@ exact Z.rem_1_r. Qed. (* Why3 goal *) -Lemma Div_inf : forall (x:Z) (y:Z), ((0%Z <= x)%Z /\ (x < y)%Z) -> +Lemma Div_inf : + forall (x:Z) (y:Z), ((0%Z <= x)%Z /\ (x < y)%Z) -> ((ZArith.BinInt.Z.quot x y) = 0%Z). exact Z.quot_small. Qed. (* Why3 goal *) -Lemma Mod_inf : forall (x:Z) (y:Z), ((0%Z <= x)%Z /\ (x < y)%Z) -> +Lemma Mod_inf : + forall (x:Z) (y:Z), ((0%Z <= x)%Z /\ (x < y)%Z) -> ((ZArith.BinInt.Z.rem x y) = x). exact Z.rem_small. Qed. (* Why3 goal *) -Lemma Div_mult : forall (x:Z) (y:Z) (z:Z), ((0%Z < x)%Z /\ ((0%Z <= y)%Z /\ - (0%Z <= z)%Z)) -> - ((ZArith.BinInt.Z.quot ((x * y)%Z + z)%Z x) = (y + (ZArith.BinInt.Z.quot z x))%Z). +Lemma Div_mult : + forall (x:Z) (y:Z) (z:Z), + ((0%Z < x)%Z /\ ((0%Z <= y)%Z /\ (0%Z <= z)%Z)) -> + ((ZArith.BinInt.Z.quot ((x * y)%Z + z)%Z x) = + (y + (ZArith.BinInt.Z.quot z x))%Z). intros x y z (Hx&Hy&Hz). rewrite (Zplus_comm y). rewrite <- Z_quot_plus. @@ -142,8 +156,9 @@ now rewrite H in Hx. Qed. (* Why3 goal *) -Lemma Mod_mult : forall (x:Z) (y:Z) (z:Z), ((0%Z < x)%Z /\ ((0%Z <= y)%Z /\ - (0%Z <= z)%Z)) -> +Lemma Mod_mult : + forall (x:Z) (y:Z) (z:Z), + ((0%Z < x)%Z /\ ((0%Z <= y)%Z /\ (0%Z <= z)%Z)) -> ((ZArith.BinInt.Z.rem ((x * y)%Z + z)%Z x) = (ZArith.BinInt.Z.rem z x)). intros x y z (Hx&Hy&Hz). rewrite Zplus_comm, Zmult_comm. diff --git a/src/plugins/wp/share/coqwp/int/Exponentiation.v b/src/plugins/wp/share/coqwp/int/Exponentiation.v new file mode 100644 index 00000000000..f911f4cd6bd --- /dev/null +++ b/src/plugins/wp/share/coqwp/int/Exponentiation.v @@ -0,0 +1,151 @@ +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) + +(* This file is generated by Why3's Coq-realize driver *) +(* Beware! Only edit allowed sections below *) +Require Import BuiltIn. +Require BuiltIn. +Require int.Int. + +Section Exponentiation. + +(* Why3 goal *) +Variable t : Type. +Hypothesis t_WhyType : WhyType t. +Existing Instance t_WhyType. + +(* Why3 goal *) +Variable one: t. + +(* Why3 goal *) +Variable infix_as: t -> t -> t. + +(* Why3 goal *) +Hypothesis Assoc : + forall (x:t) (y:t) (z:t), + ((infix_as (infix_as x y) z) = (infix_as x (infix_as y z))). + +(* Why3 goal *) +Hypothesis Unit_def_l : forall (x:t), ((infix_as one x) = x). + +(* Why3 goal *) +Hypothesis Unit_def_r : forall (x:t), ((infix_as x one) = x). + +(* Why3 goal *) +Definition power : t -> Z -> t. +intros x n. +exact (iter_nat (Zabs_nat n) t (fun acc => infix_as x acc) one). +Defined. + +(* Why3 goal *) +Lemma Power_0 : forall (x:t), ((power x 0%Z) = one). +Proof. +easy. +Qed. + +(* Why3 goal *) +Lemma Power_s : + forall (x:t) (n:Z), (0%Z <= n)%Z -> + ((power x (n + 1%Z)%Z) = (infix_as x (power x n))). +Proof. +intros x n h1. +unfold power. +fold (Zsucc n). +now rewrite Zabs_nat_Zsucc. +Qed. + +(* Why3 goal *) +Lemma Power_s_alt : + forall (x:t) (n:Z), (0%Z < n)%Z -> + ((power x n) = (infix_as x (power x (n - 1%Z)%Z))). +Proof. +intros x n h1. +rewrite <- Power_s; auto with zarith. +f_equal; omega. +Qed. + +(* Why3 goal *) +Lemma Power_1 : forall (x:t), ((power x 1%Z) = x). +Proof. +exact Unit_def_r. +Qed. + +(* Why3 goal *) +Lemma Power_sum : + forall (x:t) (n:Z) (m:Z), (0%Z <= n)%Z -> (0%Z <= m)%Z -> + ((power x (n + m)%Z) = (infix_as (power x n) (power x m))). +Proof. +intros x n m Hn Hm. +revert n Hn. +apply natlike_ind. +apply sym_eq, Unit_def_l. +intros n Hn IHn. +replace (Zsucc n + m)%Z with ((n + m) + 1)%Z by ring. +rewrite Power_s by auto with zarith. +rewrite IHn. +now rewrite <- Assoc, <- Power_s. +Qed. + +(* Why3 goal *) +Lemma Power_mult : + forall (x:t) (n:Z) (m:Z), (0%Z <= n)%Z -> (0%Z <= m)%Z -> + ((power x (n * m)%Z) = (power (power x n) m)). +Proof. +intros x n m Hn Hm. +revert m Hm. +apply natlike_ind. +now rewrite Zmult_0_r, 2!Power_0. +intros m Hm IHm. +replace (n * Zsucc m)%Z with (n + n * m)%Z by ring. +rewrite Power_sum by auto with zarith. +rewrite IHm. +now rewrite <- Power_s. +Qed. + +(* Why3 goal *) +Lemma Power_comm1 : + forall (x:t) (y:t), ((infix_as x y) = (infix_as y x)) -> forall (n:Z), + (0%Z <= n)%Z -> ((infix_as (power x n) y) = (infix_as y (power x n))). +Proof. +intros x y comm. +apply natlike_ind. +now rewrite Power_0, Unit_def_r, Unit_def_l. +intros n Hn IHn. +unfold Zsucc. +rewrite (Power_s _ _ Hn). +rewrite Assoc. +rewrite IHn. +rewrite <- Assoc. +rewrite <- Assoc. +now rewrite comm. +Qed. + +(* Why3 goal *) +Lemma Power_comm2 : + forall (x:t) (y:t), ((infix_as x y) = (infix_as y x)) -> forall (n:Z), + (0%Z <= n)%Z -> + ((power (infix_as x y) n) = (infix_as (power x n) (power y n))). +Proof. +intros x y comm. +apply natlike_ind. +rewrite 3!Power_0. +now rewrite Unit_def_r. +intros n Hn IHn. +unfold Zsucc. +rewrite 3!(Power_s _ _ Hn). +rewrite IHn. +rewrite <- Assoc. +rewrite (Assoc x). +rewrite <- (Power_comm1 _ _ comm _ Hn). +now rewrite <- 2!Assoc. +Qed. + +End Exponentiation. diff --git a/src/plugins/wp/share/coqwp/int/Int.v b/src/plugins/wp/share/coqwp/int/Int.v index f262ae63745..a5106073930 100644 --- a/src/plugins/wp/share/coqwp/int/Int.v +++ b/src/plugins/wp/share/coqwp/int/Int.v @@ -1,12 +1,13 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(**************************************************************************) +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) @@ -14,26 +15,31 @@ Require Import BuiltIn. Require BuiltIn. (* Why3 comment *) -(* infix_ls is replaced with (x < x1)%Z by the coq driver *) - -(* Why3 goal *) -Lemma infix_lseq_def : forall (x:Z) (y:Z), (x <= y)%Z <-> ((x < y)%Z \/ - (x = y)). -exact Zle_lt_or_eq_iff. -Qed. +(* prefix_mn is replaced with (-x)%Z by the coq driver *) (* Why3 comment *) (* infix_pl is replaced with (x + x1)%Z by the coq driver *) (* Why3 comment *) -(* prefix_mn is replaced with (-x)%Z by the coq driver *) +(* infix_as is replaced with (x * x1)%Z by the coq driver *) (* Why3 comment *) -(* infix_as is replaced with (x * x1)%Z by the coq driver *) +(* infix_ls is replaced with (x < x1)%Z by the coq driver *) + +(* Why3 goal *) +Lemma infix_mn_def : forall (x:Z) (y:Z), ((x - y)%Z = (x + (-y)%Z)%Z). +reflexivity. +Qed. + +(* Why3 goal *) +Lemma infix_lseq_def : + forall (x:Z) (y:Z), (x <= y)%Z <-> ((x < y)%Z \/ (x = y)). +exact Zle_lt_or_eq_iff. +Qed. (* Why3 goal *) -Lemma Assoc : forall (x:Z) (y:Z) (z:Z), - (((x + y)%Z + z)%Z = (x + (y + z)%Z)%Z). +Lemma Assoc : + forall (x:Z) (y:Z) (z:Z), (((x + y)%Z + z)%Z = (x + (y + z)%Z)%Z). Proof. intros x y z. apply sym_eq. @@ -71,8 +77,8 @@ exact Zplus_comm. Qed. (* Why3 goal *) -Lemma Assoc1 : forall (x:Z) (y:Z) (z:Z), - (((x * y)%Z * z)%Z = (x * (y * z)%Z)%Z). +Lemma Assoc1 : + forall (x:Z) (y:Z) (z:Z), (((x * y)%Z * z)%Z = (x * (y * z)%Z)%Z). Proof. intros x y z. apply sym_eq. @@ -80,26 +86,21 @@ apply Zmult_assoc. Qed. (* Why3 goal *) -Lemma Mul_distr_l : forall (x:Z) (y:Z) (z:Z), - ((x * (y + z)%Z)%Z = ((x * y)%Z + (x * z)%Z)%Z). +Lemma Mul_distr_l : + forall (x:Z) (y:Z) (z:Z), ((x * (y + z)%Z)%Z = ((x * y)%Z + (x * z)%Z)%Z). Proof. intros x y z. apply Zmult_plus_distr_r. Qed. (* Why3 goal *) -Lemma Mul_distr_r : forall (x:Z) (y:Z) (z:Z), - (((y + z)%Z * x)%Z = ((y * x)%Z + (z * x)%Z)%Z). +Lemma Mul_distr_r : + forall (x:Z) (y:Z) (z:Z), (((y + z)%Z * x)%Z = ((y * x)%Z + (z * x)%Z)%Z). Proof. intros x y z. apply Zmult_plus_distr_l. Qed. -(* Why3 goal *) -Lemma infix_mn_def : forall (x:Z) (y:Z), ((x - y)%Z = (x + (-y)%Z)%Z). -reflexivity. -Qed. - (* Why3 goal *) Lemma Comm1 : forall (x:Z) (y:Z), ((x * y)%Z = (y * x)%Z). Proof. @@ -126,14 +127,14 @@ apply Zle_refl. Qed. (* Why3 goal *) -Lemma Trans : forall (x:Z) (y:Z) (z:Z), (x <= y)%Z -> ((y <= z)%Z -> - (x <= z)%Z). +Lemma Trans : + forall (x:Z) (y:Z) (z:Z), (x <= y)%Z -> (y <= z)%Z -> (x <= z)%Z. Proof. exact Zle_trans. Qed. (* Why3 goal *) -Lemma Antisymm : forall (x:Z) (y:Z), (x <= y)%Z -> ((y <= x)%Z -> (x = y)). +Lemma Antisymm : forall (x:Z) (y:Z), (x <= y)%Z -> (y <= x)%Z -> (x = y). Proof. exact Zle_antisym. Qed. @@ -157,15 +158,16 @@ now left. Qed. (* Why3 goal *) -Lemma CompatOrderAdd : forall (x:Z) (y:Z) (z:Z), (x <= y)%Z -> - ((x + z)%Z <= (y + z)%Z)%Z. +Lemma CompatOrderAdd : + forall (x:Z) (y:Z) (z:Z), (x <= y)%Z -> ((x + z)%Z <= (y + z)%Z)%Z. Proof. exact Zplus_le_compat_r. Qed. (* Why3 goal *) -Lemma CompatOrderMult : forall (x:Z) (y:Z) (z:Z), (x <= y)%Z -> - ((0%Z <= z)%Z -> ((x * z)%Z <= (y * z)%Z)%Z). +Lemma CompatOrderMult : + forall (x:Z) (y:Z) (z:Z), (x <= y)%Z -> (0%Z <= z)%Z -> + ((x * z)%Z <= (y * z)%Z)%Z. Proof. exact Zmult_le_compat_r. Qed. diff --git a/src/plugins/wp/share/coqwp/int/MinMax.v b/src/plugins/wp/share/coqwp/int/MinMax.v index 793c7139aef..d969091e781 100644 --- a/src/plugins/wp/share/coqwp/int/MinMax.v +++ b/src/plugins/wp/share/coqwp/int/MinMax.v @@ -1,12 +1,13 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(**************************************************************************) +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) @@ -18,9 +19,10 @@ Require int.Int. (* min is replaced with (ZArith.BinInt.Z.min x x1) by the coq driver *) (* Why3 goal *) -Lemma min_def : forall (x:Z) (y:Z), ((x <= y)%Z -> - ((ZArith.BinInt.Z.min x y) = x)) /\ ((~ (x <= y)%Z) -> - ((ZArith.BinInt.Z.min x y) = y)). +Lemma min_def : + forall (x:Z) (y:Z), + ((x <= y)%Z -> ((ZArith.BinInt.Z.min x y) = x)) /\ + (~ (x <= y)%Z -> ((ZArith.BinInt.Z.min x y) = y)). Proof. intros x y. split ; intros H. @@ -33,9 +35,10 @@ Qed. (* max is replaced with (ZArith.BinInt.Z.max x x1) by the coq driver *) (* Why3 goal *) -Lemma max_def : forall (x:Z) (y:Z), ((x <= y)%Z -> - ((ZArith.BinInt.Z.max x y) = y)) /\ ((~ (x <= y)%Z) -> - ((ZArith.BinInt.Z.max x y) = x)). +Lemma max_def : + forall (x:Z) (y:Z), + ((x <= y)%Z -> ((ZArith.BinInt.Z.max x y) = y)) /\ + (~ (x <= y)%Z -> ((ZArith.BinInt.Z.max x y) = x)). Proof. intros x y. split ; intros H. @@ -45,40 +48,44 @@ omega. Qed. (* Why3 goal *) -Lemma Min_r : forall (x:Z) (y:Z), (y <= x)%Z -> - ((ZArith.BinInt.Z.min x y) = y). +Lemma Min_r : + forall (x:Z) (y:Z), (y <= x)%Z -> ((ZArith.BinInt.Z.min x y) = y). exact Zmin_r. Qed. (* Why3 goal *) -Lemma Max_l : forall (x:Z) (y:Z), (y <= x)%Z -> - ((ZArith.BinInt.Z.max x y) = x). +Lemma Max_l : + forall (x:Z) (y:Z), (y <= x)%Z -> ((ZArith.BinInt.Z.max x y) = x). exact Zmax_l. Qed. (* Why3 goal *) -Lemma Min_comm : forall (x:Z) (y:Z), - ((ZArith.BinInt.Z.min x y) = (ZArith.BinInt.Z.min y x)). +Lemma Min_comm : + forall (x:Z) (y:Z), ((ZArith.BinInt.Z.min x y) = (ZArith.BinInt.Z.min y x)). exact Zmin_comm. Qed. (* Why3 goal *) -Lemma Max_comm : forall (x:Z) (y:Z), - ((ZArith.BinInt.Z.max x y) = (ZArith.BinInt.Z.max y x)). +Lemma Max_comm : + forall (x:Z) (y:Z), ((ZArith.BinInt.Z.max x y) = (ZArith.BinInt.Z.max y x)). exact Zmax_comm. Qed. (* Why3 goal *) -Lemma Min_assoc : forall (x:Z) (y:Z) (z:Z), - ((ZArith.BinInt.Z.min (ZArith.BinInt.Z.min x y) z) = (ZArith.BinInt.Z.min x (ZArith.BinInt.Z.min y z))). +Lemma Min_assoc : + forall (x:Z) (y:Z) (z:Z), + ((ZArith.BinInt.Z.min (ZArith.BinInt.Z.min x y) z) = + (ZArith.BinInt.Z.min x (ZArith.BinInt.Z.min y z))). Proof. intros x y z. apply eq_sym, Zmin_assoc. Qed. (* Why3 goal *) -Lemma Max_assoc : forall (x:Z) (y:Z) (z:Z), - ((ZArith.BinInt.Z.max (ZArith.BinInt.Z.max x y) z) = (ZArith.BinInt.Z.max x (ZArith.BinInt.Z.max y z))). +Lemma Max_assoc : + forall (x:Z) (y:Z) (z:Z), + ((ZArith.BinInt.Z.max (ZArith.BinInt.Z.max x y) z) = + (ZArith.BinInt.Z.max x (ZArith.BinInt.Z.max y z))). Proof. intros x y z. apply eq_sym, Zmax_assoc. diff --git a/src/plugins/wp/share/coqwp/int/Power.v b/src/plugins/wp/share/coqwp/int/Power.v new file mode 100644 index 00000000000..e2bed67ea5d --- /dev/null +++ b/src/plugins/wp/share/coqwp/int/Power.v @@ -0,0 +1,132 @@ +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) + +(* This file is generated by Why3's Coq-realize driver *) +(* Beware! Only edit allowed sections below *) +Require Import BuiltIn. +Require BuiltIn. +Require int.Int. + +Require Import Exponentiation. + +(* Why3 goal *) +Notation power := Zpower. + +Lemma power_is_exponentiation : + forall x n, (0 <= n)%Z -> power x n = Exponentiation.power _ 1%Z Zmult x n. +Proof. +intros x [|n|n] H. +easy. +2: now elim H. +unfold Exponentiation.power, power, Zpower_pos. +now rewrite iter_nat_of_P. +Qed. + +(* Why3 goal *) +Lemma Power_0 : forall (x:Z), ((power x 0%Z) = 1%Z). +Proof. +intros x. +apply refl_equal. +Qed. + +(* Why3 goal *) +Lemma Power_s : + forall (x:Z) (n:Z), (0%Z <= n)%Z -> + ((power x (n + 1%Z)%Z) = (x * (power x n))%Z). +Proof. +intros x n h1. +rewrite Zpower_exp. +change (power x 1) with (x * 1)%Z. +ring. +now apply Zle_ge. +easy. +Qed. + +(* Why3 goal *) +Lemma Power_s_alt : + forall (x:Z) (n:Z), (0%Z < n)%Z -> + ((power x n) = (x * (power x (n - 1%Z)%Z))%Z). +intros x n h1. +rewrite <- Power_s. +f_equal; auto with zarith. +omega. +Qed. + +(* Why3 goal *) +Lemma Power_1 : forall (x:Z), ((power x 1%Z) = x). +Proof. +exact Zmult_1_r. +Qed. + +(* Why3 goal *) +Lemma Power_sum : + forall (x:Z) (n:Z) (m:Z), (0%Z <= n)%Z -> (0%Z <= m)%Z -> + ((power x (n + m)%Z) = ((power x n) * (power x m))%Z). +Proof. +intros x n m Hn Hm. +now apply Zpower_exp; apply Zle_ge. +Qed. + +(* Why3 goal *) +Lemma Power_mult : + forall (x:Z) (n:Z) (m:Z), (0%Z <= n)%Z -> (0%Z <= m)%Z -> + ((power x (n * m)%Z) = (power (power x n) m)). +Proof. +intros x n m Hn Hm. +rewrite 3!power_is_exponentiation ; auto with zarith. +apply Power_mult ; auto with zarith. +Qed. + +(* Why3 goal *) +Lemma Power_comm1 : + forall (x:Z) (y:Z), ((x * y)%Z = (y * x)%Z) -> forall (n:Z), + (0%Z <= n)%Z -> (((power x n) * y)%Z = (y * (power x n))%Z). +Proof. +intros x y h1 n h2. +auto with zarith. +Qed. + +(* Why3 goal *) +Lemma Power_comm2 : + forall (x:Z) (y:Z), ((x * y)%Z = (y * x)%Z) -> forall (n:Z), + (0%Z <= n)%Z -> ((power (x * y)%Z n) = ((power x n) * (power y n))%Z). +Proof. +intros x y h1 n h2. +rewrite 3!power_is_exponentiation ; auto with zarith. +apply Power_comm2 ; auto with zarith. +Qed. + +(* Why3 goal *) +Lemma Power_non_neg : + forall (x:Z) (y:Z), ((0%Z <= x)%Z /\ (0%Z <= y)%Z) -> + (0%Z <= (power x y))%Z. +intros x y (h1,h2). +now apply Z.pow_nonneg. +Qed. + +(* Why3 goal *) +Lemma Power_pos : + forall (x:Z) (y:Z), ((0%Z < x)%Z /\ (0%Z <= y)%Z) -> (0%Z < (power x y))%Z. +Proof. +intros x y (h1,h2). +eapply Z.pow_pos_nonneg; eauto. +Qed. + +Open Scope Z_scope. + +(* Why3 goal *) +Lemma Power_monotonic : + forall (x:Z) (n:Z) (m:Z), ((0%Z < x)%Z /\ ((0%Z <= n)%Z /\ (n <= m)%Z)) -> + ((power x n) <= (power x m))%Z. +intros. +apply Z.pow_le_mono_r; auto with zarith. +Qed. + diff --git a/src/plugins/wp/share/coqwp/map/Const.v b/src/plugins/wp/share/coqwp/map/Const.v index fbe804309c1..c2ebf2444c8 100644 --- a/src/plugins/wp/share/coqwp/map/Const.v +++ b/src/plugins/wp/share/coqwp/map/Const.v @@ -1,33 +1,23 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(**************************************************************************) +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) Require Import BuiltIn. Require BuiltIn. +Require HighOrd. Require map.Map. -(* Why3 goal *) -Definition const: forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, - b -> (map.Map.map a b). -intros a a_WT b b_WT v. -constructor; intros i. -exact v. -Defined. - -(* Why3 goal *) -Lemma Const : forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, - forall (b1:b) (a1:a), ((map.Map.get (const b1: (map.Map.map a b)) - a1) = b1). -intros a a_WT b b_WT b1 a1. -unfold const. -auto. -Qed. +(* Why3 assumption *) +Definition const {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b} + (v:b) : a -> b := + fun (us:a) => v. diff --git a/src/plugins/wp/share/coqwp/map/Map.v b/src/plugins/wp/share/coqwp/map/Map.v index 8275368d51c..1cb87d0a041 100644 --- a/src/plugins/wp/share/coqwp/map/Map.v +++ b/src/plugins/wp/share/coqwp/map/Map.v @@ -1,28 +1,24 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(**************************************************************************) +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) Require Import BuiltIn. Require BuiltIn. +Require HighOrd. Require Import ClassicalEpsilon. -Inductive _map (a b:Type) := - | _map_constr : (a -> b) -> _map a b. - -(* Why3 goal *) -Definition map : forall (a:Type) (b:Type), Type. -intros. -exact (_map a b). -Defined. +(* Why3 assumption *) +Definition map (a:Type) (b:Type) := a -> b. Global Instance map_WhyType : forall (a:Type) {a_WT:WhyType a} (b:Type) {b_WT:WhyType b}, WhyType (map a b). Proof. @@ -34,17 +30,10 @@ apply excluded_middle_informative. Qed. (* Why3 goal *) -Definition get: forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, - (map a b) -> a -> b. -intros a a_WT b b_WT (m) x. -exact (m x). -Defined. - -(* Why3 goal *) -Definition set: forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, - (map a b) -> a -> b -> (map a b). -intros a a_WT b b_WT (m) x y. -split. +Definition set {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b} : + (a -> b) -> a -> b -> a -> b. +Proof. +intros m x y. intros x'. destruct (why_decidable_eq x x') as [H|H]. exact y. @@ -52,32 +41,19 @@ exact (m x'). Defined. (* Why3 goal *) -Lemma Select_eq : forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, - forall (m:(map a b)), forall (a1:a) (a2:a), forall (b1:b), (a1 = a2) -> - ((get (set m a1 b1) a2) = b1). -Proof. -intros a a_WT b b_WT (m) a1 a2 b1 h1. -unfold get, set. -now case why_decidable_eq. -Qed. - -(* Why3 goal *) -Lemma Select_neq : forall {a:Type} {a_WT:WhyType a} - {b:Type} {b_WT:WhyType b}, forall (m:(map a b)), forall (a1:a) (a2:a), - forall (b1:b), (~ (a1 = a2)) -> ((get (set m a1 b1) a2) = (get m a2)). -Proof. -intros a a_WT b b_WT (m) a1 a2 b1 h1. -unfold get, set. -now case why_decidable_eq. -Qed. - -(* Unused content named const -intros a a_WT b b_WT y. -exact (_map_constr _ _ (fun _ => y)). -Defined. - *) -(* Unused content named Const +Lemma set_def {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b} : + forall (f:a -> b) (x:a) (v:b) (y:a), + ((y = x) -> (((set f x v) y) = v)) /\ + (~ (y = x) -> (((set f x v) y) = (f y))). Proof. +intros f x v y. +unfold set. +case why_decidable_eq. +intros <-. +split ; try easy ; intros H ; now elim H. (* TODO: replace by easy after 8.4 *) +intros H. +split ; intros H'. +now elim H. easy. Qed. - *) + diff --git a/src/plugins/wp/share/coqwp/real/Abs.v b/src/plugins/wp/share/coqwp/real/Abs.v index 8ac538e8bff..5c1bcd5b23d 100644 --- a/src/plugins/wp/share/coqwp/real/Abs.v +++ b/src/plugins/wp/share/coqwp/real/Abs.v @@ -1,12 +1,13 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(**************************************************************************) +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) @@ -21,9 +22,10 @@ Import Rbasic_fun. (* abs is replaced with (Reals.Rbasic_fun.Rabs x) by the coq driver *) (* Why3 goal *) -Lemma abs_def : forall (x:R), ((0%R <= x)%R -> - ((Reals.Rbasic_fun.Rabs x) = x)) /\ ((~ (0%R <= x)%R) -> - ((Reals.Rbasic_fun.Rabs x) = (-x)%R)). +Lemma abs_def : + forall (x:R), + ((0%R <= x)%R -> ((Reals.Rbasic_fun.Rabs x) = x)) /\ + (~ (0%R <= x)%R -> ((Reals.Rbasic_fun.Rabs x) = (-x)%R)). split ; intros H. apply Rabs_right. now apply Rle_ge. @@ -32,8 +34,9 @@ now apply Rnot_le_lt. Qed. (* Why3 goal *) -Lemma Abs_le : forall (x:R) (y:R), ((Reals.Rbasic_fun.Rabs x) <= y)%R <-> - (((-y)%R <= x)%R /\ (x <= y)%R). +Lemma Abs_le : + forall (x:R) (y:R), + ((Reals.Rbasic_fun.Rabs x) <= y)%R <-> (((-y)%R <= x)%R /\ (x <= y)%R). intros x y. unfold Rabs. case Rcase_abs ; intros H ; (split ; [intros H0;split | intros (H0,H1)]). @@ -63,20 +66,26 @@ exact Rabs_pos. Qed. (* Why3 goal *) -Lemma Abs_sum : forall (x:R) (y:R), - ((Reals.Rbasic_fun.Rabs (x + y)%R) <= ((Reals.Rbasic_fun.Rabs x) + (Reals.Rbasic_fun.Rabs y))%R)%R. +Lemma Abs_sum : + forall (x:R) (y:R), + ((Reals.Rbasic_fun.Rabs (x + y)%R) <= + ((Reals.Rbasic_fun.Rabs x) + (Reals.Rbasic_fun.Rabs y))%R)%R. exact Rabs_triang. Qed. (* Why3 goal *) -Lemma Abs_prod : forall (x:R) (y:R), - ((Reals.Rbasic_fun.Rabs (x * y)%R) = ((Reals.Rbasic_fun.Rabs x) * (Reals.Rbasic_fun.Rabs y))%R). +Lemma Abs_prod : + forall (x:R) (y:R), + ((Reals.Rbasic_fun.Rabs (x * y)%R) = + ((Reals.Rbasic_fun.Rabs x) * (Reals.Rbasic_fun.Rabs y))%R). exact Rabs_mult. Qed. (* Why3 goal *) -Lemma triangular_inequality : forall (x:R) (y:R) (z:R), - ((Reals.Rbasic_fun.Rabs (x - z)%R) <= ((Reals.Rbasic_fun.Rabs (x - y)%R) + (Reals.Rbasic_fun.Rabs (y - z)%R))%R)%R. +Lemma triangular_inequality : + forall (x:R) (y:R) (z:R), + ((Reals.Rbasic_fun.Rabs (x - z)%R) <= + ((Reals.Rbasic_fun.Rabs (x - y)%R) + (Reals.Rbasic_fun.Rabs (y - z)%R))%R)%R. intros x y z. replace (x - z)%R with ((x - y) + (y - z))%R by ring. apply Rabs_triang. diff --git a/src/plugins/wp/share/coqwp/real/ExpLog.v b/src/plugins/wp/share/coqwp/real/ExpLog.v index 9211ebc212c..b0f17454da3 100644 --- a/src/plugins/wp/share/coqwp/real/ExpLog.v +++ b/src/plugins/wp/share/coqwp/real/ExpLog.v @@ -1,12 +1,13 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(**************************************************************************) +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) @@ -30,8 +31,10 @@ Qed. Require Import Exp_prop. (* Why3 goal *) -Lemma Exp_sum : forall (x:R) (y:R), - ((Reals.Rtrigo_def.exp (x + y)%R) = ((Reals.Rtrigo_def.exp x) * (Reals.Rtrigo_def.exp y))%R). +Lemma Exp_sum : + forall (x:R) (y:R), + ((Reals.Rtrigo_def.exp (x + y)%R) = + ((Reals.Rtrigo_def.exp x) * (Reals.Rtrigo_def.exp y))%R). exact exp_plus. Qed. @@ -44,28 +47,31 @@ exact ln_1. Qed. (* Why3 goal *) -Lemma Log_mul : forall (x:R) (y:R), ((0%R < x)%R /\ (0%R < y)%R) -> - ((Reals.Rpower.ln (x * y)%R) = ((Reals.Rpower.ln x) + (Reals.Rpower.ln y))%R). +Lemma Log_mul : + forall (x:R) (y:R), ((0%R < x)%R /\ (0%R < y)%R) -> + ((Reals.Rpower.ln (x * y)%R) = + ((Reals.Rpower.ln x) + (Reals.Rpower.ln y))%R). intros x y (Hx,Hy). now apply ln_mult. Qed. (* Why3 goal *) -Lemma Log_exp : forall (x:R), - ((Reals.Rpower.ln (Reals.Rtrigo_def.exp x)) = x). +Lemma Log_exp : + forall (x:R), ((Reals.Rpower.ln (Reals.Rtrigo_def.exp x)) = x). exact ln_exp. Qed. (* Why3 goal *) -Lemma Exp_log : forall (x:R), (0%R < x)%R -> +Lemma Exp_log : + forall (x:R), (0%R < x)%R -> ((Reals.Rtrigo_def.exp (Reals.Rpower.ln x)) = x). exact exp_ln. Qed. (* Why3 assumption *) -Definition log2 (x:R): R := ((Reals.Rpower.ln x) / (Reals.Rpower.ln 2%R))%R. +Definition log2 (x:R) : R := ((Reals.Rpower.ln x) / (Reals.Rpower.ln 2%R))%R. (* Why3 assumption *) -Definition log10 (x:R): R := +Definition log10 (x:R) : R := ((Reals.Rpower.ln x) / (Reals.Rpower.ln 10%R))%R. diff --git a/src/plugins/wp/share/coqwp/real/FromInt.v b/src/plugins/wp/share/coqwp/real/FromInt.v index c10466940d6..fa6f14fc385 100644 --- a/src/plugins/wp/share/coqwp/real/FromInt.v +++ b/src/plugins/wp/share/coqwp/real/FromInt.v @@ -1,12 +1,13 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(**************************************************************************) +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) @@ -31,21 +32,24 @@ split. Qed. (* Why3 goal *) -Lemma Add : forall (x:Z) (y:Z), +Lemma Add : + forall (x:Z) (y:Z), ((BuiltIn.IZR (x + y)%Z) = ((BuiltIn.IZR x) + (BuiltIn.IZR y))%R). Proof. exact plus_IZR. Qed. (* Why3 goal *) -Lemma Sub : forall (x:Z) (y:Z), +Lemma Sub : + forall (x:Z) (y:Z), ((BuiltIn.IZR (x - y)%Z) = ((BuiltIn.IZR x) - (BuiltIn.IZR y))%R). Proof. exact minus_IZR. Qed. (* Why3 goal *) -Lemma Mul : forall (x:Z) (y:Z), +Lemma Mul : + forall (x:Z) (y:Z), ((BuiltIn.IZR (x * y)%Z) = ((BuiltIn.IZR x) * (BuiltIn.IZR y))%R). Proof. exact mult_IZR. @@ -58,8 +62,15 @@ exact opp_IZR. Qed. (* Why3 goal *) -Lemma Monotonic : forall (x:Z) (y:Z), (x <= y)%Z -> - ((BuiltIn.IZR x) <= (BuiltIn.IZR y))%R. +Lemma Injective : + forall (x:Z) (y:Z), ((BuiltIn.IZR x) = (BuiltIn.IZR y)) -> (x = y). +Proof. +exact eq_IZR. +Qed. + +(* Why3 goal *) +Lemma Monotonic : + forall (x:Z) (y:Z), (x <= y)%Z -> ((BuiltIn.IZR x) <= (BuiltIn.IZR y))%R. Proof. exact (IZR_le). Qed. diff --git a/src/plugins/wp/share/coqwp/real/MinMax.v b/src/plugins/wp/share/coqwp/real/MinMax.v index 4eee104e72b..3f6ade0b9ac 100644 --- a/src/plugins/wp/share/coqwp/real/MinMax.v +++ b/src/plugins/wp/share/coqwp/real/MinMax.v @@ -1,12 +1,13 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(**************************************************************************) +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) @@ -20,9 +21,10 @@ Require Import Rbasic_fun. (* min is replaced with (Reals.Rbasic_fun.Rmin x x1) by the coq driver *) (* Why3 goal *) -Lemma min_def : forall (x:R) (y:R), ((x <= y)%R -> - ((Reals.Rbasic_fun.Rmin x y) = x)) /\ ((~ (x <= y)%R) -> - ((Reals.Rbasic_fun.Rmin x y) = y)). +Lemma min_def : + forall (x:R) (y:R), + ((x <= y)%R -> ((Reals.Rbasic_fun.Rmin x y) = x)) /\ + (~ (x <= y)%R -> ((Reals.Rbasic_fun.Rmin x y) = y)). Proof. intros x y. split ; intros H. @@ -35,9 +37,10 @@ Qed. (* max is replaced with (Reals.Rbasic_fun.Rmax x x1) by the coq driver *) (* Why3 goal *) -Lemma max_def : forall (x:R) (y:R), ((x <= y)%R -> - ((Reals.Rbasic_fun.Rmax x y) = y)) /\ ((~ (x <= y)%R) -> - ((Reals.Rbasic_fun.Rmax x y) = x)). +Lemma max_def : + forall (x:R) (y:R), + ((x <= y)%R -> ((Reals.Rbasic_fun.Rmax x y) = y)) /\ + (~ (x <= y)%R -> ((Reals.Rbasic_fun.Rmax x y) = x)). Proof. intros x y. split ; intros H. @@ -47,32 +50,36 @@ now apply Rlt_le, Rnot_le_lt. Qed. (* Why3 goal *) -Lemma Min_r : forall (x:R) (y:R), (y <= x)%R -> - ((Reals.Rbasic_fun.Rmin x y) = y). +Lemma Min_r : + forall (x:R) (y:R), (y <= x)%R -> ((Reals.Rbasic_fun.Rmin x y) = y). exact Rmin_right. Qed. (* Why3 goal *) -Lemma Max_l : forall (x:R) (y:R), (y <= x)%R -> - ((Reals.Rbasic_fun.Rmax x y) = x). +Lemma Max_l : + forall (x:R) (y:R), (y <= x)%R -> ((Reals.Rbasic_fun.Rmax x y) = x). exact Rmax_left. Qed. (* Why3 goal *) -Lemma Min_comm : forall (x:R) (y:R), +Lemma Min_comm : + forall (x:R) (y:R), ((Reals.Rbasic_fun.Rmin x y) = (Reals.Rbasic_fun.Rmin y x)). exact Rmin_comm. Qed. (* Why3 goal *) -Lemma Max_comm : forall (x:R) (y:R), +Lemma Max_comm : + forall (x:R) (y:R), ((Reals.Rbasic_fun.Rmax x y) = (Reals.Rbasic_fun.Rmax y x)). exact Rmax_comm. Qed. (* Why3 goal *) -Lemma Min_assoc : forall (x:R) (y:R) (z:R), - ((Reals.Rbasic_fun.Rmin (Reals.Rbasic_fun.Rmin x y) z) = (Reals.Rbasic_fun.Rmin x (Reals.Rbasic_fun.Rmin y z))). +Lemma Min_assoc : + forall (x:R) (y:R) (z:R), + ((Reals.Rbasic_fun.Rmin (Reals.Rbasic_fun.Rmin x y) z) = + (Reals.Rbasic_fun.Rmin x (Reals.Rbasic_fun.Rmin y z))). Proof. intros x y z. destruct (Rle_or_lt x y) as [Hxy|Hxy]. @@ -93,8 +100,10 @@ apply Rmin_l. Qed. (* Why3 goal *) -Lemma Max_assoc : forall (x:R) (y:R) (z:R), - ((Reals.Rbasic_fun.Rmax (Reals.Rbasic_fun.Rmax x y) z) = (Reals.Rbasic_fun.Rmax x (Reals.Rbasic_fun.Rmax y z))). +Lemma Max_assoc : + forall (x:R) (y:R) (z:R), + ((Reals.Rbasic_fun.Rmax (Reals.Rbasic_fun.Rmax x y) z) = + (Reals.Rbasic_fun.Rmax x (Reals.Rbasic_fun.Rmax y z))). Proof. intros x y z. destruct (Rle_or_lt x y) as [Hxy|Hxy]. diff --git a/src/plugins/wp/share/coqwp/real/PowerReal.v b/src/plugins/wp/share/coqwp/real/PowerReal.v index 1a03e615e87..1532b405d1b 100644 --- a/src/plugins/wp/share/coqwp/real/PowerReal.v +++ b/src/plugins/wp/share/coqwp/real/PowerReal.v @@ -1,12 +1,13 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(**************************************************************************) +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) @@ -15,7 +16,10 @@ Require Reals.Rtrigo_def. Require Reals.Rpower. Require Reals.R_sqrt. Require BuiltIn. +Require int.Int. +Require int.Power. Require real.Real. +Require real.FromInt. Require real.Square. Require real.ExpLog. @@ -25,47 +29,53 @@ Import Rpower. (* pow is replaced with (Reals.Rpower.Rpower x x1) by the coq driver *) (* Why3 goal *) -Lemma Pow_def : forall (x:R) (y:R), (0%R < x)%R -> - ((Reals.Rpower.Rpower x y) = (Reals.Rtrigo_def.exp (y * (Reals.Rpower.ln x))%R)). +Lemma Pow_def : + forall (x:R) (y:R), (0%R < x)%R -> + ((Reals.Rpower.Rpower x y) = + (Reals.Rtrigo_def.exp (y * (Reals.Rpower.ln x))%R)). Proof. easy. Qed. (* Why3 goal *) -Lemma Pow_pos : forall (x:R) (y:R), (0%R < x)%R -> - (0%R < (Reals.Rpower.Rpower x y))%R. +Lemma Pow_pos : + forall (x:R) (y:R), (0%R < x)%R -> (0%R < (Reals.Rpower.Rpower x y))%R. Proof. intros x y h1. apply Exp_prop.exp_pos. Qed. (* Why3 goal *) -Lemma Pow_plus : forall (x:R) (y:R) (z:R), (0%R < z)%R -> - ((Reals.Rpower.Rpower z (x + y)%R) = ((Reals.Rpower.Rpower z x) * (Reals.Rpower.Rpower z y))%R). +Lemma Pow_plus : + forall (x:R) (y:R) (z:R), (0%R < z)%R -> + ((Reals.Rpower.Rpower z (x + y)%R) = + ((Reals.Rpower.Rpower z x) * (Reals.Rpower.Rpower z y))%R). Proof. intros x y z h1. now apply Rpower_plus. Qed. (* Why3 goal *) -Lemma Pow_mult : forall (x:R) (y:R) (z:R), (0%R < x)%R -> - ((Reals.Rpower.Rpower (Reals.Rpower.Rpower x y) z) = (Reals.Rpower.Rpower x (y * z)%R)). +Lemma Pow_mult : + forall (x:R) (y:R) (z:R), (0%R < x)%R -> + ((Reals.Rpower.Rpower (Reals.Rpower.Rpower x y) z) = + (Reals.Rpower.Rpower x (y * z)%R)). Proof. intros x y z h1. now apply Rpower_mult. Qed. (* Why3 goal *) -Lemma Pow_x_zero : forall (x:R), (0%R < x)%R -> - ((Reals.Rpower.Rpower x 0%R) = 1%R). +Lemma Pow_x_zero : + forall (x:R), (0%R < x)%R -> ((Reals.Rpower.Rpower x 0%R) = 1%R). Proof. intros x h1. now apply Rpower_O. Qed. (* Why3 goal *) -Lemma Pow_x_one : forall (x:R), (0%R < x)%R -> - ((Reals.Rpower.Rpower x 1%R) = x). +Lemma Pow_x_one : + forall (x:R), (0%R < x)%R -> ((Reals.Rpower.Rpower x 1%R) = x). Proof. intros x h1. now apply Rpower_1. @@ -82,7 +92,8 @@ now apply Rtrigo_def.exp_0. Qed. (* Why3 goal *) -Lemma Pow_x_two : forall (x:R), (0%R < x)%R -> +Lemma Pow_x_two : + forall (x:R), (0%R < x)%R -> ((Reals.Rpower.Rpower x 2%R) = (Reals.RIneq.Rsqr x)). Proof. intros x h1. @@ -92,7 +103,8 @@ now rewrite Rmult_1_r. Qed. (* Why3 goal *) -Lemma Pow_half : forall (x:R), (0%R < x)%R -> +Lemma Pow_half : + forall (x:R), (0%R < x)%R -> ((Reals.Rpower.Rpower x (05 / 10)%R) = (Reals.R_sqrt.sqrt x)). Proof. intros x h1. @@ -100,3 +112,17 @@ replace (5 / 10)%R with (/ 2)%R by field. now apply Rpower_sqrt. Qed. +(* Why3 goal *) +Lemma pow_from_int : + forall (x:Z) (y:Z), (0%Z < x)%Z -> (0%Z <= y)%Z -> + ((Reals.Rpower.Rpower (BuiltIn.IZR x) (BuiltIn.IZR y)) = + (BuiltIn.IZR (int.Power.power x y))). +Proof. +intros x y h1 h2. +rewrite <- Z2Nat.id with (1 := h2). +rewrite <- pow_IZR. +rewrite <- INR_IZR_INZ. +apply Rpower_pow. +now apply (IZR_lt 0). +Qed. + diff --git a/src/plugins/wp/share/coqwp/real/Real.v b/src/plugins/wp/share/coqwp/real/Real.v index 1d80601d2f3..8fc9927ec9b 100644 --- a/src/plugins/wp/share/coqwp/real/Real.v +++ b/src/plugins/wp/share/coqwp/real/Real.v @@ -1,12 +1,13 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(**************************************************************************) +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) @@ -14,26 +15,27 @@ Require Import BuiltIn. Require BuiltIn. (* Why3 comment *) -(* infix_ls is replaced with (x < x1)%R by the coq driver *) - -(* Why3 goal *) -Lemma infix_lseq_def : forall (x:R) (y:R), (x <= y)%R <-> ((x < y)%R \/ - (x = y)). -reflexivity. -Qed. +(* prefix_mn is replaced with (-x)%R by the coq driver *) (* Why3 comment *) (* infix_pl is replaced with (x + x1)%R by the coq driver *) (* Why3 comment *) -(* prefix_mn is replaced with (-x)%R by the coq driver *) +(* infix_as is replaced with (x * x1)%R by the coq driver *) (* Why3 comment *) -(* infix_as is replaced with (x * x1)%R by the coq driver *) +(* infix_ls is replaced with (x < x1)%R by the coq driver *) + +(* Why3 goal *) +Lemma infix_lseq_def : + forall (x:R) (y:R), (x <= y)%R <-> ((x < y)%R \/ (x = y)). +Proof. +reflexivity. +Qed. (* Why3 goal *) -Lemma Assoc : forall (x:R) (y:R) (z:R), - (((x + y)%R + z)%R = (x + (y + z)%R)%R). +Lemma Assoc : + forall (x:R) (y:R) (z:R), (((x + y)%R + z)%R = (x + (y + z)%R)%R). Proof. exact Rplus_assoc. Qed. @@ -69,33 +71,28 @@ exact Rplus_comm. Qed. (* Why3 goal *) -Lemma Assoc1 : forall (x:R) (y:R) (z:R), - (((x * y)%R * z)%R = (x * (y * z)%R)%R). +Lemma Assoc1 : + forall (x:R) (y:R) (z:R), (((x * y)%R * z)%R = (x * (y * z)%R)%R). Proof. exact Rmult_assoc. Qed. (* Why3 goal *) -Lemma Mul_distr_l : forall (x:R) (y:R) (z:R), - ((x * (y + z)%R)%R = ((x * y)%R + (x * z)%R)%R). +Lemma Mul_distr_l : + forall (x:R) (y:R) (z:R), ((x * (y + z)%R)%R = ((x * y)%R + (x * z)%R)%R). Proof. intros x y z. apply Rmult_plus_distr_l. Qed. (* Why3 goal *) -Lemma Mul_distr_r : forall (x:R) (y:R) (z:R), - (((y + z)%R * x)%R = ((y * x)%R + (z * x)%R)%R). +Lemma Mul_distr_r : + forall (x:R) (y:R) (z:R), (((y + z)%R * x)%R = ((y * x)%R + (z * x)%R)%R). Proof. intros x y z. apply Rmult_plus_distr_r. Qed. -(* Why3 goal *) -Lemma infix_mn_def : forall (x:R) (y:R), ((x - y)%R = (x + (-y)%R)%R). -reflexivity. -Qed. - (* Why3 goal *) Lemma Comm1 : forall (x:R) (y:R), ((x * y)%R = (y * x)%R). Proof. @@ -119,19 +116,28 @@ Qed. (* inv is replaced with (Reals.Rdefinitions.Rinv x) by the coq driver *) (* Why3 goal *) -Lemma Inverse : forall (x:R), (~ (x = 0%R)) -> - ((x * (Reals.Rdefinitions.Rinv x))%R = 1%R). +Lemma Inverse : + forall (x:R), ~ (x = 0%R) -> ((x * (Reals.Rdefinitions.Rinv x))%R = 1%R). +Proof. exact Rinv_r. Qed. (* Why3 goal *) -Lemma infix_sl_def : forall (x:R) (y:R), - ((x / y)%R = (x * (Reals.Rdefinitions.Rinv y))%R). +Lemma infix_mn_def : forall (x:R) (y:R), ((x - y)%R = (x + (-y)%R)%R). +Proof. +reflexivity. +Qed. + +(* Why3 goal *) +Lemma infix_sl_def : + forall (x:R) (y:R), ((x / y)%R = (x * (Reals.Rdefinitions.Rinv y))%R). +Proof. reflexivity. Qed. (* Why3 goal *) -Lemma add_div : forall (x:R) (y:R) (z:R), (~ (z = 0%R)) -> +Lemma add_div : + forall (x:R) (y:R) (z:R), ~ (z = 0%R) -> (((x + y)%R / z)%R = ((x / z)%R + (y / z)%R)%R). Proof. intros. @@ -140,7 +146,8 @@ assumption. Qed. (* Why3 goal *) -Lemma sub_div : forall (x:R) (y:R) (z:R), (~ (z = 0%R)) -> +Lemma sub_div : + forall (x:R) (y:R) (z:R), ~ (z = 0%R) -> (((x - y)%R / z)%R = ((x / z)%R - (y / z)%R)%R). Proof. intros. @@ -149,8 +156,8 @@ assumption. Qed. (* Why3 goal *) -Lemma neg_div : forall (x:R) (y:R), (~ (y = 0%R)) -> - (((-x)%R / y)%R = (-(x / y)%R)%R). +Lemma neg_div : + forall (x:R) (y:R), ~ (y = 0%R) -> (((-x)%R / y)%R = (-(x / y)%R)%R). Proof. intros. field. @@ -158,7 +165,8 @@ assumption. Qed. (* Why3 goal *) -Lemma assoc_mul_div : forall (x:R) (y:R) (z:R), (~ (z = 0%R)) -> +Lemma assoc_mul_div : + forall (x:R) (y:R) (z:R), ~ (z = 0%R) -> (((x * y)%R / z)%R = (x * (y / z)%R)%R). Proof. intros x y z _. @@ -166,8 +174,9 @@ apply Rmult_assoc. Qed. (* Why3 goal *) -Lemma assoc_div_mul : forall (x:R) (y:R) (z:R), ((~ (y = 0%R)) /\ - ~ (z = 0%R)) -> (((x / y)%R / z)%R = (x / (y * z)%R)%R). +Lemma assoc_div_mul : + forall (x:R) (y:R) (z:R), (~ (y = 0%R) /\ ~ (z = 0%R)) -> + (((x / y)%R / z)%R = (x / (y * z)%R)%R). Proof. intros x y z (Zy, Zz). unfold Rdiv. @@ -176,8 +185,9 @@ now rewrite Rinv_mult_distr. Qed. (* Why3 goal *) -Lemma assoc_div_div : forall (x:R) (y:R) (z:R), ((~ (y = 0%R)) /\ - ~ (z = 0%R)) -> ((x / (y / z)%R)%R = ((x * z)%R / y)%R). +Lemma assoc_div_div : + forall (x:R) (y:R) (z:R), (~ (y = 0%R) /\ ~ (z = 0%R)) -> + ((x / (y / z)%R)%R = ((x * z)%R / y)%R). Proof. intros x y z (Zy, Zz). field. @@ -191,14 +201,14 @@ exact Rle_refl. Qed. (* Why3 goal *) -Lemma Trans : forall (x:R) (y:R) (z:R), (x <= y)%R -> ((y <= z)%R -> - (x <= z)%R). +Lemma Trans : + forall (x:R) (y:R) (z:R), (x <= y)%R -> (y <= z)%R -> (x <= z)%R. Proof. exact Rle_trans. Qed. (* Why3 goal *) -Lemma Antisymm : forall (x:R) (y:R), (x <= y)%R -> ((y <= x)%R -> (x = y)). +Lemma Antisymm : forall (x:R) (y:R), (x <= y)%R -> (y <= x)%R -> (x = y). Proof. exact Rle_antisym. Qed. @@ -220,16 +230,17 @@ exact Rle_0_1. Qed. (* Why3 goal *) -Lemma CompatOrderAdd : forall (x:R) (y:R) (z:R), (x <= y)%R -> - ((x + z)%R <= (y + z)%R)%R. +Lemma CompatOrderAdd : + forall (x:R) (y:R) (z:R), (x <= y)%R -> ((x + z)%R <= (y + z)%R)%R. Proof. intros x y z. exact (Rplus_le_compat_r z x y). Qed. (* Why3 goal *) -Lemma CompatOrderMult : forall (x:R) (y:R) (z:R), (x <= y)%R -> - ((0%R <= z)%R -> ((x * z)%R <= (y * z)%R)%R). +Lemma CompatOrderMult : + forall (x:R) (y:R) (z:R), (x <= y)%R -> (0%R <= z)%R -> + ((x * z)%R <= (y * z)%R)%R. Proof. intros x y z H Zz. now apply Rmult_le_compat_r. diff --git a/src/plugins/wp/share/coqwp/real/RealInfix.v b/src/plugins/wp/share/coqwp/real/RealInfix.v index 5275e1ad979..fe99b70efc6 100644 --- a/src/plugins/wp/share/coqwp/real/RealInfix.v +++ b/src/plugins/wp/share/coqwp/real/RealInfix.v @@ -1,12 +1,13 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(**************************************************************************) +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) @@ -14,3 +15,10 @@ Require Import BuiltIn. Require BuiltIn. Require real.Real. +(* Why3 goal *) +Lemma infix_mndt_def : forall (x:R) (y:R), ((x - y)%R = (x + (-y)%R)%R). +Proof. +intros x y. +reflexivity. +Qed. + diff --git a/src/plugins/wp/share/coqwp/real/Square.v b/src/plugins/wp/share/coqwp/real/Square.v index 49db3fd0aea..11e34192e34 100644 --- a/src/plugins/wp/share/coqwp/real/Square.v +++ b/src/plugins/wp/share/coqwp/real/Square.v @@ -1,12 +1,13 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(**************************************************************************) +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) @@ -26,32 +27,36 @@ Qed. (* sqrt is replaced with (Reals.R_sqrt.sqrt x) by the coq driver *) (* Why3 goal *) -Lemma Sqrt_positive : forall (x:R), (0%R <= x)%R -> - (0%R <= (Reals.R_sqrt.sqrt x))%R. +Lemma Sqrt_positive : + forall (x:R), (0%R <= x)%R -> (0%R <= (Reals.R_sqrt.sqrt x))%R. intros x _. apply sqrt_pos. Qed. (* Why3 goal *) -Lemma Sqrt_square : forall (x:R), (0%R <= x)%R -> +Lemma Sqrt_square : + forall (x:R), (0%R <= x)%R -> ((Reals.RIneq.Rsqr (Reals.R_sqrt.sqrt x)) = x). exact sqrt_sqrt. Qed. (* Why3 goal *) -Lemma Square_sqrt : forall (x:R), (0%R <= x)%R -> - ((Reals.R_sqrt.sqrt (x * x)%R) = x). +Lemma Square_sqrt : + forall (x:R), (0%R <= x)%R -> ((Reals.R_sqrt.sqrt (x * x)%R) = x). exact sqrt_square. Qed. (* Why3 goal *) -Lemma Sqrt_mul : forall (x:R) (y:R), ((0%R <= x)%R /\ (0%R <= y)%R) -> - ((Reals.R_sqrt.sqrt (x * y)%R) = ((Reals.R_sqrt.sqrt x) * (Reals.R_sqrt.sqrt y))%R). +Lemma Sqrt_mul : + forall (x:R) (y:R), ((0%R <= x)%R /\ (0%R <= y)%R) -> + ((Reals.R_sqrt.sqrt (x * y)%R) = + ((Reals.R_sqrt.sqrt x) * (Reals.R_sqrt.sqrt y))%R). intros x y (hx & hy); now apply sqrt_mult. Qed. (* Why3 goal *) -Lemma Sqrt_le : forall (x:R) (y:R), ((0%R <= x)%R /\ (x <= y)%R) -> +Lemma Sqrt_le : + forall (x:R) (y:R), ((0%R <= x)%R /\ (x <= y)%R) -> ((Reals.R_sqrt.sqrt x) <= (Reals.R_sqrt.sqrt y))%R. intros x y (h1 & h2); apply sqrt_le_1; auto. apply Rle_trans with x; auto. diff --git a/src/plugins/wp/share/coqwp/real/Trigonometry.v b/src/plugins/wp/share/coqwp/real/Trigonometry.v index 3edae63d6aa..04707511fb3 100644 --- a/src/plugins/wp/share/coqwp/real/Trigonometry.v +++ b/src/plugins/wp/share/coqwp/real/Trigonometry.v @@ -1,12 +1,13 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(**************************************************************************) +(********************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(********************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) @@ -30,8 +31,11 @@ Require Import Reals. (* sin is replaced with (Reals.Rtrigo_def.sin x) by the coq driver *) (* Why3 goal *) -Lemma Pythagorean_identity : forall (x:R), - (((Reals.RIneq.Rsqr (Reals.Rtrigo_def.cos x)) + (Reals.RIneq.Rsqr (Reals.Rtrigo_def.sin x)))%R = 1%R). +Lemma Pythagorean_identity : + forall (x:R), + (((Reals.RIneq.Rsqr (Reals.Rtrigo_def.cos x)) + + (Reals.RIneq.Rsqr (Reals.Rtrigo_def.sin x)))%R + = 1%R). Proof. intros x. rewrite Rplus_comm. @@ -39,8 +43,8 @@ apply sin2_cos2. Qed. (* Why3 goal *) -Lemma Cos_le_one : forall (x:R), - ((Reals.Rbasic_fun.Rabs (Reals.Rtrigo_def.cos x)) <= 1%R)%R. +Lemma Cos_le_one : + forall (x:R), ((Reals.Rbasic_fun.Rabs (Reals.Rtrigo_def.cos x)) <= 1%R)%R. Proof. intros x. apply Abs.Abs_le. @@ -48,8 +52,8 @@ apply COS_bound. Qed. (* Why3 goal *) -Lemma Sin_le_one : forall (x:R), - ((Reals.Rbasic_fun.Rabs (Reals.Rtrigo_def.sin x)) <= 1%R)%R. +Lemma Sin_le_one : + forall (x:R), ((Reals.Rbasic_fun.Rabs (Reals.Rtrigo_def.sin x)) <= 1%R)%R. Proof. intros x. apply Abs.Abs_le. @@ -72,7 +76,8 @@ Qed. (* pi is replaced with Reals.Rtrigo1.PI by the coq driver *) (* Why3 goal *) -Lemma Pi_double_precision_bounds : ((7074237752028440 / 2251799813685248)%R < Reals.Rtrigo1.PI)%R /\ +Lemma Pi_double_precision_bounds : + ((7074237752028440 / 2251799813685248)%R < Reals.Rtrigo1.PI)%R /\ (Reals.Rtrigo1.PI < (7074237752028441 / 2251799813685248)%R)%R. Proof. replace PI with (4 * (PI / 4))%R by field. @@ -97,38 +102,46 @@ apply sin_PI. Qed. (* Why3 goal *) -Lemma Cos_pi2 : ((Reals.Rtrigo_def.cos ((05 / 10)%R * Reals.Rtrigo1.PI)%R) = 0%R). +Lemma Cos_pi2 : + ((Reals.Rtrigo_def.cos ((05 / 10)%R * Reals.Rtrigo1.PI)%R) = 0%R). Proof. replace (5 / 10 * PI)%R with (PI / 2)%R by field. apply cos_PI2. Qed. (* Why3 goal *) -Lemma Sin_pi2 : ((Reals.Rtrigo_def.sin ((05 / 10)%R * Reals.Rtrigo1.PI)%R) = 1%R). +Lemma Sin_pi2 : + ((Reals.Rtrigo_def.sin ((05 / 10)%R * Reals.Rtrigo1.PI)%R) = 1%R). Proof. replace (5 / 10 * PI)%R with (PI / 2)%R by field. apply sin_PI2. Qed. (* Why3 goal *) -Lemma Cos_plus_pi : forall (x:R), - ((Reals.Rtrigo_def.cos (x + Reals.Rtrigo1.PI)%R) = (-(Reals.Rtrigo_def.cos x))%R). +Lemma Cos_plus_pi : + forall (x:R), + ((Reals.Rtrigo_def.cos (x + Reals.Rtrigo1.PI)%R) = + (-(Reals.Rtrigo_def.cos x))%R). Proof. intros x. apply neg_cos. Qed. (* Why3 goal *) -Lemma Sin_plus_pi : forall (x:R), - ((Reals.Rtrigo_def.sin (x + Reals.Rtrigo1.PI)%R) = (-(Reals.Rtrigo_def.sin x))%R). +Lemma Sin_plus_pi : + forall (x:R), + ((Reals.Rtrigo_def.sin (x + Reals.Rtrigo1.PI)%R) = + (-(Reals.Rtrigo_def.sin x))%R). Proof. intros x. apply neg_sin. Qed. (* Why3 goal *) -Lemma Cos_plus_pi2 : forall (x:R), - ((Reals.Rtrigo_def.cos (x + ((05 / 10)%R * Reals.Rtrigo1.PI)%R)%R) = (-(Reals.Rtrigo_def.sin x))%R). +Lemma Cos_plus_pi2 : + forall (x:R), + ((Reals.Rtrigo_def.cos (x + ((05 / 10)%R * Reals.Rtrigo1.PI)%R)%R) = + (-(Reals.Rtrigo_def.sin x))%R). Proof. intros x. rewrite cos_sin. @@ -137,8 +150,10 @@ apply neg_sin. Qed. (* Why3 goal *) -Lemma Sin_plus_pi2 : forall (x:R), - ((Reals.Rtrigo_def.sin (x + ((05 / 10)%R * Reals.Rtrigo1.PI)%R)%R) = (Reals.Rtrigo_def.cos x)). +Lemma Sin_plus_pi2 : + forall (x:R), + ((Reals.Rtrigo_def.sin (x + ((05 / 10)%R * Reals.Rtrigo1.PI)%R)%R) = + (Reals.Rtrigo_def.cos x)). Proof. intros x. rewrite cos_sin. @@ -147,15 +162,16 @@ field. Qed. (* Why3 goal *) -Lemma Cos_neg : forall (x:R), - ((Reals.Rtrigo_def.cos (-x)%R) = (Reals.Rtrigo_def.cos x)). +Lemma Cos_neg : + forall (x:R), ((Reals.Rtrigo_def.cos (-x)%R) = (Reals.Rtrigo_def.cos x)). Proof. intros x. apply cos_neg. Qed. (* Why3 goal *) -Lemma Sin_neg : forall (x:R), +Lemma Sin_neg : + forall (x:R), ((Reals.Rtrigo_def.sin (-x)%R) = (-(Reals.Rtrigo_def.sin x))%R). Proof. intros x. @@ -163,24 +179,32 @@ apply sin_neg. Qed. (* Why3 goal *) -Lemma Cos_sum : forall (x:R) (y:R), - ((Reals.Rtrigo_def.cos (x + y)%R) = (((Reals.Rtrigo_def.cos x) * (Reals.Rtrigo_def.cos y))%R - ((Reals.Rtrigo_def.sin x) * (Reals.Rtrigo_def.sin y))%R)%R). +Lemma Cos_sum : + forall (x:R) (y:R), + ((Reals.Rtrigo_def.cos (x + y)%R) = + (((Reals.Rtrigo_def.cos x) * (Reals.Rtrigo_def.cos y))%R - + ((Reals.Rtrigo_def.sin x) * (Reals.Rtrigo_def.sin y))%R)%R). Proof. intros x y. apply cos_plus. Qed. (* Why3 goal *) -Lemma Sin_sum : forall (x:R) (y:R), - ((Reals.Rtrigo_def.sin (x + y)%R) = (((Reals.Rtrigo_def.sin x) * (Reals.Rtrigo_def.cos y))%R + ((Reals.Rtrigo_def.cos x) * (Reals.Rtrigo_def.sin y))%R)%R). +Lemma Sin_sum : + forall (x:R) (y:R), + ((Reals.Rtrigo_def.sin (x + y)%R) = + (((Reals.Rtrigo_def.sin x) * (Reals.Rtrigo_def.cos y))%R + + ((Reals.Rtrigo_def.cos x) * (Reals.Rtrigo_def.sin y))%R)%R). Proof. intros x y. apply sin_plus. Qed. (* Why3 goal *) -Lemma tan_def : forall (x:R), - ((Reals.Rtrigo1.tan x) = ((Reals.Rtrigo_def.sin x) / (Reals.Rtrigo_def.cos x))%R). +Lemma tan_def : + forall (x:R), + ((Reals.Rtrigo1.tan x) = + ((Reals.Rtrigo_def.sin x) / (Reals.Rtrigo_def.cos x))%R). Proof. intros x. apply eq_refl. @@ -190,8 +214,8 @@ Qed. (* atan is replaced with (Reals.Ratan.atan x) by the coq driver *) (* Why3 goal *) -Lemma Tan_atan : forall (x:R), - ((Reals.Rtrigo1.tan (Reals.Ratan.atan x)) = x). +Lemma Tan_atan : + forall (x:R), ((Reals.Rtrigo1.tan (Reals.Ratan.atan x)) = x). Proof. intros x. apply atan_right_inv. -- GitLab From 432da7496280e0c76bac0ebad8311c6d42890501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 19 Apr 2019 17:44:15 +0200 Subject: [PATCH 288/376] [wp/share] fix why3 syntax --- src/plugins/wp/share/why3/Cbits.why | 210 +++++++++++++-------------- src/plugins/wp/share/why3/Cfloat.why | 6 +- src/plugins/wp/share/why3/Cint.why | 4 +- src/plugins/wp/share/why3/Cmath.why | 2 +- src/plugins/wp/share/why3/ExpLog.why | 2 +- src/plugins/wp/share/why3/Memory.why | 32 ++-- src/plugins/wp/share/why3/Qed.why | 12 +- src/plugins/wp/share/why3/Square.why | 8 +- src/plugins/wp/share/why3/Vlist.why | 8 +- 9 files changed, 141 insertions(+), 143 deletions(-) diff --git a/src/plugins/wp/share/why3/Cbits.why b/src/plugins/wp/share/why3/Cbits.why index d5867717def..28641d4d405 100644 --- a/src/plugins/wp/share/why3/Cbits.why +++ b/src/plugins/wp/share/why3/Cbits.why @@ -30,374 +30,374 @@ use real.Real as Real use real.FromInt as FromInt use Cint.Cint as Cint -axiom lnot_bool : ((Cint.lnot 0) = ((Int.(-_) (1)))) /\ ((Cint.lnot +lemma lnot_bool : ((Cint.lnot 0) = ((Int.(-_) (1)))) /\ ((Cint.lnot (Int.(-_) (1))) = (0)) -axiom land_idemp : forall x:int [Cint.land x x]. ((Cint.land x x) = (x)) +lemma land_idemp : forall x:int [Cint.land x x]. ((Cint.land x x) = (x)) -axiom land_0 : forall x:int [Cint.land 0 x]. ((Cint.land 0 x) = (0)) +lemma land_0 : forall x:int [Cint.land 0 x]. ((Cint.land 0 x) = (0)) -axiom land_0bis : forall x:int [Cint.land x 0]. ((Cint.land x 0) = (0)) +lemma land_0bis : forall x:int [Cint.land x 0]. ((Cint.land x 0) = (0)) -axiom land_1 : forall x:int [Cint.land (Int.(-_) (1)) x]. ((Cint.land +lemma land_1 : forall x:int [Cint.land (Int.(-_) (1)) x]. ((Cint.land (Int.(-_) (1)) x) = (x)) -axiom land_1bis : forall x:int [Cint.land x (Int.(-_) (1))]. ((Cint.land x +lemma land_1bis : forall x:int [Cint.land x (Int.(-_) (1))]. ((Cint.land x (Int.(-_) (1))) = (x)) -axiom lor_idemp : forall x:int [Cint.lor x x]. ((Cint.lor x x) = (x)) +lemma lor_idemp : forall x:int [Cint.lor x x]. ((Cint.lor x x) = (x)) -axiom lor_1 : forall x:int [Cint.lor (Int.(-_) (1)) x]. ((Cint.lor +lemma lor_1 : forall x:int [Cint.lor (Int.(-_) (1)) x]. ((Cint.lor (Int.(-_) (1)) x) = ((Int.(-_) (1)))) -axiom lor_1bis : forall x:int [Cint.lor x (Int.(-_) (1))]. ((Cint.lor x +lemma lor_1bis : forall x:int [Cint.lor x (Int.(-_) (1))]. ((Cint.lor x (Int.(-_) (1))) = ((Int.(-_) (1)))) -axiom lor_0 : forall x:int [Cint.lor 0 x]. ((Cint.lor 0 x) = (x)) +lemma lor_0 : forall x:int [Cint.lor 0 x]. ((Cint.lor 0 x) = (x)) -axiom lor_0bis : forall x:int [Cint.lor x 0]. ((Cint.lor x 0) = (x)) +lemma lor_0bis : forall x:int [Cint.lor x 0]. ((Cint.lor x 0) = (x)) -axiom lxor_nilpotent : forall x:int [Cint.lxor x x]. ((Cint.lxor x x) = (0)) +lemma lxor_nilpotent : forall x:int [Cint.lxor x x]. ((Cint.lxor x x) = (0)) -axiom lxor_1 : forall x:int [Cint.lxor (Int.(-_) (1)) x]. ((Cint.lxor +lemma lxor_1 : forall x:int [Cint.lxor (Int.(-_) (1)) x]. ((Cint.lxor (Int.(-_) (1)) x) = (Cint.lnot x)) -axiom lxor_1bis : forall x:int [Cint.lxor x (Int.(-_) (1))]. ((Cint.lxor x +lemma lxor_1bis : forall x:int [Cint.lxor x (Int.(-_) (1))]. ((Cint.lxor x (Int.(-_) (1))) = (Cint.lnot x)) -axiom lxor_0 : forall x:int [Cint.lxor 0 x]. ((Cint.lxor 0 x) = (x)) +lemma lxor_0 : forall x:int [Cint.lxor 0 x]. ((Cint.lxor 0 x) = (x)) -axiom lxor_0bis : forall x:int [Cint.lxor x 0]. ((Cint.lxor x 0) = (x)) +lemma lxor_0bis : forall x:int [Cint.lxor x 0]. ((Cint.lxor x 0) = (x)) -axiom bit_test_def : forall x:int, k:int [Cint.bit_testb x k]. +lemma bit_test_def : forall x:int, k:int [Cint.bit_testb x k]. ((Cint.bit_testb x k) = (Bool.True)) <-> Cint.bit_test x k -axiom bit_test_extraction : forall x:int, k:int [Cint.land x (Cint.lsl 1 k)| +lemma bit_test_extraction : forall x:int, k:int [Cint.land x (Cint.lsl 1 k)| Cint.land (Cint.lsl 1 k) x]. (Int.(<=) (0) (k)) -> not ((Cint.land x (Cint.lsl 1 k)) = (0)) <-> Cint.bit_test x k -axiom lsl_1_0 : ((Cint.lsl 1 0) = (1)) +lemma lsl_1_0 : ((Cint.lsl 1 0) = (1)) -axiom bit_test_extraction_bis : forall x:int [Cint.land x 1| Cint.land 1 x]. +lemma bit_test_extraction_bis : forall x:int [Cint.land x 1| Cint.land 1 x]. not ((Cint.land 1 x) = (0)) -> Cint.bit_test x 0 -axiom bit_test_extraction_bis_eq : forall x:int [Cint.land x 1| Cint.land 1 +lemma bit_test_extraction_bis_eq : forall x:int [Cint.land x 1| Cint.land 1 x]. Cint.bit_test x 0 -> ((Cint.land 1 x) = (1)) -axiom lnot_extraction : forall x:int, i:int [Cint.bit_test (Cint.lnot x) i]. +lemma lnot_extraction : forall x:int, i:int [Cint.bit_test (Cint.lnot x) i]. (Int.(<=) (0) (i)) -> Cint.bit_test (Cint.lnot x) i <-> not Cint.bit_test x i -axiom land_extraction : forall x:int, y:int, i:int [Cint.bit_test (Cint.land +lemma land_extraction : forall x:int, y:int, i:int [Cint.bit_test (Cint.land x y) i]. (Int.(<=) (0) (i)) -> Cint.bit_test (Cint.land x y) i <-> Cint.bit_test x i /\ Cint.bit_test y i -axiom lor_extraction : forall x:int, y:int, i:int [Cint.bit_test (Cint.lor x +lemma lor_extraction : forall x:int, y:int, i:int [Cint.bit_test (Cint.lor x y) i]. (Int.(<=) (0) (i)) -> Cint.bit_test (Cint.lor x y) i <-> Cint.bit_test x i \/ Cint.bit_test y i -axiom lxor_extraction : forall x:int, y:int, i:int [Cint.bit_test (Cint.lxor +lemma lxor_extraction : forall x:int, y:int, i:int [Cint.bit_test (Cint.lxor x y) i]. (Int.(<=) (0) (i)) -> Cint.bit_test (Cint.lxor x y) i <-> Cint.bit_test x i <-> not Cint.bit_test y i -axiom land_1_lsl_1 : forall a:int, x:int, n:int [Cint.lsl 1 +lemma land_1_lsl_1 : forall a:int, x:int, n:int [Cint.lsl 1 (Int.(+) (1) (n)), Cint.lsl 1 n, (Int.(+) ((Int.(*) (2) (a))) (Cint.land 1 x))]. (Int.(<=) (0) (n)) -> (Int.(<) (a) (Cint.lsl 1 n)) -> (Int.(<) ((Int.(+) ((Int.(*) (2) (a))) (Cint.land 1 x))) (Cint.lsl 1 (Int.(+) (1) (n)))) -axiom lsl_extraction_sup : forall x:int, n:int, m:int [Cint.bit_test +lemma lsl_extraction_sup : forall x:int, n:int, m:int [Cint.bit_test (Cint.lsl x n) m]. (Int.(<=) (0) (n)) -> (Int.(<=) (0) (m)) -> (Int.(>=) (m) (n)) -> Cint.bit_test (Cint.lsl x n) m <-> Cint.bit_test x (Int.(-) (m) (n)) -axiom lsl_extraction_inf : forall x:int, n:int, m:int [Cint.bit_test +lemma lsl_extraction_inf : forall x:int, n:int, m:int [Cint.bit_test (Cint.lsl x n) m]. (Int.(<=) (0) (n)) -> (Int.(<=) (0) (m)) -> (Int.(<) (m) (n)) -> not Cint.bit_test (Cint.lsl x n) m -axiom lsr_extractionl : forall x:int, n:int, m:int [Cint.bit_test (Cint.lsr x +lemma lsr_extractionl : forall x:int, n:int, m:int [Cint.bit_test (Cint.lsr x n) m]. (Int.(<=) (0) (n)) -> (Int.(<=) (0) (m)) -> Cint.bit_test (Cint.lsr x n) m <-> Cint.bit_test x (Int.(+) (m) (n)) -axiom lsl1_extraction : forall i:int, j:int [Cint.bit_test (Cint.lsl 1 i) j]. +lemma lsl1_extraction : forall i:int, j:int [Cint.bit_test (Cint.lsl 1 i) j]. (Int.(<=) (0) (i)) -> (Int.(<=) (0) (j)) -> Cint.bit_test (Cint.lsl 1 i) j <-> ((i) = (j)) -axiom to_uint8_extraction_sup : forall x:int, i:int [Cint.is_uint8 x, +lemma to_uint8_extraction_sup : forall x:int, i:int [Cint.is_uint8 x, Cint.bit_test x i]. (Int.(<=) (8) (i)) -> Cint.is_uint8 x -> not Cint.bit_test x i -axiom to_uint8_extraction_inf : forall x:int, i:int [Cint.bit_test +lemma to_uint8_extraction_inf : forall x:int, i:int [Cint.bit_test (Cint.to_uint8 x) i]. (Int.(<=) (0) (i)) /\ (Int.(<) (i) (8)) -> Cint.bit_test (Cint.to_uint8 x) i <-> Cint.bit_test x i -axiom to_uint16_extraction_sup : forall x:int, i:int [Cint.is_uint16 x, +lemma to_uint16_extraction_sup : forall x:int, i:int [Cint.is_uint16 x, Cint.bit_test x i]. (Int.(<=) (16) (i)) -> Cint.is_uint16 x -> not Cint.bit_test x i -axiom to_uint16_extraction_inf : forall x:int, i:int [Cint.bit_test +lemma to_uint16_extraction_inf : forall x:int, i:int [Cint.bit_test (Cint.to_uint16 x) i]. (Int.(<=) (0) (i)) /\ (Int.(<) (i) (16)) -> Cint.bit_test (Cint.to_uint16 x) i <-> Cint.bit_test x i -axiom to_uint32_extraction_sup : forall x:int, i:int [Cint.is_uint32 x, +lemma to_uint32_extraction_sup : forall x:int, i:int [Cint.is_uint32 x, Cint.bit_test x i]. (Int.(<=) (32) (i)) -> Cint.is_uint32 x -> not Cint.bit_test x i -axiom to_uint32_extraction_inf : forall x:int, i:int [Cint.bit_test +lemma to_uint32_extraction_inf : forall x:int, i:int [Cint.bit_test (Cint.to_uint32 x) i]. (Int.(<=) (0) (i)) /\ (Int.(<) (i) (32)) -> Cint.bit_test (Cint.to_uint32 x) i <-> Cint.bit_test x i -axiom to_uint64_extraction_sup : forall x:int, i:int [Cint.is_uint64 x, +lemma to_uint64_extraction_sup : forall x:int, i:int [Cint.is_uint64 x, Cint.bit_test x i]. (Int.(<=) (64) (i)) -> Cint.is_uint64 x -> not Cint.bit_test x i -axiom to_uint64_extraction_inf : forall x:int, i:int [Cint.bit_test +lemma to_uint64_extraction_inf : forall x:int, i:int [Cint.bit_test (Cint.to_uint64 x) i]. (Int.(<=) (0) (i)) /\ (Int.(<) (i) (64)) -> Cint.bit_test (Cint.to_uint64 x) i <-> Cint.bit_test x i -axiom to_sint8_extraction_sup : forall x:int, i:int [Cint.is_sint8 x, +lemma to_sint8_extraction_sup : forall x:int, i:int [Cint.is_sint8 x, Cint.bit_test x i]. (Int.(<=) (7) (i)) -> Cint.is_sint8 x -> Cint.bit_test x i <-> (Int.(<) (x) (0)) -axiom to_sint8_extraction_inf : forall x:int, i:int [Cint.bit_test +lemma to_sint8_extraction_inf : forall x:int, i:int [Cint.bit_test (Cint.to_sint8 x) i]. (Int.(<=) (0) (i)) /\ (Int.(<) (i) (7)) -> Cint.bit_test (Cint.to_sint8 x) i <-> Cint.bit_test x i -axiom to_sint16_extraction_sup : forall x:int, i:int [Cint.is_sint16 x, +lemma to_sint16_extraction_sup : forall x:int, i:int [Cint.is_sint16 x, Cint.bit_test x i]. (Int.(<=) (15) (i)) -> Cint.is_sint16 x -> Cint.bit_test x i <-> (Int.(<) (x) (0)) -axiom to_sint16_extraction_inf : forall x:int, i:int [Cint.bit_test +lemma to_sint16_extraction_inf : forall x:int, i:int [Cint.bit_test (Cint.to_sint16 x) i]. (Int.(<=) (0) (i)) /\ (Int.(<) (i) (15)) -> Cint.bit_test (Cint.to_sint16 x) i <-> Cint.bit_test x i -axiom to_sint32_extraction_sup : forall x:int, i:int [Cint.is_sint32 x, +lemma to_sint32_extraction_sup : forall x:int, i:int [Cint.is_sint32 x, Cint.bit_test x i]. (Int.(<=) (31) (i)) -> Cint.is_sint32 x -> Cint.bit_test x i <-> (Int.(<) (x) (0)) -axiom to_sint32_extraction_inf : forall x:int, i:int [Cint.bit_test +lemma to_sint32_extraction_inf : forall x:int, i:int [Cint.bit_test (Cint.to_sint32 x) i]. (Int.(<=) (0) (i)) /\ (Int.(<) (i) (31)) -> Cint.bit_test (Cint.to_sint32 x) i <-> Cint.bit_test x i -axiom to_sint64_extraction_sup : forall x:int, i:int [Cint.is_sint64 x, +lemma to_sint64_extraction_sup : forall x:int, i:int [Cint.is_sint64 x, Cint.bit_test x i]. (Int.(<=) (63) (i)) -> Cint.is_sint64 x -> Cint.bit_test x i <-> (Int.(<) (x) (0)) -axiom to_sint64_extraction_inf : forall x:int, i:int [Cint.bit_test +lemma to_sint64_extraction_inf : forall x:int, i:int [Cint.bit_test (Cint.to_sint64 x) i]. (Int.(<=) (0) (i)) /\ (Int.(<) (i) (63)) -> Cint.bit_test (Cint.to_sint64 x) i <-> Cint.bit_test x i -axiom is_uint_lxor : forall n:int, x:int, y:int. Cint.is_uint n x -> +lemma is_uint_lxor : forall n:int, x:int, y:int. Cint.is_uint n x -> Cint.is_uint n y -> ((Cint.to_uint n (Cint.lxor x y)) = (Cint.lxor x y)) -axiom is_uint8_lxor : forall x:int, y:int [Cint.to_uint8 (Cint.lxor x y)]. +lemma is_uint8_lxor : forall x:int, y:int [Cint.to_uint8 (Cint.lxor x y)]. Cint.is_uint8 x -> Cint.is_uint8 y -> ((Cint.to_uint8 (Cint.lxor x y)) = (Cint.lxor x y)) -axiom is_uint8_lor : forall x:int, y:int [Cint.to_uint8 (Cint.lor x y)]. +lemma is_uint8_lor : forall x:int, y:int [Cint.to_uint8 (Cint.lor x y)]. Cint.is_uint8 x -> Cint.is_uint8 y -> ((Cint.to_uint8 (Cint.lor x y)) = (Cint.lor x y)) -axiom is_uint8_land : forall x:int, y:int [Cint.to_uint8 (Cint.land x y)]. +lemma is_uint8_land : forall x:int, y:int [Cint.to_uint8 (Cint.land x y)]. Cint.is_uint8 x -> Cint.is_uint8 y -> ((Cint.to_uint8 (Cint.land x y)) = (Cint.land x y)) -axiom is_uint8_lsr : forall x:int, y:int [Cint.to_uint8 (Cint.lsr x y)]. +lemma is_uint8_lsr : forall x:int, y:int [Cint.to_uint8 (Cint.lsr x y)]. (Int.(<=) (0) (y)) -> Cint.is_uint8 x -> ((Cint.to_uint8 (Cint.lsr x y)) = (Cint.lsr x y)) -axiom is_uint8_lsl1_inf : forall y:int [Cint.to_uint8 (Cint.lsl 1 y)]. +lemma is_uint8_lsl1_inf : forall y:int [Cint.to_uint8 (Cint.lsl 1 y)]. (Int.(<=) (0) (y)) /\ (Int.(<) (y) (8)) -> ((Cint.to_uint8 (Cint.lsl 1 y)) = (Cint.lsl 1 y)) -axiom is_uint8_lsl1_sup : forall y:int [Cint.to_uint8 (Cint.lsl 1 y)]. +lemma is_uint8_lsl1_sup : forall y:int [Cint.to_uint8 (Cint.lsl 1 y)]. (Int.(<=) (8) (y)) -> ((Cint.to_uint8 (Cint.lsl 1 y)) = (0)) -axiom is_uint16_lxor : forall x:int, y:int [Cint.to_uint16 (Cint.lxor x y)]. +lemma is_uint16_lxor : forall x:int, y:int [Cint.to_uint16 (Cint.lxor x y)]. Cint.is_uint16 x -> Cint.is_uint16 y -> ((Cint.to_uint16 (Cint.lxor x y)) = (Cint.lxor x y)) -axiom is_uint16_lor : forall x:int, y:int [Cint.to_uint16 (Cint.lor x y)]. +lemma is_uint16_lor : forall x:int, y:int [Cint.to_uint16 (Cint.lor x y)]. Cint.is_uint16 x -> Cint.is_uint16 y -> ((Cint.to_uint16 (Cint.lor x y)) = (Cint.lor x y)) -axiom is_uint16_land : forall x:int, y:int [Cint.to_uint16 (Cint.land x y)]. +lemma is_uint16_land : forall x:int, y:int [Cint.to_uint16 (Cint.land x y)]. Cint.is_uint16 x -> Cint.is_uint16 y -> ((Cint.to_uint16 (Cint.land x y)) = (Cint.land x y)) -axiom is_uint16_lsr : forall x:int, y:int [Cint.to_uint16 (Cint.lsr x y)]. +lemma is_uint16_lsr : forall x:int, y:int [Cint.to_uint16 (Cint.lsr x y)]. (Int.(<=) (0) (y)) -> Cint.is_uint16 x -> ((Cint.to_uint16 (Cint.lsr x y)) = (Cint.lsr x y)) -axiom is_uint16_lsl1_inf : forall y:int [Cint.to_uint16 (Cint.lsl 1 y)]. +lemma is_uint16_lsl1_inf : forall y:int [Cint.to_uint16 (Cint.lsl 1 y)]. (Int.(<=) (0) (y)) /\ (Int.(<) (y) (16)) -> ((Cint.to_uint16 (Cint.lsl 1 y)) = (Cint.lsl 1 y)) -axiom is_uint16_lsl1_sup : forall y:int [Cint.to_uint16 (Cint.lsl 1 y)]. +lemma is_uint16_lsl1_sup : forall y:int [Cint.to_uint16 (Cint.lsl 1 y)]. (Int.(<=) (16) (y)) -> ((Cint.to_uint16 (Cint.lsl 1 y)) = (0)) -axiom is_uint32_lxor : forall x:int, y:int [Cint.to_uint32 (Cint.lxor x y)]. +lemma is_uint32_lxor : forall x:int, y:int [Cint.to_uint32 (Cint.lxor x y)]. Cint.is_uint32 x -> Cint.is_uint32 y -> ((Cint.to_uint32 (Cint.lxor x y)) = (Cint.lxor x y)) -axiom is_uint32_lor : forall x:int, y:int [Cint.to_uint32 (Cint.lor x y)]. +lemma is_uint32_lor : forall x:int, y:int [Cint.to_uint32 (Cint.lor x y)]. Cint.is_uint32 x -> Cint.is_uint32 y -> ((Cint.to_uint32 (Cint.lor x y)) = (Cint.lor x y)) -axiom is_uint32_land : forall x:int, y:int [Cint.to_uint32 (Cint.land x y)]. +lemma is_uint32_land : forall x:int, y:int [Cint.to_uint32 (Cint.land x y)]. Cint.is_uint32 x -> Cint.is_uint32 y -> ((Cint.to_uint32 (Cint.land x y)) = (Cint.land x y)) -axiom is_uint32_lsr : forall x:int, y:int [Cint.to_uint32 (Cint.lsr x y)]. +lemma is_uint32_lsr : forall x:int, y:int [Cint.to_uint32 (Cint.lsr x y)]. (Int.(<=) (0) (y)) -> Cint.is_uint32 x -> ((Cint.to_uint32 (Cint.lsr x y)) = (Cint.lsr x y)) -axiom is_uint32_lsl1_inf : forall y:int [Cint.to_uint32 (Cint.lsl 1 y)]. +lemma is_uint32_lsl1_inf : forall y:int [Cint.to_uint32 (Cint.lsl 1 y)]. (Int.(<=) (0) (y)) /\ (Int.(<) (y) (32)) -> ((Cint.to_uint32 (Cint.lsl 1 y)) = (Cint.lsl 1 y)) -axiom is_uint32_lsl1_sup : forall y:int [Cint.to_uint32 (Cint.lsl 1 y)]. +lemma is_uint32_lsl1_sup : forall y:int [Cint.to_uint32 (Cint.lsl 1 y)]. (Int.(<=) (32) (y)) -> ((Cint.to_uint32 (Cint.lsl 1 y)) = (0)) -axiom is_uint64_lxor : forall x:int, y:int [Cint.to_uint64 (Cint.lxor x y)]. +lemma is_uint64_lxor : forall x:int, y:int [Cint.to_uint64 (Cint.lxor x y)]. Cint.is_uint64 x -> Cint.is_uint64 y -> ((Cint.to_uint64 (Cint.lxor x y)) = (Cint.lxor x y)) -axiom is_uint64_lor : forall x:int, y:int [Cint.to_uint64 (Cint.lor x y)]. +lemma is_uint64_lor : forall x:int, y:int [Cint.to_uint64 (Cint.lor x y)]. Cint.is_uint64 x -> Cint.is_uint64 y -> ((Cint.to_uint64 (Cint.lor x y)) = (Cint.lor x y)) -axiom is_uint64_land : forall x:int, y:int [Cint.to_uint64 (Cint.land x y)]. +lemma is_uint64_land : forall x:int, y:int [Cint.to_uint64 (Cint.land x y)]. Cint.is_uint64 x -> Cint.is_uint64 y -> ((Cint.to_uint64 (Cint.land x y)) = (Cint.land x y)) -axiom is_uint64_lsr : forall x:int, y:int [Cint.to_uint64 (Cint.lsr x y)]. +lemma is_uint64_lsr : forall x:int, y:int [Cint.to_uint64 (Cint.lsr x y)]. (Int.(<=) (0) (y)) -> Cint.is_uint64 x -> ((Cint.to_uint64 (Cint.lsr x y)) = (Cint.lsr x y)) -axiom is_uint64_lsl1_inf : forall y:int [Cint.to_uint64 (Cint.lsl 1 y)]. +lemma is_uint64_lsl1_inf : forall y:int [Cint.to_uint64 (Cint.lsl 1 y)]. (Int.(<=) (0) (y)) /\ (Int.(<) (y) (64)) -> ((Cint.to_uint64 (Cint.lsl 1 y)) = (Cint.lsl 1 y)) -axiom is_uint64_lsl1_sup : forall y:int [Cint.to_uint64 (Cint.lsl 1 y)]. +lemma is_uint64_lsl1_sup : forall y:int [Cint.to_uint64 (Cint.lsl 1 y)]. (Int.(<=) (64) (y)) -> ((Cint.to_uint64 (Cint.lsl 1 y)) = (0)) -axiom is_sint8_lnot : forall x:int [Cint.to_sint8 (Cint.lnot x)]. +lemma is_sint8_lnot : forall x:int [Cint.to_sint8 (Cint.lnot x)]. Cint.is_sint8 x -> ((Cint.to_sint8 (Cint.lnot x)) = (Cint.lnot x)) -axiom is_sint8_lxor : forall x:int, y:int [Cint.to_sint8 (Cint.lxor x y)]. +lemma is_sint8_lxor : forall x:int, y:int [Cint.to_sint8 (Cint.lxor x y)]. Cint.is_sint8 x -> Cint.is_sint8 y -> ((Cint.to_sint8 (Cint.lxor x y)) = (Cint.lxor x y)) -axiom is_sint8_lor : forall x:int, y:int [Cint.to_sint8 (Cint.lor x y)]. +lemma is_sint8_lor : forall x:int, y:int [Cint.to_sint8 (Cint.lor x y)]. Cint.is_sint8 x -> Cint.is_sint8 y -> ((Cint.to_sint8 (Cint.lor x y)) = (Cint.lor x y)) -axiom is_sint8_land : forall x:int, y:int [Cint.to_sint8 (Cint.land x y)]. +lemma is_sint8_land : forall x:int, y:int [Cint.to_sint8 (Cint.land x y)]. Cint.is_sint8 x -> Cint.is_sint8 y -> ((Cint.to_sint8 (Cint.land x y)) = (Cint.land x y)) -axiom is_sint8_lsr : forall x:int, y:int [Cint.to_sint8 (Cint.lsr x y)]. +lemma is_sint8_lsr : forall x:int, y:int [Cint.to_sint8 (Cint.lsr x y)]. (Int.(<=) (0) (y)) -> Cint.is_sint8 x -> ((Cint.to_sint8 (Cint.lsr x y)) = (Cint.lsr x y)) -axiom is_sint8_lsl1 : ((Cint.lsl 1 7) = (Cint.max_sint8)) +lemma is_sint8_lsl1 : ((Cint.lsl 1 7) = (Cint.max_sint8)) -axiom is_sint8_lsl1_inf : forall y:int [Cint.to_sint8 (Cint.lsl 1 y)]. +lemma is_sint8_lsl1_inf : forall y:int [Cint.to_sint8 (Cint.lsl 1 y)]. (Int.(<=) (0) (y)) /\ (Int.(<) (y) (7)) -> ((Cint.to_sint8 (Cint.lsl 1 y)) = (Cint.lsl 1 y)) -axiom is_sint8_lsl1_sup : forall y:int [Cint.to_sint8 (Cint.lsl 1 y)]. +lemma is_sint8_lsl1_sup : forall y:int [Cint.to_sint8 (Cint.lsl 1 y)]. (Int.(<=) (8) (y)) -> ((Cint.to_sint8 (Cint.lsl 1 y)) = (0)) -axiom is_sint16_lnot : forall x:int [Cint.to_sint16 (Cint.lnot x)]. +lemma is_sint16_lnot : forall x:int [Cint.to_sint16 (Cint.lnot x)]. Cint.is_sint16 x -> ((Cint.to_sint16 (Cint.lnot x)) = (Cint.lnot x)) -axiom is_sint16_lxor : forall x:int, y:int [Cint.to_sint16 (Cint.lxor x y)]. +lemma is_sint16_lxor : forall x:int, y:int [Cint.to_sint16 (Cint.lxor x y)]. Cint.is_sint16 x -> Cint.is_sint16 y -> ((Cint.to_sint16 (Cint.lxor x y)) = (Cint.lxor x y)) -axiom is_sint16_lor : forall x:int, y:int [Cint.to_sint16 (Cint.lor x y)]. +lemma is_sint16_lor : forall x:int, y:int [Cint.to_sint16 (Cint.lor x y)]. Cint.is_sint16 x -> Cint.is_sint16 y -> ((Cint.to_sint16 (Cint.lor x y)) = (Cint.lor x y)) -axiom is_sint16_land : forall x:int, y:int [Cint.to_sint16 (Cint.land x y)]. +lemma is_sint16_land : forall x:int, y:int [Cint.to_sint16 (Cint.land x y)]. Cint.is_sint16 x -> Cint.is_sint16 y -> ((Cint.to_sint16 (Cint.land x y)) = (Cint.land x y)) -axiom is_sint16_lsr : forall x:int, y:int [Cint.to_sint16 (Cint.lsr x y)]. +lemma is_sint16_lsr : forall x:int, y:int [Cint.to_sint16 (Cint.lsr x y)]. (Int.(<=) (0) (y)) -> Cint.is_sint16 x -> ((Cint.to_sint16 (Cint.lsr x y)) = (Cint.lsr x y)) -axiom is_sint16_lsl1 : ((Cint.lsl 1 15) = (Cint.max_sint16)) +lemma is_sint16_lsl1 : ((Cint.lsl 1 15) = (Cint.max_sint16)) -axiom is_sint16_lsl1_inf : forall y:int [Cint.to_sint16 (Cint.lsl 1 y)]. +lemma is_sint16_lsl1_inf : forall y:int [Cint.to_sint16 (Cint.lsl 1 y)]. (Int.(<=) (0) (y)) /\ (Int.(<) (y) (15)) -> ((Cint.to_sint16 (Cint.lsl 1 y)) = (Cint.lsl 1 y)) -axiom is_sint16_lsl1_sup : forall y:int [Cint.to_sint16 (Cint.lsl 1 y)]. +lemma is_sint16_lsl1_sup : forall y:int [Cint.to_sint16 (Cint.lsl 1 y)]. (Int.(<=) (16) (y)) -> ((Cint.to_sint16 (Cint.lsl 1 y)) = (0)) -axiom is_sint32_lnot : forall x:int [Cint.to_sint32 (Cint.lnot x)]. +lemma is_sint32_lnot : forall x:int [Cint.to_sint32 (Cint.lnot x)]. Cint.is_sint32 x -> ((Cint.to_sint32 (Cint.lnot x)) = (Cint.lnot x)) -axiom is_sint32_lxor : forall x:int, y:int [Cint.to_sint32 (Cint.lxor x y)]. +lemma is_sint32_lxor : forall x:int, y:int [Cint.to_sint32 (Cint.lxor x y)]. Cint.is_sint32 x -> Cint.is_sint32 y -> ((Cint.to_sint32 (Cint.lxor x y)) = (Cint.lxor x y)) -axiom is_sint32_lor : forall x:int, y:int [Cint.to_sint32 (Cint.lor x y)]. +lemma is_sint32_lor : forall x:int, y:int [Cint.to_sint32 (Cint.lor x y)]. Cint.is_sint32 x -> Cint.is_sint32 y -> ((Cint.to_sint32 (Cint.lor x y)) = (Cint.lor x y)) -axiom is_sint32_land : forall x:int, y:int [Cint.to_sint32 (Cint.land x y)]. +lemma is_sint32_land : forall x:int, y:int [Cint.to_sint32 (Cint.land x y)]. Cint.is_sint32 x -> Cint.is_sint32 y -> ((Cint.to_sint32 (Cint.land x y)) = (Cint.land x y)) -axiom is_sint32_lsr : forall x:int, y:int [Cint.to_sint32 (Cint.lsr x y)]. +lemma is_sint32_lsr : forall x:int, y:int [Cint.to_sint32 (Cint.lsr x y)]. (Int.(<=) (0) (y)) -> Cint.is_sint32 x -> ((Cint.to_sint32 (Cint.lsr x y)) = (Cint.lsr x y)) -axiom is_sint32_lsl1 : ((Cint.lsl 1 31) = (Cint.max_sint32)) +lemma is_sint32_lsl1 : ((Cint.lsl 1 31) = (Cint.max_sint32)) -axiom is_sint32_lsl1_inf : forall y:int [Cint.to_sint32 (Cint.lsl 1 y)]. +lemma is_sint32_lsl1_inf : forall y:int [Cint.to_sint32 (Cint.lsl 1 y)]. (Int.(<=) (0) (y)) /\ (Int.(<) (y) (31)) -> ((Cint.to_sint32 (Cint.lsl 1 y)) = (Cint.lsl 1 y)) -axiom is_sint32_lsl1_sup : forall y:int [Cint.to_sint32 (Cint.lsl 1 y)]. +lemma is_sint32_lsl1_sup : forall y:int [Cint.to_sint32 (Cint.lsl 1 y)]. (Int.(<=) (32) (y)) -> ((Cint.to_sint32 (Cint.lsl 1 y)) = (0)) -axiom is_sint64_lnot : forall x:int [Cint.to_sint64 (Cint.lnot x)]. +lemma is_sint64_lnot : forall x:int [Cint.to_sint64 (Cint.lnot x)]. Cint.is_sint64 x -> ((Cint.to_sint64 (Cint.lnot x)) = (Cint.lnot x)) -axiom is_sint64_lxor : forall x:int, y:int [Cint.to_sint64 (Cint.lxor x y)]. +lemma is_sint64_lxor : forall x:int, y:int [Cint.to_sint64 (Cint.lxor x y)]. Cint.is_sint64 x -> Cint.is_sint64 y -> ((Cint.to_sint64 (Cint.lxor x y)) = (Cint.lxor x y)) -axiom is_sint64_lor : forall x:int, y:int [Cint.to_sint64 (Cint.lor x y)]. +lemma is_sint64_lor : forall x:int, y:int [Cint.to_sint64 (Cint.lor x y)]. Cint.is_sint64 x -> Cint.is_sint64 y -> ((Cint.to_sint64 (Cint.lor x y)) = (Cint.lor x y)) -axiom is_sint64_land : forall x:int, y:int [Cint.to_sint64 (Cint.land x y)]. +lemma is_sint64_land : forall x:int, y:int [Cint.to_sint64 (Cint.land x y)]. Cint.is_sint64 x -> Cint.is_sint64 y -> ((Cint.to_sint64 (Cint.land x y)) = (Cint.land x y)) -axiom is_sint64_lsr : forall x:int, y:int [Cint.to_sint64 (Cint.lsr x y)]. +lemma is_sint64_lsr : forall x:int, y:int [Cint.to_sint64 (Cint.lsr x y)]. (Int.(<=) (0) (y)) -> Cint.is_sint64 x -> ((Cint.to_sint64 (Cint.lsr x y)) = (Cint.lsr x y)) -axiom is_sint64_lsl1 : ((Cint.lsl 1 63) = (Cint.max_sint64)) +lemma is_sint64_lsl1 : ((Cint.lsl 1 63) = (Cint.max_sint64)) -axiom is_sint64_lsl1_inf : forall y:int [Cint.to_sint64 (Cint.lsl 1 y)]. +lemma is_sint64_lsl1_inf : forall y:int [Cint.to_sint64 (Cint.lsl 1 y)]. (Int.(<=) (0) (y)) /\ (Int.(<) (y) (63)) -> ((Cint.to_sint64 (Cint.lsl 1 y)) = (Cint.lsl 1 y)) -axiom is_sint64_lsl1_sup : forall y:int [Cint.to_sint64 (Cint.lsl 1 y)]. +lemma is_sint64_lsl1_sup : forall y:int [Cint.to_sint64 (Cint.lsl 1 y)]. (Int.(<=) (64) (y)) -> ((Cint.to_sint64 (Cint.lsl 1 y)) = (0)) -axiom lor_addition : forall x:int, y:int [Cint.land x y, Cint.lor x y]. +lemma lor_addition : forall x:int, y:int [Cint.land x y, Cint.lor x y]. ((Cint.land x y) = (0)) -> (((Int.(+) (x) (y))) = (Cint.lor x y)) -axiom lxor_addition : forall x:int, y:int [Cint.land x y, Cint.lxor x y]. +lemma lxor_addition : forall x:int, y:int [Cint.land x y, Cint.lxor x y]. ((Cint.land x y) = (0)) -> (((Int.(+) (x) (y))) = (Cint.lxor x y)) end diff --git a/src/plugins/wp/share/why3/Cfloat.why b/src/plugins/wp/share/why3/Cfloat.why index f6493d5b581..8d17a607ed5 100644 --- a/src/plugins/wp/share/why3/Cfloat.why +++ b/src/plugins/wp/share/why3/Cfloat.why @@ -83,11 +83,9 @@ predicate is_NaN_f32 (f:f32) = ((classify_f32 f) = (NaN)) predicate is_NaN_f64 (d:f64) = ((classify_f64 d) = (NaN)) -predicate is_infinite_f32 (f:f32) = ("asym_split" ((classify_f32 - f) = (Inf_pos))) || ((classify_f32 f) = (Inf_neg)) +predicate is_infinite_f32 (f:f32) = ((classify_f32 f) = (Inf_pos)) || ((classify_f32 f) = (Inf_neg)) -predicate is_infinite_f64 (d:f64) = ("asym_split" ((classify_f64 - d) = (Inf_pos))) || ((classify_f64 d) = (Inf_neg)) +predicate is_infinite_f64 (d:f64) = ((classify_f64 d) = (Inf_pos)) || ((classify_f64 d) = (Inf_neg)) predicate is_positive_infinite_f32 (f:f32) = ((classify_f32 f) = (Inf_pos)) diff --git a/src/plugins/wp/share/why3/Cint.why b/src/plugins/wp/share/why3/Cint.why index d6e03e7ef02..0522aebf1c3 100644 --- a/src/plugins/wp/share/why3/Cint.why +++ b/src/plugins/wp/share/why3/Cint.why @@ -80,9 +80,9 @@ predicate is_sint64 int axiom is_sint64_def : forall x:int [is_sint64 x]. is_sint64 x <-> (Int.(<=) ((Int.(-_) (max_sint64))) (x)) /\ (Int.(<) (x) (max_sint64)) -axiom is_bool0 : is_bool 0 +lemma is_bool0 : is_bool 0 -axiom is_bool1 : is_bool 1 +lemma is_bool1 : is_bool 1 function to_bool (x:int) : int = if ((x) = (0)) then 0 else 1 diff --git a/src/plugins/wp/share/why3/Cmath.why b/src/plugins/wp/share/why3/Cmath.why index 6f2c1bd8be2..e5f9ccecda5 100644 --- a/src/plugins/wp/share/why3/Cmath.why +++ b/src/plugins/wp/share/why3/Cmath.why @@ -25,7 +25,7 @@ use int.Int as Int use int.Abs as Abs use real.Real as Real -axiom abs_def : forall x:int [Abs.abs x]. +lemma abs_def : forall x:int [Abs.abs x]. if (Int.(>=) (x) (0)) then ((Abs.abs x) = (x)) else ((Abs.abs x) = ((Int.(-_) (x)))) diff --git a/src/plugins/wp/share/why3/ExpLog.why b/src/plugins/wp/share/why3/ExpLog.why index f88c5a35ee2..64ee3af9390 100644 --- a/src/plugins/wp/share/why3/ExpLog.why +++ b/src/plugins/wp/share/why3/ExpLog.why @@ -24,6 +24,6 @@ theory ExpLog use real.Real as Real use real.ExpLog as ExpLog -axiom exp_pos : forall x:real. (Real.(>) (ExpLog.exp x) (0.)) +lemma exp_pos : forall x:real. (Real.(>) (ExpLog.exp x) (0.)) end diff --git a/src/plugins/wp/share/why3/Memory.why b/src/plugins/wp/share/why3/Memory.why index ada62e58980..8496fc9cc19 100644 --- a/src/plugins/wp/share/why3/Memory.why +++ b/src/plugins/wp/share/why3/Memory.why @@ -82,14 +82,14 @@ predicate invalid (m:Map.map int int) (p:addr) (n:int) = (Int.(>) (n) (0)) -> (Int.(<=) ((Map.([]) (m) (base p))) (offset p)) \/ (Int.(<=) ((Int.(+) (offset p) (n))) (0)) -axiom valid_rw_rd : forall m:Map.map int int. forall p:addr. forall n:int. +lemma valid_rw_rd : forall m:Map.map int int. forall p:addr. forall n:int. valid_rw m p n -> valid_rd m p n -axiom valid_string : forall m:Map.map int int. forall p:addr. (Int.(<) (base +lemma valid_string : forall m:Map.map int int. forall p:addr. (Int.(<) (base p) (0)) -> (Int.(<=) (0) (offset p)) /\ (Int.(<) (offset p) ((Map.([]) (m) (base p)))) -> valid_rd m p 1 /\ not valid_rw m p 1 -axiom separated_1 : forall p:addr, q:addr. forall a:int, b:int, i:int, j:int +lemma separated_1 : forall p:addr, q:addr. forall a:int, b:int, i:int, j:int [separated p a q b, Mk_addr (base p) i, Mk_addr (base q) j]. separated p a q b -> (Int.(<=) (offset p) (i)) /\ (Int.(<) (i) ((Int.(+) (offset p) (a)))) -> (Int.(<=) (offset q) (j)) /\ (Int.(<) (j) ((Int.(+) (offset @@ -104,29 +104,29 @@ predicate sconst (Map.map addr int) predicate framed (m:Map.map addr addr) = forall p:addr [(Map.([]) (m) (p))]. (Int.(<=) (region (base (Map.([]) (m) (p)))) (0)) -axiom separated_included : forall p:addr, q:addr. forall a:int, b:int +lemma separated_included : forall p:addr, q:addr. forall a:int, b:int [separated p a q b, included p a q b]. (Int.(>) (a) (0)) -> (Int.(>) (b) (0)) -> separated p a q b -> included p a q b -> false -axiom included_trans : forall p:addr, q:addr, r:addr. forall a:int, b:int, c: +lemma included_trans : forall p:addr, q:addr, r:addr. forall a:int, b:int, c: int [included p a q b, included q b r c]. included p a q b -> included q b r c -> included p a r c -axiom separated_trans : forall p:addr, q:addr, r:addr. forall a:int, b:int, +lemma separated_trans : forall p:addr, q:addr, r:addr. forall a:int, b:int, c:int [included p a q b, separated q b r c]. included p a q b -> separated q b r c -> separated p a r c -axiom separated_sym : forall p:addr, q:addr. forall a:int, b:int [separated p +lemma separated_sym : forall p:addr, q:addr. forall a:int, b:int [separated p a q b]. separated p a q b <-> separated q b p a -axiom eqmem_included : forall m1:Map.map addr 'a, m2:Map.map addr 'a. +lemma eqmem_included : forall m1:Map.map addr 'a, m2:Map.map addr 'a. forall p:addr, q:addr. forall a:int, b:int [eqmem m1 m2 p a, eqmem m1 m2 q b]. included p a q b -> eqmem m1 m2 q b -> eqmem m1 m2 p a -axiom eqmem_sym : forall m1:Map.map addr 'a, m2:Map.map addr 'a. forall p: +lemma eqmem_sym : forall m1:Map.map addr 'a, m2:Map.map addr 'a. forall p: addr. forall a:int. eqmem m1 m2 p a -> eqmem m2 m1 p a -axiom havoc_access : forall m0:Map.map addr 'a, m1:Map.map addr 'a. forall q: +lemma havoc_access : forall m0:Map.map addr 'a, m1:Map.map addr 'a. forall q: addr, p:addr. forall a:int. (((Map.([]) (havoc m0 m1 p a) (q))) = (if separated q 1 p a then (Map.([]) (m1) (q)) else (Map.([]) (m0) (q)))) @@ -139,19 +139,19 @@ function base_offset int : int function base_index int : int -axiom int_of_addr_bijection : forall a:int. ((int_of_addr (addr_of_int +lemma int_of_addr_bijection : forall a:int. ((int_of_addr (addr_of_int a)) = (a)) -axiom addr_of_int_bijection : forall p:addr. ((addr_of_int (int_of_addr +lemma addr_of_int_bijection : forall p:addr. ((addr_of_int (int_of_addr p)) = (p)) -axiom addr_of_null : ((int_of_addr null) = (0)) +lemma addr_of_null : ((int_of_addr null) = (0)) -axiom base_offset_zero : ((base_offset 0) = (0)) +lemma base_offset_zero : ((base_offset 0) = (0)) -axiom base_offset_inj : forall i:int. ((base_index (base_offset i)) = (i)) +lemma base_offset_inj : forall i:int. ((base_index (base_offset i)) = (i)) -axiom base_offset_monotonic : forall i:int, j:int. (Int.(<) (i) (j)) -> +lemma base_offset_monotonic : forall i:int, j:int. (Int.(<) (i) (j)) -> (Int.(<) (base_offset i) (base_offset j)) end diff --git a/src/plugins/wp/share/why3/Qed.why b/src/plugins/wp/share/why3/Qed.why index 68ede436243..6e1692ec952 100644 --- a/src/plugins/wp/share/why3/Qed.why +++ b/src/plugins/wp/share/why3/Qed.why @@ -61,12 +61,12 @@ axiom rleq1 : forall x:real, y:real. ((rleq x y) = (Bool.True)) <-> function real_of_int (x:int) : real = FromInt.from_int x -axiom c_euclidian : forall n:int, d:int [ComputerDivision.div n d, +lemma c_euclidian : forall n:int, d:int [ComputerDivision.div n d, ComputerDivision.mod n d]. not ((d) = (0)) -> ((n) = ((Int.(+) ((Int.(*) (ComputerDivision.div n d) (d))) (ComputerDivision.mod n d)))) -axiom cdiv_cases : forall n:int, d:int [ComputerDivision.div n d]. +lemma cdiv_cases : forall n:int, d:int [ComputerDivision.div n d]. ((Int.(>=) (n) (0)) -> (Int.(>) (d) (0)) -> ((ComputerDivision.div n d) = ((ComputerDivision.div n d)))) /\ ((Int.(<=) (n) (0)) -> (Int.(>) (d) (0)) -> ((ComputerDivision.div n @@ -76,7 +76,7 @@ axiom cdiv_cases : forall n:int, d:int [ComputerDivision.div n d]. ((Int.(<=) (n) (0)) -> (Int.(<) (d) (0)) -> ((ComputerDivision.div n d) = ((ComputerDivision.div (Int.(-_) (n)) (Int.(-_) (d)))))) -axiom cmod_cases : forall n:int, d:int [ComputerDivision.mod n d]. +lemma cmod_cases : forall n:int, d:int [ComputerDivision.mod n d]. ((Int.(>=) (n) (0)) -> (Int.(>) (d) (0)) -> ((ComputerDivision.mod n d) = ((ComputerDivision.mod n d)))) /\ ((Int.(<=) (n) (0)) -> (Int.(>) (d) (0)) -> ((ComputerDivision.mod n @@ -86,7 +86,7 @@ axiom cmod_cases : forall n:int, d:int [ComputerDivision.mod n d]. (Int.(<) (d) (0)) -> ((ComputerDivision.mod n d) = ((Int.(-_) ((ComputerDivision.mod (Int.(-_) (n)) (Int.(-_) (d)))))))) -axiom cmod_remainder : forall n:int, d:int [ComputerDivision.mod n d]. +lemma cmod_remainder : forall n:int, d:int [ComputerDivision.mod n d]. ((Int.(>=) (n) (0)) -> (Int.(>) (d) (0)) -> (Int.(<=) (0) (ComputerDivision.mod n d)) /\ (Int.(<) (ComputerDivision.mod n d) (d))) /\ ((Int.(<=) (n) (0)) -> (Int.(>) (d) (0)) -> @@ -98,10 +98,10 @@ axiom cmod_remainder : forall n:int, d:int [ComputerDivision.mod n d]. (Int.(<) (d) (ComputerDivision.mod n d)) /\ (Int.(<=) (ComputerDivision.mod n d) (0))) -axiom cdiv_neutral : forall a:int [ComputerDivision.div a 1]. +lemma cdiv_neutral : forall a:int [ComputerDivision.div a 1]. ((ComputerDivision.div a 1) = (a)) -axiom cdiv_inv : forall a:int [ComputerDivision.div a a]. not ((a) = (0)) -> +lemma cdiv_inv : forall a:int [ComputerDivision.div a a]. not ((a) = (0)) -> ((ComputerDivision.div a a) = (1)) end diff --git a/src/plugins/wp/share/why3/Square.why b/src/plugins/wp/share/why3/Square.why index 9e26a7d9db5..25f5ef44689 100644 --- a/src/plugins/wp/share/why3/Square.why +++ b/src/plugins/wp/share/why3/Square.why @@ -24,14 +24,14 @@ theory Square use real.Real as Real use real.Square as Square -axiom sqrt_lin1 : forall x:real [Square.sqrt x]. (Real.(<) (1.) (x)) -> +lemma sqrt_lin1 : forall x:real [Square.sqrt x]. (Real.(<) (1.) (x)) -> (Real.(<) (Square.sqrt x) (x)) -axiom sqrt_lin0 : forall x:real [Square.sqrt x]. (Real.(<) (0.) (x)) /\ +lemma sqrt_lin0 : forall x:real [Square.sqrt x]. (Real.(<) (0.) (x)) /\ (Real.(<) (x) (1.)) -> (Real.(<) (x) (Square.sqrt x)) -axiom sqrt_0 : ((Square.sqrt 0.) = (0.)) +lemma sqrt_0 : ((Square.sqrt 0.) = (0.)) -axiom sqrt_1 : ((Square.sqrt 1.) = (1.)) +lemma sqrt_1 : ((Square.sqrt 1.) = (1.)) end diff --git a/src/plugins/wp/share/why3/Vlist.why b/src/plugins/wp/share/why3/Vlist.why index 6f4c199bbae..df55f756bbd 100644 --- a/src/plugins/wp/share/why3/Vlist.why +++ b/src/plugins/wp/share/why3/Vlist.why @@ -67,8 +67,8 @@ axiom nth_repeat : forall n:int, k:int, w:list 'a [nth (repeat w n) k]. (Int.(<) (0) (length w)) -> ((nth (repeat w n) k) = (nth w (ComputerDivision.mod k (length w)))) -predicate vlist_eq (u:list 'a) (v:list 'a) = ("asym_split" ((length - u) = (length v))) && (forall i:int. (Int.(<=) (0) (i)) /\ +predicate vlist_eq (u:list 'a) (v:list 'a) = ((length + u) = (length v)) && (forall i:int. (Int.(<=) (0) (i)) /\ (Int.(<) (i) (length u)) -> ((nth u i) = (nth v i))) axiom extensionality : forall u:list 'a, v:list 'a. vlist_eq u v -> @@ -98,8 +98,8 @@ axiom rw_repeat_plus_box_unfold : forall w:list 'a, a:int, b:int [repeat_box ((repeat_box w (Int.(+) (a) (b))) = (concat (repeat w a) (repeat w b))) axiom rw_repeat_plus_one_box_unfold : forall w:list 'a, n:int [repeat_box w - n]. (Int.(<) (0) (n)) -> ("asym_split" ((repeat_box w n) = (concat (repeat - w (Int.(-) (n) (1))) w))) && ((repeat_box w (Int.(+) (n) (1))) = (concat + n]. (Int.(<) (0) (n)) -> ((repeat_box w n) = (concat (repeat + w (Int.(-) (n) (1))) w)) && ((repeat_box w (Int.(+) (n) (1))) = (concat (repeat w n) w)) end -- GitLab From 06e25b89657540d67a848981985ecaac071dc663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 19 Apr 2019 17:51:07 +0200 Subject: [PATCH 289/376] [wp/why3] update why3 command outputs --- src/plugins/wp/ProverWhy3.ml | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/src/plugins/wp/ProverWhy3.ml b/src/plugins/wp/ProverWhy3.ml index 56cbd3f35d0..a40c44aecb8 100644 --- a/src/plugins/wp/ProverWhy3.ml +++ b/src/plugins/wp/ProverWhy3.ml @@ -133,21 +133,21 @@ class visitor fmt c = method add_import ?was thy = self#lines ; match was with - | None -> Format.fprintf fmt "use import %s@\n" thy - | Some was -> Format.fprintf fmt "use import %s as %s@\n" thy was + | None -> Format.fprintf fmt "use %s@\n" thy + | Some was -> Format.fprintf fmt "use %s as %s@\n" thy was method add_import2 file thy = self#lines ; - Format.fprintf fmt "use import %s.%s@\n" file thy + Format.fprintf fmt "use %s.%s@\n" file thy method add_import3 file thy name = self#lines ; - Format.fprintf fmt "use import %s.%s as %s@\n" file thy name + Format.fprintf fmt "use %s.%s as %s@\n" file thy name method on_cluster c = self#lines ; let name = (cluster_id c) in - Format.fprintf fmt "use import %s.%s@\n" + Format.fprintf fmt "use %s.%s@\n" name (Transitioning.String.capitalize_ascii name) ; deps <- (D_cluster c) :: deps @@ -348,7 +348,7 @@ let assemble_goal ~id ~title ~theory ?axioms prop fmt = engine#set_goal true ; engine#global begin fun () -> - v#printf "@[<hv 2>goal %s \"expl:%s\":@ %a@]@\n@\n" + v#printf "@[<hv 2>goal %s[@expl:%s]:@ %a@]@\n@\n" why3_goal_name title engine#pp_prop (F.e_prop prop) ; @@ -469,11 +469,11 @@ let assemble_goal wpo = open ProverTask -let p_goal = p_until_space ^ " " ^ p_until_space ^ " " ^ p_until_space ^ " : " +let p_goal = ".* [a-zA-Z0-9_]+: " let p_valid = p_goal ^ "Valid (" ^ p_float ^ "s\\(,[^)]*\\)?)" let p_limit = p_goal ^ "Timeout" let p_error = "File " ^ p_string ^ ", line " ^ p_int ^ ", characters " - ^ p_int ^ "-" ^ p_int ^ ":\n\\(warning:\\)?" + ^ p_int ^ "-" ^ p_int ^ ":\nsyntax error" let re_valid = Str.regexp p_valid let re_limit = Str.regexp p_limit @@ -515,17 +515,13 @@ class why3 ~timeout ~prover ~pid ~file ~includes ~logout ~logerr = method private time t = time <- t method private error (a : pattern) = - try - let _warning = a#get_string 5 in - () - with Not_found -> - let lpos = ProverTask.location (a#get_string 1) (a#get_int 2) in - error <- Error_Generated ( lpos , a#get_after ~offset:1 4 ) + let lpos = ProverTask.location (a#get_string 1) (a#get_int 2) in + error <- Error_Generated ( lpos , "why3 " ^ a#get_after ~offset:1 4 ) method private valid (a : pattern) = begin valid <- true ; - time <- a#get_float 4 ; + time <- a#get_float 1 ; end method private limit (_a : pattern) = @@ -541,10 +537,10 @@ class why3 ~timeout ~prover ~pid ~file ~includes ~logout ~logerr = match error with | Error_Generated(pos,message) -> let source = Cil_datatype.Position.of_lexing_pos pos in - Wp_parameters.error ~source "Why3 error:@\n%s" message ; + Wp_parameters.error ~source "%s" message ; VCS.failed ~pos message | Error_No -> - if r = 0 then + if r = 0 || r = 1 then let verdict = if valid then VCS.Valid else if limit then VCS.Timeout else -- GitLab From 5c5c6dcaad820cb087491cfa3faf6032c18b30fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 19 Apr 2019 18:13:29 +0200 Subject: [PATCH 290/376] [wp/share] fix headers specs --- headers/close-source/MODIFIED_WHY3 | 2 +- headers/close-source/UNMODIFIED_WHY3 | 3 ++- headers/header_spec.txt | 3 +++ headers/open-source/MODIFIED_WHY3 | 2 +- headers/open-source/UNMODIFIED_WHY3 | 3 ++- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/headers/close-source/MODIFIED_WHY3 b/headers/close-source/MODIFIED_WHY3 index a3af4fb4e56..8a26d2f1814 100644 --- a/headers/close-source/MODIFIED_WHY3 +++ b/headers/close-source/MODIFIED_WHY3 @@ -1,6 +1,6 @@ The Why3 Verification Platform / The Why3 Development Team -Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University +Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University This software is distributed under the terms of the GNU Lesser General Public License version 2.1, with the special exception diff --git a/headers/close-source/UNMODIFIED_WHY3 b/headers/close-source/UNMODIFIED_WHY3 index 5d86a7e0f00..aa2704bc4d6 100644 --- a/headers/close-source/UNMODIFIED_WHY3 +++ b/headers/close-source/UNMODIFIED_WHY3 @@ -1,7 +1,8 @@ The Why3 Verification Platform / The Why3 Development Team -Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University +Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University This software is distributed under the terms of the GNU Lesser General Public License version 2.1, with the special exception on linking described in file LICENSE. + diff --git a/headers/header_spec.txt b/headers/header_spec.txt index c60f329e2a1..349e71dd3c5 100644 --- a/headers/header_spec.txt +++ b/headers/header_spec.txt @@ -1799,6 +1799,7 @@ src/plugins/wp/share/coqwp/Cfloat.v: CEA_WP src/plugins/wp/share/coqwp/Cint.v: CEA_WP src/plugins/wp/share/coqwp/Cmath.v: CEA_WP src/plugins/wp/share/coqwp/ExpLog.v: CEA_WP +src/plugins/wp/share/coqwp/HighOrd.v: UNMODIFIED_WHY3 src/plugins/wp/share/coqwp/Memory.v: CEA_WP src/plugins/wp/share/coqwp/Qed.v: CEA_WP src/plugins/wp/share/coqwp/Qedlib.v: CEA_WP @@ -1809,8 +1810,10 @@ src/plugins/wp/share/coqwp/Zbits.v: CEA_WP src/plugins/wp/share/coqwp/bool/Bool.v: UNMODIFIED_WHY3 src/plugins/wp/share/coqwp/int/Abs.v: UNMODIFIED_WHY3 src/plugins/wp/share/coqwp/int/ComputerDivision.v: UNMODIFIED_WHY3 +src/plugins/wp/share/coqwp/int/Exponentiation.v: UNMODIFIED_WHY3 src/plugins/wp/share/coqwp/int/Int.v: UNMODIFIED_WHY3 src/plugins/wp/share/coqwp/int/MinMax.v: UNMODIFIED_WHY3 +src/plugins/wp/share/coqwp/int/Power.v: UNMODIFIED_WHY3 src/plugins/wp/share/coqwp/map/Map.v: UNMODIFIED_WHY3 src/plugins/wp/share/coqwp/map/Const.v: UNMODIFIED_WHY3 src/plugins/wp/share/coqwp/real/Abs.v: UNMODIFIED_WHY3 diff --git a/headers/open-source/MODIFIED_WHY3 b/headers/open-source/MODIFIED_WHY3 index a3af4fb4e56..8a26d2f1814 100644 --- a/headers/open-source/MODIFIED_WHY3 +++ b/headers/open-source/MODIFIED_WHY3 @@ -1,6 +1,6 @@ The Why3 Verification Platform / The Why3 Development Team -Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University +Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University This software is distributed under the terms of the GNU Lesser General Public License version 2.1, with the special exception diff --git a/headers/open-source/UNMODIFIED_WHY3 b/headers/open-source/UNMODIFIED_WHY3 index 5d86a7e0f00..aa2704bc4d6 100644 --- a/headers/open-source/UNMODIFIED_WHY3 +++ b/headers/open-source/UNMODIFIED_WHY3 @@ -1,7 +1,8 @@ The Why3 Verification Platform / The Why3 Development Team -Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University +Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University This software is distributed under the terms of the GNU Lesser General Public License version 2.1, with the special exception on linking described in file LICENSE. + -- GitLab From 54a7b862473fde07b4965eff2457e0a778bde42e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 19 Apr 2019 18:19:25 +0200 Subject: [PATCH 291/376] [wp/share] update headers --- src/plugins/wp/share/coqwp/BuiltIn.v | 3 ++- src/plugins/wp/share/coqwp/HighOrd.v | 20 +++++++++---------- src/plugins/wp/share/coqwp/bool/Bool.v | 20 +++++++++---------- src/plugins/wp/share/coqwp/int/Abs.v | 20 +++++++++---------- .../wp/share/coqwp/int/ComputerDivision.v | 20 +++++++++---------- .../wp/share/coqwp/int/Exponentiation.v | 20 +++++++++---------- src/plugins/wp/share/coqwp/int/Int.v | 20 +++++++++---------- src/plugins/wp/share/coqwp/int/MinMax.v | 20 +++++++++---------- src/plugins/wp/share/coqwp/int/Power.v | 20 +++++++++---------- src/plugins/wp/share/coqwp/map/Const.v | 20 +++++++++---------- src/plugins/wp/share/coqwp/map/Map.v | 20 +++++++++---------- src/plugins/wp/share/coqwp/real/Abs.v | 20 +++++++++---------- src/plugins/wp/share/coqwp/real/ExpLog.v | 20 +++++++++---------- src/plugins/wp/share/coqwp/real/FromInt.v | 20 +++++++++---------- src/plugins/wp/share/coqwp/real/MinMax.v | 20 +++++++++---------- src/plugins/wp/share/coqwp/real/PowerReal.v | 20 +++++++++---------- src/plugins/wp/share/coqwp/real/Real.v | 20 +++++++++---------- src/plugins/wp/share/coqwp/real/RealInfix.v | 20 +++++++++---------- src/plugins/wp/share/coqwp/real/Square.v | 20 +++++++++---------- .../wp/share/coqwp/real/Trigonometry.v | 20 +++++++++---------- src/plugins/wp/share/ergo/bool.Bool.mlw | 2 +- src/plugins/wp/share/ergo/int.Abs.mlw | 2 +- .../wp/share/ergo/int.ComputerDivision.mlw | 2 +- src/plugins/wp/share/ergo/int.Int.mlw | 2 +- src/plugins/wp/share/ergo/int.MinMax.mlw | 2 +- src/plugins/wp/share/ergo/map.Const.mlw | 2 +- src/plugins/wp/share/ergo/map.Map.mlw | 2 +- src/plugins/wp/share/ergo/real.Abs.mlw | 2 +- src/plugins/wp/share/ergo/real.ExpLog.mlw | 2 +- src/plugins/wp/share/ergo/real.FromInt.mlw | 2 +- src/plugins/wp/share/ergo/real.Hyperbolic.mlw | 2 +- src/plugins/wp/share/ergo/real.MinMax.mlw | 2 +- src/plugins/wp/share/ergo/real.Polar.mlw | 2 +- src/plugins/wp/share/ergo/real.PowerReal.mlw | 2 +- src/plugins/wp/share/ergo/real.Real.mlw | 2 +- src/plugins/wp/share/ergo/real.RealInfix.mlw | 2 +- src/plugins/wp/share/ergo/real.Square.mlw | 2 +- .../wp/share/ergo/real.Trigonometry.mlw | 2 +- src/plugins/wp/share/ergo/real.Truncate.mlw | 2 +- src/plugins/wp/share/src/alt_ergo_realize.ml | 2 +- .../wp/share/src/why3printer_realize.ml | 2 +- src/plugins/wp/why3_xml.mli | 2 +- src/plugins/wp/why3_xml.mll | 2 +- 43 files changed, 215 insertions(+), 214 deletions(-) diff --git a/src/plugins/wp/share/coqwp/BuiltIn.v b/src/plugins/wp/share/coqwp/BuiltIn.v index bd09b95be72..c7b225032cb 100644 --- a/src/plugins/wp/share/coqwp/BuiltIn.v +++ b/src/plugins/wp/share/coqwp/BuiltIn.v @@ -1,11 +1,12 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) (* on linking described in file LICENSE. *) +(* *) (**************************************************************************) Require Export ZArith. diff --git a/src/plugins/wp/share/coqwp/HighOrd.v b/src/plugins/wp/share/coqwp/HighOrd.v index da42135acf8..4e75e9efbdb 100644 --- a/src/plugins/wp/share/coqwp/HighOrd.v +++ b/src/plugins/wp/share/coqwp/HighOrd.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) Require Import BuiltIn. diff --git a/src/plugins/wp/share/coqwp/bool/Bool.v b/src/plugins/wp/share/coqwp/bool/Bool.v index 9038682132e..826f424ce20 100644 --- a/src/plugins/wp/share/coqwp/bool/Bool.v +++ b/src/plugins/wp/share/coqwp/bool/Bool.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/int/Abs.v b/src/plugins/wp/share/coqwp/int/Abs.v index 5637e82b7da..b6fe3478d67 100644 --- a/src/plugins/wp/share/coqwp/int/Abs.v +++ b/src/plugins/wp/share/coqwp/int/Abs.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/int/ComputerDivision.v b/src/plugins/wp/share/coqwp/int/ComputerDivision.v index c34926e4c2f..060d4cdf041 100644 --- a/src/plugins/wp/share/coqwp/int/ComputerDivision.v +++ b/src/plugins/wp/share/coqwp/int/ComputerDivision.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/int/Exponentiation.v b/src/plugins/wp/share/coqwp/int/Exponentiation.v index f911f4cd6bd..0aa04b60e8e 100644 --- a/src/plugins/wp/share/coqwp/int/Exponentiation.v +++ b/src/plugins/wp/share/coqwp/int/Exponentiation.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/int/Int.v b/src/plugins/wp/share/coqwp/int/Int.v index a5106073930..8447e44455a 100644 --- a/src/plugins/wp/share/coqwp/int/Int.v +++ b/src/plugins/wp/share/coqwp/int/Int.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/int/MinMax.v b/src/plugins/wp/share/coqwp/int/MinMax.v index d969091e781..8510be57857 100644 --- a/src/plugins/wp/share/coqwp/int/MinMax.v +++ b/src/plugins/wp/share/coqwp/int/MinMax.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/int/Power.v b/src/plugins/wp/share/coqwp/int/Power.v index e2bed67ea5d..55d496108e2 100644 --- a/src/plugins/wp/share/coqwp/int/Power.v +++ b/src/plugins/wp/share/coqwp/int/Power.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/map/Const.v b/src/plugins/wp/share/coqwp/map/Const.v index c2ebf2444c8..51eddc01c4a 100644 --- a/src/plugins/wp/share/coqwp/map/Const.v +++ b/src/plugins/wp/share/coqwp/map/Const.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/map/Map.v b/src/plugins/wp/share/coqwp/map/Map.v index 1cb87d0a041..ac77830ba3f 100644 --- a/src/plugins/wp/share/coqwp/map/Map.v +++ b/src/plugins/wp/share/coqwp/map/Map.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/real/Abs.v b/src/plugins/wp/share/coqwp/real/Abs.v index 5c1bcd5b23d..33b579cdeaf 100644 --- a/src/plugins/wp/share/coqwp/real/Abs.v +++ b/src/plugins/wp/share/coqwp/real/Abs.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/real/ExpLog.v b/src/plugins/wp/share/coqwp/real/ExpLog.v index b0f17454da3..d666acbb9f2 100644 --- a/src/plugins/wp/share/coqwp/real/ExpLog.v +++ b/src/plugins/wp/share/coqwp/real/ExpLog.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/real/FromInt.v b/src/plugins/wp/share/coqwp/real/FromInt.v index fa6f14fc385..5d61bbdfdd2 100644 --- a/src/plugins/wp/share/coqwp/real/FromInt.v +++ b/src/plugins/wp/share/coqwp/real/FromInt.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/real/MinMax.v b/src/plugins/wp/share/coqwp/real/MinMax.v index 3f6ade0b9ac..deccab540b9 100644 --- a/src/plugins/wp/share/coqwp/real/MinMax.v +++ b/src/plugins/wp/share/coqwp/real/MinMax.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/real/PowerReal.v b/src/plugins/wp/share/coqwp/real/PowerReal.v index 1532b405d1b..15404bf4e75 100644 --- a/src/plugins/wp/share/coqwp/real/PowerReal.v +++ b/src/plugins/wp/share/coqwp/real/PowerReal.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/real/Real.v b/src/plugins/wp/share/coqwp/real/Real.v index 8fc9927ec9b..eca3f8f8ea4 100644 --- a/src/plugins/wp/share/coqwp/real/Real.v +++ b/src/plugins/wp/share/coqwp/real/Real.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/real/RealInfix.v b/src/plugins/wp/share/coqwp/real/RealInfix.v index fe99b70efc6..af4165dc282 100644 --- a/src/plugins/wp/share/coqwp/real/RealInfix.v +++ b/src/plugins/wp/share/coqwp/real/RealInfix.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/real/Square.v b/src/plugins/wp/share/coqwp/real/Square.v index 11e34192e34..dd62746a2d5 100644 --- a/src/plugins/wp/share/coqwp/real/Square.v +++ b/src/plugins/wp/share/coqwp/real/Square.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/coqwp/real/Trigonometry.v b/src/plugins/wp/share/coqwp/real/Trigonometry.v index 04707511fb3..4fb4e404c1f 100644 --- a/src/plugins/wp/share/coqwp/real/Trigonometry.v +++ b/src/plugins/wp/share/coqwp/real/Trigonometry.v @@ -1,13 +1,13 @@ -(********************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(********************************************************************) +(**************************************************************************) +(* *) +(* The Why3 Verification Platform / The Why3 Development Team *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) +(* *) +(* This software is distributed under the terms of the GNU Lesser *) +(* General Public License version 2.1, with the special exception *) +(* on linking described in file LICENSE. *) +(* *) +(**************************************************************************) (* This file is generated by Why3's Coq-realize driver *) (* Beware! Only edit allowed sections below *) diff --git a/src/plugins/wp/share/ergo/bool.Bool.mlw b/src/plugins/wp/share/ergo/bool.Bool.mlw index bb1399469ab..e31c6ffa0dc 100644 --- a/src/plugins/wp/share/ergo/bool.Bool.mlw +++ b/src/plugins/wp/share/ergo/bool.Bool.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/int.Abs.mlw b/src/plugins/wp/share/ergo/int.Abs.mlw index bfaf4a42bb2..e03de293a71 100644 --- a/src/plugins/wp/share/ergo/int.Abs.mlw +++ b/src/plugins/wp/share/ergo/int.Abs.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/int.ComputerDivision.mlw b/src/plugins/wp/share/ergo/int.ComputerDivision.mlw index b6f17a3e97a..743d5fa35a3 100644 --- a/src/plugins/wp/share/ergo/int.ComputerDivision.mlw +++ b/src/plugins/wp/share/ergo/int.ComputerDivision.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/int.Int.mlw b/src/plugins/wp/share/ergo/int.Int.mlw index c5821cb8432..703c83034f6 100644 --- a/src/plugins/wp/share/ergo/int.Int.mlw +++ b/src/plugins/wp/share/ergo/int.Int.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/int.MinMax.mlw b/src/plugins/wp/share/ergo/int.MinMax.mlw index 6dff092e7d8..5bbc63f7812 100644 --- a/src/plugins/wp/share/ergo/int.MinMax.mlw +++ b/src/plugins/wp/share/ergo/int.MinMax.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/map.Const.mlw b/src/plugins/wp/share/ergo/map.Const.mlw index eb73c12af2a..eb7f9a8995d 100644 --- a/src/plugins/wp/share/ergo/map.Const.mlw +++ b/src/plugins/wp/share/ergo/map.Const.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/map.Map.mlw b/src/plugins/wp/share/ergo/map.Map.mlw index 56ddd1ea93d..ddb3b00ec7e 100644 --- a/src/plugins/wp/share/ergo/map.Map.mlw +++ b/src/plugins/wp/share/ergo/map.Map.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/real.Abs.mlw b/src/plugins/wp/share/ergo/real.Abs.mlw index 24664ffe802..1340bfad895 100644 --- a/src/plugins/wp/share/ergo/real.Abs.mlw +++ b/src/plugins/wp/share/ergo/real.Abs.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/real.ExpLog.mlw b/src/plugins/wp/share/ergo/real.ExpLog.mlw index 05dd26a4905..a600122dfd8 100644 --- a/src/plugins/wp/share/ergo/real.ExpLog.mlw +++ b/src/plugins/wp/share/ergo/real.ExpLog.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/real.FromInt.mlw b/src/plugins/wp/share/ergo/real.FromInt.mlw index fc67bc41a88..6c0d9c52160 100644 --- a/src/plugins/wp/share/ergo/real.FromInt.mlw +++ b/src/plugins/wp/share/ergo/real.FromInt.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/real.Hyperbolic.mlw b/src/plugins/wp/share/ergo/real.Hyperbolic.mlw index daa086fd265..da5f26b3c17 100644 --- a/src/plugins/wp/share/ergo/real.Hyperbolic.mlw +++ b/src/plugins/wp/share/ergo/real.Hyperbolic.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/real.MinMax.mlw b/src/plugins/wp/share/ergo/real.MinMax.mlw index e4d32828a64..d1438d67fd2 100644 --- a/src/plugins/wp/share/ergo/real.MinMax.mlw +++ b/src/plugins/wp/share/ergo/real.MinMax.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/real.Polar.mlw b/src/plugins/wp/share/ergo/real.Polar.mlw index 48c14d709ef..4c953665ad7 100644 --- a/src/plugins/wp/share/ergo/real.Polar.mlw +++ b/src/plugins/wp/share/ergo/real.Polar.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/real.PowerReal.mlw b/src/plugins/wp/share/ergo/real.PowerReal.mlw index b0d583f3b79..8e5923d76a8 100644 --- a/src/plugins/wp/share/ergo/real.PowerReal.mlw +++ b/src/plugins/wp/share/ergo/real.PowerReal.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/real.Real.mlw b/src/plugins/wp/share/ergo/real.Real.mlw index cf6ffb24db6..db80917b1b0 100644 --- a/src/plugins/wp/share/ergo/real.Real.mlw +++ b/src/plugins/wp/share/ergo/real.Real.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/real.RealInfix.mlw b/src/plugins/wp/share/ergo/real.RealInfix.mlw index 3b5f00b1623..5134839728a 100644 --- a/src/plugins/wp/share/ergo/real.RealInfix.mlw +++ b/src/plugins/wp/share/ergo/real.RealInfix.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/real.Square.mlw b/src/plugins/wp/share/ergo/real.Square.mlw index c4f1fcbf01f..4eaec010938 100644 --- a/src/plugins/wp/share/ergo/real.Square.mlw +++ b/src/plugins/wp/share/ergo/real.Square.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/real.Trigonometry.mlw b/src/plugins/wp/share/ergo/real.Trigonometry.mlw index fac0a529cad..bd5fa3953ae 100644 --- a/src/plugins/wp/share/ergo/real.Trigonometry.mlw +++ b/src/plugins/wp/share/ergo/real.Trigonometry.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/ergo/real.Truncate.mlw b/src/plugins/wp/share/ergo/real.Truncate.mlw index e963d526cf4..f86ba0df6fb 100644 --- a/src/plugins/wp/share/ergo/real.Truncate.mlw +++ b/src/plugins/wp/share/ergo/real.Truncate.mlw @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/src/alt_ergo_realize.ml b/src/plugins/wp/share/src/alt_ergo_realize.ml index 2d62d57d54f..31bd1ce3ff9 100644 --- a/src/plugins/wp/share/src/alt_ergo_realize.ml +++ b/src/plugins/wp/share/src/alt_ergo_realize.ml @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/share/src/why3printer_realize.ml b/src/plugins/wp/share/src/why3printer_realize.ml index a65ee6812bc..6042541b3fc 100644 --- a/src/plugins/wp/share/src/why3printer_realize.ml +++ b/src/plugins/wp/share/src/why3printer_realize.ml @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/why3_xml.mli b/src/plugins/wp/why3_xml.mli index b2c124a3cd4..788c602b990 100644 --- a/src/plugins/wp/why3_xml.mli +++ b/src/plugins/wp/why3_xml.mli @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) diff --git a/src/plugins/wp/why3_xml.mll b/src/plugins/wp/why3_xml.mll index a65a587f62a..f178197c0d6 100644 --- a/src/plugins/wp/why3_xml.mll +++ b/src/plugins/wp/why3_xml.mll @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *) +(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) (* *) (* This software is distributed under the terms of the GNU Lesser *) (* General Public License version 2.1, with the special exception *) -- GitLab From b409fd7754571e158f46ad3a3650e5abb3bf35cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 19 Apr 2019 18:39:18 +0200 Subject: [PATCH 292/376] [wp/tests] update prover versions --- .../wp/tests/wp_plugin/oracle_qualif/config.res.oracle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle index a8039c8eeba..fe0cc31ce15 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle @@ -2,6 +2,6 @@ WP Requirements for Qualif Tests (3) ---------------------------------------------------------- 1. The Alt-Ergo theorem prover, version 2.0.0 -2. The Why3 platform, version 0.88.3 -3. The Coq Proof Assistant, version 8.7.2 +2. The Why3 platform, version 1.2.0 +3. The Coq Proof Assistant, version 8.8.2 ---------------------------------------------------------- -- GitLab From 308e5da71513119e394e1a756de2660ca4bbf909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Tue, 23 Apr 2019 09:18:37 +0200 Subject: [PATCH 293/376] [wp/why3] try why3 version 1.1.1 --- nix/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/default.nix b/nix/default.nix index ee41f8418bb..bbdb097eb33 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -150,7 +150,7 @@ rec { name = "frama-c-wp-qualif"; buildInputs = mk_buildInputs { opamPackages = [ { name = "alt-ergo"; constraint = "=2.0.0"; } - { name = "why3" ; constraint = "=1.2.0"; } + { name = "why3" ; constraint = "=1.1.1"; } ]; }; build_dir = main.build_dir; src = main.build_dir + "/dir.tar"; -- GitLab From a0b760d30cd0193a6e23965ff3b3fbe201c836c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Tue, 23 Apr 2019 09:44:17 +0200 Subject: [PATCH 294/376] [wp/share] missing coq file in wp.driver --- src/plugins/wp/share/wp.driver | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/wp/share/wp.driver b/src/plugins/wp/share/wp.driver index 7dd358acc69..44a2fedb5ae 100644 --- a/src/plugins/wp/share/wp.driver +++ b/src/plugins/wp/share/wp.driver @@ -22,6 +22,7 @@ library qed: coq.file += "coqwp/BuiltIn.v"; +coq.file += "coqwp/HighOrd.v"; coq.file += "coqwp:int/Int.v"; coq.file += "coqwp:int/Abs.v"; coq.file += "coqwp:int/ComputerDivision.v"; -- GitLab From 14df2252240434952ea4f681c8037977dcffdbfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Tue, 23 Apr 2019 10:08:57 +0200 Subject: [PATCH 295/376] [wp/why3] add OPAM deptopt on why3-coq --- opam/opam | 1 + 1 file changed, 1 insertion(+) diff --git a/opam/opam b/opam/opam index 6b874e248e2..16ea05f0d3e 100644 --- a/opam/opam +++ b/opam/opam @@ -100,6 +100,7 @@ depends: [ depopts: [ "coq" { build } "why3" { build } + "why3-coq" { build } "mlgmpidl" { build } "apron" { build } ] -- GitLab From cd186218344cdec50b4333ecbad61eec48911f3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Tue, 23 Apr 2019 10:27:25 +0200 Subject: [PATCH 296/376] [wp/coq] fix coq dependencies --- src/plugins/wp/share/wp.driver | 12 ++++++------ .../wp/tests/wp_plugin/oracle/inductive.res.oracle | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/plugins/wp/share/wp.driver b/src/plugins/wp/share/wp.driver index 44a2fedb5ae..17c5507e275 100644 --- a/src/plugins/wp/share/wp.driver +++ b/src/plugins/wp/share/wp.driver @@ -30,6 +30,7 @@ coq.file += "coqwp:real/Real.v"; coq.file += "coqwp:real/RealInfix.v"; coq.file += "coqwp:real/FromInt.v"; coq.file += "coqwp:map/Map.v"; +coq.file += "coqwp:bool/Bool.v"; coq.file += "coqwp/Qedlib.v"; coq.file += "coqwp/Qed.v"; why3.import += "int.Abs:IAbs"; @@ -48,7 +49,6 @@ why3.import += "map.Const"; altergo.file += "ergo/map.Const.mlw"; library bool: -coq.file += "coqwp:bool/Bool.v"; altergo.file += "ergo/bool.Bool.mlw"; library minmax_int: @@ -74,21 +74,20 @@ logic real "\\min"(real,real) = {coq="Rmin";altergo="min_real";why3="Rg.min"}; library cint: +coq.file += "coqwp/Bits.v"; +coq.file += "coqwp/Zbits.v"; coq.file += "coqwp/Cint.v"; why3.file += "why3/Cint.why"; altergo.file += "ergo/Cint.mlw"; library cbits: cint -coq.file += "coqwp/Bits.v"; -coq.file += "coqwp/Zbits.v"; coq.file += "coqwp/Cbits.v"; altergo.file += "ergo/Cbits.mlw"; why3.file += "why3/Cbits.why"; -library cfloat: cmath +library cfloat: cmath sqrt coq.file += "coqwp/Cfloat.v"; why3.file += "why3/Cfloat.why"; -altergo.file += "ergo/real.Square.mlw"; altergo.file += "ergo/Cfloat.mlw"; type "rounding_mode" = "rounding_mode"; ctor "\\Up"() = "Up"; @@ -127,7 +126,6 @@ altergo.file := "ergo/Memory.mlw"; library sqrt: cmath why3.import += "real.Square"; -coq.file += "coqwp:real/Square.v"; coq.file += "coqwp/Square.v"; why3.file += "why3/Square.why"; altergo.file += "ergo/real.Square.mlw"; @@ -153,6 +151,8 @@ altergo.file += "ergo/real.Truncate.mlw" ; library cmath: qed why3.import += "real.Abs:RAbs" ; why3.file += "why3/Cmath.why"; +coq.file += "coqwp:real/Abs.v" ; +coq.file += "coqwp:real/Square.v"; coq.file += "coqwp/Cmath.v"; altergo.file += "ergo/real.Abs.mlw" ; altergo.file += "ergo/Cmath.mlw"; diff --git a/src/plugins/wp/tests/wp_plugin/oracle/inductive.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/inductive.res.oracle index d012a5d99d0..72d899e2d0d 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/inductive.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/inductive.res.oracle @@ -12,6 +12,7 @@ Require Import ZArith. Require Import Reals. Require Import BuiltIn. + Require Import HighOrd. Require Import int.Int. Require Import int.Abs. Require Import int.ComputerDivision. @@ -19,6 +20,7 @@ Require Import real.RealInfix. Require Import real.FromInt. Require Import map.Map. + Require Import bool.Bool. Require Import Qedlib. Require Import Qed. Require Import Memory. @@ -34,6 +36,7 @@ Require Import ZArith. Require Import Reals. Require Import BuiltIn. + Require Import HighOrd. Require Import int.Int. Require Import int.Abs. Require Import int.ComputerDivision. @@ -41,6 +44,7 @@ Require Import real.RealInfix. Require Import real.FromInt. Require Import map.Map. + Require Import bool.Bool. Require Import Qedlib. Require Import Qed. @@ -80,6 +84,7 @@ Require Import ZArith. Require Import Reals. Require Import BuiltIn. + Require Import HighOrd. Require Import int.Int. Require Import int.Abs. Require Import int.ComputerDivision. @@ -87,6 +92,7 @@ Require Import real.RealInfix. Require Import real.FromInt. Require Import map.Map. + Require Import bool.Bool. Require Import Qedlib. Require Import Qed. -- GitLab From 3ba8ba71eda3609d156dbddda14c51f849a02a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Tue, 23 Apr 2019 10:47:36 +0200 Subject: [PATCH 297/376] [Install] fix versions of wp provers --- INSTALL.md | 10 ++++------ src/plugins/wp/configure.ac | 6 +++--- .../wp/tests/wp_plugin/oracle_qualif/config.res.oracle | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 854f2dbba76..79d1793add0 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -81,19 +81,17 @@ The following set of packages is known to be a working configuration for Frama-C 18 (Argon): - OCaml 4.05.0 -- alt-ergo.2.0.0 (pin recommanded) +- alt-ergo-free.2.0.0 (optional) - apron.20160125 (optional) -- coq.8.9.0 (optional; pin recommended) +- coq.8.9.0 (optional) - lablgtk.2.18.5 - mlgmpidl.1.2.7 (optional) - ocamlgraph.1.8.8 -- why3.1.2.0 +- why3.1.2.0 (optional) +- why3-coq.1.2.0 (optional) - yojson.1.4.1 - zarith.1.7 -Note: *pin recommended* indicates packages likely to become incompatible in - future releases; `opam pin` is recommended to prevent them from breaking. - ### Installing Custom Versions of Frama-C via opam If you have a **non-standard** version of Frama-C available diff --git a/src/plugins/wp/configure.ac b/src/plugins/wp/configure.ac index c07fd5132cc..1fbe972d797 100644 --- a/src/plugins/wp/configure.ac +++ b/src/plugins/wp/configure.ac @@ -64,16 +64,16 @@ if test "$ENABLE_WP" != "no"; then if test "$COQC" = "yes" ; then COQVERSION=`coqc -v | sed -n -e 's|.*version* *\([[^ ]]*\) .*$|\1|p' ` case $COQVERSION in - 8.8*|8.9*|trunk) + 8.7*|8.8*|8.9*|trunk) AC_MSG_RESULT(coqc version $COQVERSION found) ;; - *) + *) AC_MSG_RESULT(unsupported coqc version $COQVERSION) COQC="no" ;; esac else - AC_MSG_NOTICE(rerun configure to make wp using coq 8.8+) + AC_MSG_NOTICE(rerun configure to make wp using coq 8.7.2 or higher) fi else COQC="no" diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle index fe0cc31ce15..c205459c40e 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle @@ -3,5 +3,5 @@ WP Requirements for Qualif Tests (3) ---------------------------------------------------------- 1. The Alt-Ergo theorem prover, version 2.0.0 2. The Why3 platform, version 1.2.0 -3. The Coq Proof Assistant, version 8.8.2 +3. The Coq Proof Assistant, version 8.9.0 ---------------------------------------------------------- -- GitLab From 4311e6552f8cd36f5b80229876921a35e33ce5b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Tue, 23 Apr 2019 12:04:01 +0200 Subject: [PATCH 298/376] [wp/doc] update manual wrt prover versions --- src/plugins/wp/doc/manual/wp_plugin.tex | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/plugins/wp/doc/manual/wp_plugin.tex b/src/plugins/wp/doc/manual/wp_plugin.tex index 1e70862cd8a..f1970bf9887 100644 --- a/src/plugins/wp/doc/manual/wp_plugin.tex +++ b/src/plugins/wp/doc/manual/wp_plugin.tex @@ -29,21 +29,27 @@ plug-in with the load and save commands of \textsf{Frama-C} and/or the %----------------------------------------------------------------------------- The \textsf{WP} plug-in requires external provers to work. -The natively supported provers are: +The recommended versions for external provers are: \begin{center} \begin{tabular}{crlc} - Prover & Version & Download &\\ + Prover & Versions & Download &\\ \hline - \textsf{Alt-Ergo} & \verb|1.0.0+| and \verb|2.0.0+| & + \textsf{Alt-Ergo} & \verb|2.0.0| & \url{http://alt-ergo.ocamlpro.com} & \cite{AltErgo2006}\\ - \textsf{Coq} & \verb|8.9|, \verb|8.8| & + \textsf{Coq} & \verb|8.9.0| & \url{http://coq.inria.fr} & \cite{Coq84}\\ - \textsf{Why3} & \verb|1.1.0+| & + \textsf{Why3} & \verb|1.2.0| & \url{http://why3.lri.fr} & \cite{Why3}\\ \end{tabular} \end{center} Recent \textsf{OPAM}-provided versions should work smoothly. +Other versions might be supported as well, typically, as far as we know: +\begin{itemize} +\item \textsf{Alt-Ergo} \verb+2.2.0+ and \verb+2.3.0+, although distributed under a non-commercial licence. +\item \textsf{Coq} \verb+8.7.2+ and \verb+8.8.2+, although proof scripts compatibility can be an issue. +\item \textsf{Why3} \verb+1.0.0+ and \verb+1.1.1+, although only \verb+1.2.0+ is provided with Coq support. +\end{itemize} Other provers, like \textsf{Gappa}, \textsf{Z3}, \textsf{CVC3}, \textsf{CVC4}, \textsf{PVS}, and many others, are accessible from @@ -64,7 +70,7 @@ turned on/off at configure time, typically: \end{logs} \paragraph{Compilation.} If you want to compile the \textsf{Coq} and \textsf{Why-3} -libraries manually, you can still run: +libraries manually, you can still run the following commands: \begin{logs} # make wp-coq wp-why3 # [sudo] make wp-coq-install -- GitLab From 28b7848870667c51ae1d7a936fe32d16881fa16f Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Tue, 23 Apr 2019 14:51:10 +0200 Subject: [PATCH 299/376] [wp/test] some regression with alt-ergo --- .../tests/wp_gallery/binary-multiplication.c | 21 +++++++--- .../oracle/binary-multiplication.res.oracle | 8 +++- .../binary-multiplication.res.oracle | 40 +++++++++++-------- 3 files changed, 44 insertions(+), 25 deletions(-) diff --git a/src/plugins/wp/tests/wp_gallery/binary-multiplication.c b/src/plugins/wp/tests/wp_gallery/binary-multiplication.c index 11732fd2cf5..c83fc68bb74 100644 --- a/src/plugins/wp/tests/wp_gallery/binary-multiplication.c +++ b/src/plugins/wp/tests/wp_gallery/binary-multiplication.c @@ -3,39 +3,48 @@ */ /* run.config_qualif - OPT: -wp-prover why3:alt-ergo -wp-prop=-lack -then -wp-rte -wp -wp-prop=-lack + OPT: -wp-prover=why3:alt-ergo -wp-prop=-lack -then -wp-rte -wp -wp-prop=-lack */ +// The use '-wp-prover=z3,why3:alt-ergo' gives better results. + typedef unsigned uint32_t ; typedef unsigned long long uint64_t ; /*@ axiomatic mult { @ lemma sizeof_ok: ok: sizeof(uint64_t) == 2*sizeof(uint32_t); - @ lemma ax1: lack: \forall integer x, y; 0<x && 0<y ==> 0 <= 2*x*(y/2) <= x*y; - + @ lemma ax1: lack: \forall integer x, y; 0<x && 0<y ==> 0 <= 2*x*(y/2) <= x*y; + @ lemma ax2: lack: \forall integer x, y; (uint64_t)(x * ((uint64_t)y)) == (uint64_t)(x*y) ; @ lemma ax3: lack: \forall integer x, y; (uint64_t)(x + ((uint64_t)y)) == (uint64_t)(x+y) ; @ lemma ax4: ok: \forall integer x, y; (uint64_t)(((uint64_t)x) * y) == (uint64_t)(x*y) ; @ lemma ax5: ok: \forall integer x, y; (uint64_t)(((uint64_t)x) + y) == (uint64_t)(x+y) ; + + @ lemma ax7: ok: \forall integer x, y; 0<=x && 0<=y && ((y%2) > 0) ==> 2*x*(y/2) + x == x*y; + @ } @ */ //@ ensures product: \result == a*b; uint64_t BinaryMultiplication (uint32_t a, uint32_t b) { - //@ assert a1: ok: deductible: a*b <= 18446744073709551615; // deductible from size of C types + //@ assert a1: ok: deductible: a*b == (uint64_t)(a*b); // deductible from size of C types uint64_t r=0; uint64_t x=a; if (b != 0) { /*@ loop assigns r, x, b; @ loop invariant inv1: ok: r+x*b == \at(a*b, LoopEntry); - @ loop invariant inv2: ok: deductible: 2*x*(b/2) <= 18446744073709551615; // deductible from inv1, ax1, a1 and x>=0, b>0, r>=0 + @ loop invariant inv2: ok: b > 0; @ loop variant ok: b ; @*/ while (1) { //@ assert a2: ok: b>1 ==> 2*x == (uint64_t)(2*x); //@ assert a3: ok: x*b == (uint64_t)(x*b); - if (b%2) r=r+x; + //@ assert a4: ok: ((b%2) != 0) ==> 2*x*(b/2) + x == x*b; + //@ assert a5: ok: ((b%2) == 0) ==> 2*x*(b/2) == x*b; + if (b%2) + r=r+x; + //@ assert a6: lack: ok_z3: r+2*x*(b/2) == \at(a*b, Pre); b=b/2; if (b==0) break; x=x*2; diff --git a/src/plugins/wp/tests/wp_gallery/oracle/binary-multiplication.res.oracle b/src/plugins/wp/tests/wp_gallery/oracle/binary-multiplication.res.oracle index 6473cd6ed5f..129465cef77 100644 --- a/src/plugins/wp/tests/wp_gallery/oracle/binary-multiplication.res.oracle +++ b/src/plugins/wp/tests/wp_gallery/oracle/binary-multiplication.res.oracle @@ -8,15 +8,19 @@ [wp] Goal typed_lemma_ax3_lack : not tried [wp] Goal typed_lemma_ax4_ok : not tried [wp] Goal typed_lemma_ax5_ok : not tried +[wp] Goal typed_lemma_ax7_ok : not tried [wp] Goal typed_lemma_sizeof_ok_ok : trivial [wp] Goal typed_BinaryMultiplication_ensures_product : not tried [wp] Goal typed_BinaryMultiplication_assert_a1_ok_deductible : not tried [wp] Goal typed_BinaryMultiplication_loop_invariant_inv1_ok_preserved : not tried [wp] Goal typed_BinaryMultiplication_loop_invariant_inv1_ok_established : not tried -[wp] Goal typed_BinaryMultiplication_loop_invariant_inv2_ok_deductible_preserved : not tried -[wp] Goal typed_BinaryMultiplication_loop_invariant_inv2_ok_deductible_established : not tried +[wp] Goal typed_BinaryMultiplication_loop_invariant_inv2_ok_preserved : not tried +[wp] Goal typed_BinaryMultiplication_loop_invariant_inv2_ok_established : not tried [wp] Goal typed_BinaryMultiplication_assert_a2_ok : not tried [wp] Goal typed_BinaryMultiplication_assert_a3_ok : not tried +[wp] Goal typed_BinaryMultiplication_assert_a4_ok : not tried +[wp] Goal typed_BinaryMultiplication_assert_a5_ok : not tried +[wp] Goal typed_BinaryMultiplication_assert_a6_lack_ok_z3 : not tried [wp] Goal typed_BinaryMultiplication_loop_assigns : trivial [wp] Goal typed_BinaryMultiplication_loop_variant_decrease : not tried [wp] Goal typed_BinaryMultiplication_loop_variant_positive : not tried diff --git a/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication.res.oracle b/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication.res.oracle index 72aefff35c4..df6617e5ab9 100644 --- a/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication.res.oracle +++ b/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication.res.oracle @@ -3,59 +3,65 @@ [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' [wp] Warning: Missing RTE guards -[wp] 14 goals scheduled +[wp] 17 goals scheduled [wp] [alt-ergo] Goal typed_lemma_ax4_ok : Valid [wp] [alt-ergo] Goal typed_lemma_ax5_ok : Valid +[wp] [alt-ergo] Goal typed_lemma_ax7_ok : Valid [wp] [Qed] Goal typed_lemma_sizeof_ok_ok : Valid [wp] [alt-ergo] Goal typed_BinaryMultiplication_ensures_product : Valid [wp] [alt-ergo] Goal typed_BinaryMultiplication_assert_a1_ok_deductible : Valid [wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_invariant_inv1_ok_preserved : Valid [wp] [Qed] Goal typed_BinaryMultiplication_loop_invariant_inv1_ok_established : Valid -[wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_invariant_inv2_ok_deductible_preserved : Valid -[wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_invariant_inv2_ok_deductible_established : Valid +[wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_invariant_inv2_ok_preserved : Valid +[wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_invariant_inv2_ok_established : Valid [wp] [alt-ergo] Goal typed_BinaryMultiplication_assert_a2_ok : Valid [wp] [alt-ergo] Goal typed_BinaryMultiplication_assert_a3_ok : Valid +[wp] [alt-ergo] Goal typed_BinaryMultiplication_assert_a4_ok : Valid +[wp] [alt-ergo] Goal typed_BinaryMultiplication_assert_a5_ok : Valid [wp] [Qed] Goal typed_BinaryMultiplication_loop_assigns : Valid [wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_variant_decrease : Valid -[wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_variant_positive : Valid -[wp] Proved goals: 14 / 14 - Qed: 3 - alt-ergo: 11 +[wp] [Qed] Goal typed_BinaryMultiplication_loop_variant_positive : Valid +[wp] Proved goals: 17 / 17 + Qed: 4 + alt-ergo: 13 [wp] Report in: 'tests/wp_gallery/oracle_qualif/binary-multiplication.0.report.json' [wp] Report out: 'tests/wp_gallery/result_qualif/binary-multiplication.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success -Axiomatic mult 1 - 3 100% +Axiomatic mult 1 - 4 100% ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -BinaryMultiplication 2 - 11 100% +BinaryMultiplication 3 - 13 100% ------------------------------------------------------------- [wp] Running WP plugin... [rte] annotating function BinaryMultiplication -[wp] 14 goals scheduled +[wp] 17 goals scheduled [wp] [alt-ergo] Goal typed_lemma_ax4_ok : Valid [wp] [alt-ergo] Goal typed_lemma_ax5_ok : Valid +[wp] [alt-ergo] Goal typed_lemma_ax7_ok : Valid [wp] [Qed] Goal typed_lemma_sizeof_ok_ok : Valid [wp] [alt-ergo] Goal typed_BinaryMultiplication_ensures_product : Valid [wp] [alt-ergo] Goal typed_BinaryMultiplication_assert_a1_ok_deductible : Valid [wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_invariant_inv1_ok_preserved : Valid [wp] [Qed] Goal typed_BinaryMultiplication_loop_invariant_inv1_ok_established : Valid -[wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_invariant_inv2_ok_deductible_preserved : Valid -[wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_invariant_inv2_ok_deductible_established : Valid +[wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_invariant_inv2_ok_preserved : Valid +[wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_invariant_inv2_ok_established : Valid [wp] [alt-ergo] Goal typed_BinaryMultiplication_assert_a2_ok : Valid [wp] [alt-ergo] Goal typed_BinaryMultiplication_assert_a3_ok : Valid +[wp] [alt-ergo] Goal typed_BinaryMultiplication_assert_a4_ok : Valid +[wp] [alt-ergo] Goal typed_BinaryMultiplication_assert_a5_ok : Valid [wp] [Qed] Goal typed_BinaryMultiplication_loop_assigns : Valid [wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_variant_decrease : Valid -[wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_variant_positive : Valid -[wp] Proved goals: 11 / 14 +[wp] [Qed] Goal typed_BinaryMultiplication_loop_variant_positive : Valid +[wp] Proved goals: 13 / 17 Qed: 0 - alt-ergo: 11 + alt-ergo: 13 [wp] Report in: 'tests/wp_gallery/oracle_qualif/binary-multiplication.0.report.json' [wp] Report out: 'tests/wp_gallery/result_qualif/binary-multiplication.0.report.json' ------------------------------------------------------------- Axiomatics WP Alt-Ergo Total Success -Axiomatic mult 1 - 3 100% +Axiomatic mult 1 - 4 100% ------------------------------------------------------------- Functions WP Alt-Ergo Total Success -BinaryMultiplication 2 - 11 100% +BinaryMultiplication 3 - 13 100% ------------------------------------------------------------- -- GitLab From 243505f6416e8c930602155c60cb7061087cc298 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Tue, 23 Apr 2019 15:36:00 +0200 Subject: [PATCH 300/376] [INSTALL] changes into step 3 & 4 about why3 and coq (both are for Frama-C/WP) --- INSTALL.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 79d1793add0..a8bb6255251 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -168,13 +168,12 @@ We recommend to rely on it for the installation of Frama-C. ```shell brew install graphviz - opam install why3 ``` 4. Install *optional* dependencies for Frama-C/WP: ```shell - opam install coq coqide + opam install coq coqide why3 why3-coq ``` 5. Install Frama-C: -- GitLab From 475b04dabacda0a4c96b1e1e60e9957034ab9099 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Tue, 23 Apr 2019 15:48:05 +0200 Subject: [PATCH 301/376] [INSTALL] changes into step 3 & 4 about why3 and coq (both are for Frama-C/WP) --- INSTALL.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index a8bb6255251..1aee10e1768 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -168,12 +168,13 @@ We recommend to rely on it for the installation of Frama-C. ```shell brew install graphviz + opam install why3 ``` 4. Install *optional* dependencies for Frama-C/WP: ```shell - opam install coq coqide why3 why3-coq + opam install coq coqide why3-coq ``` 5. Install Frama-C: -- GitLab From 1638067eeb28d57bfb168bb84a23a59fcd409f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 24 Apr 2019 10:18:23 +0200 Subject: [PATCH 302/376] [wp] detect prover from why3 api --- headers/header_spec.txt | 4 ++ src/plugins/wp/.gitignore | 3 +- src/plugins/wp/Makefile.in | 31 +++++++++++++-- src/plugins/wp/ProverDetect.None.ml | 37 ++++++++++++++++++ src/plugins/wp/ProverDetect.Why3.ml | 60 +++++++++++++++++++++++++++++ src/plugins/wp/ProverDetect.mli | 36 +++++++++++++++++ src/plugins/wp/VCS.ml | 8 +--- src/plugins/wp/VCS.mli | 1 - src/plugins/wp/configure.ac | 14 +++++++ src/plugins/wp/register.ml | 34 ++++++++++------ 10 files changed, 205 insertions(+), 23 deletions(-) create mode 100644 src/plugins/wp/ProverDetect.None.ml create mode 100644 src/plugins/wp/ProverDetect.Why3.ml create mode 100644 src/plugins/wp/ProverDetect.mli diff --git a/headers/header_spec.txt b/headers/header_spec.txt index 349e71dd3c5..f7e28e82c3f 100644 --- a/headers/header_spec.txt +++ b/headers/header_spec.txt @@ -1430,6 +1430,10 @@ src/plugins/wp/ProofScript.ml: CEA_WP src/plugins/wp/ProofScript.mli: CEA_WP src/plugins/wp/ProverCoq.ml: CEA_WP src/plugins/wp/ProverCoq.mli: CEA_WP +src/plugins/wp/ProverDetect.ml: CEA_WP +src/plugins/wp/ProverDetect.mli: CEA_WP +src/plugins/wp/ProverDetect.Why3.ml: CEA_WP +src/plugins/wp/ProverDetect.None.ml: CEA_WP src/plugins/wp/ProverErgo.ml: CEA_WP src/plugins/wp/ProverErgo.mli: CEA_WP src/plugins/wp/ProverScript.ml: CEA_WP diff --git a/src/plugins/wp/.gitignore b/src/plugins/wp/.gitignore index 64d57997994..10f95c8dc39 100644 --- a/src/plugins/wp/.gitignore +++ b/src/plugins/wp/.gitignore @@ -3,12 +3,13 @@ /.make-wp-why3 /Wp.mli +/gui/Wp.mli /.WP_API_GENERATED /driver.ml /rformat.ml /script.ml /why3_xml.ml -/gui/Wp.mli +/ProverDetect.ml /tests/ptests_config /tests/*/result diff --git a/src/plugins/wp/Makefile.in b/src/plugins/wp/Makefile.in index 2a924fd195d..7f810fa98db 100644 --- a/src/plugins/wp/Makefile.in +++ b/src/plugins/wp/Makefile.in @@ -34,8 +34,10 @@ ifneq ("$(FRAMAC_INTERNAL)","yes") include $(FRAMAC_SHARE)/Makefile.config endif -# Coq Resources Installation +# Why3 API Available +WHY3API=@WHY3API@ +# Coq Resources Installation include $(PLUGIN_DIR)/share/Makefile.resources # Extension of the GUI for wp is compilable @@ -87,7 +89,8 @@ PLUGIN_CMO:= \ TacCongruence TacOverflow Auto \ ProofSession ProofScript ProofEngine \ why3_xml \ - ProverTask ProverErgo ProverCoq ProverWhy3 ProverWhy3ide \ + ProverTask ProverErgo ProverCoq \ + ProverDetect ProverWhy3 ProverWhy3ide \ driver prover ProverSearch ProverScript \ Generator Factory \ calculus cfgDump cfgWP \ @@ -100,7 +103,13 @@ PLUGIN_GENERATED:= \ $(PLUGIN_DIR)/rformat.ml \ $(PLUGIN_DIR)/driver.ml \ $(PLUGIN_DIR)/why3_xml.ml \ + $(PLUGIN_DIR)/ProverDetect.ml \ $(PLUGIN_DIR)/Wp.mli + +ifeq ($(WHY3API),yes) +PLUGIN_REQUIRES:= why3 +endif + PLUGIN_DEPENDENCIES:= rtegen qed PLUGIN_UNDOC+= PLUGIN_INTRO:=$(PLUGIN_DIR)/intro_wp.txt @@ -281,6 +290,23 @@ wp-coq-uninstall: @rm -f $(FRAMAC_DATADIR)/wp/coqwp/*.vo @rm -f $(FRAMAC_DATADIR)/wp/coqwp/*/*.vo +# -------------------------------------------------------------------------- +# --- Provers Detection +# -------------------------------------------------------------------------- + +$(Wp_DIR)/ProverDetect.ml: config.status $(Wp_DIR)/Makefile.in + +ifeq ($(WHY3API),yes) +$(Wp_DIR)/ProverDetect.ml: $(Wp_DIR)/ProverDetect.Why3.ml + $(PRINT_MAKING) "$@ (why3)" + @cp -f $< $@ + $(CHMOD_RO) $@ +else +$(Wp_DIR)/ProverDetect.ml: $(Wp_DIR)/ProverDetect.None.ml + $(PRINT_MAKING) "$@ (none)" + @cp -f $< $@ + $(CHMOD_RO) $@ +endif # -------------------------------------------------------------------------- # --- Why3 configuration @@ -303,7 +329,6 @@ $(Wp_DIR)/share/why3/why3.conf: @printf "option=\"--eval \\\\\"(setq coq-load-path (cons '(\\\\\\\\\\\\\"$(FRAMAC_DATADIR)/wp/why3\\\\\\\\\\\\\" \\\\\\\\\\\\\"\\\\\\\\\\\\\") coq-load-path))\\\\\"\"\n" >> $@ @chmod u-w $@ - # -------------------------------------------------------------------------- # --- Installation --- # -------------------------------------------------------------------------- diff --git a/src/plugins/wp/ProverDetect.None.ml b/src/plugins/wp/ProverDetect.None.ml new file mode 100644 index 00000000000..0efa02d3015 --- /dev/null +++ b/src/plugins/wp/ProverDetect.None.ml @@ -0,0 +1,37 @@ +# 1 "src/plugins/wp/ProverDetect.None.ml" +(**************************************************************************) +(* *) +(* This file is part of WP plug-in of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat a l'energie atomique et aux energies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + +(* -------------------------------------------------------------------------- *) +(* --- Prover Detection (no why3) --- *) +(* -------------------------------------------------------------------------- *) + +type dp = { + dp_name : string ; + dp_version : string ; + dp_altern : string ; + dp_shortcuts : string list ; +} + +let detect () = [] + +(**************************************************************************) diff --git a/src/plugins/wp/ProverDetect.Why3.ml b/src/plugins/wp/ProverDetect.Why3.ml new file mode 100644 index 00000000000..08f246fad4f --- /dev/null +++ b/src/plugins/wp/ProverDetect.Why3.ml @@ -0,0 +1,60 @@ +# 1 "src/plugins/wp/ProverDetect.Why3.ml" +(**************************************************************************) +(* *) +(* This file is part of WP plug-in of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat a l'energie atomique et aux energies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + +(* -------------------------------------------------------------------------- *) +(* --- Why3 Prover Detection --- *) +(* -------------------------------------------------------------------------- *) + +type dp = { + dp_name : string ; + dp_version : string ; + dp_altern : string ; + dp_shortcuts : string list ; +} + +open Why3 +open Wstdlib +open Whyconf + +let detect () = + let config = Whyconf.read_config None in + let provers = Whyconf.get_prover_shortcuts config in + let index = ref Mprover.empty in + Mstr.iter + (fun key dp -> + let keys = Mprover.find_def [] dp !index in + index := Mprover.add dp (key::keys) !index) + provers ; + let dps = + Mprover.fold + (fun dp keys dps -> + { + dp_name = dp.prover_name ; + dp_version = dp.prover_version ; + dp_altern = dp.prover_altern ; + dp_shortcuts = List.rev keys ; + } :: dps + ) !index [] + in List.rev dps + +(**************************************************************************) diff --git a/src/plugins/wp/ProverDetect.mli b/src/plugins/wp/ProverDetect.mli new file mode 100644 index 00000000000..14630cc1e6e --- /dev/null +++ b/src/plugins/wp/ProverDetect.mli @@ -0,0 +1,36 @@ +(**************************************************************************) +(* *) +(* This file is part of WP plug-in of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat a l'energie atomique et aux energies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + +(* -------------------------------------------------------------------------- *) +(** Why3 Prover Detection *) +(* -------------------------------------------------------------------------- *) + +type dp = { + dp_name : string ; + dp_version : string ; + dp_altern : string ; + dp_shortcuts : string list ; +} + +val detect : unit -> dp list + +(**************************************************************************) diff --git a/src/plugins/wp/VCS.ml b/src/plugins/wp/VCS.ml index a06e4d093dd..f1b22877570 100644 --- a/src/plugins/wp/VCS.ml +++ b/src/plugins/wp/VCS.ml @@ -72,6 +72,7 @@ let name_of_prover = function let title_of_prover = function | Why3ide -> "Why3" + | Why3 "alt-ergo" -> "altergo" | Why3 s -> s | AltErgo -> "Alt-Ergo" | Coq -> "Coq" @@ -105,13 +106,6 @@ let filename_for_prover = function | Qed -> "Qed" | Tactical -> "Tactical" -let language_of_name = function - | "" | "none" -> None - | "alt-ergo" | "altgr-ergo" -> Some L_altergo - | "coq" | "coqide"-> Some L_coq - | "why" -> Some L_why3 - | s -> Wp_parameters.abort "Language '%s' unknown" s - let language_of_prover = function | Why3 _ -> L_why3 | Why3ide -> L_why3 diff --git a/src/plugins/wp/VCS.mli b/src/plugins/wp/VCS.mli index 7bdf8aa1df5..9357b0bcc94 100644 --- a/src/plugins/wp/VCS.mli +++ b/src/plugins/wp/VCS.mli @@ -52,7 +52,6 @@ module Pset : Set.S with type elt = prover module Pmap : Map.S with type key = prover val language_of_prover : prover -> language -val language_of_name : string -> language option val name_of_prover : prover -> string val title_of_prover : prover -> string val filename_for_prover : prover -> string diff --git a/src/plugins/wp/configure.ac b/src/plugins/wp/configure.ac index 1fbe972d797..dcdb934f56e 100644 --- a/src/plugins/wp/configure.ac +++ b/src/plugins/wp/configure.ac @@ -109,6 +109,20 @@ if test "$ENABLE_WP" != "no"; then fi AC_SUBST(WHY3COQC) + ## Configuring for WHY3-API + WHY3API_VERSION=$($OCAMLFIND query why3 -format %v) + case $WHY3API_VERSION in + 1.*) + AC_MSG_RESULT(why3 api $WHY3API_VERSION found) + WHY3API="yes" + ;; + *) + AC_MSG_RESULT(why3 api not found (no why3-provers)) + WHY3API="no" + ;; + esac + AC_SUBST(WHY3API) + fi write_plugin_config(Makefile) diff --git a/src/plugins/wp/register.ml b/src/plugins/wp/register.ml index 62ce27941da..e447b0ed84c 100644 --- a/src/plugins/wp/register.ml +++ b/src/plugins/wp/register.ml @@ -843,17 +843,29 @@ let () = Cmdline.run_after_setting_files let do_prover_detect () = if not !Config.is_gui && Wp_parameters.Detect.get () then - ProverWhy3.detect_why3 - begin function - | None -> Wp_parameters.error ~current:false "Why3 not found" - | Some dps -> - List.iter - (fun dp -> - let open ProverWhy3 in - Wp_parameters.result "Prover %10s %-10s [%s]" - dp.dp_name dp.dp_version dp.dp_prover - ) dps - end + begin + let open ProverDetect in + let dps = detect () in + let pp_altern fmt a = if a<>"" then Format.fprintf fmt " (%s)" a in + let pp_shortcut fmt = function + | ("alt-ergo" | "coq" | "tip" | "script") as p -> + Format.fprintf fmt "why3:%s" p + | p -> Format.pp_print_string fmt p in + let pp_shortcuts = + Pretty_utils.pp_list ~pre:"[" ~sep:"," ~suf:"]" ~empty:"(disabled)" + pp_shortcut in + let pp_prover fmt dp = + Format.fprintf fmt "%s %s%a %a" + dp.dp_name dp.dp_version + pp_altern dp.dp_altern + pp_shortcuts dp.dp_shortcuts in + let pp_provers fmt dps = + List.iter (Format.fprintf fmt "@\n - %a" pp_prover) dps in + if dps = [] then + Wp_parameters.result "No Why3 provers detected." + else + Wp_parameters.result "Why3 provers detected:%a" pp_provers dps + end (* ------------------------------------------------------------------------ *) (* --- Main Entry Point --- *) -- GitLab From 7912b6f5ee04c5b5dc02771e7e789f2ef0b61303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 24 Apr 2019 11:52:09 +0200 Subject: [PATCH 303/376] [wp] fix headers & lint --- src/plugins/wp/ProverDetect.None.ml | 3 ++- src/plugins/wp/ProverDetect.Why3.ml | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/wp/ProverDetect.None.ml b/src/plugins/wp/ProverDetect.None.ml index 0efa02d3015..771dbba1b78 100644 --- a/src/plugins/wp/ProverDetect.None.ml +++ b/src/plugins/wp/ProverDetect.None.ml @@ -1,4 +1,3 @@ -# 1 "src/plugins/wp/ProverDetect.None.ml" (**************************************************************************) (* *) (* This file is part of WP plug-in of Frama-C. *) @@ -21,6 +20,8 @@ (* *) (**************************************************************************) +# 23 "src/plugins/wp/ProverDetect.None.ml" + (* -------------------------------------------------------------------------- *) (* --- Prover Detection (no why3) --- *) (* -------------------------------------------------------------------------- *) diff --git a/src/plugins/wp/ProverDetect.Why3.ml b/src/plugins/wp/ProverDetect.Why3.ml index 08f246fad4f..ff6b33c6495 100644 --- a/src/plugins/wp/ProverDetect.Why3.ml +++ b/src/plugins/wp/ProverDetect.Why3.ml @@ -1,4 +1,3 @@ -# 1 "src/plugins/wp/ProverDetect.Why3.ml" (**************************************************************************) (* *) (* This file is part of WP plug-in of Frama-C. *) @@ -21,6 +20,8 @@ (* *) (**************************************************************************) +# 23 "src/plugins/wp/ProverDetect.Why3.ml" + (* -------------------------------------------------------------------------- *) (* --- Why3 Prover Detection --- *) (* -------------------------------------------------------------------------- *) @@ -53,7 +54,7 @@ let detect () = dp_version = dp.prover_version ; dp_altern = dp.prover_altern ; dp_shortcuts = List.rev keys ; - } :: dps + } :: dps ) !index [] in List.rev dps -- GitLab From ca7f9200521590ecaf500a486673b83b2bc6ba51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 24 Apr 2019 12:53:36 +0200 Subject: [PATCH 304/376] [wp] refactor why3 dp --- src/plugins/wp/ProverDetect.None.ml | 9 +--- src/plugins/wp/ProverDetect.Why3.ml | 9 +--- src/plugins/wp/ProverDetect.mli | 9 +--- src/plugins/wp/ProverWhy3.ml | 72 +---------------------------- src/plugins/wp/ProverWhy3.mli | 19 ++------ src/plugins/wp/VCS.ml | 31 +++++++++++++ src/plugins/wp/VCS.mli | 24 ++++++++-- src/plugins/wp/register.ml | 18 ++------ 8 files changed, 62 insertions(+), 129 deletions(-) diff --git a/src/plugins/wp/ProverDetect.None.ml b/src/plugins/wp/ProverDetect.None.ml index 771dbba1b78..6520404f80c 100644 --- a/src/plugins/wp/ProverDetect.None.ml +++ b/src/plugins/wp/ProverDetect.None.ml @@ -26,13 +26,6 @@ (* --- Prover Detection (no why3) --- *) (* -------------------------------------------------------------------------- *) -type dp = { - dp_name : string ; - dp_version : string ; - dp_altern : string ; - dp_shortcuts : string list ; -} - -let detect () = [] +let detect () : VCS.dp list = [] (**************************************************************************) diff --git a/src/plugins/wp/ProverDetect.Why3.ml b/src/plugins/wp/ProverDetect.Why3.ml index ff6b33c6495..c2b6d1ac564 100644 --- a/src/plugins/wp/ProverDetect.Why3.ml +++ b/src/plugins/wp/ProverDetect.Why3.ml @@ -26,13 +26,6 @@ (* --- Why3 Prover Detection --- *) (* -------------------------------------------------------------------------- *) -type dp = { - dp_name : string ; - dp_version : string ; - dp_altern : string ; - dp_shortcuts : string list ; -} - open Why3 open Wstdlib open Whyconf @@ -49,7 +42,7 @@ let detect () = let dps = Mprover.fold (fun dp keys dps -> - { + VCS.{ dp_name = dp.prover_name ; dp_version = dp.prover_version ; dp_altern = dp.prover_altern ; diff --git a/src/plugins/wp/ProverDetect.mli b/src/plugins/wp/ProverDetect.mli index 14630cc1e6e..7a2cba28ff0 100644 --- a/src/plugins/wp/ProverDetect.mli +++ b/src/plugins/wp/ProverDetect.mli @@ -24,13 +24,6 @@ (** Why3 Prover Detection *) (* -------------------------------------------------------------------------- *) -type dp = { - dp_name : string ; - dp_version : string ; - dp_altern : string ; - dp_shortcuts : string list ; -} - -val detect : unit -> dp list +val detect : unit -> VCS.dp list (**************************************************************************) diff --git a/src/plugins/wp/ProverWhy3.ml b/src/plugins/wp/ProverWhy3.ml index a40c44aecb8..38e73ded32b 100644 --- a/src/plugins/wp/ProverWhy3.ml +++ b/src/plugins/wp/ProverWhy3.ml @@ -612,74 +612,4 @@ let prove_prop ~timeout ~prover ~wpo = let prove ?timeout ~prover wpo = Task.todo (fun () -> prove_prop ~timeout ~wpo ~prover) -(* -------------------------------------------------------------------------- *) -(* --- Why3-Config --- *) -(* -------------------------------------------------------------------------- *) - -type dp = { - dp_name : string ; - dp_version : string ; - dp_prover : string ; -} - -let prover dp = Why3 dp.dp_prover - -let find name dps = - try List.find (fun d -> d.dp_prover = name) dps - with Not_found -> - let name = Transitioning.String.lowercase_ascii name in - try - List.find - (fun d -> Transitioning.String.lowercase_ascii d.dp_name = name) dps - with Not_found -> - { dp_prover = name ; dp_name = name ; dp_version = "default" } - -let parse spec = - try - let k = String.index spec ':' in - let dp_name = String.sub spec 0 k in - let dp_version = String.sub spec (succ k) (String.length spec - k - 1) - |> String.map (fun c -> if c =':' then ' ' else c) in - { dp_prover = spec ; dp_name ; dp_version } - with Not_found -> - { dp_prover = spec ; dp_name = spec ; dp_version = "default" } - -let pe_prover = Str.regexp "\\([^ ]+\\) (\\([^)]+\\))" - -class why3detect job = - object(why) - - inherit ProverTask.command "why3" - - val mutable dps = [] - - method result st = - job (if st = 0 then Some (List.rev dps) else None) - - method prover p = - begin - let dp_name = p#get_string 1 in - let dp_version = p#get_string 2 in - Wp_parameters.debug ~level:1 - "Prover %S, version %s detected." dp_name dp_version ; - let dp_prover = Printf.sprintf "%s:%s" dp_name dp_version - |> String.map - (fun c -> if c = ' ' || c = ',' then ':' else c) in - dps <- { dp_name ; dp_version ; dp_prover } :: dps - end - - method detect : unit task = - begin - why#add [ "--list-provers" ] ; - why#validate_pattern ~repeat:true ~logs:`OUT pe_prover why#prover ; - why#run ~echo:true () >>= Task.call why#result - end - - end - -let detect_why3 job = - let task = (new why3detect job)#detect in - Task.run (Task.thread task) - -let detect_provers job = - detect_why3 (function None -> job [] | Some dps -> job dps) +(* ------------------------------------------------------------------------- *) diff --git a/src/plugins/wp/ProverWhy3.mli b/src/plugins/wp/ProverWhy3.mli index bab64eec2e2..d6a9f5bc755 100644 --- a/src/plugins/wp/ProverWhy3.mli +++ b/src/plugins/wp/ProverWhy3.mli @@ -39,22 +39,7 @@ val assemble_goal: Wpo.t -> (string list (* includes *) * goal) option val prove : ?timeout:int -> prover:string -> Wpo.t -> result task (** The string must be a valid why3 prover identifier - Return NoResult if it is already proved by Qed -*) - -type dp = { - dp_name : string ; - dp_version : string ; - dp_prover : string ; -} - -val prover : dp -> prover - -val detect_why3 : (dp list option -> unit) -> unit -val detect_provers : (dp list -> unit) -> unit - -val find : string -> dp list -> dp -val parse : string -> dp + Return NoResult if it is already proved by Qed *) (* -------------------------------------------------------------------------- *) (* --- Why3 Multi-Theorem Prover --- *) @@ -66,3 +51,5 @@ sig val compare : t -> t -> int val pretty : Format.formatter -> t -> unit end + +(* -------------------------------------------------------------------------- *) diff --git a/src/plugins/wp/VCS.ml b/src/plugins/wp/VCS.ml index f1b22877570..37fea1aa59e 100644 --- a/src/plugins/wp/VCS.ml +++ b/src/plugins/wp/VCS.ml @@ -170,6 +170,37 @@ module P = struct type t = prover let compare = cmp_prover end module Pset = Set.Make(P) module Pmap = Map.Make(P) +(* -------------------------------------------------------------------------- *) +(* --- Why3 Provers --- *) +(* -------------------------------------------------------------------------- *) + +type dp = { + dp_name : string ; + dp_version : string ; + dp_altern : string ; + dp_shortcuts : string list ; +} + +let pp_altern fmt a = if a<>"" then Format.fprintf fmt " (%s)" a + +let pp_shortcut fmt = function + | ("alt-ergo" | "coq" | "tip" | "script") as p -> + Format.fprintf fmt "why3:%s" p + | p -> Format.pp_print_string fmt p + +let pp_shortcuts = + Pretty_utils.pp_list ~pre:"[" ~sep:"," ~suf:"]" ~empty:"(disabled)" + pp_shortcut + +let pretty fmt dp = + Format.fprintf fmt "%s %s%a" + dp.dp_name dp.dp_version + pp_altern dp.dp_altern + +let prover_of_dp = function + | { dp_shortcuts = key::_ } -> Why3 key + | _ -> Why3 "none" + (* -------------------------------------------------------------------------- *) (* --- Config --- *) (* -------------------------------------------------------------------------- *) diff --git a/src/plugins/wp/VCS.mli b/src/plugins/wp/VCS.mli index 9357b0bcc94..7d9eb27c8d2 100644 --- a/src/plugins/wp/VCS.mli +++ b/src/plugins/wp/VCS.mli @@ -44,10 +44,6 @@ type language = | L_coq | L_altergo -(* -------------------------------------------------------------------------- *) -(* --- Prover Names --- *) -(* -------------------------------------------------------------------------- *) - module Pset : Set.S with type elt = prover module Pmap : Map.S with type key = prover @@ -66,9 +62,29 @@ val pp_mode : Format.formatter -> mode -> unit val cmp_prover : prover -> prover -> int +(* -------------------------------------------------------------------------- *) +(** {2 Why3 Provers} *) +(* -------------------------------------------------------------------------- *) + +type dp = { + dp_name : string ; + dp_version : string ; + dp_altern : string ; + dp_shortcuts : string list ; +} + +val prover_of_dp : dp -> prover + +(** Without shortcuts *) +val pretty : Format.formatter -> dp -> unit +val pp_shortcut : Format.formatter -> string -> unit +val pp_shortcuts : Format.formatter -> string list -> unit + +(* -------------------------------------------------------------------------- *) (** {2 Config} [None] means current WP option default. [Some 0] means prover default. *) +(* -------------------------------------------------------------------------- *) type config = { valid : bool ; diff --git a/src/plugins/wp/register.ml b/src/plugins/wp/register.ml index e447b0ed84c..ad824c977d6 100644 --- a/src/plugins/wp/register.ml +++ b/src/plugins/wp/register.ml @@ -846,21 +846,11 @@ let do_prover_detect () = begin let open ProverDetect in let dps = detect () in - let pp_altern fmt a = if a<>"" then Format.fprintf fmt " (%s)" a in - let pp_shortcut fmt = function - | ("alt-ergo" | "coq" | "tip" | "script") as p -> - Format.fprintf fmt "why3:%s" p - | p -> Format.pp_print_string fmt p in - let pp_shortcuts = - Pretty_utils.pp_list ~pre:"[" ~sep:"," ~suf:"]" ~empty:"(disabled)" - pp_shortcut in - let pp_prover fmt dp = - Format.fprintf fmt "%s %s%a %a" - dp.dp_name dp.dp_version - pp_altern dp.dp_altern - pp_shortcuts dp.dp_shortcuts in let pp_provers fmt dps = - List.iter (Format.fprintf fmt "@\n - %a" pp_prover) dps in + List.iter (fun dp -> + Format.fprintf fmt "@\n - %a %a" + VCS.pretty dp VCS.pp_shortcuts dp.VCS.dp_shortcuts + ) dps in if dps = [] then Wp_parameters.result "No Why3 provers detected." else -- GitLab From 0b2919d0df3f01be3d5797c7273cffe449e807dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 24 Apr 2019 13:32:50 +0200 Subject: [PATCH 305/376] [wp/gui] new dp selection --- src/plugins/wp/GuiConfig.ml | 124 +++++++++++++-------------------- src/plugins/wp/GuiConfig.mli | 18 +++-- src/plugins/wp/GuiGoal.ml | 12 ++-- src/plugins/wp/GuiGoal.mli | 2 +- src/plugins/wp/GuiList.ml | 19 ++--- src/plugins/wp/GuiList.mli | 2 +- src/plugins/wp/GuiNavigator.ml | 6 +- src/plugins/wp/GuiPanel.ml | 4 +- src/plugins/wp/GuiPanel.mli | 4 +- 9 files changed, 80 insertions(+), 111 deletions(-) diff --git a/src/plugins/wp/GuiConfig.ml b/src/plugins/wp/GuiConfig.ml index 3b3a7c4f43e..08942acae89 100644 --- a/src/plugins/wp/GuiConfig.ml +++ b/src/plugins/wp/GuiConfig.ml @@ -20,31 +20,43 @@ (* *) (**************************************************************************) -open ProverWhy3 +open VCS (* ------------------------------------------------------------------------ *) (* --- Prover List in Configuration --- *) (* ------------------------------------------------------------------------ *) -class provers config = +class available () = object(self) - inherit [dp list] Wutil.selector [] + val mutable dps = [] + method get = dps + method detect = + try dps <- ProverDetect.detect () + with exn -> + Wp_parameters.error "Why3 detection error:@\n%s" + (Printexc.to_string exn) + initializer self#detect + end + +class enabled key = + object(self) + inherit [string list] Wutil.selector [] method private load () = let open Gtk_helper.Configuration in let rec collect w = function - | ConfString s -> ProverWhy3.parse s :: w + | ConfString s -> s :: w | ConfList fs -> List.fold_left collect w fs | _ -> w in try - let data = Gtk_helper.Configuration.find config in + let data = Gtk_helper.Configuration.find key in self#set (List.rev (collect [] data)) with Not_found -> () method private save () = let open Gtk_helper.Configuration in - Gtk_helper.Configuration.set config - (ConfList (List.map (fun dp -> ConfString dp.dp_prover) self#get)) + Gtk_helper.Configuration.set key + (ConfList (List.map (fun s -> ConfString s) self#get)) initializer begin @@ -60,8 +72,8 @@ class provers config = class dp_chooser ~(main:Design.main_window_extension_points) - ~(available:provers) - ~(enabled:provers) + ~(available:available) + ~(enabled:enabled) = let dialog = new Wpane.dialog ~title:"Why3 Provers" @@ -70,7 +82,7 @@ class dp_chooser let array = new Wpane.warray () in object(self) - val mutable provers = [] + val mutable selected = [] method private enable dp e = let rec hook dp e = function @@ -78,10 +90,10 @@ class dp_chooser | head :: tail -> if fst head = dp then (dp,e) :: tail else head :: hook dp e tail - in provers <- hook dp e provers + in selected <- hook dp e selected method private lookup dp = - try List.assoc dp provers + try List.assoc dp selected with Not_found -> false method private entry dp = @@ -101,24 +113,30 @@ class dp_chooser method private configure dps = begin - available#set dps ; array#set dps ; - provers <- List.map (fun dp -> dp , self#lookup dp) dps ; array#update () ; end - method private detect () = ProverWhy3.detect_provers self#configure + method private detect () = + begin + available#detect ; + self#configure available#get ; + end - method private select () = - let dps = List.fold_right - (fun (dp,e) dps -> if e then dp :: dps else dps) - provers [] - in enabled#set dps + method private apply () = + let rec choose = function + | ({dp_shortcuts=key::_},true)::dps -> key :: choose dps + | _::dps -> choose dps + | [] -> [] + in enabled#set (choose selected) method run () = - available#send self#configure () ; - List.iter (fun dp -> self#enable dp true) enabled#get ; - array#update () ; + let dps = available#get in + let sel = enabled#get in + selected <- List.map + (fun dp -> dp,List.exists (fun k -> List.mem k sel) dp.dp_shortcuts) + dps ; + self#configure dps ; dialog#run () initializer @@ -128,7 +146,7 @@ class dp_chooser dialog#button ~action:(`APPLY) ~label:"Apply" () ; array#set_entry self#entry ; dialog#add_block array#coerce ; - dialog#on_value `APPLY self#select ; + dialog#on_value `APPLY self#apply ; end end @@ -137,6 +155,8 @@ class dp_chooser (* --- WP Prover Switch Panel --- *) (* ------------------------------------------------------------------------ *) +[@@@ warning "-37-27"] + type mprover = | NoProver | AltErgo @@ -144,7 +164,7 @@ type mprover = | Why3ide | Why3 of dp -class dp_button ~(available:provers) ~(enabled:provers) = +class dp_button ~(available:available) ~(enabled:enabled) = let render = function | NoProver -> "None" | AltErgo -> "Alt-Ergo (native)" @@ -159,65 +179,15 @@ class dp_button ~(available:provers) ~(enabled:provers) = method widget = (self :> Widget.t) method set_enabled = button#set_enabled method set_visible = button#set_visible - - method private import = - match Wp_parameters.Provers.get () with - | [] -> () - | spec :: _ -> - match VCS.prover_of_name spec with - | Some (VCS.Why3 p) -> - let dps = available#get in - let dp = ProverWhy3.find p dps in - if not (List.mem dp dps) then available#set (dps @ [dp]) ; - let en = dp :: enabled#get in - enabled#set - (List.filter (fun q -> List.mem q en) available#get) - | _ -> () - - method private set_provers dps = - button#set_items (items @ List.map (fun dp -> Why3 dp) dps) - - method private get_selection = function - | NoProver -> "none" - | AltErgo -> "alt-ergo" - | Coq -> "coqide" - | Why3ide -> "why3ide" - | Why3 dp -> "why3:" ^ dp.dp_prover - - method private set_selection = function - | [] -> () - | spec :: _ -> - match VCS.prover_of_name spec with - | None | Some VCS.Qed | Some VCS.Tactical -> button#set NoProver - | Some VCS.AltErgo -> button#set AltErgo - | Some VCS.Coq -> button#set Coq - | Some VCS.Why3ide -> button#set Why3ide - | Some (VCS.Why3 spec) -> - let dp = ProverWhy3.find spec enabled#get in - button#set (Why3 dp) - - val mutable last = [] - val mutable init = true - method update () = begin - if init then self#import ; - let current = Wp_parameters.Provers.get () in - if current <> last then - self#set_selection (Wp_parameters.Provers.get ()) ; - last <- current ; - if init then - begin - self#set_provers enabled#get ; - enabled#connect self#set_provers ; - init <- false ; - end + Format.eprintf "BUTTON UPDATE@." ; end initializer begin button#connect - (fun mp -> Wp_parameters.Provers.set [self#get_selection mp]) ; + (fun _mp -> Format.eprintf "BUTTON SIGNAL@.") ; end end diff --git a/src/plugins/wp/GuiConfig.mli b/src/plugins/wp/GuiConfig.mli index 4bbb3b11ad1..eccd95b429d 100644 --- a/src/plugins/wp/GuiConfig.mli +++ b/src/plugins/wp/GuiConfig.mli @@ -24,21 +24,27 @@ (* --- WP Provers Configuration Panel --- *) (* ------------------------------------------------------------------------ *) -open ProverWhy3 +open VCS -class provers : string -> [dp list] Widget.selector +class available : unit -> + object + method detect : unit + method get : dp list + end + +class enabled : string -> [string list] Widget.selector class dp_chooser : main:Design.main_window_extension_points -> - available:provers -> - enabled:provers -> + available:available -> + enabled:enabled -> object method run : unit -> unit (** Edit enabled provers *) end class dp_button : - available:provers -> - enabled:provers -> + available:available -> + enabled:enabled -> object inherit Widget.widget method update : unit -> unit diff --git a/src/plugins/wp/GuiGoal.ml b/src/plugins/wp/GuiGoal.ml index eb3a8695830..49c0b752406 100644 --- a/src/plugins/wp/GuiGoal.ml +++ b/src/plugins/wp/GuiGoal.ml @@ -73,7 +73,7 @@ class iformat = (* --- Goal Panel --- *) (* -------------------------------------------------------------------------- *) -class pane (proverpane : GuiConfig.provers) = +class pane (enabled : GuiConfig.enabled) = let icon = new Widget.image GuiProver.no_status in let status = new Widget.label () in let text = new Wtext.text () in @@ -126,8 +126,8 @@ class pane (proverpane : GuiConfig.provers) = provers <- VCS.([ new GuiProver.prover ~console:text ~prover:AltErgo ] @ List.map - (fun dp -> new GuiProver.prover text (ProverWhy3.prover dp)) - proverpane#get) ; + (fun dp -> new GuiProver.prover text (Why3 dp)) + enabled#get) ; List.iter (fun p -> palette#add_tool p#tool) provers ; palette#add_tool strategies#tool ; Strategy.iter strategies#register ; @@ -137,11 +137,11 @@ class pane (proverpane : GuiConfig.provers) = tactics <- gtac :: tactics ; palette#add_tool gtac#tool) ; tactics <- List.rev tactics ; - self#register_provers proverpane#get ; + self#register_provers enabled#get ; printer#on_selection (fun () -> self#update) ; scripter#on_click self#goto ; scripter#on_backtrack self#backtrack ; - proverpane#connect self#register_provers ; + enabled#connect self#register_provers ; delete#connect (fun () -> self#interrupt ProofEngine.reset) ; cancel#connect (fun () -> self#interrupt ProofEngine.cancel) ; forward#connect (fun () -> self#forward) ; @@ -292,7 +292,7 @@ class pane (proverpane : GuiConfig.provers) = method private register_provers dps = begin (* register missing provers *) - let prvs = List.map ProverWhy3.prover dps in + let prvs = List.map (fun p -> VCS.Why3 p) dps in (* set visible provers *) List.iter (fun prover -> diff --git a/src/plugins/wp/GuiGoal.mli b/src/plugins/wp/GuiGoal.mli index fd60b80fa86..4e64a05983e 100644 --- a/src/plugins/wp/GuiGoal.mli +++ b/src/plugins/wp/GuiGoal.mli @@ -24,7 +24,7 @@ (* --- PO Details View --- *) (* -------------------------------------------------------------------------- *) -class pane : GuiConfig.provers -> +class pane : GuiConfig.enabled -> object method select : Wpo.t option -> unit diff --git a/src/plugins/wp/GuiList.ml b/src/plugins/wp/GuiList.ml index 9fa9f6a98f4..19e5a4fdd7e 100644 --- a/src/plugins/wp/GuiList.ml +++ b/src/plugins/wp/GuiList.ml @@ -72,7 +72,7 @@ let render_prover_result p = end | { verdict=r } , _ -> icon_of_verdict r -class pane (enabled:GuiConfig.provers) = +class pane (enabled:GuiConfig.enabled) = let model = new model in let list = new Wtable.list ~headers:true ~rules:true model#coerce in object(self) @@ -111,31 +111,26 @@ class pane (enabled:GuiConfig.provers) = method private create_prover p = begin let title = VCS.title_of_prover p in - let column = list#add_column_pixbuf ~title [] (render_prover_result p) in - if p <> VCS.Qed then provers <- (p,column) :: provers + let column = list#add_column_pixbuf ~title [] (render_prover_result p) + in if p <> VCS.Qed then provers <- (p,column) :: provers end method private configure dps = - let open ProverWhy3 in begin - let rec wanted p = function - | [] -> false - | dp :: dps -> dp.dp_prover = p || dp.dp_name = p || wanted p dps - in (* Removing Useless Columns *) List.iter (fun (vcs,column) -> match vcs with - | VCS.Why3 p when not (wanted p dps) -> + | VCS.Why3 p when not (List.mem p dps) -> ignore (list#view#remove_column column) | _ -> () ) provers ; (* Installing Missing Columns *) List.iter (fun dp -> - let p = VCS.Why3 dp.dp_prover in - match self#column_of_prover p with - | None -> self#create_prover p + let prv = VCS.Why3 dp in + match self#column_of_prover prv with + | None -> self#create_prover prv | Some _ -> () ) dps ; end diff --git a/src/plugins/wp/GuiList.mli b/src/plugins/wp/GuiList.mli index 7b34f43d5db..e3db77b28d1 100644 --- a/src/plugins/wp/GuiList.mli +++ b/src/plugins/wp/GuiList.mli @@ -24,7 +24,7 @@ (* --- PO List View --- *) (* -------------------------------------------------------------------------- *) -class pane : GuiConfig.provers -> +class pane : GuiConfig.enabled -> object method show : Wpo.t -> unit diff --git a/src/plugins/wp/GuiNavigator.ml b/src/plugins/wp/GuiNavigator.ml index 0b97d0de9e7..9173fa4b33b 100644 --- a/src/plugins/wp/GuiNavigator.ml +++ b/src/plugins/wp/GuiNavigator.ml @@ -406,10 +406,8 @@ let make (main : main_window_extension_points) = (* --- Provers --- *) (* -------------------------------------------------------------------------- *) - let available = new GuiConfig.provers "wp.available" in - let enabled = new GuiConfig.provers "wp.enabled" in - if Wp_parameters.Detect.get () then ProverWhy3.detect_provers available#set ; - + let available = new GuiConfig.available () in + let enabled = new GuiConfig.enabled "wp.enabled" in let dp_chooser = new GuiConfig.dp_chooser ~main ~available ~enabled in (* -------------------------------------------------------------------------- *) diff --git a/src/plugins/wp/GuiPanel.ml b/src/plugins/wp/GuiPanel.ml index d9ee8c78e5e..aa4f38bb5fd 100644 --- a/src/plugins/wp/GuiPanel.ml +++ b/src/plugins/wp/GuiPanel.ml @@ -192,8 +192,8 @@ let wp_update_script label () = let wp_panel ~(main:Design.main_window_extension_points) - ~(available_provers:GuiConfig.provers) - ~(enabled_provers:GuiConfig.provers) + ~(available_provers:GuiConfig.available) + ~(enabled_provers:GuiConfig.enabled) ~(configure_provers:unit -> unit) = let vbox = GPack.vbox () in diff --git a/src/plugins/wp/GuiPanel.mli b/src/plugins/wp/GuiPanel.mli index b5fe2af514a..8edd57e6ebf 100644 --- a/src/plugins/wp/GuiPanel.mli +++ b/src/plugins/wp/GuiPanel.mli @@ -31,6 +31,6 @@ val run_and_prove : val register : main:Design.main_window_extension_points -> - available_provers:GuiConfig.provers -> - enabled_provers:GuiConfig.provers -> + available_provers:GuiConfig.available -> + enabled_provers:GuiConfig.enabled -> configure_provers:(unit -> unit) -> unit -- GitLab From 9739a22a3ec8779b99d2e50f97e629b1144a2f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 24 Apr 2019 14:45:20 +0200 Subject: [PATCH 306/376] [wp/gui] fix prover selection --- src/plugins/wp/GuiConfig.ml | 80 +++++++++++++++++++++++----------- src/plugins/wp/GuiConfig.mli | 4 +- src/plugins/wp/GuiNavigator.ml | 2 +- src/plugins/wp/GuiPanel.ml | 9 ++-- src/plugins/wp/GuiPanel.mli | 1 - src/plugins/wp/VCS.ml | 8 ++-- 6 files changed, 64 insertions(+), 40 deletions(-) diff --git a/src/plugins/wp/GuiConfig.ml b/src/plugins/wp/GuiConfig.ml index 08942acae89..51eb58da116 100644 --- a/src/plugins/wp/GuiConfig.ml +++ b/src/plugins/wp/GuiConfig.ml @@ -50,8 +50,8 @@ class enabled key = | _ -> w in try let data = Gtk_helper.Configuration.find key in - self#set (List.rev (collect [] data)) - with Not_found -> () + List.rev (collect [] data) + with Not_found -> [] method private save () = let open Gtk_helper.Configuration in @@ -60,7 +60,10 @@ class enabled key = initializer begin - self#load () ; + let settings = self#load () in + let cmdline = Wp_parameters.Provers.get () in + let selection = List.sort_uniq String.compare (settings @ cmdline) in + self#set selection ; self#on_event self#save ; end @@ -97,7 +100,7 @@ class dp_chooser with Not_found -> false method private entry dp = - let text = Printf.sprintf "%s (%s)" dp.dp_name dp.dp_version in + let text = Pretty_utils.to_string VCS.pretty dp in let sw = new Widget.switch () in let lb = new Widget.label ~align:`Left ~text () in sw#set (self#lookup dp) ; @@ -155,39 +158,64 @@ class dp_chooser (* --- WP Prover Switch Panel --- *) (* ------------------------------------------------------------------------ *) -[@@@ warning "-37-27"] - type mprover = - | NoProver - | AltErgo - | Coq - | Why3ide - | Why3 of dp + | NONE + | ERGO + | COQ + | WHY of VCS.dp -class dp_button ~(available:available) ~(enabled:enabled) = +class dp_button ~(available:available) = let render = function - | NoProver -> "None" - | AltErgo -> "Alt-Ergo (native)" - | Coq -> "Coq (native,ide)" - | Why3ide -> "Why3 (ide)" - | Why3 dp -> Printf.sprintf "Why3: %s (%s)" dp.dp_name dp.dp_version + | NONE -> "(none)" + | ERGO -> "Alt-Ergo (native)" + | COQ -> "Coq (native)" + | WHY { dp_shortcuts = keys } when List.mem "alt-ergo" keys -> + "Alt-Ergo (why3)" + | WHY dp -> Pretty_utils.to_string VCS.pretty dp in + let select = function + | ERGO -> "alt-ergo" + | COQ -> "coq" + | WHY { dp_shortcuts=[] } | NONE -> "none" + | WHY { dp_shortcuts=key::_ } -> "why3:"^key in + let rec import = function + | [] -> ERGO + | spec::others -> + match VCS.prover_of_name spec with + | None | Some (Why3ide|Qed) -> NONE + | Some (AltErgo|Tactical) -> ERGO + | Some Coq -> COQ + | Some (Why3 s) -> + try + let dps = available#get in + WHY (List.find (fun dp -> List.mem s dp.dp_shortcuts) dps) + with Not_found -> import others in - let items = [ NoProver ; AltErgo ; Coq ; Why3ide ] in - let button = new Widget.menu ~default:AltErgo ~render ~items () in + let items = [ NONE ; ERGO ; COQ ] in + let button = new Widget.menu ~default:ERGO ~render ~items () in object(self) method coerce = button#coerce method widget = (self :> Widget.t) method set_enabled = button#set_enabled method set_visible = button#set_visible - method update () = - begin - Format.eprintf "BUTTON UPDATE@." ; - end - initializer + val mutable dps = [] + + method update () = + (* called in polling mode *) begin - button#connect - (fun _mp -> Format.eprintf "BUTTON SIGNAL@.") ; + let avl = available#get in + if avl != dps then + begin + dps <- avl ; + let items = [NONE;ERGO] @ List.map (fun p -> WHY p) dps @ [COQ] in + button#set_items items + end ; + let cur = Wp_parameters.Provers.get () |> import in + if cur <> button#get then button#set cur ; end + initializer button#connect + (fun s -> Wp_parameters.Provers.set [select s]) end + +(* ------------------------------------------------------------------------ *) diff --git a/src/plugins/wp/GuiConfig.mli b/src/plugins/wp/GuiConfig.mli index eccd95b429d..4022d25f93e 100644 --- a/src/plugins/wp/GuiConfig.mli +++ b/src/plugins/wp/GuiConfig.mli @@ -42,9 +42,7 @@ class dp_chooser : method run : unit -> unit (** Edit enabled provers *) end -class dp_button : - available:available -> - enabled:enabled -> +class dp_button : available:available -> object inherit Widget.widget method update : unit -> unit diff --git a/src/plugins/wp/GuiNavigator.ml b/src/plugins/wp/GuiNavigator.ml index 9173fa4b33b..28bb37c4c63 100644 --- a/src/plugins/wp/GuiNavigator.ml +++ b/src/plugins/wp/GuiNavigator.ml @@ -408,6 +408,7 @@ let make (main : main_window_extension_points) = let available = new GuiConfig.available () in let enabled = new GuiConfig.enabled "wp.enabled" in + let dp_chooser = new GuiConfig.dp_chooser ~main ~available ~enabled in (* -------------------------------------------------------------------------- *) @@ -502,7 +503,6 @@ let make (main : main_window_extension_points) = main#register_source_selector popup#register ; GuiPanel.register ~main ~available_provers:available - ~enabled_provers:enabled ~configure_provers:dp_chooser#run ; end diff --git a/src/plugins/wp/GuiPanel.ml b/src/plugins/wp/GuiPanel.ml index aa4f38bb5fd..8597f4fdf7a 100644 --- a/src/plugins/wp/GuiPanel.ml +++ b/src/plugins/wp/GuiPanel.ml @@ -193,7 +193,6 @@ let wp_update_script label () = let wp_panel ~(main:Design.main_window_extension_points) ~(available_provers:GuiConfig.available) - ~(enabled_provers:GuiConfig.enabled) ~(configure_provers:unit -> unit) = let vbox = GPack.vbox () in @@ -222,9 +221,7 @@ let wp_panel ~label:"Provers..." ~tooltip:"Detect WP Provers" () in prover_cfg#connect configure_provers ; form#add_label_widget prover_cfg#coerce ; - let prover_menu = new GuiConfig.dp_button - ~available:available_provers - ~enabled:enabled_provers in + let prover_menu = new GuiConfig.dp_button ~available:available_provers in form#add_field prover_menu#coerce ; Gtk_form.register demon prover_menu#update ; (* End Form *) @@ -317,8 +314,8 @@ let wp_panel "WP" , vbox#coerce , Some (Gtk_form.refresh demon) ; end -let register ~main ~available_provers ~enabled_provers ~configure_provers = +let register ~main ~available_provers ~configure_provers = main#register_panel - (fun main -> wp_panel ~main ~available_provers ~enabled_provers ~configure_provers) + (fun main -> wp_panel ~main ~available_provers ~configure_provers) (* -------------------------------------------------------------------------- *) diff --git a/src/plugins/wp/GuiPanel.mli b/src/plugins/wp/GuiPanel.mli index 8edd57e6ebf..e68cf891b88 100644 --- a/src/plugins/wp/GuiPanel.mli +++ b/src/plugins/wp/GuiPanel.mli @@ -32,5 +32,4 @@ val run_and_prove : val register : main:Design.main_window_extension_points -> available_provers:GuiConfig.available -> - enabled_provers:GuiConfig.enabled -> configure_provers:(unit -> unit) -> unit diff --git a/src/plugins/wp/VCS.ml b/src/plugins/wp/VCS.ml index 37fea1aa59e..55503473e67 100644 --- a/src/plugins/wp/VCS.ml +++ b/src/plugins/wp/VCS.ml @@ -71,9 +71,11 @@ let name_of_prover = function | Tactical -> "script" let title_of_prover = function - | Why3ide -> "Why3" - | Why3 "alt-ergo" -> "altergo" - | Why3 s -> s + | Why3 "cvc4" -> "CVC4" + | Why3 "z3" -> "Z3" + | Why3 ("alt-ergo" | "altergo") -> "Alt-Ergo (why3)" + | Why3 s -> Printf.sprintf "Why3 (%s)" s + | Why3ide -> "Why3 (ide)" | AltErgo -> "Alt-Ergo" | Coq -> "Coq" | Qed -> "Qed" -- GitLab From 6a2d170d3d02002f94ed8dad503fc1070f5893ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 24 Apr 2019 14:57:05 +0200 Subject: [PATCH 307/376] [wp/distrib] fix distribution --- src/plugins/wp/Makefile.in | 2 ++ src/plugins/wp/configure.ac | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/wp/Makefile.in b/src/plugins/wp/Makefile.in index 7f810fa98db..e746e10b600 100644 --- a/src/plugins/wp/Makefile.in +++ b/src/plugins/wp/Makefile.in @@ -117,6 +117,8 @@ PLUGIN_DISTRIBUTED:=$(PLUGIN_ENABLE) PLUGIN_DISTRIB_EXTERNAL:= \ Changelog \ Makefile.in \ + ProverDetect.Why3.ml \ + ProverDetect.None.ml \ MakeAPI \ configure.ac \ configure \ diff --git a/src/plugins/wp/configure.ac b/src/plugins/wp/configure.ac index dcdb934f56e..706451a1ab2 100644 --- a/src/plugins/wp/configure.ac +++ b/src/plugins/wp/configure.ac @@ -117,7 +117,7 @@ if test "$ENABLE_WP" != "no"; then WHY3API="yes" ;; *) - AC_MSG_RESULT(why3 api not found (no why3-provers)) + AC_MSG_RESULT(why3 api not found (no why3 prover detection)) WHY3API="no" ;; esac -- GitLab From 1ac023d0c349534e16249b202caef07bd22b0473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 24 Apr 2019 15:01:57 +0200 Subject: [PATCH 308/376] [wp/qualif] update prover titles --- .../wp_acsl/oracle_qualif/classify_float.1.res.oracle | 4 ++-- .../tests/wp_acsl/oracle_qualif/div_mod.1.res.oracle | 4 ++-- .../tests/wp_bts/oracle_qualif/issue_143.1.res.oracle | 10 +++++----- .../binary-multiplication-without-overflow.res.oracle | 8 ++++---- .../oracle_qualif/binary-multiplication.res.oracle | 8 ++++---- .../wp/tests/wp_plugin/oracle_qualif/abs.2.res.oracle | 4 ++-- .../tests/wp_plugin/oracle_qualif/convert.1.res.oracle | 4 ++-- .../wp_plugin/oracle_qualif/float_format.2.res.oracle | 2 +- .../wp/tests/wp_plugin/oracle_qualif/math.1.res.oracle | 4 ++-- .../wp/tests/wp_plugin/oracle_qualif/math.3.res.oracle | 2 +- .../wp/tests/wp_plugin/oracle_qualif/nth.1.res.oracle | 4 ++-- .../wp_plugin/oracle_qualif/sequence.1.res.oracle | 4 ++-- 12 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.1.res.oracle index 7c556d41418..0b99ce986f7 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.1.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/classify_float.1.res.oracle @@ -7,8 +7,8 @@ [wp] [alt-ergo] Goal typed_lemma_InfP_not_finite : Valid [wp] [alt-ergo] Goal typed_lemma_NaN_not_finite : Valid [wp] Proved goals: 3 / 3 - Qed: 0 - alt-ergo: 3 + Qed: 0 + Alt-Ergo (why3): 3 [wp] Report in: 'tests/wp_acsl/oracle_qualif/classify_float.1.report.json' [wp] Report out: 'tests/wp_acsl/result_qualif/classify_float.1.report.json' ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.1.res.oracle index 282eb4ee097..b6f8e5f4ca8 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.1.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/div_mod.1.res.oracle @@ -27,8 +27,8 @@ [wp] [alt-ergo] Goal typed_f_ensures_sm2_mod_pos_neg : Valid [wp] [alt-ergo] Goal typed_f_ensures_sm3_mod_neg_neg : Valid [wp] Proved goals: 22 / 22 - Qed: 0 - alt-ergo: 22 + Qed: 0 + Alt-Ergo (why3): 22 [wp] Report in: 'tests/wp_acsl/oracle_qualif/div_mod.1.report.json' [wp] Report out: 'tests/wp_acsl/result_qualif/div_mod.1.report.json' ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.1.res.oracle b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.1.res.oracle index 2da222911d1..bb43d9e7d04 100644 --- a/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.1.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle_qualif/issue_143.1.res.oracle @@ -5,17 +5,17 @@ [wp] 2 goals scheduled [wp] [Coq] Goal typed_lemma_ok_because_inconsistent : Default tactic [wp] [Failed] Goal typed_lemma_ok_because_inconsistent - alt-ergo: Failed Command './tests/inexistant-prover' not found + Alt-Ergo (why3): Failed Command './tests/inexistant-prover' not found Coq: Failed Command './tests/inexistant-prover' not found Alt-Ergo: Failed Command './tests/inexistant-prover' not found [wp] [Failed] Goal typed_lemma_ok_because_consistent - alt-ergo: Failed Command './tests/inexistant-prover' not found + Alt-Ergo (why3): Failed Command './tests/inexistant-prover' not found Coq: Failed Command './tests/inexistant-prover' not found Alt-Ergo: Failed Command './tests/inexistant-prover' not found [wp] Proved goals: 0 / 2 - Alt-Ergo: 0 (failed: 2) - Coq: 0 (failed: 2) - alt-ergo: 0 (failed: 2) + Alt-Ergo: 0 (failed: 2) + Coq: 0 (failed: 2) + Alt-Ergo (why3): 0 (failed: 2) [wp] Report in: 'tests/wp_bts/oracle_qualif/issue_143.1.report.json' [wp] Report out: 'tests/wp_bts/result_qualif/issue_143.1.report.json' ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication-without-overflow.res.oracle b/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication-without-overflow.res.oracle index 396326b005b..cfdf8aa1564 100644 --- a/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication-without-overflow.res.oracle +++ b/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication-without-overflow.res.oracle @@ -15,8 +15,8 @@ [wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_variant_decrease : Valid [wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_variant_positive : Valid [wp] Proved goals: 10 / 10 - Qed: 3 - alt-ergo: 7 + Qed: 3 + Alt-Ergo (why3): 7 [wp] Report in: 'tests/wp_gallery/oracle_qualif/binary-multiplication-without-overflow.0.report.json' [wp] Report out: 'tests/wp_gallery/result_qualif/binary-multiplication-without-overflow.0.report.json' ------------------------------------------------------------- @@ -44,8 +44,8 @@ BinaryMultiplication 2 - 9 100% [wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_variant_decrease : Valid [wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_variant_positive : Valid [wp] Proved goals: 11 / 14 - Qed: 0 - alt-ergo: 11 + Qed: 0 + Alt-Ergo (why3): 11 [wp] Report in: 'tests/wp_gallery/oracle_qualif/binary-multiplication-without-overflow.0.report.json' [wp] Report out: 'tests/wp_gallery/result_qualif/binary-multiplication-without-overflow.0.report.json' ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication.res.oracle b/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication.res.oracle index df6617e5ab9..65f0dab3fc4 100644 --- a/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication.res.oracle +++ b/src/plugins/wp/tests/wp_gallery/oracle_qualif/binary-multiplication.res.oracle @@ -22,8 +22,8 @@ [wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_variant_decrease : Valid [wp] [Qed] Goal typed_BinaryMultiplication_loop_variant_positive : Valid [wp] Proved goals: 17 / 17 - Qed: 4 - alt-ergo: 13 + Qed: 4 + Alt-Ergo (why3): 13 [wp] Report in: 'tests/wp_gallery/oracle_qualif/binary-multiplication.0.report.json' [wp] Report out: 'tests/wp_gallery/result_qualif/binary-multiplication.0.report.json' ------------------------------------------------------------- @@ -54,8 +54,8 @@ BinaryMultiplication 3 - 13 100% [wp] [alt-ergo] Goal typed_BinaryMultiplication_loop_variant_decrease : Valid [wp] [Qed] Goal typed_BinaryMultiplication_loop_variant_positive : Valid [wp] Proved goals: 13 / 17 - Qed: 0 - alt-ergo: 13 + Qed: 0 + Alt-Ergo (why3): 13 [wp] Report in: 'tests/wp_gallery/oracle_qualif/binary-multiplication.0.report.json' [wp] Report out: 'tests/wp_gallery/result_qualif/binary-multiplication.0.report.json' ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.2.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.2.res.oracle index a1093f1b486..4e80668bd54 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.2.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/abs.2.res.oracle @@ -6,8 +6,8 @@ [wp] 1 goal scheduled [wp] [alt-ergo] Goal typed_abs_abs_ensures : Valid [wp] Proved goals: 1 / 1 - Qed: 0 - alt-ergo: 1 + Qed: 0 + Alt-Ergo (why3): 1 [wp] Report in: 'tests/wp_plugin/oracle_qualif/abs.2.report.json' [wp] Report out: 'tests/wp_plugin/result_qualif/abs.2.report.json' ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/convert.1.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/convert.1.res.oracle index 6a81ceb4c39..90b1a19b299 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/convert.1.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/convert.1.res.oracle @@ -6,8 +6,8 @@ [wp] [alt-ergo] Goal typed_lemma_ceil : Valid [wp] [alt-ergo] Goal typed_lemma_floor : Valid [wp] Proved goals: 2 / 2 - Qed: 0 - alt-ergo: 2 + Qed: 0 + Alt-Ergo (why3): 2 ---------------------------------------------------------- Axiomatics WP Alt-Ergo(Why3) Total Success Lemma - 2 2 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.2.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.2.res.oracle index f2836be71fc..fbad8e13cb9 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.2.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/float_format.2.res.oracle @@ -9,7 +9,7 @@ [wp] 1 goal scheduled [wp] [alt-ergo] Goal typed_output_ensures_KO : Unsuccess [wp] Proved goals: 0 / 1 - alt-ergo: 0 (unsuccess: 1) + Alt-Ergo (why3): 0 (unsuccess: 1) [wp] Report in: 'tests/wp_plugin/oracle_qualif/float_format.2.report.json' [wp] Report out: 'tests/wp_plugin/result_qualif/float_format.2.report.json' ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/math.1.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/math.1.res.oracle index bf2477d381d..239622cf211 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/math.1.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/math.1.res.oracle @@ -35,8 +35,8 @@ [wp] [alt-ergo] Goal typed_ok_ensures_sqrt_pos : Valid [wp] [alt-ergo] Goal typed_ok_ensures_sqrt_pos0 : Valid [wp] Proved goals: 30 / 30 - Qed: 5 - alt-ergo: 25 + Qed: 5 + Alt-Ergo (why3): 25 ---------------------------------------------------------- Axiomatics WP Alt-Ergo(Why3) Total Success Lemma 3 16 19 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/math.3.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/math.3.res.oracle index c8da0ce7146..b36de4de9c7 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/math.3.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/math.3.res.oracle @@ -14,7 +14,7 @@ [wp] [alt-ergo] Goal typed_ko_ensures_ko_exp_log_add_mul : Unsuccess [wp] [alt-ergo] Goal typed_ko_ensures_ko_sqrt_pos : Unsuccess [wp] Proved goals: 0 / 9 - alt-ergo: 0 (unsuccess: 9) + Alt-Ergo (why3): 0 (unsuccess: 9) ---------------------------------------------------------- Functions WP Alt-Ergo(Why3) Total Success ko - - 9 0.0% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/nth.1.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/nth.1.res.oracle index 6f80bff20c4..96da4b6f6ab 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/nth.1.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/nth.1.res.oracle @@ -8,8 +8,8 @@ [wp] [alt-ergo] Goal typed_lemma_access_repeat_concat_3_ok_lack : Valid [wp] [Qed] Goal typed_lemma_eq_repeat_concat_3_ok : Valid [wp] Proved goals: 4 / 4 - Qed: 1 - alt-ergo: 3 + Qed: 1 + Alt-Ergo (why3): 3 [wp] Report in: 'tests/wp_plugin/oracle_qualif/nth.1.report.json' [wp] Report out: 'tests/wp_plugin/result_qualif/nth.1.report.json' ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.1.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.1.res.oracle index e2333a2acdc..922a6a40b60 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.1.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/sequence.1.res.oracle @@ -39,8 +39,8 @@ [wp] [Qed] Goal typed_caveat_sequence_g_not_called_ensures_ok_q2 : Valid [wp] [alt-ergo] Goal typed_caveat_sequence_g_not_called_ensures_ok_q3 : Valid [wp] Proved goals: 34 / 34 - Qed: 22 - alt-ergo: 12 + Qed: 22 + Alt-Ergo (why3): 12 [wp] Report in: 'tests/wp_plugin/oracle_qualif/sequence.1.report.json' [wp] Report out: 'tests/wp_plugin/result_qualif/sequence.1.report.json' ------------------------------------------------------------- -- GitLab From 232322c37f9cd4620afd369125c44ecd8fadcb1a Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Thu, 28 Mar 2019 14:03:56 +0100 Subject: [PATCH 309/376] [ACSL] no-op cast from T to T --- src/kernel_services/ast_queries/logic_typing.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kernel_services/ast_queries/logic_typing.ml b/src/kernel_services/ast_queries/logic_typing.ml index 49ffb79f66f..8d61ff6edcb 100644 --- a/src/kernel_services/ast_queries/logic_typing.ml +++ b/src/kernel_services/ast_queries/logic_typing.ml @@ -2877,7 +2877,10 @@ struct Cil_printer.pp_logic_type ty in term_node, Linteger - | Linteger | Lreal | Ltype _ | Lvar _ | Larrow _ -> + | Ltype _ | Lvar _ | Larrow _ + when Logic_utils.is_same_type t.term_type ct -> (* cast from T to T *) + t.term_node, t.term_type + | Linteger | Lreal | Ltype _ | Lvar _ | Larrow _ -> ctxt.error loc "cannot cast from %a to %a" Cil_printer.pp_logic_type t.term_type Cil_printer.pp_logic_type ct) -- GitLab From 1dd3e49c896e7d8d692d8caeb75e3c506614979b Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Thu, 28 Mar 2019 15:12:31 +0100 Subject: [PATCH 310/376] [ACSL] casts from integral type to boolean --- src/kernel_services/ast_queries/logic_typing.ml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kernel_services/ast_queries/logic_typing.ml b/src/kernel_services/ast_queries/logic_typing.ml index 8d61ff6edcb..c846d4f969d 100644 --- a/src/kernel_services/ast_queries/logic_typing.ml +++ b/src/kernel_services/ast_queries/logic_typing.ml @@ -2880,6 +2880,9 @@ struct | Ltype _ | Lvar _ | Larrow _ when Logic_utils.is_same_type t.term_type ct -> (* cast from T to T *) t.term_node, t.term_type + | Ltype (_,[]) when Logic_const.is_boolean_type ct && + Cil.isLogicIntegralType t.term_type -> + TLogic_coerce(ct, t), ct | Linteger | Lreal | Ltype _ | Lvar _ | Larrow _ -> ctxt.error loc "cannot cast from %a to %a" Cil_printer.pp_logic_type t.term_type -- GitLab From 973100cf0b0574c72402f7c07d542f78a4173068 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Mon, 1 Apr 2019 10:39:59 +0200 Subject: [PATCH 311/376] [ACSL] casts from boolean to integer --- src/kernel_services/ast_queries/logic_typing.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kernel_services/ast_queries/logic_typing.ml b/src/kernel_services/ast_queries/logic_typing.ml index c846d4f969d..ae39644dc34 100644 --- a/src/kernel_services/ast_queries/logic_typing.ml +++ b/src/kernel_services/ast_queries/logic_typing.ml @@ -2882,7 +2882,9 @@ struct t.term_node, t.term_type | Ltype (_,[]) when Logic_const.is_boolean_type ct && Cil.isLogicIntegralType t.term_type -> - TLogic_coerce(ct, t), ct + TLogic_coerce(ct, t), ct (* cast from integral type to boolean *) + | Linteger when Logic_const.is_boolean_type t.term_type -> + TLogic_coerce(ct, t), ct (* cast from boolean to integer *) | Linteger | Lreal | Ltype _ | Lvar _ | Larrow _ -> ctxt.error loc "cannot cast from %a to %a" Cil_printer.pp_logic_type t.term_type -- GitLab From 8d7b41fc76c07fd67991657a36be67f26b2995c5 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Thu, 28 Mar 2019 15:20:19 +0100 Subject: [PATCH 312/376] [ACSL] adds some tests about ACSL cast --- tests/spec/logic_type.c | 8 ++++++++ tests/spec/oracle/logic_type.res.oracle | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/tests/spec/logic_type.c b/tests/spec/logic_type.c index 0b8380d9dc8..008bec88b3c 100644 --- a/tests/spec/logic_type.c +++ b/tests/spec/logic_type.c @@ -26,3 +26,11 @@ Point tab[3]; void h(void) { f(tab) ; } + +//@ logic t t_from_t(t x) = (t) x; + +//@ logic _Bool _Bool_from_boolean(boolean b) = (_Bool) b; + +//@ logic boolean boolean_from_integer(integer b) = (boolean) b; +//@ logic boolean boolean_from_int(int b) = (boolean) b; +//@ logic boolean boolean_from_Bool(_Bool b) = (boolean) b; diff --git a/tests/spec/oracle/logic_type.res.oracle b/tests/spec/oracle/logic_type.res.oracle index 4521f06fa5f..c9a81bc49b7 100644 --- a/tests/spec/oracle/logic_type.res.oracle +++ b/tests/spec/oracle/logic_type.res.oracle @@ -51,4 +51,15 @@ void h(void) return; } +/*@ logic t t_from_t(t x) = x; + */ +/*@ logic _Bool _Bool_from_boolean(𔹠b) = (_Bool)b; + */ +/*@ logic 𔹠boolean_from_integer(ℤ b) = b; + */ +/*@ logic 𔹠boolean_from_int(int b) = b; + */ +/*@ logic 𔹠boolean_from_Bool(_Bool b) = b; + +*/ -- GitLab From 574805946952028bf9c84fcc79ad2cee13bfc78a Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Mon, 1 Apr 2019 09:47:52 +0200 Subject: [PATCH 313/376] [WP] casts from/to boolean --- src/plugins/wp/Cmath.ml | 3 + src/plugins/wp/Cmath.mli | 3 + src/plugins/wp/LogicSemantics.ml | 8 +- .../tests/wp_acsl/oracle/unit_bool.res.oracle | 74 +++++++++++++++ .../oracle_qualif/unit_bool.0.report.json | 93 ++++++++++++++++++- .../oracle_qualif/unit_bool.res.oracle | 24 ++++- src/plugins/wp/tests/wp_acsl/unit_bool.i | 21 +++++ 7 files changed, 219 insertions(+), 7 deletions(-) diff --git a/src/plugins/wp/Cmath.ml b/src/plugins/wp/Cmath.ml index 73f81d61182..e168c743a9b 100644 --- a/src/plugins/wp/Cmath.ml +++ b/src/plugins/wp/Cmath.ml @@ -90,6 +90,9 @@ let builtin_truncate f e = let int_of_real x = e_fun f_truncate [x] let real_of_int x = e_fun f_real_of_int [x] +let int_of_bool a = e_neq a F.e_zero (* if a != 0 then true else false *) +let bool_of_int a = e_if a F.e_one F.e_zero (* if a then 1 else 0 *) + (* -------------------------------------------------------------------------- *) (* --- Sign --- *) (* -------------------------------------------------------------------------- *) diff --git a/src/plugins/wp/Cmath.mli b/src/plugins/wp/Cmath.mli index 7c1510ffdc3..c7ba3bd52e4 100644 --- a/src/plugins/wp/Cmath.mli +++ b/src/plugins/wp/Cmath.mli @@ -27,6 +27,9 @@ open Lang open Lang.F +val int_of_bool : unop +val bool_of_int : unop + val int_of_real : term -> term val real_of_int : term -> term diff --git a/src/plugins/wp/LogicSemantics.ml b/src/plugins/wp/LogicSemantics.ml index 9deb0c43059..2c8f9c8028b 100644 --- a/src/plugins/wp/LogicSemantics.ml +++ b/src/plugins/wp/LogicSemantics.ml @@ -587,7 +587,9 @@ struct L.map (fun x -> Cmath.int_of_real (Cfloat.real_of_float f x)) (C.logic env t) - | L_bool|L_pointer _|L_array _ -> + | L_bool -> + L.map Cmath.bool_of_int (C.logic env t) + | L_pointer _|L_array _ -> Warning.error "@[Logic cast from (%a) to (%a) not implemented yet@]" Printer.pp_logic_type src_ltype Printer.pp_logic_type Linteger @@ -595,7 +597,9 @@ struct let src_ltype = Logic_utils.unroll_type ~unroll_typedef:false t.term_type in match cvsort_of_ltype src_ltype with | L_bool -> C.logic env t - | L_integer | L_cint _ | L_real | L_cfloat _ | L_pointer _ | L_array _ -> + | L_integer | L_cint _ -> + L.map Cmath.int_of_bool (C.logic env t) + | L_real | L_cfloat _ | L_pointer _ | L_array _ -> Warning.error "@[Logic cast from (%a) to (%a) not implemented yet@]" Printer.pp_logic_type src_ltype Printer.pp_logic_type Logic_const.boolean_type diff --git a/src/plugins/wp/tests/wp_acsl/oracle/unit_bool.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle/unit_bool.res.oracle index 1cb52118073..d4de7cfa3f0 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle/unit_bool.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle/unit_bool.res.oracle @@ -2,6 +2,7 @@ [kernel] Parsing tests/wp_acsl/unit_bool.i (no preprocessing) [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' +[wp] Warning: Missing RTE guards ------------------------------------------------------------ Axiomatic 'Foo' ------------------------------------------------------------ @@ -11,3 +12,76 @@ Assume: 'f_def' Prove: (L_f 1) ------------------------------------------------------------ +------------------------------------------------------------ + Function boolean_casts +------------------------------------------------------------ + +Goal Check 'C0' (file tests/wp_acsl/unit_bool.i, line 12): +Prove: true. + +------------------------------------------------------------ + +Goal Check 'C1' (file tests/wp_acsl/unit_bool.i, line 13): +Prove: true. + +------------------------------------------------------------ + +Goal Check 'c0' (file tests/wp_acsl/unit_bool.i, line 14): +Prove: true. + +------------------------------------------------------------ + +Goal Check 'c1' (file tests/wp_acsl/unit_bool.i, line 15): +Prove: true. + +------------------------------------------------------------ + +Goal Check 'c2' (file tests/wp_acsl/unit_bool.i, line 16): +Prove: true. + +------------------------------------------------------------ + +Goal Check 'X0' (file tests/wp_acsl/unit_bool.i, line 18): +Prove: true. + +------------------------------------------------------------ + +Goal Check 'X1' (file tests/wp_acsl/unit_bool.i, line 19): +Prove: true. + +------------------------------------------------------------ + +Goal Check 'x0' (file tests/wp_acsl/unit_bool.i, line 20): +Prove: true. + +------------------------------------------------------------ + +Goal Check 'x1' (file tests/wp_acsl/unit_bool.i, line 21): +Prove: true. + +------------------------------------------------------------ + +Goal Check 'x2' (file tests/wp_acsl/unit_bool.i, line 22): +Prove: true. + +------------------------------------------------------------ + +Goal Check 'B0' (file tests/wp_acsl/unit_bool.i, line 24): +Prove: true. + +------------------------------------------------------------ + +Goal Check 'B1' (file tests/wp_acsl/unit_bool.i, line 25): +Prove: true. + +------------------------------------------------------------ + +Goal Check 'b0' (file tests/wp_acsl/unit_bool.i, line 26): +Prove: true. + +------------------------------------------------------------ + +Goal Check 'b1' (file tests/wp_acsl/unit_bool.i, line 27): +Prove: true. + +------------------------------------------------------------ diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.0.report.json b/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.0.report.json index cce14a76fc5..7ca95e7dd10 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.0.report.json +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.0.report.json @@ -1,5 +1,6 @@ { "wp:global": { "alt-ergo": { "total": 1, "valid": 1, "rank": 1 }, - "wp:main": { "total": 1, "valid": 1, "rank": 1 } }, + "qed": { "total": 14, "valid": 14 }, + "wp:main": { "total": 15, "valid": 15, "rank": 1 } }, "wp:axiomatics": { "Foo": { "lemma_f_1": { "alt-ergo": { "total": 1, "valid": 1, "rank": 1 }, @@ -11,4 +12,92 @@ "rank": 1 }, "wp:main": { "total": 1, "valid": 1, - "rank": 1 } } } } } + "rank": 1 } } } }, + "wp:functions": { "boolean_casts": { "boolean_casts_check_b1": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "boolean_casts_check_b0": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "boolean_casts_check_B1": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "boolean_casts_check_B0": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "boolean_casts_check_x2": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "boolean_casts_check_x1": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "boolean_casts_check_x0": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "boolean_casts_check_X1": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "boolean_casts_check_X0": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "boolean_casts_check_c2": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "boolean_casts_check_c1": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "boolean_casts_check_c0": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "boolean_casts_check_C1": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "boolean_casts_check_C0": { "qed": + { "total": 1, + "valid": 1 }, + "wp:main": + { "total": 1, + "valid": 1 } }, + "wp:section": { "qed": { "total": 14, + "valid": 14 }, + "wp:main": { "total": 14, + "valid": 14 } } } } } diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.res.oracle index 6822d60dd5b..9e87f031a9e 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/unit_bool.res.oracle @@ -2,10 +2,25 @@ [kernel] Parsing tests/wp_acsl/unit_bool.i (no preprocessing) [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' -[wp] 1 goal scheduled +[wp] Warning: Missing RTE guards +[wp] 15 goals scheduled [wp] [Alt-Ergo] Goal typed_lemma_f_1 : Valid -[wp] Proved goals: 1 / 1 - Qed: 0 +[wp] [Qed] Goal typed_boolean_casts_check_C0 : Valid +[wp] [Qed] Goal typed_boolean_casts_check_C1 : Valid +[wp] [Qed] Goal typed_boolean_casts_check_c0 : Valid +[wp] [Qed] Goal typed_boolean_casts_check_c1 : Valid +[wp] [Qed] Goal typed_boolean_casts_check_c2 : Valid +[wp] [Qed] Goal typed_boolean_casts_check_X0 : Valid +[wp] [Qed] Goal typed_boolean_casts_check_X1 : Valid +[wp] [Qed] Goal typed_boolean_casts_check_x0 : Valid +[wp] [Qed] Goal typed_boolean_casts_check_x1 : Valid +[wp] [Qed] Goal typed_boolean_casts_check_x2 : Valid +[wp] [Qed] Goal typed_boolean_casts_check_B0 : Valid +[wp] [Qed] Goal typed_boolean_casts_check_B1 : Valid +[wp] [Qed] Goal typed_boolean_casts_check_b0 : Valid +[wp] [Qed] Goal typed_boolean_casts_check_b1 : Valid +[wp] Proved goals: 15 / 15 + Qed: 14 Alt-Ergo: 1 [wp] Report in: 'tests/wp_acsl/oracle_qualif/unit_bool.0.report.json' [wp] Report out: 'tests/wp_acsl/result_qualif/unit_bool.0.report.json' @@ -13,3 +28,6 @@ Axiomatics WP Alt-Ergo Total Success Axiomatic Foo - 1 (1..12) 1 100% ------------------------------------------------------------- +Functions WP Alt-Ergo Total Success +boolean_casts 14 - 14 100% +------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_acsl/unit_bool.i b/src/plugins/wp/tests/wp_acsl/unit_bool.i index 2892c9f8273..dd18aa4f3e0 100644 --- a/src/plugins/wp/tests/wp_acsl/unit_bool.i +++ b/src/plugins/wp/tests/wp_acsl/unit_bool.i @@ -6,3 +6,24 @@ lemma f_1: f(1); }*/ + + +_Bool boolean_casts(int x, _Bool y) { + //@ check C0: 0 == (integer) \false; + //@ check C1: 1 == (integer) \true ; + //@ check c0: \false == (boolean) 0; + //@ check c1: \true == (boolean) 1; + //@ check c2: \true == (boolean) 2; + int x0 = 0, x1=1, x2=2; + //@ check X0: x0 == (int) \false; + //@ check X1: x1 == (int) \true ; + //@ check x0: \false == (boolean) x0; + //@ check x1: \true == (boolean) x1; + //@ check x2: \true == (boolean) x2; + _Bool b0=0, b1=1; + //@ check B0: b0 == (_Bool) \false; + //@ check B1: b1 == (_Bool) \true ; + //@ check b0: \false == (boolean) b0; + //@ check b1: \true == (boolean) b1; + return 0; +} -- GitLab From 466c71ccdeec03daa1d01a78b8430064b2c240ac Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Wed, 24 Apr 2019 15:33:41 +0200 Subject: [PATCH 314/376] [OCI] revert pkgs.file --- nix/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/default.nix b/nix/default.nix index 04a61cb18b3..e3ffbf9a26f 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -2,7 +2,7 @@ { pkgs, stdenv, src ? ../., opam2nix, ocaml_version ? "ocaml-ng.ocamlPackages_4_05.ocaml", plugins ? { } }: let mk_buildInputs = { opamPackages ? [], nixPackages ? [] } : - [ pkgs.gnugrep pkgs.gnused pkgs.autoconf pkgs.gnumake pkgs.gcc pkgs.ncurses pkgs.time pkgs.python3 pkgs.perl] ++ nixPackages ++ opam2nix.build { + [ pkgs.gnugrep pkgs.gnused pkgs.autoconf pkgs.gnumake pkgs.gcc pkgs.ncurses pkgs.time pkgs.python3 pkgs.perl pkgs.file ] ++ nixPackages ++ opam2nix.build { specs = opam2nix.toSpecs ([ "ocamlfind" "zarith" "ocamlgraph" "yojson" { name = "coq"; constraint = "=8.7.2"; } ] ++ opamPackages ++ -- GitLab From 0ca95fd0c42e0a67efb1854053a1e8528e88eb05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 24 Apr 2019 15:50:05 +0200 Subject: [PATCH 315/376] [configure] disable -thread for gui on MacOS --- Makefile | 22 ++++++++++++++++------ configure.in | 11 ++++++++++- share/Makefile.config.in | 1 + 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 582741e0b75..2212163281b 100644 --- a/Makefile +++ b/Makefile @@ -1288,12 +1288,22 @@ gui: gui-$(OCAMLBEST) ALL_GUI_CMO= $(ALL_CMO) $(GRAPH_GUICMO) $(GUICMO) ALL_GUI_CMX= $(patsubst %.cma,%.cmxa,$(ALL_GUI_CMO:.cmo=.cmx)) +ifeq ($(NATIVE_THREADS),yes) +ifneq ($(PLATFORM),MacOS) +GUI_THREAD=-thread +else +GUI_THREAD= +endif +else +GUI_THREAD= +endif + bin/viewer.byte$(EXE): BYTE_LIBS+= $(GRAPH_GUICMO) bin/viewer.byte$(EXE): $(filter-out $(GRAPH_GUICMO),$(ALL_GUI_CMO)) \ $(GEN_BYTE_LIBS) \ $(PLUGIN_DYN_CMO_LIST) $(PLUGIN_DYN_GUI_CMO_LIST) $(PRINT_LINKING) $@ - $(OCAMLC) $(BLINKFLAGS) $(THREAD) -o $@ $(BYTE_LIBS) \ + $(OCAMLC) $(BLINKFLAGS) $(GUI_THREAD) -o $@ $(BYTE_LIBS) \ $(CMO) \ $(filter-out \ $(patsubst $(PLUGIN_GUI_LIB_DIR)/%,$(PLUGIN_LIB_DIR)/%,\ @@ -1307,7 +1317,7 @@ bin/viewer.opt$(EXE): $(filter-out $(GRAPH_GUICMX),$(ALL_GUI_CMX)) \ $(PLUGIN_DYN_CMX_LIST) $(PLUGIN_DYN_GUI_CMX_LIST) \ $(PLUGIN_CMX_LIST) $(PLUGIN_GUI_CMX_LIST) $(PRINT_LINKING) $@ - $(OCAMLOPT) $(OLINKFLAGS) $(THREAD) -o $@ $(OPT_LIBS) \ + $(OCAMLOPT) $(OLINKFLAGS) $(GUI_THREAD) -o $@ $(OPT_LIBS) \ $(CMX) \ $(filter-out \ $(patsubst $(PLUGIN_GUI_LIB_DIR)/%,$(PLUGIN_LIB_DIR)/%,\ @@ -2297,21 +2307,21 @@ PTESTS_SRC=ptests/ptests_config.ml ptests/ptests.ml PTESTS_CONFIG:= $(shell if test -d tests; then echo tests/ptests_config; fi) ifeq ($(NATIVE_THREADS),yes) -THREAD=-thread +PTEST_THREAD=-thread ptests: bin/ptests.$(PTESTSBEST)$(EXE) $(PTESTS_CONFIG) else -THREAD=-vmthread +PTEST_THREAD=-vmthread ptests: bin/ptests.byte$(EXE) $(PTESTS_CONFIG) endif bin/ptests.byte$(EXE): $(PTESTS_SRC) $(PRINT_LINKING) $@ - $(OCAMLC) -I ptests -dtypes $(THREAD) -g -o $@ \ + $(OCAMLC) -I ptests -dtypes $(PTEST_THREAD) -g -o $@ \ unix.cma threads.cma str.cma dynlink.cma $^ bin/ptests.opt$(EXE): $(PTESTS_SRC) $(PRINT_LINKING) $@ - $(OCAMLOPT) -I ptests -dtypes $(THREAD) -o $@ \ + $(OCAMLOPT) -I ptests -dtypes $(PTEST_THREAD) -o $@ \ unix.cmxa threads.cmxa str.cmxa dynlink.cmxa $^ GENERATED+=ptests/ptests_config.ml tests/ptests_config diff --git a/configure.in b/configure.in index 09121c03098..c87bf5bac29 100644 --- a/configure.in +++ b/configure.in @@ -424,6 +424,7 @@ rm -f test_os_type.cmi test_os_type.cmo test_os_type.ml test_os_type if test "$OCAML_OS_TYPE" = "Win32"; then AC_MSG_RESULT(Win32) AC_CHECK_PROG(CYGPATH,cygpath,cygpath,no) + PLATFORM=Win32 OCAMLWIN32=yes EXE=.exe # OCaml on Win32 does not support vmthreads, use native ones. @@ -432,9 +433,16 @@ else OCAMLWIN32=no if test "$OCAML_OS_TYPE" = "Cygwin"; then AC_MSG_RESULT(Cygwin) + PLATFORM=Cygwin EXE=.exe else - AC_MSG_RESULT(Unix) + if test -x "/Applications/Mail.app"; then + AC_MSG_RESULT(MacOS) + PLATFORM=MacOS + else + AC_MSG_RESULT(Unix) + PLATFORM=Unix + fi EXE= fi @@ -1016,6 +1024,7 @@ check_frama_c_dependencies EXTERNAL_PLUGINS="${EXTERNAL_PLUGINS} ${EXTRA_EXTERNAL_PLUGINS}" +AC_SUBST(PLATFORM) AC_SUBST(VERBOSEMAKE) AC_SUBST(DEVELOPMENT) AC_SUBST(DOT) diff --git a/share/Makefile.config.in b/share/Makefile.config.in index f6b545148e7..f0bc8ae518d 100644 --- a/share/Makefile.config.in +++ b/share/Makefile.config.in @@ -91,6 +91,7 @@ HAS_OCAML405 ?=@HAS_OCAML405@ HAS_OCAML407 ?=@HAS_OCAML407@ HAS_OCAML408 ?=@HAS_OCAML408@ +PLATFORM ?=@PLATFORM@ NATIVE_THREADS ?=@HAS_NATIVE_THREADS@ OCAMLWIN32 ?=@OCAMLWIN32@ PTESTSBEST ?=@PTESTSBEST@ -- GitLab From 277bee50ebf95d98034ecdab9f3cb6dc498397b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 24 Apr 2019 16:17:04 +0200 Subject: [PATCH 316/376] [configure] use uname -s to detect Mac OSX --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index c87bf5bac29..392853a370d 100644 --- a/configure.in +++ b/configure.in @@ -436,7 +436,7 @@ else PLATFORM=Cygwin EXE=.exe else - if test -x "/Applications/Mail.app"; then + if test $(uname -s) = "Darwin"; then AC_MSG_RESULT(MacOS) PLATFORM=MacOS else -- GitLab From e1de61f40e8a0de5ad0ae8e62e838e39a253d696 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Wed, 24 Apr 2019 15:54:38 +0200 Subject: [PATCH 317/376] [typing] unification of cast functions in Logic_typing --- .../ast_queries/logic_typing.ml | 119 +++++++----------- .../ast_queries/logic_typing.mli | 10 +- 2 files changed, 56 insertions(+), 73 deletions(-) diff --git a/src/kernel_services/ast_queries/logic_typing.ml b/src/kernel_services/ast_queries/logic_typing.ml index ae39644dc34..a8ab10766a5 100644 --- a/src/kernel_services/ast_queries/logic_typing.ml +++ b/src/kernel_services/ast_queries/logic_typing.ml @@ -1071,16 +1071,20 @@ struct Cil_datatype.Logic_type.equal (Ctype ctyp1) (Ctype ctyp2) let rec c_mk_cast ?(force=false) e oldt newt = + let loc = e.term_loc in if is_same_c_type oldt newt then begin - if force then - Logic_utils.mk_cast ~loc:e.term_loc ~force newt e - else e + if force then Logic_utils.mk_cast ~loc ~force newt e else e end else begin (* Watch out for constants *) if isPointerType newt && isLogicNull e && not (isLogicZero e) then (* \null can have any pointer type, see ACSL manual. *) - { e with term_type = Ctype newt } - else if isPointerType newt && isArrayType oldt && is_C_array e then begin + (if force then + Logic_const.term ~loc (TCastE (newt, e)) (Ctype newt) + else + { e with term_type = Ctype newt }) + else if isPointerType newt && isArrayType oldt then begin + if not (is_C_array e) then + C.error loc "cannot cast logic array to pointer type"; let e = mk_logic_StartOf e in let oldt = Logic_utils.logicCType e.term_type in (* we have converted from array to ptr, but the pointed type might @@ -1089,7 +1093,7 @@ struct end else begin match Cil.unrollType newt, e.term_node with | TEnum (ei,[]), TConst (LEnum { eihost = ei'}) - when ei.ename = ei'.ename -> e + when ei.ename = ei'.ename && not force -> e | _ -> { e with term_node = (Logic_utils.mk_cast ~force newt e).term_node; @@ -1196,10 +1200,20 @@ struct in lift_set convert_one_location t - let rec mk_cast e newt = + let rec mk_cast ?(explicit=false) e newt = + let force = explicit in let loc = e.term_loc in - if is_same_type e.term_type newt then e - else if is_enum_cst e newt then e + let truncate_info = + List.hd @@ Logic_env.find_all_logic_functions "\\truncate" + in + if is_same_type e.term_type newt then begin + if explicit then begin + match Logic_const.unroll_ltdef newt with + | Ctype cnewt -> + { e with term_node = TCastE(cnewt,e); term_type = newt } + | _ -> e + end else e + end else if is_enum_cst e newt then { e with term_type = newt } else begin match (unroll_type e.term_type), @@ -1207,15 +1221,16 @@ struct (Logic_const.unroll_ltdef newt) with | Ctype oldt, Ctype newt -> - c_mk_cast e oldt newt + c_mk_cast ~force e oldt newt | t1, Ltype ({lt_name = name},[]) when name = Utf8_logic.boolean && is_integral_type t1 -> - { e with - term_node = - TBinOp(Cil_types.Ne, - mk_cast e Linteger, - lzero ~loc ()); - term_type = Ltype(C.find_logic_type Utf8_logic.boolean,[]) } + let t2 = Ltype (C.find_logic_type Utf8_logic.boolean,[]) in + { e with term_node = TLogic_coerce(t2,e); term_type = t2 } + | t1, Linteger when Logic_const.is_boolean_type t1 -> + logic_coerce Linteger e + | t1, Ctype t2 when Logic_const.is_boolean_type t1 + && is_integral_type newt -> + Logic_const.term ~loc (TCastE (t2,e)) newt | ty1, Ltype({lt_name="set"},[ty2]) when is_pointer_type ty1 && is_plain_pointer_type ty2 && @@ -1224,27 +1239,37 @@ struct | Ltype({lt_name = "set"},[_]), Ltype({lt_name="set"},[ty2]) -> let e = lift_set (fun e -> mk_cast e ty2) e in { e with term_type = make_set_type e.term_type} + (* extremely dirty cast to allow Eva to understand some libc + specifications *) + | Ltype({lt_name = "set"},[_]), Ctype ty2 when explicit -> + Logic_utils.mk_cast ~loc ty2 e | _ , Ltype({lt_name = "set"},[ ty2 ]) -> let e = mk_cast e ty2 in logic_coerce (make_set_type e.term_type) e | Linteger, Linteger | Lreal, Lreal -> e | Linteger, Ctype t when isLogicPointerType newt && isLogicNull e -> - c_mk_cast e intType t + c_mk_cast ~force e intType t + | Linteger, (Ctype newt) | Lreal, (Ctype newt) when explicit -> + Logic_utils.mk_cast ~loc newt e | Linteger, Ctype t when isIntegralType t -> - (try - C.integral_cast t e - with Failure s -> C.error loc "%s" s) + (try C.integral_cast t e with Failure s -> C.error loc "%s" s) | Linteger, Ctype _ | Lreal, Ctype _ -> C.error loc "invalid implicit cast from %a to C type %a" Cil_printer.pp_logic_type e.term_type Cil_printer.pp_logic_type newt | Ctype t, Linteger when Cil.isIntegralType t -> logic_coerce Linteger e + | Ctype t, Linteger when Cil.isArithmeticType t && explicit -> + Logic_const.term + ~loc (Tapp(truncate_info,[], [logic_coerce Lreal e])) Linteger | Ctype t, Lreal when isArithmeticType t -> logic_coerce Lreal e | Ctype _, (Lreal | Linteger) -> C.error loc "invalid implicit cast from %a to logic type %a" Cil_printer.pp_logic_type e.term_type Cil_printer.pp_logic_type newt | Linteger, Lreal -> logic_coerce Lreal e + | Lreal, Linteger when explicit -> + let term_node = Tapp(truncate_info,[],[e]) in + Logic_const.term ~loc term_node Linteger | Lreal, Linteger -> C.error loc "invalid cast from real to integer. \ @@ -2838,57 +2863,9 @@ struct | PLcast (ty, t) -> let t = term env t in (* no casts of tsets in grammar *) - let ct = - Logic_const.unroll_ltdef (logic_type ctxt loc env ty) - in - (match ct with - | (Ctype tnew) -> - (match t.term_type with - | Ctype told -> - if isPointerType tnew && isArrayType told - && not (is_C_array t) then - ctxt.error loc "cannot cast logic array to pointer type"; - if Cil.isVoidPtrType told then - (Logic_utils.mk_cast tnew t).term_node, ct - else - (c_mk_cast ~force:true t told tnew).term_node , ct - | _ -> (Logic_utils.mk_cast tnew t).term_node, ct) - | Linteger when is_arithmetic_type t.term_type -> - let truncate_info = - List.hd @@ Logic_env.find_all_logic_functions "\\truncate" - in - let term_node = - match unroll_type t.term_type with - | Lreal -> Tapp (truncate_info, [], [t]) - | Ctype ty when not (Cil.isIntegralType ty) -> - (* arithmetic but not integral type: floating point. - Coerce to real before applying truncate. *) - Tapp ( - truncate_info, [], - [ Logic_const.term ~loc:t.term_loc - (TLogic_coerce(Lreal,t)) Lreal ]) - | Ctype _ -> - (* an integral type by construction *) - TLogic_coerce(Linteger, t) - | Linteger -> (* coercion is a no-op. *) t.term_node - | Ltype _ | Lvar _ | Larrow _ as ty -> - Kernel.fatal - "%a should not be considered an arithmetic type" - Cil_printer.pp_logic_type ty - in - term_node, Linteger - | Ltype _ | Lvar _ | Larrow _ - when Logic_utils.is_same_type t.term_type ct -> (* cast from T to T *) - t.term_node, t.term_type - | Ltype (_,[]) when Logic_const.is_boolean_type ct && - Cil.isLogicIntegralType t.term_type -> - TLogic_coerce(ct, t), ct (* cast from integral type to boolean *) - | Linteger when Logic_const.is_boolean_type t.term_type -> - TLogic_coerce(ct, t), ct (* cast from boolean to integer *) - | Linteger | Lreal | Ltype _ | Lvar _ | Larrow _ -> - ctxt.error loc "cannot cast from %a to %a" - Cil_printer.pp_logic_type t.term_type - Cil_printer.pp_logic_type ct) + let ct = Logic_const.unroll_ltdef (logic_type ctxt loc env ty) in + let { term_node; term_type } = mk_cast ~explicit:true t ct in + (term_node, term_type) | PLcoercion (t,ty) -> let t = term env t in (match Logic_const.unroll_ltdef (logic_type ctxt loc env ty) with diff --git a/src/kernel_services/ast_queries/logic_typing.mli b/src/kernel_services/ast_queries/logic_typing.mli index 59d1fc90373..f30df042804 100644 --- a/src/kernel_services/ast_queries/logic_typing.mli +++ b/src/kernel_services/ast_queries/logic_typing.mli @@ -291,8 +291,14 @@ sig val type_of_field: location -> string -> logic_type -> (term_offset * logic_type) - (** @since Nitrogen-20111001 *) - val mk_cast: Cil_types.term -> Cil_types.logic_type -> Cil_types.term + (** + @param explicit true if the cast is present in original source. + defaults to false + @since Nitrogen-20111001 + @modify Frama-C+dev introduces explicit param + *) + val mk_cast: + ?explicit:bool -> Cil_types.term -> Cil_types.logic_type -> Cil_types.term (** type-checks a term. *) val term : Lenv.t -> Logic_ptree.lexpr -> term -- GitLab From 5228b7c205136720b4861efbf2323422ad77ddc0 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Wed, 24 Apr 2019 16:33:33 +0200 Subject: [PATCH 318/376] [tests] partial update --- tests/libc/oracle/fc_libc.1.res.oracle | 4 ++-- tests/misc/oracle/obfuscate.res.oracle | 2 +- tests/spec/oracle/all.res.oracle | 10 ++++----- tests/spec/oracle/null_ptr.res.oracle | 2 +- tests/spec/oracle/parsing.res.oracle | 4 ++-- .../oracle/real_typing_bts1309.res.oracle | 2 +- .../syntax/oracle/static_formals_1.res.oracle | 22 +++++++++---------- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tests/libc/oracle/fc_libc.1.res.oracle b/tests/libc/oracle/fc_libc.1.res.oracle index 0e7823ec685..4202b6e1aa9 100644 --- a/tests/libc/oracle/fc_libc.1.res.oracle +++ b/tests/libc/oracle/fc_libc.1.res.oracle @@ -4783,7 +4783,7 @@ int unsetenv(char const *name) requires alignment_is_a_suitable_power_of_two: alignment ≥ sizeof(void *) ∧ - ((unsigned int)alignment & ((unsigned int)alignment - 1)) ≡ 0; + ((size_t)alignment & ((size_t)alignment - 1)) ≡ 0; assigns __fc_heap_status, \result; assigns __fc_heap_status \from (indirect: alignment), size, __fc_heap_status; @@ -4820,7 +4820,7 @@ int posix_memalign(void **memptr, size_t alignment, size_t size) assert alignment_is_a_suitable_power_of_two: alignment ≥ sizeof(void *) ∧ - ((unsigned int)alignment & ((unsigned int)alignment - 1)) ≡ 0; + ((size_t)alignment & ((size_t)alignment - 1)) ≡ 0; */ ; *memptr = malloc(size); diff --git a/tests/misc/oracle/obfuscate.res.oracle b/tests/misc/oracle/obfuscate.res.oracle index 124447020ca..c56321364a9 100644 --- a/tests/misc/oracle/obfuscate.res.oracle +++ b/tests/misc/oracle/obfuscate.res.oracle @@ -123,7 +123,7 @@ int F3(int f2) V3 = 0; if (f2) goto L2; V3 ++; - /*@ assert property: V3 ≢ 0? 1 ≢ 0: 0 ≢ 0; */ ; + /*@ assert property: V3? 1 ≢ 0: 0 ≢ 0; */ ; L2: ; return V3; } diff --git a/tests/spec/oracle/all.res.oracle b/tests/spec/oracle/all.res.oracle index eb8254c5c9c..8543e35a53d 100644 --- a/tests/spec/oracle/all.res.oracle +++ b/tests/spec/oracle/all.res.oracle @@ -29,7 +29,7 @@ axiomatic Test { axiom e: P ⊻ Q; - axiom f: 0 ≢ 0? P: Q; + axiom f: 0? P: Q; axiom g: (P ⇒ P) ∧ (¬P ⇒ Q); @@ -39,13 +39,13 @@ axiomatic Test { } */ -/*@ predicate R(ℤ i, ℤ j) = (1 ≢ 0? i + j: (j: j)) ≡ i + j; +/*@ predicate R(ℤ i, ℤ j) = (1? i + j: (j: j)) ≡ i + j; */ -/*@ predicate S(ℤ i, ℤ j) = (1 ≢ 0? (i: j): j) ≡ j; +/*@ predicate S(ℤ i, ℤ j) = (1? (i: j): j) ≡ j; */ -/*@ predicate T(ℤ i, ℤ j) = (1 ≢ 0? i: j) ≡ i; +/*@ predicate T(ℤ i, ℤ j) = (1? i: j) ≡ i; */ -/*@ lemma tauto: 0 ≢ 0? T(0, 0): R(1, 2); +/*@ lemma tauto: 0? T(0, 0): R(1, 2); */ /*@ lemma tauto2: (R(0, 1) ⇒ S(3, 4)) ∧ (¬R(0, 1) ⇒ T(5, 6)); */ diff --git a/tests/spec/oracle/null_ptr.res.oracle b/tests/spec/oracle/null_ptr.res.oracle index 5412691e03a..59e76f0ef7d 100644 --- a/tests/spec/oracle/null_ptr.res.oracle +++ b/tests/spec/oracle/null_ptr.res.oracle @@ -22,7 +22,7 @@ void f(char *x) return; } -/*@ ensures (\result ≢ 0) ≡ \true; */ +/*@ ensures \result ≡ \true; */ int g(void) { int __retres; diff --git a/tests/spec/oracle/parsing.res.oracle b/tests/spec/oracle/parsing.res.oracle index 487e29fb134..37ceb452828 100644 --- a/tests/spec/oracle/parsing.res.oracle +++ b/tests/spec/oracle/parsing.res.oracle @@ -7,9 +7,9 @@ /* Generated by Frama-C */ /*@ lemma bidon{Here}: ∀ int *t; ¬(*(t + 0) > 0); */ -/*@ lemma bidon1{Here}: ∀ int *t; !(*(t + 0) ≢ 0) ≡ (0 ≢ 0); +/*@ lemma bidon1{Here}: ∀ int *t; !*(t + 0) ≡ 0; */ -/*@ lemma bidon2{Here}: ∀ int *t; !(*(t + 0) ≢ 0) ≡ (0 ≢ 0); +/*@ lemma bidon2{Here}: ∀ int *t; !*(t + 0) ≡ 0; */ /*@ predicate foo{L}(int *a, int *b, int length) = diff --git a/tests/spec/oracle/real_typing_bts1309.res.oracle b/tests/spec/oracle/real_typing_bts1309.res.oracle index 263809eb183..47e5a9adb68 100644 --- a/tests/spec/oracle/real_typing_bts1309.res.oracle +++ b/tests/spec/oracle/real_typing_bts1309.res.oracle @@ -3,7 +3,7 @@ void foo(int c) { float f = (float)1.0; - /*@ assert 0.0 ≤ (c ≢ 0? f: 2.0); */ ; + /*@ assert 0.0 ≤ (c? f: 2.0); */ ; return; } diff --git a/tests/syntax/oracle/static_formals_1.res.oracle b/tests/syntax/oracle/static_formals_1.res.oracle index a699b713faa..33d75e1e69f 100644 --- a/tests/syntax/oracle/static_formals_1.res.oracle +++ b/tests/syntax/oracle/static_formals_1.res.oracle @@ -2,23 +2,23 @@ [kernel] Parsing tests/syntax/static_formals_2.c (with preprocessing) /* Generated by Frama-C */ /*@ requires /* vid:23, lvid:23 */x < 10; */ -static int /* vid:52 */f(int /* vid:23, lvid:23 */x); +static int /* vid:54 */f(int /* vid:23, lvid:23 */x); -int /* vid:26 */g(void) +int /* vid:28 */g(void) { - int /* vid:27 */tmp; - /* vid:27 */tmp = /* vid:52 */f(4); - return /* vid:27 */tmp; + int /* vid:29 */tmp; + /* vid:29 */tmp = /* vid:54 */f(4); + return /* vid:29 */tmp; } -/*@ requires /* vid:47, lvid:47 */x < 10; */ -static int /* vid:53 */f_0(int /* vid:47, lvid:47 */x); +/*@ requires /* vid:49, lvid:49 */x < 10; */ +static int /* vid:55 */f_0(int /* vid:49, lvid:49 */x); -int /* vid:50 */h(void) +int /* vid:52 */h(void) { - int /* vid:51 */tmp; - /* vid:51 */tmp = /* vid:53 */f_0(6); - return /* vid:51 */tmp; + int /* vid:53 */tmp; + /* vid:53 */tmp = /* vid:55 */f_0(6); + return /* vid:53 */tmp; } -- GitLab From 00b55fa3409f9aef6071f92dba254cfd72b2f0c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 24 Apr 2019 16:32:47 +0200 Subject: [PATCH 319/376] [wp] fix change log for potassium --- src/plugins/wp/Changelog | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/src/plugins/wp/Changelog b/src/plugins/wp/Changelog index 7ccb3f4c493..60844cd373c 100644 --- a/src/plugins/wp/Changelog +++ b/src/plugins/wp/Changelog @@ -20,15 +20,15 @@ # <Prover>: prover ############################################################################### -- Wp [2019/28/01] Now -wp-dynamic is set by default (annotation @calls) - - - Wp [2019/01/28] New floating-point model - - WP [2019/02/05] Auto filter properties with name "no_wp:" - - Wp [2019/01/28] New floating-point model + - Wp [2019/04/24] Support for Why3 1.* and Coq 8.{7-9} + - Wp [2019/02/26] Support for @check ACSL annotations - WP [2018/02/16] Filter out some variables from separation - TIP [2018/02/15] Extend bitwise-eq auto-strategy on hypotheses - TIP [2018/02/15] Fix wrong reconciliation of sub-scripts during replay - Wp [2018/02/15] Better naming convention, consistent with report-classify + - WP [2019/02/05] Auto filter properties with name "no_wp:" + - Wp [2019/01/28] Now -wp-dynamic is set by default (annotation @calls) + - Wp [2019/01/28] New floating-point model - Wp [2018/01/18] Auto-Search mode, see -wp-auto - TIP [2018/01/18] Auto-Search mode from the GUI - TIP [2018/01/18] New Strategies for bitwise and congruence operations @@ -38,21 +38,8 @@ - TIP [2017/04/25] New tactical Congruence (divisions and products) - Qed [2017/10/30] Extends simplifications for lsl,lsr and div - Wp [2017/10/27] Fix soundness bug when assigning non-valid ranges - - Qed [2017/10/27] New simplifications for validirt and ranges + - Qed [2017/10/27] New simplifications for validity and ranges - TIP [2017/10/27] New tacticals for validity and ranges - - TIP [2017/04/25] Options -wp-time-{extra|margin} for more stability - -* Gui [2017/04/25] Fixed bug when running prover from the TIP - - Wp [2017/04/25] Improved model and simplifications of logical shifts - - Wp [2017/04/25] New simplification logic functions (-wp-reduce) - - Wp [2017/04/25] New simplification of unused variables (-wp-parasite) - - Wp [2017/04/25] New simplification for ground terms (-wp-ground) - - Wp [2017/04/25] Option -wp-prenex to normalize nested binders - - Wp [2017/04/25] Option -wp-overflows to add explicit assumptions - - TIP [2017/04/25] New tactical Overflow (to cope with modulus) - - TIP [2017/04/25] New tactical Bitwised, BitRange and Shift - - TIP [2017/04/25] New tactical Rewrite (two apply equalities) - - Wp [2017/03/12] Reduction of equalities with logic functions - - Wp [2017/03/12] More simplifications wrt integer domains ###################### Plugin WP 18.0 (Argon) -- GitLab From 4b5da92387c775d258503189cf6dc92f37a1b28e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Wed, 24 Apr 2019 21:08:08 +0200 Subject: [PATCH 320/376] [Eva] Fixes a crash on logic coercions from booleans to integers. --- src/plugins/value/legacy/eval_terms.ml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/plugins/value/legacy/eval_terms.ml b/src/plugins/value/legacy/eval_terms.ml index 72aaae64939..a48ee527aeb 100644 --- a/src/plugins/value/legacy/eval_terms.ml +++ b/src/plugins/value/legacy/eval_terms.ml @@ -887,9 +887,7 @@ let rec eval_term ~alarm_mode env t = nothing to do, AND coercion from an integer type to a floating-point type, that require a conversion. *) (match Logic_const.plain_or_set Extlib.id ltyp with - | Linteger -> - assert (Logic_typing.is_integral_type t.term_type); - r + | Linteger when Logic_typing.is_integral_type t.term_type -> r | Ctype typ when Cil.isIntegralOrPointerType typ -> r | Lreal -> if Logic_typing.is_integral_type t.term_type -- GitLab From d08808e74d48945dd428c10af691d306c3c4165d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Wed, 24 Apr 2019 22:21:25 +0200 Subject: [PATCH 321/376] [Eva] Fixes the interpretation of logic casts from integer to _Bool. The function Cvalue.V.cast_int_to_int is unsound here, as conversions to the _Bool type obey a different rule. This case never happens in the C AST, as conversions (_Bool)x are translated into (_Bool)(x != 0). --- src/plugins/value/legacy/eval_terms.ml | 30 ++++++++++++++++++-------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/plugins/value/legacy/eval_terms.ml b/src/plugins/value/legacy/eval_terms.ml index a48ee527aeb..ec743004289 100644 --- a/src/plugins/value/legacy/eval_terms.ml +++ b/src/plugins/value/legacy/eval_terms.ml @@ -604,6 +604,19 @@ let cast ~src_typ ~dst_typ v = | TSFloat fkind, TSFloat _ -> Cvalue.V.cast_float_to_float (Fval.kind fkind) v +(* V.cast_int_to_int is unsound when the destination type is _Bool. + Use this function instead. *) +let cast_to_bool r = + let contains_zero = V.contains_zero r.eover + and contains_non_zero = V.contains_non_zero r.eover in + let eover = V.interp_boolean ~contains_zero ~contains_non_zero in + { eover; eunder = under_from_over eover; + ldeps = r.ldeps; etype = TInt (IBool, []) } + +let is_bool typ = match Cil.unrollType typ with + | TInt (IBool, _) -> true + | _ -> false + (* -------------------------------------------------------------------------- *) (* --- Inlining of defined logic functions and predicates --- *) (* -------------------------------------------------------------------------- *) @@ -835,15 +848,14 @@ let rec eval_term ~alarm_mode env t = | TCastE (typ, t) -> let r = eval_term ~alarm_mode env t in - let eover, eunder = - (* See if the cast does something. If not, we can keep eunder as is.*) - if is_noop_cast ~src_typ:t.term_type ~dst_typ:typ - then r.eover, r.eunder - else - let eover = cast ~src_typ:r.etype ~dst_typ:typ r.eover in - eover, under_from_over eover - in - { etype = typ; ldeps = r.ldeps; eunder; eover } + (* See if the cast does something. If not, we can keep eunder as is.*) + if is_noop_cast ~src_typ:t.term_type ~dst_typ:typ + then { r with etype = typ } + else if is_bool typ + then cast_to_bool r + else + let eover = cast ~src_typ:r.etype ~dst_typ:typ r.eover in + { etype = typ; ldeps = r.ldeps; eunder = under_from_over eover; eover } | Tif (tcond, ttrue, tfalse) -> eval_tif eval_term Cvalue.V.join Cvalue.V.meet ~alarm_mode env -- GitLab From 8e18736eaaf3cbeff5ab8a450745580503ea4e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Wed, 24 Apr 2019 22:28:45 +0200 Subject: [PATCH 322/376] [Eva] Eval_term: interprets logic coercions between integer and boolean types. --- src/plugins/value/legacy/eval_terms.ml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/plugins/value/legacy/eval_terms.ml b/src/plugins/value/legacy/eval_terms.ml index ec743004289..c60e4d58b85 100644 --- a/src/plugins/value/legacy/eval_terms.ml +++ b/src/plugins/value/legacy/eval_terms.ml @@ -899,7 +899,8 @@ let rec eval_term ~alarm_mode env t = nothing to do, AND coercion from an integer type to a floating-point type, that require a conversion. *) (match Logic_const.plain_or_set Extlib.id ltyp with - | Linteger when Logic_typing.is_integral_type t.term_type -> r + | Linteger when Logic_typing.is_integral_type t.term_type + || Logic_const.is_boolean_type t.term_type -> r | Ctype typ when Cil.isIntegralOrPointerType typ -> r | Lreal -> if Logic_typing.is_integral_type t.term_type @@ -915,9 +916,14 @@ let rec eval_term ~alarm_mode env t = ldeps = r.ldeps; eunder = under_from_over eover; eover; } - | _ -> unsupported - (Format.asprintf "logic coercion %a -> %a@." - Printer.pp_logic_type t.term_type Printer.pp_logic_type ltyp) + | _ -> + if Logic_const.is_boolean_type ltyp + && Logic_typing.is_integral_type t.term_type + then cast_to_bool r + else + unsupported + (Format.asprintf "logic coercion %a -> %a@." + Printer.pp_logic_type t.term_type Printer.pp_logic_type ltyp) ) (* TODO: the meaning of the label in \offset and \base_addr is not obvious -- GitLab From f5a2dcf105a92cf87a347f559416a002bbbafd06 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 25 Apr 2019 02:04:47 +0200 Subject: [PATCH 323/376] update WP oracles --- .../wp_acsl/oracle/funvar_inv.1.res.oracle | 24 ++++----- .../wp/tests/wp_acsl/oracle/logic.res.oracle | 50 +++++++++---------- .../wp_acsl/oracle/precedence.res.oracle | 14 +++--- .../tests/wp_bts/oracle/bts_1382.res.oracle | 4 +- .../tests/wp_hoare/oracle/logicarr.res.oracle | 6 +-- .../oracle/logicref_simple.res.oracle | 2 +- .../tests/wp_plugin/oracle/dynamic.res.oracle | 6 +-- .../tests/wp_plugin/oracle/flash.0.res.oracle | 20 ++++---- .../tests/wp_plugin/oracle/flash.1.res.oracle | 20 ++++---- .../tests/wp_plugin/oracle/frame.res.oracle | 2 +- .../wp_plugin/oracle/overassign.res.oracle | 32 ++++++------ .../tests/wp_store/oracle/struct.res.oracle | 8 +-- .../oracle/array_initialized.0.res.oracle | 2 +- .../oracle/array_initialized.1.res.oracle | 8 +-- .../wp_typed/oracle/user_init.0.res.oracle | 32 ++++++------ .../wp_typed/oracle/user_init.1.res.oracle | 32 ++++++------ .../tests/wp_usage/oracle/caveat.1.res.oracle | 2 +- .../oracle/issue-189-bis.0.res.oracle | 22 ++++---- .../oracle/issue-189-bis.1.res.oracle | 16 +++--- 19 files changed, 150 insertions(+), 152 deletions(-) diff --git a/src/plugins/wp/tests/wp_acsl/oracle/funvar_inv.1.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle/funvar_inv.1.res.oracle index eed072a4459..08da43a4584 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle/funvar_inv.1.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle/funvar_inv.1.res.oracle @@ -17,10 +17,10 @@ Assume { (* Heap *) Have: linked(Malloc_0). (* Initializer *) - Init: Mint_0[global(L_i_23)] = 0. + Init: Mint_0[global(L_i_25)] = 0. If v <= 3 Then { (* Else *) Have: Mint_0[f] = 0. Have: shift_sint32(a, v) = f. } - Else { Have: global(L_i_23) = f. } + Else { Have: global(L_i_25) = f. } } Prove: a_1 = f. @@ -37,10 +37,10 @@ Assume { (* Heap *) Have: linked(Malloc_0). (* Initializer *) - Init: Mint_0[global(L_i_23)] = 0. + Init: Mint_0[global(L_i_25)] = 0. If v <= 3 Then { (* Else *) Have: Mint_0[f] = 0. Have: shift_sint32(a, v) = f. } - Else { Have: global(L_i_23) = f. } + Else { Have: global(L_i_25) = f. } } Prove: a_1 = f. @@ -64,11 +64,11 @@ Assume { (* Heap *) Have: linked(Malloc_0). (* Initializer *) - Init: Mint_0[global(L_i_28)] = 0. + Init: Mint_0[global(L_i_30)] = 0. If v <= 3 Then { (* Else *) Have: Mint_0[f2_0] = 0. Have: shift_sint32(a, v) = f2_0. } - Else { Have: global(L_i_28) = f2_0. } + Else { Have: global(L_i_30) = f2_0. } } Prove: a_1 = f2_0. @@ -85,11 +85,11 @@ Assume { (* Heap *) Have: linked(Malloc_0). (* Initializer *) - Init: Mint_0[global(L_i_28)] = 0. + Init: Mint_0[global(L_i_30)] = 0. If v <= 3 Then { (* Else *) Have: Mint_0[f2_0] = 0. Have: shift_sint32(a, v) = f2_0. } - Else { Have: global(L_i_28) = f2_0. } + Else { Have: global(L_i_30) = f2_0. } } Prove: a_1 = f2_0. @@ -113,10 +113,10 @@ Assume { (* Heap *) Have: linked(Malloc_0). (* Initializer *) - Init: Mint_0[global(L_i_33)] = 0. + Init: Mint_0[global(L_i_35)] = 0. If v <= 3 Then { (* Else *) Have: Mint_0[g] = 0. Have: shift_sint32(a, v) = g. } - Else { Have: global(L_i_33) = g. } + Else { Have: global(L_i_35) = g. } } Prove: a_1 = g. @@ -133,10 +133,10 @@ Assume { (* Heap *) Have: linked(Malloc_0). (* Initializer *) - Init: Mint_0[global(L_i_33)] = 0. + Init: Mint_0[global(L_i_35)] = 0. If v <= 3 Then { (* Else *) Have: Mint_0[g] = 0. Have: shift_sint32(a, v) = g. } - Else { Have: global(L_i_33) = g. } + Else { Have: global(L_i_35) = g. } } Prove: a_1 = g. diff --git a/src/plugins/wp/tests/wp_acsl/oracle/logic.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle/logic.res.oracle index a3547cdccf7..a3cea5bd698 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle/logic.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle/logic.res.oracle @@ -62,11 +62,11 @@ Prove: true. ------------------------------------------------------------ Goal Pre-condition 'qed_ok' in 'main': -Let a = global(G_tr_31). +Let a = global(G_tr_33). Let a_1 = shift___anonstruct_Point_1(a, 2). Let a_2 = shift___anonstruct_Point_1(a, 1). Let a_3 = shift___anonstruct_Point_1(a, 0). -Let a_4 = shiftfield_F4_bytes(global(G_buint_37)). +Let a_4 = shiftfield_F4_bytes(global(G_buint_39)). Let m = Array1_S1(a_3, 3, Mint_0). Assume { Type: IsArray1S1(m). @@ -91,18 +91,18 @@ Assume { (* Initializer *) Init: Mint_0[shiftfield_F1_y(a_1)] = 31. (* Heap *) - Have: region(G_tr_31) <= 0. + Have: region(G_tr_33) <= 0. } Prove: P_P(m). ------------------------------------------------------------ Goal Pre-condition 'qed_ok' in 'main': -Let a = global(G_tr_31). +Let a = global(G_tr_33). Let a_1 = shift___anonstruct_Point_1(a, 2). Let a_2 = shift___anonstruct_Point_1(a, 1). Let a_3 = shift___anonstruct_Point_1(a, 0). -Let a_4 = shiftfield_F4_bytes(global(G_buint_37)). +Let a_4 = shiftfield_F4_bytes(global(G_buint_39)). Let m = Array1_S1(a_3, 3, Mint_0). Assume { Type: IsArray1S1(m). @@ -127,18 +127,18 @@ Assume { (* Initializer *) Init: Mint_0[shiftfield_F1_y(a_1)] = 31. (* Heap *) - Have: region(G_tr_31) <= 0. + Have: region(G_tr_33) <= 0. } Prove: P_P(m). ------------------------------------------------------------ Goal Pre-condition 'qed_ok' in 'main': -Let a = global(G_tr_31). +Let a = global(G_tr_33). Let a_1 = shift___anonstruct_Point_1(a, 2). Let a_2 = shift___anonstruct_Point_1(a, 1). Let a_3 = shift___anonstruct_Point_1(a, 0). -Let a_4 = shiftfield_F4_bytes(global(G_buint_37)). +Let a_4 = shiftfield_F4_bytes(global(G_buint_39)). Let m = Array1_S1(a_3, 3, Mint_0). Assume { Type: IsArray1S1(m). @@ -163,7 +163,7 @@ Assume { (* Initializer *) Init: Mint_0[shiftfield_F1_y(a_1)] = 31. (* Heap *) - Have: region(G_tr_31) <= 0. + Have: region(G_tr_33) <= 0. } Prove: P_P(m). @@ -173,7 +173,7 @@ Goal Pre-condition 'qed_ok' in 'main': tests/wp_acsl/logic.i:49: warning from wp: - Warning: Hide sub-term definition Reason: Logic cast from struct (Tint2) not implemented yet -Assume { (* Heap *) Have: region(G_tr_31) <= 0. } +Assume { (* Heap *) Have: region(G_tr_33) <= 0. } Prove: (w.F1_y) = 11. ------------------------------------------------------------ @@ -182,7 +182,7 @@ Goal Pre-condition 'qed_ok' in 'main': tests/wp_acsl/logic.i:50: warning from wp: - Warning: Hide sub-term definition Reason: Logic cast from struct (Point) not implemented yet -Assume { (* Heap *) Have: region(G_tr_31) <= 0. } +Assume { (* Heap *) Have: region(G_tr_33) <= 0. } Prove: (w.F3_tab)[1] = 11. ------------------------------------------------------------ @@ -191,7 +191,7 @@ Goal Pre-condition 'qed_ok' in 'main': tests/wp_acsl/logic.i:51: warning from wp: - Warning: Hide sub-term definition Reason: Logic cast to struct (Point) from (int [2]) not implemented yet -Assume { (* Heap *) Have: region(G_tr_31) <= 0. } +Assume { (* Heap *) Have: region(G_tr_33) <= 0. } Prove: (w.F1_y) = 11. ------------------------------------------------------------ @@ -200,7 +200,7 @@ Goal Pre-condition 'qed_ok' in 'main': tests/wp_acsl/logic.i:52: warning from wp: - Warning: Hide sub-term definition Reason: Logic cast from struct (Point) not implemented yet -Assume { (* Heap *) Have: region(G_tr_31) <= 0. } +Assume { (* Heap *) Have: region(G_tr_33) <= 0. } Prove: w[1] = 11. ------------------------------------------------------------ @@ -209,7 +209,7 @@ Goal Pre-condition 'qed_ok' in 'main': tests/wp_acsl/logic.i:53: warning from wp: - Warning: Hide sub-term definition Reason: Logic cast from struct (Tint2) not implemented yet -Assume { (* Heap *) Have: region(G_tr_31) <= 0. } +Assume { (* Heap *) Have: region(G_tr_33) <= 0. } Prove: w[1] = 11. ------------------------------------------------------------ @@ -218,7 +218,7 @@ Goal Pre-condition 'qed_ok' in 'main': tests/wp_acsl/logic.i:54: warning from wp: - Warning: Hide sub-term definition Reason: Logic cast from struct (Buint) not implemented yet -Assume { (* Heap *) Have: region(G_tr_31) <= 0. } +Assume { (* Heap *) Have: region(G_tr_33) <= 0. } Prove: w = 134480385. ------------------------------------------------------------ @@ -227,11 +227,11 @@ Goal Pre-condition 'qed_ok' in 'main': tests/wp_acsl/logic.i:55: warning from wp: - Warning: Hide sub-term definition Reason: Logic cast to struct (Buint) from (unsigned int) not implemented yet -Let a = global(G_tr_31). +Let a = global(G_tr_33). Let a_1 = shift___anonstruct_Point_1(a, 2). Let a_2 = shift___anonstruct_Point_1(a, 1). Let a_3 = shift___anonstruct_Point_1(a, 0). -Let a_4 = global(G_buint_37). +Let a_4 = global(G_buint_39). Let a_5 = shiftfield_F4_bytes(a_4). Let a_6 = Load_S4(a_4, Mint_0). Assume { @@ -257,7 +257,7 @@ Assume { (* Initializer *) Init: Mint_0[shiftfield_F1_y(a_1)] = 31. (* Heap *) - Have: region(G_tr_31) <= 0. + Have: region(G_tr_33) <= 0. } Prove: EqS4(a_6, w). @@ -267,7 +267,7 @@ Goal Pre-condition 'qed_ok' in 'main': tests/wp_acsl/logic.i:56: warning from wp: - Warning: Hide sub-term definition Reason: Logic cast from struct (Tint6) not implemented yet -Assume { (* Heap *) Have: region(G_tr_31) <= 0. } +Assume { (* Heap *) Have: region(G_tr_33) <= 0. } Prove: (w[1].F1_y) = 21. ------------------------------------------------------------ @@ -276,7 +276,7 @@ Goal Pre-condition 'qed_ok' in 'main': tests/wp_acsl/logic.i:57: warning from wp: - Warning: Hide sub-term definition Reason: Logic cast to sized array (Triangle) from (int [6]) not implemented yet -Assume { (* Heap *) Have: region(G_tr_31) <= 0. } +Assume { (* Heap *) Have: region(G_tr_33) <= 0. } Prove: (w[1].F1_y) = 21. ------------------------------------------------------------ @@ -285,7 +285,7 @@ Goal Pre-condition 'qed_ok' in 'main': tests/wp_acsl/logic.i:58: warning from wp: - Warning: Hide sub-term definition Reason: Logic cast from struct (Tint6) not implemented yet -Assume { (* Heap *) Have: region(G_tr_31) <= 0. } +Assume { (* Heap *) Have: region(G_tr_33) <= 0. } Prove: w[4] = 30. ------------------------------------------------------------ @@ -294,7 +294,7 @@ Goal Pre-condition 'qed_ok' in 'main': tests/wp_acsl/logic.i:59: warning from wp: - Warning: Hide sub-term definition Reason: Logic cast from struct (Tint6) not implemented yet -Assume { (* Heap *) Have: region(G_tr_31) <= 0. } +Assume { (* Heap *) Have: region(G_tr_33) <= 0. } Prove: w[1] = 11. ------------------------------------------------------------ @@ -303,7 +303,7 @@ Goal Pre-condition 'qed_ok' in 'main': tests/wp_acsl/logic.i:60: warning from wp: - Warning: Hide sub-term definition Reason: Logic cast to sized array (int [2]) from (int [6]) not implemented yet -Assume { (* Heap *) Have: region(G_tr_31) <= 0. } +Assume { (* Heap *) Have: region(G_tr_33) <= 0. } Prove: w[1] = 11. ------------------------------------------------------------ @@ -312,7 +312,7 @@ Goal Pre-condition 'qed_ok' in 'main': tests/wp_acsl/logic.i:61: warning from wp: - Warning: Hide sub-term definition Reason: Logic cast from struct (Tint6) not implemented yet -Assume { (* Heap *) Have: region(G_tr_31) <= 0. } +Assume { (* Heap *) Have: region(G_tr_33) <= 0. } Prove: (w.F3_tab)[1] = 11. ------------------------------------------------------------ @@ -321,7 +321,7 @@ Goal Pre-condition 'qed_ok' in 'main': tests/wp_acsl/logic.i:62: warning from wp: - Warning: Hide sub-term definition Reason: Logic cast to struct (Tint2) from (int [6]) not implemented yet -Assume { (* Heap *) Have: region(G_tr_31) <= 0. } +Assume { (* Heap *) Have: region(G_tr_33) <= 0. } Prove: (w.F3_tab)[1] = 11. ------------------------------------------------------------ diff --git a/src/plugins/wp/tests/wp_acsl/oracle/precedence.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle/precedence.res.oracle index 0071a69eb1e..ff38ac48c05 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle/precedence.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle/precedence.res.oracle @@ -778,19 +778,17 @@ void predicate(int x, int a, int b) ensures ko: r_precedence_and_eq: \old(p) ≡ \old(q) ∧ \old(r) ≢ 0 ⇔ - (\old(p) ≢ 0) ≡ (\old(q) ≢ 0 ∧ \old(r) ≢ 0); + \old(p) ≡ (\old(q) ∧ \old(r)); ensures ko: l_precedence_and_eq: \old(p) ≢ 0 ∧ \old(q) ≡ \old(r) ⇔ - (\old(p) ≢ 0 ∧ \old(q) ≢ 0) ≡ (\old(r) ≢ 0); + (\old(p) ∧ \old(q)) ≡ \old(r); ensures ko: l_nonassoc_eq: - \old(p) ≡ \old(q) ≡ \old(r) ⇔ - (\old(p) ≡ \old(q)) ≡ (\old(r) ≢ 0); + \old(p) ≡ \old(q) ≡ \old(r) ⇔ (\old(p) ≡ \old(q)) ≡ \old(r); ensures ko: r_nonassoc_eq: - \old(p) ≡ \old(q) ≡ \old(r) ⇔ - (\old(p) ≢ 0) ≡ (\old(q) ≡ \old(r)); + \old(p) ≡ \old(q) ≡ \old(r) ⇔ \old(p) ≡ (\old(q) ≡ \old(r)); ensures r_precedence_neq_and: \old(p) ≢ \old(q) ∧ R ⇔ \old(p) ≢ \old(q) ∧ R; @@ -800,11 +798,11 @@ void predicate(int x, int a, int b) ensures ko: r_precedence_and_neq: \old(p) ≢ \old(q) ∧ \old(r) ≢ 0 ⇔ - (\old(p) ≢ 0) ≢ (\old(q) ≢ 0 ∧ \old(r) ≢ 0); + \old(p) ≢ (\old(q) ∧ \old(r)); ensures ko: l_precedence_and_neq: \old(p) ≢ 0 ∧ \old(q) ≢ \old(r) ⇔ - (\old(p) ≢ 0 ∧ \old(q) ≢ 0) ≢ (\old(r) ≢ 0); + (\old(p) ∧ \old(q)) ≢ \old(r); */ void comparison(int p, int q, int r) { diff --git a/src/plugins/wp/tests/wp_bts/oracle/bts_1382.res.oracle b/src/plugins/wp/tests/wp_bts/oracle/bts_1382.res.oracle index c879e33dc86..fda8518f28c 100644 --- a/src/plugins/wp/tests/wp_bts/oracle/bts_1382.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle/bts_1382.res.oracle @@ -41,7 +41,7 @@ Assume { (* Then *) Have: i <= 99. } -Prove: global(G_dest_41) = w. +Prove: global(G_dest_43) = w. ------------------------------------------------------------ @@ -66,6 +66,6 @@ Assume { (* Then *) Have: i <= 99. } -Prove: included(a, 4, global(G_dest_41), 1). +Prove: included(a, 4, global(G_dest_43), 1). ------------------------------------------------------------ diff --git a/src/plugins/wp/tests/wp_hoare/oracle/logicarr.res.oracle b/src/plugins/wp/tests/wp_hoare/oracle/logicarr.res.oracle index dc2bde48d0b..1c6d6b15d61 100644 --- a/src/plugins/wp/tests/wp_hoare/oracle/logicarr.res.oracle +++ b/src/plugins/wp/tests/wp_hoare/oracle/logicarr.res.oracle @@ -8,7 +8,7 @@ ------------------------------------------------------------ Goal Post-condition 'PTR' in 'job': -Let a = global(G_arr_31). +Let a = global(G_arr_33). Let a_1 = shift_sint32(a, i). Let x = Mint_0[a_1]. Let a_2 = shift_sint32(a, 0). @@ -26,7 +26,7 @@ Prove: P_p_pointer(m, Mint_0, a_2, i, j). ------------------------------------------------------------ Goal Post-condition 'ARR' in 'job': -Let a = global(G_arr_31). +Let a = global(G_arr_33). Let a_1 = shift_sint32(a, i). Let x = Mint_0[a_1]. Let a_2 = shift_sint32(a, 0). @@ -45,7 +45,7 @@ Prove: P_p_arrays(m, i, m_1, j). ------------------------------------------------------------ Goal Post-condition 'DUM' in 'job': -Let a = global(G_arr_31). +Let a = global(G_arr_33). Let a_1 = shift_sint32(a, i). Let x = Mint_0[a_1]. Let a_2 = shift_sint32(a, 0). diff --git a/src/plugins/wp/tests/wp_hoare/oracle/logicref_simple.res.oracle b/src/plugins/wp/tests/wp_hoare/oracle/logicref_simple.res.oracle index 95a881fa681..094d6b42af2 100644 --- a/src/plugins/wp/tests/wp_hoare/oracle/logicref_simple.res.oracle +++ b/src/plugins/wp/tests/wp_hoare/oracle/logicref_simple.res.oracle @@ -39,7 +39,7 @@ Prove: true. ------------------------------------------------------------ Goal Post-condition (file tests/wp_hoare/logicref_simple.i, line 19) in 'fsimple_array': -Let a = global(G_t_31). +Let a = global(G_t_33). Let x = Mint_0[shift_sint32(a, 3)]. Assume { Type: is_sint32(x) /\ is_sint32(1 + x). diff --git a/src/plugins/wp/tests/wp_plugin/oracle/dynamic.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/dynamic.res.oracle index 7c09c9927c0..cd88f4ec2a0 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/dynamic.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/dynamic.res.oracle @@ -77,7 +77,7 @@ Prove: true. Goal Call point f1 f2 in 'call' at instruction (file tests/wp_plugin/dynamic.i, line 30): Let a = Mptr_0[shiftfield_F1_S_f(closure_0)]. -Let a_1 = global(G_f2_26). +Let a_1 = global(G_f2_28). Let a_2 = global(G_f1_20). Let x = Mint_0[shiftfield_F1_S_param(closure_0)]. Assume { @@ -137,7 +137,7 @@ Assume { (* Heap *) Have: (region(p.base) <= 0) /\ framed(Mptr_0). (* Else *) - Have: G_g_44 = 0. + Have: G_g_46 = 0. } Prove: X = 1. @@ -165,7 +165,7 @@ Prove: true. Goal Call point h1 in 'missing_context' at instruction (file tests/wp_plugin/dynamic.i, line 87): Assume { (* Heap *) Have: region(p.base) <= 0. } -Prove: global(G_h1_57) = p. +Prove: global(G_h1_59) = p. ------------------------------------------------------------ diff --git a/src/plugins/wp/tests/wp_plugin/oracle/flash.0.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/flash.0.res.oracle index 930cc582729..db2c070f9c2 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/flash.0.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/flash.0.res.oracle @@ -14,9 +14,9 @@ Prove: true. Goal Post-condition 'A_reads' in 'job': Let x = 1 + OBSERVER_time_0. -Let a = global(G_a_60). +Let a = global(G_a_62). Let a_1 = C_RdAt_int(a). -Let a_2 = global(G_b_61). +Let a_2 = global(G_b_63). Let a_3 = C_RdAt_int(a_2). Let a_4 = C_WrAt_int(a_2). Let a_5 = L_RD_update(L_INDEX_init, a). @@ -58,9 +58,9 @@ Prove: L_RD_access(a_7, a) = 2. Goal Post-condition 'B_reads' in 'job': Let x = 1 + OBSERVER_time_0. -Let a = global(G_a_60). +Let a = global(G_a_62). Let a_1 = C_RdAt_int(a). -Let a_2 = global(G_b_61). +Let a_2 = global(G_b_63). Let a_3 = C_RdAt_int(a_2). Let a_4 = C_WrAt_int(a_2). Let a_5 = L_RD_update(L_INDEX_init, a). @@ -102,9 +102,9 @@ Prove: L_RD_access(a_7, a_2) = 1. Goal Post-condition 'B_writes' in 'job': Let x = 1 + OBSERVER_time_0. -Let a = global(G_a_60). +Let a = global(G_a_62). Let a_1 = C_RdAt_int(a). -Let a_2 = global(G_b_61). +Let a_2 = global(G_b_63). Let a_3 = C_RdAt_int(a_2). Let a_4 = C_WrAt_int(a_2). Let a_5 = L_RD_update(L_INDEX_init, a). @@ -146,9 +146,9 @@ Prove: L_WR_access(a_7, a_2) = 1. Goal Post-condition 'ReadValues' in 'job': Let x = 1 + OBSERVER_time_0. -Let a = global(G_a_60). +Let a = global(G_a_62). Let a_1 = C_RdAt_int(a). -Let a_2 = global(G_b_61). +Let a_2 = global(G_b_63). Let a_3 = C_RdAt_int(a_2). Let a_4 = C_WrAt_int(a_2). Let a_5 = L_RD_update(L_INDEX_init, a). @@ -191,9 +191,9 @@ Prove: (x_6 + L_RD_value(a_2, L_RD_access(a_5, a_2)) Goal Post-condition 'WriteValues' in 'job': Let x = 1 + OBSERVER_time_0. -Let a = global(G_a_60). +Let a = global(G_a_62). Let a_1 = C_RdAt_int(a). -Let a_2 = global(G_b_61). +Let a_2 = global(G_b_63). Let a_3 = C_RdAt_int(a_2). Let a_4 = C_WrAt_int(a_2). Let a_5 = L_RD_update(L_INDEX_init, a). diff --git a/src/plugins/wp/tests/wp_plugin/oracle/flash.1.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/flash.1.res.oracle index 6399033a6b7..ed8294e3ee5 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/flash.1.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/flash.1.res.oracle @@ -16,9 +16,9 @@ Prove: true. Goal Post-condition 'A_reads' in 'job': Let x = 1 + OBSERVER_time_0. -Let a = global(G_a_60). +Let a = global(G_a_62). Let a_1 = C_RdAt_int(a). -Let a_2 = global(G_b_61). +Let a_2 = global(G_b_63). Let a_3 = C_RdAt_int(a_2). Let a_4 = C_WrAt_int(a_2). Let a_5 = ((const(0))[(a) <- (const(0))[a]+1]). @@ -59,9 +59,9 @@ Prove: (a_7)[a] = 2. Goal Post-condition 'B_reads' in 'job': Let x = 1 + OBSERVER_time_0. -Let a = global(G_a_60). +Let a = global(G_a_62). Let a_1 = C_RdAt_int(a). -Let a_2 = global(G_b_61). +Let a_2 = global(G_b_63). Let a_3 = C_RdAt_int(a_2). Let a_4 = C_WrAt_int(a_2). Let a_5 = ((const(0))[(a) <- (const(0))[a]+1]). @@ -102,9 +102,9 @@ Prove: (a_7)[a_2] = 1. Goal Post-condition 'B_writes' in 'job': Let x = 1 + OBSERVER_time_0. -Let a = global(G_a_60). +Let a = global(G_a_62). Let a_1 = C_RdAt_int(a). -Let a_2 = global(G_b_61). +Let a_2 = global(G_b_63). Let a_3 = C_RdAt_int(a_2). Let a_4 = C_WrAt_int(a_2). Let a_5 = ((const(0))[(a) <- (const(0))[a]+1]). @@ -145,9 +145,9 @@ Prove: (a_7)[a_2] = 1. Goal Post-condition 'ReadValues' in 'job': Let x = 1 + OBSERVER_time_0. -Let a = global(G_a_60). +Let a = global(G_a_62). Let a_1 = C_RdAt_int(a). -Let a_2 = global(G_b_61). +Let a_2 = global(G_b_63). Let a_3 = C_RdAt_int(a_2). Let a_4 = C_WrAt_int(a_2). Let a_5 = ((const(0))[(a) <- (const(0))[a]+1]). @@ -188,9 +188,9 @@ Prove: (x_6 + L_RD_value(a_2, (a_5)[a_2]) + L_RD_value(a, (a_6)[a])) Goal Post-condition 'WriteValues' in 'job': Let x = 1 + OBSERVER_time_0. -Let a = global(G_a_60). +Let a = global(G_a_62). Let a_1 = C_RdAt_int(a). -Let a_2 = global(G_b_61). +Let a_2 = global(G_b_63). Let a_3 = C_RdAt_int(a_2). Let a_4 = C_WrAt_int(a_2). Let a_5 = ((const(0))[(a) <- (const(0))[a]+1]). diff --git a/src/plugins/wp/tests/wp_plugin/oracle/frame.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/frame.res.oracle index 51dd9fadb37..8b51eb581fd 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/frame.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/frame.res.oracle @@ -8,7 +8,7 @@ ------------------------------------------------------------ Goal Post-condition 'KO' in 'alias': -Let a = global(P_r_37). +Let a = global(P_r_39). Let x = Mint_1[a]. Let x_1 = Mint_0[a]. Assume { diff --git a/src/plugins/wp/tests/wp_plugin/oracle/overassign.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/overassign.res.oracle index 2705859a518..b558a7a6296 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/overassign.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/overassign.res.oracle @@ -39,15 +39,15 @@ Prove: true. Goal Assigns nothing in 'f3_ok': Call Effect at line 20 -Assume { (* Heap *) Have: (region(G_A_28) <= 0) /\ linked(Malloc_0). } -Prove: invalid(Malloc_0, shift_sint32(global(G_A_28), 20), 10). +Assume { (* Heap *) Have: (region(G_A_30) <= 0) /\ linked(Malloc_0). } +Prove: invalid(Malloc_0, shift_sint32(global(G_A_30), 20), 10). ------------------------------------------------------------ Goal Assigns nothing in 'f3_ok': Call Effect at line 20 -Assume { (* Heap *) Have: (region(G_A_28) <= 0) /\ linked(Malloc_0). } -Prove: invalid(Malloc_0, shift_sint32(global(G_A_28), 20), 10). +Assume { (* Heap *) Have: (region(G_A_30) <= 0) /\ linked(Malloc_0). } +Prove: invalid(Malloc_0, shift_sint32(global(G_A_30), 20), 10). ------------------------------------------------------------ ------------------------------------------------------------ @@ -56,15 +56,15 @@ Prove: invalid(Malloc_0, shift_sint32(global(G_A_28), 20), 10). Goal Assigns nothing in 'f4_ok': Call Effect at line 23 -Assume { (* Heap *) Have: (region(G_A_28) <= 0) /\ linked(Malloc_0). } -Prove: invalid(Malloc_0, shift_sint32(global(G_A_28), -10), 10). +Assume { (* Heap *) Have: (region(G_A_30) <= 0) /\ linked(Malloc_0). } +Prove: invalid(Malloc_0, shift_sint32(global(G_A_30), -10), 10). ------------------------------------------------------------ Goal Assigns nothing in 'f4_ok': Call Effect at line 23 -Assume { (* Heap *) Have: (region(G_A_28) <= 0) /\ linked(Malloc_0). } -Prove: invalid(Malloc_0, shift_sint32(global(G_A_28), -10), 10). +Assume { (* Heap *) Have: (region(G_A_30) <= 0) /\ linked(Malloc_0). } +Prove: invalid(Malloc_0, shift_sint32(global(G_A_30), -10), 10). ------------------------------------------------------------ ------------------------------------------------------------ @@ -73,15 +73,15 @@ Prove: invalid(Malloc_0, shift_sint32(global(G_A_28), -10), 10). Goal Assigns nothing in 'f5_ko': Call Effect at line 26 -Assume { (* Heap *) Have: (region(G_A_28) <= 0) /\ linked(Malloc_0). } -Prove: invalid(Malloc_0, shift_sint32(global(G_A_28), 15), 10). +Assume { (* Heap *) Have: (region(G_A_30) <= 0) /\ linked(Malloc_0). } +Prove: invalid(Malloc_0, shift_sint32(global(G_A_30), 15), 10). ------------------------------------------------------------ Goal Assigns nothing in 'f5_ko': Call Effect at line 26 -Assume { (* Heap *) Have: (region(G_A_28) <= 0) /\ linked(Malloc_0). } -Prove: invalid(Malloc_0, shift_sint32(global(G_A_28), 15), 10). +Assume { (* Heap *) Have: (region(G_A_30) <= 0) /\ linked(Malloc_0). } +Prove: invalid(Malloc_0, shift_sint32(global(G_A_30), 15), 10). ------------------------------------------------------------ ------------------------------------------------------------ @@ -90,14 +90,14 @@ Prove: invalid(Malloc_0, shift_sint32(global(G_A_28), 15), 10). Goal Assigns nothing in 'f6_ko': Call Effect at line 29 -Assume { (* Heap *) Have: (region(G_A_28) <= 0) /\ linked(Malloc_0). } -Prove: invalid(Malloc_0, shift_sint32(global(G_A_28), -5), 10). +Assume { (* Heap *) Have: (region(G_A_30) <= 0) /\ linked(Malloc_0). } +Prove: invalid(Malloc_0, shift_sint32(global(G_A_30), -5), 10). ------------------------------------------------------------ Goal Assigns nothing in 'f6_ko': Call Effect at line 29 -Assume { (* Heap *) Have: (region(G_A_28) <= 0) /\ linked(Malloc_0). } -Prove: invalid(Malloc_0, shift_sint32(global(G_A_28), -5), 10). +Assume { (* Heap *) Have: (region(G_A_30) <= 0) /\ linked(Malloc_0). } +Prove: invalid(Malloc_0, shift_sint32(global(G_A_30), -5), 10). ------------------------------------------------------------ diff --git a/src/plugins/wp/tests/wp_store/oracle/struct.res.oracle b/src/plugins/wp/tests/wp_store/oracle/struct.res.oracle index d69745e50d8..643bf5f8617 100644 --- a/src/plugins/wp/tests/wp_store/oracle/struct.res.oracle +++ b/src/plugins/wp/tests/wp_store/oracle/struct.res.oracle @@ -43,7 +43,7 @@ Prove: true. ------------------------------------------------------------ Goal Post-condition 'P,qed_ok' in 'main': -Let a = global(G_v_26). +Let a = global(G_v_28). Let a_1 = Load_S2_St(a, Mint_0). Assume { Type: IsS2_St(w) /\ IsS2_St(a_1). @@ -56,14 +56,14 @@ Assume { (* Initializer *) Init: Mint_0[shiftfield_F2_St_b(a)] = 2. (* Heap *) - Have: region(G_v_26) <= 0. + Have: region(G_v_28) <= 0. } Prove: EqS2_St(a_1, w). ------------------------------------------------------------ Goal Post-condition 'Q,qed_ok' in 'main': -Let a = global(G_v_26). +Let a = global(G_v_28). Let a_1 = Load_S2_St(a, Mint_0). Assume { Type: IsS2_St(w) /\ IsS2_St(a_1). @@ -76,7 +76,7 @@ Assume { (* Initializer *) Init: Mint_0[shiftfield_F2_St_b(a)] = 2. (* Heap *) - Have: region(G_v_26) <= 0. + Have: region(G_v_28) <= 0. } Prove: EqS2_St(a_1, w). diff --git a/src/plugins/wp/tests/wp_typed/oracle/array_initialized.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle/array_initialized.0.res.oracle index ce3ab2bb5ad..d9091a09166 100644 --- a/src/plugins/wp/tests/wp_typed/oracle/array_initialized.0.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle/array_initialized.0.res.oracle @@ -253,7 +253,7 @@ Assume { When: (0 <= i) /\ (i <= 499). (* Initializer *) Init: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 499) -> - (p[i_1] = global(G_p0_26)))). + (p[i_1] = global(G_p0_28)))). (* Heap *) Have: linked(Malloc_0). } diff --git a/src/plugins/wp/tests/wp_typed/oracle/array_initialized.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle/array_initialized.1.res.oracle index 5a709494563..390cc16f0e0 100644 --- a/src/plugins/wp/tests/wp_typed/oracle/array_initialized.1.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle/array_initialized.1.res.oracle @@ -26,8 +26,8 @@ Prove: Mint_0[shift_sint32(a, i)] = 0. ------------------------------------------------------------ Goal Assertion (file tests/wp_typed/array_initialized.c, line 185): -Let a = global(K_h1_22). -Let a_1 = global(K_h2_23). +Let a = global(K_h1_24). +Let a_1 = global(K_h2_25). Assume { (* Goal *) When: (0 <= i) /\ (i <= 499). @@ -254,13 +254,13 @@ Prove: true. ------------------------------------------------------------ Goal Assertion (file tests/wp_typed/array_initialized.c, line 283): -Let a = global(K_p_30). +Let a = global(K_p_32). Assume { (* Goal *) When: (0 <= i) /\ (i <= 499). (* Initializer *) Init: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 499) -> - (Mptr_0[shift_PTR(a, i_1)] = global(G_p0_29)))). + (Mptr_0[shift_PTR(a, i_1)] = global(G_p0_31)))). (* Heap *) Have: framed(Mptr_0) /\ linked(Malloc_0). } diff --git a/src/plugins/wp/tests/wp_typed/oracle/user_init.0.res.oracle b/src/plugins/wp/tests/wp_typed/oracle/user_init.0.res.oracle index 86999a74131..46aa576f42c 100644 --- a/src/plugins/wp/tests/wp_typed/oracle/user_init.0.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle/user_init.0.res.oracle @@ -232,7 +232,7 @@ Prove: true. ------------------------------------------------------------ Goal Post-condition (file tests/wp_typed/user_init.i, line 127) in 'init_t2_bis_v1': -Let a = global(G_t2_48). +Let a = global(G_t2_50). Assume { Type: is_uint32(i_2) /\ is_sint32(v). (* Goal *) @@ -262,7 +262,7 @@ Prove: true. ------------------------------------------------------------ Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 136): -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Let a_2 = shift_sint32(a_1, 0). Let a_3 = havoc(Mint_undef_0, Mint_0, a_2, 20). @@ -298,7 +298,7 @@ Prove: true. ------------------------------------------------------------ Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 135): -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). @@ -342,7 +342,7 @@ Prove: true. Goal Loop assigns 'lack,Zone' (2/3): Effect at line 139 -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). @@ -379,7 +379,7 @@ Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> Goal Loop assigns 'lack,Zone' (3/3): Call Effect at line 140 -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). @@ -428,7 +428,7 @@ Assume { Have: forall a : addr. ((forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> ((i_4 <= 19) -> - (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))))) -> + (shift_sint32(shift_A20_sint32(global(G_t2_50), i_5), i_4) != a)))))) -> (Mint_0[a] = Mint_1[a])). } Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ @@ -463,7 +463,7 @@ Assume { Have: forall a : addr. ((forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> ((i_4 <= 19) -> - (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))))) -> + (shift_sint32(shift_A20_sint32(global(G_t2_50), i_5), i_4) != a)))))) -> (Mint_0[a] = Mint_1[a])). } Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ @@ -472,7 +472,7 @@ Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ ------------------------------------------------------------ Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 139): -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). @@ -520,7 +520,7 @@ Prove: true. ------------------------------------------------------------ Goal Post-condition (file tests/wp_typed/user_init.i, line 145) in 'init_t2_bis_v2': -Let a = global(G_t2_48). +Let a = global(G_t2_50). Assume { Type: is_uint32(i_2) /\ is_sint32(v). (* Goal *) @@ -549,7 +549,7 @@ Prove: true. ------------------------------------------------------------ Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 154): -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Let a_2 = shift_sint32(a_1, 0). Let a_3 = havoc(Mint_undef_0, Mint_0, a_2, 20). @@ -584,7 +584,7 @@ Prove: true. ------------------------------------------------------------ Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 153): -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). @@ -627,7 +627,7 @@ Prove: true. Goal Loop assigns 'tactic,Zone' (2/3): Effect at line 157 -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i_2). Assume { Have: 0 <= i. @@ -660,7 +660,7 @@ Prove: exists i_6,i_5 : Z. (i_6 <= i) /\ (i_5 <= i_1) /\ (i_1 <= i_5) /\ Goal Loop assigns 'tactic,Zone' (3/3): Call Effect at line 158 -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). @@ -705,7 +705,7 @@ Assume { (* Loop assigns 'tactic,Zone' *) Have: forall a : addr. ((forall i_5,i_4 : Z. ((0 <= i_5) -> ((i_5 <= 9) -> - (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))) -> + (shift_sint32(shift_A20_sint32(global(G_t2_50), i_5), i_4) != a)))) -> (Mint_0[a] = Mint_1[a])). } Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ @@ -737,7 +737,7 @@ Assume { (* Loop assigns 'tactic,Zone' *) Have: forall a : addr. ((forall i_5,i_4 : Z. ((0 <= i_5) -> ((i_5 <= 9) -> - (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))) -> + (shift_sint32(shift_A20_sint32(global(G_t2_50), i_5), i_4) != a)))) -> (Mint_0[a] = Mint_1[a])). } Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ @@ -746,7 +746,7 @@ Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ ------------------------------------------------------------ Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 157): -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). diff --git a/src/plugins/wp/tests/wp_typed/oracle/user_init.1.res.oracle b/src/plugins/wp/tests/wp_typed/oracle/user_init.1.res.oracle index 847496eab27..8cb6dcfb82a 100644 --- a/src/plugins/wp/tests/wp_typed/oracle/user_init.1.res.oracle +++ b/src/plugins/wp/tests/wp_typed/oracle/user_init.1.res.oracle @@ -232,7 +232,7 @@ Prove: true. ------------------------------------------------------------ Goal Post-condition (file tests/wp_typed/user_init.i, line 127) in 'init_t2_bis_v1': -Let a = global(G_t2_48). +Let a = global(G_t2_50). Assume { Type: is_uint32(i_2) /\ is_sint32(v). (* Goal *) @@ -262,7 +262,7 @@ Prove: true. ------------------------------------------------------------ Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 136): -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Let a_2 = shift_sint32(a_1, 0). Let a_3 = havoc(Mint_undef_0, Mint_0, a_2, 20). @@ -298,7 +298,7 @@ Prove: true. ------------------------------------------------------------ Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 135): -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). @@ -342,7 +342,7 @@ Prove: true. Goal Loop assigns 'lack,Zone' (2/3): Effect at line 139 -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). @@ -379,7 +379,7 @@ Prove: (forall i_4,i_3 : Z. ((0 <= i_3) -> ((0 <= i_4) -> ((i_4 <= 9) -> Goal Loop assigns 'lack,Zone' (3/3): Call Effect at line 140 -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). @@ -428,7 +428,7 @@ Assume { Have: forall a : addr. ((forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> ((i_4 <= 19) -> - (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))))) -> + (shift_sint32(shift_A20_sint32(global(G_t2_50), i_5), i_4) != a)))))) -> (Mint_0[a] = Mint_1[a])). } Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ @@ -463,7 +463,7 @@ Assume { Have: forall a : addr. ((forall i_5,i_4 : Z. ((0 <= i_4) -> ((0 <= i_5) -> ((i_5 <= 9) -> ((i_4 <= 19) -> - (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))))) -> + (shift_sint32(shift_A20_sint32(global(G_t2_50), i_5), i_4) != a)))))) -> (Mint_0[a] = Mint_1[a])). } Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ @@ -472,7 +472,7 @@ Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (0 <= i_4) /\ ------------------------------------------------------------ Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 139): -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). @@ -520,7 +520,7 @@ Prove: true. ------------------------------------------------------------ Goal Post-condition (file tests/wp_typed/user_init.i, line 145) in 'init_t2_bis_v2': -Let a = global(G_t2_48). +Let a = global(G_t2_50). Assume { Type: is_uint32(i_2) /\ is_sint32(v). (* Goal *) @@ -549,7 +549,7 @@ Prove: true. ------------------------------------------------------------ Goal Preservation of Invariant 'Partial' (file tests/wp_typed/user_init.i, line 154): -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Let a_2 = shift_sint32(a_1, 0). Let a_3 = havoc(Mint_undef_0, Mint_0, a_2, 20). @@ -584,7 +584,7 @@ Prove: true. ------------------------------------------------------------ Goal Preservation of Invariant 'Range' (file tests/wp_typed/user_init.i, line 153): -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). @@ -627,7 +627,7 @@ Prove: true. Goal Loop assigns 'tactic,Zone' (2/3): Effect at line 157 -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i_2). Assume { Have: 0 <= i. @@ -660,7 +660,7 @@ Prove: exists i_6,i_5 : Z. (i_6 <= i) /\ (i_5 <= i_1) /\ (i_1 <= i_5) /\ Goal Loop assigns 'tactic,Zone' (3/3): Call Effect at line 158 -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). @@ -705,7 +705,7 @@ Assume { (* Loop assigns 'tactic,Zone' *) Have: forall a : addr. ((forall i_5,i_4 : Z. ((0 <= i_5) -> ((i_5 <= 9) -> - (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))) -> + (shift_sint32(shift_A20_sint32(global(G_t2_50), i_5), i_4) != a)))) -> (Mint_0[a] = Mint_1[a])). } Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ @@ -737,7 +737,7 @@ Assume { (* Loop assigns 'tactic,Zone' *) Have: forall a : addr. ((forall i_5,i_4 : Z. ((0 <= i_5) -> ((i_5 <= 9) -> - (shift_sint32(shift_A20_sint32(global(G_t2_48), i_5), i_4) != a)))) -> + (shift_sint32(shift_A20_sint32(global(G_t2_50), i_5), i_4) != a)))) -> (Mint_0[a] = Mint_1[a])). } Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ @@ -746,7 +746,7 @@ Prove: exists i_5,i_4 : Z. (i_5 <= i) /\ (i_4 <= i_1) /\ (i_1 <= i_4) /\ ------------------------------------------------------------ Goal Decreasing of Loop variant at loop (file tests/wp_typed/user_init.i, line 157): -Let a = global(G_t2_48). +Let a = global(G_t2_50). Let a_1 = shift_A20_sint32(a, i). Assume { Type: is_uint32(i) /\ is_sint32(v). diff --git a/src/plugins/wp/tests/wp_usage/oracle/caveat.1.res.oracle b/src/plugins/wp/tests/wp_usage/oracle/caveat.1.res.oracle index 191e73fc5cc..4d2f07be6ab 100644 --- a/src/plugins/wp/tests/wp_usage/oracle/caveat.1.res.oracle +++ b/src/plugins/wp/tests/wp_usage/oracle/caveat.1.res.oracle @@ -54,7 +54,7 @@ Prove: true. ------------------------------------------------------------ Goal Post-condition 'KO' in 'observer': -Let a = global(G_a_41). +Let a = global(G_a_43). Let x = Mint_0[shiftfield_F1_S_f(a)]. Let x_1 = Mint_0[shiftfield_F1_S_g(a)]. Let x_2 = 1 + x. diff --git a/src/plugins/wp/tests/wp_usage/oracle/issue-189-bis.0.res.oracle b/src/plugins/wp/tests/wp_usage/oracle/issue-189-bis.0.res.oracle index e183de2d492..0dc5561959e 100644 --- a/src/plugins/wp/tests/wp_usage/oracle/issue-189-bis.0.res.oracle +++ b/src/plugins/wp/tests/wp_usage/oracle/issue-189-bis.0.res.oracle @@ -222,8 +222,8 @@ Prove: true. ------------------------------------------------------------ Goal Post-condition 'memcpy,ok' in 'memcpy_context_vars': -Let a = Mptr_0[global(P_src_43)]. -Let a_1 = Mptr_0[global(P_dst_44)]. +Let a = Mptr_0[global(P_src_45)]. +Let a_1 = Mptr_0[global(P_dst_46)]. Let a_2 = shift_uint8(a_1, 0). Let a_3 = havoc(Mint_undef_0, Mint_0, a_2, len_0). Let a_4 = shift_uint8(a, 0). @@ -253,8 +253,8 @@ Prove: a_3[shift_uint8(a_1, i)] = Mint_0[shift_uint8(a, i)]. ------------------------------------------------------------ Goal Post-condition 'unmodified,ok' in 'memcpy_context_vars': -Let a = Mptr_0[global(P_src_43)]. -Let a_1 = Mptr_0[global(P_dst_44)]. +Let a = Mptr_0[global(P_src_45)]. +Let a_1 = Mptr_0[global(P_dst_46)]. Let a_2 = shift_uint8(a_1, 0). Let a_3 = havoc(Mint_undef_0, Mint_0, a_2, len_0). Let a_4 = shift_uint8(a, 0). @@ -285,8 +285,8 @@ Prove: a_3[a_5] = Mint_0[a_5]. ------------------------------------------------------------ Goal Preservation of Invariant 'ok,cpy' (file tests/wp_usage/issue-189-bis.i, line 55): -Let a = Mptr_0[global(P_src_43)]. -Let a_1 = Mptr_0[global(P_dst_44)]. +Let a = Mptr_0[global(P_src_45)]. +Let a_1 = Mptr_0[global(P_dst_46)]. Let a_2 = shift_uint8(a_1, 0). Let a_3 = havoc(Mint_undef_0, Mint_0, a_2, len_0). Let a_4 = shift_uint8(a, 0). @@ -332,8 +332,8 @@ Prove: true. ------------------------------------------------------------ Goal Preservation of Invariant 'ok,len' (file tests/wp_usage/issue-189-bis.i, line 51): -Let a = Mptr_0[global(P_src_43)]. -Let a_1 = Mptr_0[global(P_dst_44)]. +Let a = Mptr_0[global(P_src_45)]. +Let a_1 = Mptr_0[global(P_dst_46)]. Let a_2 = shift_uint8(a_1, 0). Let a_3 = havoc(Mint_undef_0, Mint_0, a_2, len_1). Let a_4 = shift_uint8(a, 0). @@ -394,15 +394,15 @@ Prove: true. Goal Loop assigns (file tests/wp_usage/issue-189-bis.i, line 54) (4/4): Effect at line 60 -Let a = Mptr_0[global(P_src_43)]. -Let a_1 = Mptr_0[global(P_dst_44)]. +Let a = Mptr_0[global(P_src_45)]. +Let a_1 = Mptr_0[global(P_dst_46)]. Let a_2 = shift_uint8(a_1, 0). Let a_3 = havoc(Mint_undef_0, Mint_0, a_2, len_0). Let a_4 = shift_uint8(a, 0). Assume { Type: is_sint32(len_0) /\ is_sint32(len_1). (* Goal *) - When: !invalid(Malloc_0[P_src_43 <- 1][P_dst_44 <- 1], tmp_0, 1). + When: !invalid(Malloc_0[P_src_45 <- 1][P_dst_46 <- 1], tmp_0, 1). (* Heap *) Have: framed(Mptr_0) /\ linked(Malloc_0). (* Pre-condition *) diff --git a/src/plugins/wp/tests/wp_usage/oracle/issue-189-bis.1.res.oracle b/src/plugins/wp/tests/wp_usage/oracle/issue-189-bis.1.res.oracle index dc14184986d..911ac911111 100644 --- a/src/plugins/wp/tests/wp_usage/oracle/issue-189-bis.1.res.oracle +++ b/src/plugins/wp/tests/wp_usage/oracle/issue-189-bis.1.res.oracle @@ -5,8 +5,8 @@ [wp] Warning: Missing RTE guards Goal Post-condition 'memcpy,ok' in 'memcpy_context_vars': -Let a = global(G_src_43). -Let a_1 = global(G_dst_44). +Let a = global(G_src_45). +Let a_1 = global(G_dst_46). Let a_2 = havoc(Mint_undef_0, Mint_0, shift_uint8(a_1, 0), len_0). Assume { Type: is_sint32(len_0) /\ is_sint32(len_1). @@ -38,8 +38,8 @@ Prove: true. ------------------------------------------------------------ Goal Preservation of Invariant 'ok,cpy' (file tests/wp_usage/issue-189-bis.i, line 55): -Let a = global(G_src_43). -Let a_1 = global(G_dst_44). +Let a = global(G_src_45). +Let a_1 = global(G_dst_46). Let a_2 = havoc(Mint_undef_0, Mint_0, shift_uint8(a_1, 0), len_0). Let a_3 = a_2[dst2_0 <- a_2[src2_0]]. Assume { @@ -82,8 +82,8 @@ Prove: true. ------------------------------------------------------------ Goal Preservation of Invariant 'ok,len' (file tests/wp_usage/issue-189-bis.i, line 51): -Let a = global(G_src_43). -Let a_1 = global(G_dst_44). +Let a = global(G_src_45). +Let a_1 = global(G_dst_46). Assume { Type: is_sint32(len_1) /\ is_sint32(len_0) /\ is_sint32(len_0 - 1). (* Heap *) @@ -141,8 +141,8 @@ Prove: true. Goal Loop assigns (file tests/wp_usage/issue-189-bis.i, line 54) (4/4): Effect at line 60 -Let a = global(G_src_43). -Let a_1 = global(G_dst_44). +Let a = global(G_src_45). +Let a_1 = global(G_dst_46). Let a_2 = shift_uint8(a_1, 0). Assume { Type: is_sint32(len_0) /\ is_sint32(len_1). -- GitLab From 1277f48366a117c3d2cf7a1e2dc362450b37916a Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 25 Apr 2019 02:39:04 +0200 Subject: [PATCH 324/376] [printer] make explicit logic coercions that modify the value of the expression --- .../ast_printing/cil_printer.ml | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/kernel_services/ast_printing/cil_printer.ml b/src/kernel_services/ast_printing/cil_printer.ml index c84b8efd2cc..7009b06a4fb 100644 --- a/src/kernel_services/ast_printing/cil_printer.ml +++ b/src/kernel_services/ast_printing/cil_printer.ml @@ -381,6 +381,20 @@ let is_same_direction_binop dir op = let is_same_direction_rel dir op = update_direction_rel dir op <> Nothing +let no_op_coerce typ t = + match typ with + | Lreal -> true + | Linteger -> Cil.isLogicIntegralType t.term_type + | Ltype _ when Logic_const.is_boolean_type typ -> + Cil.isLogicBooleanType t.term_type + | Ltype ({lt_name="set"},_) -> true + | _ -> false + +let remove_no_op_coerce t = + match t.term_node with + | TLogic_coerce (ty,t) when no_op_coerce ty t -> t + | _ -> t + (* when pretty-printing relation chains, a < b && b' < c, it can happen that b has a coercion and b' hasn't or vice-versa (bc c is an integer and a and b are ints for instance). We nevertheless want to @@ -388,13 +402,7 @@ let is_same_direction_rel dir op = removed any existing head coercion. *) let equal_mod_coercion t1 t2 = - let t1 = - match t1.term_node with TLogic_coerce(_,t1) -> t1 | _ -> t1 - in - let t2 = - match t2.term_node with TLogic_coerce(_,t2) -> t2 | _ -> t2 - in - Cil_datatype.Term.equal t1 t2 + Cil_datatype.Term.equal (remove_no_op_coerce t1) (remove_no_op_coerce t2) (* Grab one of the labels of a statement *) let rec pickLabel = function @@ -2392,13 +2400,11 @@ class cil_printer () = object (self) pp_defn (self#term_prec current_level) body | TLogic_coerce(ty,t) -> - let debug = - Kernel.is_debug_key_enabled Kernel.dkey_print_logic_coercions - in - if debug then - fprintf fmt "/* (coercion to:%a */" (self#logic_type None) ty; + if (not (no_op_coerce ty t)) || + Kernel.is_debug_key_enabled Kernel.dkey_print_logic_coercions + then + fprintf fmt "(%a)" (self#logic_type None) ty; self#term_prec current_level fmt t; - if debug then fprintf fmt "/* ) */" method private term_lval_prec contextprec fmt lv = if Precedence.getParenthLevelLogic (TLval lv) > contextprec then -- GitLab From 162d703015ea4624f9e0101e395c0a5aee88796d Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 25 Apr 2019 03:43:07 +0200 Subject: [PATCH 325/376] [typing] be more strict in coercions to set<...> --- .../ast_queries/logic_typing.ml | 23 ++++++++++--------- tests/spec/oracle/float-acsl.res.oracle | 8 ++----- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/kernel_services/ast_queries/logic_typing.ml b/src/kernel_services/ast_queries/logic_typing.ml index a8ab10766a5..1530aa23b1c 100644 --- a/src/kernel_services/ast_queries/logic_typing.ml +++ b/src/kernel_services/ast_queries/logic_typing.ml @@ -1165,20 +1165,24 @@ struct | _ -> false let logic_coerce t e = - let set = make_set_type t in + let real_type = set_conversion t e.term_type in let rec aux e = match e.term_node with | Tcomprehension(e,q,p) -> - { e with term_type = set; term_node = Tcomprehension (aux e,q,p) } + { e with term_type = real_type; + term_node = Tcomprehension (aux e,q,p) } | Tunion l -> - { e with term_type = set; term_node = Tunion (List.map aux l) } + { e with term_type = real_type; term_node = Tunion (List.map aux l) } | Tinter l -> - { e with term_type = set; term_node = Tinter (List.map aux l) } - | Tempty_set -> { e with term_type = set } + { e with term_type = real_type; term_node = Tinter (List.map aux l) } + | Tempty_set -> { e with term_type = real_type } | TLogic_coerce(_,e) -> - { e with term_type = t; term_node = TLogic_coerce(t,e) } - | _ when Cil.isLogicArithmeticType t -> Logic_utils.numeric_coerce t e - | _ -> { e with term_type = t; term_node = TLogic_coerce(t,e) } + let e = aux e in + { e with term_type = real_type; term_node = TLogic_coerce(real_type,e) } + | _ when Cil.isLogicArithmeticType real_type -> + Logic_utils.numeric_coerce real_type e + | _ -> + { e with term_type = real_type; term_node = TLogic_coerce(real_type,e) } in if is_same_type e.term_type t then e else aux e @@ -2420,7 +2424,6 @@ struct in normalize_updated_offset_term idx_typing env loc t normalizing_cont toff and locations_set ctxt ~lift_set env loc l init_type = - let module C = struct end in let convert_ptr, locs, typ = List.fold_left (fun (convert_ptr,locs,typ) t -> @@ -2440,7 +2443,6 @@ struct let locs = List.rev_map (make_set_conversion convert_ptr) locs in locs,typ and lfun_app ctxt env loc f labels ttl = - let module C = struct end in try let info = ctxt.find_logic_ctor f in if labels <> [] then begin @@ -2469,7 +2471,6 @@ struct ctxt.error loc "symbol %s is a predicate, not a function" f | Some t -> Tapp(info, label_assoc, tl), t and term_node ctxt env loc pl = - let module C = struct end in let term = ctxt.type_term ctxt in let term_ptr pl = let t = term env pl in diff --git a/tests/spec/oracle/float-acsl.res.oracle b/tests/spec/oracle/float-acsl.res.oracle index 5ef02bf9f06..8073bef4e57 100644 --- a/tests/spec/oracle/float-acsl.res.oracle +++ b/tests/spec/oracle/float-acsl.res.oracle @@ -28,12 +28,8 @@ double minus_one(void); */ float minus_onef(void); -/*@ requires - /* (coercion to:â„ */x/* ) */ ≤ /* (coercion to:â„ */y/* ) */; - ensures - /* (coercion to:â„ */\old(x)/* ) */ ≤ - /* (coercion to:â„ */\result/* ) */ ≤ - /* (coercion to:â„ */\old(y)/* ) */; +/*@ requires (â„)x ≤ (â„)y; + ensures (â„)\old(x) ≤ (â„)\result ≤ (â„)\old(y); assigns \result; assigns \result \from x, y; */ -- GitLab From ba53a640b9a654cf7068c7f34012f9f022574923 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 25 Apr 2019 05:42:24 +0200 Subject: [PATCH 326/376] [typing] do not loose logic coercions to booleans during typing --- .../ast_printing/cil_printer.ml | 13 ++------- src/kernel_services/ast_queries/cil.ml | 28 +++++++++++++++---- src/kernel_services/ast_queries/cil.mli | 7 +++++ .../ast_queries/logic_typing.ml | 8 ++++-- .../ast_queries/logic_utils.ml | 2 +- .../wp_acsl/oracle/precedence.res.oracle | 14 ++++++---- tests/misc/oracle/obfuscate.res.oracle | 2 +- tests/spec/oracle/all.res.oracle | 10 +++---- tests/spec/oracle/logic_type.res.oracle | 4 +-- tests/spec/oracle/null_ptr.res.oracle | 2 +- tests/spec/oracle/parsing.res.oracle | 4 +-- .../oracle/real_typing_bts1309.res.oracle | 2 +- 12 files changed, 58 insertions(+), 38 deletions(-) diff --git a/src/kernel_services/ast_printing/cil_printer.ml b/src/kernel_services/ast_printing/cil_printer.ml index 7009b06a4fb..897febf6911 100644 --- a/src/kernel_services/ast_printing/cil_printer.ml +++ b/src/kernel_services/ast_printing/cil_printer.ml @@ -381,18 +381,9 @@ let is_same_direction_binop dir op = let is_same_direction_rel dir op = update_direction_rel dir op <> Nothing -let no_op_coerce typ t = - match typ with - | Lreal -> true - | Linteger -> Cil.isLogicIntegralType t.term_type - | Ltype _ when Logic_const.is_boolean_type typ -> - Cil.isLogicBooleanType t.term_type - | Ltype ({lt_name="set"},_) -> true - | _ -> false - let remove_no_op_coerce t = match t.term_node with - | TLogic_coerce (ty,t) when no_op_coerce ty t -> t + | TLogic_coerce (ty,t) when Cil.no_op_coerce ty t -> t | _ -> t (* when pretty-printing relation chains, a < b && b' < c, it can happen that @@ -2400,7 +2391,7 @@ class cil_printer () = object (self) pp_defn (self#term_prec current_level) body | TLogic_coerce(ty,t) -> - if (not (no_op_coerce ty t)) || + if (not (Cil.no_op_coerce ty t)) || Kernel.is_debug_key_enabled Kernel.dkey_print_logic_coercions then fprintf fmt "(%a)" (self#logic_type None) ty; diff --git a/src/kernel_services/ast_queries/cil.ml b/src/kernel_services/ast_queries/cil.ml index af7f23d2146..fe50aa91f40 100644 --- a/src/kernel_services/ast_queries/cil.ml +++ b/src/kernel_services/ast_queries/cil.ml @@ -4495,11 +4495,21 @@ let isCharConstPtrType t = match t with | Ctype ty -> isIntegralType ty | Linteger -> true - | Ltype ({lt_name = name},[]) -> - name = Utf8_logic.boolean - | Ltype (tdef,_) as ty when is_unrollable_ltdef tdef -> - isLogicBooleanType (unroll_ltdef ty) - | Lreal | Ltype _ | Lvar _ | Larrow _ -> false + | Ltype ({lt_name = name} as tdef,_) -> + name = Utf8_logic.boolean || + ( is_unrollable_ltdef tdef && isLogicBooleanType (unroll_ltdef t)) + | Lreal | Lvar _ | Larrow _ -> false + +let rec isLogicPureBooleanType t = + match t with + | Ctype t -> + (match unrollType t with + | TInt(IBool,_) -> true + | _ -> false) + | Ltype ({lt_name = name} as def,_) -> + name = Utf8_logic.boolean || + (is_unrollable_ltdef def && isLogicPureBooleanType (unroll_ltdef t)) + | _ -> false let rec isLogicIntegralType t = match t with @@ -4622,6 +4632,14 @@ let isCharConstPtrType t = let () = registerAttribute (Extlib.strip_underscore frama_c_init_obj) (AttrName false) + let no_op_coerce typ t = + match typ with + | Lreal -> true + | Linteger -> isLogicIntegralType t.term_type + | Ltype _ when Logic_const.is_boolean_type typ -> + isLogicPureBooleanType t.term_type + | Ltype ({lt_name="set"},_) -> true + | _ -> false (**** Compute the type of an expression ****) let rec typeOf (e: exp) : typ = diff --git a/src/kernel_services/ast_queries/cil.mli b/src/kernel_services/ast_queries/cil.mli index 80d30d5792c..1116abafa18 100644 --- a/src/kernel_services/ast_queries/cil.mli +++ b/src/kernel_services/ast_queries/cil.mli @@ -842,6 +842,13 @@ val isLogicZero: term -> bool (** True if the given term is [\null] or a constant null pointer*) val isLogicNull: term -> bool +(** [no_op_coerce typ term] is [true] iff converting [term] to [typ] does + not modify its value. + + @since Frama-C+dev +*) +val no_op_coerce: logic_type -> term -> bool + (** gives the value of a wide char literal. *) val reduce_multichar: Cil_types.typ -> int64 list -> int64 diff --git a/src/kernel_services/ast_queries/logic_typing.ml b/src/kernel_services/ast_queries/logic_typing.ml index 1530aa23b1c..b2c51f3b799 100644 --- a/src/kernel_services/ast_queries/logic_typing.ml +++ b/src/kernel_services/ast_queries/logic_typing.ml @@ -1176,7 +1176,7 @@ struct | Tinter l -> { e with term_type = real_type; term_node = Tinter (List.map aux l) } | Tempty_set -> { e with term_type = real_type } - | TLogic_coerce(_,e) -> + | TLogic_coerce(t2,e) when Cil.no_op_coerce t2 e -> let e = aux e in { e with term_type = real_type; term_node = TLogic_coerce(real_type,e) } | _ when Cil.isLogicArithmeticType real_type -> @@ -1230,10 +1230,10 @@ struct when name = Utf8_logic.boolean && is_integral_type t1 -> let t2 = Ltype (C.find_logic_type Utf8_logic.boolean,[]) in { e with term_node = TLogic_coerce(t2,e); term_type = t2 } - | t1, Linteger when Logic_const.is_boolean_type t1 -> + | t1, Linteger when Logic_const.is_boolean_type t1 && explicit -> logic_coerce Linteger e | t1, Ctype t2 when Logic_const.is_boolean_type t1 - && is_integral_type newt -> + && is_integral_type newt && explicit -> Logic_const.term ~loc (TCastE (t2,e)) newt | ty1, Ltype({lt_name="set"},[ty2]) when is_pointer_type ty1 && @@ -1807,6 +1807,8 @@ struct when Cil.isIntegralType t -> Linteger | (Linteger, Ctype t | Ctype t, Linteger) when Cil.isArithmeticType t -> Lreal + (* In ACSL, you can convert implicitely from integral to boolean => + prefer boolean as common type when doing comparison. *) | Ltype({lt_name = name},[]), t when is_integral_type t && name = Utf8_logic.boolean -> Ltype(C.find_logic_type Utf8_logic.boolean,[]) diff --git a/src/kernel_services/ast_queries/logic_utils.ml b/src/kernel_services/ast_queries/logic_utils.ml index c99bcaee9a1..25249cfdd36 100644 --- a/src/kernel_services/ast_queries/logic_utils.ml +++ b/src/kernel_services/ast_queries/logic_utils.ml @@ -304,7 +304,7 @@ let numeric_coerce ltyp t = let oldt = unroll_type t.term_type in if Cil_datatype.Logic_type.equal oldt ltyp then t else match t.term_node with - | TLogic_coerce(_,e) -> coerce e + | TLogic_coerce(t,e) when Cil.no_op_coerce t e -> coerce e | TConst(Integer(i,_)) -> (match oldt, ltyp with | Ctype (TInt(ikind,_)), Linteger when Cil.fitsInInt ikind i -> diff --git a/src/plugins/wp/tests/wp_acsl/oracle/precedence.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle/precedence.res.oracle index ff38ac48c05..e6908ae1869 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle/precedence.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle/precedence.res.oracle @@ -778,17 +778,19 @@ void predicate(int x, int a, int b) ensures ko: r_precedence_and_eq: \old(p) ≡ \old(q) ∧ \old(r) ≢ 0 ⇔ - \old(p) ≡ (\old(q) ∧ \old(r)); + (ð”¹)\old(p) ≡ ((ð”¹)\old(q) ∧ (ð”¹)\old(r)); ensures ko: l_precedence_and_eq: \old(p) ≢ 0 ∧ \old(q) ≡ \old(r) ⇔ - (\old(p) ∧ \old(q)) ≡ \old(r); + ((ð”¹)\old(p) ∧ (ð”¹)\old(q)) ≡ (ð”¹)\old(r); ensures ko: l_nonassoc_eq: - \old(p) ≡ \old(q) ≡ \old(r) ⇔ (\old(p) ≡ \old(q)) ≡ \old(r); + \old(p) ≡ \old(q) ≡ \old(r) ⇔ + (\old(p) ≡ \old(q)) ≡ (ð”¹)\old(r); ensures ko: r_nonassoc_eq: - \old(p) ≡ \old(q) ≡ \old(r) ⇔ \old(p) ≡ (\old(q) ≡ \old(r)); + \old(p) ≡ \old(q) ≡ \old(r) ⇔ + (ð”¹)\old(p) ≡ (\old(q) ≡ \old(r)); ensures r_precedence_neq_and: \old(p) ≢ \old(q) ∧ R ⇔ \old(p) ≢ \old(q) ∧ R; @@ -798,11 +800,11 @@ void predicate(int x, int a, int b) ensures ko: r_precedence_and_neq: \old(p) ≢ \old(q) ∧ \old(r) ≢ 0 ⇔ - \old(p) ≢ (\old(q) ∧ \old(r)); + (ð”¹)\old(p) ≢ ((ð”¹)\old(q) ∧ (ð”¹)\old(r)); ensures ko: l_precedence_and_neq: \old(p) ≢ 0 ∧ \old(q) ≢ \old(r) ⇔ - (\old(p) ∧ \old(q)) ≢ \old(r); + ((ð”¹)\old(p) ∧ (ð”¹)\old(q)) ≢ (ð”¹)\old(r); */ void comparison(int p, int q, int r) { diff --git a/tests/misc/oracle/obfuscate.res.oracle b/tests/misc/oracle/obfuscate.res.oracle index c56321364a9..3c55a38dad0 100644 --- a/tests/misc/oracle/obfuscate.res.oracle +++ b/tests/misc/oracle/obfuscate.res.oracle @@ -123,7 +123,7 @@ int F3(int f2) V3 = 0; if (f2) goto L2; V3 ++; - /*@ assert property: V3? 1 ≢ 0: 0 ≢ 0; */ ; + /*@ assert property: (ð”¹)V3? 1 ≢ 0: 0 ≢ 0; */ ; L2: ; return V3; } diff --git a/tests/spec/oracle/all.res.oracle b/tests/spec/oracle/all.res.oracle index 8543e35a53d..26a8ebc75b7 100644 --- a/tests/spec/oracle/all.res.oracle +++ b/tests/spec/oracle/all.res.oracle @@ -29,7 +29,7 @@ axiomatic Test { axiom e: P ⊻ Q; - axiom f: 0? P: Q; + axiom f: (ð”¹)0? P: Q; axiom g: (P ⇒ P) ∧ (¬P ⇒ Q); @@ -39,13 +39,13 @@ axiomatic Test { } */ -/*@ predicate R(ℤ i, ℤ j) = (1? i + j: (j: j)) ≡ i + j; +/*@ predicate R(ℤ i, ℤ j) = ((ð”¹)1? i + j: (j: j)) ≡ i + j; */ -/*@ predicate S(ℤ i, ℤ j) = (1? (i: j): j) ≡ j; +/*@ predicate S(ℤ i, ℤ j) = ((ð”¹)1? (i: j): j) ≡ j; */ -/*@ predicate T(ℤ i, ℤ j) = (1? i: j) ≡ i; +/*@ predicate T(ℤ i, ℤ j) = ((ð”¹)1? i: j) ≡ i; */ -/*@ lemma tauto: 0? T(0, 0): R(1, 2); +/*@ lemma tauto: (ð”¹)0? T(0, 0): R(1, 2); */ /*@ lemma tauto2: (R(0, 1) ⇒ S(3, 4)) ∧ (¬R(0, 1) ⇒ T(5, 6)); */ diff --git a/tests/spec/oracle/logic_type.res.oracle b/tests/spec/oracle/logic_type.res.oracle index c9a81bc49b7..c1cc68010da 100644 --- a/tests/spec/oracle/logic_type.res.oracle +++ b/tests/spec/oracle/logic_type.res.oracle @@ -55,9 +55,9 @@ void h(void) */ /*@ logic _Bool _Bool_from_boolean(𔹠b) = (_Bool)b; */ -/*@ logic 𔹠boolean_from_integer(ℤ b) = b; +/*@ logic 𔹠boolean_from_integer(ℤ b) = (ð”¹)b; */ -/*@ logic 𔹠boolean_from_int(int b) = b; +/*@ logic 𔹠boolean_from_int(int b) = (ð”¹)b; */ /*@ logic 𔹠boolean_from_Bool(_Bool b) = b; diff --git a/tests/spec/oracle/null_ptr.res.oracle b/tests/spec/oracle/null_ptr.res.oracle index 59e76f0ef7d..55b0cc5e433 100644 --- a/tests/spec/oracle/null_ptr.res.oracle +++ b/tests/spec/oracle/null_ptr.res.oracle @@ -22,7 +22,7 @@ void f(char *x) return; } -/*@ ensures \result ≡ \true; */ +/*@ ensures (ð”¹)\result ≡ \true; */ int g(void) { int __retres; diff --git a/tests/spec/oracle/parsing.res.oracle b/tests/spec/oracle/parsing.res.oracle index 37ceb452828..4cff9264d42 100644 --- a/tests/spec/oracle/parsing.res.oracle +++ b/tests/spec/oracle/parsing.res.oracle @@ -7,9 +7,9 @@ /* Generated by Frama-C */ /*@ lemma bidon{Here}: ∀ int *t; ¬(*(t + 0) > 0); */ -/*@ lemma bidon1{Here}: ∀ int *t; !*(t + 0) ≡ 0; +/*@ lemma bidon1{Here}: ∀ int *t; !(ð”¹)*(t + 0) ≡ (ð”¹)0; */ -/*@ lemma bidon2{Here}: ∀ int *t; !*(t + 0) ≡ 0; +/*@ lemma bidon2{Here}: ∀ int *t; !(ð”¹)*(t + 0) ≡ (ð”¹)0; */ /*@ predicate foo{L}(int *a, int *b, int length) = diff --git a/tests/spec/oracle/real_typing_bts1309.res.oracle b/tests/spec/oracle/real_typing_bts1309.res.oracle index 47e5a9adb68..1a15afbf483 100644 --- a/tests/spec/oracle/real_typing_bts1309.res.oracle +++ b/tests/spec/oracle/real_typing_bts1309.res.oracle @@ -3,7 +3,7 @@ void foo(int c) { float f = (float)1.0; - /*@ assert 0.0 ≤ (c? f: 2.0); */ ; + /*@ assert 0.0 ≤ ((ð”¹)c? f: 2.0); */ ; return; } -- GitLab From 85d411ecc2c30aaa029f42d07fb6630b3160ceaf Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 25 Apr 2019 05:45:30 +0200 Subject: [PATCH 327/376] [tests] test for logic booleans/integer conversions --- tests/misc/booleans.i | 8 ++++++ tests/misc/oracle/booleans.res.oracle | 38 +++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 tests/misc/booleans.i create mode 100644 tests/misc/oracle/booleans.res.oracle diff --git a/tests/misc/booleans.i b/tests/misc/booleans.i new file mode 100644 index 00000000000..08cbc6cbd89 --- /dev/null +++ b/tests/misc/booleans.i @@ -0,0 +1,8 @@ +/*run.config + OPT: -eva -print +*/ +int main (void) { + int x = 42; + /*@ check (boolean)x == 17; */ + /*@ check (integer)(boolean)x == 17; */ +} diff --git a/tests/misc/oracle/booleans.res.oracle b/tests/misc/oracle/booleans.res.oracle new file mode 100644 index 00000000000..d54bc6a7cc3 --- /dev/null +++ b/tests/misc/oracle/booleans.res.oracle @@ -0,0 +1,38 @@ +[kernel] Parsing tests/misc/booleans.i (no preprocessing) +[eva] Analyzing a complete application starting at main +[eva] Computing initial state +[eva] Initial state computed +[eva:initial-state] Values of globals at initialization + +[eva:alarm] tests/misc/booleans.i:7: Warning: check got status invalid. +[eva] done for function main +[eva] ====== VALUES COMPUTED ====== +[eva:final-states] Values at end of function main: + x ∈ {42} + __retres ∈ {0} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 1 function analyzed (out of 1): 100% coverage. + In this function, 5 statements reached (out of 5): 100% coverage. + ---------------------------------------------------------------------------- + No errors or warnings raised during the analysis. + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 1 valid 0 unknown 1 invalid 2 total + Preconditions 0 valid 0 unknown 0 invalid 0 total + 50% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- +/* Generated by Frama-C */ +int main(void) +{ + int __retres; + int x = 42; + /*@ check (ð”¹)x ≡ (ð”¹)17; */ ; + /*@ check (ℤ)(ð”¹)x ≡ 17; */ ; + __retres = 0; + return __retres; +} + + -- GitLab From 64c366a8b2e2db3d59fd94e26e1e98818ad26cd7 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 25 Apr 2019 08:27:40 +0200 Subject: [PATCH 328/376] [kernel] make is_bool part of the API --- src/kernel_services/ast_queries/cil.ml | 9 +++++---- src/kernel_services/ast_queries/cil.mli | 10 ++++++++++ src/plugins/value/legacy/eval_terms.ml | 6 +----- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/kernel_services/ast_queries/cil.ml b/src/kernel_services/ast_queries/cil.ml index fe50aa91f40..c088eed195f 100644 --- a/src/kernel_services/ast_queries/cil.ml +++ b/src/kernel_services/ast_queries/cil.ml @@ -4500,12 +4500,13 @@ let isCharConstPtrType t = ( is_unrollable_ltdef tdef && isLogicBooleanType (unroll_ltdef t)) | Lreal | Lvar _ | Larrow _ -> false +let isBoolType typ = match unrollType typ with + | TInt (IBool, _) -> true + | _ -> false + let rec isLogicPureBooleanType t = match t with - | Ctype t -> - (match unrollType t with - | TInt(IBool,_) -> true - | _ -> false) + | Ctype t -> isBoolType t | Ltype ({lt_name = name} as def,_) -> name = Utf8_logic.boolean || (is_unrollable_ltdef def && isLogicPureBooleanType (unroll_ltdef t)) diff --git a/src/kernel_services/ast_queries/cil.mli b/src/kernel_services/ast_queries/cil.mli index 1116abafa18..bcb8991186a 100644 --- a/src/kernel_services/ast_queries/cil.mli +++ b/src/kernel_services/ast_queries/cil.mli @@ -537,6 +537,16 @@ val isCharArrayType: typ -> bool (** True if the argument is an integral type (i.e. integer or enum) *) val isIntegralType: typ -> bool +(** True if the argument is [_Bool] + @since Frama-C+dev +*) +val isBoolType: typ -> bool + +(** True if the argument is [_Bool] or [boolean]. + @since Frama-C+dev + *) +val isLogicPureBooleanType: logic_type -> bool + (** True if the argument is an integral or pointer type. *) val isIntegralOrPointerType: typ -> bool diff --git a/src/plugins/value/legacy/eval_terms.ml b/src/plugins/value/legacy/eval_terms.ml index c60e4d58b85..e77caab5c5c 100644 --- a/src/plugins/value/legacy/eval_terms.ml +++ b/src/plugins/value/legacy/eval_terms.ml @@ -613,10 +613,6 @@ let cast_to_bool r = { eover; eunder = under_from_over eover; ldeps = r.ldeps; etype = TInt (IBool, []) } -let is_bool typ = match Cil.unrollType typ with - | TInt (IBool, _) -> true - | _ -> false - (* -------------------------------------------------------------------------- *) (* --- Inlining of defined logic functions and predicates --- *) (* -------------------------------------------------------------------------- *) @@ -851,7 +847,7 @@ let rec eval_term ~alarm_mode env t = (* See if the cast does something. If not, we can keep eunder as is.*) if is_noop_cast ~src_typ:t.term_type ~dst_typ:typ then { r with etype = typ } - else if is_bool typ + else if Cil.isBoolType typ then cast_to_bool r else let eover = cast ~src_typ:r.etype ~dst_typ:typ r.eover in -- GitLab From e4e877fac732c0be7f31a55f60687121ea7ece55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Thu, 25 Apr 2019 11:37:37 +0200 Subject: [PATCH 329/376] [configure] don't use lablgtk3 on MacOS --- Makefile | 12 +++++------- configure.in | 3 ++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 2212163281b..90e779f26d5 100644 --- a/Makefile +++ b/Makefile @@ -1288,14 +1288,12 @@ gui: gui-$(OCAMLBEST) ALL_GUI_CMO= $(ALL_CMO) $(GRAPH_GUICMO) $(GUICMO) ALL_GUI_CMX= $(patsubst %.cma,%.cmxa,$(ALL_GUI_CMO:.cmo=.cmx)) +ifeq ($(LABLGTK_VERSION),3) ifeq ($(NATIVE_THREADS),yes) -ifneq ($(PLATFORM),MacOS) -GUI_THREAD=-thread +THREAD=-thread else -GUI_THREAD= +THREAD=-vmthread endif -else -GUI_THREAD= endif bin/viewer.byte$(EXE): BYTE_LIBS+= $(GRAPH_GUICMO) @@ -1303,7 +1301,7 @@ bin/viewer.byte$(EXE): $(filter-out $(GRAPH_GUICMO),$(ALL_GUI_CMO)) \ $(GEN_BYTE_LIBS) \ $(PLUGIN_DYN_CMO_LIST) $(PLUGIN_DYN_GUI_CMO_LIST) $(PRINT_LINKING) $@ - $(OCAMLC) $(BLINKFLAGS) $(GUI_THREAD) -o $@ $(BYTE_LIBS) \ + $(OCAMLC) $(BLINKFLAGS) $(THREAD) -o $@ $(BYTE_LIBS) \ $(CMO) \ $(filter-out \ $(patsubst $(PLUGIN_GUI_LIB_DIR)/%,$(PLUGIN_LIB_DIR)/%,\ @@ -1317,7 +1315,7 @@ bin/viewer.opt$(EXE): $(filter-out $(GRAPH_GUICMX),$(ALL_GUI_CMX)) \ $(PLUGIN_DYN_CMX_LIST) $(PLUGIN_DYN_GUI_CMX_LIST) \ $(PLUGIN_CMX_LIST) $(PLUGIN_GUI_CMX_LIST) $(PRINT_LINKING) $@ - $(OCAMLOPT) $(OLINKFLAGS) $(GUI_THREAD) -o $@ $(OPT_LIBS) \ + $(OCAMLOPT) $(OLINKFLAGS) $(THREAD) -o $@ $(OPT_LIBS) \ $(CMX) \ $(filter-out \ $(patsubst $(PLUGIN_GUI_LIB_DIR)/%,$(PLUGIN_LIB_DIR)/%,\ diff --git a/configure.in b/configure.in index 392853a370d..1c508452c3e 100644 --- a/configure.in +++ b/configure.in @@ -946,13 +946,14 @@ USE_LABLGTK="$USE_LABLGTK$USE_GNOMECANVAS" LABLGTK_PATH="" SOURCEVIEW_PATH="" +if test "$PLATFORM" != "MacOS"; then if test "$ENABLE_LABLGTK3" = "yes"; then LABLGTK_PATH=`ocamlfind query lablgtk3 | tr -d '\\r\\n'`; fi - if test "$LABLGTK_PATH" != ""; then SOURCEVIEW_PATH=`ocamlfind query lablgtk3-sourceview3 | tr -d '\\r\\n'`; fi +fi if test "$SOURCEVIEW_PATH" = ""; then LABLGTK_VERSION=2 -- GitLab From 9e57b3897929b08c705b0d34c7a0e45f89f88980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Thu, 25 Apr 2019 11:53:28 +0200 Subject: [PATCH 330/376] [opam] deactivate dependency on lablgtk3 with macos --- opam/opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opam/opam b/opam/opam index e5bb63baad4..d1fcb121ee0 100644 --- a/opam/opam +++ b/opam/opam @@ -90,7 +90,7 @@ depends: [ "zarith" "conf-autoconf" { build } ( ( "lablgtk" { >= "2.18.2" } & "conf-gnomecanvas" ) - | ( "lablgtk3" { >= "3.0.beta4" } & "lablgtk3-sourceview3")) + | ( "lablgtk3" { >= "3.0.beta4" & os!="macos" } & "lablgtk3-sourceview3" )) "conf-gtksourceview" ( "alt-ergo-free" | "alt-ergo" ) "conf-graphviz" { post } -- GitLab From 3b60c570b028e6da5e6a0240b421dbfc5c6b3620 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Thu, 25 Apr 2019 16:48:02 +0200 Subject: [PATCH 331/376] [WP/test] compliant oracles with OCI --- .../wp/tests/wp_plugin/oracle_qualif/config.res.oracle | 2 +- .../wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle index c205459c40e..64c74fa7554 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle @@ -2,6 +2,6 @@ WP Requirements for Qualif Tests (3) ---------------------------------------------------------- 1. The Alt-Ergo theorem prover, version 2.0.0 -2. The Why3 platform, version 1.2.0 +2. The Why3 platform, version 1.1.1 3. The Coq Proof Assistant, version 8.9.0 ---------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json b/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json index 910cff1aa78..47905d279b0 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/string_c.0.report.json @@ -36,12 +36,12 @@ "memcpy_loop_assigns": { "alt-ergo": { "total": 1, "valid": 1, - "rank": 40 }, + "rank": 43 }, "qed": { "total": 2, "valid": 2 }, "wp:main": { "total": 3, "valid": 3, - "rank": 40 } }, + "rank": 43 } }, "memcpy_ensures_result_ptr": { "qed": { "total": 1, "valid": 1 }, -- GitLab From 398b8187e09d31bdc7224a098126057bf1514944 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 25 Apr 2019 16:26:56 +0200 Subject: [PATCH 332/376] [printer] fixes pretty-printing of unions --- src/kernel_services/ast_printing/cil_printer.ml | 8 ++++++-- tests/libc/oracle/fc_libc.1.res.oracle | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/kernel_services/ast_printing/cil_printer.ml b/src/kernel_services/ast_printing/cil_printer.ml index 897febf6911..453741922dd 100644 --- a/src/kernel_services/ast_printing/cil_printer.ml +++ b/src/kernel_services/ast_printing/cil_printer.ml @@ -386,6 +386,11 @@ let remove_no_op_coerce t = | TLogic_coerce (ty,t) when Cil.no_op_coerce ty t -> t | _ -> t +let rec is_singleton t = + match t.term_node with + | TLogic_coerce(Ltype ({ lt_name = "set"},_), t') -> is_singleton t' + | _ -> not (Logic_const.is_set_type t.term_type) + (* when pretty-printing relation chains, a < b && b' < c, it can happen that b has a coercion and b' hasn't or vice-versa (bc c is an integer and a and b are ints for instance). We nevertheless want to @@ -2340,8 +2345,7 @@ class cil_printer () = object (self) | Ttype ty -> fprintf fmt "%a(%a)" self#pp_acsl_keyword "\\type" (self#typ None) ty | Tunion l - when ((List.for_all (fun t -> not(Logic_const.is_set_type t.term_type)) l) - && (not state.print_cil_as_is)) -> + when (List.for_all is_singleton l) && (not state.print_cil_as_is) -> fprintf fmt "{%a}" (Pretty_utils.pp_list ~sep:",@ " self#term) l | Tunion locs -> fprintf fmt "@[<hov 2>%a(@,%a)@]" diff --git a/tests/libc/oracle/fc_libc.1.res.oracle b/tests/libc/oracle/fc_libc.1.res.oracle index 4202b6e1aa9..1aff0685633 100644 --- a/tests/libc/oracle/fc_libc.1.res.oracle +++ b/tests/libc/oracle/fc_libc.1.res.oracle @@ -6893,7 +6893,7 @@ char *__fc_p_basename = __fc_basename; null_or_valid_string_path: path ≡ \null ∨ valid_read_string(path); ensures result_points_to_internal_storage_or_path: - \subset(\result, \union(__fc_p_basename, \old(path))); + \subset(\result, {__fc_p_basename, \old(path)}); assigns *(path + (0 ..)), __fc_basename[0 ..], \result; assigns *(path + (0 ..)) \from *(path + (0 ..)), __fc_basename[0 ..]; assigns __fc_basename[0 ..] \from *(path + (0 ..)), __fc_basename[0 ..]; @@ -6908,7 +6908,7 @@ char *__fc_p_dirname = __fc_dirname; null_or_valid_string_path: path ≡ \null ∨ valid_read_string(path); ensures result_points_to_internal_storage_or_path: - \subset(\result, \union(__fc_p_dirname, \old(path))); + \subset(\result, {__fc_p_dirname, \old(path)}); assigns *(path + (0 ..)), __fc_dirname[0 ..], \result; assigns *(path + (0 ..)) \from *(path + (0 ..)), __fc_dirname[0 ..]; assigns __fc_dirname[0 ..] \from *(path + (0 ..)), __fc_dirname[0 ..]; -- GitLab From a500119f6ef1514019e4ea5a9d010eee6c862596 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Thu, 25 Apr 2019 17:03:46 +0200 Subject: [PATCH 333/376] [WP/test] compliant oracles with OCI --- src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle index 64c74fa7554..05a51598c1e 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/config.res.oracle @@ -3,5 +3,5 @@ WP Requirements for Qualif Tests (3) ---------------------------------------------------------- 1. The Alt-Ergo theorem prover, version 2.0.0 2. The Why3 platform, version 1.1.1 -3. The Coq Proof Assistant, version 8.9.0 +3. The Coq Proof Assistant, version 8.7.2 ---------------------------------------------------------- -- GitLab From d07cc3055c84e698551f14622aa0b59aa30f3e46 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Thu, 25 Apr 2019 17:12:29 +0200 Subject: [PATCH 334/376] [WP/share] removing wp/share/src --- src/plugins/wp/share/src/.gitignore | 15 - src/plugins/wp/share/src/.merlin | 1 - src/plugins/wp/share/src/ArcTrigo.v | 33 - src/plugins/wp/share/src/Bits.v | 1347 ---------- src/plugins/wp/share/src/BuiltIn/bool.mlw | 30 - src/plugins/wp/share/src/Cbits.v | 1774 ------------ src/plugins/wp/share/src/Cfloat.v | 399 --- src/plugins/wp/share/src/Cint.v | 853 ------ src/plugins/wp/share/src/Cmath.v | 19 - src/plugins/wp/share/src/ExpLog.v | 14 - src/plugins/wp/share/src/Makefile | 416 --- src/plugins/wp/share/src/Memory.v | 348 --- src/plugins/wp/share/src/Qed.v | 225 -- src/plugins/wp/share/src/Qedlib.v | 362 --- src/plugins/wp/share/src/Square.v | 38 - src/plugins/wp/share/src/Vlist.v | 446 --- src/plugins/wp/share/src/Vset.v | 157 -- src/plugins/wp/share/src/Zbits.v | 2380 ----------------- src/plugins/wp/share/src/alt_ergo_realize.ml | 468 ---- .../wp/share/src/alt_ergo_why3_stdlib.drv | 67 - src/plugins/wp/share/src/cbits.why | 594 ---- src/plugins/wp/share/src/cfloat.why | 223 -- src/plugins/wp/share/src/cint.why | 213 -- src/plugins/wp/share/src/cmath.why | 73 - .../wp/share/src/coq-own-realization.drv | 17 - src/plugins/wp/share/src/coq-why3.drv | 12 - src/plugins/wp/share/src/filter_axioms.ml | 192 -- src/plugins/wp/share/src/lemma_about_mod.txt | 106 - .../wp/share/src/logs/ArcTrigo.altergo.err | 237 -- .../wp/share/src/logs/ArcTrigo.coq.err | 237 -- .../wp/share/src/logs/ArcTrigo.why3.check.err | 0 .../wp/share/src/logs/ArcTrigo.why3.err | 237 -- .../wp/share/src/logs/Cbits.altergo.err | 237 -- src/plugins/wp/share/src/logs/Cbits.coq.err | 237 -- .../wp/share/src/logs/Cbits.why3.check.err | 226 -- src/plugins/wp/share/src/logs/Cbits.why3.err | 237 -- .../wp/share/src/logs/Cfloat.altergo.err | 237 -- src/plugins/wp/share/src/logs/Cfloat.coq.err | 237 -- .../wp/share/src/logs/Cfloat.why3.check.err | 0 src/plugins/wp/share/src/logs/Cfloat.why3.err | 237 -- .../wp/share/src/logs/Cint.altergo.err | 237 -- src/plugins/wp/share/src/logs/Cint.coq.err | 237 -- .../wp/share/src/logs/Cint.why3.check.err | 4 - src/plugins/wp/share/src/logs/Cint.why3.err | 237 -- .../wp/share/src/logs/Cmath.altergo.err | 237 -- src/plugins/wp/share/src/logs/Cmath.coq.err | 237 -- .../wp/share/src/logs/Cmath.why3.check.err | 2 - src/plugins/wp/share/src/logs/Cmath.why3.err | 237 -- .../wp/share/src/logs/ExpLog.altergo.err | 237 -- src/plugins/wp/share/src/logs/ExpLog.coq.err | 237 -- .../wp/share/src/logs/ExpLog.why3.check.err | 2 - src/plugins/wp/share/src/logs/ExpLog.why3.err | 237 -- .../wp/share/src/logs/Memory.altergo.err | 237 -- src/plugins/wp/share/src/logs/Memory.coq.err | 237 -- .../wp/share/src/logs/Memory.why3.check.err | 18 - src/plugins/wp/share/src/logs/Memory.why3.err | 237 -- src/plugins/wp/share/src/logs/Qed.altergo.err | 237 -- src/plugins/wp/share/src/logs/Qed.coq.err | 237 -- .../wp/share/src/logs/Qed.why3.check.err | 12 - src/plugins/wp/share/src/logs/Qed.why3.err | 237 -- .../wp/share/src/logs/Square.altergo.err | 237 -- src/plugins/wp/share/src/logs/Square.coq.err | 237 -- .../wp/share/src/logs/Square.why3.check.err | 8 - src/plugins/wp/share/src/logs/Square.why3.err | 237 -- .../wp/share/src/logs/Vlist.altergo.err | 237 -- src/plugins/wp/share/src/logs/Vlist.coq.err | 237 -- .../wp/share/src/logs/Vlist.why3.check.err | 0 src/plugins/wp/share/src/logs/Vlist.why3.err | 237 -- .../wp/share/src/logs/Vset.altergo.err | 237 -- src/plugins/wp/share/src/logs/Vset.coq.err | 237 -- .../wp/share/src/logs/Vset.why3.check.err | 0 src/plugins/wp/share/src/logs/Vset.why3.err | 237 -- .../src/logs/bool.Bool.altergo.stdlib.err | 237 -- .../share/src/logs/int.Abs.altergo.stdlib.err | 237 -- .../int.ComputerDivision.altergo.stdlib.err | 237 -- .../share/src/logs/int.Int.altergo.stdlib.err | 237 -- .../src/logs/int.MinMax.altergo.stdlib.err | 237 -- .../src/logs/map.Const.altergo.stdlib.err | 237 -- .../share/src/logs/map.Map.altergo.stdlib.err | 237 -- .../src/logs/real.Abs.altergo.stdlib.err | 237 -- .../src/logs/real.ExpLog.altergo.stdlib.err | 237 -- .../src/logs/real.FromInt.altergo.stdlib.err | 237 -- .../logs/real.Hyperbolic.altergo.stdlib.err | 237 -- .../src/logs/real.MinMax.altergo.stdlib.err | 237 -- .../src/logs/real.Polar.altergo.stdlib.err | 237 -- .../logs/real.PowerReal.altergo.stdlib.err | 237 -- .../src/logs/real.Real.altergo.stdlib.err | 237 -- .../logs/real.RealInfix.altergo.stdlib.err | 237 -- .../src/logs/real.Square.altergo.stdlib.err | 237 -- .../logs/real.Trigonometry.altergo.stdlib.err | 237 -- .../src/logs/real.Truncate.altergo.stdlib.err | 237 -- src/plugins/wp/share/src/lower.ml | 1 - src/plugins/wp/share/src/memory.why | 178 -- src/plugins/wp/share/src/qed.why | 100 - src/plugins/wp/share/src/realization.conf | 15 - src/plugins/wp/share/src/tests/import.why | 6 - .../wp/share/src/tests/import/import_T_G_1.v | 22 - .../wp/share/src/tests/import/why3session.xml | 50 - src/plugins/wp/share/src/upper.ml | 1 - src/plugins/wp/share/src/vlist.why | 199 -- src/plugins/wp/share/src/vset.why | 101 - src/plugins/wp/share/src/why3-realize.drv | 103 - .../wp/share/src/why3printer_realize.ml | 555 ---- 103 files changed, 24749 deletions(-) delete mode 100644 src/plugins/wp/share/src/.gitignore delete mode 100644 src/plugins/wp/share/src/.merlin delete mode 100644 src/plugins/wp/share/src/ArcTrigo.v delete mode 100644 src/plugins/wp/share/src/Bits.v delete mode 100644 src/plugins/wp/share/src/BuiltIn/bool.mlw delete mode 100644 src/plugins/wp/share/src/Cbits.v delete mode 100644 src/plugins/wp/share/src/Cfloat.v delete mode 100644 src/plugins/wp/share/src/Cint.v delete mode 100644 src/plugins/wp/share/src/Cmath.v delete mode 100644 src/plugins/wp/share/src/ExpLog.v delete mode 100644 src/plugins/wp/share/src/Makefile delete mode 100644 src/plugins/wp/share/src/Memory.v delete mode 100644 src/plugins/wp/share/src/Qed.v delete mode 100644 src/plugins/wp/share/src/Qedlib.v delete mode 100644 src/plugins/wp/share/src/Square.v delete mode 100644 src/plugins/wp/share/src/Vlist.v delete mode 100644 src/plugins/wp/share/src/Vset.v delete mode 100644 src/plugins/wp/share/src/Zbits.v delete mode 100644 src/plugins/wp/share/src/alt_ergo_realize.ml delete mode 100644 src/plugins/wp/share/src/alt_ergo_why3_stdlib.drv delete mode 100644 src/plugins/wp/share/src/cbits.why delete mode 100644 src/plugins/wp/share/src/cfloat.why delete mode 100644 src/plugins/wp/share/src/cint.why delete mode 100644 src/plugins/wp/share/src/cmath.why delete mode 100644 src/plugins/wp/share/src/coq-own-realization.drv delete mode 100644 src/plugins/wp/share/src/coq-why3.drv delete mode 100644 src/plugins/wp/share/src/filter_axioms.ml delete mode 100644 src/plugins/wp/share/src/lemma_about_mod.txt delete mode 100644 src/plugins/wp/share/src/logs/ArcTrigo.altergo.err delete mode 100644 src/plugins/wp/share/src/logs/ArcTrigo.coq.err delete mode 100644 src/plugins/wp/share/src/logs/ArcTrigo.why3.check.err delete mode 100644 src/plugins/wp/share/src/logs/ArcTrigo.why3.err delete mode 100644 src/plugins/wp/share/src/logs/Cbits.altergo.err delete mode 100644 src/plugins/wp/share/src/logs/Cbits.coq.err delete mode 100644 src/plugins/wp/share/src/logs/Cbits.why3.check.err delete mode 100644 src/plugins/wp/share/src/logs/Cbits.why3.err delete mode 100644 src/plugins/wp/share/src/logs/Cfloat.altergo.err delete mode 100644 src/plugins/wp/share/src/logs/Cfloat.coq.err delete mode 100644 src/plugins/wp/share/src/logs/Cfloat.why3.check.err delete mode 100644 src/plugins/wp/share/src/logs/Cfloat.why3.err delete mode 100644 src/plugins/wp/share/src/logs/Cint.altergo.err delete mode 100644 src/plugins/wp/share/src/logs/Cint.coq.err delete mode 100644 src/plugins/wp/share/src/logs/Cint.why3.check.err delete mode 100644 src/plugins/wp/share/src/logs/Cint.why3.err delete mode 100644 src/plugins/wp/share/src/logs/Cmath.altergo.err delete mode 100644 src/plugins/wp/share/src/logs/Cmath.coq.err delete mode 100644 src/plugins/wp/share/src/logs/Cmath.why3.check.err delete mode 100644 src/plugins/wp/share/src/logs/Cmath.why3.err delete mode 100644 src/plugins/wp/share/src/logs/ExpLog.altergo.err delete mode 100644 src/plugins/wp/share/src/logs/ExpLog.coq.err delete mode 100644 src/plugins/wp/share/src/logs/ExpLog.why3.check.err delete mode 100644 src/plugins/wp/share/src/logs/ExpLog.why3.err delete mode 100644 src/plugins/wp/share/src/logs/Memory.altergo.err delete mode 100644 src/plugins/wp/share/src/logs/Memory.coq.err delete mode 100644 src/plugins/wp/share/src/logs/Memory.why3.check.err delete mode 100644 src/plugins/wp/share/src/logs/Memory.why3.err delete mode 100644 src/plugins/wp/share/src/logs/Qed.altergo.err delete mode 100644 src/plugins/wp/share/src/logs/Qed.coq.err delete mode 100644 src/plugins/wp/share/src/logs/Qed.why3.check.err delete mode 100644 src/plugins/wp/share/src/logs/Qed.why3.err delete mode 100644 src/plugins/wp/share/src/logs/Square.altergo.err delete mode 100644 src/plugins/wp/share/src/logs/Square.coq.err delete mode 100644 src/plugins/wp/share/src/logs/Square.why3.check.err delete mode 100644 src/plugins/wp/share/src/logs/Square.why3.err delete mode 100644 src/plugins/wp/share/src/logs/Vlist.altergo.err delete mode 100644 src/plugins/wp/share/src/logs/Vlist.coq.err delete mode 100644 src/plugins/wp/share/src/logs/Vlist.why3.check.err delete mode 100644 src/plugins/wp/share/src/logs/Vlist.why3.err delete mode 100644 src/plugins/wp/share/src/logs/Vset.altergo.err delete mode 100644 src/plugins/wp/share/src/logs/Vset.coq.err delete mode 100644 src/plugins/wp/share/src/logs/Vset.why3.check.err delete mode 100644 src/plugins/wp/share/src/logs/Vset.why3.err delete mode 100644 src/plugins/wp/share/src/logs/bool.Bool.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/int.Abs.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/int.ComputerDivision.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/int.Int.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/int.MinMax.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/map.Const.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/map.Map.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/real.Abs.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/real.ExpLog.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/real.FromInt.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/real.Hyperbolic.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/real.MinMax.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/real.Polar.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/real.PowerReal.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/real.Real.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/real.RealInfix.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/real.Square.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/real.Trigonometry.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/logs/real.Truncate.altergo.stdlib.err delete mode 100644 src/plugins/wp/share/src/lower.ml delete mode 100644 src/plugins/wp/share/src/memory.why delete mode 100644 src/plugins/wp/share/src/qed.why delete mode 100644 src/plugins/wp/share/src/realization.conf delete mode 100644 src/plugins/wp/share/src/tests/import.why delete mode 100644 src/plugins/wp/share/src/tests/import/import_T_G_1.v delete mode 100644 src/plugins/wp/share/src/tests/import/why3session.xml delete mode 100644 src/plugins/wp/share/src/upper.ml delete mode 100644 src/plugins/wp/share/src/vlist.why delete mode 100644 src/plugins/wp/share/src/vset.why delete mode 100644 src/plugins/wp/share/src/why3-realize.drv delete mode 100644 src/plugins/wp/share/src/why3printer_realize.ml diff --git a/src/plugins/wp/share/src/.gitignore b/src/plugins/wp/share/src/.gitignore deleted file mode 100644 index 61cf9efba75..00000000000 --- a/src/plugins/wp/share/src/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -/local_why3.conf -/why3.conf -/alt_ergo-realize.drv -/coq-realize.drv -/coq.drv -/why3.drv -/plugins -/aux/ -/stamp/ -/*.coqdep -/*.v.bak -/*.vo -/*.glob -/*.why_theory -/.*.aux diff --git a/src/plugins/wp/share/src/.merlin b/src/plugins/wp/share/src/.merlin deleted file mode 100644 index 424bddd4569..00000000000 --- a/src/plugins/wp/share/src/.merlin +++ /dev/null @@ -1 +0,0 @@ -PKG why3 \ No newline at end of file diff --git a/src/plugins/wp/share/src/ArcTrigo.v b/src/plugins/wp/share/src/ArcTrigo.v deleted file mode 100644 index 17400d8f540..00000000000 --- a/src/plugins/wp/share/src/ArcTrigo.v +++ /dev/null @@ -1,33 +0,0 @@ -(* This file is generated by Why3's Coq-realize driver *) -(* Beware! Only edit allowed sections below *) -Require Import BuiltIn. -Require Reals.R_sqrt. -Require Reals.Rbasic_fun. -Require Reals.Rtrigo_def. -Require Reals.Rtrigo1. -Require Reals.Ratan. -Require BuiltIn. -Require real.Real. -Require real.RealInfix. -Require real.Abs. -Require real.Square. -Require real.Trigonometry. - -(* Why3 goal *) -Definition asin: R -> R. -Admitted. - -(* Why3 goal *) -Definition acos: R -> R. -Admitted. - -(* Why3 goal *) -Lemma Sin_asin : forall (x:R), (((-1%R)%R <= x)%R /\ (x <= 1%R)%R) -> - ((Reals.Rtrigo_def.sin (asin x)) = x). -Admitted. - -(* Why3 goal *) -Lemma Cos_acos : forall (x:R), (((-1%R)%R <= x)%R /\ (x <= 1%R)%R) -> - ((Reals.Rtrigo_def.cos (acos x)) = x). -Admitted. - diff --git a/src/plugins/wp/share/src/Bits.v b/src/plugins/wp/share/src/Bits.v deleted file mode 100644 index 0381e15181d..00000000000 --- a/src/plugins/wp/share/src/Bits.v +++ /dev/null @@ -1,1347 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of WP plug-in of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat a l'energie atomique et aux energies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -(* -------------------------------------------------------------------------- *) -(** * C-Integer Library for Coq *) -(* -------------------------------------------------------------------------- *) - -(** This module provides a theory of bits over [Z] natural integers. - - for natural [n], the [k]-th bit of [2^n] if [(k=n)] ; - - for positive integer [x>=0], it is the union of the bits of its binary - decomposition (hence, natural powers of two) ; - - finally, the bits of a negative integer [x<0] are the reverted ones - of its two's complement [-(x+1)]. - - The realization of the theory proceeds into several stages, - following the Coq definition of type [Z]. We take advantage of the - bitwize representation of positive integers provided by the [positive] - type in Coq. The successive stages are: - - properties of {!trailing:bit-functions} (finally ending by 1-sequence or 0-sequence); - - bits of {!positive:positive} integers [p>0]; - - bits of {!natural:natural} integers [n>=0]; - - bits of {!integer:integers} [n:Z]. - - The {!Zbit:characteristic} function of integers, denoted [Zbit], - have the expected logical properties: - - [(Zbit 0 k)] is [false]; - - [(Zbit (-1) k)] is [true]; - - [(Zbit (2^n) k)] is [(k=n)]; - - [Zbit] is injective, ie: the bit representation of each integer is unique. - -*) - -(** ** Type of characteristic functions of integers *) -Definition Zfc := nat -> bool. - -(** ** Tacticals *) - -Require Import ZArith. -Require Import FunctionalExtensionality. -Require Import Qedlib. - -Close Scope Z_scope. - -(** Induction after a given rank. *) -Remark upper_nat_ind: forall P (n:nat), - P n -> (forall k, (n < k) -> P k) -> (forall k, (n <= k) -> P k). -Proof. - intros. - case (le_lt_eq_dec n k); intuition (subst; auto with arith). -Qed. - -(** Induction over bool with equality. *) -Ltac case_eqb H e := - pattern e; apply Sumbool.bool_eq_ind; intro H. - -(** Find arithmetic contradiction. *) -Ltac arithContradiction := - cut False; [contradiction; try omega|];auto with arith. - -(** Cases [Inf:i<j], [EQ:i=j] and [Sup:i>j]. *) -Ltac nat_compare Inf EQ Sup i j := - destruct (lt_eq_lt_dec i j) as [ TMP | Sup ]; - [ destruct TMP as [ Inf | EQ ]; [ | try rewrite <- EQ ] | ]; - auto with arith. - -(** Cases [Inf:i<j], [EQ:i=j] and [Sup:i>j]. *) -Ltac Z_compare Inf EQ Sup i j := - destruct (Z_dec i j) as [ TMP| EQ ]; - [ destruct TMP as [ Inf | Sup ] | try rewrite <- EQ ]; - auto with zarith. - -(** For proving a symmetrical relation [P], - it is sufficient to prove [P i j] for [i<j] and [P i i]. *) -Lemma symmetrical_ind: forall (P : nat -> nat -> Prop), - (forall i j, P i j -> P j i) -> - (forall i, P i i) -> - (forall i j, i < j -> P i j) -> - (forall i j, P i j). -Proof. - intros P Sym Diag Triangle i j. - nat_compare Inf EQ Sup i j. -Qed. - -(** * remarks about two_power_nat *) -Remark two_power_nat_is_positive: forall n, - (0 < two_power_nat n)%Z. -Proof. - induction n. - (** base *) - + by compute. - (** ind. *) - + rewrite two_power_nat_S. - apply Zmult_lt_0_compat. - by compute. - auto. -Qed. - -Remark two_power_nat_plus: forall n m, - (two_power_nat (n+m) = (two_power_nat n)*(two_power_nat m))%Z. -Proof. - induction m. - (replace (two_power_nat 0) with 1%Z by (compute;forward)). - (replace (n + 0) with n by (auto with zarith)). - ring. - rewrite two_power_nat_S. - replace (n + S m) with (S(n+m)) by (auto with zarith). - rewrite two_power_nat_S. - rewrite IHm. - ring. -Qed. - -Remark two_power_nat_increase: forall n m, - n <= m -> (two_power_nat n <= two_power_nat m)%Z. -Proof. - intros. - rewrite ((le_plus_minus n m) H). - rewrite two_power_nat_plus. - generalize (two_power_nat_is_positive (m - n)). - pose (K:=(two_power_nat (m - n))); fold K; intro. - generalize (two_power_nat_is_positive n); intro. - rewrite <- (Z.mul_1_r (two_power_nat n)) at 1. - apply Zmult_le_compat_l; omega. -Qed. - -Remark two_power_nat_increase_strict: forall n m, - n < m -> (two_power_nat n < two_power_nat m)%Z. -Proof. - intros. - rewrite (le_plus_minus (n+1) m) by omega. - rewrite two_power_nat_plus. - generalize (two_power_nat_is_positive (m - (n+1))). - pose (K:=(two_power_nat (m - (n+1)))); fold K; intro. - rewrite two_power_nat_plus. - replace (two_power_nat 1) with 2%Z by (compute; trivial). - generalize (two_power_nat_is_positive n); intro. - rewrite <- (Z.mul_1_r (two_power_nat n)) at 1. - replace (two_power_nat n * 2 * K)%Z with (two_power_nat n * (2 * K))%Z - by ring. - apply Zmult_gt_0_lt_compat_l; omega. -Qed. - -(** {@trailing:} *) -(** * Eventually constant functions *) -(** The bits representation of [Z] integers are eventually constant - [nat -> bool] functions. Positive integers finally ends with an infinite - sequence of 0-bits, while negative inetegers ends with 1-bits. - - Hence, it is always possible to defined the highest significant sign-bit - of a bit function. This section formalize these properties: predicate [trailing] - defines an eventually constant bit function, and function [last] returns its - highest significant bit. -*) - -(** Function [f] has constant value [b] from rank [k]. *) -Definition trailing f (n:nat) (b:bool) := forall k, n <= k -> f k = b. - -(** Returns the lowest index such than [f n=b], and [n] otherwise. *) -Fixpoint last f n b {struct n} := - match n with - | O => O - | S m => if Bool.eqb (f m) b then last f m b else n - end. - -(** Functions last decreases. *) -Remark last_leq : forall f n b, last f n b <= n. -Proof. - intros f n b. - induction n; auto. - simpl. - destruct (Bool.eqb (f n) b); auto. -Qed. - -(** Trailing of previous position. *) -Remark trailing_step : forall f n b, - f n = b -> trailing f (S n) b -> trailing f n b. -Proof. - intros f n b fn tl. - unfold trailing. - apply upper_nat_ind; auto with arith. -Qed. - -(** Last preserves trailing. *) -Remark trailing_last : forall f n b, trailing f n b -> trailing f (last f n b) b. -Proof. - intros f n b. - induction n; simpl; auto. - intro IHS. - case_eqb H (Bool.eqb (f n) b); auto. - apply IHn. - apply trailing_step; [ apply Bool.eqb_prop | ]; auto. -Qed. - -(** The [last] is null or points to a flip. *) -Remark last_null_or_flip: forall (f: Zfc) (n: nat) (b: bool), - last f n b = O \/ exists k, last f n b = S k /\ f k <> b. -Proof. - intros f n b. induction n; simpl; auto. - case_eqb BIT (Bool.eqb (f n) b). auto. - right. exists n. split; [ auto | apply Bool.eqb_false_iff; auto ]. -Qed. - -(** The [last] of trailing is unique. *) -Lemma last_trail_ext: forall (f: Zfc) (b: bool) (n m: nat), - trailing f n b -> trailing f m b -> last f n b = last f m b. -Proof. - intros f b. - cut (forall n m, - trailing f n b -> trailing f m b -> last f n b < last f m b -> False). - { intros ABSURD n m. - intros Hn Hm. - nat_compare INF EQ SUP (last f n b) (last f m b); auto. - (** INF *) * apply False_ind; apply (ABSURD n m); auto. - (** SUP *) * apply False_ind; apply (ABSURD m n); auto. - } - intros n m Hn Hm. - pose ( i := last f n b ). fold i. - pose ( j := last f m b ). fold j. - intro Leq. - assert (Hi : trailing f i b) by (unfold i; apply trailing_last; auto). - assert (Hj : trailing f j b) by (unfold j; apply trailing_last; auto). - assert (Range : forall k, i <= k <= j -> f k = b) - by (intros k [lo up]; auto with arith). - - generalize (last_null_or_flip f m b). - intros [ Last_null | Last_flip ]. - (** Last is Null *) - + fold j in Last_null. rewrite Last_null in Leq. omega. - (** Last if a flip *) - + destruct Last_flip as [ k [ kj flip ] ]. - fold j in kj. - absurd (f k = b); auto. - apply Range; omega. -Qed. - -(** {@positive:} *) -(** * Bits of positive integers *) - -(** Strictly positive integers are represented in Coq by theirs bits, - with lowest bits as head constructors, and highest bit at tail. - - Conversely, given a finite range of bits ended by a 1-bit, the - reconstruction of a [positive] integer is defined. *) - -(** Position of the highest significant bit of a positive. *) -Fixpoint xHpos (p:positive): nat := - match p with - | xH => O - | xI p => S (xHpos p) - | xO p => S (xHpos p) - end. - -(** [xHpos] increases. *) -Remark xHpos_incr : - forall p a: positive, xHpos p <= xHpos (p + a). -Proof. - induction p; intros; simpl; case a; intros; simpl; try omega; - apply le_n_S; - try rewrite Pplus_one_succ_r; - try (rewrite Pplus_carry_spec; rewrite Pplus_one_succ_r;rewrite<- Pplus_assoc); - try solve [apply (IHp p0) | apply (IHp 1%positive)|apply (IHp (p0+1%positive)%positive)]. -Qed. - -(** Return the value of the [i]-th bit of a positive. *) -Fixpoint P_decomp (x: positive) (i: nat) { struct x } : bool := - match i, x with - | O, xH => true - | O, xI _ => true - | O, xO _ => false - | S m, xH => false - | S m, xI p => P_decomp p m - | S m, xO p => P_decomp p m - end. - -(** Returns the positive of bits [[f i,...,f (i+n-1),1]]. - Remark the [n]-th bit is always 1 ([xH]). *) -Fixpoint P_recomp (n: nat) (f : Zfc) (i: nat) {struct n } := - match n with - | O => xH - | S m => if (f i) then xI (P_recomp m f (S i)) else xO (P_recomp m f (S i)) - end. - -(** ** Properties of decomposition *) - -(** After the highest bits, all bits are false. *) -Remark P_decomp_limit: forall x k, - k > xHpos x -> P_decomp x k = false. -Proof. - induction x; simpl; intros; destruct k. - inversion H. apply IHx. auto with arith. - inversion H. apply IHx. auto with arith. - inversion H. auto with arith. -Qed. - -(** The highest bit is true. *) -Remark P_decomp_xHpos: forall x, - P_decomp x (xHpos x) = true. -Proof. - induction x; simpl; intros; auto. -Qed. - -(** The [P_shift] of [nat -> A] functions. *) -Definition P_shift {A:Type} f i k : A := f (i + k). - -(** bits of a positive with one more 1-bit. *) -Remark P_decomp_shift1: forall p: positive, - P_shift (P_decomp p~1) 1 = P_decomp p. -Proof. - intro p. extensionality k. unfold P_shift. auto. -Qed. - -(** bits of a positive with one more 0-bit. *) -Remark P_decomp_shift0: forall p: positive, - P_shift (P_decomp p~0) 1 = P_decomp p. -Proof. - intro p. extensionality k. unfold P_shift. auto. -Qed. - -(** ** Properties of recomposition *) - -(** Recomposition of shifted bits. *) -Remark P_recomp_shift: forall (f: Zfc) (n i j: nat), - P_recomp n f (i+j) = P_recomp n (P_shift f i) j. -Proof. - intros f n. - induction n; intros i j; simpl; auto. - unfold P_shift at 1. - case_eqb BIT (f (i+j)); f_equal; - (replace (S(i+j)) with (i + S j) by omega); - apply IHn. -Qed. - -(** Highest bits of recomposition. *) -Remark xHpos_P_recomp: forall (n: nat) (f: Zfc) (i: nat), - xHpos (P_recomp n f i) = n. -Proof. - intros n f. - induction n. simpl. auto. - intros. simpl. destruct (f i); simpl; f_equal; apply IHn. -Qed. - -(** ** Involution of decomposition and recomposition *) - -(** Invariance by 1-bit shift. *) -Remark NEXT_I: forall (n: nat) (p: positive), - P_recomp n (P_decomp p~1) 1 = P_recomp n (P_decomp p) 0. -Proof. - intros. - replace 1 with (1+0) by omega. - rewrite P_recomp_shift. - rewrite P_decomp_shift1. - auto. -Qed. - -(** Invariance by 0-bit shift. *) -Remark NEXT_O: forall (n: nat) (p: positive), - P_recomp n (P_decomp p~0) 1 = P_recomp n (P_decomp p) 0. -Proof. - intros. - replace 1 with (1+0) by omega. - rewrite P_recomp_shift. - rewrite P_decomp_shift0. - auto. -Qed. - -(** Recomposition of Decomposition. *) -Lemma P_recomp_decomp: forall (n: nat) (p: positive), - n = xHpos p -> P_recomp n (P_decomp p) O = p. -Proof. - induction n;intros;simpl. - destruct p; inversion H; auto. - destruct p; unfold P_decomp at 1; f_equal. - rewrite NEXT_I. apply IHn. inversion H; auto with arith. - rewrite NEXT_O. apply IHn. inversion H; auto with arith. - inversion H. -Qed. - -(** Decomposition of Recomposition. - The induction scheeme of the proof requires to recompose - an arbitrary shifted function. *) -Lemma P_decomp_recomp: forall (f: Zfc) (n i k: nat), - k < n -> P_decomp (P_recomp n f i) k = f (i+k). -Proof. - intros f n. - induction n. intros. apply False_ind. omega. - intros i k Limit. - simpl. destruct k. - case_eqb Fi (f i); simpl; rewrite <- Fi; f_equal; omega. - destruct (f i); simpl. - rewrite IHn. f_equal. omega. omega. - rewrite IHn. f_equal. omega. omega. -Qed. - -(** Last bits of positive. *) -Remark last_P_decomp: forall (p: positive) (m: nat), - m = xHpos p -> last (P_decomp p) (S m) false = (S m). -Proof. - intros p m Hm. - unfold last; rewrite Hm; rewrite P_decomp_xHpos; simpl; auto. -Qed. - -(** {@natural:} *) -(** * Bits of natural integers *) -(** The section naturally extends bits of [positive] to [N]. - Zero is represented by the infinite sequence of 0-bits. *) - -(** Conversion from [Z] to [N]. *) -Definition Nabs (x:Z): N := - match x with - | Z0 => N0 - | Zpos p => Npos p - | Zneg p => Npos p - end. - -(** Number of significative bits (last 1-bit) of a natural. *) -Definition NxHpos (n:N): nat := - match n with - | N0 => O - | Npos p => S (xHpos p) - end. - -(** NxHpos increases. *) -Remark NxHpos_incr: forall x a: N, NxHpos x <= NxHpos (x + a). -Proof. - destruct x; destruct a; simpl; try (by compute). - cut (xHpos p <= xHpos (p + p0)). omega. - apply xHpos_incr. -Qed. - -(** Arithmetic properties of [NxHpos] *) - -Remark NxHpos_2x_p0: forall n:N, - (0 < n)%N -> NxHpos (2 * n) = S (NxHpos n). -Proof. - destruct n; by simpl. -Qed. - -Remark NxHpos_2x_p1: forall n:N, - NxHpos (2 * n + 1) = S (NxHpos n). -Proof. - destruct n ; by simpl. -Qed. - -Remark NxHpos_div2_p: forall n:N, - (0 < n)%N -> NxHpos (Ndiv2 n) = pred (NxHpos n). -Proof. - destruct n. - (** zero *) - + by compute. - (** positive *) - + by destruct p. -Qed. - -(** Bits of a natural integer *) -Definition N_decomp (x: N): Zfc := - match x with - | N0 => (fun _ => false) - | Npos p => P_decomp p - end. - -(** Recomposition of an integer from a range of [n]-bits *) -Definition N_recomp (n: nat) (f: Zfc): Z := - match last f n false with - | O => Z0 - | S m => Zpos (P_recomp m f 0) - end. - -(** Recomposition result is a positive integer. *) -Remark N_recomp_pos: forall (n: nat) (f: Zfc), - (0 <= N_recomp n f)%Z. -Proof. - intros. unfold N_recomp. - destruct (last f n false); auto with zarith. -Qed. - -(** Zero has a unique representation *) -Remark N_recomp_zero: forall (n: nat) (f: Zfc), - trailing f n false -> (N_recomp n f = 0)%Z -> forall k, f k = false. -Proof. - intros n f Trail. - unfold N_recomp. - destruct (last_null_or_flip f n false) as [ZERO | FLIP]. - rewrite ZERO. intros. - generalize (trailing_last f n false). - intro TLAST. rewrite ZERO in TLAST. - apply TLAST; auto with arith. - destruct FLIP as [k [L F]]. - rewrite L. discriminate. -Qed. - -(** One has a unique representation *) -Remark N_recomp_one: forall (n: nat) (f: Zfc), - trailing f n false -> (N_recomp n f = 1)%Z -> - f O = true /\ forall k, f (S k) = false. -Proof. - intros n f Trail. - unfold N_recomp. - destruct (last_null_or_flip f n false) as [ZERO | FLIP]. - rewrite ZERO. intros. apply False_ind. omega. - destruct (last f n false) eqn:LAST. - intros. apply False_ind. omega. - intro ONE. - assert (XH: P_recomp n0 f 0 = xH). inversion ONE; trivial. - destruct FLIP as [ K1 [ SKN B1not ] ]. - assert (NK : n0 = K1) by ( auto with arith ). rewrite NK in *. - assert (B1 : f K1 = true) by ( destruct (f K1); auto ). - assert (T1 : trailing f (S K1) false). - { rewrite <- LAST. apply trailing_last; auto. } - destruct K1. - + rewrite B1 in *. - split; auto. intro k; destruct k; apply T1; auto with arith. - + simpl in XH. - destruct (f 0). - * apply False_ind. discriminate. - * apply False_ind. discriminate. -Qed. - -(** Involution of Decomposition and Recomposition *) -Lemma N_decomp_recomp: forall (n: nat) (f: Zfc), - trailing f n false -> N_decomp (Nabs (N_recomp n f)) = f. -Proof. - intros n f Trail. - unfold N_recomp. - generalize (last_null_or_flip f n false). - intros [ ZERO | FLIP ]. - (** ZERO *) - + rewrite ZERO. simpl. extensionality k. symmetry. - cut (trailing f 0 false). intro H. apply H. omega. - rewrite <- ZERO. - apply trailing_last. auto. - (** FLIP *) - + destruct FLIP as [k [Last Flip]]. - rewrite Last. simpl. - extensionality i. - nat_compare Inf EQ Sup i k. - (** Inf *) - * apply P_decomp_recomp. auto. - (** Eq *) - * generalize (xHpos_P_recomp i f 0). - pose (x := P_recomp i f 0). - fold x. - intro xHi. - rewrite <- xHi. - rewrite P_decomp_xHpos. - rewrite xHi. rewrite EQ. - case_eqb FK (f k); auto; contradiction. - (** Sup *) - * generalize (xHpos_P_recomp k f 0). - pose (x := P_recomp k f 0). - fold x. - intro xHk. - rewrite (P_decomp_limit x i); [|rewrite xHk;auto]. - cut (trailing f (S k) false). intro H. symmetry. apply H. omega. - rewrite <- Last. apply trailing_last. auto. -Qed. - -(** [NxHpos] of a recomposition *) -Lemma NxHpos_N_recomp_pos: forall (n: nat) (f: Zfc), - NxHpos (Nabs (N_recomp n f)) = last f n false. -Proof. - intros. - unfold N_recomp. - elim (last_null_or_flip f n false). - intro ZERO. rewrite ZERO. auto. - intros [ k [ LAST FLIP ] ]. - rewrite LAST. simpl. rewrite xHpos_P_recomp. trivial. -Qed. - -(** {@integer:} *) -(** * Bits of Integers *) - -Open Local Scope Z_scope. - -(** The bits representation of an integer consists of a bit function, - packed with its trailing property. - - This representation is _not_ unique. However, - the unicity of last significant bits implies an extensionality - equality: if two [bits] records have the same bit function, they represent - the same integer, see [Lemma btest_ext]. -*) - -Record bits: Type := mkbits - { bsize:nat; - bsign: bool; - btest: Zfc; - btrail : trailing btest bsize bsign }. - -(** ** Two's complement and bits inversion *) -(** As specified in the introduction, the extension positive integers [N] to [Z] - is realized by two's complement and bit inversion. *) - -(** Two's complement and related properties. *) - -Definition zlnot x:Z := -(x + 1). - -Remark zlnot_inv: forall x, - zlnot (zlnot x) = x. -Proof. - intros. unfold zlnot. auto with zarith. -Qed. -Remark zlnot_inj: forall x y : Z, - (zlnot x) = (zlnot y) -> x = y. -Proof. - unfold zlnot. intros. omega. -Qed. -Remark zlnot_sym: forall x y : Z, - (zlnot x) = y -> x = (zlnot y). -Proof. - unfold zlnot. intros. omega. -Qed. - -Lemma P_zlnot_sym: forall P (b: Z), - 0 <= b -> ((forall z: Z, -b <= z -> P z) -> (forall z:Z, z < b -> P (zlnot z))). -Proof. - intros P b Bge0 Hyp z H. assert (-b <= zlnot z). unfold zlnot. omega. - apply Hyp. auto. -Qed. - -Lemma P_zlnot_sym_rev: forall P (b: Z), - 0 <= b -> ((forall z:Z, z < b -> P z) -> (forall z:Z, -b <= z -> P (zlnot z))). -Proof. - intros P b Bge0 Hyp z H. assert (zlnot z < b). unfold zlnot. omega. - apply Hyp. auto. -Qed. - -(** Bit inversion and related properties. *) - -Definition fnot (f: Zfc): Zfc := (fun k => negb (f k)). - -Remark fnot_inv: forall f: Zfc, - fnot (fnot f) = f. -Proof. intros. extensionality k. unfold fnot. destruct (f k); auto. -Qed. -Remark fnot_inj: forall f g, fnot f = fnot g -> f = g. -Proof. intros. - generalize (fnot_inv f); intro E; rewrite <- E; clear E. - generalize (fnot_inv g); intro E; rewrite <- E; clear E. - rewrite H. auto. -Qed. -Remark fnot_sym: forall f g: Zfc, - (fnot f) = g -> f = (fnot g). -Proof. intros. - apply (fnot_inj f). rewrite (fnot_inv). auto. -Qed. - -(** Lifting of [fnot] to [trailing] *) -Remark trailing_fnot: forall (f: Zfc) (n: nat) (b: bool), - trailing (fnot f) n (negb b) -> trailing f n b. -Proof. - intros. unfold trailing. intros k Hk. - generalize (H k Hk). - intro E. - rewrite <- (fnot_inv f). - unfold fnot. unfold fnot in E. rewrite E. - rewrite Bool.negb_involutive. trivial. -Qed. - -(** Lifting of [fnot] to [last] *) -Remark last_fnot: forall (f: Zfc) (n: nat) (b: bool), - last (fnot f) n (negb b) = last f n b. -Proof. - intros. induction n. - simpl. trivial. - simpl. case_eqb H (Bool.eqb (f n) b). - (** TRUE *) - + unfold fnot. - destruct (f n); destruct b; simpl in *; (discriminate || apply IHn). - (** FALSE *) - + unfold fnot. - destruct (f n); destruct b; simpl in *; ( discriminate || auto). -Qed. - -(** ** Decomposition and Recomposition of integers *) - -(** Trailing bits of positive integers *) -Remark Zpos_decomp_trail: forall n: N, - trailing (N_decomp n) (NxHpos n) false. -Proof. - intro n. - induction n. - unfold trailing. auto. - unfold trailing. - simpl. - intro k. apply P_decomp_limit. -Qed. - -(** Trailing bits of positive integers *) -Remark Zneg_decomp_trail: forall n: N, - trailing (fnot (N_decomp n)) (NxHpos n) true. -Proof. - intro n. - unfold trailing. - intros. unfold fnot. - by (rewrite Zpos_decomp_trail). -Qed. - -(** Bits decomposition of [Z] integers *) -Program Definition bits_of_Z (x:Z): bits := - if (Zle_bool 0 x) - then let n := Nabs x in - mkbits (NxHpos n) false (N_decomp n) (Zpos_decomp_trail n) - else let n := Nabs (zlnot x) in - mkbits (NxHpos n) true (fnot (N_decomp n)) (Zneg_decomp_trail n). - -(** Recomposition of an integers from its bits *) -Definition Z_of_bits (b: bits): Z := - if bsign b - then zlnot (N_recomp (bsize b) (fnot (btest b))) - else N_recomp (bsize b) (btest b). - -(** ** Extensional unicity of bits representation *) - -(** Same [Zfc] implies equality of signs *) -Remark btest_sign: forall x y: bits, - btest x = btest y -> bsign x = bsign y. -Proof. - destruct x. destruct y. - simpl in * . - pose (k := max bsize0 bsize1). - generalize (btrail0 k). intro H0. - generalize (btrail1 k). intro H1. - intro BEQ. - rewrite <- H0; unfold k; auto with arith. - rewrite <- H1; unfold k; auto with arith. - rewrite BEQ. - auto. -Qed. - -(** Opposite [Zfc] implies opposite signs *) -Remark btest_sign_sym: forall x y: bits, - btest x = fnot (btest y) -> bsign x = negb (bsign y). -Proof. - destruct x. destruct y. - simpl in * . - pose (k := max bsize0 bsize1). - generalize (btrail0 k). intro H0. - generalize (btrail1 k). intro H1. - intro BEQ. - rewrite <- H0; unfold k; auto with arith. - rewrite <- H1; unfold k; auto with arith. - rewrite BEQ. - auto. -Qed. - -(** Same [Zfc] leads to equal represented integers *) -Lemma btest_ext: forall x y: bits, - btest x = btest y -> Z_of_bits x = Z_of_bits y. -Proof. - intros x y BEQ. - assert (bsign x = bsign y) as SEQ. apply btest_sign. auto. - unfold Z_of_bits. rewrite <- BEQ. rewrite <- SEQ. - case_eqb SIGNX (bsign x); [ f_equal | ]; - unfold N_recomp; - rewrite <- (last_trail_ext _ _ (bsize x) (bsize y)); auto. - (** x<0 , trailing ~x |x| false *) - + generalize (btrail x). rewrite SIGNX. - unfold trailing. intros T k R. unfold fnot. rewrite T; auto with arith. - (** x<0 , trailing ~x |y| false *) - + rewrite BEQ. - generalize (btrail y). rewrite SIGNX in SEQ. rewrite <- SEQ. - unfold trailing. intros T k R. unfold fnot. rewrite T; auto with arith. - (** x>0 , trailing x |x| false *) - + generalize (btrail x). rewrite SIGNX. auto. - (** x>0 , trailing x |y| false *) - + generalize (btrail y). rewrite SIGNX in SEQ. rewrite <- SEQ. rewrite <- BEQ. auto. -Qed. - -(** Opposite [Zfc] leads to two's complement represented integers *) -Lemma btest_ext_sym: forall x y: bits, - btest x = fnot (btest y) -> Z_of_bits x = zlnot (Z_of_bits y). -Proof. - intros x y BEQ1. - assert (btest y = fnot (btest x)) as BEQ2 by (apply fnot_sym; symmetry; auto). - assert (bsign x = negb (bsign y)) as SEQ1 by (by apply btest_sign_sym). - assert (bsign y = negb (bsign x)) as SEQ2 by (by apply btest_sign_sym). - unfold Z_of_bits. - rewrite <- BEQ1. rewrite SEQ2. rewrite <- BEQ2. - case_eqb SIGNX (bsign x); - (try replace (negb true) with false by (compute ; forward)); - (try replace (negb false) with true by (compute ; forward)); - (try rewrite zlnot_inv); - [ f_equal | ]; - unfold N_recomp; - rewrite <- (last_trail_ext _ _ (bsize x) (bsize y)); auto. - (** x<0 , trailing ~x |x| false *) - + rewrite BEQ2. - generalize (btrail x). rewrite SIGNX. - unfold trailing. intros T k R. unfold fnot. rewrite T; auto with arith. - (** x<0 , trailing ~x |y| false *) - + rewrite BEQ2. - generalize (btrail y). rewrite <- BEQ2. rewrite SIGNX in SEQ2. rewrite SEQ2. - replace (negb true) with false by auto. - auto. - (** x>0 , trailing x |x| false *) - + generalize (btrail x). rewrite SIGNX. auto. - (** x>0 , trailing x |y| false *) - + generalize (btrail y). rewrite SIGNX in SEQ2. rewrite SEQ2. - replace (negb false) with true by auto. rewrite BEQ1. - unfold trailing. intros T k R. unfold fnot. rewrite T; auto with arith. -Qed. - -(** ** Involution of Decomposition and Recomposition *) -(** These two fundamental lemmas allow reasoning conversely with bits or integers. *) - -(** [Z_of_bits] is the inverse of [bits_of_Z] *) -Lemma Z_recomp_decomp: forall x: Z, - Z_of_bits (bits_of_Z x) = x. -Proof. - intro x. - unfold bits_of_Z. - induction x; simpl. - (** x = 0 *) - + unfold Z_of_bits. simpl. unfold N_recomp. simpl. trivial. - (** x = Zpos p *) - + unfold Z_of_bits. simpl. unfold N_recomp. - rewrite last_P_decomp; auto. - rewrite P_recomp_decomp; auto. - (** x = Zneg p *) - + unfold Z_of_bits. simpl. - rewrite fnot_inv. - pose ( z := zlnot (Zneg p) ). - fold z. - generalize (zlnot_inv (Zneg p)). intro H. rewrite <- H. - f_equal. fold z. - assert (ZDEF: z = Zpos p - 1). - (** ZDEF *) - * unfold z. unfold zlnot. - pose (u := Zneg p). fold u. - pose (v := Zpos p). fold v. - replace u with (-v) by (unfold u; unfold v; simpl; trivial). - omega. - (** cont. *) - * assert (Q : z = 0 \/ exists q, z = Zpos q). - { destruct p. - - simpl in ZDEF. right. exists (p~1%positive - 1)%positive. trivial. - - simpl in ZDEF. right. exists (p~0%positive - 1)%positive. trivial. - - simpl in ZDEF. left. trivial. } - elim Q. - - intro Z; rewrite Z; simpl. - unfold N_recomp. simpl. trivial. - - intros [q Z]. rewrite Z; simpl. - unfold N_recomp. - rewrite last_P_decomp; auto. - rewrite P_recomp_decomp; auto. -Qed. - -(** [bits_of_Z] is the inverse of [Z_of_bits] modulo [btest] *) -Lemma Z_decomp_recomp: forall b: bits, - btest (bits_of_Z (Z_of_bits b)) = btest b. -Proof. - intros. - unfold Z_of_bits. - destruct (bsign b) eqn:BSIGN ; unfold bits_of_Z. - (** NEGATIVE SIGN *) - + pose ( f := fnot (btest b) ). fold f. - assert ( Fnot : btest b = fnot f). unfold f. rewrite fnot_inv. auto. - pose ( x := N_recomp (bsize b) f ). fold x. - assert ( Xpos : 0 <= x ) by ( apply N_recomp_pos; auto with zarith ). - repeat rewrite zlnot_inv. - case_leq 0 (zlnot x); intro SIGN; simpl. - (** 0 <= zlnot x -> contradiction *) - * unfold zlnot in SIGN. - apply False_ind. omega. - (** 0 > zlnot x *) - * apply fnot_inj. rewrite fnot_inv. fold f. unfold x. - apply N_decomp_recomp. - apply trailing_fnot. - simpl. rewrite <- BSIGN. rewrite <- Fnot. - apply (btrail b). - (** POSITIVE SIGN *) - + pose ( f := btest b ). fold f. - pose ( x := N_recomp (bsize b) f ). fold x. - assert ( Xpos : 0 <= x ) by ( apply N_recomp_pos; auto with zarith ). - case_leq 0 x; intro H; try (apply False_ind; omega; fail). - simpl. unfold f. unfold x. - apply N_decomp_recomp. - rewrite <- BSIGN. apply (btrail b). -Qed. - -(** Two's complement symmetry. *) -Lemma Z_decomp_recomp_sym: forall b: bits, - btest (bits_of_Z (zlnot (Z_of_bits b))) = fnot (btest b). -Proof. - intros. unfold Z_of_bits. - destruct (bsign b) eqn:BSIGN; unfold bits_of_Z; - (try rewrite zlnot_inv). - (** POSITIVE SIGN *) - + pose ( f := fnot (btest b)). fold f. - pose ( x := N_recomp (bsize b) f ). fold x. - assert ( Xpos : 0 <= x ) by ( apply N_recomp_pos; auto with zarith ). - case_leq 0 x; intro H; try (apply False_ind; omega; fail). - simpl. unfold f. unfold x. - apply N_decomp_recomp. - apply trailing_fnot. - replace (negb false) with true by auto. - rewrite fnot_inv. - rewrite <- BSIGN. - apply (btrail b). - (** NEGATIVE SIGN *) - + pose ( f := fnot (btest b) ). fold f. - assert ( Fnot : btest b = fnot f). unfold f. rewrite fnot_inv. auto. - pose ( x := N_recomp (bsize b) (btest b) ). fold x. - assert ( Xpos : 0 <= x) by ( apply N_recomp_pos; auto with zarith ). - case_leq 0 (zlnot x); intro SIGN; simpl. - (** 0 <= zlnot x -> contradiction *) - * unfold zlnot in SIGN. - apply False_ind. omega. - (** 0 > zlnot x *) - * unfold f. f_equal. - apply N_decomp_recomp. - rewrite <- BSIGN. - apply (btrail b). -Qed. - -(** [Zfc] can be used to discriminate. *) -Lemma btest_discrimination: forall x y: bits, - btest x <> btest y -> Z_of_bits x <> Z_of_bits y. -Proof. - intros x y. - intro BNEQ; apply contrap with (Q := btest x = btest y); auto; clear BNEQ. - intro. - rewrite <- (Z_decomp_recomp x); rewrite <- (Z_decomp_recomp y). - f_equal; f_equal; auto. -Qed. - -(** Sign can be used to discriminate. *) -Lemma sign_discrimination: forall x y: bits, - bsign x <> bsign y -> Z_of_bits x <> Z_of_bits y. -Proof. - intros x y SNEQ. apply btest_discrimination. - apply contrap with (Q := bsign x = bsign y); auto. - apply btest_sign. -Qed. - -(** Sign encoding *) -Lemma Zsign_encoding: forall z:Z, - bsign (bits_of_Z z) = negb (Zle_bool 0 z). -Proof. - intro z. unfold bits_of_Z. unfold bsign. - case_leq 0 z; auto. -Qed. - -Lemma bsign_encoding: forall b:bits, - bsign b = negb (Zle_bool 0 (Z_of_bits b)). -Proof. - intro b. - rewrite <- Zsign_encoding. - unfold Z_of_bits. - destruct (bsign b) eqn:BSIGN ; unfold bits_of_Z. - (** NEGATIVE SIGN *) - + pose ( f := fnot (btest b) ). fold f. - assert ( Fnot : btest b = fnot f). unfold f. rewrite fnot_inv. auto. - pose ( x := N_recomp (bsize b) f ). fold x. - assert ( Xpos : 0 <= x ) by ( apply N_recomp_pos; auto with zarith ). - repeat rewrite zlnot_inv. - case_leq 0 (zlnot x); intro SIGN; simpl. - (** 0 <= zlnot x -> contradiction *) - * unfold zlnot in SIGN. - apply False_ind. omega. - (** 0 > zlnot x *) - * auto. - (** POSITIVE SIGN *) - + pose ( f := btest b ). fold f. - pose ( x := N_recomp (bsize b) f ). fold x. - assert ( Xpos : 0 <= x ) by ( apply N_recomp_pos; auto with zarith ). - case_leq 0 x; intro H; try (apply False_ind; omega; fail). - simpl. auto. -Qed. - -(** {@Zbit:} *) -(** * Characteristic Function of integers *) - -(** Extracts the [k]-th bit of [x]. *) -Definition Zbit (x : Z): Zfc := btest (bits_of_Z x). - -Definition TRUE : Zfc := fun _ => true. -Definition FALSE : Zfc := fun _ => false. - -Lemma Zbit_of_zero: Zbit 0 = FALSE. -Proof. - unfold Zbit. unfold bits_of_Z. simpl. auto. -Qed. -Lemma Zbit_of_mone: Zbit (-1) = TRUE. -Proof. - unfold Zbit. unfold bits_of_Z. simpl. auto. -Qed. - -(** The expected characteristic of binary decomposition of an integer *) -Theorem Zbit_power: forall n k:nat, - Zbit (two_power_nat n) k = beq_nat n k. -Proof. - unfold two_power_nat. unfold Zbit. unfold bits_of_Z. - simpl. - induction n; intro k. - (** base *) - + simpl; auto. - (** ind. *) - + unfold shift_nat. destruct k; simpl; auto. -Qed. - -(** The extensional unicity of [Zbit] for each integer *) -Theorem Zbit_ext : - forall x y: Z, Zbit x = Zbit y -> x = y. -Proof. - unfold Zbit. - intros. - rewrite <- (Z_recomp_decomp x). - rewrite <- (Z_recomp_decomp y). - apply btest_ext. auto. -Qed. - -(** Two's complement symmetry *) -Theorem Zbit_ext_sym : - forall x y: Z, Zbit x = fnot (Zbit y) -> x = zlnot y. -Proof. - unfold Zbit. - intros. - rewrite <- (Z_recomp_decomp x). - rewrite <- (Z_recomp_decomp y). - apply btest_ext_sym. auto. -Qed. - -(** * Position of the Highest Significant Bit in two's complement representation *) -Definition ZxHpos (z:Z): nat := - if (Zle_bool 0 z) then NxHpos (Nabs z) else NxHpos (Nabs (zlnot z)). - -(** Zero has no significant bit, as minus one *) -Remark ZxHpos_is_zero: ZxHpos 0 = O /\ ZxHpos (-1) = O. -Proof. - split; by compute. -Qed. - -(** [bsize] of a [bits_of_Z] gives the exact position. - The use of the [last] function gives the exact position. *) -Lemma bsize_exact: forall z:Z, - ZxHpos (z) = bsize (bits_of_Z z). -Proof. - intro. unfold bits_of_Z. unfold ZxHpos. - case_leq 0 z; unfold bsize; auto. -Qed. - -(** [bsize] over approximates the exact position. - The use of the [last] function gives the exact position. *) -Lemma bsize_over_approx: forall b:bits, - ZxHpos (Z_of_bits b) = last (btest b) (bsize b) (bsign b). -Proof. - intros. unfold ZxHpos. - unfold Z_of_bits. - destruct (bsign b) eqn:BSIGN. - (** Negative *) - + pose ( f := fnot (btest b)). fold f. - pose ( x := N_recomp (bsize b) f ). fold x. - assert ( Xpos : 0 <= x ) by (apply N_recomp_pos; auto with zarith ). - case_leq 0 (zlnot x); - intro H; - try (unfold zlnot in H; apply False_ind; omega; fail). - rewrite zlnot_inv. - unfold x. unfold f. - rewrite NxHpos_N_recomp_pos. - rewrite <- last_fnot. - rewrite fnot_inv. - by simpl. - (** Positive *) - + case_leq 0 (N_recomp (bsize b) (btest b)); intro N_recomp. - rewrite NxHpos_N_recomp_pos. trivial. - generalize (N_recomp_pos(bsize b) (btest b)). - intros. apply False_ind. omega. -Qed. - -(** Two's complement symmetry *) -Remark ZxHpos_sym: forall z: Z, - ZxHpos (zlnot z) = ZxHpos z. -Proof. - intro. - unfold ZxHpos; try rewrite zlnot_inv; unfold zlnot. - case_leq 0 z; case_leq 0 (-(z+1)). -Qed. - -(** Position of the highest significant bit of [two_power_nat]. *) -Remark ZxHpos_of_two_power_nat: forall n: nat, - (ZxHpos (two_power_nat n) = S n)%nat. -Proof. - intro. unfold ZxHpos. - case_leq 0 (two_power_nat n); intro. - (** 0 <=two_power_nat n *) - + induction n. - (** Base *) - * by simpl. - (** cont. *) - * rewrite two_power_nat_S. - rewrite two_power_nat_S in H. - replace (Nabs (2 * two_power_nat n)) with (2 * Nabs (two_power_nat n))%N - by by compute. - rewrite NxHpos_2x_p0. - by rewrite IHn. - by compute. - (** 0 > two_power_nat n *) - + generalize (two_power_nat_is_positive n). omega. -Qed. - -(** Position of the highest significant bit of the predecessor of [two_power_nat]. *) -Remark ZxHpos_of_two_power_nat_minus_one: forall n: nat, - (ZxHpos ((two_power_nat n) - 1) = n)%nat. -Proof. - intro. unfold ZxHpos. - case_leq 0 ((two_power_nat n) -1); intro. - (** 0 <=(two_power_nat n) - 1 *) - + induction n. - (** Base *) - * by simpl. - (** cont. *) - * rewrite two_power_nat_S. - rewrite two_power_nat_S in H. - assert ((Nabs (2 * two_power_nat n - 1) = 2 * Nabs (two_power_nat n - 1) +1)%N) as EQ. - { generalize (two_power_nat_is_positive n); intro. - assert (0 <= (two_power_nat n - 1)) as A0 by omega. - assert (0 < 2 * (two_power_nat n - 1) + 1) as A1 by omega. - replace (2 * two_power_nat n - 1) with (2 * (two_power_nat n - 1) + 1) by omega. - destruct (two_power_nat n - 1); by auto. } - rewrite EQ. - rewrite NxHpos_2x_p1. - by rewrite IHn. - (** 0 > two_power_nat n *) - + generalize (two_power_nat_is_positive n). omega. -Qed. - -(** [ZxHpos] increases for positive input values *) -Remark ZxHpos_incr_for_positive: forall x a: Z, - 0 <= x -> 0 <= a -> (ZxHpos x <= ZxHpos (x + a))%nat. -Proof. - intros. - unfold ZxHpos. - case_leq 0 x. case_leq 0 (x + a). intros. - destruct x; destruct a; try (by compute). - replace (Nabs (Zpos p + Zpos p0)) with (Npos p + Npos p0)%N by forward. - apply NxHpos_incr. -Qed. - -(** [ZxHpos] decreases for negative input values *) -Remark ZxHpos_decr_for_negative: forall x a: Z, - x <= 0 -> a <= 0 -> (ZxHpos x <= ZxHpos (x + a))%nat. -Proof. - intros. - unfold ZxHpos. unfold zlnot. - case_leq 0 x; case_leq 0 (x + a); - intros; try (replace x with 0 by omega); try (by compute). - case_leq (-1) x; - intros; try (replace x with (-1) by omega); try (by compute). - assert (- (x + 1) >= 0) as X by omega. - assert (- a >= 0) as A by omega. - clear H; clear H0; clear H1; clear H2; clear H3. - replace (-(x+a+1)) with (-(x+1) + -a) by omega. - pose (b := -a); fold b; fold b in A. - pose (y := -(x+1)); fold y; fold y in X. - destruct y; destruct b; try (by compute). - replace (Nabs (Zpos p + Zpos p0)) with (Npos p + Npos p0)%N by forward. - apply NxHpos_incr. -Qed. - -(** [two_power_nat_of (ZxHpos z)] gives an upper bound for [z] *) -Remark two_power_nat_of_ZxHpos: forall z: Z, - z < two_power_nat (ZxHpos z). -Proof. - destruct z. - (** zero *) - + by compute. - (** positive *) - + unfold ZxHpos. - replace (Nabs (Zpos p)) with (Npos p) by forward. - replace (Zpos p) with (Z_of_N (Npos p)) by forward. - induction p. - (** 2p+1 *) - * simpl. simpl in IHp. - replace (Zpos p~1) with (2*(Zpos p) + 1)%Z by (auto with zarith). - rewrite two_power_nat_S. - omega. - (** 2p *) - * simpl. simpl in IHp. - replace (Zpos p~0) with (2*Zpos p)%Z by (auto with zarith). - rewrite two_power_nat_S. - omega. - (** one *) - * by compute. - (** negative *) - + assert (Zneg p < 0)%Z by (by simpl). - generalize (two_power_nat_is_positive (ZxHpos (Zneg p))). - omega. -Qed. - -(** Lower upper [two_power_nat] bound of an integer. *) -Definition ZxHbound (z: Z): Z := two_power_nat (ZxHpos z). - -Remark ZxHbound_of_two_power_nat_minus_one: forall n: nat, - ZxHbound ((two_power_nat n) - 1) = two_power_nat n. -Proof. - intro. unfold ZxHbound. - rewrite ZxHpos_of_two_power_nat_minus_one. auto. -Qed. - -(** [ZxHbound] gives an upper and lower bound. *) -Lemma ZxHrange: forall z: Z, - let bound := ZxHbound z in -bound <= z < bound. -Proof. - intro. unfold ZxHbound. - case_leq 0 z; intro. - (** 0 <= z *) - + generalize (two_power_nat_of_ZxHpos z). split; omega. - (** 0 > z *) - + generalize (two_power_nat_of_ZxHpos (-(z+1))). - rewrite <- (ZxHpos_sym z). - unfold zlnot. - split; omega. -Qed. - -Remark ZxHpos_le: forall x y: Z, - ZxHbound x <= ZxHbound y -> (ZxHpos x <= ZxHpos y)%nat. -Proof. - unfold ZxHbound. - intros x y. - pose (X := ZxHpos x). fold X. - pose (Y := ZxHpos y). fold Y. - generalize X Y. - induction X0; intro. - (** base *) - + generalize (two_power_nat_is_positive Y0). - replace (two_power_nat 0) with 1 by (compute ; forward). - omega. - (** cont. *) - + rewrite two_power_nat_S. - induction Y0. - (** base *) - * generalize (two_power_nat_is_positive X0). - replace (two_power_nat 0) with 1 by (compute ; forward). - omega. - (** cont. *) - * rewrite two_power_nat_S. - cut ((2 * two_power_nat X0) <= (2 * two_power_nat Y0) -> (S X0 <= S Y0)%nat). omega. - generalize (IHX0 Y0). - omega. -Qed. - -Remark ZxHbound_le: forall x y: Z, - (ZxHpos x <= ZxHpos y)%nat -> ZxHbound x <= ZxHbound y. -Proof. - unfold ZxHbound. - intros x y. - pose (X := ZxHpos x). fold X. - pose (Y := ZxHpos y). fold Y. - repeat rewrite two_power_nat_S. - generalize X Y. - induction X0; intro. - (** base *) - + generalize (two_power_nat_is_positive Y0). - replace (two_power_nat 0) with 1 by (compute ; forward). - omega. - (** cont. *) - + rewrite two_power_nat_S. - induction Y0. - (** base *) - * generalize (two_power_nat_is_positive X0). - replace (two_power_nat 0) with 1 by (compute ; forward). - omega. - (** cont. *) - * intro. - rewrite two_power_nat_S. - cut ((2 * two_power_nat X0) <= (2 * two_power_nat Y0)). omega. - apply (IHX0 Y0). - omega. -Qed. - -Remark ZxHbound_lt: forall x y: Z, - (ZxHpos x < ZxHpos y)%nat -> ZxHbound x < ZxHbound y. -Proof. - unfold ZxHbound. - intros x y. - pose (X := ZxHpos x). fold X. - pose (Y := ZxHpos y). fold Y. - repeat rewrite two_power_nat_S. - generalize X Y. - induction X0; intro. - (** base *) - + generalize (two_power_nat_is_positive Y0). - replace (two_power_nat 0) with 1 by (compute ; forward). - induction Y0; repeat rewrite two_power_nat_S; omega. - (** cont. *) - + rewrite two_power_nat_S. - induction Y0. - (** base *) - * generalize (two_power_nat_is_positive X0). - replace (two_power_nat 0) with 1 by (compute;forward). - omega. - (** cont. *) - * intro. - rewrite two_power_nat_S. - apply (IHX0 Y0). - omega. -Qed. - -Lemma ZxHpower: forall (n: nat) (z: Z), - -(two_power_nat n) <= z < two_power_nat n -> ZxHbound z <= two_power_nat n. -Proof. - intros. - rewrite <- ZxHbound_of_two_power_nat_minus_one. - apply ZxHbound_le. - destruct H. - case_leq 0 z; intro. - (** 0 <= z *) - + clear H. - replace (two_power_nat n - 1) with (z + ((two_power_nat n - 1) - z)) by auto with zarith. - pose (d := ((two_power_nat n - 1) - z)); fold d. - assert (0 <= d) as D by (unfold d; omega). - by (apply ZxHpos_incr_for_positive). - (** 0 > z *) - + rewrite <- (ZxHpos_sym z). - unfold zlnot. - replace (two_power_nat n - 1) with (-(z+1) + (z+two_power_nat n)) by auto with zarith. - pose (x := -(z+1)); fold x. - pose (d := (z + two_power_nat n)); fold d. - assert (0 <= d) as D by (unfold d; omega). - apply ZxHpos_incr_for_positive. - unfold x. omega. unfold d. omega. -Qed. - -(** ** Main tactics.*) -Ltac Zbit_ext k := apply Zbit_ext; extensionality k. - -Ltac auto_bits := autorewrite with bits ; auto with zarith. -Hint Rewrite Zbit_of_zero Zbit_of_mone : bits. diff --git a/src/plugins/wp/share/src/BuiltIn/bool.mlw b/src/plugins/wp/share/src/BuiltIn/bool.mlw deleted file mode 100644 index bc353e7c972..00000000000 --- a/src/plugins/wp/share/src/BuiltIn/bool.mlw +++ /dev/null @@ -1,30 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of WP plug-in of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat a l'energie atomique et aux energies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -logic match_bool : bool, 'a, 'a -> 'a - -axiom match_bool_True : - (forall z:'a. forall z1:'a. (match_bool(true, z, z1) = z)) - -axiom match_bool_False : - (forall z:'a. forall z1:'a. (match_bool(false, z, z1) = z1)) - diff --git a/src/plugins/wp/share/src/Cbits.v b/src/plugins/wp/share/src/Cbits.v deleted file mode 100644 index 0b1e75507f2..00000000000 --- a/src/plugins/wp/share/src/Cbits.v +++ /dev/null @@ -1,1774 +0,0 @@ -(* This file is generated by Why3's Coq-realize driver *) -(* Beware! Only edit allowed sections below *) -Require Import BuiltIn. -Require BuiltIn. -Require Qed. -Require bool.Bool. -Require int.Int. -Require int.Abs. -Require int.ComputerDivision. -Require real.Real. -Require real.RealInfix. -Require real.FromInt. -Require Cint. - -(* Why3 goal *) -Lemma lnot_bool : ((Cint.lnot 0%Z) = (-1%Z)%Z) /\ - ((Cint.lnot (-1%Z)%Z) = 0%Z). -Proof. - split; Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma land_idemp : forall (x:Z), ((Cint.land x x) = x). -Proof. - intro. Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma land_0 : forall (x:Z), ((Cint.land 0%Z x) = 0%Z). -Proof. - intro. Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma land_0bis : forall (x:Z), ((Cint.land x 0%Z) = 0%Z). -Proof. - intro. - rewrite Zbits.land_commut. - Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma land_1 : forall (x:Z), ((Cint.land (-1%Z)%Z x) = x). -Proof. - intro. Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma land_1bis : forall (x:Z), ((Cint.land x (-1%Z)%Z) = x). -Proof. - intros x. - rewrite Zbits.land_commut. - Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma land_bool : ((Cint.land 0%Z 0%Z) = 0%Z) /\ (((Cint.land 0%Z - 1%Z) = 0%Z) /\ (((Cint.land 1%Z 0%Z) = 0%Z) /\ ((Cint.land 1%Z - 1%Z) = 1%Z))). -Proof. - split;split;split;Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma lor_idemp : forall (x:Z), ((Cint.lor x x) = x). -Proof. - intro. Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma lor_1 : forall (x:Z), ((Cint.lor (-1%Z)%Z x) = (-1%Z)%Z). -Proof. - intro. Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma lor_1bis : forall (x:Z), ((Cint.lor x (-1%Z)%Z) = (-1%Z)%Z). -Proof. - intros x. - rewrite Zbits.lor_commut. - Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma lor_0 : forall (x:Z), ((Cint.lor 0%Z x) = x). -Proof. - intro. Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma lor_0bis : forall (x:Z), ((Cint.lor x 0%Z) = x). -Proof. - intros x. - rewrite Zbits.lor_commut. - Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma lor_bool : ((Cint.lor 0%Z 0%Z) = 0%Z) /\ (((Cint.lor 0%Z 1%Z) = 1%Z) /\ - (((Cint.lor 1%Z 0%Z) = 1%Z) /\ ((Cint.lor 1%Z 1%Z) = 1%Z))). -Proof. - split;split;split; Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma lxor_nilpotent : forall (x:Z), ((Cint.lxor x x) = 0%Z). -Proof. - intro. Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma lxor_1 : forall (x:Z), ((Cint.lxor (-1%Z)%Z x) = (Cint.lnot x)). -Proof. - intro. Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma lxor_1bis : forall (x:Z), ((Cint.lxor x (-1%Z)%Z) = (Cint.lnot x)). -Proof. - intros x. - rewrite Zbits.lxor_commut. - Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma lxor_0 : forall (x:Z), ((Cint.lxor 0%Z x) = x). -Proof. - intro. Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma lxor_0bis : forall (x:Z), ((Cint.lxor x 0%Z) = x). -Proof. - intros x. - rewrite Zbits.lxor_commut. - Zbits.auto_zbits. -Qed. - -(* Why3 goal *) -Lemma lxor_bool : ((Cint.lxor 0%Z 0%Z) = 0%Z) /\ (((Cint.lxor 0%Z - 1%Z) = 1%Z) /\ (((Cint.lxor 1%Z 0%Z) = 1%Z) /\ ((Cint.lxor 1%Z - 1%Z) = 0%Z))). -Proof. - split; split; split; Zbits.auto_zbits. -Qed. - -Require Import Qedlib. -Open Local Scope Z_scope. - -(** * Bit extraction *) -(** Tacticals *) -Local Ltac omegaContradiction := cut False; [contradiction|omega]. - -Ltac unfold_bit_testb h := - unfold Cint.bit_testb; unfold Zbits.bit_testb; - rewrite (Zle_imp_le_bool _ _ h). - -(** Some useful properties *) -Remark Zlt_bool_true_Zlt: forall (b:bool) (x y: Z), - (b = Zlt_bool x y) <-> ((b = true) <-> x < y). -Proof. - intros. - split; case_lt x y; intros; try rewrite H0. - + split; intro G; auto. - + split; intro G; [discriminate G| omega]. - + auto. - + destruct b; try auto. - destruct H0. assert (x < y) by (by (apply H0)). - omegaContradiction. -Qed. - -(** ** Definition of bit_test predicate *) -(* Why3 goal *) -Lemma bit_test_def : forall (x:Z) (k:Z), ((Cint.bit_testb x k) = true) <-> - (Cint.bit_test x k). -Proof. - intros x k. - unfold Cint.bit_test. - reflexivity. -Qed. - -(** * Link between Bit extraction and bitwise operators *) -(** ** Some properties of bit extration *) -(** ** Logical operators *) - -(* Why3 goal *) -Lemma bit_test_extraction : forall (x:Z) (k:Z), (0%Z <= k)%Z -> - ((~ ((Cint.land x (Cint.lsl 1%Z k)) = 0%Z)) <-> (Cint.bit_test x k)). -Proof. - intros x k h1. - unfold Cint.land. - unfold Cint.lsl; unfold Zbits.lsl. - rewrite (Zle_imp_le_bool _ _ h1); unfold Zbits.lsl_def. - - unfold Cint.bit_test; unfold Cint.bit_testb; - unfold_bit_testb h1; unfold Zbits.zbit_test_def. - pose (i:= (Z.abs_nat k)); fold i. - split. - (** 1st impl *) - + intro NEQ. - apply Bool.not_false_is_true. - contradict NEQ. - rewrite Zbits.Zbit_extraction. - assumption. - (** 2sd impl *) - + intro EQ. - contradict EQ. - rewrite Bool.not_true_iff_false. - rewrite <- Zbits.Zbit_extraction. - assumption. -Qed. - -(* Why3 goal *) -Lemma bit_test_extraction_eq : forall (x:Z) (k:Z), (0%Z <= k)%Z -> - (((Cint.land x (Cint.lsl 1%Z k)) = (Cint.lsl 1%Z k)) <-> (Cint.bit_test x - k)). -Proof. - intros x k h1. - unfold Cint.land. - unfold Cint.lsl; unfold Zbits.lsl. - rewrite (Zle_imp_le_bool _ _ h1); unfold Zbits.lsl_def. - - unfold Cint.bit_test; unfold Cint.bit_testb; - unfold_bit_testb h1; unfold Zbits.zbit_test_def. - pose (i:= (Z.abs_nat k)); fold i. - rewrite Zbits.Zbit_extraction_true. - split; auto. -Qed. - -(* Why3 goal *) -Lemma lsl_1_0 : ((Cint.lsl 1%Z 0%Z) = 1%Z). -Proof. - compute. auto. -Qed. - -(* Why3 goal *) -Lemma bit_test_extraction_bis : forall (x:Z), (~ ((Cint.land 1%Z - x) = 0%Z)) -> (Cint.bit_test x 0%Z). -Proof. - intros x. - rewrite <- lsl_1_0. - intro. - apply bit_test_extraction. - + omega. - + rewrite Zbits.land_commut. - auto. -Qed. - -(* Why3 goal *) -Lemma bit_test_extraction_bis_eq : forall (x:Z), (Cint.bit_test x 0%Z) -> - ((Cint.land 1%Z x) = 1%Z). -Proof. - intros x h1. - rewrite <- lsl_1_0. - rewrite <- Zbits.land_commut. - apply bit_test_extraction_eq; auto with zarith. -Qed. - -(* Why3 goal *) -Lemma lnot_extraction_bool : forall (x:Z) (i:Z), (0%Z <= i)%Z -> - ((Cint.bit_testb (Cint.lnot x) i) = (Init.Datatypes.negb (Cint.bit_testb x - i))). -Proof. - intros x i h1. unfold_bit_testb h1. - apply Zbits.lnot_extraction. -Qed. - -(* Why3 goal *) -Lemma lnot_extraction : forall (x:Z) (i:Z), (0%Z <= i)%Z -> ((Cint.bit_test - (Cint.lnot x) i) <-> ~ (Cint.bit_test x i)). -Proof. - intros x i h1. - unfold Cint.bit_test. rewrite lnot_extraction_bool; auto. - pose (xb:=Cint.bit_testb x i). fold xb. - destruct xb; simpl; split; intros; auto. - discriminate H. -Qed. - -(* Why3 goal *) -Lemma land_extraction_bool : forall (x:Z) (y:Z) (i:Z), (0%Z <= i)%Z -> - ((Cint.bit_testb (Cint.land x y) - i) = (Init.Datatypes.andb (Cint.bit_testb x i) (Cint.bit_testb y i))). -Proof. - intros x y i h1. unfold_bit_testb h1. - apply Zbits.land_extraction. -Qed. - -(* Why3 goal *) -Lemma land_extraction : forall (x:Z) (y:Z) (i:Z), (0%Z <= i)%Z -> - ((Cint.bit_test (Cint.land x y) i) <-> ((Cint.bit_test x i) /\ - (Cint.bit_test y i))). -Proof. - intros x y i h1. - unfold Cint.bit_test. rewrite land_extraction_bool; auto. - pose (xb:=Cint.bit_testb x i). fold xb. - pose (yb:=Cint.bit_testb y i). fold yb. - destruct xb; destruct yb; simpl; split; intros; auto; destruct H; auto. -Qed. - -(* Why3 goal *) -Lemma lor_extraction_bool : forall (x:Z) (y:Z) (i:Z), (0%Z <= i)%Z -> - ((Cint.bit_testb (Cint.lor x y) i) = (Init.Datatypes.orb (Cint.bit_testb x - i) (Cint.bit_testb y i))). -Proof. - intros x y i h1. unfold_bit_testb h1. - apply Zbits.lor_extraction. -Qed. - -(* Why3 goal *) -Lemma lor_extraction : forall (x:Z) (y:Z) (i:Z), (0%Z <= i)%Z -> - ((Cint.bit_test (Cint.lor x y) i) <-> ((Cint.bit_test x i) \/ - (Cint.bit_test y i))). -Proof. - intros x y i h1. - unfold Cint.bit_test. rewrite lor_extraction_bool; auto. - pose (xb:=Cint.bit_testb x i). fold xb. - pose (yb:=Cint.bit_testb y i). fold yb. - destruct xb; destruct yb; simpl; split; intros; auto; destruct H; auto. -Qed. - -(* Why3 goal *) -Lemma lxor_extraction_bool : forall (x:Z) (y:Z) (i:Z), (0%Z <= i)%Z -> - ((Cint.bit_testb (Cint.lxor x y) - i) = (Init.Datatypes.xorb (Cint.bit_testb x i) (Cint.bit_testb y i))). -Proof. - intros x y i h1. - unfold_bit_testb h1. - apply Zbits.lxor_extraction. -Qed. - -(* Why3 goal *) -Lemma lxor_extraction : forall (x:Z) (y:Z) (i:Z), (0%Z <= i)%Z -> - ((Cint.bit_test (Cint.lxor x y) i) <-> ((Cint.bit_test x i) <-> - ~ (Cint.bit_test y i))). -Proof. - intros x y i h1. - unfold Cint.bit_test. rewrite lxor_extraction_bool; auto. - pose (xb:=Cint.bit_testb x i). fold xb. - pose (yb:=Cint.bit_testb y i). fold yb. - destruct xb; destruct yb; simpl; repeat (split; intros; auto). - discriminate H. - destruct H; contradiction H; auto. - discriminate H0. - destruct H; apply H0; discriminate. -Qed. - -(** ** Shift operators *) - -(* Why3 goal *) -Lemma lsl_1_two_power : forall (n:Z), (0%Z <= n)%Z -> ((Cint.lsl 1%Z - n) = (Cint.two_power_abs n)). -Proof. - intros n h1. - unfold Cint.lsl. rewrite Zbits.lsl_pos by auto. - unfold Zbits.lsl_def. rewrite Zbits.lsl_arithmetic_shift. - unfold Zbits.lsl_arithmetic_def. - unfold Cint.two_power_abs. ring. -Qed. - -(* Why3 goal *) -Lemma land_1_lsl_1 : forall (a:Z) (x:Z) (n:Z), (0%Z <= n)%Z -> - ((a < (Cint.lsl 1%Z n))%Z -> (((2%Z * a)%Z + (Cint.land 1%Z - x))%Z < (Cint.lsl 1%Z (1%Z + n)%Z))%Z). -Proof. - intros a x n h1. - unfold Cint.lsl; unfold Zbits.lsl. - case_leq 0%Z (1 + n)%Z ; intro. - case_leq 0%Z (n)%Z ; intro. - - unfold Zbits.lsl_def. - rewrite Zbits.lsl_arithmetic_shift. - unfold Zbits.lsl_arithmetic_def. - rewrite Zabs2Nat.abs_nat_nonneg by auto. - rewrite Zabs2Nat.abs_nat_nonneg by auto. - rewrite Z2Nat.inj_add by omega. - pose (n0:=Z.to_nat n); fold n0. - - replace ((Z.to_nat 1%Z)%nat) with (1%nat) by auto. - rewrite Bits.two_power_nat_plus. - replace ((two_power_nat 1)%Z) with (2%Z) by auto with zarith. - replace ((1 * two_power_nat n0)%Z) with ((two_power_nat n0)%Z) by auto. - replace ((1 * (2 * two_power_nat n0))%Z) with ((2 * two_power_nat n0)%Z) by ring. - - intro. - cut((Cint.land 1 x < 2)%Z) ; auto with zarith. - - case_eq ((Cint.land 1 x)%Z) (0%Z); intros. - rewrite bit_test_extraction_bis_eq; [omega|]. - apply bit_test_extraction_bis. - auto. -Qed. - -(** ** Shift operators *) -(* Why3 goal *) -Lemma lsl_extraction_sup_bool : forall (x:Z) (n:Z) (m:Z), (0%Z <= n)%Z -> - ((0%Z <= m)%Z -> ((n <= m)%Z -> ((Cint.bit_testb (Cint.lsl x n) - m) = (Cint.bit_testb x (m - n)%Z)))). -Proof. - intros x n m h1 h2 h3. - unfold Cint.lsl. unfold Zbits.lsl. - unfold_bit_testb h1. - rewrite (Zle_imp_le_bool _ _ h2). - rewrite (Zle_imp_le_bool 0 (m - n)) by omega. - rewrite Zbits.lsl_extraction. - rewrite (Z.abs_eq n); auto. - rewrite (Z.abs_eq m); auto. - case_leq n m. - intros. - reflexivity. -Qed. - -(* Why3 goal *) -Lemma lsl_extraction_sup : forall (x:Z) (n:Z) (m:Z), (0%Z <= n)%Z -> - ((0%Z <= m)%Z -> ((n <= m)%Z -> ((Cint.bit_test (Cint.lsl x n) m) <-> - (Cint.bit_test x (m - n)%Z)))). -Proof. - intros x n m h1 h2 h3. - unfold Cint.bit_test; rewrite lsl_extraction_sup_bool; auto; reflexivity. -Qed. - -(* Why3 goal *) -Lemma lsl_extraction_inf_bool : forall (x:Z) (n:Z) (m:Z), (0%Z <= n)%Z -> - ((0%Z <= m)%Z -> ((m < n)%Z -> ((Cint.bit_testb (Cint.lsl x n) - m) = false))). -Proof. - intros x n m h1 h2 h3. - unfold Cint.lsl. unfold Zbits.lsl. - unfold_bit_testb h1. - rewrite (Zle_imp_le_bool _ _ h2). - rewrite Zbits.lsl_extraction. - rewrite (Z.abs_eq n); auto. - rewrite (Z.abs_eq m); auto. - case_leq n m. - intros. - reflexivity. -Qed. - -(* Why3 goal *) -Lemma lsl_extraction_inf : forall (x:Z) (n:Z) (m:Z), (0%Z <= n)%Z -> - ((0%Z <= m)%Z -> ((m < n)%Z -> ~ (Cint.bit_test (Cint.lsl x n) m))). -Proof. - intros x n m h1 h2 h3. - unfold Cint.bit_test; rewrite lsl_extraction_inf_bool; auto; reflexivity. -Qed. - -(* Why3 goal *) -Lemma lsr_extraction_bool : forall (x:Z) (n:Z) (m:Z), (0%Z <= n)%Z -> - ((0%Z <= m)%Z -> ((Cint.bit_testb (Cint.lsr x n) m) = (Cint.bit_testb x - (m + n)%Z))). -Proof. - intros x n m h1 h2. - unfold Cint.lsr. unfold Zbits.lsr. - unfold_bit_testb h1. - rewrite (Zle_imp_le_bool _ _ h2). - rewrite Zbits.lsr_extraction. - rewrite (Z.abs_eq n); auto. - rewrite (Z.abs_eq m); auto. - case_leq 0 (m+n). - intros. - reflexivity. -Qed. - -(* Why3 goal *) -Lemma lsr_extractionl : forall (x:Z) (n:Z) (m:Z), (0%Z <= n)%Z -> - ((0%Z <= m)%Z -> ((Cint.bit_test (Cint.lsr x n) m) <-> (Cint.bit_test x - (m + n)%Z))). -Proof. - intros x n m h1 h2. - unfold Cint.bit_test; rewrite lsr_extraction_bool; auto; reflexivity. -Qed. - -(* Why3 goal *) -Lemma lsl1_extraction_bool : forall (i:Z) (j:Z), (0%Z <= i)%Z -> - ((0%Z <= j)%Z -> ((Cint.bit_testb (Cint.lsl 1%Z i) j) = (Qed.eqb i j))). -Proof. - intros i j h1 h2. - unfold Cint.lsl. unfold Zbits.lsl. rewrite (Zle_imp_le_bool _ _ h1). - unfold_bit_testb h2. - unfold Zbits.lsl_def. - - rewrite Zbits.lsl_arithmetic_shift; unfold Zbits.lsl_arithmetic_def. - replace (1 * two_power_nat (Z.abs_nat i)) - with (two_power_nat (Z.abs_nat i)) by ring. - - unfold Zbits.zbit_test_def; rewrite Bits.Zbit_power. - rewrite Zabs2Nat.abs_nat_nonneg; auto. - rewrite Zabs2Nat.abs_nat_nonneg; auto. - - case_eq i j. - (** i = j *) - + intro EQ; rewrite EQ; rewrite <- beq_nat_refl. - symmetry. apply Qed.eqb1 ; auto. - (** i <> j *) - + intro NEQ. - assert (Qed.eqb i j = false) as EQB. - { apply Qed.eqb_false. assumption. } - rewrite EQB. - rewrite -> beq_nat_false_iff. - contradict NEQ. - rewrite Z2Nat.inj_iff in NEQ; auto. -Qed. - -(* Why3 goal *) -Lemma lsl1_extraction : forall (i:Z) (j:Z), (0%Z <= i)%Z -> ((0%Z <= j)%Z -> - ((Cint.bit_test (Cint.lsl 1%Z i) j) <-> (i = j))). -Proof. - intros i j h1 h2. - unfold Cint.bit_test; rewrite lsl1_extraction_bool; auto. apply Qed.eqb1. -Qed. - -(* Why3 goal *) -Lemma pos_extraction_sup : forall (x:Z) (i:Z) (j:Z), (0%Z <= x)%Z -> - ((0%Z <= i)%Z -> ((x < (Cint.lsl 1%Z i))%Z -> ((i <= j)%Z -> - ~ (Cint.bit_test x j)))). -Proof. - intros x i j h1 h2. - unfold Cint.lsl ; unfold Cint.bit_test. - rewrite Zbits.lsl_pos; auto. - unfold Zbits.lsl_def. - rewrite Zbits.lsl_arithmetic_shift. - unfold Zbits.lsl_arithmetic_def. - replace (1 * two_power_nat (Z.abs_nat i)) with (two_power_nat (Z.abs_nat i)) by ring. - intros. - rewrite Zbits.bit_testb_pos ; auto. - + assert (HB:(Bits.Zbit x (Z.abs_nat j) = false)). - {(apply (Zbits.Zbit_unsigned_trail (Z.abs_nat i) (Z.abs_nat j) x); auto). - apply Zabs_nat_le; omega. } - unfold Zbits.zbit_test_def. - rewrite HB; discriminate. - + omega. -Qed. - -(* Why3 goal *) -Lemma pos_extraction_sup_inv : forall (x:Z) (i:Z), (0%Z <= i)%Z -> - ((forall (j:Z), (i <= j)%Z -> ~ (Cint.bit_test x j)) -> ((0%Z <= x)%Z /\ - (x < (Cint.lsl 1%Z i))%Z)). -Proof. - intros x i h1 h2. - unfold Cint.lsl. - rewrite Zbits.lsl_pos; auto. - unfold Zbits.lsl_def. - rewrite Zbits.lsl_arithmetic_shift. - unfold Zbits.lsl_arithmetic_def. - replace (1 * two_power_nat (Z.abs_nat i)) with (two_power_nat (Z.abs_nat i)) by ring. - apply Zbits.Zbit_unsigned_trail_inv. - intros k h. - generalize (h2 (Z.of_nat k)); clear h2; intro h2. - unfold Cint.bit_test in h2; rewrite Zbits.bit_testb_pos in h2. - + assert (Zbits.zbit_test_def x (Z.of_nat k) <> true) as h3. - { apply h2. clear h2. rewrite <- (Zabs2Nat.id k) in h. - rewrite <- Zabs2Nat.inj_le in h; auto. - apply Zle_0_nat. } - clear h2. - unfold Zbits.zbit_test_def in h3. rewrite Zabs2Nat.id in h3. - destruct (Bits.Zbit x k). - * contradiction h3. auto. - * auto. - + apply Zle_0_nat. -Qed. - -(** * Link between Bit extraction and C type conversions *) -(** ** Unsigned conversions *) - -(* Why3 goal *) -Lemma to_uint_extraction_sup : forall (n:Z) (x:Z) (i:Z), ((0%Z <= n)%Z /\ - (n <= i)%Z) -> ((Cint.is_uint n x) -> ~ (Cint.bit_test x i)). -Proof. - intros n x i h1 h2. - assert (H:(Bits.Zbit x (Z.abs_nat i) = false)). - { unfold Cint.is_uint in h2. - apply (Zbits.Zbit_unsigned_trail (Z.abs_nat n) (Z.abs_nat i) x). - + apply Zabs_nat_le. omega. - + unfold Cint.two_power_abs in h2. - trivial. } - assert (I:(0 <= i)) by omega; - unfold Cint.bit_test; unfold_bit_testb I; unfold Zbits.zbit_test_def. - rewrite H; discriminate. -Qed. - -(* Why3 goal *) -Lemma to_uint_extraction_inf_bool : forall (n:Z) (x:Z) (i:Z), - ((0%Z <= i)%Z /\ (i < n)%Z) -> ((Cint.bit_testb (Cint.to_uint n x) - i) = (Cint.bit_testb x i)). -Proof. - intros n x i (h1,h2); unfold_bit_testb h1; unfold Zbits.zbit_test_def. - pose (k:= (Z.abs_nat i)); fold k. - unfold Cint.to_uint; unfold Cint.to_range. - simpl. - replace (x - 0) with x by (auto with zarith). - unfold Cint.two_power_abs. - rewrite Zbits.Zbit_uint_mod_two_power_nat. - rewrite (leb_correct_conv k (Z.abs_nat n)). - + trivial. - + apply Zabs_nat_lt; omega. -Qed. - -(* Why3 goal *) -Lemma to_uint_extraction_inf : forall (n:Z) (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < n)%Z) -> ((Cint.bit_test (Cint.to_uint n x) i) <-> (Cint.bit_test x - i)). -Proof. - intros n x i (h1,h2); - unfold Cint.bit_test; - rewrite to_uint_extraction_inf_bool by auto; - pose (xb:=Cint.bit_testb x i); fold xb; - destruct xb; simpl; split; intro G; auto; destruct G; auto. -Qed. - -(* Why3 goal *) -Lemma is_uint_ext : forall (n:Z) (x:Z) (y:Z), (0%Z <= n)%Z -> ((Cint.is_uint - n x) -> ((Cint.is_uint n y) -> ((forall (i:Z), ((0%Z <= i)%Z /\ - (i < n)%Z) -> ((Cint.bit_test x i) <-> (Cint.bit_test y i))) -> (x = y)))). -Proof. - intros n x y h1 h2 h3 h4. - assert (forall i: int, (0 <= i)%Z -> (Cint.bit_test x i <-> Cint.bit_test y i)). - { intros. - case_lt i n; intro. - + apply h4; omega. - + assert (~ Cint.bit_test x i). - { apply (to_uint_extraction_sup n). omega. auto. } - assert (~ Cint.bit_test y i). - { apply (to_uint_extraction_sup n). omega. auto. } - intuition. } - clear h1; clear h2; clear h3; clear h4. - unfold Cint.bit_test in H. - unfold Cint.bit_testb in H. - apply Zbits.bit_testb_ext; intros. - rewrite <- Zbits.bool2_eq_true. - apply H; auto. -Qed. - -Local Ltac uint_extraction_inf_bool to_uint := - intros; rewrite to_uint; - apply to_uint_extraction_inf_bool; - omega. - -Local Ltac uint_extraction_inf to_uint := - intros; rewrite to_uint; - apply to_uint_extraction_inf; - omega. - -(** *** Cast to uint8 C type *) -(* Why3 goal *) -Lemma to_uint8_extraction_sup : forall (x:Z) (i:Z), (8%Z <= i)%Z -> - ((Cint.is_uint8 x) -> ~ (Cint.bit_test x i)). -Proof. - intros; apply (to_uint_extraction_sup 8); (auto with zarith). -Qed. - -(* Why3 goal *) -Lemma to_uint8_extraction_inf_bool : forall (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < 8%Z)%Z) -> ((Cint.bit_testb (Cint.to_uint8 x) i) = (Cint.bit_testb x - i)). -Proof. - uint_extraction_inf_bool Cint.to_uint_8. -Qed. - -(* Why3 goal *) -Lemma to_uint8_extraction_inf : forall (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < 8%Z)%Z) -> ((Cint.bit_test (Cint.to_uint8 x) i) <-> (Cint.bit_test x - i)). -Proof. - uint_extraction_inf Cint.to_uint_8. -Qed. - -(* Why3 goal *) -Lemma is_uint8_ext : forall (x:Z) (y:Z), (Cint.is_uint8 x) -> ((Cint.is_uint8 - y) -> ((forall (i:Z), ((0%Z <= i)%Z /\ (i < 8%Z)%Z) -> ((Cint.bit_test x - i) <-> (Cint.bit_test y i))) -> (x = y))). -Proof. - intros x y h1 h2 h3. - apply (is_uint_ext 8); (auto with zarith). -Qed. - -(** *** Cast to uint16 C type *) -(* Why3 goal *) -Lemma to_uint16_extraction_sup : forall (x:Z) (i:Z), (16%Z <= i)%Z -> - ((Cint.is_uint16 x) -> ~ (Cint.bit_test x i)). -Proof. - intros; apply (to_uint_extraction_sup 16); (auto with zarith). -Qed. - -(* Why3 goal *) -Lemma to_uint16_extraction_inf_bool : forall (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < 16%Z)%Z) -> ((Cint.bit_testb (Cint.to_uint16 x) i) = (Cint.bit_testb x - i)). -Proof. - uint_extraction_inf_bool Cint.to_uint_16. -Qed. - -(* Why3 goal *) -Lemma to_uint16_extraction_inf : forall (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < 16%Z)%Z) -> ((Cint.bit_test (Cint.to_uint16 x) i) <-> (Cint.bit_test x - i)). -Proof. - uint_extraction_inf Cint.to_uint_16. -Qed. - -(* Why3 goal *) -Lemma is_uint16_ext : forall (x:Z) (y:Z), (Cint.is_uint16 x) -> - ((Cint.is_uint16 y) -> ((forall (i:Z), ((0%Z <= i)%Z /\ (i < 16%Z)%Z) -> - ((Cint.bit_test x i) <-> (Cint.bit_test y i))) -> (x = y))). -Proof. - intros x y h1 h2 h3. - apply (is_uint_ext 16); (auto with zarith). -Qed. - -(** *** Cast to uint32 C type *) -(* Why3 goal *) -Lemma to_uint32_extraction_sup : forall (x:Z) (i:Z), (32%Z <= i)%Z -> - ((Cint.is_uint32 x) -> ~ (Cint.bit_test x i)). -Proof. - intros; apply (to_uint_extraction_sup 32); (auto with zarith). -Qed. - -(* Why3 goal *) -Lemma to_uint32_extraction_inf_bool : forall (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < 32%Z)%Z) -> ((Cint.bit_testb (Cint.to_uint32 x) i) = (Cint.bit_testb x - i)). -Proof. - uint_extraction_inf_bool Cint.to_uint_32. -Qed. - -(* Why3 goal *) -Lemma to_uint32_extraction_inf : forall (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < 32%Z)%Z) -> ((Cint.bit_test (Cint.to_uint32 x) i) <-> (Cint.bit_test x - i)). -Proof. - uint_extraction_inf Cint.to_uint_32. -Qed. - -(* Why3 goal *) -Lemma is_uint32_ext : forall (x:Z) (y:Z), (Cint.is_uint32 x) -> - ((Cint.is_uint32 y) -> ((forall (i:Z), ((0%Z <= i)%Z /\ (i < 32%Z)%Z) -> - ((Cint.bit_test x i) <-> (Cint.bit_test y i))) -> (x = y))). -Proof. - intros x y h1 h2 h3. - apply (is_uint_ext 32); (auto with zarith). -Qed. - -(** *** Cast to uint64 C type *) -(* Why3 goal *) -Lemma to_uint64_extraction_sup : forall (x:Z) (i:Z), (64%Z <= i)%Z -> - ((Cint.is_uint64 x) -> ~ (Cint.bit_test x i)). -Proof. - intros; apply (to_uint_extraction_sup 64); (auto with zarith). -Qed. - -(* Why3 goal *) -Lemma to_uint64_extraction_inf_bool : forall (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < 64%Z)%Z) -> ((Cint.bit_testb (Cint.to_uint64 x) i) = (Cint.bit_testb x - i)). -Proof. - uint_extraction_inf_bool Cint.to_uint_64. -Qed. - -(* Why3 goal *) -Lemma to_uint64_extraction_inf : forall (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < 64%Z)%Z) -> ((Cint.bit_test (Cint.to_uint64 x) i) <-> (Cint.bit_test x - i)). -Proof. - uint_extraction_inf Cint.to_uint_64. -Qed. - -(* Why3 goal *) -Lemma is_uint64_ext : forall (x:Z) (y:Z), (Cint.is_uint64 x) -> - ((Cint.is_uint64 y) -> ((forall (i:Z), ((0%Z <= i)%Z /\ (i < 64%Z)%Z) -> - ((Cint.bit_test x i) <-> (Cint.bit_test y i))) -> (x = y))). -Proof. - intros x y h1 h2 h3. - apply (is_uint_ext 64); (auto with zarith). -Qed. - -(** ** Signed conversions *) -(* Why3 goal *) -Lemma to_sint_extraction_sup : forall (n:Z) (x:Z) (i:Z), ((0%Z <= n)%Z /\ - (n <= i)%Z) -> ((Cint.is_sint n x) -> ((Cint.bit_test x i) <-> - (x < 0%Z)%Z)). -Proof. - intros n x i h1. - unfold Cint.is_sint. - intro h2; - assert (H:(0 <= i)) by omega; - unfold Cint.bit_test; unfold_bit_testb H; unfold Zbits.zbit_test_def. - assert (Z.abs_nat n <= Z.abs_nat i)%nat. - { apply (Zabs_nat_le); omega. } - rewrite <- Zlt_bool_true_Zlt; - apply (Zbits.Zbit_trail (Z.abs_nat n) (Z.abs_nat i) x); auto. -Qed. - -(* Why3 goal *) -Lemma to_sint_extraction_inf_bool : forall (n:Z) (x:Z) (i:Z), - ((0%Z <= i)%Z /\ (i < n)%Z) -> ((Cint.bit_testb (Cint.to_sint n x) - i) = (Cint.bit_testb x i)). -Proof. - intros n x i (h1,h2); unfold_bit_testb h1; unfold Zbits.zbit_test_def. - pose (k:= (Z.abs_nat i)); fold k. - unfold Cint.to_sint; unfold Cint.to_range. - rewrite Z.sub_opp_r; rewrite Z.sub_opp_r. - rewrite Z.add_opp_l. - replace (Cint.two_power_abs n + Cint.two_power_abs n) with (2 * Cint.two_power_abs n) by (auto with zarith). - unfold Cint.two_power_abs. - replace n with ((n-i)+i) by (auto with zarith). - rewrite Zabs2Nat.inj_add by omega. - apply Zbits.Zbit_sint_mod_two_power_nat. -Qed. - -(* Why3 goal *) -Lemma to_sint_extraction_inf : forall (n:Z) (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < n)%Z) -> ((Cint.bit_test (Cint.to_sint n x) i) <-> (Cint.bit_test x - i)). -Proof. - intros n x i (h1,h2). - unfold Cint.bit_test; - rewrite to_sint_extraction_inf_bool by auto. - pose (xb:=Cint.bit_testb x i); fold xb; - destruct xb; simpl; split; intro G; auto; destruct G; auto. -Qed. - -(* Why3 goal *) -Lemma is_sint_ext : forall (n:Z) (x:Z) (y:Z), (0%Z <= n)%Z -> ((Cint.is_sint - n x) -> ((Cint.is_sint n y) -> ((forall (i:Z), ((0%Z <= i)%Z /\ - (i <= n)%Z) -> ((Cint.bit_test x i) <-> (Cint.bit_test y i))) -> - (x = y)))). -Proof. - intros n x y h1 h2 h3 h4. - assert (forall i: int, (0 <= i)%Z -> (Cint.bit_test x i <-> Cint.bit_test y i)). - { intros. - case_leq i n; intro. - + apply h4; omega. - + assert (0<=n<=n) by omega. - specialize ((h4 n) H1). - generalize ((to_sint_extraction_sup n x n) H1 h2). - generalize ((to_sint_extraction_sup n y n) H1 h3). - clear H1; intros. - rewrite h4 in H2. rewrite H2 in H1. clear H2. - assert ((Cint.bit_test x i) <-> x < 0). - { apply (to_sint_extraction_sup n); [omega | auto]. } - assert ((Cint.bit_test y i) <-> y < 0). - { apply (to_sint_extraction_sup n); [omega | auto]. } - rewrite H2. - rewrite H3. - auto. } - clear h1; clear h2; clear h3; clear h4. - unfold Cint.bit_test in H. - unfold Cint.bit_testb in H. - apply Zbits.bit_testb_ext; intros. - rewrite <- Zbits.bool2_eq_true. - apply H; auto. -Qed. - -(** Tactical *) -Local Ltac sint_extraction_sup is_sint vn vz := - intros x i h1; - unfold is_sint; - intro h2; - assert (H:(0 <= i)) by omega; - unfold Cint.bit_test; unfold_bit_testb H; unfold Zbits.zbit_test_def; - assert (Z.abs_nat vz <= Z.abs_nat i)%nat - by (assert (vn = Z.abs_nat vz)%nat by (auto with arith); - apply Zabs_nat_le; omega); - rewrite <- Zlt_bool_true_Zlt; - apply (Zbits.Zbit_trail vn (Z.abs_nat i) x); auto. - -Local Ltac unfold_hyp h := - match goal with - | h:(?X1) |- _ => unfold X1 in h - | h:(?X1 _ ) |- _ => unfold X1 in h - | h:(?X1 _ _) |- _ => unfold X1 in h - | h:(?X1 _ _ _) |- _ => unfold X1 in h - | h:(?X1 _ _ _ _) |- _ => unfold X1 in h - | _ => idtac - end. - -Local Ltac sint_extraction_inf_bool to_sint := - intros; rewrite to_sint; - apply to_sint_extraction_inf_bool; - omega. - -Local Ltac sint_extraction_inf to_sint := - intros; rewrite to_sint; - apply to_sint_extraction_inf; - omega. - -(** *** Cast to sint8 C type *) -(* Why3 goal *) -Lemma to_sint8_extraction_sup : forall (x:Z) (i:Z), (7%Z <= i)%Z -> - ((Cint.is_sint8 x) -> ((Cint.bit_test x i) <-> (x < 0%Z)%Z)). -Proof. - intros; apply (to_sint_extraction_sup 7); (auto with zarith). -Qed. - -(* Why3 goal *) -Lemma to_sint8_extraction_inf_bool : forall (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < 7%Z)%Z) -> ((Cint.bit_testb (Cint.to_sint8 x) i) = (Cint.bit_testb x - i)). -Proof. - sint_extraction_inf_bool Cint.to_sint_8. -Qed. - -(* Why3 goal *) -Lemma to_sint8_extraction_inf : forall (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < 7%Z)%Z) -> ((Cint.bit_test (Cint.to_sint8 x) i) <-> (Cint.bit_test x - i)). -Proof. - sint_extraction_inf Cint.to_sint_8. -Qed. - -(* Why3 goal *) -Lemma is_sint8_ext : forall (x:Z) (y:Z), (Cint.is_sint8 x) -> ((Cint.is_sint8 - y) -> ((forall (i:Z), ((0%Z <= i)%Z /\ (i <= 7%Z)%Z) -> ((Cint.bit_test x - i) <-> (Cint.bit_test y i))) -> (x = y))). -Proof. - intros. apply (is_sint_ext 7) ; (auto with zarith). -Qed. - -(** *** Cast to sint16 C type *) -(* Why3 goal *) -Lemma to_sint16_extraction_sup : forall (x:Z) (i:Z), (15%Z <= i)%Z -> - ((Cint.is_sint16 x) -> ((Cint.bit_test x i) <-> (x < 0%Z)%Z)). -Proof. - intros; apply (to_sint_extraction_sup 15); (auto with zarith). -Qed. - -(* Why3 goal *) -Lemma to_sint16_extraction_inf_bool : forall (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < 15%Z)%Z) -> ((Cint.bit_testb (Cint.to_sint16 x) i) = (Cint.bit_testb x - i)). -Proof. - sint_extraction_inf_bool Cint.to_sint_16. -Qed. - -(* Why3 goal *) -Lemma to_sint16_extraction_inf : forall (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < 15%Z)%Z) -> ((Cint.bit_test (Cint.to_sint16 x) i) <-> (Cint.bit_test x - i)). -Proof. - sint_extraction_inf Cint.to_sint_16. -Qed. - -(* Why3 goal *) -Lemma is_sint16_ext : forall (x:Z) (y:Z), (Cint.is_sint16 x) -> - ((Cint.is_sint16 y) -> ((forall (i:Z), ((0%Z <= i)%Z /\ (i <= 15%Z)%Z) -> - ((Cint.bit_test x i) <-> (Cint.bit_test y i))) -> (x = y))). -Proof. - intros. apply (is_sint_ext 15) ; (auto with zarith). -Qed. - -(** *** Cast to uint32 C type *) -(* Why3 goal *) -Lemma to_sint32_extraction_sup : forall (x:Z) (i:Z), (31%Z <= i)%Z -> - ((Cint.is_sint32 x) -> ((Cint.bit_test x i) <-> (x < 0%Z)%Z)). -Proof. - intros; apply (to_sint_extraction_sup 31); (auto with zarith). -Qed. - -(* Why3 goal *) -Lemma to_sint32_extraction_inf_bool : forall (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < 31%Z)%Z) -> ((Cint.bit_testb (Cint.to_sint32 x) i) = (Cint.bit_testb x - i)). -Proof. - sint_extraction_inf_bool Cint.to_sint_32. -Qed. - -(* Why3 goal *) -Lemma to_sint32_extraction_inf : forall (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < 31%Z)%Z) -> ((Cint.bit_test (Cint.to_sint32 x) i) <-> (Cint.bit_test x - i)). -Proof. - sint_extraction_inf Cint.to_sint_32. -Qed. - -(* Why3 goal *) -Lemma is_sint32_ext : forall (x:Z) (y:Z), (Cint.is_sint32 x) -> - ((Cint.is_sint32 y) -> ((forall (i:Z), ((0%Z <= i)%Z /\ (i <= 31%Z)%Z) -> - ((Cint.bit_test x i) <-> (Cint.bit_test y i))) -> (x = y))). -Proof. - intros. apply (is_sint_ext 31) ; (auto with zarith). -Qed. - -(** *** Cast to uint64 C type *) -(* Why3 goal *) -Lemma to_sint64_extraction_sup : forall (x:Z) (i:Z), (63%Z <= i)%Z -> - ((Cint.is_sint64 x) -> ((Cint.bit_test x i) <-> (x < 0%Z)%Z)). -Proof. - intros; apply (to_sint_extraction_sup 63); (auto with zarith). -Qed. - -(* Why3 goal *) -Lemma to_sint64_extraction_inf_bool : forall (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < 63%Z)%Z) -> ((Cint.bit_testb (Cint.to_sint64 x) i) = (Cint.bit_testb x - i)). -Proof. - sint_extraction_inf_bool Cint.to_sint_64. -Qed. - -(* Why3 goal *) -Lemma to_sint64_extraction_inf : forall (x:Z) (i:Z), ((0%Z <= i)%Z /\ - (i < 63%Z)%Z) -> ((Cint.bit_test (Cint.to_sint64 x) i) <-> (Cint.bit_test x - i)). -Proof. - sint_extraction_inf Cint.to_sint_64. -Qed. - -(* Why3 goal *) -Lemma is_sint64_ext : forall (x:Z) (y:Z), (Cint.is_sint64 x) -> - ((Cint.is_sint64 y) -> ((forall (i:Z), ((0%Z <= i)%Z /\ (i <= 63%Z)%Z) -> - ((Cint.bit_test x i) <-> (Cint.bit_test y i))) -> (x = y))). -Proof. - intros; apply (is_sint_ext 63); (auto with zarith). -Qed. - -(** * Some C-Integer Bits Conversions are distributive *) -(** Tacticals *) -Local Ltac is_uint_bitwise f n := - intros x y Rx Ry; unfold_hyp Rx; unfold_hyp Ry; apply Cint.id_to_range; - apply (Zbits.Z_bitwise_in_uint_range f n x y Rx Ry); by compute. - -Local Ltac lsr_in_uint_range n := - intros x y Ry Rx; unfold_hyp Rx; apply Cint.id_to_range; - split; - [ (apply (Zbits.lsr_lower_bound 0 _ _ Ry); omega) - | (apply (Zbits.lsr_upper_bound n _ _ Ry); omega)]. - -(** ** Unsigned conversions *) - -(* Why3 goal *) -Lemma to_uint_lor : forall (n:Z) (x:Z) (y:Z), ((Cint.to_uint n (Cint.lor x - y)) = (Cint.lor (Cint.to_uint n x) (Cint.to_uint n y))). -Proof. - intros n x y. - apply Zbits.zbit_test_ext. intro. - rewrite Zbits.lor_extraction. - unfold Cint.to_uint; unfold Cint.to_range; Cint.simplify_to_range_unfolding. - unfold Cint.two_power_abs. - repeat (rewrite Zbits.uint_mod_two_power_extraction). - rewrite Zbits.lor_extraction. - pose (c:=(leb (Z.abs_nat n) (Z.abs_nat n0))); fold c. - destruct c; auto. -Qed. - -(** *** Cast to uint8 C type *) -(* Why3 goal *) -Lemma to_uint8_lor : forall (x:Z) (y:Z), ((Cint.to_uint8 (Cint.lor x - y)) = (Cint.lor (Cint.to_uint8 x) (Cint.to_uint 8%Z y))). -Proof. - intros x y; rewrite Cint.to_uint_8; apply to_uint_lor. -Qed. - -(** *** Cast to uint16 C type *) -(* Why3 goal *) -Lemma to_uint16_lor : forall (x:Z) (y:Z), ((Cint.to_uint16 (Cint.lor x - y)) = (Cint.lor (Cint.to_uint16 x) (Cint.to_uint16 y))). -Proof. - intros x y; rewrite Cint.to_uint_16; apply to_uint_lor. -Qed. - -(** *** Cast to uint32 C type *) -(* Why3 goal *) -Lemma to_uint32_lor : forall (x:Z) (y:Z), ((Cint.to_uint32 (Cint.lor x - y)) = (Cint.lor (Cint.to_uint32 x) (Cint.to_uint32 y))). -Proof. - intros x y; rewrite Cint.to_uint_32; apply to_uint_lor. -Qed. - -(** *** Cast to uint64 C type *) -(* Why3 goal *) -Lemma to_uint64_lor : forall (x:Z) (y:Z), ((Cint.to_uint64 (Cint.lor x - y)) = (Cint.lor (Cint.to_uint64 x) (Cint.to_uint64 y))). -Proof. - intros x y; rewrite Cint.to_uint_64; apply to_uint_lor. -Qed. - -(* Why3 goal *) -Lemma is_uint_lxor : forall (n:Z) (x:Z) (y:Z), (Cint.is_uint n x) -> - ((Cint.is_uint n y) -> ((Cint.to_uint n (Cint.lxor x y)) = (Cint.lxor x - y))). -Proof. - intro n; is_uint_bitwise xorb (Zabs_nat n). -Qed. - -(** * Some C-Integer Bits Conversions are identity *) -(** ** Unsigned conversions *) -(* Why3 goal *) -Lemma is_uint_lor : forall (n:Z) (x:Z) (y:Z), (Cint.is_uint n x) -> - ((Cint.is_uint n y) -> ((Cint.to_uint n (Cint.lor x y)) = (Cint.lor x y))). -Proof. - intro n; is_uint_bitwise orb (Zabs_nat n). -Qed. - -(* Why3 goal *) -Lemma is_uint_land : forall (n:Z) (x:Z) (y:Z), (Cint.is_uint n x) -> - ((Cint.is_uint n y) -> ((Cint.to_uint n (Cint.land x y)) = (Cint.land x - y))). -Proof. - intro n; is_uint_bitwise andb (Zabs_nat n). -Qed. - -(* Why3 goal *) -Lemma is_uint_lsr : forall (n:Z) (x:Z) (y:Z), (0%Z <= y)%Z -> ((Cint.is_uint - n x) -> ((Cint.to_uint n (Cint.lsr x y)) = (Cint.lsr x y))). -Proof. - intro n; lsr_in_uint_range (Cint.two_power_abs n). -Qed. - -(* Why3 goal *) -Lemma is_uint_lsl1_inf : forall (n:Z) (y:Z), ((0%Z <= y)%Z /\ (y < n)%Z) -> - ((Cint.to_uint n (Cint.lsl 1%Z y)) = (Cint.lsl 1%Z y)). -Proof. - intros n y (h1,h2); - (assert (0 <= y) as Ry by omega); - unfold Cint.lsl; unfold Zbits.lsl; rewrite (Zle_imp_le_bool _ _ Ry); - unfold Zbits.lsl_def; - rewrite Zbits.lsl_arithmetic_shift; unfold Zbits.lsl_arithmetic_def. - (replace (1 * two_power_nat (Z.abs_nat y)) - with (two_power_nat (Z.abs_nat y)) by (auto with zarith)); - clear Ry. - - assert (Z.abs_nat y < (Z.abs_nat n))%nat as A by - (apply Zabs_nat_lt; omega); - clear h1; clear h2; - pose (M := Z.abs_nat y); fold M; fold M in A. - - unfold Cint.to_uint; unfold Cint.to_range; Cint.simplify_to_range_unfolding. - rewrite Zmod_small; trivial. - unfold Cint.two_power_abs; pose (N:=(Z.abs_nat n)); fold N; fold N in A. - generalize (Bits.two_power_nat_is_positive M); intro Pos. - generalize (Bits.two_power_nat_increase_strict M N A) ; intro. - omega. -Qed. - -(* Why3 goal *) -Lemma is_uint_lsl1_sup : forall (n:Z) (y:Z), ((0%Z <= n)%Z /\ (n <= y)%Z) -> - ((Cint.to_uint n (Cint.lsl 1%Z y)) = 0%Z). -Proof. - intros n y h1. - (assert (0 <= y) as Ry by omega); - unfold Cint.lsl; unfold Zbits.lsl; rewrite (Zle_imp_le_bool _ _ Ry); - unfold Zbits.lsl_def; - rewrite Zbits.lsl_arithmetic_shift; unfold Zbits.lsl_arithmetic_def. - (replace (1 * two_power_nat (Z.abs_nat y)) - with (two_power_nat (Z.abs_nat y)) by (auto with zarith)); - clear Ry. - - assert (Z.abs_nat n <= (Z.abs_nat y))%nat as A by - (apply Zabs_nat_le; omega); - clear h1; - pose (M := Z.abs_nat y); fold M; fold M in A. - unfold Cint.to_uint; unfold Cint.to_range; Cint.simplify_to_range_unfolding. - - rewrite (le_plus_minus (Z.abs_nat n) M A). - replace (Z.abs_nat n + (M - Z.abs_nat n))%nat with ((M - Z.abs_nat n) + Z.abs_nat n)%nat by (auto with zarith). - rewrite Bits.two_power_nat_plus. - - apply Z_mod_mult. -Qed. - -(** *** Cast to uint8 C type *) -(* Why3 goal *) -Lemma is_uint8_lxor : forall (x:Z) (y:Z), (Cint.is_uint8 x) -> - ((Cint.is_uint8 y) -> ((Cint.to_uint8 (Cint.lxor x y)) = (Cint.lxor x y))). -Proof. - intros; rewrite Cint.to_uint_8; apply is_uint_lxor; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint8_lor : forall (x:Z) (y:Z), (Cint.is_uint8 x) -> ((Cint.is_uint8 - y) -> ((Cint.to_uint8 (Cint.lor x y)) = (Cint.lor x y))). -Proof. - intros; rewrite Cint.to_uint_8; apply is_uint_lor; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint8_land : forall (x:Z) (y:Z), (Cint.is_uint8 x) -> - ((Cint.is_uint8 y) -> ((Cint.to_uint8 (Cint.land x y)) = (Cint.land x y))). -Proof. - intros; rewrite Cint.to_uint_8; apply is_uint_land; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint8_lsr : forall (x:Z) (y:Z), (0%Z <= y)%Z -> ((Cint.is_uint8 - x) -> ((Cint.to_uint8 (Cint.lsr x y)) = (Cint.lsr x y))). -Proof. - intros; rewrite Cint.to_uint_8; apply is_uint_lsr; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint8_lsl1_inf : forall (y:Z), ((0%Z <= y)%Z /\ (y < 8%Z)%Z) -> - ((Cint.to_uint8 (Cint.lsl 1%Z y)) = (Cint.lsl 1%Z y)). -Proof. - intros; rewrite Cint.to_uint_8; apply is_uint_lsl1_inf; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint8_lsl1_sup : forall (y:Z), (8%Z <= y)%Z -> - ((Cint.to_uint8 (Cint.lsl 1%Z y)) = 0%Z). -Proof. - intros; rewrite Cint.to_uint_8; apply is_uint_lsl1_sup; omega. -Qed. - -(** *** Cast to uint16 C type *) -(* Why3 goal *) -Lemma is_uint16_lxor : forall (x:Z) (y:Z), (Cint.is_uint16 x) -> - ((Cint.is_uint16 y) -> ((Cint.to_uint16 (Cint.lxor x y)) = (Cint.lxor x - y))). -Proof. - intros; rewrite Cint.to_uint_16; apply is_uint_lxor; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint16_lor : forall (x:Z) (y:Z), (Cint.is_uint16 x) -> - ((Cint.is_uint16 y) -> ((Cint.to_uint16 (Cint.lor x y)) = (Cint.lor x y))). -Proof. - intros; rewrite Cint.to_uint_16; apply is_uint_lor; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint16_land : forall (x:Z) (y:Z), (Cint.is_uint16 x) -> - ((Cint.is_uint16 y) -> ((Cint.to_uint16 (Cint.land x y)) = (Cint.land x - y))). -Proof. - intros; rewrite Cint.to_uint_16; apply is_uint_land; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint16_lsr : forall (x:Z) (y:Z), (0%Z <= y)%Z -> ((Cint.is_uint16 - x) -> ((Cint.to_uint16 (Cint.lsr x y)) = (Cint.lsr x y))). -Proof. - intros; rewrite Cint.to_uint_16; apply is_uint_lsr; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint16_lsl1_inf : forall (y:Z), ((0%Z <= y)%Z /\ (y < 16%Z)%Z) -> - ((Cint.to_uint16 (Cint.lsl 1%Z y)) = (Cint.lsl 1%Z y)). -Proof. - intros; rewrite Cint.to_uint_16. apply is_uint_lsl1_inf; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint16_lsl1_sup : forall (y:Z), (16%Z <= y)%Z -> - ((Cint.to_uint16 (Cint.lsl 1%Z y)) = 0%Z). -Proof. - intros; rewrite Cint.to_uint_16; apply is_uint_lsl1_sup; omega. -Qed. - -(** *** Cast to uint32 C type *) -(* Why3 goal *) -Lemma is_uint32_lxor : forall (x:Z) (y:Z), (Cint.is_uint32 x) -> - ((Cint.is_uint32 y) -> ((Cint.to_uint32 (Cint.lxor x y)) = (Cint.lxor x - y))). -Proof. - intros; rewrite Cint.to_uint_32; apply is_uint_lxor; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint32_lor : forall (x:Z) (y:Z), (Cint.is_uint32 x) -> - ((Cint.is_uint32 y) -> ((Cint.to_uint32 (Cint.lor x y)) = (Cint.lor x y))). -Proof. - intros; rewrite Cint.to_uint_32; apply is_uint_lor; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint32_land : forall (x:Z) (y:Z), (Cint.is_uint32 x) -> - ((Cint.is_uint32 y) -> ((Cint.to_uint32 (Cint.land x y)) = (Cint.land x - y))). -Proof. - intros; rewrite Cint.to_uint_32; apply is_uint_land; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint32_lsr : forall (x:Z) (y:Z), (0%Z <= y)%Z -> ((Cint.is_uint32 - x) -> ((Cint.to_uint32 (Cint.lsr x y)) = (Cint.lsr x y))). -Proof. - intros; rewrite Cint.to_uint_32; apply is_uint_lsr; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint32_lsl1_inf : forall (y:Z), ((0%Z <= y)%Z /\ (y < 32%Z)%Z) -> - ((Cint.to_uint32 (Cint.lsl 1%Z y)) = (Cint.lsl 1%Z y)). -Proof. - intros; rewrite Cint.to_uint_32; apply is_uint_lsl1_inf; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint32_lsl1_sup : forall (y:Z), (32%Z <= y)%Z -> - ((Cint.to_uint32 (Cint.lsl 1%Z y)) = 0%Z). -Proof. - intros; rewrite Cint.to_uint_32; apply is_uint_lsl1_sup; omega. -Qed. - -(** *** Cast to uint64 C type *) -(* Why3 goal *) -Lemma is_uint64_lxor : forall (x:Z) (y:Z), (Cint.is_uint64 x) -> - ((Cint.is_uint64 y) -> ((Cint.to_uint64 (Cint.lxor x y)) = (Cint.lxor x - y))). -Proof. - intros; rewrite Cint.to_uint_64; apply is_uint_lxor; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint64_lor : forall (x:Z) (y:Z), (Cint.is_uint64 x) -> - ((Cint.is_uint64 y) -> ((Cint.to_uint64 (Cint.lor x y)) = (Cint.lor x y))). -Proof. - intros; rewrite Cint.to_uint_64; apply is_uint_lor; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint64_land : forall (x:Z) (y:Z), (Cint.is_uint64 x) -> - ((Cint.is_uint64 y) -> ((Cint.to_uint64 (Cint.land x y)) = (Cint.land x - y))). -Proof. - intros; rewrite Cint.to_uint_64; apply is_uint_land; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint64_lsr : forall (x:Z) (y:Z), (0%Z <= y)%Z -> ((Cint.is_uint64 - x) -> ((Cint.to_uint64 (Cint.lsr x y)) = (Cint.lsr x y))). -Proof. - intros; rewrite Cint.to_uint_64; apply is_uint_lsr; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint64_lsl1_inf : forall (y:Z), ((0%Z <= y)%Z /\ (y < 64%Z)%Z) -> - ((Cint.to_uint64 (Cint.lsl 1%Z y)) = (Cint.lsl 1%Z y)). -Proof. - intros; rewrite Cint.to_uint_64; apply is_uint_lsl1_inf; trivial. -Qed. - -(* Why3 goal *) -Lemma is_uint64_lsl1_sup : forall (y:Z), (64%Z <= y)%Z -> - ((Cint.to_uint64 (Cint.lsl 1%Z y)) = 0%Z). -Proof. - intros; rewrite Cint.to_uint_64; apply is_uint_lsl1_sup; omega. -Qed. - -(** ** Signed conversions *) -(** Tacticals *) -Local Ltac is_sint_lnot b := - intros x Rx; unfold_hyp Rx; apply Cint.id_to_range; - apply (Zbits.lnot_in_range (-b) b x Rx); omega. - -Local Ltac is_sint_bitwise f n := - intros x y Rx Ry; unfold_hyp Rx; unfold_hyp Ry; apply Cint.id_to_range; - apply (Zbits.Z_bitwise_in_sint_range f n x y Rx Ry); by compute. - -Local Ltac lsr_in_sint_range n := - intros x y Ry Rx; unfold_hyp Rx; apply Cint.id_to_range; - split; - [ (apply (Zbits.lsr_lower_bound (-n) _ _ Ry); omega) - | (apply (Zbits.lsr_upper_bound n _ _ Ry); omega)]. - -(* Why3 goal *) -Lemma is_sint_lnot : forall (n:Z) (x:Z), (Cint.is_sint n x) -> - ((Cint.to_sint n (Cint.lnot x)) = (Cint.lnot x)). -Proof. - intros n; is_sint_lnot (Cint.two_power_abs n). -Qed. - -(* Why3 goal *) -Lemma is_sint_lxor : forall (n:Z) (x:Z) (y:Z), (Cint.is_sint n x) -> - ((Cint.is_sint n y) -> ((Cint.to_sint n (Cint.lxor x y)) = (Cint.lxor x - y))). -Proof. - intro n; is_sint_bitwise xorb (Zabs_nat n). -Qed. - -(* Why3 goal *) -Lemma is_sint_lor : forall (n:Z) (x:Z) (y:Z), (Cint.is_sint n x) -> - ((Cint.is_sint n y) -> ((Cint.to_sint n (Cint.lor x y)) = (Cint.lor x y))). -Proof. - intro n; is_sint_bitwise orb (Zabs_nat n). -Qed. - -(* Why3 goal *) -Lemma is_sint_land : forall (n:Z) (x:Z) (y:Z), (Cint.is_sint n x) -> - ((Cint.is_sint n y) -> ((Cint.to_sint n (Cint.land x y)) = (Cint.land x - y))). -Proof. - intro n; is_sint_bitwise andb (Zabs_nat n). -Qed. - -(* Why3 goal *) -Lemma is_sint_lsr : forall (n:Z) (x:Z) (y:Z), (0%Z <= y)%Z -> ((Cint.is_sint - n x) -> ((Cint.to_sint n (Cint.lsr x y)) = (Cint.lsr x y))). -Proof. - intro n; lsr_in_sint_range (Cint.two_power_abs n). -Qed. - -(* Why3 goal *) -Lemma is_sint_lsl1_inf : forall (n:Z) (y:Z), ((0%Z <= y)%Z /\ (y < n)%Z) -> - ((Cint.to_sint n (Cint.lsl 1%Z y)) = (Cint.lsl 1%Z y)). -Proof. - intros n y (h1,h2). - apply Cint.id_sint. - unfold Cint.lsl; unfold Zbits.lsl; rewrite (Zle_imp_le_bool _ _ h1); - unfold Zbits.lsl_def; - rewrite Zbits.lsl_arithmetic_shift; unfold Zbits.lsl_arithmetic_def; - (replace (1 * two_power_nat (Z.abs_nat y)) - with (two_power_nat (Z.abs_nat y)) by (auto with zarith)). - unfold Cint.is_sint. - generalize (Cint.two_power_abs_is_positive y); - generalize (Cint.two_power_abs_is_positive n); - unfold Cint.two_power_abs; intros. - split; [omega|]. - apply Bits.two_power_nat_increase_strict. - apply Zabs_nat_lt; omega. -Qed. - -(* Why3 goal *) -Lemma is_sint_lsl1_sup : forall (n:Z) (y:Z), ((0%Z <= n)%Z /\ (n < y)%Z) -> - ((Cint.to_sint n (Cint.lsl 1%Z y)) = 0%Z). -Proof. - intros n y h1. - assert (0 <= y) as Ry by omega; - unfold Cint.lsl; unfold Zbits.lsl; rewrite (Zle_imp_le_bool _ _ Ry); - unfold Zbits.lsl_def; - rewrite Zbits.lsl_arithmetic_shift; unfold Zbits.lsl_arithmetic_def; - (replace (1 * two_power_nat (Z.abs_nat y)) - with (two_power_nat (Z.abs_nat y)) by (auto with zarith)). - pose (M := two_power_nat (Z.abs_nat y)); fold M. - unfold Cint.to_sint; unfold Cint.to_range; Cint.simplify_to_range_unfolding. - pose (N:=(Cint.two_power_abs n)); fold N. - - rewrite <- (Z.mod_unique_pos (M + N) (N + N) - (Cint.two_power_abs (y - (n + 1))) - N). - + auto with zarith. - + generalize (Cint.two_power_abs_is_positive n); fold N; omega. - + rewrite Z.add_cancel_r. - replace (N + N) with (2 * N) by (auto with zarith); unfold N. - rewrite <- Cint.two_power_abs_plus_one by omega. - rewrite <- Cint.two_power_abs_plus_pos by omega. - replace (n + 1 + (y - (n + 1))) with y by ring. - auto. -Qed. - -(** *** Cast to sint8 C type *) -(* Why3 goal *) -Lemma is_sint8_lnot : forall (x:Z), (Cint.is_sint8 x) -> - ((Cint.to_sint8 (Cint.lnot x)) = (Cint.lnot x)). -Proof. - is_sint_lnot 128. -Qed. - -(* Why3 goal *) -Lemma is_sint8_lxor : forall (x:Z) (y:Z), (Cint.is_sint8 x) -> - ((Cint.is_sint8 y) -> ((Cint.to_sint8 (Cint.lxor x y)) = (Cint.lxor x y))). -Proof. - is_sint_bitwise xorb 7%nat. -Qed. - -(* Why3 goal *) -Lemma is_sint8_lor : forall (x:Z) (y:Z), (Cint.is_sint8 x) -> ((Cint.is_sint8 - y) -> ((Cint.to_sint8 (Cint.lor x y)) = (Cint.lor x y))). -Proof. - is_sint_bitwise orb 7%nat. -Qed. - -(* Why3 goal *) -Lemma is_sint8_land : forall (x:Z) (y:Z), (Cint.is_sint8 x) -> - ((Cint.is_sint8 y) -> ((Cint.to_sint8 (Cint.land x y)) = (Cint.land x y))). -Proof. - is_sint_bitwise andb 7%nat. -Qed. - -(* Why3 goal *) -Lemma is_sint8_lsr : forall (x:Z) (y:Z), (0%Z <= y)%Z -> ((Cint.is_sint8 - x) -> ((Cint.to_sint8 (Cint.lsr x y)) = (Cint.lsr x y))). -Proof. - lsr_in_sint_range 128. -Qed. - -(* Why3 goal *) -Lemma is_sint8_lsl1 : ((Cint.lsl 1%Z 7%Z) = 128%Z). -Proof. - compute. auto. -Qed. - -(* Why3 goal *) -Lemma is_sint8_lsl1_inf : forall (y:Z), ((0%Z <= y)%Z /\ (y < 7%Z)%Z) -> - ((Cint.to_sint8 (Cint.lsl 1%Z y)) = (Cint.lsl 1%Z y)). -Proof. - intros; rewrite Cint.to_sint_8; apply is_sint_lsl1_inf; omega. -Qed. - -(* Why3 goal *) -Lemma is_sint8_lsl1_sup : forall (y:Z), (8%Z <= y)%Z -> - ((Cint.to_sint8 (Cint.lsl 1%Z y)) = 0%Z). -Proof. - intros; rewrite Cint.to_sint_8; apply is_sint_lsl1_sup; omega. -Qed. - -(** *** Cast to sint16 C type *) -(* Why3 goal *) -Lemma is_sint16_lnot : forall (x:Z), (Cint.is_sint16 x) -> - ((Cint.to_sint16 (Cint.lnot x)) = (Cint.lnot x)). -Proof. - is_sint_lnot 32768. -Qed. - -(* Why3 goal *) -Lemma is_sint16_lxor : forall (x:Z) (y:Z), (Cint.is_sint16 x) -> - ((Cint.is_sint16 y) -> ((Cint.to_sint16 (Cint.lxor x y)) = (Cint.lxor x - y))). -Proof. - is_sint_bitwise xorb 15%nat. -Qed. - -(* Why3 goal *) -Lemma is_sint16_lor : forall (x:Z) (y:Z), (Cint.is_sint16 x) -> - ((Cint.is_sint16 y) -> ((Cint.to_sint16 (Cint.lor x y)) = (Cint.lor x y))). -Proof. - is_sint_bitwise orb 15%nat. -Qed. - -(* Why3 goal *) -Lemma is_sint16_land : forall (x:Z) (y:Z), (Cint.is_sint16 x) -> - ((Cint.is_sint16 y) -> ((Cint.to_sint16 (Cint.land x y)) = (Cint.land x - y))). -Proof. - is_sint_bitwise andb 15%nat. -Qed. - -(* Why3 goal *) -Lemma is_sint16_lsr : forall (x:Z) (y:Z), (0%Z <= y)%Z -> ((Cint.is_sint16 - x) -> ((Cint.to_sint16 (Cint.lsr x y)) = (Cint.lsr x y))). -Proof. - lsr_in_sint_range 32768. -Qed. - -(* Why3 goal *) -Lemma is_sint16_lsl1 : ((Cint.lsl 1%Z 15%Z) = 32768%Z). -Proof. - compute. auto. -Qed. - -(* Why3 goal *) -Lemma is_sint16_lsl1_inf : forall (y:Z), ((0%Z <= y)%Z /\ (y < 15%Z)%Z) -> - ((Cint.to_sint16 (Cint.lsl 1%Z y)) = (Cint.lsl 1%Z y)). -Proof. - intros; rewrite Cint.to_sint_16; apply is_sint_lsl1_inf; omega. -Qed. - -(* Why3 goal *) -Lemma is_sint16_lsl1_sup : forall (y:Z), (16%Z <= y)%Z -> - ((Cint.to_sint16 (Cint.lsl 1%Z y)) = 0%Z). -Proof. - intros; rewrite Cint.to_sint_16; apply is_sint_lsl1_sup; omega. -Qed. - -(** *** Cast to sint32 C type *) -(* Why3 goal *) -Lemma is_sint32_lnot : forall (x:Z), (Cint.is_sint32 x) -> - ((Cint.to_sint32 (Cint.lnot x)) = (Cint.lnot x)). -Proof. - is_sint_lnot 2147483648. -Qed. - -(* Why3 goal *) -Lemma is_sint32_lxor : forall (x:Z) (y:Z), (Cint.is_sint32 x) -> - ((Cint.is_sint32 y) -> ((Cint.to_sint32 (Cint.lxor x y)) = (Cint.lxor x - y))). -Proof. - is_sint_bitwise xorb 31%nat. -Qed. - -(* Why3 goal *) -Lemma is_sint32_lor : forall (x:Z) (y:Z), (Cint.is_sint32 x) -> - ((Cint.is_sint32 y) -> ((Cint.to_sint32 (Cint.lor x y)) = (Cint.lor x y))). -Proof. - is_sint_bitwise orb 31%nat. -Qed. - -(* Why3 goal *) -Lemma is_sint32_land : forall (x:Z) (y:Z), (Cint.is_sint32 x) -> - ((Cint.is_sint32 y) -> ((Cint.to_sint32 (Cint.land x y)) = (Cint.land x - y))). -Proof. - is_sint_bitwise andb 31%nat. -Qed. - -(* Why3 goal *) -Lemma is_sint32_lsr : forall (x:Z) (y:Z), (0%Z <= y)%Z -> ((Cint.is_sint32 - x) -> ((Cint.to_sint32 (Cint.lsr x y)) = (Cint.lsr x y))). -Proof. - lsr_in_sint_range 2147483648. -Qed. - -(* Why3 goal *) -Lemma is_sint32_lsl1 : ((Cint.lsl 1%Z 31%Z) = 2147483648%Z). -Proof. - compute. auto. -Qed. - -(* Why3 goal *) -Lemma is_sint32_lsl1_inf : forall (y:Z), ((0%Z <= y)%Z /\ (y < 31%Z)%Z) -> - ((Cint.to_sint32 (Cint.lsl 1%Z y)) = (Cint.lsl 1%Z y)). -Proof. - intros; rewrite Cint.to_sint_32; apply is_sint_lsl1_inf; omega. -Qed. - -(* Why3 goal *) -Lemma is_sint32_lsl1_sup : forall (y:Z), (32%Z <= y)%Z -> - ((Cint.to_sint32 (Cint.lsl 1%Z y)) = 0%Z). -Proof. - intros; rewrite Cint.to_sint_32; apply is_sint_lsl1_sup; omega. -Qed. - -(** *** Cast to sint64 C type *) -(* Why3 goal *) -Lemma is_sint64_lnot : forall (x:Z), (Cint.is_sint64 x) -> - ((Cint.to_sint64 (Cint.lnot x)) = (Cint.lnot x)). -Proof. - is_sint_lnot 9223372036854775808. -Qed. - -(* Why3 goal *) -Lemma is_sint64_lxor : forall (x:Z) (y:Z), (Cint.is_sint64 x) -> - ((Cint.is_sint64 y) -> ((Cint.to_sint64 (Cint.lxor x y)) = (Cint.lxor x - y))). -Proof. - is_sint_bitwise xorb 63%nat. -Qed. - -(* Why3 goal *) -Lemma is_sint64_lor : forall (x:Z) (y:Z), (Cint.is_sint64 x) -> - ((Cint.is_sint64 y) -> ((Cint.to_sint64 (Cint.lor x y)) = (Cint.lor x y))). -Proof. - is_sint_bitwise orb 63%nat. -Qed. - -(* Why3 goal *) -Lemma is_sint64_land : forall (x:Z) (y:Z), (Cint.is_sint64 x) -> - ((Cint.is_sint64 y) -> ((Cint.to_sint64 (Cint.land x y)) = (Cint.land x - y))). -Proof. - is_sint_bitwise andb 63%nat. -Qed. - -(* Why3 goal *) -Lemma is_sint64_lsr : forall (x:Z) (y:Z), (0%Z <= y)%Z -> ((Cint.is_sint64 - x) -> ((Cint.to_sint64 (Cint.lsr x y)) = (Cint.lsr x y))). -Proof. - lsr_in_sint_range 9223372036854775808. -Qed. - -(* Why3 goal *) -Lemma is_sint64_lsl1 : ((Cint.lsl 1%Z 63%Z) = 9223372036854775808%Z). -Proof. - compute. auto. -Qed. - -(* Why3 goal *) -Lemma is_sint64_lsl1_inf : forall (y:Z), ((0%Z <= y)%Z /\ (y < 63%Z)%Z) -> - ((Cint.to_sint64 (Cint.lsl 1%Z y)) = (Cint.lsl 1%Z y)). -Proof. - intros; rewrite Cint.to_sint_64; apply is_sint_lsl1_inf; omega. -Qed. - -(* Why3 goal *) -Lemma is_sint64_lsl1_sup : forall (y:Z), (64%Z <= y)%Z -> - ((Cint.to_sint64 (Cint.lsl 1%Z y)) = 0%Z). -Proof. - intros; rewrite Cint.to_sint_64; apply is_sint_lsl1_sup; omega. -Qed. - -(** * Range of some bitwise operations *) -(* Why3 goal *) -Lemma uint_land_range : forall (x:Z) (y:Z), (0%Z <= x)%Z -> - ((0%Z <= (Cint.land x y))%Z /\ ((Cint.land x y) <= x)%Z). -Proof. - intros x y h1. - apply Zbits.uint_land_range; trivial. -Qed. - -(* Why3 goal *) -Lemma uint_lor_inf : forall (x:Z) (y:Z), ((-1%Z)%Z <= x)%Z -> - ((0%Z <= y)%Z -> (x <= (Cint.lor x y))%Z). -Proof. - intros x y h1 h2. - case_leq 0 x; intro. - + apply Zbits.uint_lor_inf; trivial. - + replace x with (-1). - { rewrite Zbits.lor_1; omega. } - omega. -Qed. - -(* Why3 goal *) -Lemma sint_land_inf : forall (x:Z) (y:Z), (x <= 0%Z)%Z -> ((y < 0%Z)%Z -> - ((Cint.land x y) <= x)%Z). -Proof. - intros x y h1 h2. - cut (-(x+1) <= -((Cint.land x y)+1)). - { omega. } - fold (Bits.zlnot x). - fold (Bits.zlnot (Cint.land x y)). - repeat (rewrite <- Zbits.lnot_zlnot_equiv). - rewrite Zbits.lnot_land_de_morgan. - repeat (rewrite Zbits.lnot_zlnot_equiv). - apply (uint_lor_inf (Bits.zlnot x)); unfold Bits.zlnot; try omega. -Qed. - -(* Why3 goal *) -Lemma sint_lor_range : forall (x:Z) (y:Z), (x < 0%Z)%Z -> ((x <= (Cint.lor x - y))%Z /\ ((Cint.lor x y) < 0%Z)%Z). -Proof. - intros x y h1. - cut (0 <= -((Cint.lor x y)+1) <= -(x+1)). - { omega. } - fold (Bits.zlnot x). - fold (Bits.zlnot (Cint.lor x y)). - rewrite <- Zbits.lnot_zlnot_equiv. - rewrite Zbits.lnot_lor_de_morgan. - rewrite Zbits.lnot_zlnot_equiv. - apply (uint_land_range (Bits.zlnot x)). - unfold Bits.zlnot; omega. -Qed. - -(* Why3 goal *) -Lemma is_uint_lor_distrib : forall (n:Z) (x:Z) (y:Z), (Cint.is_uint n - (Cint.lor x y)) <-> ((Cint.is_uint n x) /\ (Cint.is_uint n y)). -Proof. - intros n x y; split. - + unfold Cint.is_uint ; intros. - destruct H. - rewrite <- Zbits.lor_sign in H. - destruct H. - generalize H0; clear H0. - assert (h1:((-1) <= x)) by omega. - generalize (uint_lor_inf x y h1 H1). - rewrite Zbits.lor_commut. - assert (h2:((-1) <= y)) by omega. - generalize (uint_lor_inf y x h2 H). - unfold Cint.lor; - pose (z:=(Zbits.lor y x)); fold z; intros. - omega. - + intro H; destruct H. - rewrite <- (is_uint_lor n) by trivial. - apply Cint.is_to_uint. -Qed. - -(** * Link between bitwise operators and addition *) - -(* Why3 goal *) -Lemma lor_addition : forall (x:Z) (y:Z), ((Cint.land x y) = 0%Z) -> - ((x + y)%Z = (Cint.lor x y)). -Proof. - intros x y h1. - apply Zbits.lor_addition; trivial. -Qed. - -(* Why3 goal *) -Lemma lxor_addition : forall (x:Z) (y:Z), ((Cint.land x y) = 0%Z) -> - ((x + y)%Z = (Cint.lxor x y)). -Proof. - intros x y h1. - apply Zbits.lxor_addition; trivial. -Qed. - -(** * Link between land and cast operator *) -(* Why3 goal *) -Lemma to_uint_land_edge : forall (x:Z) (n:Z), (0%Z <= n)%Z -> - ((Cint.to_uint n x) = (Cint.land ((Cint.lsl 1%Z n) - 1%Z)%Z x)). -Proof. - intros x n h1. - unfold Cint.to_uint; unfold Cint.to_range; Cint.simplify_to_range_unfolding. - unfold Cint.two_power_abs. - rewrite Zbits.pos_mod_two_power_nat_land_edge. - unfold Cint.land; f_equal. - unfold Cint.lsl; rewrite Zbits.lsl_pos by omega; unfold Zbits.lsl_def. - rewrite Zbits.lsl_arithmetic_shift; unfold Zbits.lsl_arithmetic_def. - auto with zarith. -Qed. - diff --git a/src/plugins/wp/share/src/Cfloat.v b/src/plugins/wp/share/src/Cfloat.v deleted file mode 100644 index 722da22037a..00000000000 --- a/src/plugins/wp/share/src/Cfloat.v +++ /dev/null @@ -1,399 +0,0 @@ -(* This file is generated by Why3's Coq-realize driver *) -(* Beware! Only edit allowed sections below *) -Require Import BuiltIn. -Require Reals.Rbasic_fun. -Require Reals.R_sqrt. -Require BuiltIn. -Require bool.Bool. -Require int.Int. -Require real.Real. -Require real.RealInfix. -Require real.Abs. -Require real.FromInt. -Require real.Square. - -(* Why3 goal *) -Definition f32 : Type. -Admitted. - -(* Why3 goal *) -Definition f64 : Type. -Admitted. - -(* Why3 goal *) -Definition to_f32: R -> f32. -Admitted. - -(* Why3 goal *) -Definition of_f32: f32 -> R. -Admitted. - -(* Why3 goal *) -Definition to_f64: R -> f64. -Admitted. - -(* Why3 goal *) -Definition of_f64: f64 -> R. -Admitted. - -(* Why3 goal *) -Lemma to_f32_zero : ((of_f32 (to_f32 0%R)) = 0%R). -Admitted. - -(* Why3 goal *) -Lemma to_f32_one : ((of_f32 (to_f32 1%R)) = 1%R). -Admitted. - -(* Why3 goal *) -Lemma to_f64_zero : ((of_f64 (to_f64 0%R)) = 0%R). -Admitted. - -(* Why3 goal *) -Lemma to_f64_one : ((of_f64 (to_f64 1%R)) = 1%R). -Admitted. - -(* Why3 assumption *) -Inductive rounding_mode := - | Up : rounding_mode - | Down : rounding_mode - | ToZero : rounding_mode - | NearestTiesToAway : rounding_mode - | NearestTiesToEven : rounding_mode. -Axiom rounding_mode_WhyType : WhyType rounding_mode. -Existing Instance rounding_mode_WhyType. - -(* Why3 goal *) -Definition round_float: rounding_mode -> R -> f32. -Admitted. - -(* Why3 goal *) -Definition round_double: rounding_mode -> R -> f64. -Admitted. - -(* Why3 goal *) -Lemma float_32 : forall (x:R), ((to_f32 x) = (round_float NearestTiesToEven - x)). -Admitted. - -(* Why3 goal *) -Lemma float_64 : forall (x:R), ((to_f64 x) = (round_double NearestTiesToEven - x)). -Admitted. - -(* Why3 assumption *) -Inductive float_kind := - | Finite : float_kind - | NaN : float_kind - | Inf_pos : float_kind - | Inf_neg : float_kind. -Axiom float_kind_WhyType : WhyType float_kind. -Existing Instance float_kind_WhyType. - -(* Why3 goal *) -Definition classify_f32: f32 -> float_kind. -Admitted. - -(* Why3 goal *) -Definition classify_f64: f64 -> float_kind. -Admitted. - -(* Why3 assumption *) -Definition is_finite_f32 (f:f32): Prop := ((classify_f32 f) = Finite). - -(* Why3 assumption *) -Definition is_finite_f64 (d:f64): Prop := ((classify_f64 d) = Finite). - -(* Why3 assumption *) -Definition is_NaN_f32 (f:f32): Prop := ((classify_f32 f) = NaN). - -(* Why3 assumption *) -Definition is_NaN_f64 (d:f64): Prop := ((classify_f64 d) = NaN). - -(* Why3 assumption *) -Definition is_infinite_f32 (f:f32): Prop := ((classify_f32 f) = Inf_pos) \/ - ((classify_f32 f) = Inf_neg). - -(* Why3 assumption *) -Definition is_infinite_f64 (d:f64): Prop := ((classify_f64 d) = Inf_pos) \/ - ((classify_f64 d) = Inf_neg). - -(* Why3 assumption *) -Definition is_positive_infinite_f32 (f:f32): Prop := - ((classify_f32 f) = Inf_pos). - -(* Why3 assumption *) -Definition is_positive_infinite_f64 (d:f64): Prop := - ((classify_f64 d) = Inf_pos). - -(* Why3 assumption *) -Definition is_negative_infinite_f32 (f:f32): Prop := - ((classify_f32 f) = Inf_neg). - -(* Why3 assumption *) -Definition is_negative_infinite_f64 (d:f64): Prop := - ((classify_f64 d) = Inf_neg). - -(* Why3 goal *) -Lemma is_finite_to_float_32 : forall (x:R), (is_finite_f32 (to_f32 x)). -Admitted. - -(* Why3 goal *) -Lemma is_finite_to_float_64 : forall (x:R), (is_finite_f64 (to_f64 x)). -Admitted. - -(* Why3 goal *) -Lemma to_float_is_finite_32 : forall (f:f32), (is_finite_f32 f) -> - ((to_f32 (of_f32 f)) = f). -Admitted. - -(* Why3 goal *) -Lemma to_float_is_finite_64 : forall (d:f64), (is_finite_f64 d) -> - ((to_f64 (of_f64 d)) = d). -Admitted. - -(* Why3 assumption *) -Definition finite (x:R): Prop := (is_finite_f32 (to_f32 x)) /\ (is_finite_f64 - (to_f64 x)). - -(* Why3 goal *) -Lemma finite_small_f32 : forall (x:R), - (((-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368%R)%R <= x)%R /\ - (x <= 340282346600000016151267322115014000640%R)%R) -> (is_finite_f32 - (to_f32 x)). -Admitted. - -(* Why3 goal *) -Lemma finite_small_f64 : forall (x:R), - (((-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368%R)%R <= x)%R /\ - (x <= 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368%R)%R) -> - (is_finite_f64 (to_f64 x)). -Admitted. - -(* Why3 goal *) -Lemma finite_range_f32 : forall (f:f32), (is_finite_f32 f) <-> - (((-340282346600000016151267322115014000640%R)%R <= (of_f32 f))%R /\ - ((of_f32 f) <= 340282346600000016151267322115014000640%R)%R). -Admitted. - -(* Why3 goal *) -Lemma finite_range_f64 : forall (d:f64), (is_finite_f64 d) <-> - (((-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368%R)%R <= (of_f64 d))%R /\ - ((of_f64 d) <= 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368%R)%R). -Admitted. - -(* Why3 goal *) -Definition eq_f32b: f32 -> f32 -> bool. -Admitted. - -(* Why3 goal *) -Definition eq_f64b: f64 -> f64 -> bool. -Admitted. - -(* Why3 assumption *) -Definition eq_f32 (x:f32) (y:f32): Prop := ((eq_f32b x y) = true). - -(* Why3 assumption *) -Definition eq_f64 (x:f64) (y:f64): Prop := ((eq_f64b x y) = true). - -(* Why3 goal *) -Lemma eq_finite_f32 : forall (x:f32) (y:f32), (is_finite_f32 x) -> - ((is_finite_f32 y) -> ((eq_f32 x y) <-> ((of_f32 x) = (of_f32 y)))). -Admitted. - -(* Why3 goal *) -Lemma eq_finite_f64 : forall (x:f64) (y:f64), (is_finite_f64 x) -> - ((is_finite_f64 y) -> ((eq_f64 x y) <-> ((of_f64 x) = (of_f64 y)))). -Admitted. - -(* Why3 goal *) -Definition ne_f32b: f32 -> f32 -> bool. -Admitted. - -(* Why3 goal *) -Definition ne_f64b: f64 -> f64 -> bool. -Admitted. - -(* Why3 assumption *) -Definition ne_f32 (x:f32) (y:f32): Prop := ((ne_f32b x y) = true). - -(* Why3 assumption *) -Definition ne_f64 (x:f64) (y:f64): Prop := ((ne_f64b x y) = true). - -(* Why3 goal *) -Lemma ne_finite_f32 : forall (x:f32) (y:f32), (is_finite_f32 x) -> - ((is_finite_f32 y) -> ((ne_f32 x y) <-> ~ ((of_f32 x) = (of_f32 y)))). -Admitted. - -(* Why3 goal *) -Lemma ne_finite_f64 : forall (x:f64) (y:f64), (is_finite_f64 x) -> - ((is_finite_f64 y) -> ((ne_f64 x y) <-> ~ ((of_f64 x) = (of_f64 y)))). -Admitted. - -(* Why3 goal *) -Definition le_f32b: f32 -> f32 -> bool. -Admitted. - -(* Why3 goal *) -Definition le_f64b: f64 -> f64 -> bool. -Admitted. - -(* Why3 assumption *) -Definition le_f32 (x:f32) (y:f32): Prop := ((le_f32b x y) = true). - -(* Why3 assumption *) -Definition le_f64 (x:f64) (y:f64): Prop := ((le_f64b x y) = true). - -(* Why3 goal *) -Lemma le_finite_f32 : forall (x:f32) (y:f32), (is_finite_f32 x) -> - ((is_finite_f32 y) -> ((le_f32 x y) <-> ((of_f32 x) <= (of_f32 y))%R)). -Admitted. - -(* Why3 goal *) -Lemma le_finite_f64 : forall (x:f64) (y:f64), (is_finite_f64 x) -> - ((is_finite_f64 y) -> ((le_f64 x y) <-> ((of_f64 x) <= (of_f64 y))%R)). -Admitted. - -(* Why3 goal *) -Definition lt_f32b: f32 -> f32 -> bool. -Admitted. - -(* Why3 goal *) -Definition lt_f64b: f64 -> f64 -> bool. -Admitted. - -(* Why3 assumption *) -Definition lt_f32 (x:f32) (y:f32): Prop := ((lt_f32b x y) = true). - -(* Why3 assumption *) -Definition lt_f64 (x:f64) (y:f64): Prop := ((lt_f64b x y) = true). - -(* Why3 goal *) -Lemma lt_finite_f32 : forall (x:f32) (y:f32), (is_finite_f32 x) -> - ((is_finite_f32 y) -> ((lt_f32 x y) <-> ((of_f32 x) < (of_f32 y))%R)). -Admitted. - -(* Why3 goal *) -Lemma lt_finite_f64 : forall (x:f64) (y:f64), (is_finite_f64 x) -> - ((is_finite_f64 y) -> ((lt_f64 x y) <-> ((of_f64 x) < (of_f64 y))%R)). -Admitted. - -(* Why3 goal *) -Definition neg_f32: f32 -> f32. -Admitted. - -(* Why3 goal *) -Definition neg_f64: f64 -> f64. -Admitted. - -(* Why3 goal *) -Lemma neg_finite_f32 : forall (x:f32), (is_finite_f32 x) -> - ((of_f32 (neg_f32 x)) = (-(of_f32 x))%R). -Admitted. - -(* Why3 goal *) -Lemma neg_finite_f64 : forall (x:f64), (is_finite_f64 x) -> - ((of_f64 (neg_f64 x)) = (-(of_f64 x))%R). -Admitted. - -(* Why3 goal *) -Definition add_f32: f32 -> f32 -> f32. -Admitted. - -(* Why3 goal *) -Definition add_f64: f64 -> f64 -> f64. -Admitted. - -(* Why3 goal *) -Lemma add_finite_f32 : forall (x:f32) (y:f32), (is_finite_f32 x) -> - ((is_finite_f32 y) -> ((add_f32 x - y) = (to_f32 ((of_f32 x) + (of_f32 y))%R))). -Admitted. - -(* Why3 goal *) -Lemma add_finite_f64 : forall (x:f64) (y:f64), (is_finite_f64 x) -> - ((is_finite_f64 y) -> ((add_f64 x - y) = (to_f64 ((of_f64 x) + (of_f64 y))%R))). -Admitted. - -(* Why3 goal *) -Definition mul_f32: f32 -> f32 -> f32. -Admitted. - -(* Why3 goal *) -Definition mul_f64: f64 -> f64 -> f64. -Admitted. - -(* Why3 goal *) -Lemma mul_finite_f32 : forall (x:f32) (y:f32), (is_finite_f32 x) -> - ((is_finite_f32 y) -> ((mul_f32 x - y) = (to_f32 ((of_f32 x) * (of_f32 y))%R))). -Admitted. - -(* Why3 goal *) -Lemma mul_finite_f64 : forall (x:f64) (y:f64), (is_finite_f64 x) -> - ((is_finite_f64 y) -> ((mul_f64 x - y) = (to_f64 ((of_f64 x) * (of_f64 y))%R))). -Admitted. - -(* Why3 goal *) -Definition div_f32: f32 -> f32 -> f32. -Admitted. - -(* Why3 goal *) -Definition div_f64: f64 -> f64 -> f64. -Admitted. - -(* Why3 goal *) -Lemma div_finite_f32 : forall (x:f32) (y:f32), (is_finite_f32 x) -> - ((is_finite_f32 y) -> ((div_f32 x - y) = (to_f32 ((of_f32 x) / (of_f32 y))%R))). -Admitted. - -(* Why3 goal *) -Lemma div_finite_f64 : forall (x:f64) (y:f64), (is_finite_f64 x) -> - ((is_finite_f64 y) -> ((div_f64 x - y) = (to_f64 ((of_f64 x) / (of_f64 y))%R))). -Admitted. - -(* Why3 goal *) -Definition sqrt_f32: f32 -> f32. -Admitted. - -(* Why3 goal *) -Definition sqrt_f64: f64 -> f64. -Admitted. - -(* Why3 goal *) -Lemma sqrt_finite_f32 : forall (x:f32), (is_finite_f32 x) -> - ((sqrt_f32 x) = (to_f32 (Reals.R_sqrt.sqrt (of_f32 x)))). -Admitted. - -(* Why3 goal *) -Lemma sqrt_finite_f64 : forall (x:f64), (is_finite_f64 x) -> - ((sqrt_f64 x) = (to_f64 (Reals.R_sqrt.sqrt (of_f64 x)))). -Admitted. - -(* Why3 goal *) -Definition model_f32: f32 -> R. -Admitted. - -(* Why3 assumption *) -Definition delta_f32 (f:f32): R := - (Reals.Rbasic_fun.Rabs ((of_f32 f) - (model_f32 f))%R). - -(* Why3 assumption *) -Definition error_f32 (f:f32): R := - ((delta_f32 f) / (Reals.Rbasic_fun.Rabs (model_f32 f)))%R. - -(* Why3 goal *) -Definition model_f64: f64 -> R. -Admitted. - -(* Why3 assumption *) -Definition delta_f64 (f:f64): R := - (Reals.Rbasic_fun.Rabs ((of_f64 f) - (model_f64 f))%R). - -(* Why3 assumption *) -Definition error_f64 (f:f64): R := - ((delta_f64 f) / (Reals.Rbasic_fun.Rabs (model_f64 f)))%R. - diff --git a/src/plugins/wp/share/src/Cint.v b/src/plugins/wp/share/src/Cint.v deleted file mode 100644 index fe3f4a446ef..00000000000 --- a/src/plugins/wp/share/src/Cint.v +++ /dev/null @@ -1,853 +0,0 @@ -(* This file is generated by Why3's Coq-realize driver *) -(* Beware! Only edit allowed sections below *) -Require Import BuiltIn. -Require BuiltIn. -Require bool.Bool. -Require int.Int. - -(* Why3 assumption *) -Definition is_bool (x:Z): Prop := (x = 0%Z) \/ (x = 1%Z). - -Require Import Qedlib. - -(** * remarks about two_power_nat *) -Remark two_power_nat_is_positive: forall n, - (0 < two_power_nat n)%Z. -Proof. - induction n. - (** base *) - + compute. auto. - (** ind. *) - + rewrite two_power_nat_S. - apply Zmult_lt_0_compat. - omega. - auto. -Qed. - -Remark two_power_nat_plus: forall n m, - (two_power_nat (n+m) = (two_power_nat n)*(two_power_nat m))%Z. -Proof. - induction m. - (replace (two_power_nat 0) with 1%Z by (compute;forward)). - (replace (n + 0)%nat with n by (auto with zarith)). - ring. - rewrite two_power_nat_S. - replace (n + S m)%nat with (S(n+m)) by (auto with zarith). - rewrite two_power_nat_S. - rewrite IHm. - ring. -Qed. - -(** * C-Integer bounds * **) - -(** ** bounds are inlined into prover files ** **) - -(** * C-Integer Ranges *) - -(* Why3 assumption *) -Definition is_uint8 (x:Z): Prop := (0%Z <= x)%Z /\ (x < 256%Z)%Z. - -(* Why3 assumption *) -Definition is_sint8 (x:Z): Prop := ((-128%Z)%Z <= x)%Z /\ (x < 128%Z)%Z. - -(* Why3 assumption *) -Definition is_uint16 (x:Z): Prop := (0%Z <= x)%Z /\ (x < 65536%Z)%Z. - -(* Why3 assumption *) -Definition is_sint16 (x:Z): Prop := ((-32768%Z)%Z <= x)%Z /\ (x < 32768%Z)%Z. - -(* Why3 assumption *) -Definition is_uint32 (x:Z): Prop := (0%Z <= x)%Z /\ (x < 4294967296%Z)%Z. - -(* Why3 assumption *) -Definition is_sint32 (x:Z): Prop := ((-2147483648%Z)%Z <= x)%Z /\ - (x < 2147483648%Z)%Z. - -(* Why3 assumption *) -Definition is_uint64 (x:Z): Prop := (0%Z <= x)%Z /\ - (x < 18446744073709551616%Z)%Z. - -(* Why3 assumption *) -Definition is_sint64 (x:Z): Prop := ((-9223372036854775808%Z)%Z <= x)%Z /\ - (x < 9223372036854775808%Z)%Z. - -(* Why3 goal *) -Lemma is_bool0 : (is_bool 0%Z). -Proof. - unfold is_bool. auto. -Qed. - -(* Why3 goal *) -Lemma is_bool1 : (is_bool 1%Z). -Proof. - unfold is_bool. auto. -Qed. - -(* Why3 goal *) -Definition to_bool: Z -> Z. -exact (fun x => if ( x =? 0 ) then 0 else 1). -Defined. - -(* Why3 goal *) -Lemma to_bool_def : forall (x:Z), ((x = 0%Z) -> ((to_bool x) = 0%Z)) /\ - ((~ (x = 0%Z)) -> ((to_bool x) = 1%Z)). -Proof. -intros x. unfold to_bool. induction (Z.eqb_spec x 0%Z) ; intuition. -Qed. - -Open Local Scope Z_scope. - -Definition to_range a b z := a + (z-a) mod (b-a). - -Ltac simplify_to_range_unfolding := - repeat (rewrite Z.sub_0_r); repeat (rewrite Z.add_0_l); repeat (rewrite Z.sub_opp_r). - -Lemma is_to_range: forall a b z, a<b -> a <= to_range a b z < b. -Proof. - intros. - unfold to_range. - assert (Q : b-a > 0) ; auto with zarith. - generalize (Z_mod_lt (z-a) (b-a) Q). - intro R. - auto with zarith. -Qed. - - -(* Why3 goal *) -Definition to_uint8: Z -> Z. -exact (to_range 0 256). -Defined. - -(* Why3 goal *) -Definition to_sint8: Z -> Z. -exact (to_range (-128) 128). -Defined. - -(* Why3 goal *) -Definition to_uint16: Z -> Z. -exact (to_range 0 65536). -Defined. - -(* Why3 goal *) -Definition to_sint16: Z -> Z. -exact (to_range (-32768) 32768). -Defined. - -(* Why3 goal *) -Definition to_uint32: Z -> Z. -exact (to_range 0 4294967296). -Defined. - -(* Why3 goal *) -Definition to_sint32: Z -> Z. -exact (to_range (-2147483648) 2147483648). -Defined. - -(* Why3 goal *) -Definition to_uint64: Z -> Z. -exact (to_range 0 18446744073709551616). -Defined. - -(* Why3 goal *) -Definition to_sint64: Z -> Z. -exact (to_range (-9223372036854775808) 9223372036854775808). -Defined. - -(* Why3 goal *) -Definition two_power_abs: Z -> Z. -exact (fun n => two_power_nat (Z.abs_nat n)). -Defined. - -(* Why3 goal *) -Lemma two_power_abs_is_positive : forall (n:Z), (0%Z < (two_power_abs n))%Z. -Proof. - intros n. - unfold two_power_abs. - apply two_power_nat_is_positive. -Qed. - -(* Why3 goal *) -Lemma two_power_abs_plus_pos : forall (n:Z) (m:Z), (0%Z <= n)%Z -> - ((0%Z <= m)%Z -> - ((two_power_abs (n + m)%Z) = ((two_power_abs n) * (two_power_abs m))%Z)). -Proof. - intros n m h1 h2. - unfold two_power_abs. - replace (Z.abs_nat (n + m)) with ((Z.abs_nat n) + (Z.abs_nat m))%nat. - + rewrite two_power_nat_plus. trivial. - + rewrite Zabs2Nat.inj_add by omega. trivial. -Qed. - -(* Why3 goal *) -Lemma two_power_abs_plus_one : forall (n:Z), (0%Z <= n)%Z -> - ((two_power_abs (n + 1%Z)%Z) = (2%Z * (two_power_abs n))%Z). -Proof. - intros n h1. - rewrite two_power_abs_plus_pos by omega. - replace (two_power_abs 1) with 2%Z. - + ring. - + unfold two_power_abs. - compute. trivial. -Qed. - -(* Why3 assumption *) -Definition is_uint (n:Z) (x:Z): Prop := (0%Z <= x)%Z /\ - (x < (two_power_abs n))%Z. - -(* Why3 assumption *) -Definition is_sint (n:Z) (x:Z): Prop := ((-(two_power_abs n))%Z <= x)%Z /\ - (x < (two_power_abs n))%Z. - -(* Why3 goal *) -Definition to_uint: Z -> Z -> Z. -exact (fun n => to_range 0 (two_power_abs n)). -Defined. - -Ltac to_uint to_uintN := unfold to_uint; unfold to_uintN; f_equal. - -Remark to_uint_8 : to_uint8 = to_uint 8%Z. -Proof. to_uint to_uint8. -Qed. - -Remark to_uint_16 : to_uint16 = to_uint 16%Z. -Proof. to_uint to_uint16. -Qed. - -Remark to_uint_32 : to_uint32 = to_uint 32%Z. -Proof. to_uint to_uint32. -Qed. - -Remark to_uint_64 : to_uint64 = to_uint 64%Z. -Proof. to_uint to_uint64. -Qed. - -(* Why3 goal *) -Definition to_sint: Z -> Z -> Z. -exact (fun n => to_range (-two_power_abs n) (two_power_abs n)). -Defined. - -Ltac to_sint to_sintN := unfold to_sint; unfold to_sintN; f_equal. - -Remark to_sint_8 : to_sint8 = to_sint 7%Z. -Proof. to_sint to_sint8. -Qed. - -Remark to_sint_16 : to_sint16 = to_sint 15%Z. -Proof. to_sint to_sint16. -Qed. - -Remark to_sint_32 : to_sint32 = to_sint 31%Z. -Proof. to_sint to_sint32. -Qed. - -Remark to_sint_64 : to_sint64 = to_sint 63%Z. -Proof. to_sint to_sint64. -Qed. - -(* Why3 goal *) -Lemma is_to_uint : forall (n:Z) (x:Z), (is_uint n (to_uint n x)). -Proof. - intros n x. - apply is_to_range. - apply two_power_abs_is_positive. -Qed. - -(* Why3 goal *) -Lemma is_to_sint : forall (n:Z) (x:Z), (is_sint n (to_sint n x)). -Proof. - intros n x. - apply is_to_range. - generalize (two_power_abs_is_positive n); intro. - omega. -Qed. - -(** * C-Integer Conversions are in-range *) - -Local Ltac to_range := intro x ; apply is_to_range ; omega. - -(* Why3 goal *) -Lemma is_to_uint8 : forall (x:Z), (is_uint8 (to_uint8 x)). -Proof. to_range. -Qed. - -(* Why3 goal *) -Lemma is_to_sint8 : forall (x:Z), (is_sint8 (to_sint8 x)). -Proof. to_range. -Qed. - -(* Why3 goal *) -Lemma is_to_uint16 : forall (x:Z), (is_uint16 (to_uint16 x)). -Proof. to_range. -Qed. - -(* Why3 goal *) -Lemma is_to_sint16 : forall (x:Z), (is_sint16 (to_sint16 x)). -Proof. to_range. -Qed. - -(* Why3 goal *) -Lemma is_to_uint32 : forall (x:Z), (is_uint32 (to_uint32 x)). -Proof. to_range. -Qed. - -(* Why3 goal *) -Lemma is_to_sint32 : forall (x:Z), (is_sint32 (to_sint32 x)). -Proof. to_range. -Qed. - -(* Why3 goal *) -Lemma is_to_uint64 : forall (x:Z), (is_uint64 (to_uint64 x)). -Proof. to_range. -Qed. - -(* Why3 goal *) -Lemma is_to_sint64 : forall (x:Z), (is_sint64 (to_sint64 x)). -Proof. to_range. -Qed. - -(** * C-Integer Conversions are identity when in-range *) -Open Local Scope Z_scope. - -Remark mod_kn_mod_n: forall (k:Z) (n:Z) (x:Z), k>0 -> n>0 -> (x mod (k*n)) mod n = x mod n. -Proof. - intros. - rewrite (Zmod_eq_full x (k*n)). - + rewrite <- Z.add_opp_r. rewrite Zopp_mult_distr_l. - replace (- (x/(k*n)) * (k*n)) with (((-(x/(k*n))) * k) * n) by ring. - apply Z_mod_plus_full. - + assert (k*n > 0). - { apply Zmult_gt_0_compat; trivial. } - omega. -Qed. - -Lemma id_to_range : forall a b x, a <= x < b -> to_range a b x = x. -Proof. - intros a b x Range. unfold to_range. - assert (Q : b-a > 0) ; auto with zarith. - cut ((x-a) mod (b-a) = (x-a)). omega. - apply Zmod_small. omega. -Qed. - -Local Ltac id_range := intro x ; apply id_to_range ; omega. - -(* Why3 goal *) -Lemma id_uint : forall (n:Z) (x:Z), (is_uint n x) <-> ((to_uint n x) = x). -Proof. - intros n x; split. - + apply id_to_range. - + intro H; rewrite <- H. apply is_to_uint. -Qed. - -(* Why3 goal *) -Lemma id_sint : forall (n:Z) (x:Z), (is_sint n x) <-> ((to_sint n x) = x). -Proof. - intros n x; split. - + apply id_to_range. - + intro H; rewrite <- H. apply is_to_sint. -Qed. - -(* Why3 goal *) -Lemma id_uint8 : forall (x:Z), (is_uint8 x) -> ((to_uint8 x) = x). -Proof. id_range. -Qed. - -(* Why3 goal *) -Lemma id_sint8 : forall (x:Z), (is_sint8 x) -> ((to_sint8 x) = x). -Proof. id_range. -Qed. - -(* Why3 goal *) -Lemma id_uint16 : forall (x:Z), (is_uint16 x) -> ((to_uint16 x) = x). -Proof. id_range. -Qed. - -(* Why3 goal *) -Lemma id_sint16 : forall (x:Z), (is_sint16 x) -> ((to_sint16 x) = x). -Proof. id_range. -Qed. - -(* Why3 goal *) -Lemma id_uint32 : forall (x:Z), (is_uint32 x) -> ((to_uint32 x) = x). -Proof. id_range. -Qed. - -(* Why3 goal *) -Lemma id_sint32 : forall (x:Z), (is_sint32 x) -> ((to_sint32 x) = x). -Proof. id_range. -Qed. - -(* Why3 goal *) -Lemma id_uint64 : forall (x:Z), (is_uint64 x) -> ((to_uint64 x) = x). -Proof. id_range. -Qed. - -(* Why3 goal *) -Lemma id_sint64 : forall (x:Z), (is_sint64 x) -> ((to_sint64 x) = x). -Proof. id_range. -Qed. - -(** * C-Integer Conversions are projections *) - -Local Ltac proj := intro x ; apply id_to_range ; apply is_to_range ; omega. - -(* Why3 goal *) -Lemma proj_uint : forall (n:Z) (x:Z), ((to_uint n (to_uint n x)) = (to_uint n - x)). -Proof. - intros n x. apply id_to_range. - unfold to_uint. apply is_to_range. apply two_power_abs_is_positive. -Qed. - -(* Why3 goal *) -Lemma proj_sint : forall (n:Z) (x:Z), ((to_sint n (to_sint n x)) = (to_sint n - x)). -Proof. - intros n x. apply id_to_range. - unfold to_sint. apply is_to_range. - assert (0 < two_power_abs n). - { apply two_power_abs_is_positive. } - omega. -Qed. - -(* Why3 goal *) -Lemma proj_uint8 : forall (x:Z), ((to_uint8 (to_uint8 x)) = (to_uint8 x)). -Proof. proj. -Qed. - -(* Why3 goal *) -Lemma proj_sint8 : forall (x:Z), ((to_sint8 (to_sint8 x)) = (to_sint8 x)). -Proof. proj. -Qed. - -(* Why3 goal *) -Lemma proj_uint16 : forall (x:Z), - ((to_uint16 (to_uint16 x)) = (to_uint16 x)). -Proof. proj. -Qed. - -(* Why3 goal *) -Lemma proj_sint16 : forall (x:Z), - ((to_sint16 (to_sint16 x)) = (to_sint16 x)). -Proof. proj. -Qed. - -(* Why3 goal *) -Lemma proj_uint32 : forall (x:Z), - ((to_uint32 (to_uint32 x)) = (to_uint32 x)). -Proof. proj. -Qed. - -(* Why3 goal *) -Lemma proj_sint32 : forall (x:Z), - ((to_sint32 (to_sint32 x)) = (to_sint32 x)). -Proof. proj. -Qed. - -(* Why3 goal *) -Lemma proj_uint64 : forall (x:Z), - ((to_uint64 (to_uint64 x)) = (to_uint64 x)). -Proof. proj. -Qed. - -(* Why3 goal *) -Lemma proj_sint64 : forall (x:Z), - ((to_sint64 (to_sint64 x)) = (to_sint64 x)). -Proof. proj. -Qed. - -(* Why3 goal *) -Lemma proj_su : forall (n:Z) (x:Z), ((to_sint n (to_uint n x)) = (to_uint n - x)). -Proof. - intros n x; unfold to_uint; unfold to_sint; unfold to_range; simplify_to_range_unfolding. - generalize (two_power_abs_is_positive n). - pose (n2:=(two_power_abs n)); fold n2. - intros. - replace (n2 + n2) with (2*n2) by (auto with zarith). - replace ((x mod n2 + n2) mod (2 * n2)) with (x mod n2 + n2). - + replace (- n2 + (x mod n2 + n2)) with (x mod n2) by ring. - trivial. - + symmetry. apply Zmod_small. - assert (0 <= x mod n2 < n2). - { apply Z_mod_lt; omega. } - omega. -Qed. - -(* Why3 goal *) -Lemma incl_su : forall (n:Z) (x:Z), (is_uint n x) -> (is_sint n x). -Proof. - intros n x. - rewrite id_uint; intro H; rewrite <- H. - rewrite id_sint; apply proj_su. -Qed. - -(* Why3 goal *) -Lemma proj_su_uint : forall (n:Z) (m:Z) (x:Z), (0%Z <= n)%Z -> - ((0%Z <= m)%Z -> ((to_sint (m + n)%Z (to_uint n x)) = (to_uint n x))). -Proof. - intros n m x Posn POSm; unfold to_uint; unfold to_sint; unfold to_range. - repeat (rewrite Z.sub_0_r); rewrite Z.add_0_l; repeat (rewrite Z.sub_opp_r). - generalize (two_power_abs_is_positive n). - generalize (two_power_abs_is_positive m). - generalize (two_power_abs_is_positive (m+n)). - - rewrite two_power_abs_plus_pos by omega. - pose (n2:=(two_power_abs n)); fold n2. - pose (m2:=(two_power_abs m)); fold m2. - intros. - - replace (m2*n2 + m2*n2) with (2*(m2*n2)) by (auto with zarith). - replace ((x mod n2 + (m2*n2)) mod (2*(m2*n2))) with (x mod n2 + (m2*n2)). - + omega. - + symmetry. apply Zmod_small. - pose (r:=(x mod n2)); fold r. - assert (0 <= r < n2). - { apply Z_mod_lt; omega. } - split. - * omega. - * replace (2*(m2*n2)) with (m2*n2 + m2*n2) by (auto with zarith). - rewrite <- Z.add_lt_mono_r. - pose (mn:=(m2 * n2)); fold mn. - assert (n2 <= mn). - { replace n2 with (1*n2) by auto with zarith. - unfold mn. - apply Int.CompatOrderMult; omega. } - destruct H2. omega. -Qed. - -(* Why3 goal *) -Lemma proj_su_sint : forall (n:Z) (m:Z) (x:Z), (0%Z <= n)%Z -> - ((0%Z <= m)%Z -> ((to_sint n (to_uint (m + (n + 1%Z)%Z)%Z x)) = (to_sint n - x))). -Proof. - intros n m x POSn POSm; unfold to_uint; unfold to_sint; unfold to_range. - repeat (rewrite Z.sub_0_r); rewrite Z.add_0_l; repeat (rewrite Z.sub_opp_r). - generalize (two_power_abs_is_positive n). - generalize (two_power_abs_is_positive m). - generalize (two_power_abs_is_positive (m + (n + 1))). - - rewrite two_power_abs_plus_pos by omega. - rewrite two_power_abs_plus_one by omega. - pose (n2:=(two_power_abs n)); fold n2. - pose (m2:=(two_power_abs m)); fold m2. - intros. - - replace (n2 + n2) with (2*n2) by (auto with zarith). - symmetry. - rewrite <- (mod_kn_mod_n m2 ) by omega. - rewrite <- Z.add_mod_idemp_l by omega. - rewrite mod_kn_mod_n by omega. - trivial. -Qed. - -(* Why3 goal *) -Lemma proj_int8 : forall (x:Z), ((to_sint8 (to_uint8 x)) = (to_sint8 x)). -Proof. - intros x. - rewrite to_sint_8. rewrite to_uint_8. - replace 8 with (0+(7+1)) by (auto with zarith). - apply proj_su_sint; (auto with zarith). -Qed. - -(* Why3 goal *) -Lemma proj_int16 : forall (x:Z), ((to_sint16 (to_uint16 x)) = (to_sint16 x)). -Proof. - intros x. - rewrite to_sint_16. rewrite to_uint_16. - replace 16 with (0+(15+1)) by (auto with zarith). - apply proj_su_sint; (auto with zarith). -Qed. - -(* Why3 goal *) -Lemma proj_int32 : forall (x:Z), ((to_sint32 (to_uint32 x)) = (to_sint32 x)). -Proof. - intros x. - rewrite to_sint_32. rewrite to_uint_32. - replace 32 with (0+(31+1)) by (auto with zarith). - apply proj_su_sint; (auto with zarith). -Qed. - -(* Why3 goal *) -Lemma proj_int64 : forall (x:Z), ((to_sint64 (to_uint64 x)) = (to_sint64 x)). -Proof. - intros x. - rewrite to_sint_64. rewrite to_uint_64. - replace 64 with (0+(63+1)) by (auto with zarith). - apply proj_su_sint; (auto with zarith). -Qed. - -(* Why3 goal *) -Lemma proj_us_uint : forall (n:Z) (m:Z) (x:Z), (0%Z <= n)%Z -> - ((0%Z <= m)%Z -> ((to_uint (n + 1%Z)%Z (to_sint (m + n)%Z - x)) = (to_uint (n + 1%Z)%Z x))). -Proof. - intros n m x POSn POSm; unfold to_uint; unfold to_sint; unfold to_range. - repeat (rewrite Z.sub_0_r); repeat (rewrite Z.add_0_l); repeat (rewrite Z.sub_opp_r). - generalize (two_power_abs_is_positive n). - generalize (two_power_abs_is_positive m). - rewrite two_power_abs_plus_one by omega. - rewrite two_power_abs_plus_pos by omega. - pose (n2:=(two_power_abs n)); fold n2. - pose (m2:=(two_power_abs m)); fold m2. - intros. - replace (m2*n2 + m2*n2) with (2*(m2*n2)) by (auto with zarith). - rewrite Z.add_opp_l. - symmetry. - rewrite <- (mod_kn_mod_n m2) by omega. - replace (m2 * (2 * n2)) with (2 * (m2 * n2)) by ring. - pose (mn:=(m2*n2)); fold mn. - replace x with ((x+mn)-mn) by (auto with zarith). - replace (x + mn - mn + mn) with (x + mn) by (auto with zarith). - rewrite <- Zminus_mod_idemp_l. - unfold mn. - replace (2 * (m2 * n2)) with (m2 * (2 * n2)) by ring. - rewrite mod_kn_mod_n by omega. - trivial. -Qed. - -Remark two_power_abs_increase: forall (n:Z), 0 <= n -> two_power_abs n < two_power_abs (n +1). -Proof. - intros. - generalize (two_power_abs_is_positive n); intro h. - rewrite two_power_abs_plus_one; omega. -Qed. - -Require Import Qedlib. -(* Why3 goal *) -Lemma incl_uint : forall (n:Z) (x:Z) (i:Z), (0%Z <= n)%Z -> ((0%Z <= i)%Z -> - ((is_uint n x) -> (is_uint (n + i)%Z x))). -Proof. - intros n x i h1 h2 h3. - apply Qedlib.Z_induction_rank with (m:=0) (n := i) ; auto with zarith. - { replace (n + 0) with n by ring; auto. } - intro; unfold is_uint; intros h10 h11. - split. - + omega. - + replace (n + (n0 + 1)) with ((n + n0) + 1) by ring. - pose (m :=(n + n0)); fold m; fold m in h11. - assert (two_power_abs m < two_power_abs (m + 1)). - { assert (0 <= m) by (unfold m; omega). - clear h11 h2 x h3 i h1 h10. - apply two_power_abs_increase; auto. - } - omega. -Qed. - -(* Why3 goal *) -Lemma incl_sint : forall (n:Z) (x:Z) (i:Z), (0%Z <= n)%Z -> ((0%Z <= i)%Z -> - ((is_sint n x) -> (is_sint (n + i)%Z x))). -Proof. - intros n x i h1 h2 h3. - apply Qedlib.Z_induction_rank with (m:=0) (n := i) ; auto with zarith. - { replace (n + 0) with n by ring; auto. } - intro; unfold is_sint; intros h10 h11. - replace (n + (n0 + 1)) with ((n + n0) + 1) by ring. - pose (m :=(n + n0)); fold m; fold m in h11. - assert (0 <= m). - { unfold m; omega. } - generalize (two_power_abs_increase m); intro. - omega. -Qed. - -(* Why3 goal *) -Lemma incl_int : forall (n:Z) (x:Z) (i:Z), (0%Z <= n)%Z -> ((0%Z <= i)%Z -> - ((is_uint n x) -> (is_sint (n + i)%Z x))). -Proof. - intros n x i h1 h2 h3. - unfold is_sint; unfold is_uint in h3. - apply Qedlib.Z_induction_rank with (m:=0) (n := i) ; auto with zarith. - { replace (n + 0) with n by ring; omega. } - intro. - replace (n + (n0 + 1)) with ((n + n0) + 1) by ring. - pose (m :=(n + n0)); fold m; intros. - assert (0 <= m). - { unfold m; omega. } - generalize (two_power_abs_increase m); intro. - omega. -Qed. - -Require Import Zbits. - -(* Why3 goal *) -Definition lnot: Z -> Z. - exact (lnot). -Defined. - -(* Why3 goal *) -Definition land: Z -> Z -> Z. - exact (land). -Defined. - -(* Why3 goal *) -Definition lxor: Z -> Z -> Z. - exact (lxor). -Defined. - -(* Why3 goal *) -Definition lor: Z -> Z -> Z. - exact (lor). -Defined. - -(* Why3 goal *) -Definition lsl: Z -> Z -> Z. - exact (lsl). -Defined. - -(* Why3 goal *) -Definition lsr: Z -> Z -> Z. - exact (lsr). -Defined. - -(* Why3 goal *) -Definition bit_testb: Z -> Z -> bool. -exact (bit_testb). -Defined. - -(* Why3 goal *) -Definition bit_test: Z -> Z -> Prop. -exact (fun x i => (bit_testb x i) = true). -Defined. - -(* Unused content named is_uint8_pos -intros x h. -red in h. -intuition. -Qed. - *) -(* Unused content named is_uint16_pos -intros x h. -red in h. -intuition. -Qed. - *) -(* Unused content named is_uint32_pos -intros x h. -red in h. -intuition. -Qed. - *) -(* Unused content named is_uint64_pos -intros x h. -red in h. -intuition. -Qed. - *) -(** * Tacticals. *) -Require Import Qedlib. - -Fixpoint Cst_nat n := - match n with O => true | S c => Cst_nat c - end. -Fixpoint Cst_pos p := - match p with xH => true | xI c | xO c => Cst_pos c - end. -Fixpoint Cst_N n := - match n with N0 => true | Npos c => Cst_pos c - end. -Definition Cst_Z x := - match x with Z0 => true | Zpos c | Zneg c => Cst_pos c - end. -Ltac COMPUTE e := - let R := fresh in pose (R := e); fold R; compute in R; unfold R; clear R. -Ltac COMPUTE_HYP h e := - let R := fresh in pose (R := e); fold R in h; compute in R; unfold R in h; clear R. -Ltac GUARD cst e := - let E := fresh in pose (E := cst e); compute in E; - match goal with - | [ E:=true |- _] => clear E - end. -Ltac COMPUTE1 f cst := - match goal with - | [ |- context[f ?e] ] => GUARD cst e; COMPUTE (f e) - | [ H:=context[f ?e] |- _ ] => GUARD cst e; COMPUTE_HYP H (f e) - | [ H: context[f ?e] |- _ ] => GUARD cst e; COMPUTE_HYP H (f e) - end. -Ltac COMPUTE2 f cst1 cst2 := - match goal with - | [ |- context[f ?e1 ?e2] ] => GUARD cst1 e1; GUARD cst2 e2; COMPUTE (f e1 e2) - | [ H:=context[f ?e1 ?e2] |- _] => GUARD cst1 e1; GUARD cst2 e2; COMPUTE_HYP H (f e1 e2) - | [ H: context[f ?e1 ?e2] |- _] => GUARD cst1 e1; GUARD cst2 e2; COMPUTE_HYP H (f e1 e2) - end. -Ltac COMPUTE2AC f cst tac := - match goal with - | [ |- context[f ?e1 (f ?e2 ?e3) ]] => GUARD cst e1; - first [ (GUARD cst e2; (replace (f e1 (f e2 e3)) with (f e3 (f e1 e2)) by (tac ; forward)); COMPUTE (f e1 e2)) - | (GUARD cst e3; (replace (f e1 (f e2 e3)) with (f e2 (f e1 e3)) by (tac ; forward)); COMPUTE (f e1 e3))] - | [ |- context[f (f ?e3 ?e2) ?e1 ]] => GUARD cst e1; - first [ (GUARD cst e2; (replace (f (f e3 e2) e1) with (f e3 (f e2 e1)) by (tac ; forward)); COMPUTE (f e2 e1)) - | (GUARD cst e3; (replace (f (f e3 e2) e1) with (f e2 (f e3 e1)) by (tac ; forward)); COMPUTE (f e3 e1))] - | [ H:=context[f ?e1 (f ?e2 ?e3) ] |- _] => GUARD cst e1; - first [ (GUARD cst e2; (replace (f e1 (f e2 e3)) with (f e3 (f e1 e2)) in H by (tac ; forward)); COMPUTE_HYP H (f e1 e2)) - | (GUARD cst e3; (replace (f e1 (f e2 e3)) with (f e2 (f e1 e3)) in H by (tac ; forward)); COMPUTE_HYP H (f e1 e3))] - | [ H:=context[f (f ?e3 ?e2) ?e1 ] |- _] => GUARD cst e1; - first [ (GUARD cst e2; (replace (f (f e3 e2) e1) with (f e3 (f e2 e1)) in H by (tac ; forward)); COMPUTE_HYP H (f e2 e1)) - | (GUARD cst e3; (replace (f (f e3 e2) e1) with (f e2 (f e3 e1)) in H by (tac ; forward)); COMPUTE_HYP H (f e3 e1))] - | [ H: context[f ?e1 (f ?e2 ?e3) ] |- _] => GUARD cst e1; - first [ (GUARD cst e2; (replace (f e1 (f e2 e3)) with (f e3 (f e1 e2)) in H by (tac ; forward)); COMPUTE (f e1 e2)) - | (GUARD cst e3; (replace (f e1 (f e2 e3)) with (f e2 (f e1 e3)) in H by (tac ; forward)); COMPUTE_HYP H (f e1 e3))] - | [ H: context[f (f ?e3 ?e2) ?e1 ] |- _] => GUARD cst e1; - first [ (GUARD cst e2; (replace (f (f e3 e2) e1) with (f e3 (f e2 e1)) in H by (tac ; forward)); COMPUTE_HYP H (f e2 e1)) - | (GUARD cst e3; (replace (f (f e3 e2) e1) with (f e2 (f e3 e1)) in H by (tac ; forward)); COMPUTE_HYP H (f e3 e1))] - end. -Ltac COMPUTE3 f cst1 cst2 cst3 := - match goal with - | [ |- context[f ?e1 ?e2 ?e3] ] => GUARD cst1 e1; GUARD cst2 e2; GUARD cst3 e3; COMPUTE (f e1 e2 e3) - | [ H:=context[f ?e1 ?e2 ?e3] |- _ ] => GUARD cst1 e1; GUARD cst2 e2; GUARD cst3 e3; COMPUTE_HYP H (f e1 e2 e3) - | [ H: context[f ?e1 ?e2 ?e3] |- _ ] => GUARD cst1 e1; GUARD cst2 e2; GUARD cst3 e3; COMPUTE_HYP H (f e1 e2 e3) - end. - -(* - -Require Import Bits. - -Ltac ring_tactic := ring. - -Ltac rewrite_cst := - first [ COMPUTE Zopp Cst_Z - | COMPUTE Zsucc Cst_Z - | COMPUTE Zpred Cst_Z - | COMPUTE Zdouble_plus_one Cst_Z - | COMPUTE Zdouble_minus_one Cst_Z - | COMPUTE Zdouble Cst_Z - | COMPUTE Zabs Cst_Z - - | COMPUTE Zabs_N Cst_Z - | COMPUTE Zabs_nat Cst_Z - - | COMPUTE Z_of_N Cst_N - | COMPUTE Z_of_nat Cst_nat - | COMPUTE two_power_nat Cst_nat - - | COMPUTE2 Zminus Cst_Z Cst_Z - | COMPUTE2 Zplus Cst_Z Cst_Z - | COMPUTE2 Zmult Cst_Z Cst_Z - - | COMPUTE2AC Zplus Cst_Z ring_tactic - | COMPUTE2AC Zmult Cst_Z ring_tactic - - | COMPUTE to_uint8 Cst_Z - | COMPUTE to_sint8 Cst_Z - | COMPUTE to_uint16 Cst_Z - | COMPUTE to_sint16 Cst_Z - | COMPUTE to_uint32 Cst_Z - | COMPUTE to_sint32 Cst_Z - | COMPUTE to_uint64 Cst_Z - | COMPUTE to_sint64 Cst_Z - | COMPUTE3 to_range Cst_Z Cst_Z Cst_Z - | COMPUTE1 zlnot Cst_Z - | COMPUTE1 ZxHpos Cst_Z - | COMPUTE1 ZxHpower Cst_Z - ]. - -Remark rewrite_cst_example_1: forall x y, 1 + ((2 * x) * 3 + 2) = (3 * (2 * y)+ 2) + 1 -> 1 + (2 + (x * 2) * 3 ) = (2 + 3 * (y* 2)) + 1. -Proof. - intros. repeat rewrite_cst. auto. -Qed. - -Remark rewrite_cst_example_2: forall x: Z, - x + zlnot (zlnot (0)) = x + Z_of_nat (ZxHpos 0). -Proof. - rewrite_cst. intro. auto. -Qed. - -*) diff --git a/src/plugins/wp/share/src/Cmath.v b/src/plugins/wp/share/src/Cmath.v deleted file mode 100644 index daf4c0fe87d..00000000000 --- a/src/plugins/wp/share/src/Cmath.v +++ /dev/null @@ -1,19 +0,0 @@ -(* This file is generated by Why3's Coq-realize driver *) -(* Beware! Only edit allowed sections below *) -Require Import BuiltIn. -Require BuiltIn. -Require int.Int. -Require int.Abs. -Require real.Real. -Require real.RealInfix. - -Require Import RIneq. - -(* Why3 goal *) -Lemma abs_def : forall (x:Z), ((0%Z <= x)%Z -> - ((ZArith.BinInt.Z.abs x) = x)) /\ ((~ (0%Z <= x)%Z) -> - ((ZArith.BinInt.Z.abs x) = (-x)%Z)). -Proof. -exact int.Abs.abs_def. -Qed. - diff --git a/src/plugins/wp/share/src/ExpLog.v b/src/plugins/wp/share/src/ExpLog.v deleted file mode 100644 index cbdfdb813b6..00000000000 --- a/src/plugins/wp/share/src/ExpLog.v +++ /dev/null @@ -1,14 +0,0 @@ -(* This file is generated by Why3's Coq-realize driver *) -(* Beware! Only edit allowed sections below *) -Require Import BuiltIn. -Require Reals.Rtrigo_def. -Require Reals.Rpower. -Require BuiltIn. -Require real.Real. -Require real.RealInfix. -Require real.ExpLog. - -(* Why3 goal *) -Lemma exp_pos : forall (x:R), (0%R < (Reals.Rtrigo_def.exp x))%R. -Admitted. - diff --git a/src/plugins/wp/share/src/Makefile b/src/plugins/wp/share/src/Makefile deleted file mode 100644 index fb38c4d2cbc..00000000000 --- a/src/plugins/wp/share/src/Makefile +++ /dev/null @@ -1,416 +0,0 @@ -########################################################################## -# # -# This file is part of WP plug-in of Frama-C. # -# # -# Copyright (C) 2007-2019 # -# CEA (Commissariat a l'energie atomique et aux energies # -# alternatives) # -# # -# you can redistribute it and/or modify it under the terms of the GNU # -# Lesser General Public License as published by the Free Software # -# Foundation, version 2.1. # -# # -# It is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU Lesser General Public License for more details. # -# # -# See the GNU Lesser General Public License version 2.1 # -# for more details (enclosed in the file licenses/LGPLv2.1). # -# # -########################################################################## - -# -------------------------------------------------------------------------- -# --- Generation of Coq and Alt-ergo files from Why3 one -# --- Developer only -# -------------------------------------------------------------------------- - -REALIZATION_DIR=.. - -.PHONY: all realize headers - -all: realize - -stamp: - mkdir -p stamp - -aux: - mkdir -p aux - -# performs realization and adds headers -realize: stamp/headers.stamp - -# To add headers without doing more... -headers: - @echo "Apply headers (on all wp/share directory)" - @$(MAKE) -f ../Makefile.headers -C .. headers > /dev/null - @touch stamp/headers.stamp - -# Dependency needed to allow make -j -stamp/headers.stamp: stamp/realizationtools.stamp stamp/coqrealization.stamp \ - stamp/altergorealization.stamp stamp/why3realization.stamp stamp/coqlib.stamp - @echo "Apply headers (on some files of wp/share directory)" - @$(MAKE) -f Makefile.headers -C .. headers.wp_share_src > /dev/null - @touch $@ - - -WHY3_SHARE:=$(shell why3 --print-datadir) -WHY3_LIB:=$(shell why3 --print-libdir)/coq -WHY3_VERSION:=$(shell opam info -f version why3-base) -WHY3_SRC:="why3-base".$(WHY3_VERSION) - -# When installing why3, "make install-lib" is required to be able to find the package -.PHONY: info help -help info: - @echo "Info about targets:" - @echo "- headers -> adds headers to all necessary files" - @echo "- realize -> updates all share/prover directories from source files of share/src" - @echo "- compile -> compiles Coq files" - @echo "- plugins -> builds Why3 plugins used for the realizations" - @echo "- File.coqide -> runs CoqIde on File.v" - @echo "- import_why3_coq > import resources from why3 source" - @echo "- tests -> runs tests" - @echo "- clean -> cleaning the directory" - @echo "- all (default) -> idem realize" - @echo "About why3 configuration:" - @echo " WHY3_PACKAGE= $(shell ocamlfind query why3)" - @echo " WHY3_SHARE= $(WHY3_SHARE)" - @echo " WHY3_LIB= $(WHY3_LIB)" - -#-- The little plugin that define the meta and transformation keep_it and the -#-- printer that do the realization for altergo -PLUGINS=filter_axioms alt_ergo_realize why3printer_realize - -PLUGINS_FILE= $(addsuffix .cmxs, $(PLUGINS)) $(addsuffix .cmo, $(PLUGINS)) - -plugins: $(PLUGINS_FILE) - touch plugins - -%.cmxs: %.ml - ocamlfind ocamlopt -package why3 -shared -o $*.cmxs $*.ml - -%.cmo: %.ml - ocamlfind ocamlc -package why3 -c -o $*.cmo $*.ml - -#-- Library realization (Coq and Alt-ergo) -- - -#Realized libraries -WHY3_FILE= qed cmath cint cbits memory vset cfloat vlist - -WHY3_COQ_REALIZE_DRIVER=$(WHY3_SHARE)/drivers/coq-realize.drv - -WHY3_ALTERGO_DRIVER=$(WHY3_SHARE)/drivers/alt_ergo - - -WHY3_REALIZE=why3 realize --extra-config realization.conf - -stamp/realizationtools.stamp: plugins coq-realize.drv alt_ergo-realize.drv realization.conf stamp/REALIZATION_DIR.stamp - @touch $@ - -stamp/coqrealization.stamp: import_why3_coq $(addprefix stamp/, $(addsuffix .coq.stamp, $(WHY3_FILE))) - @touch $@ - -#file written directly in coq -WPCOQLIB=Bits.v Zbits.v Qedlib.v - -stamp/coqlib.stamp: $(WPCOQLIB) stamp/REALIZATION_DIR.stamp - @echo "Installing Coq Libraries" - @$(foreach file, $(WPCOQLIB),\ - install -m 444 $(file) $(REALIZATION_DIR)/coqwp;\ - install -m 444 $(file) $(REALIZATION_DIR)/why3;) - @touch $@ - -stamp/REALIZATION_DIR.stamp: stamp - @echo "Create share sub-directories" - @mkdir -p $(REALIZATION_DIR)/ergo - @mkdir -p $(REALIZATION_DIR)/why3 - @mkdir -p $(REALIZATION_DIR)/coqwp - @touch $@ - -stamp/%.coq.stamp: %.why %.why_theory Makefile $(WHY3_LIB) stamp/realizationtools.stamp - @echo "Realizing Coq Library for $*" - @for theory in $$(cat $*.why_theory); do\ - $(WHY3_REALIZE) -D coq-realize.drv -T $*.$$theory -o . 2> logs/$$theory.coq.err.tmp;\ - sed -e 's:^File ".*/wp/share/:File "WP-SHARE/:' logs/$$theory.coq.err.tmp > logs/$$theory.coq.err;\ - rm -f logs/$$theory.coq.err.tmp;\ - install -m 444 $$theory.v $(REALIZATION_DIR)/coqwp;\ - install -m 444 $$theory.v $(REALIZATION_DIR)/why3;\ - done; - @touch $@ - -coq.drv: $(addprefix aux/, $(addsuffix .coq.aux, $(WHY3_FILE))) - @echo "Making Coq driver" - @echo "(* generated automatically at developer compilation time *)" | cat - $^ > $@ - -coq-why3.drv: $(addprefix aux/, $(addsuffix .coq-why3.aux, $(WHY3_FILE))) - @echo "Making Coq-Why3 driver" - @echo "(* generated automatically at developer compilation time *)" | cat - $^ > $@ - install -m 444 $@ $(REALIZATION_DIR)/why3/coq.drv - -coq-realize.drv: $(WHY3_COQ_REALIZE_DRIVER) coq.drv coq-why3.drv - @echo "Making Coq realization driver" - @echo "(* generated automatically at compilation time *)" > $@ - @echo "import \"coq.drv\"" >> $@ - @echo "import \"$(WHY3_COQ_REALIZE_DRIVER)\"" >> $@ - @echo "import \"coq-own-realization.drv\"" >> $@ - -aux/%.coq.aux: %.why %.why_theory Makefile aux - @echo "Auxiliary Coq files for $*" - @rm -f $@.tmp; - @for theory in $$(cat $*.why_theory); do\ - echo 'theory $*.'"$$theory"' meta "realized_theory" "$*.'"$$theory"'", "'"$$theory"'" end' >> $@.tmp;\ - done; - @mv $@.tmp $@ - -aux/%.coq-why3.aux: %.why %.why_theory Makefile aux - @echo "Auxiliary Coq-Why3 files for $*" - @rm -f $@.tmp; - @for theory in $$(cat $*.why_theory); do\ - NAMELOWER=`ocaml lower.ml "$$theory"`; \ - echo 'theory '"$$NAMELOWER"'.'"$$theory"' meta "realized_theory" "'"$$NAMELOWER"'.'"$$theory"'", "'"$$theory"'" end' >> $@.tmp;\ - done; - @mv $@.tmp $@ - -#-- Why3 Import - -WHY3_STDLIB_REALIZED= \ - bool.Bool \ - map.Map map.Const \ - int.Int int.Abs int.MinMax int.ComputerDivision \ - real.FromInt real.Real real.RealInfix real.Abs real.MinMax \ - real.Square real.ExpLog real.PowerReal \ - real.Trigonometry - -WHY3_STDLIB_USED= \ - $(WHY3_STDLIB_REALIZED) \ - real.Truncate real.Hyperbolic real.Polar - -.PHONY: import_why3_coq - -import_why3_coq: stamp/why3.$(WHY3_VERSION).stamp - @echo "Why-3 Coq Sources up-to-date" - -stamp/why3.$(WHY3_VERSION).stamp: stamp/REALIZATION_DIR.stamp Makefile - @echo "Importing Why-3 Coq Sources" - @rm -fr $(WHY3_SRC) - @opam source $(WHY3_SRC) - @install -m 444 $(WHY3_SRC)/lib/coq/BuiltIn.v $(REALIZATION_DIR)/coqwp/BuiltIn.v - @$(foreach file, $(subst .,/,$(WHY3_STDLIB_REALIZED)), \ - install -m 444 $(WHY3_SRC)/lib/coq/$(file).v $(REALIZATION_DIR)/coqwp/$(file).v;) - @rm -fr $(WHY3_SRC) - @touch $@ - -# -------------------------------------------------------------------------- -# --- Alt-Ergo Realization -# -------------------------------------------------------------------------- - -stamp/altergorealization.stamp:\ - $(addprefix stamp/, \ - $(addsuffix .altergo.stamp, $(WHY3_FILE)) \ - $(addsuffix .altergo.stdlib.stamp, $(WHY3_STDLIB_USED))) - @touch $@ - -stamp/%.altergo.stamp: %.why %.why_theory Makefile $(WHY3_LIB) stamp/realizationtools.stamp - @echo "Realizing Alt-Ergo Library for $*" - @$(foreach theory, $(shell cat $*.why_theory),\ - $(WHY3_REALIZE) -D alt_ergo-realize.drv -T $*.$(theory) -o $(REALIZATION_DIR)/ergo 2> logs/$(theory).altergo.err.tmp;\ - sed -e 's:^File ".*/wp/share/:File "WP-SHARE/:' logs/$(theory).altergo.err.tmp > logs/$(theory).altergo.err;\ - rm -f logs/$(theory).altergo.err.tmp;) - @touch $@ - - -stamp/%.altergo.stdlib.stamp: Makefile $(WHY3_LIB) stamp/realizationtools.stamp - @echo "Realizing Alt-Ergo Std-Library for $*" - @mkdir -p tmp; rm -rf tmp/$*; mkdir tmp/$* - @$(WHY3_REALIZE) -D alt_ergo-realize.drv -T $* -o tmp/$* 2> logs/$*.altergo.stdlib.err.tmp - @sed -e 's:^File ".*/wp/share/:File "WP-SHARE/:' logs/$*.altergo.stdlib.err.tmp > logs/$*.altergo.stdlib.err - @rm -f logs/$*altergo.stdlib.err.tmp - @mv tmp/$*/$(subst .,,$(suffix $*)).mlw $(REALIZATION_DIR)/ergo/$*.mlw - @rm -rf tmp/$* - @touch $@ - - -alt_ergo-realize.drv: $(addprefix aux/, $(addsuffix .altergo.aux, $(WHY3_FILE)) $(addsuffix .altergo.stdlib.aux, $(WHY3_STDLIB_USED))) - @echo "Generating Alt-Ergo driver" - @echo "(* generated automatically at compilation time *)" > $@ - @echo 'theory BuiltIn meta "realized_theory" "BuiltIn", "BuiltIn_" end' >> $@ - @echo 'theory BuiltIn meta "realized_theory" "Bool", "Bool_" end' >> $@ - @cat $^ >> $@ - @echo "printer \"alt-ergo-realize\"" >> $@ - @echo "filename \"%t.mlw\"" >> $@ - @echo "transformation \"remove_for_altergo\"" >> $@ - @echo "transformation \"inline_in\"" >> $@ - @echo "transformation \"def_into_axiom\"" >> $@ - @echo >> $@ - @echo "import \"alt_ergo_why3_stdlib.drv\"" >> $@ - @echo >> $@ - @echo "(* From why3 alt_ergo.drv except import *)" >> $@ - @cat $(WHY3_ALTERGO_DRIVER).drv | grep -v -e "^import" >> $@ - @echo "(* From why3 alt_ergo_common.drv except printer *)" >> $@ - @cat $(WHY3_ALTERGO_DRIVER)_common.drv | grep -v -e "^printer" -e "^filename" >> $@ - -#We put the realized theory meta un BuiltIn so that it always appears -aux/%.altergo.aux: %.why %.why_theory Makefile $(WHY3_LIB) aux - @echo "Auxiliary Alt-Ergo files for $*" - @rm -f $@.tmp - @$(foreach theory, $(shell cat $*.why_theory),\ - echo 'theory $*.$(theory) meta "realized_theory" "$*.$(theory)", "$(subst .,_,$(theory))_" end' >> $@.tmp;) - @mv $@.tmp $@ - -aux/%.altergo.stdlib.aux: Makefile $(WHY3_LIB) aux - @echo "Auxiliary Alt-Ergo stdlib for $*" - @echo 'theory $* meta "realized_theory" "$*", "$(subst .,_,$*)_" end' > $@; - -%.why_theory: %.why - @echo "Why Theory $<" - @grep -e "^theory" $< | sed -e "s/^theory[ ]*//" > $@ - -#why3 realization -why3.drv: $(addprefix aux/, $(addsuffix .why3.aux, $(WHY3_FILE))) - @echo "Generating Why-3 driver" - @echo "(* generated automatically at compilation time *)" | cat - $^ > $@ - -aux/%.why3.aux: %.why %.why_theory Makefile aux - @echo "Auxiliary Why-3 files for $*" - @rm -f $@.tmp; - @for theory in $$(cat $*.why_theory); do \ - NAMEUPPER=`ocaml upper.ml "$*"`; \ - echo 'theory $*.'"$$theory"' meta "realized_theory" "$*.'"$$theory"'", "'"$$NAMEUPPER"'.'"$$theory"'" end' >> $@.tmp;\ - done; - @mv $@.tmp $@ - -stamp/why3realization.stamp:\ - $(addprefix stamp/, $(addsuffix .why3.stamp, $(WHY3_FILE))) - @touch $@ - - -stamp/%.why3.stamp: %.why %.why_theory Makefile $(WHY3_LIB) stamp/realizationtools.stamp why3-realize.drv why3.drv - @echo "Realizing Why-3 Theory $*" - @for theory in $$(cat $*.why_theory); do \ - $(WHY3_REALIZE) -D why3-realize.drv -T $*.$$theory -o $(REALIZATION_DIR)/why3 2> logs/$$theory.why3.err.tmp;\ - why3 prove --type-only -L $(REALIZATION_DIR)/why3 $(REALIZATION_DIR)/why3/$$theory.why 2> logs/$$theory.why3.check.err.tmp;\ - sed -e 's:^File ".*/wp/share/:File "WP-SHARE/:' logs/$$theory.why3.err.tmp > logs/$$theory.why3.err;\ - sed -e 's:^File ".*/wp/share/:File "WP-SHARE/:' logs/$$theory.why3.check.err.tmp > logs/$$theory.why3.check.err;\ - rm -f logs/$$theory.why3.err.tmp logs/$$theory.why3.check.err.tmp;\ - done; - @touch $@ - - -COQLIBS:= Qed Qedlib Bits Zbits Cint Cbits Memory Cmath Cfloat Vlist ArcTrigo ExpLog -COQDEP:= $(addsuffix .coqdep, $(COQLIBS)) -COQDEP_STAMPS:= $(addprefix stamp/, $(COQDEP)) -COQVO:= $(addsuffix .vo, $(COQLIBS)) - -COQINCLUDE= -R $(WHY3_LIB) Why3 - -%.vo: %.v - coqc -w none $(COQINCLUDE) $< - -stamp/%.coqdep: %.v stamp - @coqdep $(COQINCLUDE) $< > $@ 2>/dev/null - @(cmp $@ $(subst stamp/,,$@) 2>/dev/null) \ - || (cp $@ $(subst stamp/,,$@) \ - && echo "Updating $(subst stamp/,,$@)") - -stamp/coqdep.stamp: Makefile $(COQDEP_STAMPS) - @echo "Coq dependencies updated" - @touch $@ - -# a non-empty rule is needed for the first make -%.coqdep: stamp/%.coqdep - @true - -sinclude $(COQDEP) - -stamp/%.coqdep: stamp - -stamp/compile.stamp: Makefile stamp/coqdep.stamp $(COQVO) - @echo "Coq compilation done" - @touch $@ - -.PHONY: compile -compile: stamp/compile.stamp - -.PHONY: clean -clean: - @echo "Cleaning" - @rm -f $(COQVO) - @rm -f filter_axioms.cm* filter_axioms.o - @rm -f alt_ergo_realize.cm* alt_ergo_realize.o - @rm -f why3printer_realize.cm* why3printer_realize.o - @rm -f *.stamp stamp/* - @rm -f *.aux aux/* - @rm -f *.glob *.coqdep - -.PHONY: %.coqide -%.coqide: %.v - coqide $(COQINCLUDE) $< - -# -------------------------------------------------------------------------- -# --- Coq Documentation --- -# -------------------------------------------------------------------------- - -COQDOC=../doc -COQHTML=../html -COQSRC= $(addsuffix .v,$(COQLIBS)) -COQGLOB= $(addsuffix .glob,$(COQLIBS)) - - - -html: compile $(COQDOC)/coq2html - @mkdir -p $(COQHTML) - @rm -fr $(COQHTML)/* - @cp $(COQDOC)/frama-c.png $(COQHTML)/ - @cp $(COQDOC)/coq2html.css $(COQDOC)/coq2html.js $(COQDOC)/index.png $(COQHTML)/ - @cat $(COQDOC)/head.html >> $(COQHTML)/index.html - @for a in $(COQLIBS) ; \ - do echo " <li> Module <a href=\"$$a.html\">$$a</a></li>" >> $(COQHTML)/index.html ; \ - done ; - @cat $(COQDOC)/foot.html >> $(COQHTML)/index.html - $(COQDOC)/coq2html -o $(COQHTML)/%.html $(COQGLOB) $(COQSRC) - zip ../wpcoqdoc.zip $(COQHTML)/* - -latex: $(COQDOC)/coq2latex - @mkdir -p latex - @rm -fr latex/* - coqdoc --latex -d latex --body-only -l $(COQSRC) - -$(COQDOC)/coq2html: $(COQDOC)/coq2html.ml - ocamlfind ocamlopt -o $@ str.cmxa $< - -$(COQDOC)/coq2html.ml: $(COQDOC)/coq2html.mll - ocamllex $< - -$(COQDOC)/coq2latex: $(COQDOC)/coq2latex.ml - ocamlfind ocamlopt -o $@ str.cmxa $< - -$(COQDOC)/coq2latex.ml: $(COQDOC)/coq2latex.mll - ocamllex $< - -##### Generation of configuration file for why3 ##### - -local_why3.conf: Makefile - @echo Generation of a local extra-conf for why3 - @printf "[prover_modifiers]\n" > $@ - @printf "name=\"Coq\"\n" >> $@ - @printf "option=\"-R $(PWD)/WP FramaCwp\"\n" >> $@ - @printf "driver=\"$(PWD)/coq.drv\"\n" >> $@ - @printf "\n" >> $@ - @printf "[editor_modifiers coqide]\n" >> $@ - @printf "option=\"-R $(PWD)/WP FramaCwp\"\n" >> $@ - @printf "\n" >> $@ - @printf "[editor_modifiers proofgeneral-coq]\n" >> $@ - @printf "option=\"--eval \\\\\"(setq coq-load-path (cons '(\\\\\\\\\\\\\"$(PWD)\\\\\\\\\\\\\" \\\\\\\\\\\\\"FramaCwp\\\\\\\\\\\\\") coq-load-path))\\\\\"\"\n" >> $@ - -##### Test local configuration ##### - -TEST=import -TEST_TARGET:=$(addprefix tests/, $(addsuffix .run, $(TEST))) - -tests: $(TEST_TARGET) - -tests/%.run: tests/%.why local_why3.conf Makefile - why3 replay --extra-config local_why3.conf --extra-config realization.conf $< - -tests/%.why3ide: tests/%.why local_why3.conf - why3 ide --extra-config local_why3.conf --extra-config realization.conf $< diff --git a/src/plugins/wp/share/src/Memory.v b/src/plugins/wp/share/src/Memory.v deleted file mode 100644 index d38d1fba527..00000000000 --- a/src/plugins/wp/share/src/Memory.v +++ /dev/null @@ -1,348 +0,0 @@ -(* This file is generated by Why3's Coq-realize driver *) -(* Beware! Only edit allowed sections below *) -Require Import BuiltIn. -Require BuiltIn. -Require bool.Bool. -Require int.Int. -Require map.Map. - -Require Import ZArith. -Require Import Qedlib. - -(* Why3 assumption *) -Inductive addr := - | mk_addr : Z -> Z -> addr. -Axiom addr_WhyType : WhyType addr. -Existing Instance addr_WhyType. - -(* Why3 assumption *) -Definition offset (v:addr): Z := match v with - | (mk_addr x x1) => x1 - end. - -(* Why3 assumption *) -Definition base (v:addr): Z := match v with - | (mk_addr x x1) => x - end. - -(* Why3 goal *) -Definition addr_le: addr -> addr -> Prop. - exact (fun (p q : addr) => ((base p = base q) /\ (offset p <= offset q)%Z)). -Defined. - -(* Why3 goal *) -Definition addr_lt: addr -> addr -> Prop. - exact (fun (p q : addr) => (base p = base q) /\ (offset p < offset q)%Z). -Defined. - -(* Why3 goal *) -Definition addr_le_bool: addr -> addr -> bool. - exact (fun (p q : addr) => - andb (Zeq_bool (base p) (base q)) (Zle_bool (offset p) (offset q))). -Defined. - -(* Why3 goal *) -Definition addr_lt_bool: addr -> addr -> bool. - exact (fun (p q : addr) => - andb (Zeq_bool (base p) (base q)) (Zlt_bool (offset p) (offset q))). -Defined. - -(* Why3 goal *) -Lemma addr_le_def : forall (p:addr) (q:addr), ((base p) = (base q)) -> - ((addr_le p q) <-> ((offset p) <= (offset q))%Z). -Proof. - unfold addr_le. - intuition. -Qed. - -(* Why3 goal *) -Lemma addr_lt_def : forall (p:addr) (q:addr), ((base p) = (base q)) -> - ((addr_lt p q) <-> ((offset p) < (offset q))%Z). -Proof. - unfold addr_lt. - intuition. -Qed. - -(* Why3 goal *) -Lemma addr_le_bool_def : forall (p:addr) (q:addr), (addr_le p q) <-> - ((addr_le_bool p q) = true). -Proof. - unfold addr_le. unfold addr_le_bool. - intros. split; intro H. - destruct H as [H0 H1]. - rewrite Zeq_is_eq_bool in H0. - apply Zle_imp_le_bool in H1. - rewrite H0. rewrite H1. - compute;reflexivity. - symmetry in H. - apply Bool.andb_true_eq in H. - destruct H as [H1 H2]. - split;[apply Zeq_bool_eq|apply Zle_bool_imp_le];symmetry; assumption. -Qed. - -(* Why3 goal *) -Lemma addr_lt_bool_def : forall (p:addr) (q:addr), (addr_lt p q) <-> - ((addr_lt_bool p q) = true). -Proof. - unfold addr_lt. unfold addr_lt_bool. - intros. split; intro H. - destruct H as [H0 H1]. - rewrite Zeq_is_eq_bool in H0. - rewrite Zlt_is_lt_bool in H1. - rewrite H0. rewrite H1. - compute;reflexivity. - symmetry in H. - apply Bool.andb_true_eq in H. - destruct H as [H1 H2]. - split;[apply Zeq_bool_eq|rewrite Zlt_is_lt_bool];symmetry; assumption. -Qed. - -(* Why3 assumption *) -Definition null: addr := (mk_addr 0%Z 0%Z). - -(* Why3 assumption *) -Definition global (b:Z): addr := (mk_addr b 0%Z). - -(* Why3 assumption *) -Definition shift (p:addr) (k:Z): addr := (mk_addr (base p) - ((offset p) + k)%Z). - -(* Why3 assumption *) -Definition included (p:addr) (a:Z) (q:addr) (b:Z): Prop := (0%Z < a)%Z -> - ((0%Z <= b)%Z /\ (((base p) = (base q)) /\ (((offset q) <= (offset p))%Z /\ - (((offset p) + a)%Z <= ((offset q) + b)%Z)%Z))). - -(* Why3 assumption *) -Definition separated (p:addr) (a:Z) (q:addr) (b:Z): Prop := (a <= 0%Z)%Z \/ - ((b <= 0%Z)%Z \/ ((~ ((base p) = (base q))) \/ - ((((offset q) + b)%Z <= (offset p))%Z \/ - (((offset p) + a)%Z <= (offset q))%Z))). - -(* Why3 assumption *) -Definition eqmem {a:Type} {a_WT:WhyType a} (m1:(map.Map.map addr a)) - (m2:(map.Map.map addr a)) (p:addr) (a1:Z): Prop := forall (q:addr), - (included q 1%Z p a1) -> ((map.Map.get m1 q) = (map.Map.get m2 q)). - -(* Why3 goal *) -Definition havoc: forall {a:Type} {a_WT:WhyType a}, (map.Map.map addr a) -> - (map.Map.map addr a) -> addr -> Z -> (map.Map.map addr a). -Admitted. - -Definition fhavoc {A : Type} - (m : farray addr A) - (w : farray addr A) (p:addr) (n:Z) : (farray addr A) := - {| whytype1 := whytype1 m; - whytype2 := whytype2 m; - access := @havoc _ (whytype2 m) m w p n |}. - -(* Why3 assumption *) -Definition valid_rw (m:(map.Map.map Z Z)) (p:addr) (n:Z): Prop := - (0%Z < n)%Z -> ((0%Z < (base p))%Z /\ ((0%Z <= (offset p))%Z /\ - (((offset p) + n)%Z <= (map.Map.get m (base p)))%Z)). - -(* Why3 assumption *) -Definition valid_rd (m:(map.Map.map Z Z)) (p:addr) (n:Z): Prop := - (0%Z < n)%Z -> ((~ (0%Z = (base p))) /\ ((0%Z <= (offset p))%Z /\ - (((offset p) + n)%Z <= (map.Map.get m (base p)))%Z)). - -(* Why3 assumption *) -Definition invalid (m:(map.Map.map Z Z)) (p:addr) (n:Z): Prop := - (0%Z < n)%Z -> (((map.Map.get m (base p)) <= (offset p))%Z \/ - (((offset p) + n)%Z <= 0%Z)%Z). - -(* Why3 goal *) -Lemma valid_rw_rd : forall (m:(map.Map.map Z Z)), forall (p:addr), - forall (n:Z), (valid_rw m p n) -> (valid_rd m p n). -Proof. - intros m p n. - unfold valid_rw. unfold valid_rd. - intuition (auto with zarith). -Qed. - -(* Why3 goal *) -Lemma valid_string : forall (m:(map.Map.map Z Z)), forall (p:addr), - ((base p) < 0%Z)%Z -> (((0%Z <= (offset p))%Z /\ - ((offset p) < (map.Map.get m (base p)))%Z) -> ((valid_rd m p 1%Z) /\ - ~ (valid_rw m p 1%Z))). -Proof. - intros m p. - unfold valid_rd. unfold valid_rw. - intuition (auto with zarith). -Qed. - -Lemma separated_neq : forall p a q b p' q', - separated p a q b -> - included p' 1 p a -> - included q' 1 q b -> - p' <> q'. -Proof. - intros p a q b p' q' SEP InP InQ EQ. - unfold separated in SEP. - unfold included in InP,InQ. - case_lt 0%Z a. - case_lt 0%Z b. - intros BPOS APOS. - generalize InP ; clear InP. - intro H ; elim H ; clear H ; auto with zarith. - intro H. clear H. - intro H ; elim H ; clear H. - intro BaseP. - intro H ; elim H ; clear H. - intros InP1 InP2. - generalize InQ ; clear InQ. - intro H ; elim H ; clear H ; auto with zarith. - intro H. clear H. - intro H ; elim H ; clear H. - intro BaseQ. - intro H ; elim H ; clear H. - intros InQ1 InQ2. - generalize SEP ; clear SEP. - intro H ; elim H ; clear H ; auto with zarith. - intro H ; elim H ; clear H ; auto with zarith. - intro H ; elim H ; clear H ; auto with zarith. - rewrite <- EQ in BaseQ. - rewrite BaseP in BaseQ. - contradiction. - rewrite <- EQ in InQ1,InQ2. - omega. -Qed. - -(* Why3 goal *) -Lemma separated_1 : forall (p:addr) (q:addr), forall (a:Z) (b:Z) (i:Z) (j:Z), - (separated p a q b) -> ((((offset p) <= i)%Z /\ - (i < ((offset p) + a)%Z)%Z) -> ((((offset q) <= j)%Z /\ - (j < ((offset q) + b)%Z)%Z) -> ~ ((mk_addr (base p) i) = (mk_addr (base q) - j)))). -Admitted. - -(* Why3 goal *) -Definition region: Z -> Z. -Admitted. - -(* Why3 goal *) -Definition linked: (map.Map.map Z Z) -> Prop. -Admitted. - -(* Why3 goal *) -Definition sconst: (map.Map.map addr Z) -> Prop. -Admitted. - -(* Why3 assumption *) -Definition framed (m:(map.Map.map addr addr)): Prop := forall (p:addr), - ((region (base (map.Map.get m p))) <= 0%Z)%Z. - -(* Why3 goal *) -Lemma separated_included : forall (p:addr) (q:addr), forall (a:Z) (b:Z), - (0%Z < a)%Z -> ((0%Z < b)%Z -> ((separated p a q b) -> ~ (included p a q - b))). -Proof. -intros p q a b h1 h2 h3. - unfold separated. unfold included. unfold not. - intuition. -Admitted. - -(* -Lemma separated_region : forall p a q b, - region (base p) <> region (base q) -> separated p a q b. -Proof. - intros p a q b RDIFF. - unfold separated. - right. right. left. - intuition. - apply RDIFF. rewrite H. auto. -Qed. -*) - -(* Why3 goal *) -Lemma included_trans : forall (p:addr) (q:addr) (r:addr), forall (a:Z) (b:Z) - (c:Z), (included p a q b) -> ((included q b r c) -> (included p a r c)). -Proof. - intros p a q b r c. - unfold included. intuition. -Qed. - -(* Why3 goal *) -Lemma separated_trans : forall (p:addr) (q:addr) (r:addr), forall (a:Z) (b:Z) - (c:Z), (included p a q b) -> ((separated q b r c) -> (separated p a r c)). -Proof. - intros p a q b r c. -Admitted. - -(* Why3 goal *) -Lemma separated_sym : forall (p:addr) (q:addr), forall (a:Z) (b:Z), - (separated p a q b) <-> (separated q b p a). -Proof. - intros p q a b. - unfold separated. intuition. -Qed. - -(* Why3 goal *) -Lemma eqmem_included : forall {a:Type} {a_WT:WhyType a}, - forall (m1:(map.Map.map addr a)) (m2:(map.Map.map addr a)), forall (p:addr) - (q:addr), forall (a1:Z) (b:Z), (included p a1 q b) -> ((eqmem m1 m2 q b) -> - (eqmem m1 m2 p a1)). -Proof. - intros a a_WT m1 m2 p q a1 b h1 h2. -Admitted. - -(* Why3 goal *) -Lemma eqmem_sym : forall {a:Type} {a_WT:WhyType a}, forall (m1:(map.Map.map - addr a)) (m2:(map.Map.map addr a)), forall (p:addr), forall (a1:Z), (eqmem - m1 m2 p a1) -> (eqmem m2 m1 p a1). -Proof. - intros A m1 m2 p a. unfold eqmem. -Admitted. - -(* Why3 goal *) -Lemma havoc_access : forall {a:Type} {a_WT:WhyType a}, - forall (m0:(map.Map.map addr a)) (m1:(map.Map.map addr a)), forall (q:addr) - (p:addr), forall (a1:Z), ((separated q 1%Z p a1) -> ((map.Map.get (havoc m0 - m1 p a1) q) = (map.Map.get m1 q))) /\ ((~ (separated q 1%Z p a1)) -> - ((map.Map.get (havoc m0 m1 p a1) q) = (map.Map.get m0 q))). -Proof. - intros a a_WT m0 m1 q p a1. -Admitted. - -(* Why3 goal *) -Definition int_of_addr: addr -> Z. -Admitted. - -(* Why3 goal *) -Definition addr_of_int: Z -> addr. -Admitted. - -(* Why3 goal *) -Definition base_offset: Z -> Z. -Admitted. - -(* Why3 goal *) -Definition base_index: Z -> Z. -Admitted. - -(* Why3 goal *) -Lemma int_of_addr_bijection : forall (a:Z), - ((int_of_addr (addr_of_int a)) = a). -Admitted. - -(* Why3 goal *) -Lemma addr_of_int_bijection : forall (p:addr), - ((addr_of_int (int_of_addr p)) = p). -Admitted. - -(* Why3 goal *) -Lemma addr_of_null : ((int_of_addr null) = 0%Z). -Admitted. - -(* Why3 goal *) -Lemma base_offset_zero : ((base_offset 0%Z) = 0%Z). -Admitted. - -(* Why3 goal *) -Lemma base_offset_inj : forall (i:Z), ((base_index (base_offset i)) = i). -Admitted. - -(* Why3 goal *) -Lemma base_offset_monotonic : forall (i:Z) (j:Z), (i < j)%Z -> - ((base_offset i) < (base_offset j))%Z. -Admitted. - diff --git a/src/plugins/wp/share/src/Qed.v b/src/plugins/wp/share/src/Qed.v deleted file mode 100644 index 4f747b1ef4c..00000000000 --- a/src/plugins/wp/share/src/Qed.v +++ /dev/null @@ -1,225 +0,0 @@ -(* This file is generated by Why3's Coq-realize driver *) -(* Beware! Only edit allowed sections below *) -Require Import BuiltIn. -Require BuiltIn. -Require bool.Bool. -Require int.Int. -Require int.Abs. -Require int.ComputerDivision. -Require real.Real. -Require real.RealInfix. -Require real.FromInt. - -(* Why3 goal *) -Definition match_bool: forall {a:Type} {a_WT:WhyType a}, bool -> a -> a -> a. -exact (fun _ _ b x y => if b then x else y). -Defined. - -(* Why3 goal *) -Lemma match_bool1 : forall {a:Type} {a_WT:WhyType a}, forall (p:bool) (x:a) - (y:a), ((p = true) /\ ((match_bool p x y) = x)) \/ ((p = false) /\ - ((match_bool p x y) = y)). -Proof. - intros a a_WT p x y. - destruct p; intuition. -Qed. - -(* Why3 goal *) -Definition eqb: forall {a:Type} {a_WT:WhyType a}, a -> a -> bool. -exact (fun a a_WT x y => if why_decidable_eq x y then true else false). -Defined. - -(* Why3 goal *) -Lemma eqb1 : forall {a:Type} {a_WT:WhyType a}, forall (x:a) (y:a), ((eqb x - y) = true) <-> (x = y). -Proof. - intros a a_WT x y. - destruct a_WT. - compute;destruct (why_decidable_eq x y);intuition discriminate. -Qed. - -(* Why3 goal *) -Lemma eqb_false : forall {a:Type} {a_WT:WhyType a}, forall (x:a) (y:a), - ((eqb x y) = false) <-> ~ (x = y). -Proof. - intros a a_WT x y. - destruct a_WT. - compute;destruct (why_decidable_eq x y);intuition discriminate. -Qed. - -(* Why3 goal *) -Definition neqb: forall {a:Type} {a_WT:WhyType a}, a -> a -> bool. -exact (fun a a_WT x y => if why_decidable_eq x y then false else true). -Defined. - -(* Why3 goal *) -Lemma neqb1 : forall {a:Type} {a_WT:WhyType a}, forall (x:a) (y:a), ((neqb x - y) = true) <-> ~ (x = y). -Proof. - intros a a_WT x y. - destruct a_WT. - compute;destruct (why_decidable_eq x y);intuition discriminate. -Qed. - -(* Why3 goal *) -Definition zlt: Z -> Z -> bool. -exact(Zlt_bool). -Defined. - -(* Why3 goal *) -Definition zleq: Z -> Z -> bool. -exact(Zle_bool). -Defined. - -(* Why3 goal *) -Lemma zlt1 : forall (x:Z) (y:Z), ((zlt x y) = true) <-> (x < y)%Z. -Proof. - intros x y. - assert (T:= Zlt_is_lt_bool x y). - tauto. -Qed. - -(* Why3 goal *) -Lemma zleq1 : forall (x:Z) (y:Z), ((zleq x y) = true) <-> (x <= y)%Z. -Proof. - intros x y. - assert (T:= Zle_is_le_bool x y). - tauto. -Qed. - -(* Why3 goal *) -Definition rlt: R -> R -> bool. -exact (fun x y => if Rlt_dec x y then true else false). -Defined. - -(* Why3 goal *) -Definition rleq: R -> R -> bool. -exact (fun x y => if Rle_dec x y then true else false). -Defined. - -(* Why3 goal *) -Lemma rlt1 : forall (x:R) (y:R), ((rlt x y) = true) <-> (x < y)%R. -Proof. - intros x y. - compute;destruct (Rlt_dec x y); intuition discriminate. -Qed. - -(* Why3 goal *) -Lemma rleq1 : forall (x:R) (y:R), ((rleq x y) = true) <-> (x <= y)%R. -Proof. - intros x y. - compute;destruct (Rle_dec x y);intuition;discriminate. -Qed. - -(* Why3 assumption *) -Definition real_of_int (x:Z): R := (BuiltIn.IZR x). - -(* Why3 comment *) -(* pdiv is replaced with (ZArith.BinInt.Z.quot x x1) by the coq driver *) - -(* Why3 comment *) -(* pmod is replaced with (ZArith.BinInt.Z.rem x x1) by the coq driver *) - -(* Why3 goal *) -Lemma c_euclidian : forall (n:Z) (d:Z), (~ (d = 0%Z)) -> - (n = (((ZArith.BinInt.Z.quot n d) * d)%Z + (ZArith.BinInt.Z.rem n d))%Z). -Proof. - intros n d. - intros H. - rewrite Int.Comm1. - exact (ComputerDivision.Div_mod n d H). -Qed. - -Lemma lt_is_not_eqb1: forall x y, (x < y -> Z.eqb x y = false)%Z. -Proof. - intros. - rewrite Z.eqb_compare. - rewrite H. - reflexivity. -Qed. - -Lemma lt_is_not_eqb2: forall x y, (y < x -> Z.eqb x y = false)%Z. -Proof. - intros. - rewrite Z.eqb_compare. - rewrite (Z.lt_gt _ _ H). - reflexivity. -Qed. - - -(* Why3 goal *) -Lemma cdiv_cases : forall (n:Z) (d:Z), ((0%Z <= n)%Z -> ((0%Z < d)%Z -> - ((ZArith.BinInt.Z.quot n d) = (ZArith.BinInt.Z.quot n d)))) /\ - (((n <= 0%Z)%Z -> ((0%Z < d)%Z -> - ((ZArith.BinInt.Z.quot n d) = (-(ZArith.BinInt.Z.quot (-n)%Z d))%Z))) /\ - (((0%Z <= n)%Z -> ((d < 0%Z)%Z -> - ((ZArith.BinInt.Z.quot n d) = (-(ZArith.BinInt.Z.quot n (-d)%Z))%Z))) /\ - ((n <= 0%Z)%Z -> ((d < 0%Z)%Z -> - ((ZArith.BinInt.Z.quot n d) = (ZArith.BinInt.Z.quot (-n)%Z (-d)%Z)))))). -Proof. - intros n d. - rewrite Zquot.Zquot_opp_l. - rewrite Zquot.Zquot_opp_r. - rewrite Zquot.Zquot_opp_l. - rewrite Zquot.Zquot_opp_r. - rewrite Z.opp_involutive. - assert (lem1 := lt_is_not_eqb1 d 0). - assert (lem2 := lt_is_not_eqb2 d 0). - intuition (rewrite H1;reflexivity). -Qed. - -(* Why3 goal *) -Lemma cmod_cases : forall (n:Z) (d:Z), ((0%Z <= n)%Z -> ((0%Z < d)%Z -> - ((ZArith.BinInt.Z.rem n d) = (ZArith.BinInt.Z.rem n d)))) /\ - (((n <= 0%Z)%Z -> ((0%Z < d)%Z -> - ((ZArith.BinInt.Z.rem n d) = (-(ZArith.BinInt.Z.rem (-n)%Z d))%Z))) /\ - (((0%Z <= n)%Z -> ((d < 0%Z)%Z -> - ((ZArith.BinInt.Z.rem n d) = (ZArith.BinInt.Z.rem n (-d)%Z)))) /\ - ((n <= 0%Z)%Z -> ((d < 0%Z)%Z -> - ((ZArith.BinInt.Z.rem n d) = (-(ZArith.BinInt.Z.rem (-n)%Z (-d)%Z))%Z))))). -Proof. - intros n d. - rewrite Zquot.Zrem_opp_l. - rewrite Zquot.Zrem_opp_r. - rewrite Zquot.Zrem_opp_l. - rewrite Zquot.Zrem_opp_r. - rewrite Z.opp_involutive. - assert (lem1 := lt_is_not_eqb1 d 0). - assert (lem2 := lt_is_not_eqb2 d 0). - intuition (rewrite H1;reflexivity). -Qed. - -(* Why3 goal *) -Lemma cmod_remainder : forall (n:Z) (d:Z), ((0%Z <= n)%Z -> ((0%Z < d)%Z -> - ((0%Z <= (ZArith.BinInt.Z.rem n d))%Z /\ - ((ZArith.BinInt.Z.rem n d) < d)%Z))) /\ (((n <= 0%Z)%Z -> ((0%Z < d)%Z -> - (((-d)%Z < (ZArith.BinInt.Z.rem n d))%Z /\ - ((ZArith.BinInt.Z.rem n d) <= 0%Z)%Z))) /\ (((0%Z <= n)%Z -> - ((d < 0%Z)%Z -> ((0%Z <= (ZArith.BinInt.Z.rem n d))%Z /\ - ((ZArith.BinInt.Z.rem n d) < (-d)%Z)%Z))) /\ ((n <= 0%Z)%Z -> - ((d < 0%Z)%Z -> ((d < (ZArith.BinInt.Z.rem n d))%Z /\ - ((ZArith.BinInt.Z.rem n d) <= 0%Z)%Z))))). -Proof. - intros n d. - (split;[|split;[|split]]);intros; - [exact (Zquot.Zrem_lt_pos_pos _ _ H H0)| - exact (Zquot.Zrem_lt_neg_pos _ _ H H0)| - exact (Zquot.Zrem_lt_pos_neg _ _ H H0)| - exact (Zquot.Zrem_lt_neg_neg _ _ H H0)]. -Qed. - -(* Why3 goal *) -Lemma cdiv_neutral : forall (a:Z), ((ZArith.BinInt.Z.quot a 1%Z) = a). -Proof. - intro a. - exact (Z.quot_1_r a). -Qed. - -(* Why3 goal *) -Lemma cdiv_inv : forall (a:Z), (~ (a = 0%Z)) -> - ((ZArith.BinInt.Z.quot a a) = 1%Z). -Proof. - intros a h1. - exact (Z.quot_same a h1). -Qed. - diff --git a/src/plugins/wp/share/src/Qedlib.v b/src/plugins/wp/share/src/Qedlib.v deleted file mode 100644 index 4156a9e3290..00000000000 --- a/src/plugins/wp/share/src/Qedlib.v +++ /dev/null @@ -1,362 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of WP plug-in of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat a l'energie atomique et aux energies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -Require Import Bool. -Require Import ZArith. -Require Import Reals. - -Require BuiltIn. -Require map.Map. - -Open Scope Z_scope. - -Set Implicit Arguments. - -(** ** Tactical *) - -Ltac forward := - repeat (first [ split | intros ]) ; - try discriminate ; - try contradiction ; - try tauto ; - try constructor ; - try (apply False_ind ; omega ; fail) ; - try (apply False_ind ; auto with zarith ; fail) ; - auto with zarith. - -Ltac finish := forward ; fail. - -Tactic Notation "by" tactic(A) := A ; finish. - -(** ** Conditional Property *) - -Inductive branch (A B C : Prop) : Prop := - | Then: A -> B -> branch A B C - | Else: not A -> C -> branch A B C -. - -Definition itep (A B C : Prop) := (A -> B) /\ (~A -> C). - -Lemma ite_then : forall A B C : Prop, itep A B C -> A -> B. -Proof. by (unfold itep). Qed. - -Lemma ite_else : forall A B C : Prop, itep A B C -> ~A -> C. -Proof. by (unfold itep). Qed. - -Lemma ite_both : forall A B C : Prop, itep A B C -> (B \/ C). -Proof. by (unfold itep). Qed. - -Remark contrap: forall P Q : Prop, - (P -> Q) -> ~Q -> ~P. -Proof. intuition. Qed. - -(** ** Booleans *) - -Inductive reflect (P:Prop) : bool -> Prop := - | R_true : P -> reflect P true - | R_false : ~P -> reflect P false. - -Definition boolean {A : Set} - (f : A -> A -> bool) - (p : A -> A -> Prop) : Prop := forall x y, reflect (p x y) (f x y). - -(* - forall x y, (f x y = true <-> p x y) /\ - (f x y = false <-> ~(p x y)). -*) - -Ltac case_leq x y := - generalize (Zle_cases x y) ; induction (Zle_bool x y) ; try omega. - -Ltac case_lt x y := - generalize (Zlt_cases x y) ; induction (Zlt_bool x y) ; try omega. - -Ltac case_eq x y := - generalize (Zeq_bool_if x y) ; induction (Zeq_bool x y) ; try omega. - -Lemma Zneq_cases : forall x y, if Zneq_bool x y then x <> y else x = y. -Proof. - intros x y. - generalize (Zeq_bool_if x y). - unfold Zeq_bool. - unfold Zneq_bool. - induction (x ?= y) ; auto. -Qed. - -Ltac case_neq x y := - generalize (Zneq_cases x y) ; induction (Zneq_bool x y) ; try omega. - -Inductive Zcases (x y : Z) := - | Case_lt : (x < y) -> Zcases x y - | Case_eq : (x = y) -> Zcases x y - | Case_gt : (x > y) -> Zcases x y. - -Program Definition Zcompare x y : Zcases x y. -Proof. - intros. - case_leq x y. - case_lt x y. intros H _. exact (Case_lt H). - intros H1 H2. assert (H : x=y) by omega. exact (Case_eq H). - intro H. exact (Case_gt H). -Qed. - -Theorem Zeq_boolean : boolean Zeq_bool (fun x y => (x=y)). -Proof. - unfold boolean. intros x y. by (case_eq x y). -Qed. - - -Theorem Zneq_boolean : boolean Zneq_bool (fun x y => (x <> y)). -Proof. - unfold boolean. intros x y. by (case_neq x y). -Qed. - -Theorem Zlt_boolean : boolean Zlt_bool Zlt. -Proof. - unfold boolean. intros x y. by (case_lt x y). -Qed. - -Theorem Zle_boolean : boolean Zle_bool Zle. -Proof. - unfold boolean. intros x y. by (case_leq x y). -Qed. - -Parameter Req_bool : R -> R -> bool. -Parameter Rlt_bool : R -> R -> bool. -Parameter Rle_bool : R -> R -> bool. -Parameter Rneq_bool : R -> R -> bool. -Hypothesis Rlt_boolean : boolean Rlt_bool Rlt. -Hypothesis Rle_boolean : boolean Rle_bool Rle. -Hypothesis Req_boolean : boolean Req_bool (fun x y => (x=y)). -Hypothesis Rneq_boolean : boolean Rneq_bool (fun x y => (x<>y)). - -Parameter Aeq_bool : forall A : Set, A -> A -> bool. -Hypothesis Aeq_boolean : forall A : Set, boolean (@Aeq_bool A) (fun x y => x=y). -Definition Aneq_bool {A : Set} (x y : A) := negb (Aeq_bool x y). -Hypothesis Aneq_boolean : forall A : Set, boolean (@Aneq_bool A) (fun x y => x<>y). - -(** ** Integer Induction (after a given rank) *) - -Theorem Z_induction(m : Z)(P : Z -> Prop) : - (forall n, n <= m -> P n ) -> - (forall n, n >= m -> P n -> P (n+1)) -> - (forall n, P n). -Proof. - intros. - induction (Z_le_dec n m) ; auto with zarith. - apply Z.le_ind with (n := m) ; auto with zarith. - unfold Morphisms.Proper. - unfold Morphisms.respectful. - intros. rewrite H1. intuition. - intros. apply H0; auto with zarith. -Qed. - -Theorem Z_induction_rank(m : Z)(P : Z -> Prop) : - P m -> - (forall n, m <= n -> P n -> P (n+1)) -> - (forall n, m <= n -> P n). -Proof. - intros h0 h1 n. - apply Z_induction with (m := m) (n := n). - + intros. - apply Z.le_ind with (n := m) ; auto with zarith. - unfold Morphisms.Proper. - unfold Morphisms.respectful. - intros. rewrite H1. intuition. - + intros. auto with zarith. -Qed. - -(** ** Real Constants *) - -(** signed power *) - -Definition real_base e a n := - match n with - | 0 => a - | Zpos n => (a * pow e (Pos.to_nat n))%R - | Zneg n => (a / pow e (Pos.to_nat n))%R - end. - -(** an integer multiplied by a (signed) power of 10. *) -Definition real_dec := real_base 10%R. - -(** an integer multiplied by a (signed) power of 2. *) -Definition real_hex := real_base 2%R. - -(** ** Arrays *) - -Record farray (A B : Type) := { whytype1 : BuiltIn.WhyType A ; - whytype2 : BuiltIn.WhyType B ; - access :> @Map.map A B }. -Definition array (A : Type) := farray Z A. -Hypothesis extensionality: forall (A B : Type) (f g : A -> B), - (forall x, f x = g x) -> f = g. - -Definition select {A B : Type} - (m : farray A B) (k : A) : B := @Map.get A (whytype1 m) B (whytype2 m) m k. - -Lemma farray_eq : forall A B (m1 m2 : farray A B), - whytype1 m1 = whytype1 m2 -> whytype2 m1 = whytype2 m2 -> - (forall k, select m1 k = select m2 k) -> m1 = m2. -Proof. - intros A B m1 m2. - destruct m1. destruct m2. simpl. - intros H1 H2; rewrite H1; rewrite H2 ; clear H1 H2. - destruct access0. destruct access1. compute. - intro K. - rewrite (extensionality b b0 K). - reflexivity. -Qed. - -Definition update {A B : Type} - (m : farray A B) (k : A) (v : B) : (farray A B) := - {| whytype1 := whytype1 m; whytype2 := whytype2 m; access := @Map.set A (whytype1 m) B (whytype2 m) m k v|}. - -Notation " a .[ k ] " := (select a k) (at level 60). -Notation " a .[ k <- v ] " := (update a k v) (at level 60). - -Lemma access_update : - forall (A B : Type) (m : farray A B) k v, - m.[k <- v].[k] = v. -Proof. - intros. - apply Map.Select_eq. - reflexivity. -Qed. - -Lemma access_update_neq : - forall (A B : Type) (m : farray A B) i j v, - i <> j -> m.[ i <- v ].[j] = m.[j]. -Proof. - intros. - apply Map.Select_neq. - assumption. -Qed. - -(** ** Division on Z *) - -Definition Cdiv (n d : Z) : Z := - match n , d with - | 0 , _ | _ , 0 => 0 - | Zpos a , Zpos b - | Zneg a , Zneg b => (Zpos a/Zpos b) - | Zpos a , Zneg b - | Zneg a , Zpos b => (-(Zpos a/Zpos b)) - end. - -Definition Cmod (n d : Z) : Z := - match n , d with - | 0 , _ | _ , 0 => 0 - | Zpos a , Zpos b - | Zpos a , Zneg b => ( (Zpos a) mod (Zpos b) ) - | Zneg a , Zpos b - | Zneg a , Zneg b => (-( (Zpos a) mod (Zpos b) )) - end. - -Lemma Cdiv_cases : forall n d, - ((n >= 0) -> (d > 0) -> Cdiv n d = n/d) /\ - ((n <= 0) -> (d > 0) -> Cdiv n d = -((-n)/d)) /\ - ((n >= 0) -> (d < 0) -> Cdiv n d = -(n/(-d))) /\ - ((n <= 0) -> (d < 0) -> Cdiv n d = (-n)/(-d)). -Proof. - intros. - destruct n as [|a|a] ; - destruct d as [|b|b] ; - intuition ; - by auto with zarith. -Qed. - -Lemma Cmod_cases : forall n d, - ((n >= 0) -> (d > 0) -> Cmod n d = n mod d) /\ - ((n <= 0) -> (d > 0) -> Cmod n d = -((-n) mod d)) /\ - ((n >= 0) -> (d < 0) -> Cmod n d = (n mod (-d))) /\ - ((n <= 0) -> (d < 0) -> Cmod n d = -((-n) mod (-d))). -Proof. - intros. - destruct n as [|a|a] ; - destruct d as [|b|b] ; - intuition ; - by auto with zarith. -Qed. - -Theorem Cdiv_enclidian : - forall (n d : Z), - d <> 0 -> - let q := Cdiv n d in let r := Cmod n d in - (q * d + r = n). -Proof. - intros n d NEQ q r. - assert (OPP: forall p, (- (Zneg p) = Zpos p)) by auto with zarith. - assert (NEG: forall p, (Zneg p = - (Zpos p))) by auto with zarith. - destruct n as [|a|a] ; - destruct d as [|b|b] ; auto with zarith ; - unfold Cdiv in q ; unfold Cmod in r ; - unfold q ; unfold r ; - repeat rewrite OPP ; repeat rewrite NEG ; - rewrite (Zmod_eq_full (Zpos a) (Zpos b)) ; try discriminate ; - try ring. -Qed. - -Lemma Cmod_less : forall n d, - ((n >= 0) -> (d > 0) -> 0 <= Cmod n d < d) /\ - ((n <= 0) -> (d > 0) -> -d < Cmod n d <= 0) /\ - ((n >= 0) -> (d < 0) -> 0 <= Cmod n d < -d) /\ - ((n <= 0) -> (d < 0) -> d < Cmod n d <= 0). -Proof. - intros. - destruct n as [|a|a] ; - destruct d as [|b|b] ; - intuition ; simpl ; forward ; - generalize (Z_mod_lt (Zpos a) (Zpos b) (Zgt_pos_0 b)) ; - repeat (replace (Zneg b) with (- Zpos b) by auto with zarith) ; - intuition (auto with zarith). -Qed. - -Lemma Zdiv_less : - forall (n d : Z), (n > 0) -> (d > 0) -> (d * (n/d) <= n). -Proof. - intros n d Npos Dpos. - generalize (Zmod_eq n d). - pose (x := (n/d)). - fold x. intro H. generalize (H Dpos). clear H. - pose (r := (n mod d)). - fold r. intro H. - generalize (Z_mod_lt n d). - intro R. generalize (R Dpos). clear R. fold r. - replace (d*x) with (x*d) by ring. - omega. -Qed. - -(* -------------------------------------------------------------------------- *) -(* --- Missing Definitions --- *) -(* -------------------------------------------------------------------------- *) - -Variable truncate : R -> Z. -Variable ceil : R -> Z. -Variable floor : R -> Z. -Variable sinh : R -> R. -Variable cosh : R -> R. -Variable tanh : R -> R. -Variable atan2 : R -> R -> R. -Variable hypot : R -> R -> R. - -(* -------------------------------------------------------------------------- *) diff --git a/src/plugins/wp/share/src/Square.v b/src/plugins/wp/share/src/Square.v deleted file mode 100644 index 2a94c646736..00000000000 --- a/src/plugins/wp/share/src/Square.v +++ /dev/null @@ -1,38 +0,0 @@ -(* This file is generated by Why3's Coq-realize driver *) -(* Beware! Only edit allowed sections below *) -Require Import BuiltIn. -Require Reals.R_sqrt. -Require BuiltIn. -Require real.Real. -Require real.RealInfix. -Require real.Square. - -(* Why3 goal *) -Lemma sqrt_lin1 : forall (x:R), (1%R < x)%R -> ((Reals.R_sqrt.sqrt x) < x)%R. -Proof. - intros x h1. - refine (Reals.R_sqrt.sqrt_less _ _ h1). - apply (Rle_trans 0 1 x Rle_0_1)%R. - exact (Rlt_le _ _ h1). -Qed. - -(* Why3 goal *) -Lemma sqrt_lin0 : forall (x:R), ((0%R < x)%R /\ (x < 1%R)%R) -> - (x < (Reals.R_sqrt.sqrt x))%R. -Proof. - intros x (h1,h2). - exact (Reals.R_sqrt.sqrt_more x h1 h2). -Qed. - -(* Why3 goal *) -Lemma sqrt_0 : ((Reals.R_sqrt.sqrt 0%R) = 0%R). -Proof. - exact Reals.R_sqrt.sqrt_0. -Qed. - -(* Why3 goal *) -Lemma sqrt_1 : ((Reals.R_sqrt.sqrt 1%R) = 1%R). -Proof. - exact Reals.R_sqrt.sqrt_1. -Qed. - diff --git a/src/plugins/wp/share/src/Vlist.v b/src/plugins/wp/share/src/Vlist.v deleted file mode 100644 index 85e91e487c0..00000000000 --- a/src/plugins/wp/share/src/Vlist.v +++ /dev/null @@ -1,446 +0,0 @@ -(* This file is generated by Why3's Coq-realize driver *) -(* Beware! Only edit allowed sections below *) -Require Import BuiltIn. -Require BuiltIn. -Require int.Int. -Require int.Abs. -Require int.ComputerDivision. - -(* ---------------------------------------------------------------------- *) -(* --- Lists for Why-3 --- *) -(* ---------------------------------------------------------------------- *) - -Require List. -Ltac seq := autorewrite with list ; auto with zarith. -Hint Rewrite List.app_assoc List.app_nil_l List.app_nil_r : list. - - (* -------------------------------------------------------------------- *) - (* --- Classical Lists for Alt-Ergo --- *) - (* -------------------------------------------------------------------- *) -Require Import Qedlib. - -(* Why3 goal *) -Definition list : forall (a:Type), Type. - exact(List.list). -Defined. - -(* Why3 goal *) -Definition nil: forall {a:Type} {a_WT:WhyType a}, (list a). - intros a a_WT. - generalize a. - exact(@List.nil). -Defined. - -(* Why3 goal *) -Definition cons: forall {a:Type} {a_WT:WhyType a}, a -> (list a) -> (list a). - intros a a_WT. - generalize a. - exact(@List.cons). -Defined. - -(* Why3 goal *) -Definition concat: forall {a:Type} {a_WT:WhyType a}, (list a) -> (list a) -> - (list a). - intros a a_WT. - Open Local Scope list_scope. - exact(fun u v => u ++ v). -Defined. - -Fixpoint repeat_nat (a:Type) (w: list a) (n: nat) {struct n} := - match n with - | O => w - | S m => w ++ (repeat_nat a w m) - end. - - -(* Why3 goal *) -Definition repeat: forall {a:Type} {a_WT:WhyType a}, (list a) -> Z -> (list - a). - intros a a_WT. - exact(fun w n => match n with - | Z0 => nil - | Zneg _ => nil - | other => repeat_nat a w (Zabs_nat (n-1)) - end). -Defined. - -(* Why3 goal *) -Definition length: forall {a:Type} {a_WT:WhyType a}, (list a) -> Z. - intros a a_WT. - exact(fun w => Z.of_nat (List.length w)). -Defined. - -(* Why3 goal *) -Definition nth: forall {a:Type} {a_WT:WhyType a}, (list a) -> Z -> a. - intros a a_WT. - exact(fun w n => match n with - | Zneg _ => (@why_inhabitant a a_WT) - | other => List.nth (Zabs_nat n) w (@why_inhabitant a a_WT) - end). -Defined. - - (* -------------------------------------------------------------------- *) - (* --- length --- *) - (* -------------------------------------------------------------------- *) - -(* Why3 goal *) -Lemma length_pos : forall {a:Type} {a_WT:WhyType a}, forall (w:(list a)), - (0%Z <= (length w))%Z. -Proof. - intros. - unfold length. - apply Zle_0_nat. -Qed. - -(* Why3 goal *) -Lemma length_nil : forall {a:Type} {a_WT:WhyType a}, ((length (nil : (list - a))) = 0%Z). -Proof. - intros. - unfold length. unfold nil. - by seq. -Qed. - -(* Why3 goal *) -Lemma length_nil_bis : forall {a:Type} {a_WT:WhyType a}, forall (w:(list a)), - ((length w) = 0%Z) -> (w = (nil : (list a))). -Proof. - intros a a_WT w. - unfold length. unfold nil. - destruct w. - + by seq. - + Import List.ListNotations. - assert (0 < Z.of_nat (Datatypes.length (a0 :: w))). - { replace (Datatypes.length (a0 :: w)) with (1 + Datatypes.length (w))%nat - by( (replace (a0 :: w) with ([a0] ++ w) by seq); rewrite List.app_length; by seq). - assert (0 <= Z.of_nat (Datatypes.length w)) by apply Zle_0_nat. - replace (Z.of_nat (1 + Datatypes.length w)) with (1 + Z.of_nat (Datatypes.length w)). - { omega. } - rewrite Nat2Z.inj_add. - auto with zarith. - } - intro. - cut False; [contradiction|omega]. -Qed. - -(* Why3 goal *) -Lemma length_cons : forall {a:Type} {a_WT:WhyType a}, forall (x:a) (w:(list - a)), ((length (cons x w)) = (1%Z + (length w))%Z). -Proof. - intros. unfold length. - replace (Datatypes.length (cons x w)) with (1 + (Datatypes.length w))%nat. - apply Nat2Z.inj_add. simpl. auto. -Qed. - -(* Why3 goal *) -Hypothesis length_concat : forall {a:Type} {a_WT:WhyType a}, forall (u:(list - a)) (v:(list a)), ((length (concat u v)) = ((length u) + (length v))%Z). - -(* Why3 goal *) -Hypothesis length_repeat : forall {a:Type} {a_WT:WhyType a}, forall (w:(list - a)) (n:Z), (0%Z <= n)%Z -> ((length (repeat w n)) = (n * (length w))%Z). - - (* -------------------------------------------------------------------- *) - (* --- nth --- *) - (* -------------------------------------------------------------------- *) - -(* Why3 goal *) -Hypothesis nth_cons : forall {a:Type} {a_WT:WhyType a}, forall (k:Z) (x:a) - (w:(list a)), ((k = 0%Z) -> ((nth (cons x w) k) = x)) /\ ((~ (k = 0%Z)) -> - ((nth (cons x w) k) = (nth w (k - 1%Z)%Z))). - -(* Why3 goal *) -Hypothesis nth_concat : forall {a:Type} {a_WT:WhyType a}, forall (u:(list a)) - (v:(list a)) (k:Z), ((k < (length u))%Z -> ((nth (concat u v) k) = (nth u - k))) /\ ((~ (k < (length u))%Z) -> ((nth (concat u v) k) = (nth v - (k - (length u))%Z))). - -(* Why3 goal *) -Hypothesis nth_repeat : forall {a:Type} {a_WT:WhyType a}, forall (n:Z) (k:Z) - (w:(list a)), ((0%Z <= k)%Z /\ (k < (n * (length w))%Z)%Z) -> - ((0%Z < (length w))%Z -> ((nth (repeat w n) k) = (nth w - (ZArith.BinInt.Z.rem k (length w))))). - -(* Why3 assumption *) -Definition vlist_eq {a:Type} {a_WT:WhyType a} (u:(list a)) (v:(list - a)): Prop := ((length u) = (length v)) /\ forall (i:Z), ((0%Z <= i)%Z /\ - (i < (length u))%Z) -> ((nth u i) = (nth v i)). - - (* -------------------------------------------------------------------- *) - (* --- equality of Lists --- *) - (* -------------------------------------------------------------------- *) - -(* Why3 goal *) -Hypothesis extensionality : forall {a:Type} {a_WT:WhyType a}, forall (u:(list - a)) (v:(list a)), (vlist_eq u v) -> (u = v). - - (* -------------------------------------------------------------------- *) - (* --- neutral elements --- *) - (* -------------------------------------------------------------------- *) - -(* Why3 goal *) -Lemma eq_nil_concat : forall {a:Type} {a_WT:WhyType a}, forall (w:(list a)), - (vlist_eq (concat (nil : (list a)) w) w) /\ (vlist_eq (concat w - (nil : (list a))) w). -Proof. - intros. - split ; unfold vlist_eq ; rewrite length_concat; rewrite length_nil; split; auto with zarith; intros. - (* + generalize (nth_concat nil w i); rewrite length_nil; intro G; destruct G. - rewrite H1. - * replace (i - 0)%Z with i by (auto with zarith). auto. - * omega. *) - + generalize (nth_concat w nil i). intro G; destruct G. - rewrite H0. - * auto. - * omega. -Qed. - -(* Why3 goal *) -Lemma rw_nil_concat_left : forall {a:Type} {a_WT:WhyType a}, forall (w:(list - a)), ((concat (nil : (list a)) w) = w). -Proof. - intros. - apply extensionality. - generalize (eq_nil_concat w). intro G; destruct G. - apply H. -Qed. - -(* Why3 goal *) -Lemma rw_nil_concat_right : forall {a:Type} {a_WT:WhyType a}, forall (w:(list - a)), ((concat w (nil : (list a))) = w). - intros. - apply extensionality. - generalize (eq_nil_concat w). intro G; destruct G. - apply H0. -Qed. - -(* Why3 goal *) -Lemma eq_cons_concat : forall {a:Type} {a_WT:WhyType a}, forall (x:a) - (v:(list a)) (w:(list a)), (vlist_eq (concat (cons x v) w) (cons x - (concat v w))). -Proof. - intros. - unfold vlist_eq ; rewrite length_concat. repeat (rewrite length_cons). - split. - + rewrite length_concat. ring. - + intros. - generalize (nth_cons i x (concat v w)); intro G; destruct G. - case_eq i 0%Z; intro Position_0. - * clear H1; rewrite H0; clear H0; auto. - generalize (nth_concat (cons x v) w i); rewrite length_cons; intro G; destruct G. - generalize (length_pos v); intro Positive. - clear H1; rewrite H0 by omega; clear H0. - generalize (nth_cons i x v); intro G; destruct G. - clear H1; rewrite H0; clear H0; auto. - * clear H0; rewrite H1; clear H1; auto. - generalize (nth_concat (cons x v) w i); rewrite length_cons; intro G; destruct G. - case_lt i (1+ length v)%Z; intros. - - clear H1; rewrite H0 by auto; clear H0. - generalize (nth_cons i x v); intro G; destruct G. - clear H0; rewrite H1 by auto; clear H1. - generalize (nth_concat v w (i -1)); intro G; destruct G. - clear H1; rewrite H0 by auto with zarith; clear H0. - auto. - - clear H0; rewrite H1 by auto; clear H1. - generalize (nth_concat v w (i -1)); intro G; destruct G. - clear H0; rewrite H1 by auto with zarith. - replace (i - (1 + length v))%Z with (i - 1 - length v)%Z by auto with zarith. - auto. -Qed. - -(* Why3 goal *) -Lemma rw_cons_concat : forall {a:Type} {a_WT:WhyType a}, forall (x:a) - (v:(list a)) (w:(list a)), ((concat (cons x v) w) = (cons x (concat v w))). -Proof. - intros. - apply extensionality. - apply eq_cons_concat. -Qed. - -(* Why3 goal *) -Lemma rw_nil_cons_concat : forall {a:Type} {a_WT:WhyType a}, forall (x:a) - (w:(list a)), ((concat (cons x (nil : (list a))) w) = (cons x w)). -Proof. - intros. - rewrite rw_cons_concat. - rewrite rw_nil_concat_left. - auto. -Qed. - - (* -------------------------------------------------------------------- *) - (* --- associativity --- *) - (* -------------------------------------------------------------------- *) - -(* Why3 goal *) -Lemma eq_assoc_concat : forall {a:Type} {a_WT:WhyType a}, forall (u:(list a)) - (v:(list a)) (w:(list a)), (vlist_eq (concat (concat u v) w) (concat u - (concat v w))). -Proof. - intros. - unfold vlist_eq. repeat (rewrite length_concat). split. - - ring. - - intros. - generalize (length_pos u); generalize (length_pos v); intros uPos vPos. - case_lt i (length u); intro inU; - generalize (nth_concat u (concat v w) i) ; intro G; destruct G. - + clear H1; rewrite H0 by auto; clear H0. - generalize (nth_concat (concat u v) w i) ; rewrite length_concat ; intro G; destruct G. - clear H1; rewrite H0 by omega; clear H0. - generalize (nth_concat u v i) ; intro G; destruct G. - clear H1; rewrite H0 by auto; clear H0. - auto. - + clear H0; rewrite H1 by auto; clear H1. - case_lt i ((length u) + (length v)); intro inV; - generalize (nth_concat (concat u v) w i) ; rewrite length_concat ; intro G; destruct G. - * clear H1; rewrite H0 by omega; clear H0. - generalize (nth_concat u v i) ; intro G; destruct G. - clear H0; rewrite H1 by auto; clear H1. - generalize (nth_concat v w (i - length u)) ; intro G; destruct G. - clear H1; rewrite H0 by omega; clear H0. - auto. - * clear H0; rewrite H1 by omega; clear H1. - generalize (nth_concat v w (i - length u)) ; intro G; destruct G. - clear H0; rewrite H1 by omega; clear H1. - replace (i - (length u + length v)) with (i - length u - length v) by auto with zarith. - auto. -Qed. - -(* Why3 goal *) -Lemma rw_nil_repeat : forall {a:Type} {a_WT:WhyType a}, forall (n:Z), - (0%Z <= n)%Z -> ((repeat (nil : (list a)) n) = (nil : (list a))). -Proof. -intros a a_WT n h1. -induction n ; simpl ; auto. -assert (R : forall n, repeat_nat a nil n = nil). - * intro n. induction n ; simpl ; auto. - * apply R. -Qed. - -(* Why3 goal *) -Lemma rw_repeat_zero : forall {a:Type} {a_WT:WhyType a}, forall (w:(list a)), - ((repeat w 0%Z) = (nil : (list a))). -Proof. -intros a a_WT w. simpl. auto. -Qed. - -(* Why3 goal *) -Lemma eq_repeat_one : forall {a:Type} {a_WT:WhyType a}, forall (w:(list a)), - (vlist_eq (repeat w 1%Z) w). -intros a a_WT w. simpl. unfold vlist_eq. auto. -Qed. - -(* Why3 goal *) -Lemma rw_repeat_one : forall {a:Type} {a_WT:WhyType a}, forall (w:(list a)), - ((repeat w 1%Z) = w). -Proof. -intros a a_WT w. simpl. auto. -Qed. - -(* Why3 goal *) -Lemma eq_repeat_concat : forall {a:Type} {a_WT:WhyType a}, forall (p:Z) (q:Z) - (w:(list a)), (0%Z <= p)%Z -> ((0%Z <= q)%Z -> (vlist_eq (repeat w - (p + q)%Z) (concat (repeat w p) (repeat w q)))). -Proof. -intros a a_WT p q w h1 h2. unfold vlist_eq ; simpl ; split ; auto with zarith. - + repeat rewrite length_concat. - repeat rewrite length_repeat ; auto with zarith. - + rewrite length_repeat ; auto with zarith. - intros. - induction w. - * replace ([]) with (@nil a a_WT) ; auto. - repeat rewrite rw_nil_repeat ; auto with zarith. - * pose (A := (a0 :: w)). fold A. fold A in H. - assert (L : 0 < length A). - { unfold A. - replace (a0 :: w) with (cons a0 w) by auto. - rewrite length_cons. - assert (0 <= length w). - apply length_pos. - auto with zarith. } - rewrite nth_repeat ; auto with zarith. - generalize (nth_concat (repeat A p) (repeat A q) i). - intros [ POS NEG ]. - induction (Z_lt_le_dec i (length (repeat A p))). - rewrite length_repeat in a1; auto with zarith. - - rewrite POS ; auto with zarith. - rewrite nth_repeat ; auto with zarith. - rewrite length_repeat ; auto with zarith. - - rewrite length_repeat in b ; auto with zarith. - assert ( I_pos: 0 <= i ) ; auto with zarith. - rewrite Int.Mul_distr_r in H. - rewrite NEG ; auto with zarith. - rewrite nth_repeat ; auto with zarith ; - rewrite length_repeat ; auto with zarith. - replace (i - p * length A) with (i + (-p) * length A). - rewrite Z.rem_add ; auto with zarith. - apply Z.mul_nonneg_nonneg ; auto with zarith. - replace (i + -p * length A) with (i - p * length A) ; auto with zarith. - rewrite Z.mul_opp_l. rewrite Z.add_opp_r. auto. - rewrite Z.mul_opp_l. rewrite Z.add_opp_r. auto. - rewrite length_repeat ; auto with zarith. -Qed. - -(* Why3 goal *) -Lemma rw_repeat_concat : forall {a:Type} {a_WT:WhyType a}, forall (p:Z) (q:Z) - (w:(list a)), (0%Z <= p)%Z -> ((0%Z <= q)%Z -> ((repeat w - (p + q)%Z) = (concat (repeat w p) (repeat w q)))). -intros a a_WT p q w h1 h2. -apply extensionality. -apply eq_repeat_concat ; auto with zarith. -Qed. - -(* Why3 goal *) -Lemma rw_repeat_after : forall {a:Type} {a_WT:WhyType a}, forall (p:Z) - (w:(list a)), (0%Z <= p)%Z -> ((concat (repeat w p) w) = (repeat w - (p + 1%Z)%Z)). -Proof. - intros a a_WT p w h1. - rewrite (rw_repeat_concat p 1 w) ; auto with zarith. -Qed. - -(* Why3 goal *) -Lemma rw_repeat_before : forall {a:Type} {a_WT:WhyType a}, forall (p:Z) - (w:(list a)), (0%Z <= p)%Z -> ((concat w (repeat w p)) = (repeat w - (p + 1%Z)%Z)). -Proof. - intros a a_WT p w h1. - replace (p+1) with (1+p) ; auto with zarith. - rewrite (rw_repeat_concat 1 p w) ; auto with zarith. -Qed. - -(* Why3 goal *) -Definition repeat_box: forall {a:Type} {a_WT:WhyType a}, (list a) -> Z -> - (list a). -intros a w l n. -exact (repeat l n). -Defined. - -(* Why3 goal *) -Lemma rw_repeat_box_unfold : forall {a:Type} {a_WT:WhyType a}, - forall (w:(list a)) (n:Z), ((repeat_box w n) = (repeat w n)). -Proof. -intros. -unfold repeat_box. auto. -Qed. - -(* Why3 goal *) -Lemma rw_repeat_plus_box_unfold : forall {a:Type} {a_WT:WhyType a}, - forall (w:(list a)) (a1:Z) (b:Z), (0%Z <= a1)%Z -> ((0%Z <= b)%Z -> - ((repeat_box w (a1 + b)%Z) = (concat (repeat w a1) (repeat w b)))). -Proof. -intros. -unfold repeat_box. rewrite rw_repeat_concat ; auto. -Qed. - -(* Why3 goal *) -Lemma rw_repeat_plus_one_box_unfold : forall {a:Type} {a_WT:WhyType a}, - forall (w:(list a)) (n:Z), (0%Z < n)%Z -> (((repeat_box w - n) = (concat (repeat w (n - 1%Z)%Z) w)) /\ ((repeat_box w - (n + 1%Z)%Z) = (concat (repeat w n) w))). -Proof. - intros. split. - + generalize (rw_repeat_concat (n-1) 1 w). - replace (n-1+1) with n ; auto with zarith. - + rewrite (rw_repeat_concat n 1 w) ; auto with zarith. -Qed. - diff --git a/src/plugins/wp/share/src/Vset.v b/src/plugins/wp/share/src/Vset.v deleted file mode 100644 index 220543b5363..00000000000 --- a/src/plugins/wp/share/src/Vset.v +++ /dev/null @@ -1,157 +0,0 @@ -(* This file is generated by Why3's Coq-realize driver *) -(* Beware! Only edit allowed sections below *) -Require Import BuiltIn. -Require BuiltIn. -Require bool.Bool. -Require int.Int. - -(* Why3 goal *) -Definition set : forall (a:Type), Type. -Admitted. - -(* Why3 goal *) -Definition empty: forall {a:Type} {a_WT:WhyType a}, (set a). -Admitted. - -(* Why3 goal *) -Definition singleton: forall {a:Type} {a_WT:WhyType a}, a -> (set a). -Admitted. - -(* Why3 goal *) -Definition union: forall {a:Type} {a_WT:WhyType a}, (set a) -> (set a) -> - (set a). -Admitted. - -(* Why3 goal *) -Definition inter: forall {a:Type} {a_WT:WhyType a}, (set a) -> (set a) -> - (set a). -Admitted. - -(* Why3 goal *) -Definition member: forall {a:Type} {a_WT:WhyType a}, a -> (set a) -> Prop. -Admitted. - -(* Why3 goal *) -Definition member_bool: forall {a:Type} {a_WT:WhyType a}, a -> (set a) -> - bool. -Admitted. - -(* Why3 goal *) -Definition range: Z -> Z -> (set Z). -Admitted. - -(* Why3 goal *) -Definition range_sup: Z -> (set Z). -Admitted. - -(* Why3 goal *) -Definition range_inf: Z -> (set Z). -Admitted. - -(* Why3 goal *) -Definition range_all: (set Z). -Admitted. - -(* Why3 assumption *) -Definition eqset {a:Type} {a_WT:WhyType a} (a1:(set a)) (b:(set a)): Prop := - forall (x:a), (member x a1) <-> (member x b). - -(* Why3 assumption *) -Definition subset {a:Type} {a_WT:WhyType a} (a1:(set a)) (b:(set a)): Prop := - forall (x:a), (member x a1) -> (member x b). - -(* Why3 assumption *) -Definition disjoint {a:Type} {a_WT:WhyType a} (a1:(set a)) (b:(set - a)): Prop := forall (x:a), (member x a1) -> ~ (member x b). - -(* Why3 goal *) -Lemma member_bool1 : forall {a:Type} {a_WT:WhyType a}, forall (x:a), - forall (s:(set a)), ((member x s) -> ((member_bool x s) = true)) /\ - ((~ (member x s)) -> ((member_bool x s) = false)). -Proof. -intros a a_WT x s. - -Admitted. - -(* Why3 goal *) -Lemma member_empty : forall {a:Type} {a_WT:WhyType a}, forall (x:a), - ~ (member x (empty : (set a))). -Proof. -intros a a_WT x. - -Admitted. - -(* Why3 goal *) -Lemma member_singleton : forall {a:Type} {a_WT:WhyType a}, forall (x:a) - (y:a), (member x (singleton y)) <-> (x = y). -Proof. -intros a a_WT x y. - -Admitted. - -(* Why3 goal *) -Lemma member_union : forall {a:Type} {a_WT:WhyType a}, forall (x:a), - forall (a1:(set a)) (b:(set a)), (member x (union a1 b)) <-> ((member x - a1) \/ (member x b)). -Proof. -intros a a_WT x a1 b. - -Admitted. - -(* Why3 goal *) -Lemma member_inter : forall {a:Type} {a_WT:WhyType a}, forall (x:a), - forall (a1:(set a)) (b:(set a)), (member x (inter a1 b)) <-> ((member x - a1) /\ (member x b)). -Proof. -intros a a_WT x a1 b. - -Admitted. - -(* Why3 goal *) -Lemma union_empty : forall {a:Type} {a_WT:WhyType a}, forall (a1:(set a)), - ((union a1 (empty : (set a))) = a1) /\ ((union (empty : (set a)) a1) = a1). -Proof. -intros a a_WT a1. - -Admitted. - -(* Why3 goal *) -Lemma inter_empty : forall {a:Type} {a_WT:WhyType a}, forall (a1:(set a)), - ((inter a1 (empty : (set a))) = (empty : (set a))) /\ ((inter (empty : (set - a)) a1) = (empty : (set a))). -Proof. -intros a a_WT a1. - -Admitted. - -(* Why3 goal *) -Lemma member_range : forall (x:Z) (a:Z) (b:Z), (member x (range a b)) <-> - ((a <= x)%Z /\ (x <= b)%Z). -Proof. -intros x a b. - -Admitted. - -(* Why3 goal *) -Lemma member_range_sup : forall (x:Z) (a:Z), (member x (range_sup a)) <-> - (a <= x)%Z. -Proof. -intros x a. - -Admitted. - -(* Why3 goal *) -Lemma member_range_inf : forall (x:Z) (b:Z), (member x (range_inf b)) <-> - (x <= b)%Z. -Proof. -intros x b. - -Admitted. - -(* Why3 goal *) -Lemma member_range_all : forall (x:Z), (member x range_all). -Proof. -intros x. - -Admitted. - diff --git a/src/plugins/wp/share/src/Zbits.v b/src/plugins/wp/share/src/Zbits.v deleted file mode 100644 index e168e835e82..00000000000 --- a/src/plugins/wp/share/src/Zbits.v +++ /dev/null @@ -1,2380 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of WP plug-in of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat a l'energie atomique et aux energies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -(* -------------------------------------------------------------------------- *) -(** * ACSL Logical and Bitwise Operators *) -(* -------------------------------------------------------------------------- *) - -(** - The characteristic function of integers have {!arith:arithmetic} properties - and allows to define logical operators over [Z]. Logical [land], - [lor], [lxor] and [lnot] are defined as the lifting over bits of - the associated boolean operators. As a corollary, the consistency - of bitwise [lnot] definition and two's complements [zlnot] is - assessed. - - These definitions are provided in two stages: - - {!bitwise:bitwise} definitions of logical operators - - {!ACSL:ACSL} operators definitions - -*) - -(** ** Tacticals *) - -Require Import ZArith. -Require Import FunctionalExtensionality. -Require Import Qedlib. -Require Import Bits. -Require Import Psatz. - -Open Local Scope Z_scope. - -Local Ltac omegaContradiction := cut False; [contradiction|omega]. - -Local Ltac caseEq name := - generalize (refl_equal name); pattern name at -1 in |- *; case name. - -Local Ltac unfold_hyp h := - match goal with - | h:(?X1) |- _ => unfold X1 in h - | h:(?X1 _ ) |- _ => unfold X1 in h - | h:(?X1 _ _) |- _ => unfold X1 in h - | h:(?X1 _ _ _) |- _ => unfold X1 in h - | h:(?X1 _ _ _ _) |- _ => unfold X1 in h - | _ => idtac - end. - -Lemma bool3_eq : forall b1 b2: bool, (forall b: bool, b1=b <-> b2=b) <-> b1=b2. -Proof. - intros. - intuition. - rewrite H; auto. - rewrite <- H; auto. - rewrite H; auto. -Qed. - -Lemma bool2_eq_true : forall b1 b2:bool, (b1=true <-> b2=true) <-> b1=b2. -Proof. - intros. - destruct b1. - destruct b2. - intuition. - intuition. - destruct b2. - intuition. - intuition. -Qed. - -Lemma split_range: forall a x b: Z, - a <= x -> x < b -> a <= x < b. -Proof. - intros. omega. -Qed. - -(** Some remarks about absolute value *) - -Remark zabs_gt: forall n m: Z, - Zabs m < Zabs n -> (Zabs_nat m < Zabs_nat n)%nat. -Proof. - intros. apply (inj_lt_rev (Zabs_nat m) (Zabs_nat n)). - rewrite (inj_Zabs_nat n). rewrite (inj_Zabs_nat m). omega. -Qed. - -Remark zabs_le: forall n m: Z, - Zabs n <= Zabs m -> (Zabs_nat n <= Zabs_nat m)%nat. -Proof. - intros. apply (inj_le_rev (Zabs_nat n) (Zabs_nat m)). - rewrite (inj_Zabs_nat n). rewrite (inj_Zabs_nat m). omega. -Qed. - -Remark zabs_le_plus: forall (n m:Z) (k: nat), - Zabs n <= Zabs m -> (Zabs_nat n <= k + Zabs_nat m)%nat. -Proof. - intros. - apply (inj_le_rev (Zabs_nat n) (k + Zabs_nat m)%nat). - rewrite (inj_Zabs_nat n). rewrite inj_plus. rewrite (inj_Zabs_nat m). - omega. -Qed. - -Remark zabs_nat_zabs: forall n: Z, - Zabs_nat (Zabs n) = Zabs_nat n. -Proof. - intro. - rewrite <- (inj_Zabs_nat n). rewrite Zabs_nat_Z_of_nat. auto. -Qed. - -Remark zabs_minus: forall n m: Z, - Zabs n <= Zabs m -> (Zabs_nat m - Zabs_nat n)%nat = Zabs_nat (Zabs m - Zabs n). -Proof. - intros. - rewrite Zabs_nat_Zminus by (generalize (Zabs_pos n); omega). - repeat rewrite zabs_nat_zabs. - auto. -Qed. - -Remark zabs_plus: forall n m: Z, - (Zabs_nat m + Zabs_nat n)%nat = Zabs_nat (Zabs m + Zabs n). -Proof. - intros. - rewrite Zabs_nat_Zplus. - (** cont. *) repeat rewrite zabs_nat_zabs; auto. - (** hyp 1 *) generalize (Zabs_pos m); omega. - (** hyp 2 *) generalize (Zabs_pos n); omega. -Qed. - -(** Some remarks about Zle_bool and Zlt_bool *) - -Remark Zle_2x: forall x:Z, - Zle_bool 0 (2*x) = Zle_bool 0 x. -Proof. - induction x; auto. -Qed. - -Remark Zle_div2: forall x:Z, - Zle_bool 0 (x/2) = Zle_bool 0 x. -Proof. - intro x. - case_leq 0 (x/2); case_leq 0 x; try auto; intros; apply False_ind. - (** 0>x *) - + assert (x/2 < 0); [ apply Zdiv_lt_upper_bound | ]; omega. - (** 0<=x *) - + assert (0 <= (x/2)); [ apply Z_div_pos | ]; omega. -Qed. - -Remark Zlt_div2_neg: forall x:Z, - Zlt_bool (x/2) 0 = Zlt_bool x 0. -Proof. - intro x. - case_lt (x/2) 0; case_lt x 0; intros; try auto. - (** x>=0 *) - + assert (x/2 >= 0) by (apply Z_div_ge0 ; omega). - omegaContradiction. - (** x<0 *) - + apply False_ind. - assert (x/2 < 0) by (apply Zdiv_lt_upper_bound; omega). - omegaContradiction. - Qed. - -(** Some useful properties *) - -Remark upper_positive_mult_positive: forall p x: Z, - 0 <= x -> 0 < p -> x <= x * p. -Proof. - intros. - rewrite <- Zmult_1_r at 1. - apply Zmult_le_compat_l; omega. -Qed. - -Remark lower_negative_mult_positive: forall p x: Z, - x <= 0 -> 0 < p -> x * p <= x. -Proof. - intros. - cut (-x <= -(x * p)). - omega. - rewrite Zopp_mult_distr_l. - apply upper_positive_mult_positive; omega. -Qed. - -Theorem Z2_induction(P: Z -> Prop) : - P 0 -> - (forall (c:bool) (z:Z), 0 <= z -> P z -> P (2*z + if c then 1 else 0))-> - (forall z:Z, 0 <= z -> P z). -Proof. - intros. - induction z. - + auto. - + induction p. - * assert ((Z.pos p~1) =(2*Z.pos p + 1)) by (auto with zarith). - rewrite H2 in *. - apply (H0 true ((Z.pos p))); auto with zarith. - * assert ((Z.pos p~0) =(2*Z.pos p)) by (auto with zarith). - rewrite H2 in *. - apply (H0 false ((Z.pos p))); auto with zarith. - * apply (H0 true 0); auto with zarith. - + generalize (Pos2Z.neg_is_neg p); intro; omegaContradiction. -Qed. - -(** Some useful properties about modulus *) - -Remark mod2_case : forall z:Z, z mod 2 = 0 \/ z mod 2 = 1. -Proof. - intros. rewrite Zmod_odd. - case (Z.odd z); intuition. -Qed. - -Ltac case_mod2 z := induction (mod2_case z) as [EVEN|ODD]. - -Remark mod2_lt: forall z:Z, 0 <= z mod 2 < 2. -Proof. - intro; apply Z_mod_lt; auto with zarith. -Qed. - -Remark div2_mod2_eq: forall z:Z, z = 2*(z/2) + z mod 2. -Proof. - intro; apply Z_div_mod_eq; auto with zarith. -Qed. - -Remark div2_odd_eq: forall z:Z, z = 2*(z/2) + (if (Z.odd z) then 1 else 0). -Proof. - intro. rewrite <- Zmod_odd. apply div2_mod2_eq. -Qed. - -Remark odd_mod2: forall (x:Z), - Z.odd (x mod 2) = Z.odd x. -Proof. - destruct x. - (** 0 *) - + compute; auto. - (** positive *) - + destruct p. - (** 2p+1 *) - * rewrite <- (Z.mod_unique (Z.pos p~1) 2 (Z.pos p) 1) ; - [ | omega | (auto with zarith)]. - (replace (Z.pos p~1) with ( 1 + 2*Z.pos p) by forward). - rewrite Z.odd_add_mul_2; auto. - (** 2p+0 *) - * rewrite <- (Z.mod_unique (Z.pos p~0) 2 (Z.pos p) 0); - [ | omega | (auto with zarith)]. - (replace (Z.pos p~0) with ( 0 + 2*Z.pos p) by forward). - rewrite Z.odd_add_mul_2; auto. - (** 1 *) - * compute; auto. - (** negative *) - + destruct p. - (** 2p+1 *) - * rewrite <- (Z.mod_unique (Z.neg p~1) 2 ((Z.neg p)-1) 1); - [ | omega - | rewrite Zmult_minus_distr_l; rewrite Pos2Z.neg_xI; - ring]. - (replace (Z.neg p~1) with ( (-1) + 2*(Z.neg p)) by (simpl; auto)). - rewrite Z.odd_add_mul_2; auto. - (** 2p+0 *) - * rewrite <- (Z.mod_unique (Z.neg p~0) 2 (Z.neg p) 0); - [ | omega | simpl; auto]. - (replace (Z.neg p~0) with ( 0 + 2*Z.neg p) by (simpl; auto)). - rewrite Z.odd_add_mul_2; simpl; auto. - (** 1 *) - * compute; auto. -Qed. - -Remark uint_div2_mod_two_power_nat: forall (m:nat) (x:Z), - (x mod two_power_nat (S m)) / 2 = (x/2) mod two_power_nat m. -Proof. - intros. - rewrite two_power_nat_S. - rewrite Z.rem_mul_r ; [ | discriminate | apply two_power_nat_is_positive]. - pose (z:=((x/2) mod two_power_nat m)); fold z. - rewrite <- (Zdiv_unique (x mod 2 + 2*z) 2 z (x mod 2)); - [auto | apply mod2_lt | auto with zarith]. -Qed. - -Remark sint_div2_mod_two_power_nat_pos: forall (m:nat) (x:Z), - ((x + two_power_nat (S m)) mod (2*two_power_nat (S m))) / 2 = ((x/2) + two_power_nat m) mod two_power_nat (S m). -Proof. - intros. - rewrite <- two_power_nat_S. - rewrite (uint_div2_mod_two_power_nat (S m) (x + two_power_nat (S m))). - rewrite two_power_nat_S. - (replace (2*two_power_nat m) with ((two_power_nat m) *2) by ring). - rewrite Z_div_plus. - auto. - compute; auto. -Qed. - -Remark sint_div2_mod_two_power_nat: forall (m:nat) (x:Z), - (((x + two_power_nat (S m)) mod (2*two_power_nat (S m))) - two_power_nat (S m)) / 2 = - (((x/2) + two_power_nat m) mod two_power_nat (S m)) - two_power_nat m. -Proof. - intros. - rewrite <- two_power_nat_S. - rewrite <- sint_div2_mod_two_power_nat_pos. - rewrite two_power_nat_S. rewrite two_power_nat_S. rewrite two_power_nat_S. - pose (z:= (two_power_nat m)); fold z. - pose (a:= ((x + 2*z) mod (2*(2*z)))); fold a. - (replace (a - 2*z) with (a + ((- z) * 2)) by ring). - rewrite Z.div_add. - ring. - discriminate. -Qed. - - -(* -------------------------------------------------------------------------- *) -(** {@arith:} *) -(** * Arithmetic Properties of the Characteristic Function of integers *) -(* -------------------------------------------------------------------------- *) - -Remark Zbit_2x_0: forall x: Z, - Zbit (2*x) O = false. -Proof. - unfold Zbit. unfold bits_of_Z. intro. - case_leq 0 (2*x); intro; unfold btest. - (** case 0 <= 2*x *) - + unfold Nabs. unfold N_decomp. unfold P_decomp. - destruct x; auto. - (** case 0 > 2*x *) - + unfold zlnot. - destruct x; auto. - destruct p; simpl; auto. -Qed. - -Remark Zbit_2x_p: forall (n:nat) (x:Z), - Zbit (2*x) (S n) = Zbit x n. -Proof. - intros. - unfold Zbit; unfold bits_of_Z; rewrite Zle_2x. - case_leq 0 x; intro; unfold btest. - (** case 0<=x *) - + unfold Nabs; unfold N_decomp; unfold P_decomp; destruct x; auto. - (** case 0>x *) - + unfold zlnot; destruct x; - [ compute in H; discriminate H - | discriminate H - | destruct p; simpl; auto]. -Qed. - -Remark Zbit_s2x_0: forall x: Z, - Zbit ((2*x) + 1) O = true. -Proof. - unfold Zbit. unfold bits_of_Z. intro. - case_leq 0 (2*x); intro; unfold btest. - (** case 0 <= 2*x *) - + unfold Nabs. unfold N_decomp. unfold P_decomp. - destruct x; auto. - (** case 0 > 2*x *) - + unfold zlnot. - destruct x; auto. - destruct p; simpl; auto. -Qed. - -Remark Zbit_s2x_p: forall (n:nat) (x:Z), - Zbit ((2*x) + 1) (S n) = Zbit x n. -Proof. - intros. - unfold Zbit; unfold bits_of_Z. - case_leq 0 x; intro; unfold btest. - (** case 0<=x *) - + case_leq 0 (2*x + 1) ; intro. - unfold Nabs. unfold N_decomp. unfold P_decomp. destruct x; auto. - assert (Z.neg p < 0) by apply (Zlt_neg_0 p); omegaContradiction. - (** case 0<=x *) - + case_leq 0 (2*x + 1) ; intro. - unfold zlnot; destruct x; - [ discriminate H - | assert (Z.pos p > 0) by apply (Zgt_pos_0 p); omegaContradiction - |]. - destruct p; simpl; auto. -Qed. - -Lemma Zbit_succ: forall (c:bool) (n:nat) (x:Z), - Zbit ((2*x) + if c then 1 else 0) (S n) = Zbit x n. -Proof. - intros. - destruct c. - + rewrite Zbit_s2x_p; auto. - + replace (2*x + 0) with (2*x) by (auto with zarith). - rewrite Zbit_2x_p; auto. -Qed. - -Remark Zbit_pos0: forall x: Z, - 0 <= x -> Zbit x O = Z.odd x. -Proof. - intros x POS. - destruct x. - (** 0 *) - + compute; auto. - (** Positive *) - + unfold Zbit; unfold bits_of_Z. - rewrite Zodd_mod. - destruct p; unfold P_decomp; simpl. - (** 2p+1 *) - * rewrite <- (Z.mod_unique (Z.pos p~1) 2 (Z.pos p) 1); - [ auto | | auto]. - clear POS ; omega. - (** 2p *) - * rewrite <- (Z.mod_unique (Z.pos p~0) 2 (Z.pos p) 0); - [ auto | | auto]. - clear POS ; omega. - (** 1 *) - * compute ; auto. - (** Negative *) - + assert ( Z.neg p < 0) by apply Zlt_neg_0. - omegaContradiction. -Qed. - -Lemma Zbit_0: forall x: Z, - Zbit x O = Z.odd x. -Proof. - intro. - destruct x. - (** 0 *) - + compute; auto. - (** Positive *) - + apply Zbit_pos0. - apply Zle_0_pos. - (** Negative *) - + destruct p. - (** 2p+1 *) - * unfold Zbit; unfold bits_of_Z. simpl. - unfold fnot. compute; auto. - (** 2p *) - * (replace (Z.neg p~0) with (2*Z.neg p) by (auto with zarith)). - rewrite Zbit_2x_0. - simpl; auto. - (** 1 *) - * compute; auto. -Qed. - -Remark Zbit_div2: forall (n:nat) (x:Z), - Zbit (x/2) n = Zbit x (S n). -Proof. - intros. - unfold Zbit; unfold bits_of_Z; rewrite Zle_div2. - case_leq 0 x; intro; unfold btest; - unfold Nabs; unfold N_decomp; unfold P_decomp. - (** case 0<=x *) - + destruct x; [by compute | | (apply False_ind; compute in H; auto) ]. - destruct p. - (** 2p+1 *) - * rewrite <- (Zdiv_unique (Zpos (xI (p)) ) 2 (Zpos p) 1); - by compute. - (** 2p *) - * rewrite <- (Zdiv_unique (Zpos (xO (p)) ) 2 (Zpos p) 0); - by compute. - (** one *) - * by compute. - (** case 0>x *) - + unfold zlnot. - destruct x; [ by compute | (compute in H; discriminate H) | ]. - destruct p. - (** -(2p+1) *) - * rewrite <- (Zdiv_unique (Zneg (xI (p)) ) 2 (Zneg p - 1) 1); - [ (replace (Zneg p - 1 + 1) with (Zneg p) by omega); - (replace (-Zneg p) with (Zpos p) by (compute;forward)); - (replace (-(Zneg (xI (p)) + 1)) with (Zpos (xO(p))) by (compute;forward)) - | - | (replace (2*(Zneg p - 1) + 1) with (2*Zneg p - 1) by omega) - ]; by compute. - (** -2p *) - * rewrite <- (Zdiv_unique (Zneg (xO (p)) ) 2 (Zneg p) 0); - [ | by compute | by compute]. - (repeat (rewrite Z.opp_add_distr)). - (repeat (rewrite Z.add_opp_r)). - (repeat (rewrite Pos2Z.opp_neg)). - destruct p; - [ (** -2(2p+1) *) - (replace (Zpos (xI(p)) -1) with (Zpos (xO(p))) by (compute;forward)); - (replace (Zpos (xO(xI(p))) -1) with (Zpos (xI(xO(p)))) by (compute;forward)) - | (** -2(2p) *) - | (** -2 *) - ]; by compute. - (** minus one *) - * by compute. -Qed. - -Theorem Zbit_le : - forall x y: Z, 0 <= y -> (forall k: nat, Zbit x k = true -> Zbit y k = true) -> x <= y. -Proof. - intros x y POS. revert x. - apply Z2_induction with (z:=y); auto; intros. - + replace x with 0. - * auto with zarith. - * apply Zbit_ext. - extensionality k. - generalize (H k); clear H. - destruct (Zbit x k); intuition. - + generalize (div2_mod2_eq x); intro Euc. - rewrite Euc. - case_mod2 x; destruct c as [] eqn:Carry. - * rewrite EVEN in *. - cut ((x/2)<=z). { intro; omega. } - generalize (H0 (x/2)); clear H0; intro h0. - apply h0; clear h0; intro. - generalize (H1 (S k)); clear H1; intro h1. - rewrite Zbit_s2x_p in h1. - intro. apply h1. rewrite <- Zbit_div2; auto. - * rewrite EVEN in *. - cut ((x/2)<=z). { intro; omega. } - generalize (H0 (x/2)); clear H0; intro h0. - apply h0; clear h0; intro. - generalize (H1 (S k)); clear H1; intro h1. - replace (2*z + 0) with (2*z) in h1 by (auto with zarith). - rewrite Zbit_2x_p in h1. - intro. apply h1. rewrite <- Zbit_div2; auto. - * rewrite ODD. - cut ((x/2)<=z). { intro; omega. } - generalize (H0 (x/2)); clear H0; intro h0. - apply h0; clear h0; intro. - generalize (H1 (S k)); clear H1; intro h1. - rewrite Zbit_s2x_p in h1. - intro. apply h1. rewrite <- Zbit_div2; auto. - * rewrite ODD. - replace (2*z + 0) with (2*z) in * by (auto with zarith). - assert ((Zbit x O) = true). - { rewrite Zbit_0. rewrite Zmod_odd in ODD. - destruct (Z.odd x); intuition. } - assert (Zbit (2*z) O=true). - { apply (H1 O); auto. } - rewrite (Zbit_2x_0) in H3. - discriminate H3. -Qed. - -(** Recursive definition of Zbit *) -Theorem Zbit_rec: forall (x:Z) (n:nat), - Zbit x n = if leb n 0 %nat then Z.odd x else Zbit (x/2) (pred n). -Proof. - intro x. - destruct n. - (** Base *) - + simpl. - apply Zbit_0. - (** Ind. *) - + simpl. - rewrite Zbit_div2. - auto. -Qed. - -Lemma Zbit_shift_l: forall (n m:nat) (x:Z), - Zbit (x * (two_power_nat n)) m = if leb n m then Zbit x (m - n)%nat else false. -Proof. - induction n; intros. - (** base *) - + rewrite (leb_correct O m) by omega. - unfold two_power_nat. unfold shift_nat. rewrite <- (minus_n_O m). - f_equal. simpl. omega. - (** ind. *) - + rewrite two_power_nat_S. - (replace (x * (2*two_power_nat n)) with ((2*x) * two_power_nat n) by ring). - rewrite (IHn m (2*x)). - nat_compare Inf EQ Sup n m. - (** n<m *) - * rewrite (leb_correct n m) by omega. - rewrite (leb_correct (S n) m) by omega. - rewrite <-(Zbit_2x_p (m - S n) x). - f_equal. - rewrite (minus_Sn_m) by omega. - by simpl. - (** n=m *) - * rewrite (leb_correct n n) by omega. - rewrite (leb_correct_conv n (S n)) by omega. - rewrite <- minus_n_n. - apply Zbit_2x_0. - (** n>m *) - * rewrite (leb_correct_conv m n) by omega. - rewrite (leb_correct_conv m (S n)) by omega. - auto. -Qed. - -Lemma Znat_ind: forall (P: Z -> Prop), - P 0 -> (forall (x:Z), 0 <= x -> P x -> P (2*x)) - -> (forall (x:Z), 0 <= x -> P x -> P (2*x+1)) - -> (forall (x:Z), 0 <= x -> P x). -Proof. - intros. - destruct x. - (* 0 *) - auto. - (* Pos *) - induction p. - (* 2p+1 *) - (replace (Z.pos p~1) with (2 * Z.pos p + 1) by (auto with zarith)); auto. - (* 2p *) - (replace (Z.pos p~0) with (2 * Z.pos p) by (auto with zarith)); auto. - (* 1 *) - (replace (1) with (2 * 0 + 1) by (auto with zarith)). - apply H1. omega. auto. - (* Neg *) - compute in H2. - intuition congruence. -Qed. - -Lemma Zbit_shift_r: forall (n m:nat) (x:Z), - Zbit (x / (two_power_nat n)) m = Zbit x (n + m)%nat. -Proof. - induction n; intros. - (** base *) - + unfold two_power_nat. unfold shift_nat. - f_equal. simpl. apply Zdiv_1_r. - (** ind. *) - + rewrite two_power_nat_S. - (replace (2*two_power_nat n) with ((two_power_nat n)*2) by ring). - rewrite <- Zdiv_Zdiv; - [ | generalize (two_power_nat_is_positive n); omega | omega]. - rewrite (plus_Snm_nSm n m). - rewrite <- (IHn (S m) x). - apply Zbit_div2. -Qed. - -Theorem Zbit_uint_mod_two_power_nat: forall (n m:nat) (x:Z), - Zbit (x mod (two_power_nat n)) m = if leb n m then false else Zbit x m. -Proof. - induction n. - (** base *) simpl. - + intros. (replace (two_power_nat 0) with 1 by forward). - rewrite Z.mod_1_r. - auto_bits. - + induction m. - (** base *) - * intros. - (replace (n + 0)%nat with n by (simpl; auto)). - rewrite two_power_nat_S. - rewrite Zbit_0; rewrite Zbit_0. - rewrite Z.rem_mul_r; [ | discriminate | apply two_power_nat_is_positive]. - rewrite Z.odd_add_mul_2. - rewrite odd_mod2; auto. - (** ind. *) - * intros. - rewrite <- Zbit_div2; rewrite <- Zbit_div2. - rewrite uint_div2_mod_two_power_nat. - rewrite (IHn m (x/2)). - nat_compare Inf EQ Sup n m. -Qed. - -Theorem Zbit_sint_mod_two_power_nat: forall (n m:nat) (x:Z), - Zbit (((x + two_power_nat (n+m)) mod (2*two_power_nat (n+m))) - two_power_nat (n+m)) m = Zbit x m. -Proof. - induction n. - (** base *) - + induction m; intros. - (** base *) - * rewrite plus_O_n. - (replace (two_power_nat O) with 1 by forward). - (replace (2*1) with 2 by forward). - rewrite Zbit_0; rewrite Zbit_0. - rewrite Z.odd_sub. - rewrite odd_mod2. - rewrite Z.odd_add. - (replace (Z.odd 1) with true by forward). - rewrite Bool.xorb_true_r; rewrite Bool.xorb_true_r. - rewrite (Bool.negb_involutive). - auto. - (** ind. *) - * rewrite plus_O_n. - rewrite <- Zbit_div2; rewrite <- Zbit_div2. - rewrite <- (IHm (x/2)). - rewrite sint_div2_mod_two_power_nat. - rewrite plus_O_n. - rewrite <- two_power_nat_S. - auto. - (** ind. *) - + induction m. - (** base *) - * intros. - (replace (S n + 0)%nat with (S n) by (simpl; auto)). - rewrite two_power_nat_S. - rewrite Zbit_0; rewrite Zbit_0. - rewrite Z.rem_mul_r; - [ | discriminate - | (rewrite <- two_power_nat_S ; apply two_power_nat_is_positive)]. - rewrite <- Z.add_sub_assoc. - rewrite <- Zmult_minus_distr_l. - rewrite Z.odd_add_mul_2. - rewrite odd_mod2. - rewrite Z.odd_add_mul_2. - auto. - (** ind. *) - * intros. - (replace (S n + S m)%nat with (S ((S n) + m))%nat by (simpl; auto)). - rewrite <- Zbit_div2; rewrite <- Zbit_div2. - rewrite <- (IHm (x/2)). - rewrite sint_div2_mod_two_power_nat. - rewrite <- two_power_nat_S. - auto. -Qed. - -Lemma Zbit_sign: forall (n: nat) (z: Z), - let b := two_power_nat n - in -b <= z < b -> (Zbit z n = Zlt_bool z 0). -Proof. - intro n. - induction n; intro z; intro b; unfold b. - (** base *) - + (replace (two_power_nat 0) with 1 by forward). - case_lt z 0; intros. - (** z<0 *) (replace z with (-1) by (omega);forward). - (** z>=0*) (replace z with 0 by omega); by forward. - (** ind. *) - + rewrite two_power_nat_S; intro. - rewrite <-Zbit_div2. - assert ((- two_power_nat n) <= z/2 < two_power_nat n) by - (split ; [apply Zdiv_le_lower_bound | apply Zdiv_lt_upper_bound] ; omega). - assert (Zbit (z/2) n = ((z/2) <? 0)) by (by apply (IHn (z/2))). - rewrite H1; apply Zlt_div2_neg. -Qed. - -Lemma Zbit_trail_plus: forall (n i: nat) (z: Z), - let b := two_power_nat n - in -b <= z < b -> (Zbit z (n+i)%nat = Zlt_bool z 0). -Proof. - intro n. induction i; intros z b; unfold b. - (** base *) - + rewrite plus_0_r. - apply Zbit_sign. - (** ind. *) - + intro. - rewrite <- plus_n_Sm. - rewrite <-Zbit_div2. - assert ((- two_power_nat n) <= z/2 < two_power_nat n) by - (split ; [apply Zdiv_le_lower_bound | apply Zdiv_lt_upper_bound] ; omega). - assert (Zbit (z/2) (n + i)%nat = (z/2 <? 0)) by (by apply (IHi (z/2))). - rewrite H1; apply Zlt_div2_neg. -Qed. - -Lemma Zbit_trail: forall (n i: nat) (z: Z), - let b := two_power_nat n - in (n <= i)%nat -> -b <= z < b -> (Zbit z i = Zlt_bool z 0). -Proof. - intros. - generalize (Zbit_trail_plus n (i - n)%nat z). - rewrite <- le_plus_minus by auto. - auto. -Qed. - -Lemma Zbit_unsigned_trail: forall (n i: nat) (z: Z), - (n <= i)%nat -> 0 <= z < two_power_nat n -> (Zbit z i = false). -Proof. - intros n i z h1. - (* work around a problem with "try omega" inside case_lt *) - pose (b:=two_power_nat n); fold b. - intro h2. - (replace false with (Zlt_bool z 0) by (case_lt z 0; auto)). - apply (Zbit_trail n); auto. - fold b. - omega. -Qed. - -Lemma Zbit_trail_plus_inv: forall (n: nat) (z: Z), - let b := two_power_nat n - in (forall (i: nat), (Zbit z (n+i)%nat = Zlt_bool z 0)) -> -b <= z < b. -Proof. - intro n. induction n; intro z; intro b; unfold b. - (** base *) - + (replace (two_power_nat 0) with 1 by (auto with zarith)). - case_lt z 0; intros h h0. - (** z<0 *) - * replace z with (-1); - [| symmetry; apply Zbit_ext; extensionality k; unfold TRUE; apply h0]. - omega. - (** z>=0*) - * replace z with 0; - [| symmetry; apply Zbit_ext; extensionality k; unfold FALSE; apply h0]. - omega. - (** ind. *) - + intro. - generalize (div2_mod2_eq z); intro Euc. - generalize (mod2_lt z); intro Mod. - pose (x := z / 2); fold x in Euc. - pose (r := z mod 2); fold r in Euc,Mod. - - assert (Ind: -(two_power_nat n) <= x < (two_power_nat n)). - { apply IHn; intro; unfold x; rewrite Zlt_div2_neg. - case_mod2 z. - + fold r in EVEN. - rewrite <-Zbit_2x_p. - replace (S (n+i)) with (S n + i)%nat ; [ | auto with arith ]. - replace (2*(z/2)) with z. - * apply H. - * fold x; auto with zarith. - + fold r in ODD. - rewrite <-Zbit_s2x_p. - replace (S (n+i)) with (S n + i)%nat ; [ | auto with arith ]. - replace (2*(z/2) + 1) with z. - * apply H. - * fold x; auto with zarith. - } - rewrite two_power_nat_S. - auto with zarith. -Qed. - -Lemma Zbit_unsigned_trail_plus_inv: forall (n: nat) (z: Z), - let b := two_power_nat n - in (forall (i: nat), (Zbit z (n+i)%nat = false)) -> 0 <= z < b. -Proof. - intro n. induction n; intro z; intro b; unfold b. - (** base *) - + (replace (two_power_nat 0) with 1 by (auto with zarith)). - intro h0. - replace z with 0; - [| symmetry; apply Zbit_ext; extensionality k; unfold FALSE; apply h0]. - omega. - (** ind. *) - + intro. - generalize (div2_mod2_eq z); intro Euc. - generalize (mod2_lt z); intro Mod. - pose (x := z / 2); fold x in Euc. - pose (r := z mod 2); fold r in Euc,Mod. - - assert (Ind: 0 <= x < (two_power_nat n)). - { apply IHn; intro; unfold x. - case_mod2 z. - + fold r in EVEN. - rewrite <-Zbit_2x_p. - replace (S (n+i)) with (S n + i)%nat ; [ | auto with arith ]. - replace (2*(z/2)) with z. - * apply H. - * fold x; auto with zarith. - + fold r in ODD. - rewrite <-Zbit_s2x_p. - replace (S (n+i)) with (S n + i)%nat ; [ | auto with arith ]. - replace (2*(z/2) + 1) with z. - * apply H. - * fold x; auto with zarith. - } - rewrite two_power_nat_S. - auto with zarith. -Qed. - -Lemma Zbit_trail_inv: forall (n: nat) (z: Z), - let b := two_power_nat n - in (forall (i: nat), (n <= i)%nat -> (Zbit z i = Zlt_bool z 0)) -> -b <= z < b. -Proof. - intros n z b h1. - generalize (Zbit_trail_plus_inv n z); intro h2. - apply h2; intro. - generalize (h1 (n + i)%nat); intro h3. - apply h3. - auto with zarith. -Qed. - -Lemma Zbit_unsigned_trail_inv: forall (n: nat) (z: Z), - (forall (i: nat), (n <= i)%nat -> (Zbit z i = false)) -> 0 <= z < (two_power_nat n). -Proof. - intros n z h1. - generalize (Zbit_unsigned_trail_plus_inv n z); intro h2. - apply h2; intro. - generalize (h1 (n + i)%nat); intro h3. - apply h3. - auto with zarith. -Qed. - -(** {@bitwise:} *) -(** * Bitwise Shifting Operators *) - -Program Definition bitwise_lsl (x: bits) (n:nat): bits := - let sign := (bsign x) in - let btest := (fun i: nat => if leb n i %nat then btest x (i - n)%nat - else false) in - let last := last btest ((bsize x) + n) sign in - mkbits last sign btest _ . -Next Obligation. - apply trailing_last. - generalize (btrail x). - unfold trailing. - intro Tx. intro k. - nat_compare Inf EQ Sup n k. - (** n < k *) - + rewrite (leb_correct n k) by omega. - intros. rewrite (Tx (k - n)%nat) by omega. - auto. - (** n = k *) - + rewrite (leb_correct n n) by omega. - intros. rewrite (Tx (n - n)%nat) by omega. - auto. - (** n > k *) - + intro. - omegaContradiction. -Qed. - -Program Definition bitwise_lsr (x: bits) (n:nat): bits := - let sign := (bsign x) in - let btest := (fun i: nat => btest x (i + n)%nat) in - let last := last btest (bsize x) sign in - mkbits last sign btest _ . -Next Obligation. - apply trailing_last. - generalize (btrail x). - unfold trailing. - intro Tx. intros. - rewrite (Tx (k + n)%nat); auto with arith. -Qed. - -Definition lsl_shift_def (x:Z) (n:nat): Z := - Z_of_bits (bitwise_lsl (bits_of_Z x) n). - -Definition lsr_shift_def (x:Z) (n:nat): Z := - Z_of_bits (bitwise_lsr (bits_of_Z x) n). - -(** ** Link between bitwise shifting operators and arithmetics *) - -Definition lsl_arithmetic_def (x:Z) (n:nat): Z := - x * (two_power_nat n). - -Lemma lsl_arithmetic_shift: - lsl_shift_def = lsl_arithmetic_def. -Proof. - extensionality x; extensionality n; Zbit_ext k. - (** right term *) - unfold lsl_arithmetic_def; rewrite (Zbit_shift_l n k x). - (** left term *) - unfold lsl_shift_def; unfold Zbit; rewrite Z_decomp_recomp; - unfold bitwise_lsl; unfold btest. - auto. -Qed. - -Definition lsr_arithmetic_def (x:Z) (n:nat): Z := - x / (two_power_nat n). - -(** Note: [lsr_arithmetic_def x n] and [Cdiv x (two_power_nat n)] differs for negative [x]. *) -Remark lsr_differs_to_Cdiv: lsr_arithmetic_def (-1) 1%nat <> Cdiv (-1) (two_power_nat 1). -Proof. - by compute. -Qed. - -Lemma lsr_arithmetic_shift: - lsr_shift_def = lsr_arithmetic_def. -Proof. - extensionality x; extensionality n; Zbit_ext k. - (** right term *) - unfold lsr_arithmetic_def; rewrite (Zbit_shift_r n k x); - (replace (n+k)%nat with (k+n)%nat by omega). - (** left term *) - unfold lsr_shift_def; unfold Zbit; rewrite Z_decomp_recomp; - unfold bitwise_lsr; unfold btest. - auto. -Qed. - -(** * Bitwise Logical Operators *) - -Program Definition bitwise (f: bool -> bool -> bool) (x y: bits): bits := - let sign := f (bsign x) (bsign y) in - let btest := (fun i: nat => f (btest x i) (btest y i)) in - let last := last btest (max (bsize x) (bsize y)) sign in - mkbits last sign btest _ . -Next Obligation. - apply trailing_last. - generalize (btrail x). - generalize (btrail y). - unfold trailing. - intros Ty Tx k Max. - rewrite Tx. rewrite Ty. trivial. - generalize (Max.max_lub_r (bsize x) (bsize y) k). omega. - generalize (Max.max_lub_l (bsize x) (bsize y) k). omega. -Qed. - -Definition Z_bitwise (f: bool -> bool -> bool) (x y: Z): Z := - Z_of_bits (bitwise f (bits_of_Z x) (bits_of_Z y)). - -(** ** Properties of Bitwise Logical Operators *) - -Lemma Zbit_bitwise: forall (f: bool -> bool -> bool) (x y: Z) (k: nat), - Zbit (Z_bitwise f x y) k = f (Zbit x k) (Zbit y k). -Proof. - intros. unfold Zbit. unfold Z_bitwise. - rewrite Z_decomp_recomp. auto. -Qed. - -(** Tactical. *) -Ltac Zbit_bitwise k := Zbit_ext k; repeat rewrite Zbit_bitwise. - -(** Range of bitwise operators *) -Lemma Z_bitwise_ZxHpos: forall (f: bool -> bool -> bool) (x y: Z), - (ZxHpos (Z_bitwise f x y) <= max (ZxHpos x) (ZxHpos y))%nat. -Proof. - intros f x y. - unfold Z_bitwise. rewrite (bsize_over_approx). unfold bitwise. - unfold btest at 1; unfold bsize at 1; unfold bsign at 3; - apply Max.max_case_strong; - rewrite <- (bsize_exact x); rewrite <- (bsize_exact y); intro CASE. - (** (ZxHpos y <= ZxHpos x) *) - + rewrite Max.max_l by auto. - generalize (last_leq (fun i: nat => f (btest (bits_of_Z x) i) (btest (bits_of_Z y) i)) - (ZxHpos x) (f (bsign (bits_of_Z x)) (bsign (bits_of_Z y)))); intro. - generalize (last_leq (fun i : nat => f (btest (bits_of_Z x) i) (btest (bits_of_Z y) i)) - (last (fun i : nat => f (btest (bits_of_Z x) i) (btest (bits_of_Z y) i)) - (ZxHpos x) (f (bsign (bits_of_Z x)) (bsign (bits_of_Z y)))) - (f (bsign (bits_of_Z x)) (bsign (bits_of_Z y)))); intro. - omega. - (** cont. (ZxHpos x <= ZxHpos y) *) - + rewrite Max.max_r by auto. - generalize (last_leq (fun i: nat => f (btest (bits_of_Z x) i) (btest (bits_of_Z y) i)) - (ZxHpos y) (f (bsign (bits_of_Z x)) (bsign (bits_of_Z y)))); intro. - generalize (last_leq (fun i: nat => f (btest (bits_of_Z x) i) (btest (bits_of_Z y) i)) - (last (fun i: nat => f (btest (bits_of_Z x) i) (btest (bits_of_Z y) i)) - (ZxHpos y) (f (bsign (bits_of_Z x)) (bsign (bits_of_Z y)))) - (f (bsign (bits_of_Z x)) (bsign (bits_of_Z y)))); intro. - omega. -Qed. - -Lemma Z_bitwise_ZxHbound: forall (f: bool -> bool -> bool) (x y: Z), - ZxHbound (Z_bitwise f x y) <= Zmax (ZxHbound x) (ZxHbound y). -Proof. - intros f x y. - generalize (Z_bitwise_ZxHpos f x y). - apply Z.max_case_strong; intro. - (** ZxHbound y <= ZxHbound x *) - + assert (ZxHpos y <= ZxHpos x)%nat by by (apply ZxHpos_le). - rewrite max_l; by try (intro; apply ZxHbound_le). - (** ZxHbound x <= ZxHbound y *) - + assert (ZxHpos x <= ZxHpos y)%nat by by (apply ZxHpos_le). - rewrite max_r; by try (intro; apply ZxHbound_le). -Qed. - -Theorem Z_bitwise_in_sint_range: forall (f: bool -> bool -> bool) (n: nat) (x y: Z), - let b := two_power_nat n - in -b <= x < b -> -b <= y < b -> -b <= (Z_bitwise f x y) < b. -Proof. - intros f n x y b Rx Ry. - assert (ZxHbound x <= b) as Bx. - { unfold b. unfold b in Rx. - apply (ZxHpower n x). - omega. } - assert (ZxHbound y <= b) as By. - { unfold b. unfold b in Ry. - apply (ZxHpower n y). - omega. } - generalize (Z_bitwise_ZxHbound f x y). - pose (zxy := Z_bitwise f x y); fold zxy. - generalize (ZxHrange zxy). - apply Zmax_case_strong. - (** ZxHbound y <= ZxHbound x *) - + intros Ryx Rzxy. - destruct Rzxy as [ bound_neg bound_pos ]. - lia. - (** ZxHbound x <= ZxHbound y *) - + intros Ryx Rzxy. - destruct Rzxy as [ bound_neg bound_pos ]. - lia. -Qed. - -Theorem Z_bitwise_sign: forall (f: bool -> bool -> bool) (x y: Z), - Zle_bool 0 (Z_bitwise f x y) = negb (f (negb (Zle_bool 0 x)) (negb (Zle_bool 0 y))). -Proof. - intros f x y. - case_leq 0 (Z_bitwise f x y); - unfold Z_bitwise; unfold Z_of_bits; unfold bitwise; simpl; - repeat (rewrite Zsign_encoding); - destruct (f (negb (Zle_bool 0 x)) (negb (Zle_bool 0 y))); intuition. - + unfold zlnot in H; - generalize (N_recomp_pos (last (fun i : nat => f (btest (bits_of_Z x) i) (btest (bits_of_Z y) i)) - (max (bsize (bits_of_Z x)) (bsize (bits_of_Z y))) true) - (fnot (fun i : nat => f (btest (bits_of_Z x) i) (btest (bits_of_Z y) i)))); intro; - omegaContradiction. - + generalize (N_recomp_pos (last (fun i : nat => f (btest (bits_of_Z x) i) (btest (bits_of_Z y) i)) - (max (bsize (bits_of_Z x)) (bsize (bits_of_Z y))) false) - (fun i : nat => f (btest (bits_of_Z x) i) (btest (bits_of_Z y) i))); intro; - omegaContradiction. -Qed. - -Theorem Z_bitwise_is_uint: forall (f: bool -> bool -> bool) (x y: Z), - 0 <= x -> 0 <= y -> (f false false = false) -> 0 <= (Z_bitwise f x y). -Proof. - intros f x y Rx Ry Fsign. - generalize (Z_bitwise_sign f x y). - case_leq 0 x; case_leq 0 y; replace (negb true) with false by intuition; intros. - rewrite Fsign in H1. - replace (negb false) with true in H1 by intuition. - case_leq 0 (Z_bitwise f x y). - discriminate H1. -Qed. - -Theorem Z_bitwise_is_uint1: forall (f: bool -> bool -> bool) (x y: Z), - 0 <= x -> (forall b:bool, f false b = false) -> 0 <= (Z_bitwise f x y). -Proof. - intros f x y Rx Fsign. - generalize (Z_bitwise_sign f x y). - case_leq 0 x; replace (negb true) with false by intuition; intros. - rewrite (Fsign (negb (0 <=? y))) in H0. - replace (negb false) with true in H0 by intuition. - case_leq 0 (Z_bitwise f x y). - discriminate H0. -Qed. - -Theorem Z_bitwise_is_uint2: forall (f: bool -> bool -> bool) (x y: Z), - 0 <= y -> (forall b: bool, f b false = false) -> 0 <= (Z_bitwise f x y). -Proof. - intros f x y Rx Fsign. - generalize (Z_bitwise_sign f x y). - case_leq 0 y; replace (negb true) with false by intuition; intros. - rewrite (Fsign (negb (0 <=? x))) in H0. - replace (negb false) with true in H0 by intuition. - case_leq 0 (Z_bitwise f x y). - discriminate H0. -Qed. - -Theorem Z_bitwise_in_uint_range: forall (f: bool -> bool -> bool) (n: nat) (x y: Z), - let b := two_power_nat n - in 0 <= x < b -> 0 <= y < b -> f false false = false -> 0 <= (Z_bitwise f x y) < b. -Proof. - intros f n x y b Rx Ry. - assert (ZxHbound x <= b) as Bx. - { unfold b. unfold b in Rx. - apply (ZxHpower n x). - omega. } - assert (ZxHbound y <= b) as By. - { unfold b. unfold b in Ry. - apply (ZxHpower n y). - omega. } - intro Fsign. - assert (0 <= (Z_bitwise f x y)) as Bz. - { apply (Z_bitwise_is_uint f x y); auto; omega. } - generalize (Z_bitwise_ZxHbound f x y). - pose (zxy := Z_bitwise f x y); fold zxy; fold zxy in Bz. - generalize (ZxHrange zxy). - apply Zmax_case_strong. - (** ZxHbound y <= ZxHbound x *) - + intros Ryx Rzxy. - destruct Rzxy as [ Bneg Bpos ]. - lia. - (** ZxHbound x <= ZxHbound y *) - + intros Ryx Rzxy. - destruct Rzxy as [ Bneg Bpos ]. - lia. -Qed. - -(** Commutative bitwise operators *) - -Definition commutative {A B: Type} (f: A -> A -> B) := - forall x y: A, f x y = f y x. - -Lemma Z_bitwise_commut: forall (f: bool -> bool -> bool), - commutative f -> commutative (Z_bitwise f). -Proof. - unfold commutative. intros. apply btest_ext. simpl. - extensionality k. - apply H. -Qed. - -(** Associative bitwise operators *) - -Definition associative {A: Type} (f: A -> A -> A) := - forall x y z: A, f (f x y) z = f x (f y z). - -Lemma Z_bitwise_assoc: forall (f: bool -> bool -> bool), - associative f -> associative (Z_bitwise f). -Proof. - unfold associative. intros. apply btest_ext. simpl. - extensionality k. unfold Z_bitwise. - repeat rewrite Z_decomp_recomp. simpl. apply H. -Qed. - -(** Idempotent bitwise operators *) - -Definition idempotent {A: Type} (f: A -> A -> A) := - forall x: A, f x x = x. - -Lemma Z_bitwise_idempotent: forall (f: bool -> bool -> bool), - idempotent f -> idempotent (Z_bitwise f). -Proof. - unfold idempotent. intros. Zbit_bitwise k. auto. -Qed. - -(** Distributive bitwise operators *) - -Definition distributive_l {A: Type} (f : A -> A -> A) (g : A -> A -> A) := - forall x y z: A, f x (g y z) = g (f x y) (f x z). - -Definition distributive_r {A: Type} (f : A -> A -> A) (g : A -> A -> A) := - forall x y z: A, f (g x y) z = g (f x z) (f y z). - -Lemma Z_bitwise_distrib_l: forall (f g: bool -> bool -> bool), - distributive_l f g -> distributive_l (Z_bitwise f) (Z_bitwise g) . -Proof. - unfold distributive_l. intros. Zbit_bitwise k. auto. -Qed. - -Lemma Z_bitwise_distrib_r: forall (f g: bool -> bool -> bool), - distributive_r f g -> distributive_r (Z_bitwise f) (Z_bitwise g) . -Proof. - unfold distributive_r. intros. Zbit_bitwise k. auto. -Qed. - -(** Neutral elements of bitwise operators *) - -Definition neutral {A: Type} (e: A) (f: A -> A -> A) := - forall x: A, f e x = x. - -Lemma Z_bitwise_neutral (e:bool): forall (f: bool -> bool -> bool), - neutral e f -> neutral (if e then (-1) else 0) (Z_bitwise f). -Proof. - unfold neutral. intros. Zbit_bitwise k. - destruct e; simpl; rewrite H; auto. -Qed. - -(** Absorbant element of bitwise operators *) - -Definition absorbant {A: Type} (a: A) (f: A -> A -> A) := - forall x: A, f a x = a. - -Lemma Z_bitwise_absorbant (a:bool) : - forall f, absorbant a f -> absorbant (if a then (-1) else 0) (Z_bitwise f). -Proof. - unfold absorbant. intros. Zbit_bitwise k. - destruct a; simpl; rewrite H; auto. -Qed. - -(** {@ACSL:} *) - -(** * ACSL shifting operators *) - -Parameter lsl_undef: Z -> Z -> Z. - -Definition lsl_def (x:Z) (n:Z): Z := - lsl_shift_def x (Zabs_nat n). - -Definition lsl (x : Z) (y : Z) : Z := - if Zle_bool 0 y then lsl_def x y - else lsl_undef x y. - -Theorem lsl_pos: forall x n: Z, - 0<=n -> lsl x n = lsl_def x n. -Proof. - intros. - unfold lsl. - case_leq 0 n. -Qed. - -(* Lemma test_compute: lsl 2 1 = 4. *) -(* Proof. *) -(* compute; reflexivity. *) -(* Qed. *) - -Parameter lsr_undef: Z -> Z -> Z. - -Definition lsr_def (x:Z) (n:Z): Z := - lsr_shift_def x (Zabs_nat n). - -Definition lsr (x : Z) (y : Z) : Z := - if Zle_bool 0 y then lsr_def x y - else lsr_undef x y. - -Theorem lsr_pos: forall x n: Z, - 0<=n -> lsr x n = lsr_def x n. -Proof. - intros. - unfold lsr. - case_leq 0 n. -Qed. - -(** ** Properties of shifting operators *) - -Theorem Zbit_lsl: forall (x n: Z) (k: nat), - Zbit (lsl_def x n) k = if (Zle_bool (Zabs n) (Z_of_nat k)) then Zbit x (Zabs_nat ((Z_of_nat k) - (Zabs n))) else false. -Proof. - intros. unfold lsl_def. - rewrite lsl_arithmetic_shift. unfold lsl_arithmetic_def. - rewrite Zbit_shift_l. - case_leq (Zabs n) (Z_of_nat k). - (** case |n| <= k *) - + intro LEQ. - cut (leb (Zabs_nat n) k= true). - { intro LEB. rewrite LEB. f_equal. - rewrite Zabs_nat_Zminus; try split; try apply Zabs_pos; auto. - rewrite Zabs_nat_Z_of_nat. - rewrite zabs_nat_zabs; auto. } - apply leb_correct. rewrite <- Zabs_nat_Z_of_nat. - apply zabs_le. - rewrite <- (inj_Zabs_nat (Z_of_nat k)). rewrite Zabs_nat_Z_of_nat. - auto. - (** case |n| > k *) - + intro GT. - cut (leb (Zabs_nat n) k = false). - intro GTB. rewrite GTB. auto. - apply leb_correct_conv. - rewrite <- (Zabs_nat_Z_of_nat k). - apply zabs_gt. - rewrite <- (inj_Zabs_nat (Z_of_nat k)). rewrite Zabs_nat_Z_of_nat. - omega. -Qed. - -Theorem Zbit_lsr: forall (x n: Z) (k: nat), - Zbit (lsr_def x n) k = Zbit x (k + (Zabs_nat n))%nat. -Proof. - intros. - (** left term *) - unfold lsr_def. unfold lsr_shift_def. - unfold Zbit. rewrite Z_decomp_recomp. - unfold bitwise_lsr. unfold btest at 1. - auto. -Qed. - -Lemma lsl_of_lsl: forall (n m: Z) (x:Z), - lsl_def (lsl_def x n) m = lsl_def x (Zabs n + Zabs m). -Proof. - intros. unfold lsl_def. - rewrite <- zabs_plus. - rewrite lsl_arithmetic_shift. - unfold lsl_arithmetic_def. - (replace (x * two_power_nat (Zabs_nat n) * two_power_nat (Zabs_nat m)) - with (x *(two_power_nat (Zabs_nat n) * two_power_nat (Zabs_nat m))) by ring). - f_equal. - repeat rewrite two_power_nat_correct. - rewrite Zpower_nat_is_exp. - auto. -Qed. - -Lemma lsr_of_lsr: forall (n m: Z) (x:Z), - lsr_def (lsr_def x n) m = lsr_def x (Zabs n + Zabs m). -Proof. - intros. unfold lsr_def. - rewrite <- zabs_plus. - unfold lsr_shift_def at 3. unfold lsr_shift_def at 1. - unfold bitwise_lsr. - apply btest_ext. - unfold btest at 1. unfold btest at 2. - extensionality k. - unfold lsr_shift_def. - rewrite Z_decomp_recomp. - unfold bitwise_lsr. unfold btest at 1. - f_equal. - omega. -Qed. - - -Lemma lsr_of_lsl: forall (n m: Z) (x:Z), - Zabs n <= Zabs m -> lsr_def (lsl_def x n) m = lsr_def x (Zabs m - Zabs n). -Proof. - intros. unfold lsr_def. - rewrite <- zabs_minus by auto. - unfold lsr_shift_def. unfold bitwise_lsr. - apply btest_ext. - unfold btest at 1. unfold btest at 2. - extensionality k. - unfold lsl_def. unfold lsl_shift_def. - rewrite Z_decomp_recomp. - unfold bitwise_lsl. unfold btest at 1. - rewrite (leb_correct (Zabs_nat n) (k + Zabs_nat m)). - f_equal. - (** arg 1 *) - + rewrite (inj_eq_rev (k + Zabs_nat m - Zabs_nat n) (k + (Zabs_nat m - Zabs_nat n))). - auto. - rewrite inj_minus1 by (apply zabs_le_plus; omega). - repeat rewrite inj_plus. - rewrite inj_minus1 at 1 by (apply zabs_le; auto). - omega. - (** arg 2 *) - + apply zabs_le_plus. - omega. -Qed. - -(** * ACSL bitwise operators *) - -Definition limpl (x y: Z): Z := - Z_bitwise implb x y. -Definition land (x y: Z): Z := - Z_bitwise andb x y. -Definition lor (x y: Z): Z := - Z_bitwise orb x y. -Definition lxor (x y: Z): Z := - Z_bitwise xorb x y. -Definition lnot (x: Z): Z := - lxor (-1) x. - -(** ** Bounds of land and lor terms *) - -Theorem uint_land_range: forall (x y: Z), 0 <= x -> 0 <= land x y <= x. -Proof. - intros. - split. - + apply (Z_bitwise_is_uint1 andb). - * auto. - * intro. destruct b; intuition. - + apply Zbit_le. - * auto. - * intro. - unfold land; rewrite Zbit_bitwise. - destruct (Zbit x k); intuition. -Qed. - -Theorem land_sign: forall (x y: Z), (0 <= x \/ 0 <= y) <-> 0 <= land x y. -Proof. - intros x y. - unfold land; unfold Z_bitwise. - pose (bz := (bitwise andb (bits_of_Z x) (bits_of_Z y))). fold bz. - assert ((0 <= Z_of_bits bz) <-> (bsign bz = false)). - { rewrite Bits.bsign_encoding. - case_leq 0 (Z_of_bits bz); intros; split; intros; auto. - * omegaContradiction. - * discriminate H0. } - rewrite H. - unfold bz. unfold bitwise. simpl. - rewrite (bsign_encoding (bits_of_Z x)). - rewrite bsign_encoding. - rewrite (Z_recomp_decomp x). rewrite Z_recomp_decomp. - split; case_leq 0 x; intro; try omegaContradiction; - case_leq 0 y; intros; try omegaContradiction; auto. - discriminate H2. -Qed. - -Theorem lor_sign: forall (x y: Z), (0 <= x /\ 0 <= y) <-> 0 <= lor x y. -Proof. - intros x y. - unfold lor; unfold Z_bitwise. - pose (bz := (bitwise orb (bits_of_Z x) (bits_of_Z y))). fold bz. - assert ((0 <= Z_of_bits bz) <-> (bsign bz = false)). - { rewrite Bits.bsign_encoding. - case_leq 0 (Z_of_bits bz); intros; split; intros; auto. - * omegaContradiction. - * discriminate H0. } - rewrite H. - unfold bz. unfold bitwise. simpl. - rewrite (bsign_encoding (bits_of_Z x)). - rewrite bsign_encoding. - rewrite (Z_recomp_decomp x). rewrite Z_recomp_decomp. - split; case_leq 0 x; intro; try omegaContradiction; - case_leq 0 y; split; intros; try omegaContradiction; - discriminate H2. -Qed. - -Theorem uint_lor_inf: forall (x y: Z), 0 <= x -> 0 <= y -> x <= lor x y. -Proof. - intros. - apply Zbit_le. - + unfold lor. - unfold Z_bitwise. - pose (bz := (bitwise orb (bits_of_Z x) (bits_of_Z y))). fold bz. - unfold Z_of_bits. - destruct (bsign bz) eqn:BSIGN. - (** negative sign *) - * assert (bsign bz = false) as OPP. - unfold bz. unfold bitwise. unfold bsign. - unfold bits_of_Z. unfold bsign. - case_leq 0 x; intro; try omegaContradiction. - case_leq 0 y; intros; try omegaContradiction. - auto. - rewrite BSIGN in OPP. - discriminate. - (** positive sign *) - * apply (N_recomp_pos). - + intro. - unfold lor; rewrite Zbit_bitwise. - destruct (Zbit x k); intuition. -Qed. - -(** Zbit extraction *) -Theorem Zbit_extraction : -forall (x:Z) (i:nat), - (land x (lsl_shift_def 1 i) = 0 <-> (Zbit x i) = false). -Proof. - intros. - rewrite lsl_arithmetic_shift; unfold lsl_arithmetic_def. - replace (1 * two_power_nat i) with (two_power_nat i) by ring. - unfold land. - split. - (** 1st impl *) - + intro H. - assert (Zbit (Z_bitwise andb x (two_power_nat i)) i = Zbit 0 i). - { rewrite H; reflexivity. } - rewrite Zbit_bitwise in H0. - rewrite Zbit_power in H0. - unfold FALSE in H0. - rewrite <- beq_nat_refl in H0. - rewrite Bool.andb_true_r in H0. - assumption. - (** 2sd impl *) - + intro. - Zbit_ext k. - rewrite Zbit_bitwise; rewrite Zbit_power. - unfold FALSE. - (** proof by case *) - case (lt_eq_lt_dec i k); intro cas. destruct cas. - (** i<k *) - * rewrite Bool.andb_false_intro2; auto. - apply beq_nat_false_iff; omega. - (** k=i *) - * rewrite <- e. - rewrite Bool.andb_false_intro1; auto. - (** k<i *) - * rewrite Bool.andb_false_intro2; auto. - apply beq_nat_false_iff; omega. -Qed. - -Theorem Zbit_extraction_true : -forall (x:Z) (i:nat), - (land x (lsl_shift_def 1 i) = (lsl_shift_def 1 i) <-> (Zbit x i) = true). -Proof. - intros. - rewrite lsl_arithmetic_shift; unfold lsl_arithmetic_def. - replace (1 * two_power_nat i) with (two_power_nat i) by ring. - unfold land. - split. - (** 1st impl *) - + intro H. - assert (Zbit (Z_bitwise andb x (two_power_nat i)) i = Zbit (two_power_nat i) i). - { rewrite H; reflexivity. } - rewrite Zbit_bitwise in H0. - rewrite Zbit_power in H0. - rewrite <- beq_nat_refl in H0. - rewrite Bool.andb_true_r in H0. - assumption. - (** 2sd impl *) - + intro. - Zbit_ext k. - rewrite Zbit_bitwise; rewrite Zbit_power. - (** proof by case *) - case (lt_eq_lt_dec i k); intro cas. destruct cas. - (** i<k *) - * rewrite Bool.andb_false_intro2; auto; - [symmetry| ]; - apply beq_nat_false_iff; omega. - (** k=i *) - * rewrite <- e. - rewrite H. - rewrite Bool.andb_true_l. - reflexivity. - (** k<i *) - * rewrite Bool.andb_false_intro2; auto; - [symmetry| ]; - apply beq_nat_false_iff; omega. -Qed. - -(** ** Properties of lnot operator *) - -(** lnot x equals -(x+1) *) -Theorem lnot_zlnot_equiv: forall x: Z, - lnot x = zlnot x. -Proof. - intro x. unfold lnot. unfold lxor. Zbit_bitwise k. - rewrite Bool.xorb_true_l. - (** Now to prove that zlnot negates bits *) - unfold Zbit. unfold bits_of_Z. - pose (y := zlnot x). fold y. - case_leq 0 x; case_leq 0 y; intros Y X; - try ( unfold y in Y; unfold zlnot in Y; apply False_ind; omega); - simpl. - (** Negative *) - + unfold y. rewrite zlnot_inv. unfold fnot. trivial. - (** Positive *) - + unfold fnot. rewrite Bool.negb_involutive. trivial. -Qed. - -(** Tactical *) -Local Ltac lnot_with_omega := - repeat rewrite lnot_zlnot_equiv; unfold zlnot; omega. - -Theorem lnot_0: lnot 0 = -1. -Proof. - auto with arith. -Qed. - -Theorem lnot_1: lnot (-1) = 0. -Proof. - auto with arith. -Qed. - -(** Involution of the double negation *) -Theorem lnot_inv: forall x: Z, - lnot (lnot x) = x. -Proof. - intros x. lnot_with_omega. -Qed. - -Theorem lnot_sym: forall x y: Z, - lnot x = y -> lnot y = x. -Proof. - intros x y. lnot_with_omega. -Qed. - -Theorem lnot_inj: forall x y: Z, - lnot x = lnot y -> y = x. -Proof. - intros x y. lnot_with_omega. -Qed. - -(** ** Associative and commutative bitwise operators *) - -(** land is AC *) -Theorem land_assoc: associative land. -Proof. - apply (Z_bitwise_assoc andb). - unfold associative. intros. symmetry. apply Bool.andb_assoc. -Qed. -Theorem land_commut: commutative land. -Proof. - apply (Z_bitwise_commut andb Bool.andb_comm). -Qed. - -(** lor is AC *) -Theorem lor_assoc: associative lor. -Proof. - apply (Z_bitwise_assoc orb). - unfold associative. intros. symmetry. apply Bool.orb_assoc. -Qed. -Theorem lor_commut: commutative lor. -Proof. - apply (Z_bitwise_commut orb Bool.orb_comm). -Qed. - -(** lxor is AC *) -Theorem lxor_assoc: associative lxor. -Proof. - apply (Z_bitwise_assoc xorb Bool.xorb_assoc). -Qed. -Theorem lxor_commut: commutative lxor. -Proof. - apply (Z_bitwise_commut xorb Bool.xorb_comm). -Qed. - -(** ** Idempotent bitwise operators *) - -(** land is idempotent *) -Theorem land_idemp: idempotent land. -Proof. - apply (Z_bitwise_idempotent andb). - unfold idempotent. intro. destruct x; auto. -Qed. - -(** lor is idempotent *) -Theorem lor_idemp: idempotent lor. -Proof. - apply (Z_bitwise_idempotent orb). - unfold idempotent. intro. destruct x; auto. -Qed. - -(** ** Neutral elements of bitwise operators *) - -(** Zero is the neutral element of lor *) -Theorem lor_0: neutral 0 lor. -Proof. - apply (Z_bitwise_neutral false orb). - unfold neutral. auto. -Qed. - -(** Zero is the neutral element of lxor *) -Theorem lxor_0: neutral 0 lxor. -Proof. - apply (Z_bitwise_neutral false xorb). - unfold neutral. apply Bool.orb_false_r. -Qed. - -(** Minus one is the neutral element of land *) -Theorem land_1: neutral (-1) land. -Proof. - apply (Z_bitwise_neutral true andb). - unfold neutral. auto. -Qed. - -(** ** Absorbant elements of bitwise operators *) - -(** Zero is the absorbant element of land *) -Theorem land_0: absorbant 0 land. -Proof. - apply (Z_bitwise_absorbant false andb). - unfold absorbant. auto. -Qed. - -(** Minus one is the absorbant element of lor *) -Theorem lor_1: absorbant (-1) lor. -Proof. - apply (Z_bitwise_absorbant true orb). - unfold absorbant. auto. -Qed. - -(** ** De Morgan laws of bitwise operators *) - -Theorem lnot_land_de_morgan: forall x y: Z, - lnot (land x y) = lor (lnot x) (lnot y). -Proof. - intros. unfold lnot. unfold lxor. - Zbit_bitwise k. rewrite Bool.xorb_true_l. - unfold land. rewrite Zbit_bitwise. - unfold lor. rewrite Zbit_bitwise. unfold Zbit. unfold Z_bitwise. - rewrite Z_decomp_recomp. rewrite Z_decomp_recomp. unfold bitwise. simpl. - pose (xb:= btest (bits_of_Z x) k). fold xb. - pose (yb:= btest (bits_of_Z y) k). fold yb. - destruct xb; destruct yb; simpl; auto. -Qed. - -Theorem lnot_lor_de_morgan: forall x y: Z, - lnot (lor x y) = land (lnot x) (lnot y). -Proof. - intros. unfold lnot. unfold lxor. Zbit_bitwise k. - rewrite Bool.xorb_true_l. - unfold land. rewrite Zbit_bitwise. - unfold lor. rewrite Zbit_bitwise. unfold Zbit. unfold Z_bitwise. - rewrite Z_decomp_recomp. rewrite Z_decomp_recomp. unfold bitwise. simpl. - pose (xb:= btest (bits_of_Z x) k). fold xb. - pose (yb:= btest (bits_of_Z y) k). fold yb. - destruct xb; destruct yb; simpl; auto. -Qed. - -(** ** Distributivity of bitwise operators *) - -(** Distributive lor land *) -Theorem lor_land_distrib_l: distributive_l lor land. -Proof. - apply (Z_bitwise_distrib_l orb andb). - unfold distributive_l. - destruct x; destruct y; destruct z; auto. -Qed. -Theorem lor_land_distrib_r: distributive_r lor land. -Proof. - apply (Z_bitwise_distrib_r orb andb). - unfold distributive_r. - destruct x; destruct y; destruct z; auto. -Qed. - -(** Distributive land lor *) -Theorem land_lor_distrib_l: distributive_l land lor. -Proof. - apply (Z_bitwise_distrib_l andb orb). - unfold distributive_l. - destruct x; destruct y; destruct z; auto. -Qed. -Theorem land_lor_distrib_r: distributive_r land lor. -Proof. - apply (Z_bitwise_distrib_r andb orb). - unfold distributive_r. - destruct x; destruct y; destruct z; auto. -Qed. - -(** Distributive land lxor *) -Theorem land_lxor_distrib_l: distributive_l land lxor. -Proof. - apply (Z_bitwise_distrib_l andb xorb). - unfold distributive_l. - destruct x; destruct y; destruct z; auto. -Qed. -Theorem land_lxor_distrib_r: distributive_r land lxor. -Proof. - apply (Z_bitwise_distrib_r andb xorb). - unfold distributive_r. - destruct x; destruct y; destruct z; auto. -Qed. - -(** ** Properties of lxor operator *) - -Theorem lxor_nilpotent: forall x: Z, - lxor x x = 0. -Proof. - intro. unfold lxor. Zbit_bitwise k. - rewrite Bool.xorb_nilpotent. auto. -Qed. - -Theorem lxor_1: forall x: Z, - lxor (-1) x = lnot x. -Proof. - trivial. -Qed. - -(** ** Others properties of lnot operator *) - -Theorem lxor_lnot: forall x y: Z, - lxor (lnot x) y = lnot (lxor x y). -Proof. - intros. unfold lnot. apply (lxor_assoc (-1) x y). -Qed. - -Theorem land_lnot_nilpotent: forall x: Z, - land (lnot x) x = 0. -Proof. - intro. - rewrite <- lxor_1. - rewrite land_lxor_distrib_r. - rewrite land_1. - rewrite land_idemp. - apply lxor_nilpotent. -Qed. - -Theorem lor_lnot_1: forall x: Z, - lor (lnot x) x = (-1). -Proof. - intro. - apply lnot_inj. - rewrite lnot_lor_de_morgan. - rewrite lnot_inv. - rewrite land_commut. - rewrite land_lnot_nilpotent. - apply lnot_1. -Qed. - -(** ** Link between shifting and bitwise operators *) -Local Ltac lsl_distrib_r lop z := - unfold distributive_r; - let k := fresh in - intros; unfold lop; Zbit_bitwise k; - repeat rewrite Zbit_lsl; rewrite Zbit_bitwise; - case_leq (Zabs z) (Z_of_nat k); - [ (intro; trivial) | trivial ]. - -(** Distributive lsl lor *) -Lemma lsl_lor_distrib_r: distributive_r lsl_def lor. -Proof. - lsl_distrib_r lor z. -Qed. - -(** Distributive lsl land *) -Lemma lsl_land_distrib_r: distributive_r lsl_def land. -Proof. - lsl_distrib_r land z. -Qed. - -(** Distributive lsl lxor *) -Lemma lsl_lxor_distrib_r: distributive_r lsl_def lxor. -Proof. - lsl_distrib_r lxor z. -Qed. - -Local Ltac lsr_distrib_r lop := - unfold distributive_r; - intros; Zbit_ext fresh; - unfold lop; rewrite Zbit_bitwise; - repeat rewrite Zbit_lsr; rewrite Zbit_bitwise; - trivial. - -(** Distributive lsr lor *) -Lemma lsr_lor_distrib_r: distributive_r lsr_def lor. -Proof. - lsr_distrib_r lor. -Qed. - -(** Distributive lsr land *) -Lemma lsr_land_distrib_r: distributive_r lsr_def land. -Proof. - lsr_distrib_r land. -Qed. - -(** Distributive lsr lxor *) -Lemma lsr_lxor_distrib_r: distributive_r lsr_def lxor. -Proof. - lsr_distrib_r lxor. -Qed. - -(** lsr lnot *) -Lemma lsr_lnot: forall x y: Z, - lnot (lsr_def x y) = lsr_def (lnot x) y . -Proof. - unfold lnot. - lsr_distrib_r lxor. -Qed. - -(** ** Some properties of equations of bitwise operators *) - -Local Ltac f_equal_hyp h f k := - match goal with - | [ h:(?X1 = ?X2) |- _ ] => - let H := fresh in assert (H : f X1 k = f X2 k) by (f_equal; auto); clear h; - assert (h: f X1 k = f X2 k) by auto; clear H - end. - -Local Ltac linear2 := - intros x y; (try split); intros H; (try split); - let k := fresh "k" in - Zbit_ext k; - try (destruct H as [H H0] ; f_equal_hyp H0 Zbit k; generalize H0; clear H0) ; - f_equal_hyp H Zbit k; generalize H; clear H; - (try unfold limpl); (try unfold lnot); - (try unfold land); (try unfold lor); (try unfold lxor); - repeat (replace (Zbit (-1) k) with true by simpl); - repeat (replace (Zbit 0 k) with false by simpl); - repeat rewrite Zbit_bitwise; - destruct (Zbit x k); destruct (Zbit y k); simpl; auto. - -Lemma linear_land: forall x y: Z, - limpl x y = -1 <-> land x y = x. -Proof. - linear2. -Qed. - -Lemma linear_lor: forall x y: Z, - lor x y = x <-> limpl y x = -1. -Proof. - linear2. -Qed. - -Lemma linear_lxor: forall x y: Z, - lxor x y = x <-> y=0. -Proof. - linear2. -Qed. - -Lemma linear_limpl_r: forall x y: Z, - limpl x y = y <-> lor x y = -1. -Proof. - linear2. -Qed. -(* -Local Ltac F_equal_hyp h f k := - match goal with - | [ h:(?X1 = ?X2) |- _ ] => idtac h; - let H := fresh in assert (H : f X1 k = f X2 k) by (f_equal; auto); clear h; - assert (h: f X1 k = f X2 k) by (apply H); clear H - end. -*) -Lemma linear_limpl_l: forall x y: Z, - limpl x y = x <-> x=-1 /\ y=-1. -Proof. - linear2. -Qed. - -Lemma linear_land_lnot: forall x y: Z, - land x y = lnot x <-> x=-1 /\ y=0. -Proof. - linear2. -Qed. - -Lemma linear_lor_lnot: forall x y: Z, - lor x y = lnot x <-> x=0 /\ y=-1. -Proof. - linear2. -Qed. - -Lemma linear_lxor_lnot : forall x y: Z, - lxor x y = lnot x <-> y=-1. -Proof. - linear2. -Qed. - -Lemma linear_limpl_r_lnot: forall x y: Z, - limpl x y = lnot y <-> x=0 /\ y=0. -Proof. - linear2. -Qed. - -Lemma linear_limpl_l_lnot: forall x y: Z, - limpl x y = lnot x <-> land x y = 0. -Proof. - linear2. -Qed. - -Local Ltac linear3 := - intros x y z; (try split); intros H; (try split); - let k := fresh "k" in - Zbit_ext k; - try (destruct H as [H H0] ; f_equal_hyp H0 Zbit k; generalize H0; clear H0); - f_equal_hyp H Zbit k; generalize H; clear H; - (try unfold limpl); (try unfold lnot); - (try unfold land); (try unfold lor); (try unfold lxor); - repeat (replace (Zbit (-1) k) with true by simpl); - repeat (replace (Zbit 0 k) with false by simpl); - repeat rewrite Zbit_bitwise; - destruct (Zbit x k); destruct (Zbit y k); destruct (Zbit z k); simpl; auto. - -Lemma linear_lxor_land: forall x y z: Z, - lxor x y = land x z <-> lnot y = limpl x z. -Proof. - linear3. -Qed. - -Lemma linear_lxor_lor: forall x y z: Z, - lxor x y = lor x z <-> lnot y = limpl z x. -Proof. - linear3. -Qed. - -Lemma linear_lxor_limpl_l: forall x y z: Z, - lxor x y = limpl x z <-> lnot y = land x z. -Proof. - linear3. -Qed. - -Lemma linear_lxor_limpl_r: forall x y z: Z, - lxor x y = limpl z x <-> lnot y = lor z x. -Proof. - linear3. -Qed. - -Lemma linear_land_land: forall x y z: Z, - land x y = land z x <-> land x (lxor y z) = 0. -Proof. - linear3. -Qed. - -Lemma linear_lnot_land_land: forall x y z: Z, - lnot (land x y) = land z x <-> x=-1 /\ y = lnot z. -Proof. - linear3. -Qed. - -Lemma linear_lor_lor: forall x y z: Z, - lor x y = lor z x <-> land (lnot x) (lxor y z) = 0. -Proof. - linear3. -Qed. - -Lemma linear_lnot_lor_lor: forall x y z: Z, - lnot (lor x y) = lor z x <-> x=0 /\ y = lnot z. -Proof. - linear3. -Qed. - -Lemma linear_lor_land: forall x y z: Z, - lor x y = land x z <-> y = land x (lnot (lxor y z)). -Proof. - linear3. -Qed. - -Lemma land_discrimination_inv: forall x y z:Z, - x = land y z -> land x (lnot y) = 0. -Proof. - linear3. -Qed. - -Lemma land_discrimination: forall x y z:Z, - land x (lnot y) <> 0 -> x <> land y z. -Proof. - intros x y z. - generalize (land_discrimination_inv x y z). - intuition. -Qed. - -Lemma lxor_discrimination_inv: forall x y z:Z, - x = lxor y z -> lxor x y = z. -Proof. - linear3. -Qed. - -Lemma land_system: forall x1 x2 y1 y2 z:Z, - (x1 = land z y1 /\ x2 = land z y2) <-> lor x1 x2 = land z (lor (land (lnot x1) (land (lnot x2) (lor y1 y2))) - (lor (land x1 (land y1 (lnot (lxor x2 y2)))) - ((land x2 (land y2 (lnot (lxor x1 y1))))))). -Proof. - intros x1 x2 y1 y2 z. split; - intro H ; try split; - Zbit_ext k; - try (destruct H as [H H0]; f_equal_hyp H0 Zbit k; generalize H0; clear H0); - f_equal_hyp H Zbit k; generalize H; clear H; - (try unfold limpl); (try unfold lnot); - (try unfold land); (try unfold lor); (try unfold lxor); - repeat (replace (Zbit (-1) k) with true by simpl); - repeat (replace (Zbit 0 k) with false by simpl); - repeat rewrite Zbit_bitwise; - destruct (Zbit x1 k); destruct (Zbit x2 k); - destruct (Zbit y1 k); destruct (Zbit y2 k); destruct (Zbit z k); simpl; auto. -Qed. - -(** * Properties about bounds of bitwise operators *) - -Theorem lnot_in_range: forall a b z: Z, - a <= z < b -> -b <= lnot z < -a. -Proof. - intros. - rewrite lnot_zlnot_equiv. unfold zlnot. - omega. -Qed. - -Theorem lsr_upper_bound: forall b x y: Z, - 0 <= y -> x < b -> 0 <= b -> lsr x y < b. -Proof. - intros b x y Ry Rx Rb. - apply Zle_is_le_bool in Ry; unfold lsr; rewrite Ry. - unfold lsr_def. rewrite lsr_arithmetic_shift. unfold lsr_arithmetic_def. - pose (d := two_power_nat (Zabs_nat y)); fold d. - assert (PWR2: 0 < d) by apply two_power_nat_is_positive. - apply Zdiv_lt_upper_bound; auto. - assert (b <= b * d) by apply (upper_positive_mult_positive d b Rb PWR2). - omega. -Qed. - -Theorem lsr_lower_bound: forall b x y: Z, - 0 <= y -> b <= x -> b <= 0 -> b <= lsr x y. -Proof. - intros b x y Ry Rx Rb. - apply Zle_is_le_bool in Ry; unfold lsr; rewrite Ry. - unfold lsr_def. rewrite lsr_arithmetic_shift. unfold lsr_arithmetic_def. - pose (d := two_power_nat (Zabs_nat y)); fold d. - assert (PWR2: 0 < d) by apply two_power_nat_is_positive. - apply Zdiv_le_lower_bound; auto. - assert (b * d <= b) by apply (lower_negative_mult_positive d b Rb PWR2). - omega. -Qed. - -(** * Other properties of bitwise operators *) - -Theorem Zbit_land_edge_inf: forall (x:Z) (n k:nat), - Zbit x k = Zbit (land ((two_power_nat (S (n + k))) - 1) x) k. -Proof. - intros. unfold land; rewrite Zbit_bitwise. - cut (Zbit (two_power_nat (S (n + k)) - 1) k = true). - { intro C; rewrite C; simpl; auto. } - induction k. - (** base *) - + (replace (n + 0)%nat with n by (auto with zarith)). - rewrite two_power_nat_S. - (replace (2*two_power_nat n - 1) - with (2*(two_power_nat n - 1) +1) by ring). - apply Zbit_s2x_0. - (** ind. *) - + rewrite two_power_nat_S. - (replace (2*two_power_nat (n + S k) - 1) - with (2*(two_power_nat (n + S k) - 1) +1) by ring). - rewrite Zbit_s2x_p. - (replace (n + S k)%nat with (S (n + k)%nat) by (auto with zarith)). - auto. -Qed. - -Theorem Zbit_power_minus_one: forall n k:nat, - Zbit (two_power_nat n - 1) k = leb (S k) n. -Proof. - induction n. - (** base *) - + unfold two_power_nat; unfold Zbit; unfold bits_of_Z. - simpl; auto. - (** ind *) - + replace (two_power_nat (S n) - 1) - with (2 * (two_power_nat n - 1) + 1) - by (rewrite two_power_nat_S; (auto with zarith)). - destruct k. - * rewrite Zbit_s2x_0. - auto. - * rewrite Zbit_s2x_p. - rewrite (IHn k). - auto. -Qed. - -Lemma pos_mod_two_power_nat_land_edge: forall (x:Z) (n:nat), - x mod (two_power_nat n) = land ((two_power_nat n) - 1) x. -Proof. - intros. - Zbit_ext k. - rewrite Zbit_uint_mod_two_power_nat. - unfold land; rewrite Zbit_bitwise. - rewrite Zbit_power_minus_one. - nat_compare Inf EQ Sup n k. - + rewrite (leb_correct n k) by omega. - rewrite (leb_correct_conv n (S k)) by omega. - simpl; auto. - + rewrite (leb_correct n n) by omega. - rewrite (leb_correct_conv n (S n)) by omega. - simpl; auto. - + rewrite (leb_correct_conv k n) by omega. - rewrite (leb_correct (S k) n) by omega. - simpl; auto. -Qed. - -(** * Bit extraction *) - -Parameter zbit_test_undef: Z -> Z -> bool. - -(* Extended version for negative value. *) -Definition zbit_test_def (x:Z) (n:Z): bool := - Zbit x (Zabs_nat n). - -Theorem zbit_test_ext: forall x y: Z, - (forall n, zbit_test_def x n = zbit_test_def y n) -> x=y. -Proof. - intros x y. - unfold zbit_test_def. - intro. - Zbit_ext k. - rewrite <- (Zabs2Nat.id k). apply H. -Qed. - -Definition bit_testb (x:Z) (n:Z): bool := - if Zle_bool 0 n then zbit_test_def x n - else zbit_test_undef x n. - -Theorem bit_testb_pos: forall x n: Z, - 0<=n -> bit_testb x n = zbit_test_def x n. -Proof. - intros. - unfold bit_testb. - case_leq 0 n. - intro. auto. -Qed. - -Theorem bit_testb_ext: forall x y: Z, - (forall n: Z, 0<=n -> bit_testb x n = bit_testb y n) -> x=y. -Proof. - intros. - Zbit_ext j. - specialize (H (Z.of_nat j)). - specialize (H (Zle_0_nat j)). - rewrite bit_testb_pos in H. - rewrite bit_testb_pos in H. - unfold zbit_test_def in H. - rewrite Zabs2Nat.id in H. - auto. - apply (Zle_0_nat j). - apply (Zle_0_nat j). -Qed. - -(** Tactical *) -Local Ltac bit_extraction bin_op := - intros; unfold zbit_test_def; unfold bin_op; rewrite Zbit_bitwise; auto. - -(** ** Link between Bit extraction and modulo operator *) - -Theorem uint_mod_two_power_extraction: forall (n:nat) (m x:Z), - zbit_test_def (x mod (two_power_nat n)) m = if leb n (Zabs_nat m) then false else zbit_test_def x m. -Proof. - intros. - unfold zbit_test_def. - apply Zbit_uint_mod_two_power_nat. -Qed. - - -(** ** Link between Bit extraction and bitwise shifting operators *) -Theorem lsl_extraction: forall x n m: Z, - zbit_test_def (lsl_def x n) m = - if Zle_bool (Zabs n) (Zabs m) - then zbit_test_def x ((Zabs m) - (Zabs n)) - else false. -Proof. - intros. unfold zbit_test_def. - rewrite Zbit_lsl. repeat rewrite inj_Zabs_nat. - auto. -Qed. - -Theorem lsr_extraction: forall x n m: Z, - zbit_test_def (lsr_def x n) m = zbit_test_def x ((Zabs m) + (Zabs n)). -Proof. - intros. unfold zbit_test_def. - (** right term *) - rewrite <- zabs_plus. - (** left term *) - rewrite Zbit_lsr. - auto. -Qed. - -(** ** Link between Bit extraction and bitwise operators *) - -Theorem land_extraction: forall x y i: Z, - zbit_test_def (land x y) i = andb (zbit_test_def x i) (zbit_test_def y i). -Proof. - bit_extraction land. -Qed. - -Theorem lor_extraction: forall x y i: Z, - zbit_test_def (lor x y) i = orb (zbit_test_def x i) (zbit_test_def y i). -Proof. - bit_extraction lor. -Qed. - -Theorem lxor_extraction: forall x y i: Z, - zbit_test_def (lxor x y) i = xorb (zbit_test_def x i) (zbit_test_def y i). -Proof. - bit_extraction lxor. -Qed. - -Theorem lnot_extraction: forall x i: Z, - zbit_test_def (lnot x) i = negb (zbit_test_def x i). -Proof. - unfold lnot. - bit_extraction lxor. -Qed. - -(** ** Link between bitwise operators and the addition *) - -Remark land_no_carry : forall (x y:Z) (i:nat), - land x y = 0 -> (Zbit x i = false \/ Zbit y i = false). -Proof. - intros. - assert (Zbit (land x y) i = false). - { rewrite H. rewrite Zbit_of_zero. unfold FALSE. trivial. } - clear H. - unfold land in H0. rewrite Zbit_bitwise in H0. - destruct (Zbit x i); destruct (Zbit y i); intuition. -Qed. - -Theorem lor_addition : forall (x y:Z), - land x y = 0 -> x + y = lor x y. -Proof. - intros. - Zbit_ext i. - generalize H; clear H. - generalize x; clear x. - generalize y; clear y. - induction i; intros. - + generalize (land_no_carry x y O). - unfold lor; rewrite Zbit_bitwise. - repeat (rewrite Zbit_0). - rewrite Z.odd_add. - destruct (Z.odd x); destruct (Z.odd y); intuition. - + generalize (IHi (y/2) (x/2)); clear IHi. - unfold lor; rewrite Zbit_bitwise. rewrite Zbit_bitwise. - intros. - repeat (rewrite <- Zbit_div2). - assert (Zbit (x / 2 + y / 2) i = (Zbit (x / 2) i || Zbit (y / 2) i)%bool). - { apply H0; clear H0; clear i. - Zbit_ext k. - unfold land; rewrite Zbit_bitwise. - rewrite Zbit_div2; rewrite Zbit_div2. - generalize (land_no_carry x y (S k)). - destruct (Zbit x (S k)); destruct (Zbit y (S k)); intuition. - } - rewrite <- H1; clear H1. - f_equal. - generalize (land_no_carry x y 0%nat). - repeat (rewrite Zbit_0). - rewrite (div2_odd_eq x) at 3. rewrite (div2_odd_eq y) at 3. - clear H0. - destruct (Z.odd x); destruct (Z.odd y); intuition; try discriminate H0; - repeat (rewrite Z.add_0_r); symmetry. - * apply (Zdiv_unique (2 * (x / 2) + 1 + 2 * (y / 2)) 2 (x / 2 + y / 2) 1); auto with zarith. - * apply (Zdiv_unique (2 * (x / 2) + (2 * (y / 2) + 1)) 2 (x / 2 + y / 2) 1); auto with zarith. - * apply (Zdiv_unique (2 * (x / 2) + 2 * (y / 2)) 2 (x / 2 + y / 2) 0); auto with zarith. - * apply (Zdiv_unique (2 * (x / 2) + 2 * (y / 2)) 2 (x / 2 + y / 2) 0); auto with zarith. -Qed. - -Theorem lxor_addition : -forall (x y:Z), - land x y = 0 -> - x + y = lxor x y. -Proof. - intros. rewrite lor_addition. - + Zbit_ext i. - unfold lor; rewrite Zbit_bitwise. - unfold lxor; rewrite Zbit_bitwise. - generalize (land_no_carry x y i). - destruct (Zbit x i); destruct (Zbit y i); intuition. - + trivial. -Qed. - -Theorem land_addition : -forall (x y z:Z), - land x y = 0 -> - (land x z) + (land y z) = land (x + y) z. -Proof. - intros. rewrite lor_addition. - + rewrite lor_addition; trivial. - symmetry. apply land_lor_distrib_r. - + rewrite land_assoc. - rewrite <- (land_commut (land y z)). - rewrite land_assoc. - rewrite <- land_assoc. - rewrite H. apply land_0. -Qed. - -(** * Tacticals. *) - -(** ** Main tactics.*) -(* -Ltac rewrite_cst := - first [ Bits.rewrite_cst - | COMPUTE1 bitwise_lsl Cst_Z Cst_nat - | COMPUTE1 bitwise_lsr Cst_Z Cst_nat - | COMPUTE1 lsl_shift_def Cst_Z Cst_nat - | COMPUTE1 lsr_shift_def Cst_Z Cst_nat - | COMPUTE1 lsl_arithmetic_def Cst_Z Cst_nat - | COMPUTE1 lsr_arithmetic_def Cst_Z Cst_nat - | COMPUTE1 lsl_def Cst_Z Cst_Z - | COMPUTE1 lsr_def Cst_Z Cst_Z - | COMPUTE1 land Cst_Z Cst_Z - | COMPUTE1 lor Cst_Z Cst_Z - | COMPUTE1 lxor Cst_Z Cst_Z - | COMPUTE1 lnot Cst_Z - | COMPUTE1 zbit_test_def Cst_Z Cst_Z - ]. -*) - -Ltac auto_zbits := autorewrite with zbits ; auto_bits. -Hint Rewrite lnot_0 land_0 lor_0 lxor_0 - lnot_1 land_1 lor_1 lxor_1 - lor_0 lor_1 land_idemp lor_idemp lxor_nilpotent: zbits. - -(** Example of use. *) -(* -Remark rewrite_cst_example: forall x, x + (land 0 (zlnot (land 0 5))) = x + Z_of_nat (ZxHpos 0). -Proof. - repeat rewrite_cst. - intro. auto. -Qed. -*) diff --git a/src/plugins/wp/share/src/alt_ergo_realize.ml b/src/plugins/wp/share/src/alt_ergo_realize.ml deleted file mode 100644 index 31bd1ce3ff9..00000000000 --- a/src/plugins/wp/share/src/alt_ergo_realize.ml +++ /dev/null @@ -1,468 +0,0 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(* File modified by CEA (Commissariat à l'énergie atomique et aux *) -(* énergies alternatives). *) -(* *) -(**************************************************************************) - -(** Frama-C: Add realization facilities from Coq printer - Based on version 8c2304845bb784a of src/printer/alt_ergo.ml -*) -open Why3 -open Theory - -let meta_rename_type = register_meta "rename_type" [MTtysymbol; MTstring] - ~desc:"Specify@ how@ to@ rename@ a@ type." - -let meta_rename_logic = register_meta "rename_logic" [MTlsymbol; MTstring] - ~desc:"Specify@ how@ to@ rename@ a@ function@ and@ predicate@ logic." - -(** Alt-ergo printer *) - -open Format -open Pp -open Ident -open Ty -open Term -open Decl -open Printer - -let meta_ac = Theory.register_meta "AC" [Theory.MTlsymbol] - ~desc:"Specify@ that@ a@ symbol@ is@ associative@ and@ commutative." - -let meta_printer_option = - Theory.register_meta "printer_option" [Theory.MTstring] - ~desc:"Pass@ additional@ parameters@ to@ the@ pretty-printer." -let meta_invalid_trigger = - Theory.register_meta "invalid trigger" [Theory.MTlsymbol] - ~desc:"Specify@ that@ a@ symbol@ is@ not@ allowed@ in@ a@ trigger." - -type info = { - info_syn : syntax_map; - info_ac : Sls.t; - info_show_labels : bool; - info_type_casts : bool; - info_csm : lsymbol list Mls.t; - info_pjs : Sls.t; - info_axs : Spr.t; - info_inv_trig : Sls.t; - info_rename : string Mid.t; -} - -let ident_printer = - let bls = [ - "ac"; "and"; "array"; "as"; "axiom"; "bitv"; "bool"; - "check"; "cut"; "distinct"; "else"; "exists"; - "false"; "forall"; "function"; "goal"; - "if"; "in"; "include"; "int"; "inversion"; - "let"; "logic"; "not"; "or"; "parameter"; "predicate"; - "prop"; "real"; "rewriting"; "select"; "store"; - "then"; "true"; "type"; "unit"; "void"; "with"; - ] - in - let san = sanitizer char_to_alpha char_to_alnumus in - create_ident_printer bls ~sanitizer:san - -let print_ident fmt id = - fprintf fmt "%s" (id_unique ident_printer id) - -let print_label fmt l = - fprintf fmt "\"%s\"" l.lab_string - -let print_ident_label info fmt id = - if info.info_show_labels then - fprintf fmt "%s %a" - (id_unique ident_printer id) - (print_list space print_label) (Slab.elements id.id_label) - else - print_ident fmt id - -let print_ident_rename info fmt id = - try - pp_print_string fmt (Mid.find id info.info_rename) - with Not_found -> print_ident fmt id - -let forget_var v = forget_id ident_printer v.vs_name - -(* -let tv_printer = - let san = sanitizer char_to_lalpha char_to_alnumus in - create_ident_printer [] ~sanitizer:san - -let print_tvsymbol fmt tv = - fprintf fmt "'%s" (id_unique tv_printer tv.tv_name) - -let forget_tvs () = forget_all tv_printer -*) - -(* work around a "duplicate type variable" bug of Alt-Ergo 0.94 *) -let print_tvsymbol, forget_tvs = - let htv = Hid.create 5 in - (fun fmt tv -> - Hid.replace htv tv.tv_name (); - fprintf fmt "'%s" (id_unique ident_printer tv.tv_name)), - (fun () -> - Hid.iter (fun id _ -> forget_id ident_printer id) htv; - Hid.clear htv) - -let rec print_type info fmt ty = match ty.ty_node with - | Tyvar id -> - print_tvsymbol fmt id - | Tyapp (ts, tl) -> begin match query_syntax info.info_syn ts.ts_name with - | Some s -> syntax_arguments s (print_type info) fmt tl - | None -> - fprintf fmt "%a%a" (print_tyapp info) tl - (print_ident_rename info) ts.ts_name - end - -and print_tyapp info fmt = function - | [] -> () - | [ty] -> fprintf fmt "%a " (print_type info) ty - | tl -> fprintf fmt "(%a) " (print_list comma (print_type info)) tl - -(* can the type of a value be derived from the type of the arguments? *) -let unambig_fs fs = - let rec lookup v ty = match ty.ty_node with - | Tyvar u when tv_equal u v -> true - | _ -> ty_any (lookup v) ty - in - let lookup v = List.exists (lookup v) fs.ls_args in - let rec inspect ty = match ty.ty_node with - | Tyvar u when not (lookup u) -> false - | _ -> ty_all inspect ty - in - inspect (Opt.get fs.ls_value) - -let rec print_term info fmt t = match t.t_node with - | Tconst c -> - let number_format = { - Number.long_int_support = true; - Number.extra_leading_zeros_support = true; - Number.dec_int_support = Number.Number_default; - Number.hex_int_support = Number.Number_unsupported; - Number.oct_int_support = Number.Number_unsupported; - Number.bin_int_support = Number.Number_unsupported; - Number.def_int_support = Number.Number_unsupported; - Number.dec_real_support = Number.Number_default; - Number.hex_real_support = Number.Number_default; - Number.frac_real_support = Number.Number_unsupported; - Number.def_real_support = Number.Number_unsupported; - } in - Number.print number_format fmt c - | Tvar { vs_name = id } -> - print_ident fmt id - | Tapp (ls, tl) -> begin match query_syntax info.info_syn ls.ls_name with - | Some s -> syntax_arguments s (print_term info) fmt tl - | None when Mls.mem ls info.info_csm -> - let print_field fmt ({ls_name = id},t) = - fprintf fmt "%a =@ %a" print_ident id (print_term info) t in - fprintf fmt "{@ %a@ }" (print_list semi print_field) - (List.combine (Mls.find ls info.info_csm) tl) - | None when Sls.mem ls info.info_pjs -> - fprintf fmt "%a.%a" (print_tapp info) tl print_ident ls.ls_name - | None when unambig_fs ls || not info.info_type_casts -> - fprintf fmt "%a%a" - (print_ident_rename info) ls.ls_name - (print_tapp info) tl - | None -> - fprintf fmt "(%a%a : %a)" - (print_ident_rename info) ls.ls_name - (print_tapp info) tl - (print_type info) (t_type t) - end - | Tlet _ -> unsupportedTerm t - "alt-ergo : you must eliminate let in term" - | Tif _ -> unsupportedTerm t - "alt-ergo : you must eliminate if_then_else" - | Tcase _ -> unsupportedTerm t - "alt-ergo : you must eliminate match" - | Teps _ -> unsupportedTerm t - "alt-ergo : you must eliminate epsilon" - | Tquant _ | Tbinop _ | Tnot _ | Ttrue | Tfalse -> raise (TermExpected t) - -and print_tapp info fmt = function - | [] -> () - | tl -> fprintf fmt "(%a)" (print_list comma (print_term info)) tl - -let rec print_fmla info fmt f = - if info.info_show_labels then - match Slab.elements f.t_label with - | [] -> print_fmla_node info fmt f - | l -> - fprintf fmt "(%a : %a)" - (print_list colon print_label) l - (print_fmla_node info) f - else - print_fmla_node info fmt f - -and print_fmla_node info fmt f = match f.t_node with - | Tapp ({ ls_name = id }, []) -> print_ident_rename info fmt id - | Tapp (ls, tl) -> begin match query_syntax info.info_syn ls.ls_name with - | Some s -> syntax_arguments s (print_term info) fmt tl - | None -> fprintf fmt "%a(%a)" (print_ident_rename info) ls.ls_name - (print_list comma (print_term info)) tl - end - | Tquant (q, fq) -> - let vl, tl, f = t_open_quant fq in - let q, tl = match q with - | Tforall -> "forall", tl - | Texists -> "exists", [] (* Alt-ergo has no triggers for exists *) - in - let forall fmt v = - fprintf fmt "%s %a:%a" q (print_ident_label info) v.vs_name - (print_type info) v.vs_ty - in - fprintf fmt "@[(%a%a.@ %a)@]" (print_list dot forall) vl - (print_triggers info) tl (print_fmla info) f; - List.iter forget_var vl - | Tbinop (Tand, f1, f2) -> - fprintf fmt "(%a and@ %a)" (print_fmla info) f1 (print_fmla info) f2 - | Tbinop (Tor, f1, f2) -> - fprintf fmt "(%a or@ %a)" (print_fmla info) f1 (print_fmla info) f2 - | Tbinop (Timplies, f1, f2) -> - fprintf fmt "(%a ->@ %a)" (print_fmla info) f1 (print_fmla info) f2 - | Tbinop (Tiff, f1, f2) -> - fprintf fmt "(%a <->@ %a)" (print_fmla info) f1 (print_fmla info) f2 - | Tnot f -> - fprintf fmt "(not %a)" (print_fmla info) f - | Ttrue -> - fprintf fmt "true" - | Tfalse -> - fprintf fmt "false" - | Tif (f1, f2, f3) -> - fprintf fmt "((%a and@ %a)@ or@ (not@ %a and@ %a))" - (print_fmla info) f1 (print_fmla info) f2 (print_fmla info) - f1 (print_fmla info) f3 - | Tlet _ -> unsupportedTerm f - "alt-ergo: you must eliminate let in formula" - | Tcase _ -> unsupportedTerm f - "alt-ergo: you must eliminate match" - | Tvar _ | Tconst _ | Teps _ -> raise (FmlaExpected f) - -and print_expr info fmt = - TermTF.t_select (print_term info fmt) (print_fmla info fmt) - -and print_triggers info fmt tl = - let filter = function - | { t_ty = Some _ } -> true - | { t_node = Tapp (ps,_) } -> not (Sls.mem ps info.info_inv_trig) - | _ -> false in - let tl = List.map (List.filter filter) tl in - let tl = List.filter (function [] -> false | _::_ -> true) tl in - if tl = [] then () else fprintf fmt "@ [%a]" - (print_list alt (print_list comma (print_expr info))) tl - -let print_logic_binder info fmt v = - fprintf fmt "%a: %a" print_ident v.vs_name (print_type info) v.vs_ty - -let print_type_decl fmt ts = match ts.ts_args with - | [] -> fprintf fmt "type %a" - print_ident ts.ts_name - | [tv] -> fprintf fmt "type %a %a" - print_tvsymbol tv print_ident ts.ts_name - | tl -> fprintf fmt "type (%a) %a" - (print_list comma print_tvsymbol) tl print_ident ts.ts_name - -let print_enum_decl fmt ts csl = - let print_cs fmt (ls,_) = print_ident fmt ls.ls_name in - fprintf fmt "@[<hov 2>type %a =@ %a@]@\n@\n" print_ident ts.ts_name - (print_list alt2 print_cs) csl - -let print_ty_decl info fmt ts = - if ts.ts_def <> NoDef then () else - if Mid.mem ts.ts_name info.info_syn then () else - (fprintf fmt "%a@\n@\n" print_type_decl ts; forget_tvs ()) - -let print_data_decl info fmt = function - | ts, csl (* monomorphic enumeration *) - when ts.ts_args = [] && List.for_all (fun (_,l) -> l = []) csl -> - print_enum_decl fmt ts csl - | ts, [cs,_] (* non-recursive records *) - when Mls.mem cs info.info_csm -> - let pjl = Mls.find cs info.info_csm in - let print_field fmt ls = - fprintf fmt "%a@ :@ %a" print_ident ls.ls_name - (print_type info) (Opt.get ls.ls_value) in - fprintf fmt "%a@ =@ {@ %a@ }@\n@\n" print_type_decl ts - (print_list semi print_field) pjl - | _, _ -> unsupported - "alt-ergo : algebraic datatype are not supported" - -let print_data_decl info fmt ((ts, _csl) as p) = - if Mid.mem ts.ts_name info.info_syn then () else - print_data_decl info fmt p - -let print_param_decl info fmt ls = - let sac = if Sls.mem ls info.info_ac then "ac " else "" in - fprintf fmt "@[<hov 2>logic %s%a : %a%s%a@]@\n@\n" - sac (print_ident_rename info) ls.ls_name - (print_list comma (print_type info)) ls.ls_args - (if ls.ls_args = [] then "" else " -> ") - (print_option_or_default "prop" (print_type info)) ls.ls_value - -let print_param_decl info fmt ls = - if Mid.mem ls.ls_name info.info_syn || Sls.mem ls info.info_pjs - then () else (print_param_decl info fmt ls; forget_tvs ()) - -let print_logic_decl info fmt ls ld = - let vl,e = open_ls_defn ld in - begin match e.t_ty with - | Some _ -> - (* TODO AC? *) - fprintf fmt "@[<hov 2>function %a(%a) : %a =@ %a@]@\n@\n" - (print_ident_rename info) ls.ls_name - (print_list comma (print_logic_binder info)) vl - (print_type info) (Opt.get ls.ls_value) - (print_term info) e - | None -> - fprintf fmt "@[<hov 2>predicate %a(%a) =@ %a@]@\n@\n" - (print_ident_rename info) ls.ls_name - (print_list comma (print_logic_binder info)) vl - (print_fmla info) e - end; - List.iter forget_var vl - -let print_logic_decl info fmt (ls,ld) = - if Mid.mem ls.ls_name info.info_syn || Sls.mem ls info.info_pjs - then () else (print_logic_decl info fmt ls ld; forget_tvs ()) - -let print_prop_decl info fmt k pr f = match k with - | Paxiom -> - fprintf fmt "@[<hov 2>axiom %a :@ %a@]@\n@\n" - print_ident pr.pr_name (print_fmla info) f - | Pgoal -> - fprintf fmt "@[<hov 2>goal %a :@ %a@]@\n" - print_ident pr.pr_name (print_fmla info) f - | Plemma| Pskip -> assert false - -let print_prop_decl info fmt k pr f = - if Mid.mem pr.pr_name info.info_syn || Spr.mem pr info.info_axs - then () else (print_prop_decl info fmt k pr f; forget_tvs ()) - -let print_decl info fmt d = match d.d_node with - | Dtype ts -> - print_ty_decl info fmt ts - | Ddata dl -> - print_list nothing (print_data_decl info) fmt dl - | Dparam ls -> - print_param_decl info fmt ls - | Dlogic dl -> - print_list nothing (print_logic_decl info) fmt dl - | Dind _ -> unsupportedDecl d - "alt-ergo: inductive definitions are not supported" - | Dprop (k,pr,f) -> print_prop_decl info fmt k pr f - - -let add_projection (csm,pjs,axs) = function - | [Theory.MAls ls; Theory.MAls cs; Theory.MAint ind; Theory.MApr pr] -> - let csm = try Array.set (Mls.find cs csm) ind ls; csm - with Not_found -> - Mls.add cs (Array.make (List.length cs.ls_args) ls) csm in - csm, Sls.add ls pjs, Spr.add pr axs - | _ -> assert false - -let check_showlabels acc = function - | [Theory.MAstr "show_labels"] -> true - | [Theory.MAstr _] -> acc - | _ -> assert false - -let check_typecasts acc = function - | [Theory.MAstr "no_type_cast"] -> false - | [Theory.MAstr _] -> acc - | _ -> assert false - - -let print_task env info realize thpr fmt task = - (* eprintf "Task:%a@.@." Pretty.print_task task; *) - (** find theories that are both used and realized from metas *) - let realized_theories = - Task.on_meta meta_realized_theory (fun mid args -> - match args with - | [Theory.MAstr s1; Theory.MAstr s2] -> - (** TODO: do not split string; - in fact, do not even use a string argument *) - let f,id = - let l = Strings.rev_split '.' s1 in - List.rev (List.tl l), List.hd l in - let th = Env.read_theory env f id in - Mid.add th.Theory.th_name (th, if s2 = "" then s1 else s2) mid - | _ -> assert false - ) Mid.empty task in - (** 2 cases: goal is clone T with [] or goal is a real goal *) - let rec upd_realized_theories = function - | Some { Task.task_decl = { Theory.td_node = - Theory.Decl { Decl.d_node = Decl.Dprop (Decl.Pgoal, _, _) }}} -> - realized_theories - | Some { Task.task_decl = { Theory.td_node = Theory.Clone (th,_) }} -> - Mid.remove th.Theory.th_name realized_theories - | Some { Task.task_decl = { Theory.td_node = Theory.Meta _ }; - Task.task_prev = task } -> - upd_realized_theories task - | _ -> assert false in - let realized_theories = upd_realized_theories task in - (** 3) Print prelude of not realized theories *) - let thpr = Mid.filter (fun id _ -> not (Mid.mem id realized_theories)) thpr in - print_th_prelude task fmt thpr; - (** 4) keep only the declaration of the theories not realized *) - let realized_theories' = - Mid.map (fun (th,s) -> - fprintf fmt "(** The theory %s must be appended to this file*)@\n" s; th) - realized_theories in - let realized_symbols = Task.used_symbols realized_theories' in - let local_decls = Task.local_decls task realized_symbols in - (* eprintf "local_decls:%i@." (List.length local_decls); *) - (* associate a special printer to each symbol in a realized theory *) - print_list nothing (print_decl info) fmt local_decls - -let print_decls env fmt thpr task = - (** Trans. are just used for convenience no memoization kept *) - Trans.apply ( - Trans.on_tagged_ls meta_ac (fun ac -> - Trans.on_meta meta_printer_option (fun args -> - let sl = List.fold_left check_showlabels false args in - let tc = List.fold_left check_typecasts true args in - Trans.on_meta Eliminate_algebraic.meta_proj (fun mal -> - Trans.on_tagged_ls meta_invalid_trigger (fun inv_trig -> - let csm,pjs,axs = List.fold_left - add_projection (Mls.empty,Sls.empty,Spr.empty) mal in - Trans.on_meta meta_rename_type ( fun lt -> - Trans.on_meta meta_rename_logic ( fun ll -> - let fold_lt acc = function - | [MAts ts; MAstr s] -> Mid.add ts.ts_name s acc - | _ -> assert false in - let fold_ll acc = function - | [MAls ls; MAstr s] -> Mid.add ls.ls_name s acc - | _ -> assert false in - let info_rename = Mid.empty in - let info_rename = List.fold_left fold_lt info_rename lt in - let info_rename = List.fold_left fold_ll info_rename ll in - Trans.store (fun task -> - let info = { - info_syn = get_syntax_map task; - info_ac = ac; - info_show_labels = sl; - info_type_casts = tc; - info_csm = Mls.map Array.to_list csm; - info_pjs = pjs; - info_axs = axs; - info_rename = info_rename; - info_inv_trig = Sls.add ps_equ inv_trig; - } in - print_task env info (*realize*) true thpr fmt task)))))))) task - -let print_task args ?old:_ fmt task = - forget_all ident_printer; - print_prelude fmt args.Printer.prelude; - try - print_decls args.Printer.env fmt args.th_prelude task - with exn -> Format.printf "In the printer:%a" Exn_printer.exn_printer exn - -let () = register_printer "alt-ergo-realize" print_task - ~desc:"Printer for the Alt-Ergo theorem prover." diff --git a/src/plugins/wp/share/src/alt_ergo_why3_stdlib.drv b/src/plugins/wp/share/src/alt_ergo_why3_stdlib.drv deleted file mode 100644 index c913ef7afd4..00000000000 --- a/src/plugins/wp/share/src/alt_ergo_why3_stdlib.drv +++ /dev/null @@ -1,67 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of WP plug-in of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat a l'energie atomique et aux energies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -theory int.Int - remove prop CompatOrderMult -end - -theory int.Abs - meta "rename_logic" function abs, "abs_int" -end - -theory int.MinMax - meta "rename_logic" function min, "min_int" - meta "rename_logic" function max, "max_int" -end - -theory int.ComputerDivision - remove prop Div_mod - remove prop Mod_bound - remove prop Div_sign_pos - remove prop Div_sign_neg - remove prop Mod_sign_pos - remove prop Mod_sign_neg - remove prop Rounds_toward_zero -end - -theory real.Real - remove prop CompatOrderMult -end - -theory real.Abs - meta "rename_logic" function abs, "abs_real" -end - -theory real.MinMax - meta "rename_logic" function min, "min_real" - meta "rename_logic" function max, "max_real" -end - -theory map.Const - -end - - -theory qed.Qed - syntax function pdiv "(%1 / %2)" - syntax function pmod "(%1 % %2)" -end diff --git a/src/plugins/wp/share/src/cbits.why b/src/plugins/wp/share/src/cbits.why deleted file mode 100644 index 390b7b20266..00000000000 --- a/src/plugins/wp/share/src/cbits.why +++ /dev/null @@ -1,594 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of WP plug-in of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat a l'energie atomique et aux energies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -(* -------------------------------------------------------------------------- *) -(* --- C-Bits Arithmetics for Why-3 --- *) -(* -------------------------------------------------------------------------- *) - -theory Cbits - - use import int.Int - use import bool.Bool - use import cint.Cint - use import qed.Qed - -(** * Bitwise identities *) -(** ** lnot identities *) - axiom lnot_bool: ((lnot 0) = (-1)) /\ ((lnot (-1)) = 0) - -(** ** land identities *) - axiom land_idemp: forall x:int [land x x]. (land x x) = x - axiom land_0: forall x:int [land 0 x]. (land 0 x) = 0 - axiom land_0bis: forall x:int [land x 0]. (land x 0) = 0 - axiom land_1: forall x:int [land (-1) x]. (land (-1) x) = x - axiom land_1bis: forall x:int [land x (-1)]. (land x (-1)) = x - axiom land_bool: - (land 0 0) = 0 /\ (land 0 1) = 0 /\ (land 1 0) = 0 /\ (land 1 1) = 1 - meta "remove_for_" prop land_bool - -(** ** lor identities *) - axiom lor_idemp: forall x:int [lor x x]. (lor x x) = x - axiom lor_1: forall x:int [lor (-1) x]. (lor (-1) x) = -1 - axiom lor_1bis: forall x:int [lor x (-1)]. (lor x (-1)) = -1 - axiom lor_0: forall x:int [lor 0 x]. (lor 0 x) = x - axiom lor_0bis: forall x:int [lor x 0]. (lor x 0) = x - axiom lor_bool: - (lor 0 0) = 0 /\ (lor 0 1) = 1 /\ (lor 1 0) = 1 /\ (lor 1 1) = 1 - meta "remove_for_" prop lor_bool - -(** ** lxor identities *) - axiom lxor_nilpotent: forall x:int [lxor x x]. (lxor x x) = 0 - axiom lxor_1: forall x:int [lxor (-1) x]. (lxor (-1) x) = (lnot x) - axiom lxor_1bis: forall x:int [lxor x (-1)]. (lxor x (-1)) = (lnot x) - axiom lxor_0: forall x:int [lxor 0 x]. (lxor 0 x) = x - axiom lxor_0bis: forall x:int [lxor x 0]. (lxor x 0) = x - axiom lxor_bool: - (lxor 0 0) = 0 /\ (lxor 0 1) = 1 /\ (lxor 1 0) = 1 /\ (lxor 1 1) = 0 - meta "remove_for_" prop lxor_bool - -(** * Bit extraction *) -(** ** Definition of bit_test predicate *) - - axiom bit_test_def: forall x k:int [bit_testb x k]. - (bit_testb x k = True) <-> bit_test x k - -(** * Link between Bit extraction and bitwise operators *) -(** ** Some properties of bit extration *) -(** ** Logical operators *) - - axiom bit_test_extraction: forall x k:int [land x (lsl 1 k)|land (lsl 1 k) x]. - 0<=k -> (land x (lsl 1 k))<>0 <-> (bit_test x k) - lemma bit_test_extraction_eq: forall x k:int [land x (lsl 1 k)|land (lsl 1 k) x]. - 0<=k -> (land x (lsl 1 k))=(lsl 1 k) <-> (bit_test x k) - meta "remove_for_" prop bit_test_extraction_eq - - axiom lsl_1_0: - lsl 1 0 = 1 - axiom bit_test_extraction_bis: forall x :int [land x 1|land 1 x]. - (land 1 x)<>0 -> (bit_test x 0) - axiom bit_test_extraction_bis_eq: forall x :int [land x 1|land 1 x]. - (bit_test x 0) -> (land 1 x)=1 - - lemma lnot_extraction_bool: forall x i:int [bit_testb (lnot x) i]. - 0<=i -> bit_testb (lnot x) i = notb (bit_testb x i) - axiom lnot_extraction: forall x i:int [bit_test (lnot x) i]. - 0<=i -> (bit_test (lnot x) i) <-> not (bit_test x i) - meta "remove_for_" prop lnot_extraction_bool - - lemma land_extraction_bool: forall x y i:int [bit_testb (land x y) i]. - 0<=i -> bit_testb (land x y) i = andb (bit_testb x i) (bit_testb y i) - axiom land_extraction: forall x y i:int [bit_test (land x y) i]. - 0<=i -> bit_test (land x y) i <-> ((bit_test x i) /\ (bit_test y i)) - meta "remove_for_" prop land_extraction_bool - - lemma lor_extraction_bool: forall x y i:int [bit_testb (lor x y) i]. - 0<=i -> bit_testb (lor x y) i = orb (bit_testb x i) (bit_testb y i) - axiom lor_extraction: forall x y i:int [bit_test (lor x y) i]. - 0<=i -> (bit_test (lor x y) i) <-> ((bit_test x i) \/ (bit_test y i)) - meta "remove_for_" prop lor_extraction_bool - - lemma lxor_extraction_bool: forall x y i:int [bit_testb (lxor x y) i]. - 0<=i -> bit_testb (lxor x y) i = xorb (bit_testb x i) (bit_testb y i) - axiom lxor_extraction: forall x y i:int [bit_test (lxor x y) i]. - 0<=i -> (bit_test (lxor x y) i) <-> (bit_test x i) <-> not (bit_test y i) - meta "remove_for_" prop lxor_extraction_bool - -(** ** Shift operators *) - lemma lsl_1_two_power : forall n : int. 0 <= n -> lsl 1 n = Cint.two_power_abs n - meta "remove_for_" prop lsl_1_two_power - - axiom land_1_lsl_1 : forall a x n : int [(lsl 1 (1+n)),(lsl 1 n),(2*a+(land 1 x))] . - 0<=n -> a<lsl 1 n -> 2*a+(land 1 x)<lsl 1 (1+n) - - lemma lsl_extraction_sup_bool: forall x n m:int [bit_testb (lsl x n) m]. - 0<=n -> 0<=m -> m>=n -> bit_testb (lsl x n) m = bit_testb x (m-n) - axiom lsl_extraction_sup: forall x n m:int [bit_test (lsl x n) m]. - 0<=n -> 0<=m -> m>=n -> (bit_test (lsl x n) m) <-> (bit_test x (m-n)) - meta "remove_for_" prop lsl_extraction_sup_bool - - lemma lsl_extraction_inf_bool: forall x n m:int [bit_testb (lsl x n) m]. - 0<=n -> 0<=m -> m< n -> bit_testb (lsl x n) m = False - axiom lsl_extraction_inf: forall x n m:int [bit_test (lsl x n) m]. - 0<=n -> 0<=m -> m< n -> not (bit_test (lsl x n) m) - meta "remove_for_" prop lsl_extraction_inf_bool - - lemma lsr_extraction_bool: forall x n m:int [bit_testb (lsr x n) m]. - 0<=n -> 0<=m -> bit_testb (lsr x n) m = bit_testb x (m+n) - axiom lsr_extractionl: forall x n m:int [bit_test (lsr x n) m]. - 0<=n -> 0<=m -> (bit_test (lsr x n) m) <-> (bit_test x (m+n)) - meta "remove_for_" prop lsr_extraction_bool - - lemma lsl1_extraction_bool: forall i j:int [bit_testb (lsl 1 i) j]. - 0<=i -> 0<=j -> bit_testb (lsl 1 i) j = eqb i j - axiom lsl1_extraction: forall i j:int [bit_test (lsl 1 i) j]. - 0<=i -> 0<=j -> (bit_test (lsl 1 i) j) <-> i=j - meta "remove_for_" prop lsl1_extraction_bool - - lemma pos_extraction_sup: forall x i j:int [(lsl 1 i),(bit_test x j)]. - 0<=x -> 0<=i -> x < (lsl 1 i) -> i <= j -> not (bit_test x j) - meta "remove_for_" prop pos_extraction_sup - - lemma pos_extraction_sup_inv: forall x i :int . - 0<=i -> (forall j: int . i <= j -> not (bit_test x j)) -> 0<= x < (lsl 1 i) - meta "remove_for_" prop pos_extraction_sup_inv - -(** * Link between Bit extraction and C type conversions *) -(** ** Unsigned conversions *) - - lemma to_uint_extraction_sup: forall n x i:int . - 0<=n<=i -> is_uint n x -> not (bit_test x i) - lemma to_uint_extraction_inf_bool: forall n x i:int . - 0<=i<n -> (bit_testb (to_uint n x) i) = (bit_testb x i) - lemma to_uint_extraction_inf: forall n x i:int . - 0<=i<n -> (bit_test (to_uint n x) i) <-> (bit_test x i) - lemma is_uint_ext : forall n x y:int . - 0<=n -> is_uint n x -> is_uint n y - -> (forall i: int. 0<=i<n -> (bit_test x i <-> bit_test y i)) - -> x = y - meta "remove_for_" prop to_uint_extraction_sup - meta "remove_for_" prop to_uint_extraction_inf_bool - meta "remove_for_" prop to_uint_extraction_inf - meta "remove_for_" prop is_uint_ext - -(** *** Cast to uint8 C type *) - axiom to_uint8_extraction_sup: forall x i:int [(is_uint8 x),(bit_test x i)]. - 8<=i -> is_uint8 x -> not (bit_test x i) - - lemma to_uint8_extraction_inf_bool: forall x i:int [bit_testb (to_uint8 x) i]. - 0<=i<8 -> (bit_testb (to_uint8 x) i) = (bit_testb x i) - axiom to_uint8_extraction_inf: forall x i:int [bit_test (to_uint8 x) i]. - 0<=i<8 -> (bit_test (to_uint8 x) i) <-> (bit_test x i) - meta "remove_for_" prop to_uint8_extraction_inf_bool - - lemma is_uint8_ext : forall x y:int . - is_uint8 x -> is_uint8 y - -> (forall i: int. 0<=i<8 -> (bit_test x i <-> bit_test y i)) - -> x = y - meta "remove_for_" prop is_uint8_ext - -(** *** Cast to uint16 C type *) - axiom to_uint16_extraction_sup: forall x i:int [(is_uint16 x),(bit_test x i)]. - 16<=i -> is_uint16 x -> not (bit_test x i) - - lemma to_uint16_extraction_inf_bool: forall x i:int [bit_testb (to_uint16 x) i]. - 0<=i<16 -> (bit_testb (to_uint16 x) i) = (bit_testb x i) - axiom to_uint16_extraction_inf: forall x i:int [bit_test (to_uint16 x) i]. - 0<=i<16 -> (bit_test (to_uint16 x) i) <-> (bit_test x i) - meta "remove_for_" prop to_uint16_extraction_inf_bool - - lemma is_uint16_ext : forall x y:int . - is_uint16 x -> is_uint16 y - -> (forall i: int. 0<=i<16 -> (bit_test x i <-> bit_test y i)) - -> x = y - meta "remove_for_" prop is_uint16_ext - -(** *** Cast to uint32 C type *) - axiom to_uint32_extraction_sup: forall x i:int [(is_uint32 x),(bit_test x i)]. - 32<=i -> is_uint32 x -> not (bit_test x i) - - lemma to_uint32_extraction_inf_bool: forall x i:int [bit_testb (to_uint32 x) i]. - 0<=i<32 -> (bit_testb (to_uint32 x) i) = (bit_testb x i) - axiom to_uint32_extraction_inf: forall x i:int [bit_test (to_uint32 x) i]. - 0<=i<32 -> (bit_test (to_uint32 x) i) <-> (bit_test x i) - meta "remove_for_" prop to_uint32_extraction_inf_bool - - lemma is_uint32_ext : forall x y:int . - is_uint32 x -> is_uint32 y - -> (forall i: int. 0<=i<32 -> (bit_test x i <-> bit_test y i)) - -> x = y - meta "remove_for_" prop is_uint32_ext - -(** *** Cast to uint64 C type *) - axiom to_uint64_extraction_sup: forall x i:int [(is_uint64 x),(bit_test x i)]. - 64<=i -> (is_uint64 x) -> not (bit_test x i) - - lemma to_uint64_extraction_inf_bool: forall x i:int [bit_testb (to_uint64 x) i]. - 0<=i<64 -> (bit_testb (to_uint64 x) i) = (bit_testb x i) - axiom to_uint64_extraction_inf: forall x i:int [bit_test (to_uint64 x) i]. - 0<=i<64 -> (bit_test (to_uint64 x) i) <-> (bit_test x i) - meta "remove_for_" prop to_uint64_extraction_inf_bool - - lemma is_uint64_ext : forall x y:int . - is_uint64 x -> is_uint64 y - -> (forall i: int. 0<=i<64 -> (bit_test x i <-> bit_test y i)) - -> x = y - meta "remove_for_" prop is_uint64_ext - -(** ** Signed conversions *) - lemma to_sint_extraction_sup: forall n x i:int . - 0<=n<=i -> is_sint n x -> (bit_test x i) <-> x < 0 - lemma to_sint_extraction_inf_bool: forall n x i:int . - 0<=i<n -> (bit_testb (to_sint n x) i) = (bit_testb x i) - lemma to_sint_extraction_inf: forall n x i:int . - 0<=i<n -> (bit_test (to_sint n x) i) <-> (bit_test x i) - lemma is_sint_ext : forall n x y:int . - 0<=n -> is_sint n x -> is_sint n y - -> (forall i: int. 0<=i<=n -> (bit_test x i <-> bit_test y i)) - -> x = y - meta "remove_for_" prop to_sint_extraction_sup - meta "remove_for_" prop to_sint_extraction_inf_bool - meta "remove_for_" prop to_sint_extraction_inf - meta "remove_for_" prop is_sint_ext - -(** *** Cast to sint8 C type *) - axiom to_sint8_extraction_sup: forall x i:int [(is_sint8 x),(bit_test x i)]. - 7<=i -> is_sint8 x -> (bit_test x i) <-> x < 0 - - lemma to_sint8_extraction_inf_bool: forall x i:int [(bit_testb (to_sint8 x) i)]. - 0<=i<7 -> (bit_testb (to_sint8 x) i) = (bit_testb x i) - axiom to_sint8_extraction_inf: forall x i:int [(bit_test (to_sint8 x) i)]. - 0<=i<7 -> (bit_test (to_sint8 x) i) <-> (bit_test x i) - meta "remove_for_" prop to_sint8_extraction_inf_bool - - lemma is_sint8_ext : forall x y:int . - is_sint8 x -> is_sint8 y - -> (forall i: int. 0<=i<=7 -> (bit_test x i <-> bit_test y i)) - -> x = y - meta "remove_for_" prop is_sint8_ext - -(** *** Cast to sint16 C type *) - axiom to_sint16_extraction_sup: forall x i:int [(is_sint16 x),(bit_test x i)]. - 15<=i -> is_sint16 x -> (bit_test x i) <-> x < 0 - - lemma to_sint16_extraction_inf_bool: forall x i:int [bit_testb (to_sint16 x) i]. - 0<=i<15 -> (bit_testb (to_sint16 x) i) = (bit_testb x i) - axiom to_sint16_extraction_inf: forall x i:int [bit_test (to_sint16 x) i]. - 0<=i<15 -> (bit_test (to_sint16 x) i) <-> (bit_test x i) - meta "remove_for_" prop to_sint16_extraction_inf_bool - - lemma is_sint16_ext : forall x y:int . - is_sint16 x -> is_sint16 y - -> (forall i: int. 0<=i<=15 -> (bit_test x i <-> bit_test y i)) - -> x = y - meta "remove_for_" prop is_sint16_ext - -(** *** Cast to sint32 C type *) - axiom to_sint32_extraction_sup: forall x i:int [(is_sint32 x),(bit_test x i)]. - 31<=i -> is_sint32 x -> (bit_test x i) <-> x < 0 - - lemma to_sint32_extraction_inf_bool: forall x i:int [bit_testb (to_sint32 x) i]. - 0<=i<31 -> (bit_testb (to_sint32 x) i) = (bit_testb x i) - axiom to_sint32_extraction_inf: forall x i:int [bit_test (to_sint32 x) i]. - 0<=i<31 -> (bit_test (to_sint32 x) i) <-> (bit_test x i) - meta "remove_for_" prop to_sint32_extraction_inf_bool - - lemma is_sint32_ext : forall x y:int . - is_sint32 x -> is_sint32 y - -> (forall i: int. 0<=i<=31 -> (bit_test x i <-> bit_test y i)) - -> x = y - meta "remove_for_" prop is_sint32_ext - -(** *** Cast to sint64 C type *) - axiom to_sint64_extraction_sup: forall x i:int [(is_sint64 x),(bit_test x i)]. - 63<=i -> is_sint64 x -> (bit_test x i) <-> x < 0 - - lemma to_sint64_extraction_inf_bool: forall x i:int [bit_testb (to_sint64 x) i]. - 0<=i<63 -> (bit_testb (to_sint64 x) i) = (bit_testb x i) - axiom to_sint64_extraction_inf: forall x i:int [bit_test (to_sint64 x) i]. - 0<=i<63 -> (bit_test (to_sint64 x) i) <-> (bit_test x i) - meta "remove_for_" prop to_sint64_extraction_inf_bool - - lemma is_sint64_ext : forall x y:int . - is_sint64 x -> is_sint64 y - -> (forall i: int. 0<=i<=63 -> (bit_test x i <-> bit_test y i)) - -> x = y - meta "remove_for_" prop is_sint64_ext - -(** * Some C-Integer Bits Conversions are distributive *) -(** ** Unsigned conversions *) - lemma to_uint_lor : forall n x y:int. - to_uint n (lor x y) = lor (to_uint n x) (to_uint n y) - meta "remove_for_" prop to_uint_lor - -(** *** Cast to uint8 C type *) - lemma to_uint8_lor : forall x y:int [to_uint8 (lor x y)]. - to_uint8 (lor x y) = lor (to_uint8 x) (to_uint 8 y) - meta "remove_for_" prop to_uint8_lor - -(** *** Cast to uint16 C type *) - lemma to_uint16_lor : forall x y:int [to_uint16 (lor x y)]. - to_uint16 (lor x y) = lor (to_uint16 x) (to_uint16 y) - meta "remove_for_" prop to_uint16_lor - -(** *** Cast to uint32 C type *) - axiom to_uint32_lor : forall x y:int [to_uint32 (lor x y)]. - to_uint32 (lor x y) = lor (to_uint32 x) (to_uint32 y) - meta "remove_for_" prop to_uint32_lor - -(** *** Cast to uint64 C type *) - lemma to_uint64_lor : forall x y:int [to_uint64 (lor x y)]. - to_uint64 (lor x y) = lor (to_uint64 x) (to_uint64 y) - meta "remove_for_" prop to_uint64_lor - -(** * Some C-Integer Bits Conversions are identity *) -(** ** Unsigned conversions *) - lemma is_uint_lxor : forall n x y:int. - is_uint n x -> is_uint n y -> to_uint n (lxor x y) = lxor x y - lemma is_uint_lor : forall n x y:int. - is_uint n x -> is_uint n y -> to_uint n (lor x y) = lor x y - lemma is_uint_land : forall n x y:int. - is_uint n x -> is_uint n y -> to_uint n (land x y) = land x y - lemma is_uint_lsr : forall n x y:int. - 0<=y -> is_uint n x -> to_uint n (lsr x y) = lsr x y - lemma is_uint_lsl1_inf : forall n y:int. - 0<=y<n -> to_uint n (lsl 1 y) = lsl 1 y - lemma is_uint_lsl1_sup : forall n y:int. - 0<=n<=y -> to_uint n (lsl 1 y) = 0 - meta "remove_for_" prop is_uint_lor - meta "remove_for_" prop is_uint_land - meta "remove_for_" prop is_uint_lsr - meta "remove_for_" prop is_uint_lsl1_inf - meta "remove_for_" prop is_uint_lsl1_sup - -(** *** Cast to uint8 C type *) - axiom is_uint8_lxor : forall x y:int [to_uint8 (lxor x y)]. - is_uint8 x -> is_uint8 y -> to_uint8 (lxor x y) = lxor x y - - axiom is_uint8_lor : forall x y:int [to_uint8 (lor x y)]. - is_uint8 x -> is_uint8 y -> to_uint8 (lor x y) = lor x y - - axiom is_uint8_land : forall x y:int [to_uint8 (land x y)]. - is_uint8 x -> is_uint8 y -> to_uint8 (land x y) = land x y - - axiom is_uint8_lsr : forall x y:int [to_uint8 (lsr x y)]. - 0<=y -> is_uint8 x -> to_uint8 (lsr x y) = lsr x y - - axiom is_uint8_lsl1_inf : forall y:int [to_uint8 (lsl 1 y)]. - 0<=y<8 -> to_uint8 (lsl 1 y) = lsl 1 y - - axiom is_uint8_lsl1_sup : forall y:int [to_uint8 (lsl 1 y)]. - 8<=y -> to_uint8 (lsl 1 y) = 0 - -(** *** Cast to uint16 C type *) - axiom is_uint16_lxor : forall x y:int [to_uint16 (lxor x y)]. - is_uint16 x -> is_uint16 y -> to_uint16 (lxor x y) = lxor x y - - axiom is_uint16_lor : forall x y:int [to_uint16 (lor x y)]. - is_uint16 x -> is_uint16 y -> to_uint16 (lor x y) = lor x y - - axiom is_uint16_land : forall x y:int [to_uint16 (land x y)]. - is_uint16 x -> is_uint16 y -> to_uint16 (land x y) = land x y - - axiom is_uint16_lsr : forall x y:int [to_uint16 (lsr x y)]. - 0<=y -> is_uint16 x -> to_uint16 (lsr x y) = lsr x y - - axiom is_uint16_lsl1_inf : forall y:int [to_uint16 (lsl 1 y)]. - 0<=y<16 -> to_uint16 (lsl 1 y) = lsl 1 y - - axiom is_uint16_lsl1_sup : forall y:int [to_uint16 (lsl 1 y)]. - 16<=y -> to_uint16 (lsl 1 y) = 0 - -(** *** Cast to uint32 C type *) - axiom is_uint32_lxor : forall x y:int [to_uint32 (lxor x y)]. - is_uint32 x -> is_uint32 y -> to_uint32 (lxor x y) = lxor x y - - axiom is_uint32_lor : forall x y:int [to_uint32 (lor x y)]. - is_uint32 x -> is_uint32 y -> to_uint32 (lor x y) = lor x y - - axiom is_uint32_land : forall x y:int [to_uint32 (land x y)]. - is_uint32 x -> is_uint32 y -> to_uint32 (land x y) = land x y - - axiom is_uint32_lsr : forall x y:int [to_uint32 (lsr x y)]. - 0<=y -> is_uint32 x -> to_uint32 (lsr x y) = lsr x y - - axiom is_uint32_lsl1_inf : forall y:int [to_uint32 (lsl 1 y)]. - 0<=y<32 -> to_uint32 (lsl 1 y) = lsl 1 y - - axiom is_uint32_lsl1_sup : forall y:int [to_uint32 (lsl 1 y)]. - 32<=y -> to_uint32 (lsl 1 y) = 0 - -(** *** Cast to uint64 C type *) - axiom is_uint64_lxor : forall x y:int [to_uint64 (lxor x y)]. - is_uint64 x -> is_uint64 y -> to_uint64 (lxor x y) = lxor x y - - axiom is_uint64_lor : forall x y:int [to_uint64 (lor x y)]. - is_uint64 x -> is_uint64 y -> to_uint64 (lor x y) = lor x y - - axiom is_uint64_land : forall x y:int [to_uint64 (land x y)]. - is_uint64 x -> is_uint64 y -> to_uint64 (land x y) = land x y - - axiom is_uint64_lsr : forall x y:int [to_uint64 (lsr x y)]. - 0<=y -> is_uint64 x -> to_uint64 (lsr x y) = lsr x y - - axiom is_uint64_lsl1_inf : forall y:int [to_uint64 (lsl 1 y)]. - 0<=y<64 -> to_uint64 (lsl 1 y) = lsl 1 y - - axiom is_uint64_lsl1_sup : forall y:int [to_uint64 (lsl 1 y)]. - 64<=y -> to_uint64 (lsl 1 y) = 0 - -(** ** Signed conversions *) - lemma is_sint_lnot: forall n x:int. - is_sint n x -> to_sint n (lnot x) = lnot x - lemma is_sint_lxor: forall n x y:int. - is_sint n x -> is_sint n y -> to_sint n (lxor x y) = lxor x y - lemma is_sint_lor: forall n x y:int. - is_sint n x -> is_sint n y -> to_sint n (lor x y) = lor x y - lemma is_sint_land: forall n x y:int. - is_sint n x -> is_sint n y -> to_sint n (land x y) = land x y - lemma is_sint_lsr: forall n x y:int. - 0<=y -> is_sint n x -> to_sint n (lsr x y) = lsr x y - lemma is_sint_lsl1_inf : forall n y:int. - 0<=y<n -> to_sint n (lsl 1 y) = (lsl 1 y) - lemma is_sint_lsl1_sup : forall n y:int. - 0<=n<y -> to_sint n (lsl 1 y) = 0 - meta "remove_for_" prop is_sint_lnot - meta "remove_for_" prop is_sint_lxor - meta "remove_for_" prop is_sint_lor - meta "remove_for_" prop is_sint_land - meta "remove_for_" prop is_sint_lsr - meta "remove_for_" prop is_sint_lsl1_inf - meta "remove_for_" prop is_sint_lsl1_sup - -(** *** Cast to sint8 C type *) - axiom is_sint8_lnot: forall x:int [to_sint8 (lnot x)]. - is_sint8 x -> to_sint8 (lnot x) = lnot x - - axiom is_sint8_lxor: forall x y:int [to_sint8 (lxor x y)]. - is_sint8 x -> is_sint8 y -> to_sint8 (lxor x y) = lxor x y - - axiom is_sint8_lor: forall x y:int [to_sint8 (lor x y)]. - is_sint8 x -> is_sint8 y -> to_sint8 (lor x y) = lor x y - - axiom is_sint8_land: forall x y:int [to_sint8 (land x y)]. - is_sint8 x -> is_sint8 y -> to_sint8 (land x y) = land x y - - axiom is_sint8_lsr: forall x y:int [to_sint8 (lsr x y)]. - 0<=y -> is_sint8 x -> to_sint8 (lsr x y) = lsr x y - - axiom is_sint8_lsl1 : - lsl 1 7 = Cint.max_sint8 - - axiom is_sint8_lsl1_inf : forall y:int [to_sint8 (lsl 1 y)]. - 0<=y<7 -> to_sint8 (lsl 1 y) = lsl 1 y - - axiom is_sint8_lsl1_sup : forall y:int [to_sint8 (lsl 1 y)]. - 8<=y -> to_sint8 (lsl 1 y) = 0 - -(** *** Cast to sint16 C type *) - axiom is_sint16_lnot : forall x:int [to_sint16 (lnot x)]. - is_sint16 x -> to_sint16 (lnot x) = lnot x - - axiom is_sint16_lxor : forall x y:int [to_sint16 (lxor x y)]. - is_sint16 x -> is_sint16 y -> to_sint16 (lxor x y) = lxor x y - - axiom is_sint16_lor : forall x y:int [to_sint16 (lor x y)]. - is_sint16 x -> is_sint16 y -> to_sint16 (lor x y) = lor x y - - axiom is_sint16_land : forall x y:int [to_sint16 (land x y)]. - is_sint16 x -> is_sint16 y -> to_sint16 (land x y) = land x y - - axiom is_sint16_lsr : forall x y:int [to_sint16 (lsr x y)]. - 0<=y -> is_sint16 x -> to_sint16 (lsr x y) = lsr x y - - axiom is_sint16_lsl1 : - lsl 1 15 = Cint.max_sint16 - - axiom is_sint16_lsl1_inf : forall y:int [to_sint16 (lsl 1 y)]. - 0<=y<15 -> to_sint16 (lsl 1 y) = (lsl 1 y) - - axiom is_sint16_lsl1_sup : forall y:int [to_sint16 (lsl 1 y)]. - 16<=y -> to_sint16 (lsl 1 y) = 0 - -(** *** Cast to sint32 C type *) - axiom is_sint32_lnot : forall x:int [to_sint32(lnot(x))]. - is_sint32 x -> to_sint32 (lnot x) = lnot x - - axiom is_sint32_lxor : forall x y:int [to_sint32 (lxor x y)]. - is_sint32 x -> is_sint32 y -> to_sint32 (lxor x y) = lxor x y - - axiom is_sint32_lor : forall x y:int [to_sint32(lor x y)]. - is_sint32 x -> is_sint32 y -> to_sint32 (lor x y) = lor x y - - axiom is_sint32_land : forall x y:int [to_sint32 (land x y)]. - is_sint32 x -> is_sint32 y -> to_sint32 (land x y) = land x y - - axiom is_sint32_lsr : forall x y:int [to_sint32 (lsr x y)]. - 0<=y -> is_sint32 x -> to_sint32 (lsr x y) = lsr x y - - axiom is_sint32_lsl1 : - lsl 1 31 = Cint.max_sint32 - - axiom is_sint32_lsl1_inf : forall y:int [to_sint32 (lsl 1 y)]. - 0<=y<31 -> to_sint32 (lsl 1 y) = lsl 1 y - - axiom is_sint32_lsl1_sup : forall y:int [to_sint32 (lsl 1 y)]. - 32<=y -> to_sint32 (lsl 1 y) = 0 - -(** *** Cast to sint64 C type *) - axiom is_sint64_lnot : forall x:int [to_sint64 (lnot x)]. - is_sint64 x -> to_sint64 (lnot x) = lnot x - - axiom is_sint64_lxor : forall x y:int [to_sint64 (lxor x y)]. - is_sint64 x -> is_sint64 y -> to_sint64 (lxor x y) = lxor x y - - axiom is_sint64_lor : forall x y:int [to_sint64(lor x y)]. - is_sint64 x -> is_sint64 y -> to_sint64 (lor x y) = lor x y - - axiom is_sint64_land : forall x y:int [to_sint64 (land x y)]. - is_sint64 x -> is_sint64 y -> to_sint64 (land x y) = land x y - - axiom is_sint64_lsr : forall x y:int [to_sint64 (lsr x y)]. - 0<=y -> is_sint64 x -> to_sint64 (lsr x y) = lsr x y - - axiom is_sint64_lsl1 : - lsl 1 63 = Cint.max_sint64 - - axiom is_sint64_lsl1_inf : forall y:int [to_sint64 (lsl 1 y)]. - 0<=y<63 -> to_sint64 (lsl 1 y) = lsl 1 y - - axiom is_sint64_lsl1_sup : forall y:int [to_sint64 (lsl 1 y)]. - 64<=y -> to_sint64 (lsl 1 y) = 0 - -(** * Range of some bitwise operations *) - lemma uint_land_range : forall x y: int . - 0<=x -> 0 <= land x y <= x - meta "remove_for_" prop uint_land_range - - lemma uint_lor_inf : forall x y: int . - -1<=x -> 0<=y -> x <= lor x y - meta "remove_for_" prop uint_lor_inf - - lemma sint_land_inf : forall x y: int . - x<=0 -> y<0 -> land x y <= x - meta "remove_for_" prop sint_land_inf - - lemma sint_lor_range : forall x y: int . - x<0 -> x <= lor x y < 0 - meta "remove_for_" prop sint_lor_range - - lemma is_uint_lor_distrib : forall n x y: int . - (is_uint n (lor x y)) <-> ((is_uint n x) && (is_uint n y)) - meta "remove_for_" prop is_uint_lor_distrib - -(** * Link between bitwise operators and addition *) - axiom lor_addition : forall x y: int [(land x y), (lor x y) ]. - land x y = 0 -> x + y = lor x y - - axiom lxor_addition : forall x y: int [(land x y), (lxor x y) ]. - land x y = 0 -> x + y = lxor x y - -(** * Link between land and cast operator *) - lemma to_uint_land_edge : forall x n: int. - 0<=n -> to_uint n x = land ((lsl 1 n) - 1) x - meta "remove_for_" prop to_uint_land_edge - -end diff --git a/src/plugins/wp/share/src/cfloat.why b/src/plugins/wp/share/src/cfloat.why deleted file mode 100644 index f8bc5732032..00000000000 --- a/src/plugins/wp/share/src/cfloat.why +++ /dev/null @@ -1,223 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of WP plug-in of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat a l'energie atomique et aux energies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -(* -------------------------------------------------------------------------- *) -(* --- C-Integer Arithmetics for Alt-Ergo --- *) -(* -------------------------------------------------------------------------- *) - -theory Cfloat - - use import bool.Bool - use import real.RealInfix - use import real.Abs - use import real.Square - use import real.FromInt - - (* -------------------------------------------------------------------------- *) - (* --- C-Integer Arithmetics for Alt-Ergo --- *) - (* -------------------------------------------------------------------------- *) - - type f32 (* single precision IEEE *) - type f64 (* double precision IEEE *) - - (* C-Float Conversion *) - - function to_f32 real : f32 - function of_f32 f32 : real - - function to_f64 real : f64 - function of_f64 f64 : real - - axiom to_f32_zero: of_f32 (to_f32 0.0) = 0.0 - axiom to_f32_one: of_f32 (to_f32 1.0) = 1.0 - axiom to_f64_zero: of_f64 (to_f64 0.0) = 0.0 - axiom to_f64_one: of_f64 (to_f64 1.0) = 1.0 - - (* C-Float Rounding Modes *) - - type rounding_mode = Up | Down | ToZero | NearestTiesToAway | NearestTiesToEven - - function round_float rounding_mode real : f32 - function round_double rounding_mode real : f64 - - axiom float_32: - forall x:real [ round_float NearestTiesToEven x ]. - to_f32 x = round_float NearestTiesToEven x - - axiom float_64: - forall x:real [ round_double NearestTiesToEven x ]. - to_f64 x = round_double NearestTiesToEven x - - (* C-Float Classification *) - - type float_kind = Finite | NaN | Inf_pos | Inf_neg - - function classify_f32 f32 : float_kind - function classify_f64 f64 : float_kind - - predicate is_finite_f32 (f:f32) = (classify_f32 f = Finite) - predicate is_finite_f64 (d:f64) = (classify_f64 d = Finite) - - predicate is_NaN_f32 (f:f32) = (classify_f32 f = NaN) - predicate is_NaN_f64 (d:f64) = (classify_f64 d = NaN) - - predicate is_infinite_f32 (f:f32) = (classify_f32 f = Inf_pos || classify_f32 f = Inf_neg) - predicate is_infinite_f64 (d:f64) = (classify_f64 d = Inf_pos || classify_f64 d = Inf_neg) - - predicate is_positive_infinite_f32 (f:f32) = (classify_f32 f = Inf_pos) - predicate is_positive_infinite_f64 (d:f64) = (classify_f64 d = Inf_pos) - - predicate is_negative_infinite_f32 (f:f32) = (classify_f32 f = Inf_neg) - predicate is_negative_infinite_f64 (d:f64) = (classify_f64 d = Inf_neg) - - axiom is_finite_to_float_32 : - forall x:real [is_finite_f32(to_f32 x)]. is_finite_f32 (to_f32 x) - - axiom is_finite_to_float_64 : - forall x:real [is_finite_f64(to_f64 x)]. is_finite_f64 (to_f64 x) - - axiom to_float_is_finite_32 : - forall f:f32 [ to_f32( of_f32 f ) | is_finite_f32(f) ]. is_finite_f32(f) -> to_f32( of_f32 f ) = f - - axiom to_float_is_finite_64 : - forall d:f64 [ to_f64( of_f64 d ) | is_finite_f64(d) ]. is_finite_f64(d) -> to_f64( of_f64 d ) = d - - (* Finite Constants *) - - predicate finite (x:real) = (is_finite_f32 (to_f32 x)) /\ (is_finite_f64 (to_f64 x)) - - constant max_f32 : real = 340282346600000016151267322115014000640.0 - constant max_f64 : real = 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0 - - axiom finite_small_f32 : forall x:real. -. max_f64 <=. x <=. max_f32 -> is_finite_f32(to_f32 x) - axiom finite_small_f64 : forall x:real. -. max_f64 <=. x <=. max_f64 -> is_finite_f64(to_f64 x) - axiom finite_range_f32 : forall f:f32. is_finite_f32(f) <-> -. max_f32 <=. of_f32 f <=. max_f32 - axiom finite_range_f64 : forall d:f64. is_finite_f64(d) <-> -. max_f64 <=. of_f64 d <=. max_f64 - - (* Equal *) - - function eq_f32b (x:f32) (y:f32) : bool - function eq_f64b (x:f64) (y:f64) : bool - predicate eq_f32 (x:f32) (y:f32) = (eq_f32b x y = true) - predicate eq_f64 (x:f64) (y:f64) = (eq_f64b x y = true) - axiom eq_finite_f32 : forall x,y:f32 [eq_f32 x y]. is_finite_f32 x -> is_finite_f32 y -> - eq_f32 x y <-> of_f32 x = of_f32 y - - axiom eq_finite_f64 : forall x,y:f64 [eq_f64 x y]. is_finite_f64 x -> is_finite_f64 y -> - eq_f64 x y <-> of_f64 x = of_f64 y - - (* Not Equal *) - - function ne_f32b (x:f32) (y:f32) : bool - function ne_f64b (x:f64) (y:f64) : bool - predicate ne_f32 (x:f32) (y:f32) = (ne_f32b x y = true) - predicate ne_f64 (x:f64) (y:f64) = (ne_f64b x y = true) - - axiom ne_finite_f32 : forall x,y:f32 [ne_f32 x y]. is_finite_f32 x -> is_finite_f32 y -> - ne_f32 x y <-> of_f32 x <> of_f32 y - - axiom ne_finite_f64 : forall x,y:f64 [ne_f64 x y]. is_finite_f64 x -> is_finite_f64 y -> - ne_f64 x y <-> of_f64 x <> of_f64 y - (* Comparison (<=) *) - - function le_f32b (x:f32) (y:f32) : bool - function le_f64b (x:f64) (y:f64) : bool - predicate le_f32 (x:f32) (y:f32) = (le_f32b x y = true) - predicate le_f64 (x:f64) (y:f64) = (le_f64b x y = true) - - axiom le_finite_f32 : forall x,y:f32 [le_f32 x y]. is_finite_f32 x -> is_finite_f32 y -> - le_f32 x y <-> of_f32 x <=. of_f32 y - - axiom le_finite_f64 : forall x,y:f64 [le_f64 x y]. is_finite_f64 x -> is_finite_f64 y -> - le_f64 x y <-> of_f64 x <=. of_f64 y - (* Comparison (<) *) - - function lt_f32b (x:f32) (y:f32) : bool - function lt_f64b (x:f64) (y:f64) : bool - predicate lt_f32 (x:f32) (y:f32) = (lt_f32b x y = true) - predicate lt_f64 (x:f64) (y:f64) = (lt_f64b x y = true) - - axiom lt_finite_f32 : forall x,y:f32 [lt_f32 x y]. is_finite_f32 x -> is_finite_f32 y -> - lt_f32 x y <-> of_f32 x <. of_f32 y - - axiom lt_finite_f64 : forall x,y:f64 [lt_f64 x y]. is_finite_f64 x -> is_finite_f64 y -> - lt_f64 x y <-> of_f64 x <. of_f64 y - - (* Negation *) - - - function neg_f32 (x:f32) : f32 - function neg_f64 (x:f64) : f64 - - axiom neg_finite_f32 : forall x:f32 [neg_f32 x]. is_finite_f32 x -> of_f32 (neg_f32 x) = -. (of_f32 x) - axiom neg_finite_f64 : forall x:f64 [neg_f64 x]. is_finite_f64 x -> of_f64 (neg_f64 x) = -. (of_f64 x) - - (* Addition *) - - function add_f32 (x:f32) (y:f32) : f32 - function add_f64 (x:f64) (y:f64) : f64 - - axiom add_finite_f32 : forall x,y:f32 [add_f32 x y]. is_finite_f32 x -> is_finite_f32 y -> - add_f32 x y = to_f32 (of_f32 x +. of_f32 y) - - axiom add_finite_f64 : forall x,y:f64 [add_f64 x y]. is_finite_f64 x -> is_finite_f64 y -> - add_f64 x y = to_f64 (of_f64 x +. of_f64 y) - (* Multiplication *) - - function mul_f32 (x:f32) (y:f32) : f32 - function mul_f64 (x:f64) (y:f64) : f64 - - axiom mul_finite_f32 : forall x,y:f32 [mul_f32 x y]. is_finite_f32 x -> is_finite_f32 y -> - mul_f32 x y = to_f32 (of_f32 x *. of_f32 y) - - axiom mul_finite_f64 : forall x,y:f64 [mul_f64 x y]. is_finite_f64 x -> is_finite_f64 y -> - mul_f64 x y = to_f64 (of_f64 x *. of_f64 y) - (* Division *) - - function div_f32 (x:f32) (y:f32) : f32 - function div_f64 (x:f64) (y:f64) : f64 - - axiom div_finite_f32 : forall x,y:f32 [div_f32 x y]. is_finite_f32 x -> is_finite_f32 y -> - div_f32 x y = to_f32 (of_f32 x /. of_f32 y) - - axiom div_finite_f64 : forall x,y:f64 [div_f64 x y]. is_finite_f64 x -> is_finite_f64 y -> - div_f64 x y = to_f64 (of_f64 x /. of_f64 y) - - (* Square Root *) - - function sqrt_f32 f32 : f32 - function sqrt_f64 f64 : f64 - - axiom sqrt_finite_f32 : forall x:f32 [sqrt_f32 x]. is_finite_f32 x -> sqrt_f32 x = to_f32 (sqrt (of_f32 x)) - axiom sqrt_finite_f64 : forall x:f64 [sqrt_f64 x]. is_finite_f64 x -> sqrt_f64 x = to_f64 (sqrt (of_f64 x)) - - (* Models *) - - function model_f32 (f:f32) : real - function delta_f32 (f:f32) : real = abs( of_f32 f -. model_f32 f ) - function error_f32 (f:f32) : real = (delta_f32 f) /. (abs (model_f32 f)) - - function model_f64 (f:f64) : real - function delta_f64 (f:f64) : real = abs( of_f64 f -. model_f64 f ) - function error_f64 (f:f64) : real = (delta_f64 f) /. (abs (model_f64 f)) - -end diff --git a/src/plugins/wp/share/src/cint.why b/src/plugins/wp/share/src/cint.why deleted file mode 100644 index b725bf2d3ec..00000000000 --- a/src/plugins/wp/share/src/cint.why +++ /dev/null @@ -1,213 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of WP plug-in of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat a l'energie atomique et aux energies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -(* -------------------------------------------------------------------------- *) -(* --- C-Integer Arithmetics for Why-3 --- *) -(* -------------------------------------------------------------------------- *) - -theory Cint - - use import int.Int - use import bool.Bool - - (** * C-Integer bounds * **) - - (** ** bounds are inlined into prover files ** **) - - function max_uint8: int = 256 - function max_sint8: int = 128 - function max_uint16: int = 65536 - function max_sint16: int = 32768 - function max_uint32: int = 4294967296 - function max_sint32: int = 2147483648 - function max_uint64: int = 18446744073709551616 - function max_sint64: int = 9223372036854775808 - - (** * C-Integer Ranges * **) - - predicate is_bool(x:int) = x = 0 \/ x = 1 - predicate is_uint8(x:int) = 0 <= x < max_uint8 - predicate is_sint8(x:int) = -max_sint8 <= x < max_sint8 - predicate is_uint16(x:int) = 0 <= x < max_uint16 - predicate is_sint16(x:int) = -max_sint16 <= x < max_sint16 - predicate is_uint32(x:int) = 0 <= x < max_uint32 - predicate is_sint32(x:int) = -max_sint32 <= x < max_sint32 - predicate is_uint64(x:int) = 0 <= x < max_uint64 - predicate is_sint64(x:int) = -max_sint64 <= x < max_sint64 - - lemma is_bool0: is_bool(0) - lemma is_bool1: is_bool(1) - - (* meta "def_into_axiom" predicate is_bool *) - meta "def_into_axiom" predicate is_uint8 - meta "def_into_axiom" predicate is_sint8 - meta "def_into_axiom" predicate is_uint16 - meta "def_into_axiom" predicate is_uint16 - meta "def_into_axiom" predicate is_sint32 - meta "def_into_axiom" predicate is_uint32 - meta "def_into_axiom" predicate is_sint64 - meta "def_into_axiom" predicate is_uint64 - - (** * C-Integer Conversion * **) - - function to_bool ( x : int ) : int = if x = 0 then 0 else 1 - function to_uint8 int : int - function to_sint8 int : int - function to_uint16 int : int - function to_sint16 int : int - function to_uint32 int : int - function to_sint32 int : int - function to_uint64 int : int - function to_sint64 int : int - - function two_power_abs int : int - lemma two_power_abs_is_positive : forall n:int [ two_power_abs n ]. 0 < two_power_abs n - lemma two_power_abs_plus_pos : forall n m:int . 0 <= n -> 0 <= m -> two_power_abs (n+m) = (two_power_abs n) * (two_power_abs m) - lemma two_power_abs_plus_one : forall n:int . 0 <= n -> two_power_abs (n+1) = 2 * (two_power_abs n) - meta "remove_for_" prop two_power_abs_is_positive - meta "remove_for_" prop two_power_abs_plus_pos - meta "remove_for_" prop two_power_abs_plus_one - - predicate is_uint (n:int) (x:int) = 0 <= x < two_power_abs n - - (* * [n] is the number of significant bits (that doesn't include the sign bit). * *) - predicate is_sint (n:int) (x:int) = -(two_power_abs n) <= x < two_power_abs n - - function to_uint int int : int - function to_sint int int : int - - (** * C-Integer Conversions are in-range * **) - - lemma is_to_uint : forall n x:int [ is_uint n (to_uint n x) ]. is_uint n (to_uint n x) - lemma is_to_sint : forall n x:int [ is_sint n (to_sint n x) ]. is_sint n (to_sint n x) - meta "remove_for_" prop is_to_uint - meta "remove_for_" prop is_to_sint - - axiom is_to_uint8 : forall x:int [ is_uint8(to_uint8 x) ]. is_uint8 (to_uint8 x) - axiom is_to_sint8 : forall x:int [ is_sint8(to_sint8 x) ]. is_sint8 (to_sint8 x) - axiom is_to_uint16 : forall x:int [ is_uint16(to_uint16 x) ]. is_uint16 (to_uint16 x) - axiom is_to_sint16 : forall x:int [ is_sint16(to_sint16 x) ]. is_sint16 (to_sint16 x) - axiom is_to_uint32 : forall x:int [ is_uint32(to_uint32 x) ]. is_uint32 (to_uint32 x) - axiom is_to_sint32 : forall x:int [ is_sint32(to_sint32 x) ]. is_sint32 (to_sint32 x) - axiom is_to_uint64 : forall x:int [ is_uint64(to_uint64 x) ]. is_uint64 (to_uint64 x) - axiom is_to_sint64 : forall x:int [ is_sint64(to_sint64 x) ]. is_sint64 (to_sint64 x) - - (** * C-Integer Conversions are identity when in-range * **) - - lemma id_uint : forall n x:int [ to_uint n x ]. is_uint n x <-> (to_uint n x) = x - lemma id_sint : forall n x:int [ to_sint n x ]. is_sint n x <-> (to_sint n x) = x - meta "remove_for_" prop id_uint - meta "remove_for_" prop id_sint - - axiom id_uint8 : forall x:int [ to_uint8 x ]. is_uint8 x -> (to_uint8 x) = x - axiom id_sint8 : forall x:int [ to_sint8 x ]. is_sint8 x -> (to_sint8 x) = x - axiom id_uint16 : forall x:int [ to_uint16 x ]. is_uint16 x -> (to_uint16 x) = x - axiom id_sint16 : forall x:int [ to_sint16 x ]. is_sint16 x -> (to_sint16 x) = x - axiom id_uint32 : forall x:int [ to_uint32 x ]. is_uint32 x -> (to_uint32 x) = x - axiom id_sint32 : forall x:int [ to_sint32 x ]. is_sint32 x -> (to_sint32 x) = x - axiom id_uint64 : forall x:int [ to_uint64 x ]. is_uint64 x -> (to_uint64 x) = x - axiom id_sint64 : forall x:int [ to_sint64 x ]. is_sint64 x -> (to_sint64 x) = x - - meta "inline_in" predicate is_uint8, prop id_uint8 - meta "inline_in" predicate is_sint8, prop id_sint8 - meta "inline_in" predicate is_uint16, prop id_uint16 - meta "inline_in" predicate is_sint16, prop id_sint16 - meta "inline_in" predicate is_uint32, prop id_uint32 - meta "inline_in" predicate is_sint32, prop id_sint32 - meta "inline_in" predicate is_uint64, prop id_uint64 - meta "inline_in" predicate is_sint64, prop id_sint64 - - (** * C-Integer Conversions are projections * **) - - lemma proj_uint : forall n x:int . to_uint n (to_uint n x)= to_uint n x - lemma proj_sint : forall n x:int . to_sint n (to_sint n x)= to_sint n x - meta "remove_for_" prop proj_uint - meta "remove_for_" prop proj_sint - - axiom proj_uint8 : forall x:int [ to_uint8(to_uint8 x) ]. to_uint8(to_uint8 x)=to_uint8 x - axiom proj_sint8 : forall x:int [ to_sint8(to_sint8 x) ]. to_sint8(to_sint8 x)=to_sint8 x - axiom proj_uint16 : forall x:int [ to_uint16(to_uint16 x) ]. to_uint16(to_uint16 x)=to_uint16 x - axiom proj_sint16 : forall x:int [ to_sint16(to_sint16 x) ]. to_sint16(to_sint16 x)=to_sint16 x - axiom proj_uint32 : forall x:int [ to_uint32(to_uint32 x) ]. to_uint32(to_uint32 x)=to_uint32 x - axiom proj_sint32 : forall x:int [ to_sint32(to_sint32 x) ]. to_sint32(to_sint32 x)=to_sint32 x - axiom proj_uint64 : forall x:int [ to_uint64(to_uint64 x) ]. to_uint64(to_uint64 x)=to_uint64 x - axiom proj_sint64 : forall x:int [ to_sint64(to_sint64 x) ]. to_sint64(to_sint64 x)=to_sint64 x - - meta "remove_for_" prop proj_uint8 - meta "remove_for_" prop proj_sint8 - meta "remove_for_" prop proj_uint16 - meta "remove_for_" prop proj_sint16 - meta "remove_for_" prop proj_uint32 - meta "remove_for_" prop proj_sint32 - meta "remove_for_" prop proj_uint64 - meta "remove_for_" prop proj_sint64 - - (** * Generalization for [to_sint _ (to_uint _ x)] * **) - - lemma proj_su: forall n x:int . to_sint n (to_uint n x) = to_uint n x - lemma incl_su: forall n x:int . is_uint n x -> is_sint n x - meta "remove_for_" prop proj_su - meta "remove_for_" prop incl_su - - lemma proj_su_uint: forall n m x:int . 0 <= n -> 0 <= m -> to_sint (m+n) (to_uint n x) = to_uint n x - lemma proj_su_sint: forall n m x:int . 0 <= n -> 0 <= m -> to_sint n (to_uint (m+(n+1)) x) = to_sint n x - meta "remove_for_" prop proj_su_uint - meta "remove_for_" prop proj_su_sint - - axiom proj_int8 : forall x:int [ to_sint8(to_uint8 x) ]. to_sint8(to_uint8 x) =to_sint8 x - axiom proj_int16 : forall x:int [ to_sint16(to_uint16 x) ]. to_sint16(to_uint16 x)=to_sint16 x - axiom proj_int32 : forall x:int [ to_sint32(to_uint32 x) ]. to_sint32(to_uint32 x)=to_sint32 x - axiom proj_int64 : forall x:int [ to_sint64(to_uint64 x) ]. to_sint64(to_uint64 x)=to_sint64 x - - (** * Generalization for [to_uint _ (to_sint _ x)] * **) - - lemma proj_us_uint: forall n m x:int . 0 <= n -> 0 <= m -> to_uint (n+1) (to_sint (m+n) x) = to_uint (n+1) x - meta "remove_for_" prop proj_us_uint - - (** * C-Integer range inclusion * **) - - lemma incl_uint : forall n x i:int . 0 <= n -> 0 <= i -> is_uint n x -> is_uint (n+i) x - lemma incl_sint : forall n x i:int . 0 <= n -> 0 <= i -> is_sint n x -> is_sint (n+i) x - lemma incl_int : forall n x i:int . 0 <= n -> 0 <= i -> is_uint n x -> is_sint (n+i) x - meta "remove_for_" prop incl_uint - meta "remove_for_" prop incl_sint - meta "remove_for_" prop incl_int - - (** * C-Integer Bits * **) - - function lnot int : int - - function land int int : int - function lxor int int : int - function lor int int : int - - meta AC function land - meta AC function lxor - meta AC function lor - - function lsl int int : int - function lsr int int : int - - function bit_testb int int : bool - predicate bit_test int int - -end diff --git a/src/plugins/wp/share/src/cmath.why b/src/plugins/wp/share/src/cmath.why deleted file mode 100644 index f5650834c90..00000000000 --- a/src/plugins/wp/share/src/cmath.why +++ /dev/null @@ -1,73 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of WP plug-in of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat a l'energie atomique et aux energies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -(* -------------------------------------------------------------------------- *) -(* --- Mathematics for Why-3 --- *) -(* -------------------------------------------------------------------------- *) - -theory Cmath - use import int.Int - use import int.Abs - use import real.RealInfix - - axiom abs_def : - forall x:int [abs(x)]. - if x >= 0 then abs(x)=x else abs(x)=(-x) - -end - -theory Square - - use import real.RealInfix - use import real.Square - - axiom sqrt_lin1 : forall x:real [sqrt(x)]. 1. <. x -> sqrt(x) <. x - axiom sqrt_lin0 : forall x:real [sqrt(x)]. 0. <. x <. 1. -> x <. sqrt(x) - axiom sqrt_0 : sqrt(0.) = 0. - axiom sqrt_1 : sqrt(1.) = 1. - -end - -theory ExpLog - - use import real.RealInfix - use import real.ExpLog - - axiom exp_pos : forall x:real. exp x >. 0. - -end - - -theory ArcTrigo - - use import real.RealInfix - use import real.Trigonometry as Trigo - - function atan (x : real) : real = Trigo.atan x - function asin real : real - function acos real : real - - axiom Sin_asin: forall x:real. -. 1.0 <=. x <=. 1.0 -> sin (asin x) = x - axiom Cos_acos: forall x:real. -. 1.0 <=. x <=. 1.0 -> cos (acos x) = x - -end - diff --git a/src/plugins/wp/share/src/coq-own-realization.drv b/src/plugins/wp/share/src/coq-own-realization.drv deleted file mode 100644 index bba87c6fafc..00000000000 --- a/src/plugins/wp/share/src/coq-own-realization.drv +++ /dev/null @@ -1,17 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat à l'énergie atomique et aux énergies *) -(* alternatives) *) -(* *) -(* All rights reserved. *) -(* Contact CEA LIST for licensing. *) -(* *) -(**************************************************************************) - -theory qed.Qed - syntax function pdiv "(ZArith.BinInt.Z.quot %1 %2)" - syntax function pmod "(ZArith.BinInt.Z.rem %1 %2)" -end \ No newline at end of file diff --git a/src/plugins/wp/share/src/coq-why3.drv b/src/plugins/wp/share/src/coq-why3.drv deleted file mode 100644 index cbcc08a10bb..00000000000 --- a/src/plugins/wp/share/src/coq-why3.drv +++ /dev/null @@ -1,12 +0,0 @@ -(* generated automatically at developer compilation time *) -theory qed.Qed meta "realized_theory" "qed.Qed", "Qed" end -theory cmath.Cmath meta "realized_theory" "cmath.Cmath", "Cmath" end -theory square.Square meta "realized_theory" "square.Square", "Square" end -theory explog.ExpLog meta "realized_theory" "explog.ExpLog", "ExpLog" end -theory arctrigo.ArcTrigo meta "realized_theory" "arctrigo.ArcTrigo", "ArcTrigo" end -theory cint.Cint meta "realized_theory" "cint.Cint", "Cint" end -theory cbits.Cbits meta "realized_theory" "cbits.Cbits", "Cbits" end -theory memory.Memory meta "realized_theory" "memory.Memory", "Memory" end -theory vset.Vset meta "realized_theory" "vset.Vset", "Vset" end -theory cfloat.Cfloat meta "realized_theory" "cfloat.Cfloat", "Cfloat" end -theory vlist.Vlist meta "realized_theory" "vlist.Vlist", "Vlist" end diff --git a/src/plugins/wp/share/src/filter_axioms.ml b/src/plugins/wp/share/src/filter_axioms.ml deleted file mode 100644 index 6a339539ec7..00000000000 --- a/src/plugins/wp/share/src/filter_axioms.ml +++ /dev/null @@ -1,192 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of WP plug-in of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat a l'energie atomique et aux energies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -open Why3 -open Term -open Decl - -let meta_remove_altergo = - Theory.register_meta "remove_for_altergo" - [Theory.MTprsymbol] - ~desc:"Don't@ translate@ this@ lemma@ for@ altergo." - -let meta_remove_why3 = - Theory.register_meta "remove_for_why3" - [Theory.MTprsymbol] - ~desc:"Don't@ translate@ this@ lemma@ for@ why3." - -let meta_remove_ = - Theory.register_meta "remove_for_" - [Theory.MTprsymbol] - ~desc:"Don't@ translate@ this@ lemma@ for@ why3 and altergo." - - -let elim_abstract remove_pr d = match d.d_node with - | Dprop (Paxiom,pr,_) when Spr.mem pr remove_pr -> - (* Format.eprintf "Remove %a@." Pretty.print_pr pr; *) - [] - | Dprop (Paxiom,pr,_) -> - (* Format.eprintf "Not Remove %a@." Pretty.print_pr pr; *) - [d] - | _ -> - (* Format.eprintf "Not Seen %a@." Pretty.print_decl d; *) - [d] - -let remove_prop meta = - Trans.on_tagged_pr meta - (fun remove_pr -> - Trans.on_tagged_pr meta_remove_ - (fun remove_pr2 -> - Trans.decl (elim_abstract (Spr.union remove_pr remove_pr2)) None)) - -let () = - Trans.register_transform "remove_for_altergo" - (remove_prop meta_remove_altergo) - ~desc:"Remove@ tagged@ proposition@ with \"remove_for_altergo\"@ and \ - \"remove_for_\"@ metas." - -let () = - Trans.register_transform "remove_for_why3" - (remove_prop meta_remove_why3) - ~desc:"Remove@ tagged@ proposition@ with \"remove_for_why3\"@ and \ - \"remove_for_\" metas." - - -(** inlining *) - -let meta_inline_in = - Theory.register_meta "inline_in" - [Theory.MTlsymbol;Theory.MTprsymbol;] - ~desc:"Inline@ the@ symbol@ in@ the@ proposition." - -let t_unfold defs fs tl ty = - match Mls.find_opt fs defs with - | None -> - assert false (** absurd: it is in mpr so it is in sls so added in defs *) - | Some (vl,e) -> - let add (mt,mv) x y = Ty.ty_match mt x.vs_ty (t_type y), Mvs.add x y mv in - let (mt,mv) = List.fold_left2 add (Ty.Mtv.empty, Mvs.empty) vl tl in - let mt = Ty.oty_match mt e.t_ty ty in - t_ty_subst mt mv e - -(* inline every symbol *) - -let rec t_replace_all defs s t = - let t = t_map (t_replace_all defs s) t in - match t.t_node with - | Tapp (fs,tl) when Sls.mem fs s -> - t_label_copy t (t_unfold defs fs tl t.t_ty) - | _ -> t - -let fold mpr sls d (defs, task) = - (** replace *) - let d = match d.d_node with - | Dprop (k,pr,f) -> - let s = Mpr.find_def Sls.empty pr mpr in - if Sls.is_empty s then d - else create_prop_decl k pr (t_replace_all defs s f) - | _ -> d - in - (** add to defs if needed *) - match d.d_node with - | Dlogic [ls,ld] when Sls.mem ls sls -> - let vl,e = open_ls_defn ld in - Mls.add ls (vl,e) defs, Task.add_decl task d - | _ -> - defs, Task.add_decl task d - -let fold mpr sls task_hd (defs, task) = - match task_hd.Task.task_decl.Theory.td_node with - | Theory.Decl d -> - fold mpr sls d (defs, task) - | _ -> - defs, Task.add_tdecl task task_hd.Task.task_decl - -let trans = - let add (mpr,sls) = function - | [Theory.MAls ls; Theory.MApr pr] -> - Mpr.change (function None -> Some (Sls.singleton ls) - | Some s -> Some (Sls.add ls s)) pr mpr, - Sls.add ls sls - | _ -> assert false - in - Trans.on_meta meta_inline_in (fun l -> - let mpr, sls = List.fold_left add (Mpr.empty,Sls.empty) l in - Trans.fold_map (fold mpr sls) Mls.empty None) - - -let () = - Trans.register_transform "inline_in" - trans - ~desc:"Inline@ the@ symbol@ in@ the@ proposition(meta@ of@ the@ same@ name)" - -(*** eliminate function *) -let meta_def_into_axiom = - Theory.register_meta "def_into_axiom" - [Theory.MTlsymbol] - ~desc:"Turn the marked function into an axiom" - -let rec t_insert hd t = match t.t_node with - | Tif (f1,t2,t3) -> - t_if f1 (t_insert hd t2) (t_insert hd t3) - | Tlet (t1,bt) -> - let v,t2 = t_open_bound bt in - t_let_close v t1 (t_insert hd t2) - | Tcase (tl,bl) -> - let br b = - let pl,t1 = t_open_branch b in - t_close_branch pl (t_insert hd t1) - in - t_case tl (List.map br bl) - | _ -> TermTF.t_selecti t_equ_simp t_iff_simp hd t - -let add_ld which (ls,ld) (abst,defn,axl) = - if which ls then - let vl,e = open_ls_defn ld in - let nm = ls.ls_name.Ident.id_string ^ "_def" in - let pr = create_prsymbol (Ident.id_derive nm ls.ls_name) in - let hd = t_app ls (List.map t_var vl) e.t_ty in - let e = TermTF.t_selecti Term.t_equ_simp Term.t_iff_simp hd e in - let ax = t_forall_close vl [[hd]] e in - let ax = create_prop_decl Paxiom pr ax in - let ld = create_param_decl ls in - ld :: abst, defn, ax :: axl - else - abst, (ls,ld) :: defn, axl - -let elim_decl which l = - let abst,defn,axl = List.fold_right (add_ld which) l ([],[],[]) in - let defn = if defn = [] then [] else [create_logic_decl defn] in - abst @ defn @ axl - -let elim which d = match d.d_node with - | Dlogic l -> elim_decl which l - | _ -> [d] - -let def_into_axiom = - Trans.on_tagged_ls meta_def_into_axiom (fun sls -> - Trans.decl (elim (fun ls -> Term.Sls.mem ls sls)) None) - -let () = - Trans.register_transform "def_into_axiom" - def_into_axiom - ~desc:"Turn the marked function into an axiom" diff --git a/src/plugins/wp/share/src/lemma_about_mod.txt b/src/plugins/wp/share/src/lemma_about_mod.txt deleted file mode 100644 index d659908d021..00000000000 --- a/src/plugins/wp/share/src/lemma_about_mod.txt +++ /dev/null @@ -1,106 +0,0 @@ -Z_mod_lt: forall a b : int, b > 0 -> 0 <= a mod b < b -Z_mod_neg: forall a b : int, b < 0 -> b < a mod b <= 0 -Z_div_mod_eq: forall a b : int, b > 0 -> a = b * (a / b) + a mod b -Zmod_eq_full: forall a b : int, b <> 0 -> a mod b = a - a / b * b -Zmod_eq: forall a b : int, b > 0 -> a mod b = a - a / b * b -Zmod_unique: forall a b q r : int, 0 <= r < b -> a = b * q + r -> r = a mod b -Zmod_0_l: forall a : int, 0 mod a = 0 -Zmod_0_r: forall a : int, a mod 0 = 0 -Zmod_1_r: forall a : int, a mod 1 = 0 -Zmod_1_l: forall a : int, 1 < a -> 1 mod a = 1 -Z_mod_same_full: forall a : int, a mod a = 0 -Z_mod_mult: forall a b : int, (a * b) mod b = 0 -Zmod_small: forall a n : int, 0 <= a < n -> a mod n = a -Z_div_exact_full_1: forall a b : int, a = b * (a / b) -> a mod b = 0 -Z_div_exact_full_2: - forall a b : int, b <> 0 -> a mod b = 0 -> a = b * (a / b) -Zmod_le: forall a b : int, 0 < b -> 0 <= a -> a mod b <= a -Z_mod_plus_full: forall a b c : int, (a + b * c) mod c = a mod c -Zmod_opp_opp: forall a b : int, - a mod - b = - (a mod b) -Z_mod_zero_opp_full: forall a b : int, a mod b = 0 -> - a mod b = 0 -Z_mod_nz_opp_full: forall a b : int, a mod b <> 0 -> - a mod b = b - a mod b -Z_mod_zero_opp_r: forall a b : int, a mod b = 0 -> a mod - b = 0 -Z_mod_nz_opp_r: forall a b : int, a mod b <> 0 -> a mod - b = a mod b - b -Z_div_zero_opp_full: forall a b : int, a mod b = 0 -> - a / b = - (a / b) -Z_div_nz_opp_full: forall a b : int, a mod b <> 0 -> - a / b = - (a / b) - 1 -Z_div_zero_opp_r: forall a b : int, a mod b = 0 -> a / - b = - (a / b) -Z_div_nz_opp_r: forall a b : int, a mod b <> 0 -> a / - b = - (a / b) - 1 -Zmult_mod_distr_l: forall a b c : int, (c * a) mod (c * b) = c * (a mod b) -Zmult_mod_distr_r: forall a b c : int, (a * c) mod (b * c) = a mod b * c -Zmod_mod: forall a n : int, (a mod n) mod n = a mod n -Zmult_mod: forall a b n : int, (a * b) mod n = (a mod n * (b mod n)) mod n -Zplus_mod: forall a b n : int, (a + b) mod n = (a mod n + b mod n) mod n -Zminus_mod: forall a b n : int, (a - b) mod n = (a mod n - b mod n) mod n -Zplus_mod_idemp_l: forall a b n : int, (a mod n + b) mod n = (a + b) mod n -Zplus_mod_idemp_r: forall a b n : int, (b + a mod n) mod n = (b + a) mod n -Zminus_mod_idemp_l: forall a b n : int, (a mod n - b) mod n = (a - b) mod n -Zminus_mod_idemp_r: forall a b n : int, (a - b mod n) mod n = (a - b) mod n -Zmult_mod_idemp_l: forall a b n : int, (a mod n * b) mod n = (a * b) mod n -Zmult_mod_idemp_r: forall a b n : int, (b * (a mod n)) mod n = (b * a) mod n -Z_mod_same: forall a : int, a > 0 -> a mod a = 0 -Z_mod_plus: forall a b c : int, c > 0 -> (a + b * c) mod c = a mod c -Z_div_exact_1: forall a b : int, b > 0 -> a = b * (a / b) -> a mod b = 0 -Z_div_exact_2: forall a b : int, b > 0 -> a mod b = 0 -> a = b * (a / b) -Z_mod_zero_opp: forall a b : int, b > 0 -> a mod b = 0 -> - a mod b = 0 -Z.div_mod: forall a b : int, b <> 0 -> a = b * (a / b) + a mod b -Z.mod_pos_bound: forall a b : int, 0 < b -> 0 <= a mod b < b -Z.mod_bound_pos: forall a b : int, 0 <= a -> 0 < b -> 0 <= a mod b < b -Z.mod_neg_bound: forall a b : int, b < 0 -> b < a mod b <= 0 -Z.mod_eq: forall a b : int, b <> 0 -> a mod b = a - b * (a / b) -Z.mod_bound_abs: forall a b : int, b <> 0 -> Z.abs (a mod b) < Z.abs b -Z.mod_unique: - forall a b q r : int, - 0 <= r < b \/ b < r <= 0 -> a = b * q + r -> r = a mod b -Z.mod_unique_pos: - forall a b q r : int, 0 <= r < b -> a = b * q + r -> r = a mod b -Z.mod_unique_neg: - forall a b q r : int, b < r <= 0 -> a = b * q + r -> r = a mod b -Z.mod_bound_or: - forall a b : int, b <> 0 -> 0 <= a mod b < b \/ b < a mod b <= 0 -Z.opp_mod_bound_or: - forall a b : int, - b <> 0 -> 0 <= - (a mod b) < - b \/ - b < - (a mod b) <= 0 -Z.mod_opp_opp: forall a b : int, b <> 0 -> - a mod - b = - (a mod b) -Z.div_opp_l_z: forall a b : int, b <> 0 -> a mod b = 0 -> - a / b = - (a / b) -Z.div_opp_l_nz: - forall a b : int, b <> 0 -> a mod b <> 0 -> - a / b = - (a / b) - 1 -Z.mod_opp_l_z: forall a b : int, b <> 0 -> a mod b = 0 -> - a mod b = 0 -Z.mod_opp_l_nz: - forall a b : int, b <> 0 -> a mod b <> 0 -> - a mod b = b - a mod b -Z.div_opp_r_z: forall a b : int, b <> 0 -> a mod b = 0 -> a / - b = - (a / b) -Z.div_opp_r_nz: - forall a b : int, b <> 0 -> a mod b <> 0 -> a / - b = - (a / b) - 1 -Z.mod_opp_r_z: forall a b : int, b <> 0 -> a mod b = 0 -> a mod - b = 0 -Z.mod_opp_r_nz: - forall a b : int, b <> 0 -> a mod b <> 0 -> a mod - b = a mod b - b -Z.mod_same: forall a : int, a <> 0 -> a mod a = 0 -Z.mod_small: forall a b : int, 0 <= a < b -> a mod b = a -Z.mod_0_l: forall a : int, a <> 0 -> 0 mod a = 0 -Z.mod_1_r: forall a : int, a mod 1 = 0 -Z.mod_1_l: forall a : int, 1 < a -> 1 mod a = 1 -Z.mod_mul: forall a b : int, b <> 0 -> (a * b) mod b = 0 -Z.mod_le: forall a b : int, 0 <= a -> 0 < b -> a mod b <= a -Z.mod_small_iff: - forall a b : int, b <> 0 -> (a mod b = a <-> 0 <= a < b \/ b < a <= 0) -Z.div_exact: forall a b : int, b <> 0 -> (a = b * (a / b) <-> a mod b = 0) -Z.mod_add: forall a b c : int, c <> 0 -> (a + b * c) mod c = a mod c -Z.mul_mod_distr_l: - forall a b c : int, b <> 0 -> c <> 0 -> (c * a) mod (c * b) = c * (a mod b) -Z.mul_mod_distr_r: - forall a b c : int, b <> 0 -> c <> 0 -> (a * c) mod (b * c) = a mod b * c -Z.mod_mod: forall a n : int, n <> 0 -> (a mod n) mod n = a mod n -Z.mul_mod_idemp_l: - forall a b n : int, n <> 0 -> (a mod n * b) mod n = (a * b) mod n -Z.mul_mod_idemp_r: - forall a b n : int, n <> 0 -> (a * (b mod n)) mod n = (a * b) mod n -Z.mul_mod: - forall a b n : int, n <> 0 -> (a * b) mod n = (a mod n * (b mod n)) mod n -Z.add_mod_idemp_l: - forall a b n : int, n <> 0 -> (a mod n + b) mod n = (a + b) mod n -Z.add_mod_idemp_r: - forall a b n : int, n <> 0 -> (a + b mod n) mod n = (a + b) mod n -Z.add_mod: - forall a b n : int, n <> 0 -> (a + b) mod n = (a mod n + b mod n) mod n -Z.rem_mul_r: - forall a b c : int, - b <> 0 -> 0 < c -> a mod (b * c) = a mod b + b * ((a / b) mod c) diff --git a/src/plugins/wp/share/src/logs/ArcTrigo.altergo.err b/src/plugins/wp/share/src/logs/ArcTrigo.altergo.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/ArcTrigo.altergo.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/ArcTrigo.coq.err b/src/plugins/wp/share/src/logs/ArcTrigo.coq.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/ArcTrigo.coq.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/ArcTrigo.why3.check.err b/src/plugins/wp/share/src/logs/ArcTrigo.why3.check.err deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/wp/share/src/logs/ArcTrigo.why3.err b/src/plugins/wp/share/src/logs/ArcTrigo.why3.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/ArcTrigo.why3.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Cbits.altergo.err b/src/plugins/wp/share/src/logs/Cbits.altergo.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Cbits.altergo.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Cbits.coq.err b/src/plugins/wp/share/src/logs/Cbits.coq.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Cbits.coq.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Cbits.why3.check.err b/src/plugins/wp/share/src/logs/Cbits.why3.check.err deleted file mode 100644 index 7b29ed53aa0..00000000000 --- a/src/plugins/wp/share/src/logs/Cbits.why3.check.err +++ /dev/null @@ -1,226 +0,0 @@ -File "../why3/Qed.why", line 42, characters 6-17: -warning: axiom c_euclidian does not contain any local abstract symbol -File "../why3/Qed.why", line 47, characters 6-16: -warning: axiom cdiv_cases does not contain any local abstract symbol -File "../why3/Qed.why", line 57, characters 6-16: -warning: axiom cmod_cases does not contain any local abstract symbol -File "../why3/Qed.why", line 67, characters 6-20: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "../why3/Qed.why", line 79, characters 6-18: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "../why3/Qed.why", line 82, characters 6-14: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "../why3/Cint.why", line 61, characters 6-14: -warning: axiom is_bool0 does not contain any local abstract symbol -File "../why3/Cint.why", line 63, characters 6-14: -warning: axiom is_bool1 does not contain any local abstract symbol -File "../why3/Cbits.why", line 11, characters 6-15: -warning: axiom lnot_bool does not contain any local abstract symbol -File "../why3/Cbits.why", line 14, characters 6-16: -warning: axiom land_idemp does not contain any local abstract symbol -File "../why3/Cbits.why", line 16, characters 6-12: -warning: axiom land_0 does not contain any local abstract symbol -File "../why3/Cbits.why", line 18, characters 6-15: -warning: axiom land_0bis does not contain any local abstract symbol -File "../why3/Cbits.why", line 20, characters 6-12: -warning: axiom land_1 does not contain any local abstract symbol -File "../why3/Cbits.why", line 23, characters 6-15: -warning: axiom land_1bis does not contain any local abstract symbol -File "../why3/Cbits.why", line 26, characters 6-15: -warning: axiom lor_idemp does not contain any local abstract symbol -File "../why3/Cbits.why", line 28, characters 6-11: -warning: axiom lor_1 does not contain any local abstract symbol -File "../why3/Cbits.why", line 31, characters 6-14: -warning: axiom lor_1bis does not contain any local abstract symbol -File "../why3/Cbits.why", line 34, characters 6-11: -warning: axiom lor_0 does not contain any local abstract symbol -File "../why3/Cbits.why", line 36, characters 6-14: -warning: axiom lor_0bis does not contain any local abstract symbol -File "../why3/Cbits.why", line 38, characters 6-20: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "../why3/Cbits.why", line 40, characters 6-12: -warning: axiom lxor_1 does not contain any local abstract symbol -File "../why3/Cbits.why", line 43, characters 6-15: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "../why3/Cbits.why", line 46, characters 6-12: -warning: axiom lxor_0 does not contain any local abstract symbol -File "../why3/Cbits.why", line 48, characters 6-15: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "../why3/Cbits.why", line 50, characters 6-18: -warning: axiom bit_test_def does not contain any local abstract symbol -File "../why3/Cbits.why", line 53, characters 6-25: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "../why3/Cbits.why", line 57, characters 6-13: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "../why3/Cbits.why", line 59, characters 6-29: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "../why3/Cbits.why", line 62, characters 6-32: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "../why3/Cbits.why", line 65, characters 6-21: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "../why3/Cbits.why", line 69, characters 6-21: -warning: axiom land_extraction does not contain any local abstract symbol -File "../why3/Cbits.why", line 73, characters 6-20: -warning: axiom lor_extraction does not contain any local abstract symbol -File "../why3/Cbits.why", line 77, characters 6-21: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "../why3/Cbits.why", line 81, characters 6-18: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "../why3/Cbits.why", line 87, characters 6-24: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 92, characters 6-24: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 96, characters 6-21: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "../why3/Cbits.why", line 100, characters 6-21: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "../why3/Cbits.why", line 104, characters 6-29: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 108, characters 6-29: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 112, characters 6-30: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 116, characters 6-30: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 120, characters 6-30: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 124, characters 6-30: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 128, characters 6-30: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 132, characters 6-30: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 136, characters 6-29: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 140, characters 6-29: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 144, characters 6-30: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 148, characters 6-30: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 152, characters 6-30: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 156, characters 6-30: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 160, characters 6-30: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 164, characters 6-30: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 168, characters 6-18: -warning: axiom is_uint_lxor does not contain any local abstract symbol -File "../why3/Cbits.why", line 171, characters 6-19: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "../why3/Cbits.why", line 175, characters 6-18: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "../why3/Cbits.why", line 179, characters 6-19: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "../why3/Cbits.why", line 183, characters 6-18: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "../why3/Cbits.why", line 187, characters 6-23: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 191, characters 6-23: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 194, characters 6-20: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "../why3/Cbits.why", line 198, characters 6-19: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "../why3/Cbits.why", line 202, characters 6-20: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "../why3/Cbits.why", line 206, characters 6-19: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "../why3/Cbits.why", line 210, characters 6-24: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 214, characters 6-24: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 217, characters 6-20: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "../why3/Cbits.why", line 221, characters 6-19: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "../why3/Cbits.why", line 225, characters 6-20: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "../why3/Cbits.why", line 229, characters 6-19: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "../why3/Cbits.why", line 233, characters 6-24: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 237, characters 6-24: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 240, characters 6-20: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "../why3/Cbits.why", line 244, characters 6-19: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "../why3/Cbits.why", line 248, characters 6-20: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "../why3/Cbits.why", line 252, characters 6-19: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "../why3/Cbits.why", line 256, characters 6-24: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 260, characters 6-24: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 263, characters 6-19: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "../why3/Cbits.why", line 266, characters 6-19: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "../why3/Cbits.why", line 270, characters 6-18: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "../why3/Cbits.why", line 274, characters 6-19: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "../why3/Cbits.why", line 278, characters 6-18: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "../why3/Cbits.why", line 282, characters 6-19: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "../why3/Cbits.why", line 284, characters 6-23: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 288, characters 6-23: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 291, characters 6-20: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "../why3/Cbits.why", line 294, characters 6-20: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "../why3/Cbits.why", line 298, characters 6-19: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "../why3/Cbits.why", line 302, characters 6-20: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "../why3/Cbits.why", line 306, characters 6-19: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "../why3/Cbits.why", line 310, characters 6-20: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "../why3/Cbits.why", line 312, characters 6-24: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 316, characters 6-24: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 319, characters 6-20: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "../why3/Cbits.why", line 322, characters 6-20: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "../why3/Cbits.why", line 326, characters 6-19: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "../why3/Cbits.why", line 330, characters 6-20: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "../why3/Cbits.why", line 334, characters 6-19: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "../why3/Cbits.why", line 338, characters 6-20: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "../why3/Cbits.why", line 340, characters 6-24: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 344, characters 6-24: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 347, characters 6-20: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "../why3/Cbits.why", line 350, characters 6-20: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "../why3/Cbits.why", line 354, characters 6-19: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "../why3/Cbits.why", line 358, characters 6-20: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "../why3/Cbits.why", line 362, characters 6-19: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "../why3/Cbits.why", line 366, characters 6-20: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "../why3/Cbits.why", line 368, characters 6-24: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "../why3/Cbits.why", line 372, characters 6-24: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "../why3/Cbits.why", line 375, characters 6-18: -warning: axiom lor_addition does not contain any local abstract symbol -File "../why3/Cbits.why", line 378, characters 6-19: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Cbits.why3.err b/src/plugins/wp/share/src/logs/Cbits.why3.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Cbits.why3.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Cfloat.altergo.err b/src/plugins/wp/share/src/logs/Cfloat.altergo.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Cfloat.altergo.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Cfloat.coq.err b/src/plugins/wp/share/src/logs/Cfloat.coq.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Cfloat.coq.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Cfloat.why3.check.err b/src/plugins/wp/share/src/logs/Cfloat.why3.check.err deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/wp/share/src/logs/Cfloat.why3.err b/src/plugins/wp/share/src/logs/Cfloat.why3.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Cfloat.why3.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Cint.altergo.err b/src/plugins/wp/share/src/logs/Cint.altergo.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Cint.altergo.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Cint.coq.err b/src/plugins/wp/share/src/logs/Cint.coq.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Cint.coq.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Cint.why3.check.err b/src/plugins/wp/share/src/logs/Cint.why3.check.err deleted file mode 100644 index f1e043b0ea3..00000000000 --- a/src/plugins/wp/share/src/logs/Cint.why3.check.err +++ /dev/null @@ -1,4 +0,0 @@ -File "../why3/Cint.why", line 61, characters 6-14: -warning: axiom is_bool0 does not contain any local abstract symbol -File "../why3/Cint.why", line 63, characters 6-14: -warning: axiom is_bool1 does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Cint.why3.err b/src/plugins/wp/share/src/logs/Cint.why3.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Cint.why3.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Cmath.altergo.err b/src/plugins/wp/share/src/logs/Cmath.altergo.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Cmath.altergo.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Cmath.coq.err b/src/plugins/wp/share/src/logs/Cmath.coq.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Cmath.coq.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Cmath.why3.check.err b/src/plugins/wp/share/src/logs/Cmath.why3.check.err deleted file mode 100644 index 7bfbad91a99..00000000000 --- a/src/plugins/wp/share/src/logs/Cmath.why3.check.err +++ /dev/null @@ -1,2 +0,0 @@ -File "../why3/Cmath.why", line 6, characters 6-13: -warning: axiom abs_def does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Cmath.why3.err b/src/plugins/wp/share/src/logs/Cmath.why3.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Cmath.why3.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/ExpLog.altergo.err b/src/plugins/wp/share/src/logs/ExpLog.altergo.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/ExpLog.altergo.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/ExpLog.coq.err b/src/plugins/wp/share/src/logs/ExpLog.coq.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/ExpLog.coq.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/ExpLog.why3.check.err b/src/plugins/wp/share/src/logs/ExpLog.why3.check.err deleted file mode 100644 index 55334275849..00000000000 --- a/src/plugins/wp/share/src/logs/ExpLog.why3.check.err +++ /dev/null @@ -1,2 +0,0 @@ -File "../why3/ExpLog.why", line 5, characters 6-13: -warning: axiom exp_pos does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/ExpLog.why3.err b/src/plugins/wp/share/src/logs/ExpLog.why3.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/ExpLog.why3.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Memory.altergo.err b/src/plugins/wp/share/src/logs/Memory.altergo.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Memory.altergo.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Memory.coq.err b/src/plugins/wp/share/src/logs/Memory.coq.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Memory.coq.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Memory.why3.check.err b/src/plugins/wp/share/src/logs/Memory.why3.check.err deleted file mode 100644 index a9e2fec2e99..00000000000 --- a/src/plugins/wp/share/src/logs/Memory.why3.check.err +++ /dev/null @@ -1,18 +0,0 @@ -File "../why3/Memory.why", line 63, characters 6-17: -warning: axiom valid_rw_rd does not contain any local abstract symbol -File "../why3/Memory.why", line 66, characters 6-18: -warning: axiom valid_string does not contain any local abstract symbol -File "../why3/Memory.why", line 70, characters 6-17: -warning: axiom separated_1 does not contain any local abstract symbol -File "../why3/Memory.why", line 85, characters 6-24: -warning: axiom separated_included does not contain any local abstract symbol -File "../why3/Memory.why", line 89, characters 6-20: -warning: axiom included_trans does not contain any local abstract symbol -File "../why3/Memory.why", line 93, characters 6-21: -warning: axiom separated_trans does not contain any local abstract symbol -File "../why3/Memory.why", line 97, characters 6-19: -warning: axiom separated_sym does not contain any local abstract symbol -File "../why3/Memory.why", line 100, characters 6-20: -warning: axiom eqmem_included does not contain any local abstract symbol -File "../why3/Memory.why", line 104, characters 6-15: -warning: axiom eqmem_sym does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Memory.why3.err b/src/plugins/wp/share/src/logs/Memory.why3.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Memory.why3.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Qed.altergo.err b/src/plugins/wp/share/src/logs/Qed.altergo.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Qed.altergo.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Qed.coq.err b/src/plugins/wp/share/src/logs/Qed.coq.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Qed.coq.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Qed.why3.check.err b/src/plugins/wp/share/src/logs/Qed.why3.check.err deleted file mode 100644 index 69811f5b4da..00000000000 --- a/src/plugins/wp/share/src/logs/Qed.why3.check.err +++ /dev/null @@ -1,12 +0,0 @@ -File "../why3/Qed.why", line 42, characters 6-17: -warning: axiom c_euclidian does not contain any local abstract symbol -File "../why3/Qed.why", line 47, characters 6-16: -warning: axiom cdiv_cases does not contain any local abstract symbol -File "../why3/Qed.why", line 57, characters 6-16: -warning: axiom cmod_cases does not contain any local abstract symbol -File "../why3/Qed.why", line 67, characters 6-20: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "../why3/Qed.why", line 79, characters 6-18: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "../why3/Qed.why", line 82, characters 6-14: -warning: axiom cdiv_inv does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Qed.why3.err b/src/plugins/wp/share/src/logs/Qed.why3.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Qed.why3.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Square.altergo.err b/src/plugins/wp/share/src/logs/Square.altergo.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Square.altergo.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Square.coq.err b/src/plugins/wp/share/src/logs/Square.coq.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Square.coq.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Square.why3.check.err b/src/plugins/wp/share/src/logs/Square.why3.check.err deleted file mode 100644 index 62a54685a88..00000000000 --- a/src/plugins/wp/share/src/logs/Square.why3.check.err +++ /dev/null @@ -1,8 +0,0 @@ -File "../why3/Square.why", line 5, characters 6-15: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "../why3/Square.why", line 8, characters 6-15: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "../why3/Square.why", line 11, characters 6-12: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "../why3/Square.why", line 13, characters 6-12: -warning: axiom sqrt_1 does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Square.why3.err b/src/plugins/wp/share/src/logs/Square.why3.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Square.why3.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Vlist.altergo.err b/src/plugins/wp/share/src/logs/Vlist.altergo.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Vlist.altergo.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Vlist.coq.err b/src/plugins/wp/share/src/logs/Vlist.coq.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Vlist.coq.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Vlist.why3.check.err b/src/plugins/wp/share/src/logs/Vlist.why3.check.err deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/wp/share/src/logs/Vlist.why3.err b/src/plugins/wp/share/src/logs/Vlist.why3.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Vlist.why3.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Vset.altergo.err b/src/plugins/wp/share/src/logs/Vset.altergo.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Vset.altergo.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Vset.coq.err b/src/plugins/wp/share/src/logs/Vset.coq.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Vset.coq.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/Vset.why3.check.err b/src/plugins/wp/share/src/logs/Vset.why3.check.err deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/plugins/wp/share/src/logs/Vset.why3.err b/src/plugins/wp/share/src/logs/Vset.why3.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/Vset.why3.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/bool.Bool.altergo.stdlib.err b/src/plugins/wp/share/src/logs/bool.Bool.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/bool.Bool.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/int.Abs.altergo.stdlib.err b/src/plugins/wp/share/src/logs/int.Abs.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/int.Abs.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/int.ComputerDivision.altergo.stdlib.err b/src/plugins/wp/share/src/logs/int.ComputerDivision.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/int.ComputerDivision.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/int.Int.altergo.stdlib.err b/src/plugins/wp/share/src/logs/int.Int.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/int.Int.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/int.MinMax.altergo.stdlib.err b/src/plugins/wp/share/src/logs/int.MinMax.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/int.MinMax.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/map.Const.altergo.stdlib.err b/src/plugins/wp/share/src/logs/map.Const.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/map.Const.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/map.Map.altergo.stdlib.err b/src/plugins/wp/share/src/logs/map.Map.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/map.Map.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/real.Abs.altergo.stdlib.err b/src/plugins/wp/share/src/logs/real.Abs.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/real.Abs.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/real.ExpLog.altergo.stdlib.err b/src/plugins/wp/share/src/logs/real.ExpLog.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/real.ExpLog.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/real.FromInt.altergo.stdlib.err b/src/plugins/wp/share/src/logs/real.FromInt.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/real.FromInt.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/real.Hyperbolic.altergo.stdlib.err b/src/plugins/wp/share/src/logs/real.Hyperbolic.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/real.Hyperbolic.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/real.MinMax.altergo.stdlib.err b/src/plugins/wp/share/src/logs/real.MinMax.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/real.MinMax.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/real.Polar.altergo.stdlib.err b/src/plugins/wp/share/src/logs/real.Polar.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/real.Polar.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/real.PowerReal.altergo.stdlib.err b/src/plugins/wp/share/src/logs/real.PowerReal.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/real.PowerReal.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/real.Real.altergo.stdlib.err b/src/plugins/wp/share/src/logs/real.Real.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/real.Real.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/real.RealInfix.altergo.stdlib.err b/src/plugins/wp/share/src/logs/real.RealInfix.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/real.RealInfix.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/real.Square.altergo.stdlib.err b/src/plugins/wp/share/src/logs/real.Square.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/real.Square.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/real.Trigonometry.altergo.stdlib.err b/src/plugins/wp/share/src/logs/real.Trigonometry.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/real.Trigonometry.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/logs/real.Truncate.altergo.stdlib.err b/src/plugins/wp/share/src/logs/real.Truncate.altergo.stdlib.err deleted file mode 100644 index 4ff8331fc7e..00000000000 --- a/src/plugins/wp/share/src/logs/real.Truncate.altergo.stdlib.err +++ /dev/null @@ -1,237 +0,0 @@ -[Config] reading extra configuration file realization.conf -File "WP-SHARE/src/./qed.why", line 76, characters 8-19: -warning: axiom c_euclidian does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 91, characters 8-22: -warning: axiom cmod_remainder does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 97, characters 8-20: -warning: axiom cdiv_neutral does not contain any local abstract symbol -File "WP-SHARE/src/./qed.why", line 98, characters 8-16: -warning: axiom cdiv_inv does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 32, characters 8-15: -warning: axiom abs_def does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 43, characters 8-17: -warning: axiom sqrt_lin1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 44, characters 8-17: -warning: axiom sqrt_lin0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 45, characters 8-14: -warning: axiom sqrt_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 46, characters 8-14: -warning: axiom sqrt_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cmath.why", line 55, characters 8-15: -warning: axiom exp_pos does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 36, characters 8-17: -warning: axiom lnot_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 39, characters 8-18: -warning: axiom land_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 40, characters 8-14: -warning: axiom land_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 41, characters 8-17: -warning: axiom land_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 42, characters 8-14: -warning: axiom land_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 43, characters 8-17: -warning: axiom land_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 44, characters 8-17: -warning: axiom land_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 49, characters 8-17: -warning: axiom lor_idemp does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 50, characters 8-13: -warning: axiom lor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 51, characters 8-16: -warning: axiom lor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 52, characters 8-13: -warning: axiom lor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 53, characters 8-16: -warning: axiom lor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 54, characters 8-16: -warning: axiom lor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 59, characters 8-22: -warning: axiom lxor_nilpotent does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 60, characters 8-14: -warning: axiom lxor_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 61, characters 8-17: -warning: axiom lxor_1bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 62, characters 8-14: -warning: axiom lxor_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 63, characters 8-17: -warning: axiom lxor_0bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 64, characters 8-17: -warning: axiom lxor_bool does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 71, characters 8-20: -warning: axiom bit_test_def does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 78, characters 8-27: -warning: axiom bit_test_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 84, characters 8-15: -warning: axiom lsl_1_0 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 86, characters 8-31: -warning: axiom bit_test_extraction_bis does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 88, characters 8-34: -warning: axiom bit_test_extraction_bis_eq does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 93, characters 8-23: -warning: axiom lnot_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 99, characters 8-23: -warning: axiom land_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 105, characters 8-22: -warning: axiom lor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 111, characters 8-23: -warning: axiom lxor_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 119, characters 8-20: -warning: axiom land_1_lsl_1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 124, characters 8-26: -warning: axiom lsl_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 130, characters 8-26: -warning: axiom lsl_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 136, characters 8-23: -warning: axiom lsr_extractionl does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 142, characters 8-23: -warning: axiom lsl1_extraction does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 173, characters 8-31: -warning: axiom to_uint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 178, characters 8-31: -warning: axiom to_uint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 189, characters 8-32: -warning: axiom to_uint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 194, characters 8-32: -warning: axiom to_uint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 205, characters 8-32: -warning: axiom to_uint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 210, characters 8-32: -warning: axiom to_uint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 221, characters 8-32: -warning: axiom to_uint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 226, characters 8-32: -warning: axiom to_uint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 253, characters 8-31: -warning: axiom to_sint8_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 258, characters 8-31: -warning: axiom to_sint8_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 269, characters 8-32: -warning: axiom to_sint16_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 274, characters 8-32: -warning: axiom to_sint16_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 285, characters 8-32: -warning: axiom to_sint32_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 290, characters 8-32: -warning: axiom to_sint32_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 301, characters 8-32: -warning: axiom to_sint64_extraction_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 306, characters 8-32: -warning: axiom to_sint64_extraction_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 333, characters 8-21: -warning: axiom to_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 363, characters 8-21: -warning: axiom is_uint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 366, characters 8-20: -warning: axiom is_uint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 369, characters 8-21: -warning: axiom is_uint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 372, characters 8-20: -warning: axiom is_uint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 375, characters 8-25: -warning: axiom is_uint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 378, characters 8-25: -warning: axiom is_uint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 382, characters 8-22: -warning: axiom is_uint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 385, characters 8-21: -warning: axiom is_uint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 388, characters 8-22: -warning: axiom is_uint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 391, characters 8-21: -warning: axiom is_uint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 394, characters 8-26: -warning: axiom is_uint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 397, characters 8-26: -warning: axiom is_uint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 401, characters 8-22: -warning: axiom is_uint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 404, characters 8-21: -warning: axiom is_uint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 407, characters 8-22: -warning: axiom is_uint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 410, characters 8-21: -warning: axiom is_uint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 413, characters 8-26: -warning: axiom is_uint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 416, characters 8-26: -warning: axiom is_uint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 420, characters 8-22: -warning: axiom is_uint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 423, characters 8-21: -warning: axiom is_uint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 426, characters 8-22: -warning: axiom is_uint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 429, characters 8-21: -warning: axiom is_uint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 432, characters 8-26: -warning: axiom is_uint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 435, characters 8-26: -warning: axiom is_uint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 462, characters 8-21: -warning: axiom is_sint8_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 465, characters 8-21: -warning: axiom is_sint8_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 468, characters 8-20: -warning: axiom is_sint8_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 471, characters 8-21: -warning: axiom is_sint8_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 474, characters 8-20: -warning: axiom is_sint8_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 477, characters 8-21: -warning: axiom is_sint8_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 480, characters 8-25: -warning: axiom is_sint8_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 483, characters 8-25: -warning: axiom is_sint8_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 487, characters 8-22: -warning: axiom is_sint16_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 490, characters 8-22: -warning: axiom is_sint16_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 493, characters 8-21: -warning: axiom is_sint16_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 496, characters 8-22: -warning: axiom is_sint16_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 499, characters 8-21: -warning: axiom is_sint16_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 502, characters 8-22: -warning: axiom is_sint16_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 505, characters 8-26: -warning: axiom is_sint16_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 508, characters 8-26: -warning: axiom is_sint16_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 512, characters 8-22: -warning: axiom is_sint32_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 515, characters 8-22: -warning: axiom is_sint32_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 518, characters 8-21: -warning: axiom is_sint32_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 521, characters 8-22: -warning: axiom is_sint32_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 524, characters 8-21: -warning: axiom is_sint32_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 527, characters 8-22: -warning: axiom is_sint32_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 530, characters 8-26: -warning: axiom is_sint32_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 533, characters 8-26: -warning: axiom is_sint32_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 537, characters 8-22: -warning: axiom is_sint64_lnot does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 540, characters 8-22: -warning: axiom is_sint64_lxor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 543, characters 8-21: -warning: axiom is_sint64_lor does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 546, characters 8-22: -warning: axiom is_sint64_land does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 549, characters 8-21: -warning: axiom is_sint64_lsr does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 552, characters 8-22: -warning: axiom is_sint64_lsl1 does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 555, characters 8-26: -warning: axiom is_sint64_lsl1_inf does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 558, characters 8-26: -warning: axiom is_sint64_lsl1_sup does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 583, characters 8-20: -warning: axiom lor_addition does not contain any local abstract symbol -File "WP-SHARE/src/./cbits.why", line 586, characters 8-21: -warning: axiom lxor_addition does not contain any local abstract symbol diff --git a/src/plugins/wp/share/src/lower.ml b/src/plugins/wp/share/src/lower.ml deleted file mode 100644 index 30e3aa0854c..00000000000 --- a/src/plugins/wp/share/src/lower.ml +++ /dev/null @@ -1 +0,0 @@ -let () = Printf.printf "%s" (String.lowercase_ascii Sys.argv.(1)) diff --git a/src/plugins/wp/share/src/memory.why b/src/plugins/wp/share/src/memory.why deleted file mode 100644 index 54b1238496a..00000000000 --- a/src/plugins/wp/share/src/memory.why +++ /dev/null @@ -1,178 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of WP plug-in of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat a l'energie atomique et aux energies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -theory Memory - - use import bool.Bool - use import int.Int - use import map.Map - - type addr = { base : int ; offset : int } - - predicate addr_le addr addr - predicate addr_lt addr addr - function addr_le_bool addr addr : bool - function addr_lt_bool addr addr : bool - - axiom addr_le_def: forall p q :addr [addr_le p q]. - p.base = q.base -> (addr_le p q <-> p.offset <= q.offset) - - axiom addr_lt_def: forall p q :addr [addr_lt p q]. - p.base = q.base -> (addr_lt p q <-> p.offset < q.offset) - - axiom addr_le_bool_def : forall p q : addr [ addr_le_bool p q]. - addr_le p q <-> addr_le_bool p q = True - - axiom addr_lt_bool_def : forall p q : addr [ addr_lt_bool p q]. - addr_lt p q <-> addr_lt_bool p q = True - - constant null : addr = { base = 0 ; offset = 0 } - function global (b:int) : addr = { base = b ; offset = 0 } - meta "inline : no" function null - meta "inline : no" function global - - function shift (p:addr) (k:int) : addr = { p with offset = p.offset + k } - predicate included (p:addr) (a:int) (q:addr) (b:int) = - a > 0 -> ( b >= 0 /\ p.base = q.base - /\ (q.offset <= p.offset) - /\ (p.offset + a <= q.offset + b) ) - - predicate separated (p:addr) (a:int) (q:addr) (b:int) = - a <= 0 \/ b <= 0 - \/ p.base <> q.base - \/ q.offset + b <= p.offset - \/ p.offset + a <= q.offset - - (* Memories *) - - predicate eqmem (m1 m2 : map addr 'a) (p:addr) (a:int) = - forall q:addr [m1[p]|m2[q]]. included q 1 p a -> m1[q] = m2[q] - - function havoc (m0 m1 : map addr 'a) (p:addr) (a:int) : map addr 'a - - predicate valid_rw (m : map int int) (p:addr) (n:int) = - n > 0 -> ( 0 < p.base /\ 0 <= p.offset /\ p.offset + n <= m[p.base] ) - - predicate valid_rd (m : map int int) (p:addr) (n:int) = - n > 0 -> ( 0 <> p.base /\ 0 <= p.offset /\ p.offset + n <= m[p.base] ) - - predicate invalid (m : map int int) (p:addr) (n:int) = - n > 0 -> ( m[p.base] <= p.offset \/ p.offset + n <= 0 ) - - lemma valid_rw_rd : - forall m : map int int. - forall p : addr. - forall n : int. - valid_rw m p n -> valid_rd m p n - - lemma valid_string : - forall m : map int int. - forall p : addr. - p.base < 0 -> - 0 <= p.offset < m[p.base] -> - (valid_rd m p 1 /\ not (valid_rw m p 1)) - - lemma separated_1 : forall p q : addr. forall a b i j : int - [ separated p a q b , { base = p.base ; offset = i } , - { base = q.base ; offset = j } ]. - separated p a q b -> - p.offset <= i < p.offset + a -> - q.offset <= j < q.offset + b -> - { base = p.base ; offset = i } <> - { base = q.base ; offset = j } - - (* Regions *) - - function region int : int - - predicate linked (map int int) - predicate sconst (map addr int) - predicate framed (m : map addr addr) = - forall p:addr [m[p]]. region(m[p].base) <= 0 - - (* Properties *) - - lemma separated_included : - forall p q : addr. - forall a b : int - [ separated p a q b , included p a q b ]. - a > 0 -> b > 0 -> separated p a q b -> included p a q b -> false - - lemma included_trans : - forall p q r : addr. - forall a b c : int - [ included p a q b , included q b r c ]. - included p a q b -> included q b r c -> included p a r c - - lemma separated_trans : - forall p q r : addr. - forall a b c : int - [ included p a q b , separated q b r c ]. - included p a q b -> separated q b r c -> separated p a r c - - lemma separated_sym : - forall p q : addr. - forall a b : int - [ separated p a q b ]. - separated p a q b <-> separated q b p a - - lemma eqmem_included : - forall m1 m2 : map addr 'a. - forall p q : addr. - forall a b : int - [ eqmem m1 m2 p a,eqmem m1 m2 q b ]. - included p a q b -> eqmem m1 m2 q b -> eqmem m1 m2 p a - - lemma eqmem_sym : - forall m1 m2 : map addr 'a. - forall p : addr. - forall a : int. - eqmem m1 m2 p a -> eqmem m2 m1 p a - - lemma havoc_access : - forall m0 m1 : map addr 'a. - forall q p : addr. - forall a : int. - (Map.([]) (havoc m0 m1 p a) (q)) = (if (separated q 1 p a) then (Map.([]) (m1) (q)) else (Map.([]) (m0) (q))) - - (* Physical Address *) - - function int_of_addr addr : int - function addr_of_int int : addr - function base_offset int : int - function base_index int : int - - axiom int_of_addr_bijection : - forall a:int. int_of_addr (addr_of_int a) = a - - axiom addr_of_int_bijection : - forall p:addr. addr_of_int (int_of_addr p) = p - - axiom addr_of_null : - int_of_addr null = 0 - - axiom base_offset_zero : base_offset 0 = 0 - axiom base_offset_inj : forall i :int. base_index (base_offset i) = i - axiom base_offset_monotonic : forall i j :int. - i < j -> base_offset i < base_offset j - -end diff --git a/src/plugins/wp/share/src/qed.why b/src/plugins/wp/share/src/qed.why deleted file mode 100644 index bd87796feaa..00000000000 --- a/src/plugins/wp/share/src/qed.why +++ /dev/null @@ -1,100 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of WP plug-in of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat a l'energie atomique et aux energies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -theory Qed - - use import bool.Bool - use import int.Int - use import real.RealInfix - use import real.FromInt - use import int.ComputerDivision as CD - - (** to be used only for the ACSL ite generation. - Something is wrong with "wp/share/ergo/bool.Bool.mlw" (coming from why3), - the function match_bool is undefined. - An hack is to give a definition here. *) - function match_bool (x : bool) (y z:'a ) : 'a - axiom match_bool: forall p:bool, x:'a, y:'a [match_bool p x y]. - ( p=True /\ match_bool p x y=x ) || - ( p=False /\ match_bool p x y=y ) - meta "remove_for_why3" prop match_bool - - (** The definitions are in comment because its not useful for coq - (no if-then-else on formula) and not tested on automatic provers *) - - function eqb (x y : 'a) : bool (*= if x = y then True else False*) - axiom eqb : forall x:'a, y:'a. eqb x y = True <-> x = y - - axiom eqb_false : forall x:'a, y:'a. eqb x y = False <-> x <> y - meta "remove_for_" prop eqb_false - - function neqb (x y : 'a) : bool(* = if x <> y then True else False*) - axiom neqb : forall x:'a, y:'a. neqb x y = True <-> x <> y - - function zlt (x y : int) : bool(* = if x < y then True else False*) - function zleq (x y : int) : bool(* = if x <= y then True else False*) - - axiom zlt : forall x:int, y:int. zlt x y = True <-> x < y - axiom zleq : forall x:int, y:int. zleq x y = True <-> x <= y - - function rlt (x y : real) : bool(* = if x <. y then True else False*) - function rleq (x y : real) : bool(* = if x <=. y then True else False*) - - axiom rlt : forall x:real, y:real. rlt x y = True <-> x <. y - axiom rleq : forall x:real, y:real. rleq x y = True <-> x <=. y - - function real_of_int (x:int) : real = FromInt.from_int x - meta "inline : no" function real_of_int - - (* -------------------------------------------------------------------------- *) - (* --- Division safe with a prover using computer or euclidean division --- *) - (* -------------------------------------------------------------------------- *) - - (* pdiv and pmod are the prover operation (safe only on positive number *) - function pdiv (n d : int) : int - function pmod (n d : int) : int - - axiom c_euclidian : forall n d:int [(CD.div n d),(CD.mod n d)]. - d <> 0 -> n = CD.div n d * d + CD.mod n d - - axiom cdiv_cases : forall n d:int [CD.div n d]. - ((n >= 0) -> (d > 0) -> CD.div n d = pdiv n d) /\ - ((n <= 0) -> (d > 0) -> CD.div n d = -(pdiv (-n) d)) /\ - ((n >= 0) -> (d < 0) -> CD.div n d = -(pdiv n (-d))) /\ - ((n <= 0) -> (d < 0) -> CD.div n d = pdiv (-n) (-d)) - - axiom cmod_cases : forall n d:int [CD.mod n d]. - ((n >= 0) -> (d > 0) -> CD.mod n d = pmod n d) /\ - ((n <= 0) -> (d > 0) -> CD.mod n d = -(pmod (-n) d)) /\ - ((n >= 0) -> (d < 0) -> CD.mod n d = (pmod n (-d))) /\ - ((n <= 0) -> (d < 0) -> CD.mod n d = -(pmod (-n) (-d))) - - axiom cmod_remainder : forall n d:int [CD.mod n d]. - ((n >= 0) -> (d > 0) -> 0 <= CD.mod n d < d) /\ - ((n <= 0) -> (d > 0) -> -d < CD.mod n d <= 0) /\ - ((n >= 0) -> (d < 0) -> 0 <= CD.mod n d < -d) /\ - ((n <= 0) -> (d < 0) -> d < CD.mod n d <= 0) - - axiom cdiv_neutral : forall a:int [CD.div a 1]. CD.div a 1 = a - axiom cdiv_inv : forall a:int [CD.div a a]. a<>0 -> CD.div a a = 1 - -end diff --git a/src/plugins/wp/share/src/realization.conf b/src/plugins/wp/share/src/realization.conf deleted file mode 100644 index a45ec36d4ec..00000000000 --- a/src/plugins/wp/share/src/realization.conf +++ /dev/null @@ -1,15 +0,0 @@ -[main] -plugin="filter_axioms" -plugin="alt_ergo_realize" -plugin="why3printer_realize" -loadpath="." - -[prover_modifiers] -name="Coq" -option="-R WP FramaCwp" -driver="coq.drv" - - -[prover_modifiers] -name="Alt-Ergo" -driver="alt_ergo-realize.drv" diff --git a/src/plugins/wp/share/src/tests/import.why b/src/plugins/wp/share/src/tests/import.why deleted file mode 100644 index 156acb3a662..00000000000 --- a/src/plugins/wp/share/src/tests/import.why +++ /dev/null @@ -1,6 +0,0 @@ -theory T - use import qed.Qed - - goal G : forall x : int, y : int. zleq x y = zleq y x -> x = y - -end \ No newline at end of file diff --git a/src/plugins/wp/share/src/tests/import/import_T_G_1.v b/src/plugins/wp/share/src/tests/import/import_T_G_1.v deleted file mode 100644 index 5223db903b2..00000000000 --- a/src/plugins/wp/share/src/tests/import/import_T_G_1.v +++ /dev/null @@ -1,22 +0,0 @@ -(* This file is generated by Why3's Coq 8.4 driver *) -(* Beware! Only edit allowed sections below *) -Require Import BuiltIn. -Require BuiltIn. -Require WP.Qed. -Require bool.Bool. -Require int.Int. -Require real.Real. -Require real.RealInfix. - -(* Why3 goal *) -Theorem G : forall (x:Z) (y:Z), ((WP.Qed.zleq x y) = (WP.Qed.zleq y x)) -> - (x = y). -(* Why3 intros x y h1. *) -intros x y h1. -unfold Qed.zleq in *. -SearchAbout Zle_bool. -apply Zle_bool_antisym;destruct (Zle_bool_total x y); try exact e; -[rewrite h1|rewrite <- h1]; exact e. -Qed. - - diff --git a/src/plugins/wp/share/src/tests/import/why3session.xml b/src/plugins/wp/share/src/tests/import/why3session.xml deleted file mode 100644 index a6b3d958f98..00000000000 --- a/src/plugins/wp/share/src/tests/import/why3session.xml +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE why3session PUBLIC "-//Why3//proof session v2//EN" "http://why3.lri.fr/why3session.dtd"> -<why3session shape_version="2"> - <prover - id="0" - name="Alt-Ergo" - version="0.94"/> - <prover - id="1" - name="Coq" - version="8.4pl1"/> - <file - name="../import.why" - verified="true" - expanded="true"> - <theory - name="T" - locfile="../import.why" - loclnum="1" loccnumb="7" loccnume="8" - verified="true" - expanded="true"> - <goal - name="G" - locfile="../import.why" - loclnum="4" loccnumb="12" loccnume="13" - sum="bacfa28e617e2aeba3b392f178d285f2" - proved="true" - expanded="true" - shape="ainfix =V0V1Iainfix =azleqV0V1azleqV1V0F"> - <proof - prover="0" - timelimit="5" - memlimit="500" - obsolete="false" - archived="false"> - <result status="valid" time="0.01"/> - </proof> - <proof - prover="1" - timelimit="5" - memlimit="500" - edited="import_T_G_1.v" - obsolete="false" - archived="false"> - <result status="valid" time="0.86"/> - </proof> - </goal> - </theory> - </file> -</why3session> diff --git a/src/plugins/wp/share/src/upper.ml b/src/plugins/wp/share/src/upper.ml deleted file mode 100644 index 44fcdb58d15..00000000000 --- a/src/plugins/wp/share/src/upper.ml +++ /dev/null @@ -1 +0,0 @@ -let () = Printf.printf "%s" (String.capitalize_ascii Sys.argv.(1)) diff --git a/src/plugins/wp/share/src/vlist.why b/src/plugins/wp/share/src/vlist.why deleted file mode 100644 index 885127e7f8d..00000000000 --- a/src/plugins/wp/share/src/vlist.why +++ /dev/null @@ -1,199 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of WP plug-in of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat a l'energie atomique et aux energies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -(* ---------------------------------------------------------------------- *) -(* --- Lists for Why-3 --- *) -(* ---------------------------------------------------------------------- *) - -theory Vlist - - use import int.Int - use import int.ComputerDivision - - (* -------------------------------------------------------------------- *) - (* --- Classical Lists for Alt-Ergo --- *) - (* -------------------------------------------------------------------- *) - - type list 'a - - function nil : list 'a - function cons 'a (list 'a) : list 'a - function concat (list 'a) (list 'a) : list 'a - function repeat (list 'a) int : list 'a - function length (list 'a) : int - function nth (list 'a) int : 'a - - (* -------------------------------------------------------------------- *) - (* --- length --- *) - (* -------------------------------------------------------------------- *) - - axiom length_pos : forall w:list 'a. (Int.(<=) 0 (length w)) - - axiom length_nil : length (nil: list 'a) = 0 - - axiom length_nil_bis : forall w:list 'a. length w = 0 -> w = nil - - axiom length_cons : - forall x:'a, w:list 'a [length (cons x w)]. - length (cons x w) = (Int.(+) 1 (length w)) - - axiom length_concat : - forall u,v:list 'a [length (concat u v)]. - length (concat u v) = (Int.(+) (length u) (length v)) - - axiom length_repeat : - forall w:list 'a, n:int [length (repeat w n)]. - (Int.(<=) 0 n) -> length (repeat w n) = (Int.(*) n (length w)) - - (* -------------------------------------------------------------------- *) - (* --- nth --- *) - (* -------------------------------------------------------------------- *) - - axiom nth_cons: - forall k:int, x:'a, w:list 'a [nth (cons x w) k]. - nth (cons x w) k = if k = 0 then x else nth w (k-1) - - axiom nth_concat: - forall u,v:list 'a, k:int [nth (concat u v) k]. - nth (concat u v) k = if k < length u then nth u k - else nth v (Int.(-) k (length u)) - - axiom nth_repeat: - forall n,k:int, w:list 'a [nth (repeat w n) k]. - 0 <= k < (Int.(*) n (length w)) -> (Int.(<) 0 (length w)) -> - nth (repeat w n) k = nth w (mod k (length w)) - - (* -------------------------------------------------------------------- *) - (* --- equality of Lists --- *) - (* -------------------------------------------------------------------- *) - - predicate vlist_eq (u : list 'a) (v : list 'a) = - length u = length v && - forall i:int. 0 <= i < length u -> nth u i = nth v i - - axiom extensionality: - forall u,v:list 'a. vlist_eq u v -> u = v - - (* -------------------------------------------------------------------- *) - (* --- neutral elements --- *) - (* -------------------------------------------------------------------- *) - - lemma eq_nil_concat: - forall w:list 'a. vlist_eq (concat nil w) w /\ vlist_eq (concat w nil) w - meta "remove_for_" prop eq_nil_concat - - lemma rw_nil_concat_left: - forall w:list 'a [concat nil w]. concat nil w = w - - lemma rw_nil_concat_right: - forall w:list 'a [concat w nil]. concat w nil = w - - (* -------------------------------------------------------------------- *) - (* --- normalization --- *) - (* -------------------------------------------------------------------- *) - - lemma eq_cons_concat: - forall x:'a, v,w:list 'a [concat (cons x v) w]. - vlist_eq (concat (cons x v) w) (cons x (concat v w)) - meta "remove_for_" prop eq_cons_concat - - lemma rw_cons_concat: - forall x:'a, v,w:list 'a [concat (cons x v) w]. - (concat (cons x v) w) = (cons x (concat v w)) - meta "remove_for_" prop rw_cons_concat - - lemma rw_nil_cons_concat: - forall x:'a, w:list 'a [concat (cons x nil) w]. - (concat (cons x nil) w) = (cons x w) - meta "remove_for_" prop rw_nil_cons_concat - - (* -------------------------------------------------------------------- *) - (* --- associativity --- *) - (* -------------------------------------------------------------------- *) - - lemma eq_assoc_concat: - forall u,v,w:list 'a. - vlist_eq (concat (concat u v) w) (concat u (concat v w)) - meta "remove_for_" prop eq_assoc_concat - - (* -------------------------------------------------------------------- *) - (* --- repeat --- *) - (* -------------------------------------------------------------------- *) - - lemma rw_nil_repeat: - forall n:int [repeat (nil: list 'a) n]. - n >= 0 -> repeat (nil: list 'a) n = (nil: list 'a) - - lemma rw_repeat_zero: - forall w:list 'a [repeat w 0]. - repeat w 0 = nil - - lemma eq_repeat_one: - forall w:list 'a. vlist_eq (repeat w 1) w - meta "remove_for_" prop eq_repeat_one - - lemma rw_repeat_one: - forall w:list 'a [repeat w 1]. repeat w 1 = w - - lemma eq_repeat_concat: - forall p,q:int, w:list 'a. - 0 <= p -> 0 <= q -> - vlist_eq (repeat w (Int.(+) p q)) (concat (repeat w p) (repeat w q)) - meta "remove_for_" prop eq_repeat_concat - - lemma rw_repeat_concat: - forall p,q:int, w:list 'a. - 0 <= p -> 0 <= q -> - repeat w (Int.(+) p q) = concat (repeat w p) (repeat w q) - meta "remove_for_" prop rw_repeat_concat - - lemma rw_repeat_after: - forall p:int, w:list 'a. - 0 <= p -> concat (repeat w p) w = repeat w (Int.(+) p 1) - meta "remove_for_" prop rw_repeat_after - - lemma rw_repeat_before: - forall p:int, w:list 'a. - 0 <= p -> concat w (repeat w p) = repeat w (Int.(+) p 1) - meta "remove_for_" prop rw_repeat_before - -(*--- To avoid exponential blowup of use of repeat_after by alt-ergo ---*) - -function repeat_box (list 'a) int : (list 'a) (* repeat *) - -axiom rw_repeat_box_unfold: - forall w:list 'a, n:int [ repeat_box w n ]. - repeat_box w n = repeat w n - -axiom rw_repeat_plus_box_unfold: - forall w:list 'a, a,b: int [ repeat_box w (Int.(+) a b) ]. - (Int.(<=) 0 a) - -> (Int.(<=) 0 b) - -> repeat_box w (Int.(+) a b) = concat (repeat w a) - (repeat w b) -axiom rw_repeat_plus_one_box_unfold: - forall w:list 'a, n:int [ repeat_box w n ]. - (Int.(<) 0 n) - -> (repeat_box w n = (concat (repeat w (Int.(-) n 1)) w) - && (repeat_box w (Int.(+) n 1) = concat (repeat w n) w)) - -end diff --git a/src/plugins/wp/share/src/vset.why b/src/plugins/wp/share/src/vset.why deleted file mode 100644 index 35da72053b1..00000000000 --- a/src/plugins/wp/share/src/vset.why +++ /dev/null @@ -1,101 +0,0 @@ -(**************************************************************************) -(* *) -(* This file is part of WP plug-in of Frama-C. *) -(* *) -(* Copyright (C) 2007-2019 *) -(* CEA (Commissariat a l'energie atomique et aux energies *) -(* alternatives) *) -(* *) -(* you can redistribute it and/or modify it under the terms of the GNU *) -(* Lesser General Public License as published by the Free Software *) -(* Foundation, version 2.1. *) -(* *) -(* It is distributed in the hope that it will be useful, *) -(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) -(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) -(* GNU Lesser General Public License for more details. *) -(* *) -(* See the GNU Lesser General Public License version 2.1 *) -(* for more details (enclosed in the file licenses/LGPLv2.1). *) -(* *) -(**************************************************************************) - -(* -------------------------------------------------------------------------- *) -(* --- Sets for Why-3 --- *) -(* -------------------------------------------------------------------------- *) - -theory Vset - - use import bool.Bool - use import int.Int - - (* -------------------------------------------------------------------------- *) - (* --- Classical Sets for Alt-Ergo --- *) - (* -------------------------------------------------------------------------- *) - - type set 'a - - function empty : set 'a - function singleton 'a : set 'a - - function union (set 'a) (set 'a) : set 'a - function inter (set 'a) (set 'a) : set 'a - - meta AC function union - meta AC function inter - - predicate member 'a (set 'a) - function member_bool 'a (set 'a) : bool - - function range int int : set int (* [a..b] *) - function range_sup int : set int (* [a..] *) - function range_inf int : set int (* [..b] *) - function range_all : set int (* [..] *) - - predicate eqset (a : set 'a) (b : set 'a) = - forall x : 'a. (member x a) <-> (member x b) - - predicate subset (a : set 'a) (b : set 'a) = - forall x : 'a. (member x a) -> (member x b) - - predicate disjoint (a : set 'a) (b : set 'a) = - forall x : 'a. (member x a) -> (member x b) -> false - - (* -------------------------------------------------------------------------- *) - - axiom member_bool : forall x:'a. forall s:set 'a [member_bool x s]. - if member x s then member_bool x s = True else member_bool x s = False - - axiom member_empty : forall x:'a [member x empty]. - not (member x empty) - - axiom member_singleton : forall x:'a,y:'a [member x (singleton y)]. - member x (singleton y) <-> x=y - - axiom member_union : forall x:'a. forall a:set 'a,b:set 'a [member x (union a b)]. - member x (union a b) <-> (member x a) \/ (member x b) - - axiom member_inter : forall x:'a. forall a:set 'a,b:set 'a [member x (inter a b)]. - member x (inter a b) <-> (member x a) /\ (member x b) - - axiom union_empty : forall a:set 'a [(union a empty)|(union empty a)]. - (union a empty) = a /\ (union empty a) = a - - axiom inter_empty : forall a:set 'a [(inter a empty)|(inter empty a)]. - (inter a empty) = empty /\ (inter empty a) = empty - - axiom member_range : forall x:int,a:int,b:int [member x (range a b)]. - member x (range a b) <-> (a <= x /\ x <= b) - - axiom member_range_sup : forall x:int,a:int [member x (range_sup a)]. - member x (range_sup a) <-> (a <= x) - - axiom member_range_inf : forall x:int,b:int [member x (range_inf b)]. - member x (range_inf b) <-> (x <= b) - - axiom member_range_all : forall x:int [member x range_all]. - member x range_all - - (* -------------------------------------------------------------------------- *) - -end \ No newline at end of file diff --git a/src/plugins/wp/share/src/why3-realize.drv b/src/plugins/wp/share/src/why3-realize.drv deleted file mode 100644 index 402d73de804..00000000000 --- a/src/plugins/wp/share/src/why3-realize.drv +++ /dev/null @@ -1,103 +0,0 @@ -(* Why driver for Why3 syntax *) - -printer "why3-realize" -filename "%t.why" - -import "why3.drv" - -transformation "remove_for_why3" -transformation "inline_in" -transformation "def_into_axiom" - -theory BuiltIn - syntax type int "int" - syntax type real "real" - syntax predicate (=) "((%1) = (%2))" -end - -theory Bool - syntax type bool "Bool.bool" - syntax function True "Bool.True" - syntax function False "Bool.False" -end - -theory bool.Bool - meta "realized_theory" "bool.Bool", "bool.Bool" -end - -theory Tuple2 - syntax type tuple2 "(%1*%2)" - syntax function Tuple2 "(%1,%2)" - -end - -theory int.Int - meta "realized_theory" "int.Int", "int.Int" - - syntax function (-_) "(Int.(-_) (%1))" - - syntax predicate (>=) "(Int.(>=) (%1) (%2))" - syntax predicate (>) "(Int.(>) (%1) (%2))" - syntax predicate (<=) "(Int.(<=) (%1) (%2))" - syntax predicate (<) "(Int.(<) (%1) (%2))" - - syntax function (-) "(Int.(-) (%1) (%2))" - syntax function (+) "(Int.(+) (%1) (%2))" - syntax function (*) "(Int.(*) (%1) (%2))" - -end - -theory map.Map - meta "realized_theory" "map.Map", "map.Map" - syntax function ([]) "(Map.([]) (%1) (%2))" - syntax function ([<-]) "(Map.([<-]) (%1) (%2) (%3))" -end - -theory real.Real - meta "realized_theory" "real.Real", "real.Real" - - syntax function (-_) "(Real.(-_) (%1))" - - syntax predicate (>=) "(Real.(>=) (%1) (%2))" - syntax predicate (>) "(Real.(>) (%1) (%2))" - syntax predicate (<=) "(Real.(<=) (%1) (%2))" - syntax predicate (<) "(Real.(<) (%1) (%2))" - - syntax function (-) "(Real.(-) (%1) (%2))" - syntax function (+) "(Real.(+) (%1) (%2))" - syntax function ( *) "(Real.(*) (%1) (%2))" - syntax function (/) "(Real.(/) (%1) (%2))" -end - -theory real.RealInfix - syntax function (-._) "(Real.(-_) (%1))" - - syntax predicate (>=.) "(Real.(>=) (%1) (%2))" - syntax predicate (>.) "(Real.(>) (%1) (%2))" - syntax predicate (<=.) "(Real.(<=) (%1) (%2))" - syntax predicate (<.) "(Real.(<) (%1) (%2))" - - syntax function (-.) "(Real.(-) (%1) (%2))" - syntax function (+.) "(Real.(+) (%1) (%2))" - syntax function ( *.) "(Real.(*) (%1) (%2))" - syntax function (/.) "(Real.(/) (%1) (%2))" - syntax function inv "(Real.inv (%1))" - -end - -theory qed.Qed - syntax function pdiv "(ComputerDivision.div %1 %2)" - syntax function pmod "(ComputerDivision.mod %1 %2)" -end - -theory int.ComputerDivision - meta "realized_theory" "int.ComputerDivision", "int.ComputerDivision" -end - -theory int.Abs meta "realized_theory" "int.Abs", "int.Abs" end -theory real.Abs meta "realized_theory" "real.Abs", "real.Abs" end -theory real.FromInt meta "realized_theory" "real.FromInt", "real.FromInt" end -theory real.Square meta "realized_theory" "real.Square", "real.Square" end -theory real.ExpLog meta "realized_theory" "real.ExpLog", "real.ExpLog" end -theory real.PowerReal meta "realized_theory" "real.PowerReal", "real.PowerReal" end -theory real.Trigonometry meta "realized_theory" "real.Trigonometry", "real.Trigonometry" end diff --git a/src/plugins/wp/share/src/why3printer_realize.ml b/src/plugins/wp/share/src/why3printer_realize.ml deleted file mode 100644 index 6042541b3fc..00000000000 --- a/src/plugins/wp/share/src/why3printer_realize.ml +++ /dev/null @@ -1,555 +0,0 @@ -(**************************************************************************) -(* *) -(* The Why3 Verification Platform / The Why3 Development Team *) -(* Copyright 2010-2019 -- Inria - CNRS - Paris-Sud University *) -(* *) -(* This software is distributed under the terms of the GNU Lesser *) -(* General Public License version 2.1, with the special exception *) -(* on linking described in file LICENSE. *) -(* *) -(* File modified by CEA (Commissariat à l'énergie atomique et aux *) -(* énergies alternatives). *) -(* *) -(**************************************************************************) - -(** Why3 printer *) -open Why3 -open Format -open Pp -open Ident -open Ty -open Term -open Decl -open Printer -open Theory - -exception NotInRealizedTheories of theory - -type ident_printers = { - iprinter: ident_printer; - cprinter: ident_printer; - aprinter: ident_printer; - tprinter: ident_printer; - pprinter: ident_printer; -} - -(* info *) - -type info = { - (** used in an thread unsafe way but there is not thread in why3 *) - mutable info_syn : syntax_map; - (** printer for imported theories during realization. - empty when not doing realization *) - symbol_printers : (string * ident_printers) Mid.t; - (** printer for local symbols *) - local_printers : ident_printers; -} - -let fresh_printers () = - let bl = ["theory"; "type"; "function"; "predicate"; "inductive"; - "axiom"; "lemma"; "goal"; "use"; "clone"; "prop"; "meta"; - "namespace"; "import"; "export"; "end"; - "forall"; "exists"; "not"; "true"; "false"; "if"; "then"; "else"; - "let"; "in"; "match"; "with"; "as"; "epsilon" ] in - let isanitize = sanitizer char_to_alpha char_to_alnumus in - let lsanitize = sanitizer char_to_lalpha char_to_alnumus in - { - iprinter = create_ident_printer bl ~sanitizer:isanitize; - cprinter = create_ident_printer bl ~sanitizer:isanitize; - aprinter = create_ident_printer bl ~sanitizer:lsanitize; - tprinter = create_ident_printer bl ~sanitizer:lsanitize; - pprinter = create_ident_printer bl ~sanitizer:isanitize; - } - -let info = ref { info_syn = Mid.empty; symbol_printers = Mid.empty; - local_printers = fresh_printers ()} - -let forget_tvs () = - forget_all !info.local_printers.aprinter - -let print_gen - ?sanitizer ?(prefix="") - ~getid ~getprinter fmt x = - let id = getid x in - try - let path,ipr = Mid.find id (!info).symbol_printers in - fprintf fmt "%s.%s%s" - path prefix (id_unique ?sanitizer (getprinter ipr) id) - with Not_found -> - let ipr = (!info).local_printers in - Format.pp_print_string fmt prefix; - Format.pp_print_string fmt (id_unique ?sanitizer (getprinter ipr) id) - -(* type variables always start with a quote *) -let print_tv fmt x = print_gen - ~getid:(fun tv -> tv.tv_name) - ~getprinter:(fun p -> p.aprinter) - ~prefix:"'" - fmt x - -(* logic variables always start with a lower case letter *) -let print_vs fmt x = print_gen - ~getid:(fun vs -> vs.vs_name) - ~getprinter:(fun p -> p.iprinter) - ~sanitizer:String.uncapitalize_ascii - fmt x - -let forget_var vs = forget_id (!info).local_printers.iprinter vs.vs_name - -(* theory names always start with an upper case letter *) -let print_th fmt x = print_gen - ~getid:(fun th -> th.th_name) - ~getprinter:(fun p -> p.cprinter) - ~sanitizer:String.capitalize_ascii - fmt x - -let print_ts fmt x = print_gen - ~getid:(fun ts -> ts.ts_name) - ~getprinter:(fun p -> p.tprinter) - fmt x - -let print_ls fmt x = print_gen - ~getid:(fun ls -> ls.ls_name) - ~getprinter:(fun p -> p.iprinter) - fmt x - -(* constructor names always start with an upper case letter *) -let print_cs fmt x = print_gen - ~getid:(fun ls -> ls.ls_name) - ~getprinter:(fun p -> p.cprinter) - ~sanitizer:String.capitalize_ascii - fmt x - -let print_pr fmt x = print_gen - ~getid:(fun pr -> pr.pr_name) - ~getprinter:(fun p -> p.pprinter) - fmt x - -let query_syntax id = query_syntax !info.info_syn id -let query_remove id = Mid.mem id !info.info_syn - -(** Types *) - -let protect_on x s = if x then "(" ^^ s ^^ ")" else s - -let rec print_ty_node inn fmt ty = match ty.ty_node with - | Tyvar v -> print_tv fmt v - | Tyapp (ts, tl) -> begin match query_syntax ts.ts_name with - | Some s -> syntax_arguments s (print_ty_node false) fmt tl - | None -> begin match tl with - | [] -> print_ts fmt ts - | tl -> fprintf fmt (protect_on inn "%a@ %a") - print_ts ts (print_list space (print_ty_node true)) tl - end - end - -let print_ty = print_ty_node false - -(* can the type of a value be derived from the type of the arguments? *) -let unambig_fs fs = - let rec lookup v ty = match ty.ty_node with - | Tyvar u when tv_equal u v -> true - | _ -> ty_any (lookup v) ty - in - let lookup v = List.exists (lookup v) fs.ls_args in - let rec inspect ty = match ty.ty_node with - | Tyvar u when not (lookup u) -> false - | _ -> ty_all inspect ty - in - Opt.fold (fun _ -> inspect) true fs.ls_value - -(** Patterns, terms, and formulas *) - -let rec print_pat_node pri fmt p = match p.pat_node with - | Pwild -> - fprintf fmt "_" - | Pvar v -> - print_vs fmt v - | Pas (p, v) -> - fprintf fmt (protect_on (pri > 1) "%a as %a") - (print_pat_node 1) p print_vs v - | Por (p, q) -> - fprintf fmt (protect_on (pri > 0) "%a | %a") - (print_pat_node 0) p (print_pat_node 0) q - | Papp (cs, pl) -> begin match query_syntax cs.ls_name with - | Some s -> syntax_arguments s (print_pat_node 0) fmt pl - | None -> begin match pl with - | [] -> print_cs fmt cs - | pl -> fprintf fmt (protect_on (pri > 1) "%a@ %a") - print_cs cs (print_list space (print_pat_node 2)) pl - end - end - -let print_pat = print_pat_node 0 - -let print_vsty fmt v = - fprintf fmt "%a:@,%a" print_vs v print_ty v.vs_ty - -let print_quant = Pretty.print_quant -let print_binop = Pretty.print_binop - -let prio_binop = function - | Tand -> 3 - | Tor -> 2 - | Timplies -> 1 - | Tiff -> 1 - -let print_label = Pretty.print_label -let print_labels = print_iter1 Slab.iter space print_label - -let print_ident_labels fmt id = - if not (Slab.is_empty id.id_label) then - fprintf fmt "@ %a" print_labels id.id_label - -let rec print_term fmt t = print_lterm 0 fmt t - -and print_lterm pri fmt t = - if Slab.is_empty t.t_label then print_tnode pri fmt t - else fprintf fmt (protect_on (pri > 0) "%a %a") - print_labels t.t_label (print_tnode 0) t - -and print_app pri fs fmt tl = - match query_syntax fs.ls_name with - | Some s -> syntax_arguments s print_term fmt tl - | None -> - let print_symb = if fs.ls_constr > 0 then print_cs else print_ls in - begin match tl with - | [] -> print_symb fmt fs - | tl -> fprintf fmt (protect_on (pri > 5) "%a@ %a") - print_symb fs (print_list space (print_lterm 6)) tl - end - -and print_tnode pri fmt t = match t.t_node with - | Tvar v -> - print_vs fmt v - | Tconst c -> - Number.print_constant fmt c - | Tapp (fs, tl) when unambig_fs fs -> - print_app pri fs fmt tl - | Tapp (fs, tl) -> - fprintf fmt (protect_on (pri > 0) "%a:%a") - (print_app 5 fs) tl print_ty (t_type t) - | Tif (f,t1,t2) -> - fprintf fmt (protect_on (pri > 0) "if @[%a@] then %a@ else %a") - print_term f print_term t1 print_term t2 - | Tlet (t1,tb) -> - let v,t2 = t_open_bound tb in - fprintf fmt (protect_on (pri > 0) "let %a = @[%a@] in@ %a") - print_vs v (print_lterm 4) t1 print_term t2; - forget_var v - | Tcase (t1,bl) -> - fprintf fmt "match @[%a@] with@\n@[<hov>%a@]@\nend" - print_term t1 (print_list newline print_tbranch) bl - | Teps fb -> - let v,f = t_open_bound fb in - fprintf fmt (protect_on (pri > 0) "epsilon %a.@ %a") - print_vsty v print_term f; - forget_var v - | Tquant (q,fq) -> - let vl,tl,f = t_open_quant fq in - fprintf fmt (protect_on (pri > 0) "%a %a%a.@ %a") print_quant q - (print_list comma print_vsty) vl print_tl tl print_term f; - List.iter forget_var vl - | Ttrue -> - fprintf fmt "true" - | Tfalse -> - fprintf fmt "false" - | Tbinop (b,f1,f2) -> - let asym = Slab.mem Term.asym_label f1.t_label in - let p = prio_binop b in - fprintf fmt (protect_on (pri > p) "%a %a@ %a") - (print_lterm (p + 1)) f1 (print_binop ~asym) b (print_lterm p) f2 - | Tnot f -> - fprintf fmt (protect_on (pri > 4) "not %a") (print_lterm 4) f - -and print_tbranch fmt br = - let p,t = t_open_branch br in - fprintf fmt "@[<hov 4>| %a ->@ %a@]" print_pat p print_term t; - Svs.iter forget_var p.pat_vars - -and print_tl fmt tl = - if tl = [] then () else fprintf fmt "@ [%a]" - (print_list alt (print_list comma print_term)) tl - -(** Declarations *) - -let print_tv_arg fmt tv = fprintf fmt "@ %a" print_tv tv -let print_ty_arg fmt ty = fprintf fmt "@ %a" (print_ty_node true) ty -let print_vs_arg fmt vs = fprintf fmt "@ (%a)" print_vsty vs - -let print_constr fmt (cs,pjl) = - let add_pj pj ty pjl = (pj,ty)::pjl in - let print_pj fmt (pj,ty) = match pj with - | Some ls -> fprintf fmt "@ (%a:@,%a)" print_ls ls print_ty ty - | None -> print_ty_arg fmt ty - in - fprintf fmt "@[<hov 4>| %a%a%a@]" print_cs cs - print_ident_labels cs.ls_name - (print_list nothing print_pj) - (List.fold_right2 add_pj pjl cs.ls_args []) - -let print_type_decl fmt ts = match ts.ts_def with - | NoDef -> - fprintf fmt "@[<hov 2>type %a%a%a@]@\n@\n" - print_ts ts print_ident_labels ts.ts_name - (print_list nothing print_tv_arg) ts.ts_args - | Alias ty -> - fprintf fmt "@[<hov 2>type %a%a%a =@ %a@]@\n@\n" - print_ts ts print_ident_labels ts.ts_name - (print_list nothing print_tv_arg) ts.ts_args print_ty ty - | Range _ | Float _ -> assert false - -let print_type_decl fmt ts = - if not (query_remove ts.ts_name) then - (print_type_decl fmt ts; forget_tvs ()) - -let print_data_decl fst fmt (ts,csl) = - fprintf fmt "@[<hov 2>%s %a%a%a =@\n@[<hov>%a@]@]@\n@\n" - (if fst then "type" else "with") print_ts ts - print_ident_labels ts.ts_name - (print_list nothing print_tv_arg) ts.ts_args - (print_list newline print_constr) csl - -let print_data_decl first fmt d = - if not (query_remove (fst d).ts_name) then - (print_data_decl first fmt d; forget_tvs ()) - -let print_ls_type fmt = fprintf fmt " :@ %a" print_ty - -let ls_kind ls = if ls.ls_value = None then "predicate" else "function" - -let print_param_decl fmt ls = - fprintf fmt "@[<hov 2>%s %a%a%a%a@]@\n@\n" - (ls_kind ls) print_ls ls - print_ident_labels ls.ls_name - (print_list nothing print_ty_arg) ls.ls_args - (print_option print_ls_type) ls.ls_value - -let print_param_decl fmt ls = - if not (query_remove ls.ls_name) then - (print_param_decl fmt ls; forget_tvs ()) - -let print_logic_decl fst fmt (ls,ld) = - let vl,e = open_ls_defn ld in - fprintf fmt "@[<hov 2>%s %a%a%a%a =@ %a@]@\n@\n" - (if fst then ls_kind ls else "with") print_ls ls - print_ident_labels ls.ls_name - (print_list nothing print_vs_arg) vl - (print_option print_ls_type) ls.ls_value print_term e; - List.iter forget_var vl - -let print_logic_decl first fmt d = - if not (query_remove (fst d).ls_name) then - (print_logic_decl first fmt d; forget_tvs ()) - -let print_ind fmt (pr,f) = - fprintf fmt "@[<hov 4>| %a%a :@ %a@]" - print_pr pr print_ident_labels pr.pr_name print_term f - -let ind_sign = function - | Ind -> "inductive" - | Coind -> "coinductive" - -let print_ind_decl s fst fmt (ps,bl) = - fprintf fmt "@[<hov 2>%s %a%a%a =@ @[<hov>%a@]@]@\n@\n" - (if fst then ind_sign s else "with") print_ls ps - print_ident_labels ps.ls_name - (print_list nothing print_ty_arg) ps.ls_args - (print_list newline print_ind) bl - -let print_ind_decl s first fmt d = - if not (query_remove (fst d).ls_name) then - (print_ind_decl s first fmt d; forget_tvs ()) - -let print_pkind = Pretty.print_pkind - -let print_prop_decl fmt (k,pr,f) = - fprintf fmt "@[<hov 2>%a %a%a : %a@]@\n@\n" print_pkind k - print_pr pr print_ident_labels pr.pr_name print_term f - -let print_prop_decl fmt (k,pr,f) = match k with - | Paxiom when query_remove pr.pr_name -> () - | _ -> print_prop_decl fmt (k,pr,f); forget_tvs () - -let print_list_next sep print fmt = function - | [] -> () - | [x] -> print true fmt x - | x :: r -> print true fmt x; sep fmt (); - print_list sep (print false) fmt r - -let print_decl fmt d = match d.d_node with - | Dtype ts -> print_type_decl fmt ts - | Ddata tl -> print_list_next nothing print_data_decl fmt tl - | Dparam ls -> print_param_decl fmt ls - | Dlogic ll -> print_list_next nothing print_logic_decl fmt ll - | Dind (s, il) -> print_list_next nothing (print_ind_decl s) fmt il - | Dprop p -> print_prop_decl fmt p - -let print_inst_ts fmt (ts1,ts2) = - fprintf fmt "type %a = %a" print_ts ts1 print_ts ts2 - -let print_inst_ls fmt (ls1,ls2) = - fprintf fmt "%s %a = %a" (ls_kind ls1) print_ls ls1 print_ls ls2 - -let print_inst_pr fmt (pr1,pr2) = - fprintf fmt "prop %a = %a" print_pr pr1 print_pr pr2 - -let print_meta_arg fmt = function - | MAty ty -> fprintf fmt "type %a" print_ty ty; forget_tvs () - | MAts ts -> fprintf fmt "type %a" print_ts ts - | MAls ls -> fprintf fmt "%s %a" (ls_kind ls) print_ls ls - | MApr pr -> fprintf fmt "prop %a" print_pr pr - | MAstr s -> fprintf fmt "\"%s\"" s - | MAint i -> fprintf fmt "%d" i - -let print_qt fmt th = - if th.th_path = [] then print_th fmt th else - fprintf fmt "%a.%a" - (print_list (constant_string ".") string) th.th_path - print_th th - -let print_tdecl fmt td = match td.td_node with - | Decl d -> - print_decl fmt d - | Use th -> - fprintf fmt "@[<hov 2>(* use %a *)@]@\n@\n" print_qt th - | Clone (th,sm) when is_empty_sm sm -> - fprintf fmt "@[<hov 2>(* use %a *)@]@\n@\n" print_qt th - | Clone (th,sm) -> - let tm = Mts.fold (fun x y a -> (x,y)::a) sm.sm_ts [] in - let lm = Mls.fold (fun x y a -> (x,y)::a) sm.sm_ls [] in - let pm = Mpr.fold (fun x y a -> (x,y)::a) sm.sm_pr [] in - fprintf fmt "@[<hov 2>(* clone %a with %a,@ %a,@ %a *)@]@\n@\n" - print_qt th (print_list comma print_inst_ts) tm - (print_list comma print_inst_ls) lm - (print_list comma print_inst_pr) pm - | Meta (m,al) -> - fprintf fmt "@[<hov 2>(* meta %s %a *)@]@\n@\n" - m.meta_name (print_list comma print_meta_arg) al - -let print_tdecls = - let print_tdecl sm fmt td = - (!info).info_syn <- sm; print_tdecl fmt td; sm, [] in - let print_tdecl = Printer.sprint_tdecl print_tdecl in - let print_tdecl task acc = print_tdecl task.Task.task_decl acc in - Discriminate.on_syntax_map (fun sm -> Trans.fold print_tdecl (sm,[])) - -let print_task args ?old:_ fmt task = - (* In trans-based p-printing [forget_all] IST STRENG VERBOTEN *) - (* forget_all (); *) - print_prelude fmt args.prelude; - fprintf fmt "theory Task@\n"; - print_th_prelude task fmt args.th_prelude; - let rec print = function - | x :: r -> print r; Pp.string fmt x - | [] -> () in - print (snd (Trans.apply print_tdecls task)); - fprintf fmt "end@." - -(** TODO: th_local doesn't indicate the kind of an id (vs, ts, ls, ...) - so we can't reserve the symbols in the corresponding printer. - So we reserve in all of them. -*) -let reserve_ident pr id = - ignore (id_unique pr.iprinter id); - ignore (id_unique ~sanitizer:String.capitalize_ascii pr.cprinter id); - ignore (id_unique pr.aprinter id); - ignore (id_unique pr.tprinter id); - ignore (id_unique pr.pprinter id) - -let print_task printer_args fmt task = - (* eprintf "Task:%a@.@." Pretty.print_task task; *) - print_prelude fmt printer_args.prelude; - (* find theories that are both used and realized from metas *) - let realized_theories = - Task.on_meta meta_realized_theory (fun mid args -> - match args with - | [Theory.MAstr src; Theory.MAstr dst] -> - (* TODO: do not split string; in fact, do not even use a - string argument *) - let f,id = - let l = Strings.rev_split '.' src in - List.rev (List.tl l), List.hd l in - let th = Env.read_theory printer_args.env f id in - let id = - let l = Strings.rev_split '.' dst in - List.hd l in - Mid.add th.Theory.th_name (th, dst, id) mid - | _ -> assert false - ) Mid.empty task in - (* 2 cases: goal is clone T with [] or goal is a real goal *) - let rec upd_realized_theories = function - (** not realized *) - | Some { Task.task_decl = { Theory.td_node = - Theory.Decl { Decl.d_node = Decl.Dprop (Decl.Pgoal, _, _) }}} -> - fprintf fmt "theory Task@\n"; - realized_theories - (** realized *) - | Some { Task.task_decl = { Theory.td_node = Theory.Clone (th,_) }} -> - (** reserve the name used in the local theory in a consistent order *) - Sid.iter (reserve_ident (!info).local_printers) th.Theory.th_local; - begin - try - let (_,_, id) = Mid.find th.Theory.th_name realized_theories in - fprintf fmt "theory %s@\n" id; - with Not_found -> - raise (NotInRealizedTheories(th)) - end; - Mid.remove th.Theory.th_name realized_theories - | Some { Task.task_decl = { Theory.td_node = Theory.Meta _ }; - Task.task_prev = task } -> - upd_realized_theories task - | _ -> assert false in - let realized_theories = upd_realized_theories task in - (** use prelude *) - print_th_prelude task fmt printer_args.th_prelude; - let realized_theories' = - Mid.map (fun (th,s1,s2) -> fprintf fmt "use %s as %s@\n" s1 s2; th) - realized_theories in - let realized_symbols = Task.used_symbols realized_theories' in - let local_decls = Task.local_decls task realized_symbols in - (* eprintf "local_decls:%i@." (List.length local_decls); *) - (* associate a special printer to each symbol in a realized theory *) - let symbol_printers = - let printers = - Mid.map (fun th -> - let pr = fresh_printers () in - (** reserve all symbols in a consistent order *) - Sid.iter (reserve_ident pr) th.Theory.th_local; - pr - ) realized_theories' in - Mid.map (fun th -> - let _,_,s2 = Mid.find th.Theory.th_name realized_theories in - (s2, Mid.find th.Theory.th_name printers) - ) realized_symbols in - info := { !info with - info_syn = get_syntax_map task; - symbol_printers = symbol_printers; - }; - let print_decls fmt dl = - fprintf fmt "@\n@[<hov>%a@]" (print_list nothing print_decl) dl in - print_decls fmt local_decls; - fprintf fmt "end@." - -let print_realize args ?old:_ fmt task = - let info_bak = !info in (** printer without realization *) - try - info := { info_syn = Mid.empty; symbol_printers = Mid.empty; - local_printers = fresh_printers ()}; - print_task args fmt task; - info := info_bak - with exn -> (** finally *) - info := info_bak; - raise exn - - -let () = register_printer "why3-realize" print_realize - ~desc:"Printer@ for@ the@ logical@ format@ of@ Why3. - @ Used for printing theories." - -let () = Exn_printer.register (fun fmt -> function - | NotInRealizedTheories th -> fprintf fmt - "The@ theory %s@ is@ asked@ to@ be@ realized@ but@ it@ is@ specified \ - in no \"realized_theory\" meta." th.th_name.id_string - | exn -> raise exn - ) -- GitLab From ad86f36f3343878c747313a5f51fc210be369f3d Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Fri, 26 Apr 2019 11:34:39 +0200 Subject: [PATCH 335/376] [WP] fixes _Bool layout --- src/plugins/wp/ctypes.ml | 18 +++++++++--------- src/plugins/wp/ctypes.mli | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/plugins/wp/ctypes.ml b/src/plugins/wp/ctypes.ml index bde88014eff..a108e37fd5a 100644 --- a/src/plugins/wp/ctypes.ml +++ b/src/plugins/wp/ctypes.ml @@ -30,7 +30,7 @@ open Cil_datatype module WpLog = Wp_parameters type c_int = - | Bool + | CBool | UInt8 | SInt8 | UInt16 @@ -43,19 +43,19 @@ type c_int = let compare_c_int : c_int -> c_int -> _ = Extlib.compare_basic let signed = function - | Bool -> false + | CBool -> false | UInt8 | UInt16 | UInt32 | UInt64 -> false | SInt8 | SInt16 | SInt32 | SInt64 -> true let i_bits = function - | Bool -> 1 + | CBool -> 8 | UInt8 | SInt8 -> 8 | UInt16 | SInt16 -> 16 | UInt32 | SInt32 -> 32 | UInt64 | SInt64 -> 64 let i_bytes = function - | Bool -> 1 + | CBool -> 1 | UInt8 | SInt8 -> 1 | UInt16 | SInt16 -> 2 | UInt32 | SInt32 -> 4 @@ -73,12 +73,12 @@ let is_char = function | SInt8 -> not Cil.theMachine.Cil.theMachine.char_is_unsigned | UInt16 | SInt16 | UInt32 | SInt32 - | UInt64 | SInt64 | Bool -> false + | UInt64 | SInt64 | CBool -> false let c_int ikind = let mach = Cil.theMachine.Cil.theMachine in match ikind with - | IBool -> if Wp_parameters.get_bool_range () then Bool else UInt8 + | IBool -> CBool | IChar -> if mach.char_is_unsigned then UInt8 else SInt8 | ISChar -> SInt8 | IUChar -> UInt8 @@ -163,7 +163,7 @@ let idx = function | SInt32 -> 5 | UInt64 -> 6 | SInt64 -> 7 - | Bool -> 8 + | CBool -> 8 let i_memo f = let m = Array.make 9 None in @@ -186,7 +186,7 @@ let f_memo f = | None -> let r = f z in m.(k) <- Some r ; r let i_iter f = - List.iter f [Bool;UInt8;SInt8;UInt16;SInt16;UInt32;SInt32;UInt64;SInt64] + List.iter f [CBool;UInt8;SInt8;UInt16;SInt16;UInt32;SInt32;UInt64;SInt64] let f_iter f = List.iter f [Float32;Float64] @@ -210,7 +210,7 @@ let bounds i = i_memo i_bounds i (* -------------------------------------------------------------------------- *) let pp_int fmt i = - if i = Bool then Format.pp_print_string fmt "bool" + if i = CBool then Format.pp_print_string fmt "bool" else Format.fprintf fmt "%cint%d" (if signed i then 's' else 'u') (i_bits i) let pp_float fmt f = Format.fprintf fmt "float%d" (f_bits f) diff --git a/src/plugins/wp/ctypes.mli b/src/plugins/wp/ctypes.mli index 234bd3119eb..bb3c965c1bd 100644 --- a/src/plugins/wp/ctypes.mli +++ b/src/plugins/wp/ctypes.mli @@ -28,7 +28,7 @@ open Cil_types (** Runtime integers. *) type c_int = - | Bool + | CBool | UInt8 | SInt8 | UInt16 -- GitLab From 8a3a7331ea70ebd6a7bf9310861927b46e9dacd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 26 Apr 2019 13:30:18 +0200 Subject: [PATCH 336/376] [wp] no more support for -wp-no-bool-range --- src/plugins/wp/Cint.ml | 42 ++++++++++++------- src/plugins/wp/TacBitwised.ml | 2 +- src/plugins/wp/ctypes.ml | 42 +++++++++---------- src/plugins/wp/ctypes.mli | 3 +- .../tests/wp_acsl/oracle/bitwise.res.oracle | 10 ++--- src/plugins/wp/tests/wp_plugin/bool.i | 8 ++-- .../tests/wp_plugin/oracle/bool.0.res.oracle | 27 ++++++------ .../tests/wp_plugin/oracle/rte.0.res.oracle | 7 +--- src/plugins/wp/tests/wp_plugin/rte.i | 4 +- src/plugins/wp/wpRTE.ml | 4 ++ src/plugins/wp/wp_parameters.ml | 9 ---- src/plugins/wp/wp_parameters.mli | 1 - 12 files changed, 78 insertions(+), 81 deletions(-) diff --git a/src/plugins/wp/Cint.ml b/src/plugins/wp/Cint.ml index 02c88290a4e..db97213a0c4 100644 --- a/src/plugins/wp/Cint.ml +++ b/src/plugins/wp/Cint.ml @@ -238,13 +238,14 @@ let match_power2_extraction = match_list_extraction match_power2 (* -------------------------------------------------------------------------- *) (* rule A: to_a(to_b x) = to_b x when domain(b) is all included in domain(a) *) -(* rule B: to_a(to_b x) = to_a x when size(b) is a multiple of size(a) *) +(* rule B: to_a(to_b x) = to_a x when range(b) is a multiple of range(a) + AND a is not bool *) -(* to_iota(e) where e = to_iota'(e') *) -let simplify_f_to_conv f iota e conv e' = +(* to_iota(e) where e = to_iota'(e'), only ranges for iota *) +let simplify_range_comp f iota e conv e' = let iota' = to_cint conv in - let size' = Ctypes.i_bits iota' in - let size = Ctypes.i_bits iota in + let size' = Ctypes.range iota' in + let size = Ctypes.range iota in if size <= size' then e_fun f [e'] (* rule B: @@ -269,12 +270,12 @@ let simplify_f_to_bounds iota e = let f_to_int = Ctypes.i_memo (fun iota -> make_fun_int "to" iota) let configure_to_int iota = - let f = f_to_int iota in - let simplify e = + + let simplify_range f iota e = begin try match F.repr e with | Logic.Kint value -> - let size = Integer.of_int (Ctypes.i_bits iota) in + let size = Integer.of_int (Ctypes.range iota) in let signed = Ctypes.signed iota in F.e_zint (Integer.cast ~size ~signed ~value) | Logic.Fun( fland , es ) @@ -297,15 +298,22 @@ let configure_to_int iota = | _ -> raise Not_found end | Logic.Fun( conv , [e'] ) -> (* unary op *) - simplify_f_to_conv f iota e conv e' + simplify_range_comp f iota e conv e' | _ -> raise Not_found with Not_found -> simplify_f_to_bounds iota e end in - F.set_builtin_1 f simplify ; - - let simplify_leq x y = + let simplify_conv f iota e = + if iota = Ctypes.CBool then + match F.is_equal e F.e_zero with + | Yes -> F.e_zero + | No -> F.e_one + | Maybe -> raise Not_found + else + simplify_range f iota e + in + let simplify_leq f iota x y = let lower,upper = Ctypes.bounds iota in match F.repr y with | Logic.Fun( conv , [_] ) @@ -324,7 +332,9 @@ let configure_to_int iota = | _ -> raise Not_found end in - F.set_builtin_leq f simplify_leq ; + let f = f_to_int iota in + F.set_builtin_1 f (simplify_conv f iota) ; + F.set_builtin_leq f (simplify_leq f iota) ; to_cint_map := FunMap.add f iota !to_cint_map @@ -485,14 +495,14 @@ let smp_bitk_positive = function F.e_not (bitk_positive k a) | Logic.Fun( conv , [a] ) (* when is_to_c_int conv *) -> let iota = to_cint conv in - let size = Ctypes.i_bits iota in + let range = Ctypes.range iota in let signed = Ctypes.signed iota in if signed then (* beware of sign-bit *) - begin match is_leq k (e_int (size-2)) with + begin match is_leq k (e_int (range-2)) with | Logic.Yes -> bitk_positive k a | Logic.No | Logic.Maybe -> raise Not_found end - else begin match is_leq (e_int size) k with + else begin match is_leq (e_int range) k with | Logic.Yes -> e_false | Logic.No -> bitk_positive k a | Logic.Maybe -> raise Not_found diff --git a/src/plugins/wp/TacBitwised.ml b/src/plugins/wp/TacBitwised.ml index bf9604878cc..c49c61d292f 100644 --- a/src/plugins/wp/TacBitwised.ml +++ b/src/plugins/wp/TacBitwised.ml @@ -108,7 +108,7 @@ let rec lookup push clause ~nbits ~priority p = class autobitwise = object(self) - method private nbits = Ctypes.i_bits (Ctypes.c_ptr ()) + method private nbits = Ctypes.range (Ctypes.c_ptr ()) method id = "wp:bitwised" method title = diff --git a/src/plugins/wp/ctypes.ml b/src/plugins/wp/ctypes.ml index a108e37fd5a..f26b9025053 100644 --- a/src/plugins/wp/ctypes.ml +++ b/src/plugins/wp/ctypes.ml @@ -47,14 +47,14 @@ let signed = function | UInt8 | UInt16 | UInt32 | UInt64 -> false | SInt8 | SInt16 | SInt32 | SInt64 -> true -let i_bits = function - | CBool -> 8 +let range = function + | CBool -> 1 | UInt8 | SInt8 -> 8 | UInt16 | SInt16 -> 16 | UInt32 | SInt32 -> 32 | UInt64 | SInt64 -> 64 -let i_bytes = function +let sizeof_i = function | CBool -> 1 | UInt8 | SInt8 -> 1 | UInt16 | SInt16 -> 2 @@ -97,8 +97,8 @@ let c_ptr () = make_c_int false Cil.theMachine.Cil.theMachine.sizeof_ptr let sub_c_int t1 t2 = - if (signed t1 = signed t2) then i_bits t1 <= i_bits t2 - else (not(signed t1) && (i_bits t1 < i_bits t2)) + if (signed t1 = signed t2) then range t1 <= range t2 + else (not(signed t1) && (range t1 < range t2)) type c_float = | Float32 @@ -106,7 +106,7 @@ type c_float = let compare_c_float : c_float -> c_float -> _ = Extlib.compare_basic -let f_bytes = function +let sizeof_f = function | Float32 -> 4 | Float64 -> 8 @@ -126,7 +126,7 @@ let c_float fkind = | FDouble -> make_c_float mach.sizeof_double | FLongDouble -> make_c_float mach.sizeof_longdouble -let equal_float f1 f2 = f_bits f1 = f_bits f2 +let equal_float f1 f2 = (f1 = f2) (* Array objects, with both the head view and the flatten view. *) @@ -195,15 +195,15 @@ let f_iter f = (* --- Bounds --- *) (* -------------------------------------------------------------------------- *) -let i_bounds i = - if signed i then - let m = Integer.two_power_of_int (i_bits i - 1) in - Integer.neg m , Integer.pred m - else - let m = Integer.two_power_of_int (i_bits i) in - Integer.zero , Integer.pred m - -let bounds i = i_memo i_bounds i +let bounds = + let i_bounds i = + if signed i then + let m = Integer.two_power_of_int (range i - 1) in + Integer.neg m , Integer.pred m + else + let m = Integer.two_power_of_int (range i) in + Integer.zero , Integer.pred m + in i_memo i_bounds (* -------------------------------------------------------------------------- *) (* --- Pretty Printers --- *) @@ -211,7 +211,7 @@ let bounds i = i_memo i_bounds i let pp_int fmt i = if i = CBool then Format.pp_print_string fmt "bool" - else Format.fprintf fmt "%cint%d" (if signed i then 's' else 'u') (i_bits i) + else Format.fprintf fmt "%cint%d" (if signed i then 's' else 'u') (range i) let pp_float fmt f = Format.fprintf fmt "float%d" (f_bits f) @@ -445,9 +445,9 @@ let sizeof_defined = function | _ -> true let sizeof_object = function - | C_int i -> i_bytes i - | C_float f -> f_bytes f - | C_pointer _ty -> i_bytes (c_ptr()) + | C_int i -> sizeof_i i + | C_float f -> sizeof_f f + | C_pointer _ty -> sizeof_i (c_ptr()) | C_comp cinfo -> let ctype = TComp(cinfo,Cil.empty_size_cache(),[]) in (Cil.bitsSizeOf ctype / 8) @@ -490,7 +490,7 @@ let field_offset fd = (* with greater rank, whatever *) (* their sign. *) -let i_convert t1 t2 = if i_bits t1 < i_bits t2 then t2 else t1 +let i_convert t1 t2 = if range t1 < range t2 then t2 else t1 let f_convert t1 t2 = if f_bits t1 < f_bits t2 then t2 else t1 let promote a1 a2 = diff --git a/src/plugins/wp/ctypes.mli b/src/plugins/wp/ctypes.mli index bb3c965c1bd..b09df11064c 100644 --- a/src/plugins/wp/ctypes.mli +++ b/src/plugins/wp/ctypes.mli @@ -97,9 +97,8 @@ val char : char -> int64 val constant : exp -> int64 val get_int : exp -> int64 option -val i_bits : c_int -> int (** size in bits *) -val i_bytes : c_int -> int (** size in bytes *) val signed : c_int -> bool (** [true] if signed *) +val range : c_int -> int (** range in 2^n *) val bounds: c_int -> Integer.t * Integer.t (** domain, bounds included *) (** All sizes are in bits *) diff --git a/src/plugins/wp/tests/wp_acsl/oracle/bitwise.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle/bitwise.res.oracle index 789c01a6f59..70d1558a270 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle/bitwise.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle/bitwise.res.oracle @@ -76,7 +76,7 @@ Prove: land(65535, a) != 21845. Goal Post-condition for 'false' (file tests/wp_acsl/bitwise.i, line 91) in 'band_bool': Assume { - Type: is_uint8(a) /\ is_uint8(b). + Type: is_bool(a) /\ is_bool(b). (* Pre-condition for 'false' *) Have: (a != 1) \/ (b != 1). } @@ -142,7 +142,7 @@ Prove: true. Goal Post-condition for 'false' (file tests/wp_acsl/bitwise.i, line 81) in 'bor_bool': Assume { - Type: is_uint8(a) /\ is_uint8(b). + Type: is_bool(a) /\ is_bool(b). (* Pre-condition for 'false' *) Have: (a != 1) /\ (b != 1). } @@ -155,7 +155,7 @@ Prove: (a = 0) /\ (b = 0). Goal Post-condition for 'true' (file tests/wp_acsl/bitwise.i, line 78) in 'bor_bool': Assume { - Type: is_uint8(a) /\ is_uint8(b). + Type: is_bool(a) /\ is_bool(b). (* Pre-condition for 'true' *) Have: (a = 1) \/ (b = 1). } @@ -202,7 +202,7 @@ Prove: lnot(x) = b. Goal Post-condition for 'false' (file tests/wp_acsl/bitwise.i, line 100) in 'bxor_bool': Assume { - Type: is_uint8(a) /\ is_uint8(b). + Type: is_bool(a) /\ is_bool(b). (* Pre-condition for 'false' *) Have: ((a != 0) \/ (b != 1)) /\ ((a != 1) \/ (b != 0)). } @@ -215,7 +215,7 @@ Prove: b = a. Goal Post-condition for 'true' (file tests/wp_acsl/bitwise.i, line 97) in 'bxor_bool': Assume { - Type: is_uint8(a) /\ is_uint8(b). + Type: is_bool(a) /\ is_bool(b). (* Pre-condition for 'true' *) Have: ((a = 0) /\ (b = 1)) \/ ((a = 1) /\ (b = 0)). } diff --git a/src/plugins/wp/tests/wp_plugin/bool.i b/src/plugins/wp/tests/wp_plugin/bool.i index 929c6448995..0b90b861d07 100644 --- a/src/plugins/wp/tests/wp_plugin/bool.i +++ b/src/plugins/wp/tests/wp_plugin/bool.i @@ -1,11 +1,11 @@ /* run.config - OPT: -wp-no-let -wp-no-bool-range - OPT: -wp-no-let -wp-bool-range + OPT: -wp-no-let + OPT: -wp-no-let */ /* run.config_qualif - OPT: -wp-no-let -wp-no-bool-range - OPT: -wp-no-let -wp-bool-range + OPT: -wp-no-let + OPT: -wp-no-let */ diff --git a/src/plugins/wp/tests/wp_plugin/oracle/bool.0.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/bool.0.res.oracle index 68874ceaf82..feb6965058e 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/bool.0.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/bool.0.res.oracle @@ -9,8 +9,8 @@ Goal Post-condition for 'false' (file tests/wp_plugin/bool.i, line 30) in 'band_bool': Assume { - Type: is_uint8(a) /\ is_uint8(a_1) /\ is_uint8(b) /\ is_uint8(b_1) /\ - is_uint8(band_bool_0) /\ is_uint8(retres_0). + Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ + is_bool(band_bool_0) /\ is_bool(retres_0). Have: (a_1 = a) /\ (b_1 = b). (* Pre-condition for 'false' *) Have: (a_1 != 1) \/ (b_1 != 1). @@ -27,8 +27,8 @@ Prove: band_bool_0 = 0. Goal Post-condition for 'true' (file tests/wp_plugin/bool.i, line 27) in 'band_bool': Assume { - Type: is_uint8(a) /\ is_uint8(a_1) /\ is_uint8(b) /\ is_uint8(b_1) /\ - is_uint8(band_bool_0) /\ is_uint8(retres_0). + Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ + is_bool(band_bool_0) /\ is_bool(retres_0). Have: (a_1 = a) /\ (b_1 = b). (* Pre-condition for 'true' *) Have: (a_1 = 1) /\ (b_1 = 1). @@ -45,8 +45,8 @@ Prove: band_bool_0 = 1. Goal Post-condition for 'false' (file tests/wp_plugin/bool.i, line 20) in 'bor_bool': Assume { - Type: is_uint8(a) /\ is_uint8(a_1) /\ is_uint8(b) /\ is_uint8(b_1) /\ - is_uint8(bor_bool_0) /\ is_uint8(retres_0). + Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ + is_bool(bor_bool_0) /\ is_bool(retres_0). Have: (a_1 = a) /\ (b_1 = b). (* Pre-condition for 'false' *) Have: (a_1 != 1) /\ (b_1 != 1). @@ -63,8 +63,8 @@ Prove: bor_bool_0 = 0. Goal Post-condition for 'true' (file tests/wp_plugin/bool.i, line 17) in 'bor_bool': Assume { - Type: is_uint8(a) /\ is_uint8(a_1) /\ is_uint8(b) /\ is_uint8(b_1) /\ - is_uint8(bor_bool_0) /\ is_uint8(retres_0). + Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ + is_bool(bor_bool_0) /\ is_bool(retres_0). Have: (a_1 = a) /\ (b_1 = b). (* Pre-condition for 'true' *) Have: (a_1 = 1) \/ (b_1 = 1). @@ -81,8 +81,8 @@ Prove: bor_bool_0 = 1. Goal Post-condition for 'false' (file tests/wp_plugin/bool.i, line 39) in 'bxor_bool': Assume { - Type: is_uint8(a) /\ is_uint8(a_1) /\ is_uint8(b) /\ is_uint8(b_1) /\ - is_uint8(bxor_bool_0) /\ is_uint8(retres_0). + Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ + is_bool(bxor_bool_0) /\ is_bool(retres_0). Have: (a_1 = a) /\ (b_1 = b). (* Pre-condition for 'false' *) Have: ((a_1 != 0) \/ (b_1 != 1)) /\ ((a_1 != 1) \/ (b_1 != 0)). @@ -99,8 +99,8 @@ Prove: bxor_bool_0 = 0. Goal Post-condition for 'true' (file tests/wp_plugin/bool.i, line 36) in 'bxor_bool': Assume { - Type: is_uint8(a) /\ is_uint8(a_1) /\ is_uint8(b) /\ is_uint8(b_1) /\ - is_uint8(bxor_bool_0) /\ is_uint8(retres_0). + Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ + is_bool(bxor_bool_0) /\ is_bool(retres_0). Have: (a_1 = a) /\ (b_1 = b). (* Pre-condition for 'true' *) Have: ((a_1 = 0) /\ (b_1 = 1)) \/ ((a_1 = 1) /\ (b_1 = 0)). @@ -117,8 +117,7 @@ Prove: bxor_bool_0 = 1. Goal Post-condition (file tests/wp_plugin/bool.i, line 12) in 'job': Assume { - Type: is_uint8(a) /\ is_uint8(b) /\ is_sint32(job_0) /\ - is_sint32(retres_0). + Type: is_bool(a) /\ is_bool(b) /\ is_sint32(job_0) /\ is_sint32(retres_0). Have: (a + b) = retres_0. (* Return *) Have: retres_0 = job_0. diff --git a/src/plugins/wp/tests/wp_plugin/oracle/rte.0.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/rte.0.res.oracle index 00dfe9f2904..64040ba3823 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/rte.0.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/rte.0.res.oracle @@ -14,10 +14,7 @@ [wp:rte] function job3: generate rte for division by zero [wp:rte] function job3: generate rte for signed overflow [rte] annotating function job3 -[wp] tests/wp_plugin/rte.i:34: Warning: - Option -wp-bool-range incompatiable with RTE (ignored) -[wp] tests/wp_plugin/rte.i:34: Warning: - Option -wp-bool-range incompatiable with RTE (ignored) +[wp] Warning: memory model incompatible with -no-warn-invalid-bool [wp] Goal typed_job_ensures : not tried [wp] Goal typed_job_assert_rte_mem_access : not tried [wp] Goal typed_job_assert_rte_mem_access_2 : not tried @@ -26,7 +23,6 @@ [wp] Goal typed_job_assert_rte_mem_access_3 : not tried [wp] Goal typed_job2_ensures : not tried [wp] Goal typed_job3_ensures : not tried -[wp] Goal typed_job3_assert_rte_bool_value : not tried /* Generated by Frama-C */ /*@ axiomatic Obs { predicate R(integer r) ; @@ -60,7 +56,6 @@ _Bool X; int job3(void) { int __retres; - /*@ assert rte: bool_value: X == 0 || X == 1; */ __retres = (int)X; return __retres; } diff --git a/src/plugins/wp/tests/wp_plugin/rte.i b/src/plugins/wp/tests/wp_plugin/rte.i index f20717efcba..1b63b3768c8 100644 --- a/src/plugins/wp/tests/wp_plugin/rte.i +++ b/src/plugins/wp/tests/wp_plugin/rte.i @@ -1,6 +1,6 @@ /* run.config CMD: @frama-c@ -wp -wp-prover none -wp-check -wp-share ./share -wp-msg-key shell -wp-msg-key rte - OPT: -wp-rte -warn-invalid-bool -wp-bool-range -then -print -no-unicode + OPT: -wp-rte -no-warn-invalid-bool -then -print -no-unicode OPT: -wp-rte -no-warn-signed-overflow -then -print -no-unicode OPT: -wp-rte -warn-unsigned-overflow -then -print -no-unicode OPT: -wp-rte -wp-model +nat -then -print -no-unicode @@ -9,7 +9,7 @@ OPT: -wp-rte -rte-no-mem -wp-model +nat */ /* run.config_qualif - OPT: -wp-rte -warn-invalid-bool -wp-bool-range -wp-prop=rte + OPT: -wp-rte -warn-invalid-bool -wp-prop=rte */ diff --git a/src/plugins/wp/wpRTE.ml b/src/plugins/wp/wpRTE.ml index 30974a1edba..e373289c57a 100644 --- a/src/plugins/wp/wpRTE.ml +++ b/src/plugins/wp/wpRTE.ml @@ -102,4 +102,8 @@ let missing_guards kf model = let update = ref false in let cint = Model.with_model model Cint.current () in List.iter (configure ~update ~generate:false kf cint) generator ; + let has_bool_traps = not (Kernel.InvalidBool.get ()) in + if has_bool_traps then + Wp_parameters.warning ~once:true ~current:false + "memory model incompatible with -no-warn-invalid-bool" ; !update diff --git a/src/plugins/wp/wp_parameters.ml b/src/plugins/wp/wp_parameters.ml index 3ea59dcff6c..6e8fc4bb53d 100644 --- a/src/plugins/wp/wp_parameters.ml +++ b/src/plugins/wp/wp_parameters.ml @@ -223,14 +223,6 @@ module ExtEqual = let help = "Use extensional equality on compounds (hypotheses only)." end) -let () = Parameter_customize.set_group wp_model -let () = Parameter_customize.is_invisible () (* experimental option *) -module BoolRange = - False(struct - let option_name = "-wp-bool-range" - let help = "Assumes _Bool values have no trap representations." - end) - let () = Parameter_customize.set_group wp_model module Overflows = False(struct @@ -909,7 +901,6 @@ let active_unless_rte option = else true let get_overflows () = Overflows.get () && active_unless_rte "-wp-overflows" -let get_bool_range () = BoolRange.get () && active_unless_rte "-wp-bool-range" let dkey = register_category "env" diff --git a/src/plugins/wp/wp_parameters.mli b/src/plugins/wp/wp_parameters.mli index 88dfd0553b3..d9fd672e9b5 100644 --- a/src/plugins/wp/wp_parameters.mli +++ b/src/plugins/wp/wp_parameters.mli @@ -146,7 +146,6 @@ val get_output : unit -> string val get_output_dir : string -> string val get_includes : unit -> string list val make_output_dir : string -> unit -val get_bool_range : unit -> bool val get_overflows : unit -> bool (** {2 Debugging Categories} *) -- GitLab From 75ddd747bc40e3557980a379559370dbc30b3e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 26 Apr 2019 14:27:36 +0200 Subject: [PATCH 337/376] [rte] missing set status of invalid-bool --- src/kernel_services/plugin_entry_points/db.ml | 1 + src/kernel_services/plugin_entry_points/db.mli | 1 + src/plugins/rte/register.ml | 1 + src/plugins/rte/visit.ml | 3 ++- tests/rte/oracle/twofunc.res.oracle | 8 ++++---- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/kernel_services/plugin_entry_points/db.ml b/src/kernel_services/plugin_entry_points/db.ml index 092c6039c77..40a333d4f62 100644 --- a/src/kernel_services/plugin_entry_points/db.ml +++ b/src/kernel_services/plugin_entry_points/db.ml @@ -1018,6 +1018,7 @@ module RteGen = struct let get_unsignedDownCast_status = mk_fun "RteGen.get_unsignedDownCast_status" let get_float_to_int_status = mk_fun "RteGen.get_float_to_int_status" let get_finite_float_status = mk_fun "RteGen.get_finite_float_status" + let get_bool_value_status = mk_fun "RteGen.get_bool_value_status" end module PostdominatorsTypes = struct diff --git a/src/kernel_services/plugin_entry_points/db.mli b/src/kernel_services/plugin_entry_points/db.mli index 873a8c6eb4b..10d1ff2e540 100644 --- a/src/kernel_services/plugin_entry_points/db.mli +++ b/src/kernel_services/plugin_entry_points/db.mli @@ -896,6 +896,7 @@ module RteGen : sig val get_unsignedDownCast_status : (unit -> status_accessor) ref val get_float_to_int_status : (unit -> status_accessor) ref val get_finite_float_status : (unit -> status_accessor) ref + val get_bool_value_status : (unit -> status_accessor) ref end diff --git a/src/plugins/rte/register.ml b/src/plugins/rte/register.ml index 99e58a483d2..20fd2a12824 100644 --- a/src/plugins/rte/register.ml +++ b/src/plugins/rte/register.ml @@ -95,6 +95,7 @@ let () = nojournal_register get_unsignedDownCast_status Unsigned_downcast.accessor; nojournal_register get_float_to_int_status Float_to_int.accessor; nojournal_register get_finite_float_status Finite_float.accessor; + nojournal_register get_bool_value_status Bool_value.accessor ; nojournal_register get_all_status all_statuses; ;; diff --git a/src/plugins/rte/visit.ml b/src/plugins/rte/visit.ml index 33aeb7f6e7d..664c6cce892 100644 --- a/src/plugins/rte/visit.ml +++ b/src/plugins/rte/visit.ml @@ -445,7 +445,8 @@ let annotate ?flags kf = comp Unsigned_overflow.accessor flags.unsigned_overflow ||| comp Unsigned_downcast.accessor flags.unsigned_downcast ||| comp Float_to_int.accessor flags.float_to_int ||| - comp Finite_float.accessor flags.finite_float + comp Finite_float.accessor flags.finite_float ||| + comp Bool_value.accessor flags.bool_value then begin Options.feedback "annotating function %a" Kernel_function.pretty kf; let warn = Options.Warn.get () in diff --git a/tests/rte/oracle/twofunc.res.oracle b/tests/rte/oracle/twofunc.res.oracle index 982ec3917fd..58f6280ce2a 100644 --- a/tests/rte/oracle/twofunc.res.oracle +++ b/tests/rte/oracle/twofunc.res.oracle @@ -130,7 +130,7 @@ int main(void) [kernel] ================================ [kernel] printing status [kernel] kf = f -[kernel] - bool_value = false +[kernel] - bool_value = true [kernel] - finite_float = true [kernel] - float_to_int = true [kernel] - unsigned_downcast = false @@ -145,7 +145,7 @@ int main(void) [kernel] - mem_access = true [kernel] - initialized = false [kernel] kf = main -[kernel] - bool_value = false +[kernel] - bool_value = true [kernel] - finite_float = true [kernel] - float_to_int = true [kernel] - unsigned_downcast = false @@ -222,7 +222,7 @@ int main(void) [kernel] ================================ [kernel] printing status [kernel] kf = f -[kernel] - bool_value = false +[kernel] - bool_value = true [kernel] - finite_float = true [kernel] - float_to_int = true [kernel] - unsigned_downcast = false @@ -237,7 +237,7 @@ int main(void) [kernel] - mem_access = true [kernel] - initialized = false [kernel] kf = main -[kernel] - bool_value = false +[kernel] - bool_value = true [kernel] - finite_float = true [kernel] - float_to_int = true [kernel] - unsigned_downcast = false -- GitLab From 8b580c41111a178b8c4e2fdb926454a65487ec8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 26 Apr 2019 14:32:28 +0200 Subject: [PATCH 338/376] [wp] use rte for generating bool guards --- .../tests/wp_plugin/oracle/rte.0.res.oracle | 3 +- .../tests/wp_plugin/oracle/rte.1.res.oracle | 3 ++ .../tests/wp_plugin/oracle/rte.2.res.oracle | 3 ++ .../tests/wp_plugin/oracle/rte.3.res.oracle | 3 ++ .../tests/wp_plugin/oracle/rte.4.res.oracle | 3 ++ .../tests/wp_plugin/oracle/rte.5.res.oracle | 3 ++ .../tests/wp_plugin/oracle/rte.6.res.oracle | 3 ++ src/plugins/wp/wpRTE.ml | 28 +++++++++---------- 8 files changed, 34 insertions(+), 15 deletions(-) diff --git a/src/plugins/wp/tests/wp_plugin/oracle/rte.0.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/rte.0.res.oracle index 64040ba3823..7eb7d1df64d 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/rte.0.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/rte.0.res.oracle @@ -5,6 +5,7 @@ [wp:rte] function job: generate rte for memory access [wp:rte] function job: generate rte for division by zero [wp:rte] function job: generate rte for signed overflow +[wp] Warning: -wp-rte can annotate invalid bool value because -warn-invalid-bool is not set [rte] annotating function job [wp:rte] function job2: generate rte for memory access [wp:rte] function job2: generate rte for division by zero @@ -14,7 +15,7 @@ [wp:rte] function job3: generate rte for division by zero [wp:rte] function job3: generate rte for signed overflow [rte] annotating function job3 -[wp] Warning: memory model incompatible with -no-warn-invalid-bool +[wp] Warning: Missing RTE guards [wp] Goal typed_job_ensures : not tried [wp] Goal typed_job_assert_rte_mem_access : not tried [wp] Goal typed_job_assert_rte_mem_access_2 : not tried diff --git a/src/plugins/wp/tests/wp_plugin/oracle/rte.1.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/rte.1.res.oracle index 6468854c8f0..3136da68bb2 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/rte.1.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/rte.1.res.oracle @@ -4,12 +4,15 @@ [wp] Loading driver 'share/wp.driver' [wp:rte] function job: generate rte for memory access [wp:rte] function job: generate rte for division by zero +[wp:rte] function job: generate rte for invalid bool value [rte] annotating function job [wp:rte] function job2: generate rte for memory access [wp:rte] function job2: generate rte for division by zero +[wp:rte] function job2: generate rte for invalid bool value [rte] annotating function job2 [wp:rte] function job3: generate rte for memory access [wp:rte] function job3: generate rte for division by zero +[wp:rte] function job3: generate rte for invalid bool value [rte] annotating function job3 [wp] Goal typed_job_ensures : not tried [wp] Goal typed_job_assert_rte_mem_access : not tried diff --git a/src/plugins/wp/tests/wp_plugin/oracle/rte.2.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/rte.2.res.oracle index 435bd15de2d..ec0f537db15 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/rte.2.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/rte.2.res.oracle @@ -6,16 +6,19 @@ [wp:rte] function job: generate rte for division by zero [wp:rte] function job: generate rte for signed overflow [wp:rte] function job: generate rte for unsigned overflow +[wp:rte] function job: generate rte for invalid bool value [rte] annotating function job [wp:rte] function job2: generate rte for memory access [wp:rte] function job2: generate rte for division by zero [wp:rte] function job2: generate rte for signed overflow [wp:rte] function job2: generate rte for unsigned overflow +[wp:rte] function job2: generate rte for invalid bool value [rte] annotating function job2 [wp:rte] function job3: generate rte for memory access [wp:rte] function job3: generate rte for division by zero [wp:rte] function job3: generate rte for signed overflow [wp:rte] function job3: generate rte for unsigned overflow +[wp:rte] function job3: generate rte for invalid bool value [rte] annotating function job3 [wp] Goal typed_job_ensures : not tried [wp] Goal typed_job_assert_rte_mem_access : not tried diff --git a/src/plugins/wp/tests/wp_plugin/oracle/rte.3.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/rte.3.res.oracle index 0f7bf5b4385..d5189e5215a 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/rte.3.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/rte.3.res.oracle @@ -8,14 +8,17 @@ [wp] Warning: -wp-rte and model nat require kernel to warn against unsigned overflow [wp] Warning: -wp-rte and model nat require kernel to warn against signed downcast [wp] Warning: -wp-rte and model nat require kernel to warn against unsigned downcast +[wp:rte] function job: generate rte for invalid bool value [rte] annotating function job [wp:rte] function job2: generate rte for memory access [wp:rte] function job2: generate rte for division by zero [wp:rte] function job2: generate rte for signed overflow +[wp:rte] function job2: generate rte for invalid bool value [rte] annotating function job2 [wp:rte] function job3: generate rte for memory access [wp:rte] function job3: generate rte for division by zero [wp:rte] function job3: generate rte for signed overflow +[wp:rte] function job3: generate rte for invalid bool value [rte] annotating function job3 [wp] Goal typed_nat_job_ensures : not tried [wp] Goal typed_nat_job_assert_rte_mem_access : not tried diff --git a/src/plugins/wp/tests/wp_plugin/oracle/rte.4.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/rte.4.res.oracle index f2b78e1cab7..7a1f8d54362 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/rte.4.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/rte.4.res.oracle @@ -8,16 +8,19 @@ [wp:rte] function job: generate rte for unsigned overflow [wp] Warning: -wp-rte and model nat require kernel to warn against signed downcast [wp] Warning: -wp-rte and model nat require kernel to warn against unsigned downcast +[wp:rte] function job: generate rte for invalid bool value [rte] annotating function job [wp:rte] function job2: generate rte for memory access [wp:rte] function job2: generate rte for division by zero [wp:rte] function job2: generate rte for signed overflow [wp:rte] function job2: generate rte for unsigned overflow +[wp:rte] function job2: generate rte for invalid bool value [rte] annotating function job2 [wp:rte] function job3: generate rte for memory access [wp:rte] function job3: generate rte for division by zero [wp:rte] function job3: generate rte for signed overflow [wp:rte] function job3: generate rte for unsigned overflow +[wp:rte] function job3: generate rte for invalid bool value [rte] annotating function job3 [wp] Goal typed_nat_job_ensures : not tried [wp] Goal typed_nat_job_assert_rte_mem_access : not tried diff --git a/src/plugins/wp/tests/wp_plugin/oracle/rte.5.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/rte.5.res.oracle index f171879c600..b8d50097f75 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/rte.5.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/rte.5.res.oracle @@ -5,13 +5,16 @@ [wp:rte] function job: missing rte for memory access [wp:rte] function job: missing rte for division by zero [wp:rte] function job: missing rte for signed overflow +[wp:rte] function job: missing rte for invalid bool value [wp] Warning: Missing RTE guards [wp:rte] function job2: missing rte for memory access [wp:rte] function job2: missing rte for division by zero [wp:rte] function job2: missing rte for signed overflow +[wp:rte] function job2: missing rte for invalid bool value [wp:rte] function job3: missing rte for memory access [wp:rte] function job3: missing rte for division by zero [wp:rte] function job3: missing rte for signed overflow +[wp:rte] function job3: missing rte for invalid bool value [wp] Goal typed_nat_job_ensures : not tried [wp] Goal typed_nat_job2_ensures : not tried [wp] Goal typed_nat_job3_ensures : not tried diff --git a/src/plugins/wp/tests/wp_plugin/oracle/rte.6.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/rte.6.res.oracle index 892f3d6443d..b4f10b26519 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/rte.6.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/rte.6.res.oracle @@ -8,12 +8,15 @@ [wp] Warning: -wp-rte and model nat require kernel to warn against unsigned overflow [wp] Warning: -wp-rte and model nat require kernel to warn against signed downcast [wp] Warning: -wp-rte and model nat require kernel to warn against unsigned downcast +[wp:rte] function job: generate rte for invalid bool value [rte] annotating function job [wp:rte] function job2: generate rte for division by zero [wp:rte] function job2: generate rte for signed overflow +[wp:rte] function job2: generate rte for invalid bool value [rte] annotating function job2 [wp:rte] function job3: generate rte for division by zero [wp:rte] function job3: generate rte for signed overflow +[wp:rte] function job3: generate rte for invalid bool value [rte] annotating function job3 [wp] Warning: Missing RTE guards [wp] Goal typed_nat_job_ensures : not tried diff --git a/src/plugins/wp/wpRTE.ml b/src/plugins/wp/wpRTE.ml index e373289c57a..e3e8d851d62 100644 --- a/src/plugins/wp/wpRTE.ml +++ b/src/plugins/wp/wpRTE.ml @@ -24,9 +24,9 @@ let dkey = Wp_parameters.register_category "rte" type t = { name : string ; - kernel : (unit -> bool) ; - rtegen : string ; cint : bool ; + kernel : (unit -> bool) ; + option : string ; status : (unit -> Db.RteGen.status_accessor) ref ; } @@ -52,14 +52,14 @@ let configure ~update ~generate kf cint rte = (* need RTE guard, but kernel option is set *) if not (status rte.status kf) then begin - if option rte.rtegen then + if option rte.option then let msg = if generate then "generate" else "missing" in Wp_parameters.debug ~dkey "function %a: %s rte for %s" Kernel_function.pretty kf msg rte.name ; else Wp_parameters.warning ~once:true ~current:false "-wp-rte can annotate %s because %s is not set" - rte.name rte.rtegen ; + rte.name rte.option ; update := true ; end end @@ -73,23 +73,27 @@ let configure ~update ~generate kf cint rte = let generator = [ { name = "memory access" ; - kernel = always ; rtegen = "-rte-mem" ; cint = false ; + kernel = always ; option = "-rte-mem" ; cint = false ; status = Db.RteGen.get_memAccess_status } ; { name = "division by zero" ; - kernel = always ; rtegen = "-rte-div" ; cint = false ; + kernel = always ; option = "-rte-div" ; cint = false ; status = Db.RteGen.get_divMod_status } ; { name = "signed overflow" ; cint = true ; - kernel = Kernel.SignedOverflow.get ; rtegen = "" ; + kernel = Kernel.SignedOverflow.get ; option = "" ; status = Db.RteGen.get_signedOv_status } ; { name = "unsigned overflow" ; cint = true ; - kernel = Kernel.UnsignedOverflow.get ; rtegen = "" ; + kernel = Kernel.UnsignedOverflow.get ; option = "" ; status = Db.RteGen.get_unsignedOv_status } ; - { name = "signed downcast" ; cint = true ; rtegen = "" ; + { name = "signed downcast" ; cint = true ; option = "" ; kernel = Kernel.SignedDowncast.get ; status = Db.RteGen.get_signed_downCast_status } ; - { name = "unsigned downcast" ; cint = true ; rtegen = "" ; + { name = "unsigned downcast" ; cint = true ; option = "" ; kernel = Kernel.UnsignedDowncast.get ; status = Db.RteGen.get_unsignedDownCast_status } ; + { name = "invalid bool value" ; cint = false ; + option = "-warn-invalid-bool" ; + kernel = Kernel.InvalidBool.get ; + status = Db.RteGen.get_bool_value_status } ; ] let generate kf model = @@ -102,8 +106,4 @@ let missing_guards kf model = let update = ref false in let cint = Model.with_model model Cint.current () in List.iter (configure ~update ~generate:false kf cint) generator ; - let has_bool_traps = not (Kernel.InvalidBool.get ()) in - if has_bool_traps then - Wp_parameters.warning ~once:true ~current:false - "memory model incompatible with -no-warn-invalid-bool" ; !update -- GitLab From 1d0cf28595661a5a19c9aaf5d43a633cec95c473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 26 Apr 2019 14:41:51 +0200 Subject: [PATCH 339/376] [wp] update qualif tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since -wp-bool-range is activated by default… --- .../wp_acsl/oracle_qualif/bitwise.res.oracle | 16 +-- src/plugins/wp/tests/wp_plugin/bool.i | 8 +- .../tests/wp_plugin/oracle/bool.1.res.oracle | 127 ------------------ .../{bool.0.res.oracle => bool.res.oracle} | 14 +- .../wp_plugin/oracle_qualif/bool.0.res.oracle | 25 ---- .../{bool.1.res.oracle => bool.res.oracle} | 4 +- .../oracle_qualif/removed.res.oracle | 2 +- .../wp_plugin/oracle_qualif/rte.res.oracle | 12 +- 8 files changed, 25 insertions(+), 183 deletions(-) delete mode 100644 src/plugins/wp/tests/wp_plugin/oracle/bool.1.res.oracle rename src/plugins/wp/tests/wp_plugin/oracle/{bool.0.res.oracle => bool.res.oracle} (95%) delete mode 100644 src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.0.res.oracle rename src/plugins/wp/tests/wp_plugin/oracle_qualif/{bool.1.res.oracle => bool.res.oracle} (89%) diff --git a/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise.res.oracle index 8cc292011a2..226cd7c529a 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle_qualif/bitwise.res.oracle @@ -12,7 +12,7 @@ [wp] [Qed] Goal typed_band_bit2_ensures_band4 : Valid [wp] [Qed] Goal typed_band_bit3_ensures_band5 : Valid [wp] [Qed] Goal typed_band_bit4_ensures_band6 : Valid -[wp] [Alt-Ergo] Goal typed_band_bool_false_ensures : Unsuccess +[wp] [Alt-Ergo] Goal typed_band_bool_false_ensures : Valid [wp] [Qed] Goal typed_band_bool_true_ensures : Valid [wp] [Qed] Goal typed_bnot_ensures : Valid [wp] [Qed] Goal typed_bor_ensures : Valid @@ -20,12 +20,12 @@ [wp] [Qed] Goal typed_bor_bit1_ensures_bor1 : Valid [wp] [Qed] Goal typed_bor_bit2_ensures_bor2 : Valid [wp] [Qed] Goal typed_bor_bit3_ensures_bor3 : Valid -[wp] [Alt-Ergo] Goal typed_bor_bool_false_ensures : Unsuccess +[wp] [Alt-Ergo] Goal typed_bor_bool_false_ensures : Valid [wp] [Alt-Ergo] Goal typed_bor_bool_true_ensures : Valid [wp] [Qed] Goal typed_bxor_ensures : Valid [wp] [Qed] Goal typed_bxor_bit1_ensures : Valid [wp] [Qed] Goal typed_bxor_bit2_ensures : Valid -[wp] [Alt-Ergo] Goal typed_bxor_bool_false_ensures : Unsuccess +[wp] [Alt-Ergo] Goal typed_bxor_bool_false_ensures : Valid [wp] [Qed] Goal typed_bxor_bool_true_ensures : Valid [wp] [Qed] Goal typed_lshift_ensures : Valid [wp] [Qed] Goal typed_lshift_shift1_ensures_lsl1 : Valid @@ -33,9 +33,9 @@ [wp] [Qed] Goal typed_lshift_shift2_ensures_lsl3 : Valid [wp] [Qed] Goal typed_rshift_ensures : Valid [wp] [Qed] Goal typed_rshift_shift1_ensures_lsr1 : Valid -[wp] Proved goals: 26 / 29 +[wp] Proved goals: 29 / 29 Qed: 25 - Alt-Ergo: 1 (unsuccess: 3) + Alt-Ergo: 4 [wp] Report in: 'tests/wp_acsl/oracle_qualif/bitwise.0.report.json' [wp] Report out: 'tests/wp_acsl/result_qualif/bitwise.0.report.json' ------------------------------------------------------------- @@ -46,7 +46,7 @@ bxor 3 - 3 100% bnot 1 - 1 100% lshift 4 - 4 100% rshift 2 - 2 100% -bor_bool - 1 (4..16) 2 50.0% -band_bool 1 - 2 50.0% -bxor_bool 1 - 2 50.0% +bor_bool - 2 (8..20) 2 100% +band_bool 1 1 (20..32) 2 100% +bxor_bool 1 1 (8..20) 2 100% ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_plugin/bool.i b/src/plugins/wp/tests/wp_plugin/bool.i index 0b90b861d07..3c38f396a1c 100644 --- a/src/plugins/wp/tests/wp_plugin/bool.i +++ b/src/plugins/wp/tests/wp_plugin/bool.i @@ -1,11 +1,9 @@ /* run.config OPT: -wp-no-let - OPT: -wp-no-let */ /* run.config_qualif OPT: -wp-no-let - OPT: -wp-no-let */ @@ -15,7 +13,7 @@ int job(_Bool a, _Bool b) { return a+b; } /*@ behavior true: @ assumes a == 1 || b == 1; @ ensures \result == 1; - @ behavior false: + @ behavior false: @ assumes !(a == 1 || b == 1); @ ensures \result == 0; */ @@ -25,7 +23,7 @@ _Bool bor_bool(_Bool a, _Bool b) { return (_Bool)(((int)a | (int)b) != 0); } /*@ behavior true: @ assumes a == 1 && b == 1; @ ensures \result == 1; - @ behavior false: + @ behavior false: @ assumes !(a == 1 && b == 1); @ ensures \result == 0; */ @@ -34,7 +32,7 @@ _Bool band_bool(_Bool a, _Bool b) { return (_Bool)(((int)a & (int)b) != 0); } /*@ behavior true: @ assumes (a == 1 && b == 0) || (a == 0 && b == 1); @ ensures \result == 1; - @ behavior false: + @ behavior false: @ assumes !((a == 1 && b == 0) || (a == 0 && b == 1)) ; @ ensures \result == 0; */ diff --git a/src/plugins/wp/tests/wp_plugin/oracle/bool.1.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/bool.1.res.oracle deleted file mode 100644 index feb6965058e..00000000000 --- a/src/plugins/wp/tests/wp_plugin/oracle/bool.1.res.oracle +++ /dev/null @@ -1,127 +0,0 @@ -# frama-c -wp -wp-no-let [...] -[kernel] Parsing tests/wp_plugin/bool.i (no preprocessing) -[wp] Running WP plugin... -[wp] Loading driver 'share/wp.driver' -[wp] Warning: Missing RTE guards ------------------------------------------------------------- - Function band_bool with behavior false ------------------------------------------------------------- - -Goal Post-condition for 'false' (file tests/wp_plugin/bool.i, line 30) in 'band_bool': -Assume { - Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ - is_bool(band_bool_0) /\ is_bool(retres_0). - Have: (a_1 = a) /\ (b_1 = b). - (* Pre-condition for 'false' *) - Have: (a_1 != 1) \/ (b_1 != 1). - Have: (if (land(a, b) = 0) then 0 else 1) = retres_0. - (* Return *) - Have: retres_0 = band_bool_0. -} -Prove: band_bool_0 = 0. - ------------------------------------------------------------- ------------------------------------------------------------- - Function band_bool with behavior true ------------------------------------------------------------- - -Goal Post-condition for 'true' (file tests/wp_plugin/bool.i, line 27) in 'band_bool': -Assume { - Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ - is_bool(band_bool_0) /\ is_bool(retres_0). - Have: (a_1 = a) /\ (b_1 = b). - (* Pre-condition for 'true' *) - Have: (a_1 = 1) /\ (b_1 = 1). - Have: (if (land(a, b) = 0) then 0 else 1) = retres_0. - (* Return *) - Have: retres_0 = band_bool_0. -} -Prove: band_bool_0 = 1. - ------------------------------------------------------------- ------------------------------------------------------------- - Function bor_bool with behavior false ------------------------------------------------------------- - -Goal Post-condition for 'false' (file tests/wp_plugin/bool.i, line 20) in 'bor_bool': -Assume { - Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ - is_bool(bor_bool_0) /\ is_bool(retres_0). - Have: (a_1 = a) /\ (b_1 = b). - (* Pre-condition for 'false' *) - Have: (a_1 != 1) /\ (b_1 != 1). - Have: (if ((a = 0) & (b = 0)) then 0 else 1) = retres_0. - (* Return *) - Have: retres_0 = bor_bool_0. -} -Prove: bor_bool_0 = 0. - ------------------------------------------------------------- ------------------------------------------------------------- - Function bor_bool with behavior true ------------------------------------------------------------- - -Goal Post-condition for 'true' (file tests/wp_plugin/bool.i, line 17) in 'bor_bool': -Assume { - Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ - is_bool(bor_bool_0) /\ is_bool(retres_0). - Have: (a_1 = a) /\ (b_1 = b). - (* Pre-condition for 'true' *) - Have: (a_1 = 1) \/ (b_1 = 1). - Have: (if ((a = 0) & (b = 0)) then 0 else 1) = retres_0. - (* Return *) - Have: retres_0 = bor_bool_0. -} -Prove: bor_bool_0 = 1. - ------------------------------------------------------------- ------------------------------------------------------------- - Function bxor_bool with behavior false ------------------------------------------------------------- - -Goal Post-condition for 'false' (file tests/wp_plugin/bool.i, line 39) in 'bxor_bool': -Assume { - Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ - is_bool(bxor_bool_0) /\ is_bool(retres_0). - Have: (a_1 = a) /\ (b_1 = b). - (* Pre-condition for 'false' *) - Have: ((a_1 != 0) \/ (b_1 != 1)) /\ ((a_1 != 1) \/ (b_1 != 0)). - Have: (if (b = a) then 0 else 1) = retres_0. - (* Return *) - Have: retres_0 = bxor_bool_0. -} -Prove: bxor_bool_0 = 0. - ------------------------------------------------------------- ------------------------------------------------------------- - Function bxor_bool with behavior true ------------------------------------------------------------- - -Goal Post-condition for 'true' (file tests/wp_plugin/bool.i, line 36) in 'bxor_bool': -Assume { - Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ - is_bool(bxor_bool_0) /\ is_bool(retres_0). - Have: (a_1 = a) /\ (b_1 = b). - (* Pre-condition for 'true' *) - Have: ((a_1 = 0) /\ (b_1 = 1)) \/ ((a_1 = 1) /\ (b_1 = 0)). - Have: (if (b = a) then 0 else 1) = retres_0. - (* Return *) - Have: retres_0 = bxor_bool_0. -} -Prove: bxor_bool_0 = 1. - ------------------------------------------------------------- ------------------------------------------------------------- - Function job ------------------------------------------------------------- - -Goal Post-condition (file tests/wp_plugin/bool.i, line 12) in 'job': -Assume { - Type: is_bool(a) /\ is_bool(b) /\ is_sint32(job_0) /\ is_sint32(retres_0). - Have: (a + b) = retres_0. - (* Return *) - Have: retres_0 = job_0. -} -Prove: (0 <= job_0) /\ (job_0 <= 2). - ------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_plugin/oracle/bool.0.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle/bool.res.oracle similarity index 95% rename from src/plugins/wp/tests/wp_plugin/oracle/bool.0.res.oracle rename to src/plugins/wp/tests/wp_plugin/oracle/bool.res.oracle index feb6965058e..c80bbdfdc62 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle/bool.0.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle/bool.res.oracle @@ -7,7 +7,7 @@ Function band_bool with behavior false ------------------------------------------------------------ -Goal Post-condition for 'false' (file tests/wp_plugin/bool.i, line 30) in 'band_bool': +Goal Post-condition for 'false' (file tests/wp_plugin/bool.i, line 28) in 'band_bool': Assume { Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ is_bool(band_bool_0) /\ is_bool(retres_0). @@ -25,7 +25,7 @@ Prove: band_bool_0 = 0. Function band_bool with behavior true ------------------------------------------------------------ -Goal Post-condition for 'true' (file tests/wp_plugin/bool.i, line 27) in 'band_bool': +Goal Post-condition for 'true' (file tests/wp_plugin/bool.i, line 25) in 'band_bool': Assume { Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ is_bool(band_bool_0) /\ is_bool(retres_0). @@ -43,7 +43,7 @@ Prove: band_bool_0 = 1. Function bor_bool with behavior false ------------------------------------------------------------ -Goal Post-condition for 'false' (file tests/wp_plugin/bool.i, line 20) in 'bor_bool': +Goal Post-condition for 'false' (file tests/wp_plugin/bool.i, line 18) in 'bor_bool': Assume { Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ is_bool(bor_bool_0) /\ is_bool(retres_0). @@ -61,7 +61,7 @@ Prove: bor_bool_0 = 0. Function bor_bool with behavior true ------------------------------------------------------------ -Goal Post-condition for 'true' (file tests/wp_plugin/bool.i, line 17) in 'bor_bool': +Goal Post-condition for 'true' (file tests/wp_plugin/bool.i, line 15) in 'bor_bool': Assume { Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ is_bool(bor_bool_0) /\ is_bool(retres_0). @@ -79,7 +79,7 @@ Prove: bor_bool_0 = 1. Function bxor_bool with behavior false ------------------------------------------------------------ -Goal Post-condition for 'false' (file tests/wp_plugin/bool.i, line 39) in 'bxor_bool': +Goal Post-condition for 'false' (file tests/wp_plugin/bool.i, line 37) in 'bxor_bool': Assume { Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ is_bool(bxor_bool_0) /\ is_bool(retres_0). @@ -97,7 +97,7 @@ Prove: bxor_bool_0 = 0. Function bxor_bool with behavior true ------------------------------------------------------------ -Goal Post-condition for 'true' (file tests/wp_plugin/bool.i, line 36) in 'bxor_bool': +Goal Post-condition for 'true' (file tests/wp_plugin/bool.i, line 34) in 'bxor_bool': Assume { Type: is_bool(a) /\ is_bool(a_1) /\ is_bool(b) /\ is_bool(b_1) /\ is_bool(bxor_bool_0) /\ is_bool(retres_0). @@ -115,7 +115,7 @@ Prove: bxor_bool_0 = 1. Function job ------------------------------------------------------------ -Goal Post-condition (file tests/wp_plugin/bool.i, line 12) in 'job': +Goal Post-condition (file tests/wp_plugin/bool.i, line 10) in 'job': Assume { Type: is_bool(a) /\ is_bool(b) /\ is_sint32(job_0) /\ is_sint32(retres_0). Have: (a + b) = retres_0. diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.0.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.0.res.oracle deleted file mode 100644 index 8361dfbe06c..00000000000 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.0.res.oracle +++ /dev/null @@ -1,25 +0,0 @@ -# frama-c -wp -wp-no-let -wp-timeout 90 -wp-steps 1500 [...] -[kernel] Parsing tests/wp_plugin/bool.i (no preprocessing) -[wp] Running WP plugin... -[wp] Loading driver 'share/wp.driver' -[wp] Warning: Missing RTE guards -[wp] 7 goals scheduled -[wp] [Alt-Ergo] Goal typed_band_bool_false_ensures : Unsuccess -[wp] [Qed] Goal typed_band_bool_true_ensures : Valid -[wp] [Alt-Ergo] Goal typed_bor_bool_false_ensures : Unsuccess -[wp] [Alt-Ergo] Goal typed_bor_bool_true_ensures : Valid -[wp] [Alt-Ergo] Goal typed_bxor_bool_false_ensures : Unsuccess -[wp] [Qed] Goal typed_bxor_bool_true_ensures : Valid -[wp] [Alt-Ergo] Goal typed_job_ensures : Unsuccess -[wp] Proved goals: 3 / 7 - Qed: 2 - Alt-Ergo: 1 (unsuccess: 4) -[wp] Report in: 'tests/wp_plugin/oracle_qualif/bool.0.report.json' -[wp] Report out: 'tests/wp_plugin/result_qualif/bool.0.report.json' -------------------------------------------------------------- -Functions WP Alt-Ergo Total Success -job - - 1 0.0% -bor_bool - 1 (4..16) 2 50.0% -band_bool 1 - 2 50.0% -bxor_bool 1 - 2 50.0% -------------------------------------------------------------- diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.1.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.res.oracle similarity index 89% rename from src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.1.res.oracle rename to src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.res.oracle index 04c1d1900f3..81ddac40fbc 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.1.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/bool.res.oracle @@ -14,8 +14,8 @@ [wp] Proved goals: 7 / 7 Qed: 2 Alt-Ergo: 5 -[wp] Report in: 'tests/wp_plugin/oracle_qualif/bool.1.report.json' -[wp] Report out: 'tests/wp_plugin/result_qualif/bool.1.report.json' +[wp] Report in: 'tests/wp_plugin/oracle_qualif/bool.0.report.json' +[wp] Report out: 'tests/wp_plugin/result_qualif/bool.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job - 1 (12..24) 1 100% diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/removed.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/removed.res.oracle index c1ef69535ae..397e221edae 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/removed.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/removed.res.oracle @@ -12,11 +12,11 @@ __retres ∈ [-2147483647..2147483647] [wp] Running WP plugin... [wp] Loading driver 'share/wp.driver' +[wp] Warning: Missing RTE guards [wp] 1 goal scheduled [wp] [Alt-Ergo] Goal typed_main_assert_Eva_signed_overflow : Unsuccess [wp] Proved goals: 0 / 1 Alt-Ergo: 0 (unsuccess: 1) [wp] Running WP plugin... -[wp] Warning: Missing RTE guards [wp] 0 goal scheduled [wp] Proved goals: 0 / 0 diff --git a/src/plugins/wp/tests/wp_plugin/oracle_qualif/rte.res.oracle b/src/plugins/wp/tests/wp_plugin/oracle_qualif/rte.res.oracle index 5bc109acf7a..2404c6c172d 100644 --- a/src/plugins/wp/tests/wp_plugin/oracle_qualif/rte.res.oracle +++ b/src/plugins/wp/tests/wp_plugin/oracle_qualif/rte.res.oracle @@ -5,24 +5,20 @@ [rte] annotating function job [rte] annotating function job2 [rte] annotating function job3 -[wp] tests/wp_plugin/rte.i:34: Warning: - Option -wp-bool-range incompatiable with RTE (ignored) -[wp] tests/wp_plugin/rte.i:34: Warning: - Option -wp-bool-range incompatiable with RTE (ignored) [wp] 6 goals scheduled [wp] [Alt-Ergo] Goal typed_job_assert_rte_mem_access : Unsuccess [wp] [Alt-Ergo] Goal typed_job_assert_rte_mem_access_2 : Unsuccess [wp] [Alt-Ergo] Goal typed_job_assert_rte_signed_overflow : Unsuccess [wp] [Alt-Ergo] Goal typed_job_assert_rte_signed_overflow_2 : Unsuccess [wp] [Qed] Goal typed_job_assert_rte_mem_access_3 : Valid -[wp] [Alt-Ergo] Goal typed_job3_assert_rte_bool_value : Unsuccess -[wp] Proved goals: 1 / 6 +[wp] [Alt-Ergo] Goal typed_job3_assert_rte_bool_value : Valid +[wp] Proved goals: 2 / 6 Qed: 1 - Alt-Ergo: 0 (unsuccess: 5) + Alt-Ergo: 1 (unsuccess: 4) [wp] Report in: 'tests/wp_plugin/oracle_qualif/rte.0.report.json' [wp] Report out: 'tests/wp_plugin/result_qualif/rte.0.report.json' ------------------------------------------------------------- Functions WP Alt-Ergo Total Success job 1 - 5 20.0% -job3 - - 1 0.0% +job3 - 1 (4..16) 1 100% ------------------------------------------------------------- -- GitLab From 2cb6fa0debd541b468cc4eae7e8ba66d53a7bab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 26 Apr 2019 14:44:27 +0200 Subject: [PATCH 340/376] [wp] update changeling wrt to -wp-bool-range --- src/plugins/wp/Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/wp/Changelog b/src/plugins/wp/Changelog index 60844cd373c..1bbd1d8265a 100644 --- a/src/plugins/wp/Changelog +++ b/src/plugins/wp/Changelog @@ -20,6 +20,8 @@ # <Prover>: prover ############################################################################### + - Wp [2019/04/26] Now requires -warn-invalid-bool + - Wp [2019/04/26] Removed option -wp-bool-range - Wp [2019/04/24] Support for Why3 1.* and Coq 8.{7-9} - Wp [2019/02/26] Support for @check ACSL annotations - WP [2018/02/16] Filter out some variables from separation -- GitLab From 99ff7a49e3c43c75d991e923f54e54f86d0d5781 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Sat, 27 Apr 2019 11:53:48 +0200 Subject: [PATCH 341/376] revert to use x!=0 for converting x to boolean --- src/kernel_services/ast_queries/logic_typing.ml | 3 ++- .../wp/tests/wp_acsl/oracle/precedence.res.oracle | 12 ++++++------ tests/misc/oracle/booleans.res.oracle | 4 ++-- tests/misc/oracle/obfuscate.res.oracle | 2 +- tests/spec/oracle/all.res.oracle | 10 +++++----- tests/spec/oracle/logic_type.res.oracle | 6 +++--- tests/spec/oracle/null_ptr.res.oracle | 2 +- tests/spec/oracle/parsing.res.oracle | 4 ++-- tests/spec/oracle/real_typing_bts1309.res.oracle | 2 +- 9 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/kernel_services/ast_queries/logic_typing.ml b/src/kernel_services/ast_queries/logic_typing.ml index b2c51f3b799..727d6639ffd 100644 --- a/src/kernel_services/ast_queries/logic_typing.ml +++ b/src/kernel_services/ast_queries/logic_typing.ml @@ -1229,7 +1229,8 @@ struct | t1, Ltype ({lt_name = name},[]) when name = Utf8_logic.boolean && is_integral_type t1 -> let t2 = Ltype (C.find_logic_type Utf8_logic.boolean,[]) in - { e with term_node = TLogic_coerce(t2,e); term_type = t2 } + let e = mk_cast e Linteger in + Logic_const.term ~loc (TBinOp(Ne,e,lzero ~loc())) t2 | t1, Linteger when Logic_const.is_boolean_type t1 && explicit -> logic_coerce Linteger e | t1, Ctype t2 when Logic_const.is_boolean_type t1 diff --git a/src/plugins/wp/tests/wp_acsl/oracle/precedence.res.oracle b/src/plugins/wp/tests/wp_acsl/oracle/precedence.res.oracle index e6908ae1869..0071a69eb1e 100644 --- a/src/plugins/wp/tests/wp_acsl/oracle/precedence.res.oracle +++ b/src/plugins/wp/tests/wp_acsl/oracle/precedence.res.oracle @@ -778,19 +778,19 @@ void predicate(int x, int a, int b) ensures ko: r_precedence_and_eq: \old(p) ≡ \old(q) ∧ \old(r) ≢ 0 ⇔ - (ð”¹)\old(p) ≡ ((ð”¹)\old(q) ∧ (ð”¹)\old(r)); + (\old(p) ≢ 0) ≡ (\old(q) ≢ 0 ∧ \old(r) ≢ 0); ensures ko: l_precedence_and_eq: \old(p) ≢ 0 ∧ \old(q) ≡ \old(r) ⇔ - ((ð”¹)\old(p) ∧ (ð”¹)\old(q)) ≡ (ð”¹)\old(r); + (\old(p) ≢ 0 ∧ \old(q) ≢ 0) ≡ (\old(r) ≢ 0); ensures ko: l_nonassoc_eq: \old(p) ≡ \old(q) ≡ \old(r) ⇔ - (\old(p) ≡ \old(q)) ≡ (ð”¹)\old(r); + (\old(p) ≡ \old(q)) ≡ (\old(r) ≢ 0); ensures ko: r_nonassoc_eq: \old(p) ≡ \old(q) ≡ \old(r) ⇔ - (ð”¹)\old(p) ≡ (\old(q) ≡ \old(r)); + (\old(p) ≢ 0) ≡ (\old(q) ≡ \old(r)); ensures r_precedence_neq_and: \old(p) ≢ \old(q) ∧ R ⇔ \old(p) ≢ \old(q) ∧ R; @@ -800,11 +800,11 @@ void predicate(int x, int a, int b) ensures ko: r_precedence_and_neq: \old(p) ≢ \old(q) ∧ \old(r) ≢ 0 ⇔ - (ð”¹)\old(p) ≢ ((ð”¹)\old(q) ∧ (ð”¹)\old(r)); + (\old(p) ≢ 0) ≢ (\old(q) ≢ 0 ∧ \old(r) ≢ 0); ensures ko: l_precedence_and_neq: \old(p) ≢ 0 ∧ \old(q) ≢ \old(r) ⇔ - ((ð”¹)\old(p) ∧ (ð”¹)\old(q)) ≢ (ð”¹)\old(r); + (\old(p) ≢ 0 ∧ \old(q) ≢ 0) ≢ (\old(r) ≢ 0); */ void comparison(int p, int q, int r) { diff --git a/tests/misc/oracle/booleans.res.oracle b/tests/misc/oracle/booleans.res.oracle index d54bc6a7cc3..8f7927c6bce 100644 --- a/tests/misc/oracle/booleans.res.oracle +++ b/tests/misc/oracle/booleans.res.oracle @@ -29,8 +29,8 @@ int main(void) { int __retres; int x = 42; - /*@ check (ð”¹)x ≡ (ð”¹)17; */ ; - /*@ check (ℤ)(ð”¹)x ≡ 17; */ ; + /*@ check (x ≢ 0) ≡ (17 ≢ 0); */ ; + /*@ check ((ℤ)x ≢ 0) ≡ 17; */ ; __retres = 0; return __retres; } diff --git a/tests/misc/oracle/obfuscate.res.oracle b/tests/misc/oracle/obfuscate.res.oracle index 3c55a38dad0..124447020ca 100644 --- a/tests/misc/oracle/obfuscate.res.oracle +++ b/tests/misc/oracle/obfuscate.res.oracle @@ -123,7 +123,7 @@ int F3(int f2) V3 = 0; if (f2) goto L2; V3 ++; - /*@ assert property: (ð”¹)V3? 1 ≢ 0: 0 ≢ 0; */ ; + /*@ assert property: V3 ≢ 0? 1 ≢ 0: 0 ≢ 0; */ ; L2: ; return V3; } diff --git a/tests/spec/oracle/all.res.oracle b/tests/spec/oracle/all.res.oracle index 26a8ebc75b7..eb8254c5c9c 100644 --- a/tests/spec/oracle/all.res.oracle +++ b/tests/spec/oracle/all.res.oracle @@ -29,7 +29,7 @@ axiomatic Test { axiom e: P ⊻ Q; - axiom f: (ð”¹)0? P: Q; + axiom f: 0 ≢ 0? P: Q; axiom g: (P ⇒ P) ∧ (¬P ⇒ Q); @@ -39,13 +39,13 @@ axiomatic Test { } */ -/*@ predicate R(ℤ i, ℤ j) = ((ð”¹)1? i + j: (j: j)) ≡ i + j; +/*@ predicate R(ℤ i, ℤ j) = (1 ≢ 0? i + j: (j: j)) ≡ i + j; */ -/*@ predicate S(ℤ i, ℤ j) = ((ð”¹)1? (i: j): j) ≡ j; +/*@ predicate S(ℤ i, ℤ j) = (1 ≢ 0? (i: j): j) ≡ j; */ -/*@ predicate T(ℤ i, ℤ j) = ((ð”¹)1? i: j) ≡ i; +/*@ predicate T(ℤ i, ℤ j) = (1 ≢ 0? i: j) ≡ i; */ -/*@ lemma tauto: (ð”¹)0? T(0, 0): R(1, 2); +/*@ lemma tauto: 0 ≢ 0? T(0, 0): R(1, 2); */ /*@ lemma tauto2: (R(0, 1) ⇒ S(3, 4)) ∧ (¬R(0, 1) ⇒ T(5, 6)); */ diff --git a/tests/spec/oracle/logic_type.res.oracle b/tests/spec/oracle/logic_type.res.oracle index c1cc68010da..c7f4d27c228 100644 --- a/tests/spec/oracle/logic_type.res.oracle +++ b/tests/spec/oracle/logic_type.res.oracle @@ -55,11 +55,11 @@ void h(void) */ /*@ logic _Bool _Bool_from_boolean(𔹠b) = (_Bool)b; */ -/*@ logic 𔹠boolean_from_integer(ℤ b) = (ð”¹)b; +/*@ logic 𔹠boolean_from_integer(ℤ b) = b ≢ 0; */ -/*@ logic 𔹠boolean_from_int(int b) = (ð”¹)b; +/*@ logic 𔹠boolean_from_int(int b) = b ≢ 0; */ -/*@ logic 𔹠boolean_from_Bool(_Bool b) = b; +/*@ logic 𔹠boolean_from_Bool(_Bool b) = b ≢ 0; */ diff --git a/tests/spec/oracle/null_ptr.res.oracle b/tests/spec/oracle/null_ptr.res.oracle index 55b0cc5e433..5412691e03a 100644 --- a/tests/spec/oracle/null_ptr.res.oracle +++ b/tests/spec/oracle/null_ptr.res.oracle @@ -22,7 +22,7 @@ void f(char *x) return; } -/*@ ensures (ð”¹)\result ≡ \true; */ +/*@ ensures (\result ≢ 0) ≡ \true; */ int g(void) { int __retres; diff --git a/tests/spec/oracle/parsing.res.oracle b/tests/spec/oracle/parsing.res.oracle index 4cff9264d42..487e29fb134 100644 --- a/tests/spec/oracle/parsing.res.oracle +++ b/tests/spec/oracle/parsing.res.oracle @@ -7,9 +7,9 @@ /* Generated by Frama-C */ /*@ lemma bidon{Here}: ∀ int *t; ¬(*(t + 0) > 0); */ -/*@ lemma bidon1{Here}: ∀ int *t; !(ð”¹)*(t + 0) ≡ (ð”¹)0; +/*@ lemma bidon1{Here}: ∀ int *t; !(*(t + 0) ≢ 0) ≡ (0 ≢ 0); */ -/*@ lemma bidon2{Here}: ∀ int *t; !(ð”¹)*(t + 0) ≡ (ð”¹)0; +/*@ lemma bidon2{Here}: ∀ int *t; !(*(t + 0) ≢ 0) ≡ (0 ≢ 0); */ /*@ predicate foo{L}(int *a, int *b, int length) = diff --git a/tests/spec/oracle/real_typing_bts1309.res.oracle b/tests/spec/oracle/real_typing_bts1309.res.oracle index 1a15afbf483..263809eb183 100644 --- a/tests/spec/oracle/real_typing_bts1309.res.oracle +++ b/tests/spec/oracle/real_typing_bts1309.res.oracle @@ -3,7 +3,7 @@ void foo(int c) { float f = (float)1.0; - /*@ assert 0.0 ≤ ((ð”¹)c? f: 2.0); */ ; + /*@ assert 0.0 ≤ (c ≢ 0? f: 2.0); */ ; return; } -- GitLab From 78df99931963f6b4c0ede99e643484db289bf080 Mon Sep 17 00:00:00 2001 From: Virgile Robles <virgile.robles@protonmail.ch> Date: Mon, 29 Apr 2019 17:37:40 +0200 Subject: [PATCH 342/376] [Callgraph] Remove "unsound" mention in help message --- src/plugins/callgraph/options.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/callgraph/options.ml b/src/plugins/callgraph/options.ml index 0b287167773..3677c0d6be6 100644 --- a/src/plugins/callgraph/options.ml +++ b/src/plugins/callgraph/options.ml @@ -76,8 +76,7 @@ module Function_pointers = let option_name = "-cg-function-pointers" let help = "when Eva has not been computed, safely over-approximate \ callees in presence of function pointers; \ - always done when Eva has been previously computed. \ - WARNING: this option is unsound" + always done when Eva has been previously computed." end) module Uncalled = -- GitLab From a9d10039fd11a61b5412e0b18a3ee1013914e695 Mon Sep 17 00:00:00 2001 From: Julien Signoles <julien.signoles@cea.fr> Date: Mon, 29 Apr 2019 18:18:22 +0200 Subject: [PATCH 343/376] [rmtmps] fix bug introduced in MR 1930 (marking unused fc_builtins as being referenced) --- src/kernel_internals/typing/rmtmps.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/kernel_internals/typing/rmtmps.ml b/src/kernel_internals/typing/rmtmps.ml index e22c8830104..6b87bdf9097 100644 --- a/src/kernel_internals/typing/rmtmps.ml +++ b/src/kernel_internals/typing/rmtmps.ml @@ -609,9 +609,11 @@ class markReferencedVisitor = object | GVarDecl (varinfo, loc) | GFunDecl (_,varinfo, loc) | GFun ({svar = varinfo}, loc) -> - Kernel.debug ~dkey "referenced: var/fun %s@." varinfo.vname; - Kernel.debug ~source:(fst loc) ~dkey "referenced: fun %s" varinfo.vname; - varinfo.vreferenced <- true; + if not (hasAttribute "FC_BUILTIN" varinfo.vattr) then begin + Kernel.debug ~dkey "referenced: var/fun %s@." varinfo.vname; + Kernel.debug ~source:(fst loc) ~dkey "referenced: fun %s" varinfo.vname; + varinfo.vreferenced <- true; + end; DoChildren | GAnnot _ -> DoChildren | _ -> -- GitLab From 2a45d1d5887d420d2c0b83dc64ed13a3083a36f9 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Mon, 8 Apr 2019 16:00:31 +0200 Subject: [PATCH 344/376] [Qed] more let intro for boolean variables --- src/plugins/qed/term.ml | 20 +++++++++++++------ src/plugins/wp/tests/wp_bts/ex5.i | 9 +++++++++ .../wp/tests/wp_bts/oracle/ex5.res.oracle | 20 +++++++++++++++++++ 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/src/plugins/qed/term.ml b/src/plugins/qed/term.ml index fa6e17a4dde..3f909e5b7b0 100644 --- a/src/plugins/qed/term.ml +++ b/src/plugins/qed/term.ml @@ -1975,11 +1975,11 @@ struct let let_intro_case q x a = let res = ref None in + let found_term t = assert (!res = None); + assert (not (Vars.mem x t.vars)); + res := Some t; true + in let is_term_ok a b = - let found_term t = assert (!res = None); - assert (not (Vars.mem x t.vars)); - res := Some t; true - in match a.repr with | Fvar w -> assert (Var.equal x w); found_term b | Add e -> @@ -2010,8 +2010,16 @@ struct | false,true -> is_term_ok v u | _,_ -> false in - let is_eq e = match e.repr with|Eq(u,v) -> is_var_ok u v |_ -> false in - let is_neq e = match e.repr with|Neq(u,v)-> is_var_ok u v |_ -> false in + let is_boolean_var polarity_term = function + | Fvar w when Var.equal x w -> found_term polarity_term + | _ -> false + in + let is_eq e = match e.repr with | Eq(u,v) -> is_var_ok u v + | Not q -> is_boolean_var e_false q.repr + | rep -> is_boolean_var e_true rep in + let is_neq e = match e.repr with | Neq(u,v)-> is_var_ok u v + | Not q -> is_boolean_var e_true q.repr + | rep -> is_boolean_var e_false rep in match q with | Lambda -> None | Forall -> diff --git a/src/plugins/wp/tests/wp_bts/ex5.i b/src/plugins/wp/tests/wp_bts/ex5.i index 5a4b45fe866..af1e3e63c0a 100644 --- a/src/plugins/wp/tests/wp_bts/ex5.i +++ b/src/plugins/wp/tests/wp_bts/ex5.i @@ -15,6 +15,10 @@ void dummy() predicate P(integer x) reads \nothing; predicate Q(integer x) reads \nothing ; logic integer f(integer x) reads \nothing; + + predicate B(boolean x) reads \nothing; + predicate C(boolean x,boolean y) reads \nothing ; + logic boolean c(boolean x) reads \nothing; } */ @@ -36,6 +40,11 @@ void dummy() ensures p1: \exists integer x; P(x) && Q(x) && x == 1; ensures p2: \exists integer x; P(x) && Q(x) && 1+x == b; ensures p3: \exists integer x; P(x) && Q(x) && 1+x+f(a) == b+f(b); + + ensures ok41: \exists boolean x; x && c(x) == c(\true); + ensures ok42: \exists boolean x; !x && c(x) == c(\false); + ensures ok43: \exists boolean x; \exists boolean y; !x && y && (C(x,y) <==> C(\false,\true)) ; + ensures ko43: \exists boolean x; \exists boolean y; !x && y && C(x,y) ; */ void exists (int a, int b) { } diff --git a/src/plugins/wp/tests/wp_bts/oracle/ex5.res.oracle b/src/plugins/wp/tests/wp_bts/oracle/ex5.res.oracle index b2014547834..5a458b3a95b 100644 --- a/src/plugins/wp/tests/wp_bts/oracle/ex5.res.oracle +++ b/src/plugins/wp/tests/wp_bts/oracle/ex5.res.oracle @@ -99,6 +99,26 @@ Let x = b - 1. Prove: P_P(x) /\ P_Q(x). Goal Post-condition 'p3' in 'exists': Let x = b + L_f(b) - 1 - L_f(a). Prove: P_P(x) /\ P_Q(x). +------------------------------------------------------------ + +Goal Post-condition 'ok41' in 'exists': +Prove: true. + +------------------------------------------------------------ + +Goal Post-condition 'ok42' in 'exists': +Prove: true. + +------------------------------------------------------------ + +Goal Post-condition 'ok43' in 'exists': +Prove: true. + +------------------------------------------------------------ + +Goal Post-condition 'ko43' in 'exists': +Prove: P_C(false, true). + ------------------------------------------------------------ ------------------------------------------------------------ Function forall -- GitLab From c0e7f97545d56f10b6e178303dd76c59133b41f3 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Thu, 9 May 2019 08:24:07 +0200 Subject: [PATCH 345/376] [Qed] more let intro for boolean variables --- src/plugins/wp/Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/wp/Changelog b/src/plugins/wp/Changelog index 1bbd1d8265a..58d946999e8 100644 --- a/src/plugins/wp/Changelog +++ b/src/plugins/wp/Changelog @@ -20,6 +20,7 @@ # <Prover>: prover ############################################################################### + - Qed [2019/05/09] Transforms some boolean quantifications into let constructs - Wp [2019/04/26] Now requires -warn-invalid-bool - Wp [2019/04/26] Removed option -wp-bool-range - Wp [2019/04/24] Support for Why3 1.* and Coq 8.{7-9} -- GitLab From fa07e4a8416e1845985d6eb8a48dfc1e185b5fbe Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Thu, 9 May 2019 10:40:34 +0200 Subject: [PATCH 346/376] [WP] fixes Cint solver --- src/plugins/wp/Changelog | 1 + src/plugins/wp/Cint.ml | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/wp/Changelog b/src/plugins/wp/Changelog index 1bbd1d8265a..611e7dd2923 100644 --- a/src/plugins/wp/Changelog +++ b/src/plugins/wp/Changelog @@ -20,6 +20,7 @@ # <Prover>: prover ############################################################################### + - Wp [2019/05/09] Fixes -wp-simplify-is-cint simplifier - Wp [2019/04/26] Now requires -warn-invalid-bool - Wp [2019/04/26] Removed option -wp-bool-range - Wp [2019/04/24] Support for Why3 1.* and Coq 8.{7-9} diff --git a/src/plugins/wp/Cint.ml b/src/plugins/wp/Cint.ml index db97213a0c4..874efe45760 100644 --- a/src/plugins/wp/Cint.ml +++ b/src/plugins/wp/Cint.ml @@ -815,6 +815,7 @@ let c_int_bounds_ival f = let max_reduce_quantifiers = 1000 +(** We know that t is a predicate which is the opened body of a forall *) let reduce_bound v dom t : term = let module Exc = struct exception True @@ -831,8 +832,9 @@ let reduce_bound v dom t : term = Ival.fold_int red dom (); raise Exc.True with Exc.Unknown i -> i in let max_bound = try - Ival.fold_int(*_decrease*) red dom (); raise Exc.True + Ival.fold_int_decrease red dom (); raise Exc.True with Exc.Unknown i -> i in + (** we try to reduce the bounds of the domains, when trivially false *) let dom_red = Ival.inject_range (Some min_bound) (Some max_bound) in if not (Ival.equal dom_red dom) && Ival.is_included dom_red dom then t @@ -929,6 +931,8 @@ let is_cint_simplifier = object (self) domain <- Tmap.add tvar !var_domain domain; let t = walk ~is_goal t in domain <- Tmap.remove tvar domain; + (** Bonus: Add additionnal hypothesis in forall when we could deduce + better constraint on the variable *) let t = if quant = Forall && is_goal && Ival.cardinal_is_less_than !var_domain max_reduce_quantifiers @@ -936,6 +940,7 @@ let is_cint_simplifier = object (self) else t in e_bind quant var t | Fun(g,[a]) -> + (** Here we simplifies the cints which are redoundant *) begin try let ubound = c_int_bounds_ival (is_cint g) in let dom = (Tmap.find a domain) in -- GitLab From e6146b25d0ef87fffc3ea89f9d2fe9eb58d747ae Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 13 May 2019 10:43:41 +0200 Subject: [PATCH 347/376] [release] update name pattern for Changelog section --- doc/release/branch.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/release/branch.tex b/doc/release/branch.tex index d20f396842f..cee2baa5827 100644 --- a/doc/release/branch.tex +++ b/doc/release/branch.tex @@ -54,9 +54,9 @@ the Changelog. \begin{itemize} \item Add the following in the Changelog, in \texttt{stable/element} \begin{verbatim} - ############################# - Open Source Release <element> - ############################# + #################################### + Open Source Release <nb> (<element>) + #################################### \end{verbatim} This should go directly below -- GitLab From 7eab3f527b800937b1982db7a0511bc3eef7e368 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 13 May 2019 10:44:12 +0200 Subject: [PATCH 348/376] [release] Prepare Changelog --- Changelog | 4 ++++ src/plugins/wp/Changelog | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Changelog b/Changelog index 5dab589c8ce..26dbf0b46f1 100644 --- a/Changelog +++ b/Changelog @@ -17,6 +17,10 @@ Open Source Release <next-release> ################################## +#################################### +Open Source Release 19.0 (Potassium) +#################################### + -* Kernel [2019/04/09] Avoid crashing on one-letter attributes. Fixes #2432 -* Obfuscator [2019/04/09] Also obfuscate formals in function pointer types. Fixes #2433. diff --git a/src/plugins/wp/Changelog b/src/plugins/wp/Changelog index 611e7dd2923..92f35014294 100644 --- a/src/plugins/wp/Changelog +++ b/src/plugins/wp/Changelog @@ -20,6 +20,10 @@ # <Prover>: prover ############################################################################### +########################## +Plugin WP 19.0 (Potassium) +########################## + - Wp [2019/05/09] Fixes -wp-simplify-is-cint simplifier - Wp [2019/04/26] Now requires -warn-invalid-bool - Wp [2019/04/26] Removed option -wp-bool-range -- GitLab From 7421dd3a22988cf267514195365c697b3bca486f Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 13 May 2019 10:44:28 +0200 Subject: [PATCH 349/376] [release] Version number --- VERSION | 2 +- VERSION_CODENAME | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 3a48ff126f4..9da32aa38d2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -18.0+dev \ No newline at end of file +19.0+beta \ No newline at end of file diff --git a/VERSION_CODENAME b/VERSION_CODENAME index fadca8279f3..8d95dee9720 100644 --- a/VERSION_CODENAME +++ b/VERSION_CODENAME @@ -1 +1 @@ -Argon \ No newline at end of file +Potassium \ No newline at end of file -- GitLab From a872b22fea664282ba9931cca97becd245cb93d5 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 13 May 2019 10:46:54 +0200 Subject: [PATCH 350/376] [release] update install instructions --- INSTALL.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 1aee10e1768..773af78a0c0 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -78,13 +78,13 @@ so that we can add it to the Frama-C `depext` package. ### Known working configuration The following set of packages is known to be a working configuration for -Frama-C 18 (Argon): +Frama-C 19 (Potassium): - OCaml 4.05.0 - alt-ergo-free.2.0.0 (optional) - apron.20160125 (optional) - coq.8.9.0 (optional) -- lablgtk.2.18.5 +- lablgtk.2.18.5 | lablgtk3.3.0.beta5 + lablgtk3-sourceview3.3.0.beta5 - mlgmpidl.1.2.7 (optional) - ocamlgraph.1.8.8 - why3.1.2.0 (optional) @@ -206,7 +206,7 @@ Debian/Ubuntu: `apt-get install frama-c` Fedora: `dnf install frama-c` -Arch Linux: `yaourt -S frama-c` +Arch Linux: `pikaur -S frama-c` ## Compiling from source @@ -219,7 +219,7 @@ Arch Linux: `yaourt -S frama-c` Note that OCaml >= 4.02.3 is needed in order to compile Frama-C. 2. (Optional) For the GUI, also install Gtk, GtkSourceView, GnomeCanvas and - Lablgtk2 if not already installed. + Lablgtk2 or Lablgtk3 + Lablgtksourceview3 if not already installed. See section 'REQUIREMENTS' below for indications on the names of the packages to install, or use 'opam depext' as explained in section 'Opam' above. @@ -254,9 +254,9 @@ Arch Linux: `yaourt -S frama-c` The Frama-C GUI also requires: - Gtk (>= 2.4) -- GtkSourceView 2.x -- GnomeCanvas 2.x -- LablGtk >= 2.18.5 +- GtkSourceView 2.x or 3.x (compatible with your Gtk version) +- GnomeCanvas 2.x (only for Gtk 2.x) +- LablGtk >= 2.18.5 or Lablgtk3 >= beta5 + corresponding Lablgtksourceview3 Plugins may have their own requirements. Consult their specific documentations for details. -- GitLab From 6648b21c7685051db993587b323bd31dfa6b9b68 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 13 May 2019 10:47:11 +0200 Subject: [PATCH 351/376] [release] update authors + opam version number --- opam/opam | 6 ++++-- src/plugins/gui/help_manager.ml | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/opam/opam b/opam/opam index bda948e9199..6d397bf21e3 100644 --- a/opam/opam +++ b/opam/opam @@ -1,7 +1,7 @@ opam-version: "2.0" name: "frama-c" synopsis: "Platform dedicated to the analysis of source code written in C" -version: "18.0" +version: "19.0.beta1" maintainer: "francois.bobot@cea.fr" authors: [ "Michele Alberti" @@ -28,6 +28,7 @@ authors: [ "David Maison" "Claude Marché" "André Maroneze" + "Thibault Martin" "Melody Méaulle" "Benjamin Monate" "Yannick Moy" @@ -36,6 +37,7 @@ authors: [ "Guillaume Petiot" "Virgile Prevosto" "Armand Puccetti" + "Virgile Robles" "Muriel Roger" "Julien Signoles" "Kostyantyn Vorobyov" @@ -44,7 +46,7 @@ authors: [ homepage: "http://frama-c.com/" license: "GNU Lesser General Public License version 2.1" dev-repo: "git+https://github.com/Frama-C/Frama-C-snapshot.git#latest" -doc: "http://frama-c.com/download/user-manual-18.0-Argon.pdf" +doc: "http://frama-c.com/download/user-manual-19.0-Potassium.pdf" bug-reports: "https://bts.frama-c.com/" tags: [ "deductive" diff --git a/src/plugins/gui/help_manager.ml b/src/plugins/gui/help_manager.ml index 055d3b33c18..9c7a1deca88 100644 --- a/src/plugins/gui/help_manager.ml +++ b/src/plugins/gui/help_manager.ml @@ -46,6 +46,7 @@ let show main_ui = "David Maison"; "Claude Marché"; "André Maroneze"; + "Thibault Martin"; "Melody Méaulle"; "Benjamin Monate"; "Yannick Moy"; @@ -54,6 +55,7 @@ let show main_ui = "Guillaume Petiot"; "Virgile Prevosto"; "Armand Puccetti"; + "Virgile Robles"; "Muriel Roger"; "Julien Signoles"; "Kostyantyn Vorobyov"; -- GitLab From fef401ec46562f30f5884231c2b0e1e0c5a20792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 13 May 2019 11:26:33 +0200 Subject: [PATCH 352/376] Retroactively updates the Changelog with major Eva changes for Potassium. --- Changelog | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Changelog b/Changelog index 26dbf0b46f1..500b14a66b3 100644 --- a/Changelog +++ b/Changelog @@ -21,9 +21,28 @@ Open Source Release <next-release> Open Source Release 19.0 (Potassium) #################################### +- Eva [2019/04/19] The new annotation /*@ split exp; */ enumerates the + possible values of an expression and continues the analysis + for each of these value separately, until a /*@ merge exp; */ + is encountered. It is also possible to maintain this partitioning + at all times with the option -eva-partition-value exp. +- Eva [2019/04/19] New option -eva-partition-history N to delay the join + of abstract states for up to N merging points, thus keeping these + states separate longer. Useful when a reasoning depends on the + path taken to reach a control point, but can increase the analysis + time exponentially in N. +- Eva [2019/04/19] Loop unroll annotations now accept non-constant but + bounded expressions as the maximum number of unrollings to perform. -* Kernel [2019/04/09] Avoid crashing on one-letter attributes. Fixes #2432 -* Obfuscator [2019/04/09] Also obfuscate formals in function pointer types. Fixes #2433. +- Eva [2019/04/05] Prints an analysis summary at the end, outlining the + analysis coverage and the number of errors, warnings and emitted + alarms. It can be disabled with the option -eva-msg-key=-summary +- Eva [2019/04/03] New option -eva-precision to globally configure the + analysis from 0 (fast but imprecise) to 11 (accurate but slow). + A precision of 5 is often a reasonable trade-off. This meta-option + automatically sets up other options that can also be overriden. - Inout [2019/04/01] Fix performance issue when initializing large arrays. - ACSL [2019/03/08] Add check annotation, similar to assert except that it does not introduce additional hypotheses on the program state -- GitLab From 8da29bd5e759328bf01640fe4b1ace8298854d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 13 May 2019 15:43:21 +0200 Subject: [PATCH 353/376] Updates the known working configuration. --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 773af78a0c0..d7c390f5c97 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -85,7 +85,7 @@ Frama-C 19 (Potassium): - apron.20160125 (optional) - coq.8.9.0 (optional) - lablgtk.2.18.5 | lablgtk3.3.0.beta5 + lablgtk3-sourceview3.3.0.beta5 -- mlgmpidl.1.2.7 (optional) +- mlgmpidl.1.2.9 (optional) - ocamlgraph.1.8.8 - why3.1.2.0 (optional) - why3-coq.1.2.0 (optional) -- GitLab From 03865a1e67f57d7b414eed9902fbf3bb7de5bcde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 13 May 2019 15:43:52 +0200 Subject: [PATCH 354/376] [Eva] Updates alternative test oracles. --- tests/builtins/diff_bitwise | 57 +++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/tests/builtins/diff_bitwise b/tests/builtins/diff_bitwise index b20a057439a..3fcbca67573 100644 --- a/tests/builtins/diff_bitwise +++ b/tests/builtins/diff_bitwise @@ -13,29 +13,30 @@ diff tests/builtins/oracle/allocated.0.res.oracle tests/builtins/oracle_bitwise/ > [eva:malloc] tests/builtins/allocated.c:127: > resizing variable `__malloc_main_l127' (0..31/319) to fit 0..63/319 diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_bitwise/allocated.1.res.oracle -191a192,197 +191a192,194 > [eva] tests/builtins/allocated.c:82: > Call to builtin Frama_C_malloc_fresh for function malloc > [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_7 -> [eva] tests/builtins/allocated.c:87: Call to builtin free -> [eva:malloc] tests/builtins/allocated.c:87: -> strong free on bases: {__malloc_main_l82_7} -208a215,217 +208a212,214 > strong free on bases: {__malloc_main_l82_7} > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: -223a233,235 +223a230,232 > strong free on bases: {__malloc_main_l82_7} > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: -238a251,253 +238a248,250 > strong free on bases: {__malloc_main_l82_7} > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: -254,256d268 -< [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_7 +252,254c264,266 < [eva] tests/builtins/allocated.c:82: < Call to builtin Frama_C_malloc_fresh for function malloc +< [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_7 +--- +> [eva] tests/builtins/allocated.c:87: Call to builtin free +> [eva:malloc] tests/builtins/allocated.c:87: +> strong free on bases: {__malloc_main_l82_7} 323a336,356 > [eva] tests/builtins/allocated.c:82: > Call to builtin Frama_C_malloc_fresh for function malloc @@ -58,9 +59,10 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_bitwise/ > [eva] tests/builtins/allocated.c:82: > Call to builtin Frama_C_malloc_fresh for function malloc > [eva] tests/builtins/allocated.c:82: allocating variable __malloc_main_l82_37 -326d358 -< [eva] Semantic level unrolling superposing up to 300 states -329a362,382 +329,330d361 +< Trace partitioning superposing up to 300 states +< [eva] tests/builtins/allocated.c:84: +333a365,385 > strong free on bases: {__malloc_main_l82_37} > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: @@ -82,7 +84,7 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_bitwise/ > strong free on bases: {__malloc_main_l82_31} > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: -399c452,470 +403c455,473 < strong free on bases: {__malloc_main_l82_7} --- > strong free on bases: {__malloc_main_l82_37} @@ -104,7 +106,7 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_bitwise/ > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: > strong free on bases: {__malloc_main_l82_31} -471c542,560 +475c545,563 < strong free on bases: {__malloc_main_l82_7} --- > strong free on bases: {__malloc_main_l82_37} @@ -126,7 +128,7 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_bitwise/ > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: > strong free on bases: {__malloc_main_l82_31} -543c632,650 +547c635,653 < strong free on bases: {__malloc_main_l82_7} --- > strong free on bases: {__malloc_main_l82_37} @@ -148,7 +150,7 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_bitwise/ > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: > strong free on bases: {__malloc_main_l82_31} -615c722,740 +619c725,743 < strong free on bases: {__malloc_main_l82_7} --- > strong free on bases: {__malloc_main_l82_37} @@ -170,7 +172,7 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_bitwise/ > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: > strong free on bases: {__malloc_main_l82_31} -687c812,830 +691c815,833 < strong free on bases: {__malloc_main_l82_7} --- > strong free on bases: {__malloc_main_l82_37} @@ -192,7 +194,7 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_bitwise/ > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: > strong free on bases: {__malloc_main_l82_31} -759c902,920 +763c905,923 < strong free on bases: {__malloc_main_l82_7} --- > strong free on bases: {__malloc_main_l82_37} @@ -214,7 +216,7 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_bitwise/ > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: > strong free on bases: {__malloc_main_l82_31} -831c992,1010 +835c995,1013 < strong free on bases: {__malloc_main_l82_7} --- > strong free on bases: {__malloc_main_l82_37} @@ -236,20 +238,21 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_bitwise/ > [eva] tests/builtins/allocated.c:87: Call to builtin free > [eva:malloc] tests/builtins/allocated.c:87: > strong free on bases: {__malloc_main_l82_31} -901,903c1080 +905,907c1083,1084 < [eva] tests/builtins/allocated.c:87: Call to builtin free < [eva:malloc] tests/builtins/allocated.c:87: < strong free on bases: {__malloc_main_l82_7} --- -> [eva] Semantic level unrolling superposing up to 500 states -1065,1067c1242,1243 +> [eva] tests/builtins/allocated.c:81: +> Trace partitioning superposing up to 500 states +1069,1071c1246,1247 < __malloc_main_l82_7[0] ∈ {21} or UNINITIALIZED < [1] ∈ {24} or UNINITIALIZED < [2] ∈ {27} or UNINITIALIZED --- > __malloc_main_l82_7[0] ∈ {14} or UNINITIALIZED > [1] ∈ {17} or UNINITIALIZED -1136a1313,1333 +1140a1317,1337 > __malloc_main_l82_31[0] ∈ {21} or UNINITIALIZED > [1] ∈ {24} or UNINITIALIZED > [2] ∈ {27} or UNINITIALIZED @@ -271,11 +274,11 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_bitwise/ > __malloc_main_l82_37[0] ∈ {21} or UNINITIALIZED > [1] ∈ {24} or UNINITIALIZED > [2] ∈ {27} or UNINITIALIZED -1180c1377 +1184c1381 < __malloc_main_l82_7[0..2] FROM __fc_heap_status; nondet (and SELF) --- > __malloc_main_l82_7[0..1] FROM __fc_heap_status; nondet (and SELF) -1203a1401,1407 +1207a1405,1411 > __malloc_main_l82_31[0..2] FROM __fc_heap_status; nondet (and SELF) > __malloc_main_l82_32[0..2] FROM __fc_heap_status; nondet (and SELF) > __malloc_main_l82_33[0..2] FROM __fc_heap_status; nondet (and SELF) @@ -283,11 +286,11 @@ diff tests/builtins/oracle/allocated.1.res.oracle tests/builtins/oracle_bitwise/ > __malloc_main_l82_35[0..2] FROM __fc_heap_status; nondet (and SELF) > __malloc_main_l82_36[0..2] FROM __fc_heap_status; nondet (and SELF) > __malloc_main_l82_37[0..2] FROM __fc_heap_status; nondet (and SELF) -1227c1431 +1231c1435 < __malloc_main_l82_6[0..1]; __malloc_main_l82_7[0..2]; --- > __malloc_main_l82_6[0..1]; __malloc_main_l82_7[0..1]; -1239,1240c1443,1448 +1243,1244c1447,1452 < __malloc_main_l82_30[0..2]; __malloc_main_l97[0]; __malloc_main_l114[0..3]; < __malloc_main_l127; __malloc_main_l127_0[0..1]; __malloc_main_l127_1[0..2]; --- -- GitLab From 907a18f2008e1fa66761bbdbd09ceeb1bdfeac23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Mon, 13 May 2019 18:17:12 +0200 Subject: [PATCH 355/376] Fixes the potassium beta version. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 9da32aa38d2..8f08de2f1dc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -19.0+beta \ No newline at end of file +19.0-beta \ No newline at end of file -- GitLab From 0297bb18f7d524eca548e6cacb40a4f2433e91cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 15 May 2019 15:03:33 +0200 Subject: [PATCH 356/376] [wp] fix expl string for why3 output --- src/plugins/wp/ProverWhy3.ml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/plugins/wp/ProverWhy3.ml b/src/plugins/wp/ProverWhy3.ml index 38e73ded32b..61230201355 100644 --- a/src/plugins/wp/ProverWhy3.ml +++ b/src/plugins/wp/ProverWhy3.ml @@ -323,6 +323,13 @@ end (* --- Assembling Goal --- *) (* -------------------------------------------------------------------------- *) +let sanitize_expl fmt title = + for i = 0 to String.length title - 1 do + match title.[i] with + | '\n' | '\t' -> Format.pp_print_char fmt ' ' + | c -> Format.pp_print_char fmt c + done + let assemble_goal ~id ~title ~theory ?axioms prop fmt = (** Also create the directory *) let goal = cluster ~id ~title () in @@ -348,9 +355,9 @@ let assemble_goal ~id ~title ~theory ?axioms prop fmt = engine#set_goal true ; engine#global begin fun () -> - v#printf "@[<hv 2>goal %s[@expl:%s]:@ %a@]@\n@\n" + v#printf "@[<hv 2>goal %s[@expl:%a]:@ %a@]@\n@\n" why3_goal_name - title + sanitize_expl title engine#pp_prop (F.e_prop prop) ; end ; engine#set_goal false ; -- GitLab From 4cdac7336e630c4da7ce3d9682314d7e81c3891d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 15 May 2019 15:25:57 +0200 Subject: [PATCH 357/376] [wp] recompute why3.conf when --prefix is changed --- src/plugins/wp/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/wp/Makefile.in b/src/plugins/wp/Makefile.in index e746e10b600..ee487300916 100644 --- a/src/plugins/wp/Makefile.in +++ b/src/plugins/wp/Makefile.in @@ -317,7 +317,7 @@ endif byte:: $(Wp_DIR)/share/why3/why3.conf opt:: $(Wp_DIR)/share/why3/why3.conf -$(Wp_DIR)/share/why3/why3.conf: +$(Wp_DIR)/share/why3/why3.conf: config.status $(Wp_DIR)/Makefile.in @echo Generation of the extra-config for why3 @printf "[prover_modifiers]\n" >> $@ @printf "name=\"Coq\"\n" >> $@ -- GitLab From c6a62339bf97c44cbeecb3abcca5a065462d569c Mon Sep 17 00:00:00 2001 From: Thibault Martin <thibault.martin@cea.fr> Date: Thu, 18 Apr 2019 19:52:27 +0200 Subject: [PATCH 358/376] [Kernel] reject named and invalid void parameters - a named void parameter is considered an error; - a void parameter (other than by itself) is considered an error --- src/kernel_internals/typing/cabs2cil.ml | 9 +++++++++ tests/syntax/oracle/void_parameter.res.oracle | 19 +++++++++++++++++++ tests/syntax/void_parameter.i | 16 ++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 tests/syntax/oracle/void_parameter.res.oracle create mode 100644 tests/syntax/void_parameter.i diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index 7f5b53a7cd8..a1b92d74b0f 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -4993,11 +4993,20 @@ and doType (ghost:bool) isFuncArg (args', !newisva) end else (args, isva) in + let argl_length = List.length args' in (* Make the argument as for a formal *) let doOneArg (s, (n, ndt, a, cloc)) : varinfo = let s' = doSpecList ghost n s in let vi = makeVarInfoCabs ~ghost ~isformal:true ~isglobal:false (convLoc cloc) s' (n,ndt,a) in + if isVoidType vi.vtype then begin + if argl_length > 1 then + Kernel.error ~once:true ~current:true + "'void' must be the only parameter if specified"; + if vi.vname <> "" then + Kernel.error ~once:true ~current:true + "named parameter '%s' has void type" vi.vname + end; (* Add the formal to the environment, so it can be referenced by other formals (e.g. in an array type, although that will be changed to a pointer later, or though typeof). *) diff --git a/tests/syntax/oracle/void_parameter.res.oracle b/tests/syntax/oracle/void_parameter.res.oracle new file mode 100644 index 00000000000..651f5588fe9 --- /dev/null +++ b/tests/syntax/oracle/void_parameter.res.oracle @@ -0,0 +1,19 @@ +[kernel] Parsing tests/syntax/void_parameter.i (no preprocessing) +[kernel] tests/syntax/void_parameter.i:7: User Error: + named parameter 'parameter' has void type +[kernel] tests/syntax/void_parameter.i:8: User Error: + 'void' must be the only parameter if specified +[kernel] tests/syntax/void_parameter.i:9: User Error: + 'void' must be the only parameter if specified +[kernel] tests/syntax/void_parameter.i:9: User Error: + named parameter 'parameter' has void type +[kernel] tests/syntax/void_parameter.i:13: User Error: + named parameter 'parameter' has void type +[kernel] tests/syntax/void_parameter.i:14: User Error: + 'void' must be the only parameter if specified +[kernel] tests/syntax/void_parameter.i:15: User Error: + 'void' must be the only parameter if specified +[kernel] tests/syntax/void_parameter.i:15: User Error: + named parameter 'parameter' has void type +[kernel] User Error: stopping on file "tests/syntax/void_parameter.i" that has errors. +[kernel] Frama-C aborted: invalid user input. diff --git a/tests/syntax/void_parameter.i b/tests/syntax/void_parameter.i new file mode 100644 index 00000000000..f4a14535232 --- /dev/null +++ b/tests/syntax/void_parameter.i @@ -0,0 +1,16 @@ +/* run.config + +*/ + +// GCC warning, Clang/CompCert error +void f1(void); +void f2(void parameter); +void f3(void, int x); +void f4(void parameter, int x); + +// GCC/Clang/CompCert error +void f1(void){} +void f2(void parameter){} +void f3(void, int x){} +void f4(void parameter, int x){} + -- GitLab From 90f5dc58a45745965ad96fa8abd246687c0e43e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 17 May 2019 14:39:12 +0200 Subject: [PATCH 359/376] [rte] Do not visit variable declarations; fixes a crash. --- src/plugins/rte/visit.ml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/rte/visit.ml b/src/plugins/rte/visit.ml index 664c6cce892..f75e2ce715c 100644 --- a/src/plugins/rte/visit.ml +++ b/src/plugins/rte/visit.ml @@ -112,6 +112,11 @@ class annot_visitor kf flags on_alarm = object (self) let on_alarm ~invalid a = on_alarm stmt ~invalid a in fgen ~remove_trivial:flags.Flags.remove_trivial ~on_alarm + (* Do not visit variable declarations, as no alarm should be emitted here, + and there is no statement to emit an alarm anyway ([generate_assertion] + or [Alarms.register] would then crash). *) + method !vvdec _ = Cil.SkipChildren + method! vstmt s = match s.skind with | UnspecifiedSequence l -> (* UnspecifiedSequences may contain lvals for side-effects, that -- GitLab From 16031ca05135dfd986d20e69e668489565782f88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Fri, 17 May 2019 16:12:23 +0200 Subject: [PATCH 360/376] [rte] security belt on current-stmt --- src/plugins/rte/visit.ml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plugins/rte/visit.ml b/src/plugins/rte/visit.ml index f75e2ce715c..a5e8ad38578 100644 --- a/src/plugins/rte/visit.ml +++ b/src/plugins/rte/visit.ml @@ -108,8 +108,14 @@ class annot_visitor kf flags on_alarm = object (self) method private generate_assertion: 'a. 'a Rte.alarm_gen -> 'a -> unit = fun fgen -> - let stmt = Extlib.the (self#current_stmt) in - let on_alarm ~invalid a = on_alarm stmt ~invalid a in + let curr_stmt = self#current_stmt in + let on_alarm ~invalid a = + match curr_stmt with + | None -> Options.warning ~current:true + "Alarm generated outside any statement:@ %a" + Alarms.pretty a + | Some stmt -> on_alarm stmt ~invalid a + in fgen ~remove_trivial:flags.Flags.remove_trivial ~on_alarm (* Do not visit variable declarations, as no alarm should be emitted here, -- GitLab From fa03ea4ab9d0ab5569cb9bafc646ad0500755485 Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Wed, 22 May 2019 09:58:59 +0200 Subject: [PATCH 361/376] [Makefile] ensure directory lib/plugins exists for META files --- share/Makefile.plugin.template | 1 + 1 file changed, 1 insertion(+) diff --git a/share/Makefile.plugin.template b/share/Makefile.plugin.template index df7931022fe..d9be7dfb479 100644 --- a/share/Makefile.plugin.template +++ b/share/Makefile.plugin.template @@ -523,6 +523,7 @@ endif # FRAMAC_INTERNAL $(TARGET_META): $(PRINT_MAKING) $(notdir $@) $(RM) $@ + $(MKDIR) $(dir $@) $(ECHO) "description = \"$($(notdir $@).DESCRIPTION)\"" >> $@ $(ECHO) "version = \"$($(notdir $@).VERSION)\"" >> $@ $(ECHO) "requires = \"frama-c.kernel $($(notdir $@).REQUIRES)\"" >> $@ -- GitLab From 68e7678dbab253a5c9be9181427f2aef7afd1861 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 23 May 2019 18:20:36 +0200 Subject: [PATCH 362/376] [tests] add test for RTE issue mentioned in MR !2261 --- tests/rte/array_index.c | 3 +++ tests/rte/oracle/array_index.0.res.oracle | 4 ++++ tests/rte/oracle/array_index.1.res.oracle | 2 ++ 3 files changed, 9 insertions(+) diff --git a/tests/rte/array_index.c b/tests/rte/array_index.c index 85c8c6bd1dd..b976e42cce8 100644 --- a/tests/rte/array_index.c +++ b/tests/rte/array_index.c @@ -44,4 +44,7 @@ void main(int i, int j, unsigned int k) { s.t[k] = 0; s.s.u[k] = 0; s.v[k].t[c[k]] = 0; + + int x; + int t[100 / sizeof(x)]; } diff --git a/tests/rte/oracle/array_index.0.res.oracle b/tests/rte/oracle/array_index.0.res.oracle index 6acdd373586..5c3fb974325 100644 --- a/tests/rte/oracle/array_index.0.res.oracle +++ b/tests/rte/oracle/array_index.0.res.oracle @@ -20,6 +20,8 @@ ts s; unsigned int c[10]; void main(int i, int j, unsigned int k) { + int x; + int t_0[(unsigned int)100 / sizeof(x)]; t[0] = 0; u[1] = 0; v[2][3] = 0; @@ -89,6 +91,8 @@ ts s; unsigned int c[10]; void main(int i, int j, unsigned int k) { + int x; + int t_0[(unsigned int)100 / sizeof(x)]; /*@ assert rte: index_bound: 0 ≤ 0; */ /*@ assert rte: index_bound: 0 < 10; */ t[0] = 0; diff --git a/tests/rte/oracle/array_index.1.res.oracle b/tests/rte/oracle/array_index.1.res.oracle index 31cf7a921b3..79017aa000b 100644 --- a/tests/rte/oracle/array_index.1.res.oracle +++ b/tests/rte/oracle/array_index.1.res.oracle @@ -20,6 +20,8 @@ ts s; unsigned int c[10]; void main(int i, int j, unsigned int k) { + int x; + int t_0[(unsigned int)100 / sizeof(x)]; t[0] = 0; u[1] = 0; v[2][3] = 0; -- GitLab From 76c684f26a119d3aba3f7a8889ad4491ecd9c21c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Wed, 15 May 2019 15:25:57 +0200 Subject: [PATCH 363/376] [wp] recompute why3.conf when --prefix is changed --- src/plugins/wp/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/wp/Makefile.in b/src/plugins/wp/Makefile.in index e746e10b600..ee487300916 100644 --- a/src/plugins/wp/Makefile.in +++ b/src/plugins/wp/Makefile.in @@ -317,7 +317,7 @@ endif byte:: $(Wp_DIR)/share/why3/why3.conf opt:: $(Wp_DIR)/share/why3/why3.conf -$(Wp_DIR)/share/why3/why3.conf: +$(Wp_DIR)/share/why3/why3.conf: config.status $(Wp_DIR)/Makefile.in @echo Generation of the extra-config for why3 @printf "[prover_modifiers]\n" >> $@ @printf "name=\"Coq\"\n" >> $@ -- GitLab From 06d805e314e9691588f0182498a78b3bc0964bb9 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 23 May 2019 19:31:12 +0200 Subject: [PATCH 364/376] [wp] don't forget to forcibly rm a read-only file before re-generating it Also use FC's Makefile standard variables whenever possible --- src/plugins/wp/Makefile.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/wp/Makefile.in b/src/plugins/wp/Makefile.in index ee487300916..ba1717b81d5 100644 --- a/src/plugins/wp/Makefile.in +++ b/src/plugins/wp/Makefile.in @@ -318,7 +318,8 @@ byte:: $(Wp_DIR)/share/why3/why3.conf opt:: $(Wp_DIR)/share/why3/why3.conf $(Wp_DIR)/share/why3/why3.conf: config.status $(Wp_DIR)/Makefile.in - @echo Generation of the extra-config for why3 + $(PRINT_MAKING) "extra-config for why3" + $(RM) $@ @printf "[prover_modifiers]\n" >> $@ @printf "name=\"Coq\"\n" >> $@ @printf "option=\"-Q $(FRAMAC_DATADIR)/wp/why3 ''\"\n" >> $@ @@ -329,7 +330,7 @@ $(Wp_DIR)/share/why3/why3.conf: config.status $(Wp_DIR)/Makefile.in @printf "\n" >> $@ @printf "[editor_modifiers proofgeneral-coq]\n" >> $@ @printf "option=\"--eval \\\\\"(setq coq-load-path (cons '(\\\\\\\\\\\\\"$(FRAMAC_DATADIR)/wp/why3\\\\\\\\\\\\\" \\\\\\\\\\\\\"\\\\\\\\\\\\\") coq-load-path))\\\\\"\"\n" >> $@ - @chmod u-w $@ + $(CHMOD_RO) $@ # -------------------------------------------------------------------------- # --- Installation --- -- GitLab From c9226d13986dde98d2b6724a8a0d91590e13045d Mon Sep 17 00:00:00 2001 From: Julien Signoles <julien.signoles@cea.fr> Date: Fri, 24 May 2019 09:31:28 +0200 Subject: [PATCH 365/376] changelog --- Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index 500b14a66b3..b26eccb84dc 100644 --- a/Changelog +++ b/Changelog @@ -21,6 +21,7 @@ Open Source Release <next-release> Open Source Release 19.0 (Potassium) #################################### +-* RTE [2019/05/24] fixes a crash when visiting variable declarations - Eva [2019/04/19] The new annotation /*@ split exp; */ enumerates the possible values of an expression and continues the analysis for each of these value separately, until a /*@ merge exp; */ -- GitLab From b094c4afa5093382720eaa659ecd1d3339fcdfd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Recoules?= <frederic.recoules@cea.fr> Date: Wed, 24 Apr 2019 15:58:02 +0200 Subject: [PATCH 366/376] [Kernel] Normalize asm templates by merging adjacent strings and splitting on newline character --- src/kernel_internals/parsing/cparser.mly | 4 +-- src/kernel_services/parsetree/cabshelper.ml | 34 ++++++++++++++++++++ src/kernel_services/parsetree/cabshelper.mli | 2 ++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/src/kernel_internals/parsing/cparser.mly b/src/kernel_internals/parsing/cparser.mly index 29da754e5d2..ed1934a750d 100644 --- a/src/kernel_internals/parsing/cparser.mly +++ b/src/kernel_internals/parsing/cparser.mly @@ -969,11 +969,11 @@ statement: } | ASM GOTO asmattr LPAREN asmtemplate asmoutputs RPAREN SEMICOLON { let loc = Cil_datatype.Location.of_lexing_loc (Parsing.symbol_start_pos (), Parsing.symbol_end_pos ()) in - no_ghost [ASM ($3, $5, $6, loc)] + no_ghost [ASM ($3, mk_asm_templates $5, $6, loc)] } | ASM asmattr LPAREN asmtemplate asmoutputs RPAREN SEMICOLON { let loc = Cil_datatype.Location.of_lexing_loc (Parsing.symbol_start_pos (), Parsing.symbol_end_pos ()) in - no_ghost [ASM ($2, $4, $5, loc)] + no_ghost [ASM ($2, mk_asm_templates $4, $5, loc)] } | MSASM { no_ghost [ASM ([], [fst $1], None, snd $1)]} | TRY block EXCEPT paren_comma_expression block { diff --git a/src/kernel_services/parsetree/cabshelper.ml b/src/kernel_services/parsetree/cabshelper.ml index 50d016622a4..73412c8d111 100644 --- a/src/kernel_services/parsetree/cabshelper.ml +++ b/src/kernel_services/parsetree/cabshelper.ml @@ -232,6 +232,40 @@ let mk_behavior ?(name=Cil.default_behavior_name) ?(assumes=[]) ?(requires=[]) b_extended = extended; } +let mk_asm_templates = + let buf = Buffer.create 100 in + let rec outer res = function + | [] when Buffer.length buf = 0 -> List.rev res + | [] -> + let res = List.rev @@ Buffer.contents buf :: res in + Buffer.clear buf; + res + | str :: tail -> tail |> outer @@ inner res str 0 + and inner res template i = + if i < String.length template then + let c = String.get template i in + Buffer.add_char buf c; + if c = '\n' then + if i < String.length template - 1 then + match String.get template @@ i + 1 with + | '\t' -> + Buffer.add_char buf '\t'; + let res = Buffer.contents buf :: res in + Buffer.clear buf; + inner res template @@ i + 2 + | c -> + let res = Buffer.contents buf :: res in + Buffer.clear buf; + Buffer.add_char buf c; + inner res template @@ i + 2 + else + let res = Buffer.contents buf :: res in + Buffer.clear buf; + res + else inner res template @@ i + 1 + else res in + outer [] + (* Local Variables: diff --git a/src/kernel_services/parsetree/cabshelper.mli b/src/kernel_services/parsetree/cabshelper.mli index 13a295600e7..a4b0498146e 100644 --- a/src/kernel_services/parsetree/cabshelper.mli +++ b/src/kernel_services/parsetree/cabshelper.mli @@ -87,3 +87,5 @@ val mk_behavior : ?extended:Logic_ptree.extension list -> unit -> Logic_ptree.behavior + +val mk_asm_templates : string list -> string list -- GitLab From 5a83962793a07778b3c25f4aafbf9d92debf2e5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Recoules?= <frederic.recoules@cea.fr> Date: Thu, 2 May 2019 11:26:07 +0200 Subject: [PATCH 367/376] [fix] no more empty list when empty template --- src/kernel_services/parsetree/cabshelper.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/kernel_services/parsetree/cabshelper.ml b/src/kernel_services/parsetree/cabshelper.ml index 73412c8d111..98bfca99fad 100644 --- a/src/kernel_services/parsetree/cabshelper.ml +++ b/src/kernel_services/parsetree/cabshelper.ml @@ -235,6 +235,7 @@ let mk_behavior ?(name=Cil.default_behavior_name) ?(assumes=[]) ?(requires=[]) let mk_asm_templates = let buf = Buffer.create 100 in let rec outer res = function + | [] when res = [] && Buffer.length buf = 0 -> [""] | [] when Buffer.length buf = 0 -> List.rev res | [] -> let res = List.rev @@ Buffer.contents buf :: res in -- GitLab From 5850c35093a1ab0d17a70ad16b2eb68ecd877864 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Mon, 27 May 2019 16:05:37 +0200 Subject: [PATCH 368/376] Add test for new feature --- tests/syntax/asm_goto.i | 5 +++++ tests/syntax/oracle/asm_goto.res.oracle | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/tests/syntax/asm_goto.i b/tests/syntax/asm_goto.i index 42466a787d9..3f6ed9ea53f 100644 --- a/tests/syntax/asm_goto.i +++ b/tests/syntax/asm_goto.i @@ -7,6 +7,11 @@ void basic(void) __asm__ ("xor %eax, %eax\n\t"); } +void pretty(void) +{ +__asm__ volatile ("pxor %%""mm7"", %%""mm7""\n\tpcmpeqd %%""mm6"", %%""mm6" : ); +} + int main(unsigned short bit) { asm goto ("1: jmp %l[t_no]\n" diff --git a/tests/syntax/oracle/asm_goto.res.oracle b/tests/syntax/oracle/asm_goto.res.oracle index d54b25a180c..5f2c4f964e5 100644 --- a/tests/syntax/oracle/asm_goto.res.oracle +++ b/tests/syntax/oracle/asm_goto.res.oracle @@ -6,6 +6,14 @@ void basic(void) return; } +void pretty(void) +{ + /*@ assigns \nothing; */ + __asm__ volatile ("pxor %%mm7, %%mm7\n\t" + "pcmpeqd %%mm6, %%mm6" : ); + return; +} + int main(unsigned short bit) { int __retres; -- GitLab From 416b2edc67e32efc614a2f33bac74d80ec286b2c Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Wed, 5 Jun 2019 10:38:23 +0200 Subject: [PATCH 369/376] [logic-preprocess] take literal backslash (`\\`) into account in ACSL strings Fixes mantis-2307 --- .../parsing/logic_preprocess.mll | 3 ++ tests/spec/oracle/preprocess.res.oracle | 32 +++++++++++++++++++ tests/spec/preprocess.c | 5 ++- 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/kernel_internals/parsing/logic_preprocess.mll b/src/kernel_internals/parsing/logic_preprocess.mll index 91018631d2e..fa62499bcec 100644 --- a/src/kernel_internals/parsing/logic_preprocess.mll +++ b/src/kernel_internals/parsing/logic_preprocess.mll @@ -434,6 +434,9 @@ and string annot = parse | "\\\"" { is_newline:=CHAR; Buffer.add_string preprocess_buffer "\\\""; string annot lexbuf } + | "\\\\" { is_newline:=CHAR; + Buffer.add_string preprocess_buffer "\\\\"; + string annot lexbuf } | eof { abort_preprocess "eof while parsing a string literal" } | _ as c { is_newline:=CHAR; Buffer.add_char preprocess_buffer c; diff --git a/tests/spec/oracle/preprocess.res.oracle b/tests/spec/oracle/preprocess.res.oracle index 87f4ad15feb..e1244f0f338 100644 --- a/tests/spec/oracle/preprocess.res.oracle +++ b/tests/spec/oracle/preprocess.res.oracle @@ -13,6 +13,10 @@ [eva] Recording results for f [eva] Done for function f [eva] tests/spec/preprocess.c:25: assertion got status valid. +[eva] tests/spec/preprocess.c:28: + cannot evaluate ACSL term, unsupported ACSL construct: constant strings +[eva:alarm] tests/spec/preprocess.c:28: Warning: + assertion 'backslash_string' got status unknown. [eva] Recording results for main [eva] done for function main [eva] ====== VALUES COMPUTED ====== @@ -21,3 +25,31 @@ [eva:final-states] Values at end of function main: y_0 ∈ {84} __retres ∈ {0} +/* Generated by Frama-C */ +int x = 1; +/*@ predicate test(int x) = x ≥ 42; + */ +int y = 1; +/*@ requires x_0 ≥ 42; + + behavior default: + ensures test(\result) ∧ 2 ≡ 2; + */ +int f(int x_0) +{ + int __retres; + __retres = x_0 + 42; + return __retres; +} + +int main(void) +{ + int __retres; + int y_0 = f(42); + /*@ assert x ≡ 1; */ ; + /*@ assert backslash_string: *("\\" + 0) ≡ '\\'; */ ; + __retres = 0; + return __retres; +} + + diff --git a/tests/spec/preprocess.c b/tests/spec/preprocess.c index f22fa57e73e..64b0e62aeec 100644 --- a/tests/spec/preprocess.c +++ b/tests/spec/preprocess.c @@ -1,5 +1,5 @@ /* run.config - OPT: -pp-annot -eva @EVA_CONFIG@ -journal-disable + OPT: -eva @EVA_CONFIG@ -journal-disable -print */ // see bts 1357 @@ -23,5 +23,8 @@ int f(int x) { return (x + MIN_X); } int main() { int y = f(MIN_X); //@ assert (x) == 1; + + // BTS 2307 + /*@ assert backslash_string: "\\"[0] == '\\'; */ return 0; } -- GitLab From 3e84a7e08ac403059f3ba65db70bf1103e2ac46c Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Wed, 5 Jun 2019 09:55:48 +0200 Subject: [PATCH 370/376] [Kernel] fix typos in message --- src/kernel_internals/typing/asm_contracts.ml | 4 ++-- tests/syntax/oracle/gnu-asm-aesni.res.oracle | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kernel_internals/typing/asm_contracts.ml b/src/kernel_internals/typing/asm_contracts.ml index 3bf647bcaa4..74ea3ab799e 100644 --- a/src/kernel_internals/typing/asm_contracts.ml +++ b/src/kernel_internals/typing/asm_contracts.ml @@ -138,8 +138,8 @@ object(self) let once = true in Kernel.warning ~once ~source - "Clobber list contain \"memory\" argument. Assuming no \ - side-effect beyond those mentioned in operands." + "Clobber list contains \"memory\" argument. Assuming no \ + side effects beyond those mentioned in operands." end; let to_id_term lv = Logic_const.new_identified_term diff --git a/tests/syntax/oracle/gnu-asm-aesni.res.oracle b/tests/syntax/oracle/gnu-asm-aesni.res.oracle index f5375b6410b..009db9d96ab 100644 --- a/tests/syntax/oracle/gnu-asm-aesni.res.oracle +++ b/tests/syntax/oracle/gnu-asm-aesni.res.oracle @@ -1,6 +1,6 @@ [kernel] Parsing tests/syntax/gnu-asm-aesni.c (with preprocessing) [kernel] tests/syntax/gnu-asm-aesni.c:93: Warning: - Clobber list contain "memory" argument. Assuming no side-effect beyond those mentioned in operands. + Clobber list contains "memory" argument. Assuming no side effects beyond those mentioned in operands. /* Generated by Frama-C */ #include "__fc_builtin.h" #include "string.h" -- GitLab From 052cd89d7a6cc87a3a9627166257ebaf6849a712 Mon Sep 17 00:00:00 2001 From: Dara LY <dara.ly@cea.fr> Date: Thu, 18 Apr 2019 16:19:25 +0200 Subject: [PATCH 371/376] implement structural comparison for logic_info --- .../ast_queries/cil_datatype.ml | 48 +++++++++++++++++++ .../ast_queries/cil_datatype.mli | 1 + 2 files changed, 49 insertions(+) diff --git a/src/kernel_services/ast_queries/cil_datatype.ml b/src/kernel_services/ast_queries/cil_datatype.ml index f0b07d285ac..30ed9edaa84 100644 --- a/src/kernel_services/ast_queries/cil_datatype.ml +++ b/src/kernel_services/ast_queries/cil_datatype.ml @@ -1357,6 +1357,54 @@ let rec hash_logic_type config = function | Larrow (_,t) -> 41 * hash_logic_type config t +(* Logic_info with structural comparison + if functions / predicates have the same name (overloading), compare + their arguments types ; ignore polymorphism *) +module Logic_info_structural = struct + let pretty_ref = ref (fun fmt f -> Logic_var.pretty fmt f.l_var_info) + include Make_with_collections + (struct + type t = logic_info + let name = "Logic_info_structural" + let reprs = + List.map + (fun v -> + { l_var_info = v; + l_labels = []; + l_tparams = []; + l_type = None; + l_profile = []; + l_body = LBnone }) + Logic_var.reprs + let compare i1 i2 = + match String.compare i1.l_var_info.lv_name i2.l_var_info.lv_name with + | (-1 | 1) as res -> res + | _ -> + let rec profile_cmp p1 p2 = match p1, p2 with + | [], [] -> 0 + | [], _ -> -1 + | _, [] -> 1 + | h1::t1, h2::t2 -> + let ty1 = h1.lv_type in + let ty2 = h2.lv_type in + let config = { by_name = true ; + logic_type = true ; + unroll = true } in + match compare_logic_type config ty1 ty2 with + | (-1 | 1) as res -> res + | _ -> profile_cmp t1 t2 + in + profile_cmp i1.l_profile i2.l_profile + + let equal i1 i2 = Logic_var.equal i1.l_var_info i2.l_var_info + let hash i = Logic_var.hash i.l_var_info + let copy = Datatype.undefined + let internal_pretty_code = Datatype.undefined + let pretty = !pretty_ref + let varname _ = "logic_varinfo" + end) +end + (* Shared between the different modules for logic types *) let pretty_logic_type_ref = ref (fun _ _ -> assert false) diff --git a/src/kernel_services/ast_queries/cil_datatype.mli b/src/kernel_services/ast_queries/cil_datatype.mli index 983c6ba3a37..9e98b281b8e 100644 --- a/src/kernel_services/ast_queries/cil_datatype.mli +++ b/src/kernel_services/ast_queries/cil_datatype.mli @@ -256,6 +256,7 @@ module Identified_term: S_with_collections_pretty with type t = identified_term module Logic_ctor_info: S_with_collections_pretty with type t = logic_ctor_info module Logic_info: S_with_collections_pretty with type t = logic_info +module Logic_info_structural: S_with_collections_pretty with type t = logic_info module Logic_constant: S_with_collections_pretty with type t = logic_constant module Logic_label: S_with_collections_pretty with type t = logic_label -- GitLab From 618c6118e260f0e1f118b128bb800edc509fb3fa Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Wed, 5 Jun 2019 19:02:51 +0200 Subject: [PATCH 372/376] [lib] fixes wrong cmp for lists of different length in Extlib.list_compare the shortest list is _smaller_ than the longest one. --- src/libraries/stdlib/extlib.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/stdlib/extlib.ml b/src/libraries/stdlib/extlib.ml index 8e5d2022b9e..f815f104a07 100644 --- a/src/libraries/stdlib/extlib.ml +++ b/src/libraries/stdlib/extlib.ml @@ -127,8 +127,8 @@ let rec list_compare cmp_elt l1 l2 = else match l1, l2 with | [], [] -> assert false (* included in l1 == l2 above *) - | [], _ :: _ -> 1 - | _ :: _, [] -> -1 + | [], _ :: _ -> -1 + | _ :: _, [] -> 1 | v1::r1, v2::r2 -> let c = cmp_elt v1 v2 in if c = 0 then list_compare cmp_elt r1 r2 else c -- GitLab From 95341df4e795edc54091a767d73f5c909959451e Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Wed, 5 Jun 2019 19:11:09 +0200 Subject: [PATCH 373/376] [kernel] use standard `compare_list` for list comparison --- .../ast_queries/cil_datatype.ml | 30 ++++++++----------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/src/kernel_services/ast_queries/cil_datatype.ml b/src/kernel_services/ast_queries/cil_datatype.ml index 30ed9edaa84..0b85d1766cf 100644 --- a/src/kernel_services/ast_queries/cil_datatype.ml +++ b/src/kernel_services/ast_queries/cil_datatype.ml @@ -1377,24 +1377,18 @@ module Logic_info_structural = struct l_body = LBnone }) Logic_var.reprs let compare i1 i2 = - match String.compare i1.l_var_info.lv_name i2.l_var_info.lv_name with - | (-1 | 1) as res -> res - | _ -> - let rec profile_cmp p1 p2 = match p1, p2 with - | [], [] -> 0 - | [], _ -> -1 - | _, [] -> 1 - | h1::t1, h2::t2 -> - let ty1 = h1.lv_type in - let ty2 = h2.lv_type in - let config = { by_name = true ; - logic_type = true ; - unroll = true } in - match compare_logic_type config ty1 ty2 with - | (-1 | 1) as res -> res - | _ -> profile_cmp t1 t2 - in - profile_cmp i1.l_profile i2.l_profile + let name_cmp = + String.compare i1.l_var_info.lv_name i2.l_var_info.lv_name + in + if name_cmp <> 0 then name_cmp else begin + let config = + { by_name = true ; logic_type = true ; unroll = true } + in + let prm_cmp p1 p2 = + compare_logic_type config p1.lv_type p2.lv_type + in + compare_list prm_cmp i1.l_profile i2.l_profile + end let equal i1 i2 = Logic_var.equal i1.l_var_info i2.l_var_info let hash i = Logic_var.hash i.l_var_info -- GitLab From c843b6604e3d8b25bd6351a4afd7ada1b93f94ef Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Wed, 5 Jun 2019 19:12:03 +0200 Subject: [PATCH 374/376] [kernel] Derive equality from compare in Logic_info_structural --- src/kernel_services/ast_queries/cil_datatype.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel_services/ast_queries/cil_datatype.ml b/src/kernel_services/ast_queries/cil_datatype.ml index 0b85d1766cf..86342ad91af 100644 --- a/src/kernel_services/ast_queries/cil_datatype.ml +++ b/src/kernel_services/ast_queries/cil_datatype.ml @@ -1390,7 +1390,7 @@ module Logic_info_structural = struct compare_list prm_cmp i1.l_profile i2.l_profile end - let equal i1 i2 = Logic_var.equal i1.l_var_info i2.l_var_info + let equal = Datatype.from_compare let hash i = Logic_var.hash i.l_var_info let copy = Datatype.undefined let internal_pretty_code = Datatype.undefined -- GitLab From a712ca1da0bf5ffdcaef74e65fc3a71ba800873f Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Wed, 5 Jun 2019 19:15:29 +0200 Subject: [PATCH 375/376] [kernel] document new Logic_info_structural datatype --- src/kernel_services/ast_queries/cil_datatype.mli | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/kernel_services/ast_queries/cil_datatype.mli b/src/kernel_services/ast_queries/cil_datatype.mli index 9e98b281b8e..4535cdea3c4 100644 --- a/src/kernel_services/ast_queries/cil_datatype.mli +++ b/src/kernel_services/ast_queries/cil_datatype.mli @@ -256,6 +256,16 @@ module Identified_term: S_with_collections_pretty with type t = identified_term module Logic_ctor_info: S_with_collections_pretty with type t = logic_ctor_info module Logic_info: S_with_collections_pretty with type t = logic_info + +(** Logic_info with structural comparison: + - name of the symbol + - type of arguments + Note that polymorphism is ignored, in the sense that two symbols with + the same name and profile except for the name of their type variables + will compare unequal. + + @since Frama-C+dev +*) module Logic_info_structural: S_with_collections_pretty with type t = logic_info module Logic_constant: S_with_collections_pretty with type t = logic_constant -- GitLab From e0135aa9e21e17d8496a1241ae867358846bf180 Mon Sep 17 00:00:00 2001 From: DavidCok <cok@frontiernet.net> Date: Fri, 7 Jun 2019 09:16:00 +0200 Subject: [PATCH 376/376] [Libc] Avoid using the variable name 'template' as it is a C++ reserved word --- share/libc/stdlib.h | 8 ++++---- tests/libc/oracle/fc_libc.1.res.oracle | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/share/libc/stdlib.h b/share/libc/stdlib.h index 5d8864feeae..5d903a44e9d 100644 --- a/share/libc/stdlib.h +++ b/share/libc/stdlib.h @@ -686,14 +686,14 @@ extern int posix_memalign(void **memptr, size_t alignment, size_t size); /*@ // missing: requires 'last 6 characters of template must be XXXXXX' - // missing: assigns \result, template[0..] \from 'filesystem', 'RNG'; - requires valid_template: valid_string(template); - assigns template[0..] \from \nothing; + // missing: assigns \result, templat[0..] \from 'filesystem', 'RNG'; + requires valid_template: valid_string(templat); + assigns templat[0..] \from \nothing; assigns \result \from \nothing; ensures result_error_or_valid_fd: \result == -1 || 0 <= \result < __FC_FOPEN_MAX; */ -extern int mkstemp(char *template); +extern int mkstemp(char *templat); __END_DECLS diff --git a/tests/libc/oracle/fc_libc.1.res.oracle b/tests/libc/oracle/fc_libc.1.res.oracle index 1aff0685633..ade6066676f 100644 --- a/tests/libc/oracle/fc_libc.1.res.oracle +++ b/tests/libc/oracle/fc_libc.1.res.oracle @@ -2146,14 +2146,14 @@ extern size_t wcstombs(char * __restrict s, wchar_t const * __restrict pwcs, int posix_memalign(void **memptr, size_t alignment, size_t size); -/*@ requires valid_template: valid_string(template); +/*@ requires valid_template: valid_string(templat); ensures result_error_or_valid_fd: \result ≡ -1 ∨ (0 ≤ \result < 16); - assigns *(template + (0 ..)), \result; - assigns *(template + (0 ..)) \from \nothing; + assigns *(templat + (0 ..)), \result; + assigns *(templat + (0 ..)) \from \nothing; assigns \result \from \nothing; */ -extern int mkstemp(char *template); +extern int mkstemp(char *templat); int glob(char const *pattern, int flags, int (*errfunc)(char const *epath, int eerrno), glob_t *pglob) -- GitLab