@@ -856,111 +856,3 @@ struct
856856
857857 let unmarshal (m : marshal ) = Oct.Abstract1. of_oct @@ OctagonD. unmarshal m
858858end
859-
860- (* * Lift [D] to a non-reduced product with box.
861- Both are updated in parallel, but [D] answers to queries.
862- Box domain is used to filter out non-relational invariants for output. *)
863- module BoxProd0 (D : S3 ) = (* TODO: remove? *)
864- struct
865- module BoxD = D2 (IntervalManager )
866-
867- include Printable. Prod (BoxD ) (D )
868-
869- let equal (_ , d1 ) (_ , d2 ) = D. equal d1 d2
870- let hash (_ , d ) = D. hash d
871- let compare (_ , d1 ) (_ , d2 ) = D. compare d1 d2
872-
873- let leq (_ , d1 ) (_ , d2 ) = D. leq d1 d2
874- let join (b1 , d1 ) (b2 , d2 ) = (BoxD. join b1 b2, D. join d1 d2)
875- let meet (b1 , d1 ) (b2 , d2 ) = (BoxD. meet b1 b2, D. meet d1 d2)
876- let widen (b1 , d1 ) (b2 , d2 ) = (BoxD. widen b1 b2, D. widen d1 d2)
877- let narrow (b1 , d1 ) (b2 , d2 ) = (BoxD. narrow b1 b2, D. narrow d1 d2)
878-
879- let top () = (BoxD. top () , D. top () )
880- let bot () = (BoxD. bot () , D. bot () )
881- let is_top (_ , d ) = D. is_top d
882- let is_bot (_ , d ) = D. is_bot d
883- let top_env env = (BoxD. top_env env, D. top_env env)
884- let bot_env env = (BoxD. bot_env env, D. bot_env env)
885- let is_top_env (_ , d ) = D. is_top_env d
886- let is_bot_env (_ , d ) = D. is_bot_env d
887- let unify (b1 , d1 ) (b2 , d2 ) = (BoxD. unify b1 b2, D. unify d1 d2)
888- let copy (b , d ) = (BoxD. copy b, D. copy d)
889-
890- type marshal = BoxD .marshal * D .marshal
891-
892- let marshal (b , d ) = (BoxD. marshal b, D. marshal d)
893- let unmarshal (b , d ) = (BoxD. unmarshal b, D. unmarshal d)
894-
895- let mem_var (_ , d ) v = D. mem_var d v
896- let vars (_ , d ) = D. vars d
897-
898- let pretty_diff () ((_ , d1 ), (_ , d2 )) = D. pretty_diff () (d1, d2)
899-
900- let add_vars_with (b , d ) vs =
901- BoxD. add_vars_with b vs;
902- D. add_vars_with d vs
903- let remove_vars_with (b , d ) vs =
904- BoxD. remove_vars_with b vs;
905- D. remove_vars_with d vs
906- let remove_filter_with (b , d ) f =
907- BoxD. remove_filter_with b f;
908- D. remove_filter_with d f
909- let keep_filter_with (b , d ) f =
910- BoxD. keep_filter_with b f;
911- D. keep_filter_with d f
912- let keep_vars_with (b , d ) vs =
913- BoxD. keep_vars_with b vs;
914- D. keep_vars_with d vs
915- let forget_vars_with (b , d ) vs =
916- BoxD. forget_vars_with b vs;
917- D. forget_vars_with d vs
918- let assign_exp_with ask (b , d ) v e no_ov =
919- BoxD. assign_exp_with ask b v e no_ov;
920- D. assign_exp_with ask d v e no_ov
921- let assign_exp_parallel_with ask (b , d ) ves no_ov =
922- BoxD. assign_exp_parallel_with ask b ves no_ov;
923- D. assign_exp_parallel_with ask d ves no_ov
924- let assign_var_with (b , d ) v e =
925- BoxD. assign_var_with b v e;
926- D. assign_var_with d v e
927- let assign_var_parallel_with (b , d ) vvs =
928- BoxD. assign_var_parallel_with b vvs;
929- D. assign_var_parallel_with d vvs
930- let assign_var_parallel' (b , d ) vs v's =
931- (BoxD. assign_var_parallel' b vs v's, D. assign_var_parallel' d vs v's)
932- let substitute_exp_with ask (b , d ) v e no_ov =
933- BoxD. substitute_exp_with ask b v e no_ov;
934- D. substitute_exp_with ask d v e no_ov
935- let substitute_exp_parallel_with ask (b , d ) ves no_ov =
936- BoxD. substitute_exp_parallel_with ask b ves no_ov;
937- D. substitute_exp_parallel_with ask d ves no_ov
938- let substitute_var_with (b , d ) v1 v2 =
939- BoxD. substitute_var_with b v1 v2;
940- D. substitute_var_with d v1 v2
941- let meet_tcons ask (b , d ) c e = (BoxD. meet_tcons ask b c e, D. meet_tcons ask d c e)
942- let to_lincons_array (_ , d ) = D. to_lincons_array d
943- let of_lincons_array a = (BoxD. of_lincons_array a, D. of_lincons_array a)
944-
945- let cil_exp_of_lincons1 = D. cil_exp_of_lincons1
946- let assert_inv ask (b , d ) e n no_ov = (BoxD. assert_inv ask b e n no_ov, D. assert_inv ask d e n no_ov)
947- let eval_int ask (_ , d ) = D. eval_int ask d
948-
949- let invariant (b , d ) =
950- (* diff via lincons *)
951- let lcb = D. to_lincons_array (D. of_lincons_array (BoxD. to_lincons_array b)) in (* convert through D to make lincons use the same format *)
952- let lcd = D. to_lincons_array d in
953- Lincons1Set. (diff (of_earray lcd) (of_earray lcb))
954- |> (if Oct. manager_is_oct D.Man. mgr then Lincons1Set. simplify else Fun. id)
955- |> Lincons1Set. elements
956- end
957-
958- module BoxProd (D : S3 ): RD =
959- struct
960- module V = D. V
961- type var = V .t
962- module BP0 = BoxProd0 (D )
963- module Tracked = SharedFunctions .Tracked
964- include BP0
965- include AOpsPureOfImperative (BP0 )
966- end
0 commit comments