Skip to content
Snippets Groups Projects
Commit ed3c0d14 authored by Valentin Perrelle's avatar Valentin Perrelle
Browse files

[kernel] Use the new modules in tests instead of deprecated Db.Properties

parent 56af4db6
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,7 @@ let run () = ...@@ -18,7 +18,7 @@ let run () =
[] []
in in
let s = Kernel_function.find_return kf in let s = Kernel_function.find_return kf in
let ca = !Db.Properties.Interp.code_annot kf s "assert 32.5>=10.;" in let ca = Logic_parse_string.code_annot kf s "assert 32.5>=10.;" in
Annotations.add_code_annot emitter ~kf s ca; Annotations.add_code_annot emitter ~kf s ca;
let ip = Property.ip_of_code_annot_single kf s ca in let ip = Property.ip_of_code_annot_single kf s ca in
Property_status.emit emitter ~hyps ip Property_status.True Property_status.emit emitter ~hyps ip Property_status.True
......
...@@ -6,8 +6,8 @@ zgrviewer tests/pdg/dyn_dpds_2.dot ; ...@@ -6,8 +6,8 @@ zgrviewer tests/pdg/dyn_dpds_2.dot ;
*) *)
let get_zones str_data (stmt, kf) = let get_zones str_data (stmt, kf) =
let lval_term = !Db.Properties.Interp.term_lval kf str_data in let lval_term = Logic_parse_string.term_lval kf str_data in
let lval = !Db.Properties.Interp.term_lval_to_lval ~result:None lval_term in let lval = Logic_to_c.term_lval_to_lval lval_term in
let exp = Cil.new_exp ~loc:Cil_datatype.Location.unknown (Cil_types.Lval lval) in let exp = Cil.new_exp ~loc:Cil_datatype.Location.unknown (Cil_types.Lval lval) in
Eva.Results.(before stmt |> expr_deps exp) Eva.Results.(before stmt |> expr_deps exp)
......
...@@ -8,8 +8,8 @@ let find_pp kf_name = ...@@ -8,8 +8,8 @@ let find_pp kf_name =
let compute_and_print pp str_data = let compute_and_print pp str_data =
let stmt, kf = pp in let stmt, kf = pp in
let lval_term = !Db.Properties.Interp.term_lval kf str_data in let lval_term = Logic_parse_string.term_lval kf str_data in
let lval = !Db.Properties.Interp.term_lval_to_lval ~result:None lval_term in let lval = Logic_to_c.term_lval_to_lval lval_term in
let defs = Scope.Defs.get_defs kf stmt lval in let defs = Scope.Defs.get_defs kf stmt lval in
Format.printf "* @[<v 2>Defs for (%s) at current program point=@[<v 2>@." Format.printf "* @[<v 2>Defs for (%s) at current program point=@[<v 2>@."
str_data; str_data;
......
...@@ -35,8 +35,8 @@ let find_label kf_name lab_name = ...@@ -35,8 +35,8 @@ let find_label kf_name lab_name =
let compute_and_print pp str_data = let compute_and_print pp str_data =
let stmt, kf = pp in let stmt, kf = pp in
let lval_term = !Db.Properties.Interp.term_lval kf str_data in let lval_term = Logic_parse_string.term_lval kf str_data in
let lval = !Db.Properties.Interp.term_lval_to_lval ~result:None lval_term in let lval = Logic_to_c.term_lval_to_lval lval_term in
let (_used_stmts, zones) = Scope.Zones.build_zones kf stmt lval in let (_used_stmts, zones) = Scope.Zones.build_zones kf stmt lval in
Format.printf "Zones for %s at current program point =@.%a\n@\n" Format.printf "Zones for %s at current program point =@.%a\n@\n"
str_data Scope.Zones.pretty_zones zones str_data Scope.Zones.pretty_zones zones
......
...@@ -74,8 +74,8 @@ let get_stmt sid = fst (Kernel_function.find_from_sid sid) ...@@ -74,8 +74,8 @@ let get_stmt sid = fst (Kernel_function.find_from_sid sid)
(** build the [zone] which represents [data] before [kinst] *) (** build the [zone] which represents [data] before [kinst] *)
let get_zones str_data (stmt, kf) = let get_zones str_data (stmt, kf) =
let lval_term = !Db.Properties.Interp.term_lval kf str_data in let lval_term = Logic_parse_string.term_lval kf str_data in
let lval = !Db.Properties.Interp.term_lval_to_lval ~result:None lval_term in let lval = Logic_to_c.term_lval_to_lval lval_term in
let loc = Eva.Results.(before stmt |> eval_address lval |> as_location) in let loc = Eva.Results.(before stmt |> eval_address lval |> as_location) in
Locations.(enumerate_valid_bits Read loc) Locations.(enumerate_valid_bits Read loc)
;; ;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment