File tree Expand file tree Collapse file tree 9 files changed +65
-42
lines changed Expand file tree Collapse file tree 9 files changed +65
-42
lines changed Original file line number Diff line number Diff line change 88
99goblint_lib_paths = [
1010 src_root_path / "goblint_lib.ml" ,
11+ src_root_path / "solvers" / "goblint_solver.ml" ,
1112 src_root_path / "util" / "std" / "goblint_std.ml" ,
1213]
1314goblint_lib_modules = set ()
3334
3435 # libraries
3536 "Goblint_std" ,
37+ "Goblint_solver" ,
3638 "Goblint_timing" ,
3739 "Goblint_backtrace" ,
3840 "Goblint_tracing" ,
Original file line number Diff line number Diff line change @@ -2871,7 +2871,7 @@ struct
28712871 | "once" ->
28722872 f (D. bot () )
28732873 | "fixpoint" ->
2874- let module DFP = LocalFixpoint. Make (D ) in
2874+ let module DFP = Goblint_solver. LocalFixpoint.Make (D ) in
28752875 DFP. lfp f
28762876 | _ ->
28772877 assert false
Original file line number Diff line number Diff line change 77 (name goblint_lib)
88 (public_name goblint.lib)
99 (modules :standard \ goblint privPrecCompare apronPrecCompare messagesCompare)
10- (libraries goblint.sites goblint.build-info goblint-cil.all-features batteries.unthreaded qcheck-core.runner sha json-data-encoding jsonrpc cpu arg-complete fpath yaml yaml.unix uuidm goblint_timing catapult goblint_backtrace fileutils goblint_std goblint_config goblint_common goblint_domain goblint_constraint goblint_library goblint_incremental goblint_tracing
10+ (libraries goblint.sites goblint.build-info goblint-cil.all-features batteries.unthreaded qcheck-core.runner sha json-data-encoding jsonrpc cpu arg-complete fpath yaml yaml.unix uuidm goblint_timing catapult goblint_backtrace fileutils goblint_std goblint_config goblint_common goblint_domain goblint_constraint goblint_solver goblint_library goblint_incremental goblint_tracing
1111 ; Conditionally compile based on whether apron optional dependency is installed or not.
1212 ; Alternative dependencies seem like the only way to optionally depend on optional dependencies.
1313 ; See: https://dune.readthedocs.io/en/stable/concepts.html#alternative-dependencies.
Original file line number Diff line number Diff line change 8585 let save_run = let o = get_string " save_run" in if o = " " then (if gobview then " run" else " " ) else o in
8686 save_run <> " "
8787 end
88- module Slvr = (GlobSolverFromEqSolver (Selector. Make (PostSolverArg ))) (EQSys ) (LHT ) (GHT )
88+ module Slvr = (GlobSolverFromEqSolver (Goblint_solver. Selector.Make (PostSolverArg ))) (EQSys ) (LHT ) (GHT )
8989 (* The comparator *)
9090 module CompareGlobSys = Constraints. CompareGlobSys (SpecSys )
9191
@@ -476,7 +476,7 @@ struct
476476 let save_run_str = let o = get_string " save_run" in if o = " " then (if gobview then " run" else " " ) else o in
477477
478478 let lh, gh = if load_run <> " " then (
479- let module S2' = (GlobSolverFromEqSolver (Generic. LoadRunIncrSolver (PostSolverArg ))) (EQSys ) (LHT ) (GHT ) in
479+ let module S2' = (GlobSolverFromEqSolver (Goblint_solver. Generic.LoadRunIncrSolver (PostSolverArg ))) (EQSys ) (LHT ) (GHT ) in
480480 let (r2, _) = S2'. solve entrystates entrystates_global startvars' None in (* TODO: has incremental data? *)
481481 r2
482482 ) else if compare_runs <> [] then (
@@ -582,7 +582,7 @@ struct
582582 let (r2, _) = S2'. solve entrystates entrystates_global startvars' None in (* TODO: has incremental data? *)
583583 CompareGlobSys. compare (get_string " solver" , get_string " comparesolver" ) (lh,gh) (r2)
584584 in
585- compare_with (Selector. choose_solver (get_string " comparesolver" ))
585+ compare_with (Goblint_solver. Selector. choose_solver (get_string " comparesolver" ))
586586 );
587587
588588 (* Most warnings happen before during postsolver, but some happen later (e.g. in finalize), so enable this for the rest (if required by option). *)
Original file line number Diff line number Diff line change @@ -288,41 +288,6 @@ module Serialize = Serialize
288288module CilMaps = CilMaps
289289
290290
291- (* * {1 Solvers}
292-
293- Generic solvers are used to solve {{!Analyses.MonSystem} (side-effecting) constraint systems}. *)
294-
295- (* * {2 Top-down}
296-
297- The top-down solver family. *)
298-
299- module Td3 = Td3
300- module TopDown = TopDown
301- module TopDown_term = TopDown_term
302- module TopDown_space_cache_term = TopDown_space_cache_term
303- module TopDown_deprecated = TopDown_deprecated
304-
305- (* * {2 SLR}
306-
307- The SLR solver family. *)
308-
309- module SLRphased = SLRphased
310- module SLRterm = SLRterm
311- module SLR = SLR
312-
313- (* * {2 Other} *)
314-
315- module EffectWConEq = EffectWConEq
316- module Worklist = Worklist
317- module Generic = Generic
318- module Selector = Selector
319-
320- module PostSolver = PostSolver
321- module LocalFixpoint = LocalFixpoint
322- module SolverStats = SolverStats
323- module SolverBox = SolverBox
324-
325-
326291(* * {1 I/O}
327292
328293 Various input/output interfaces and formats. *)
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ This {{!page-domain}unwrapped library} contains various domain modules extracted
1919{2 Library goblint.constraint}
2020This {{!page-constraint}unwrapped library} contains various constraint system modules extracted from {!Goblint_lib}.
2121
22+ {2 Library goblint.solver}
23+ {!modules:Goblint_solver}
24+
2225{2 Library goblint.library}
2326This {{!page-library}unwrapped library} contains various library specification modules extracted from {!Goblint_lib}.
2427
Original file line number Diff line number Diff line change @@ -513,15 +513,15 @@ let preprocess_parse_merge () =
513513let do_stats () =
514514 if get_bool " dbg.timing.enabled" then (
515515 print_newline () ;
516- SolverStats. print () ;
516+ Goblint_solver. SolverStats. print () ;
517517 print_newline () ;
518518 print_string " Timings:\n " ;
519519 Timing.Default. print (Stdlib.Format. formatter_of_out_channel @@ Messages. get_out " timing" Legacy. stderr);
520520 flush_all ()
521521 )
522522
523523let reset_stats () =
524- SolverStats. reset () ;
524+ Goblint_solver. SolverStats. reset () ;
525525 Timing.Default. reset () ;
526526 Timing.Program. reset ()
527527
Original file line number Diff line number Diff line change 1+ (include_subdirs no)
2+
3+ (library
4+ (name goblint_solver)
5+ (public_name goblint.solver)
6+ (libraries
7+ batteries.unthreaded
8+ goblint_std
9+ goblint_common
10+ goblint_domain
11+ goblint_constraint
12+ goblint_incremental
13+ goblint-cil)
14+ (flags :standard -open Goblint_std)
15+ (preprocess
16+ (pps
17+ ppx_deriving.std
18+ ppx_deriving_hash
19+ ppx_deriving_yojson))
20+ (instrumentation (backend bisect_ppx)))
21+
22+ (documentation)
Original file line number Diff line number Diff line change 1+ (* * Generic solvers for {{!ConstrSys.MonSystem} (side-effecting) constraint systems}. *)
2+
3+ (* * {1 Top-down}
4+
5+ The top-down solver family. *)
6+
7+ module Td3 = Td3
8+ module TopDown = TopDown
9+ module TopDown_term = TopDown_term
10+ module TopDown_space_cache_term = TopDown_space_cache_term
11+ module TopDown_deprecated = TopDown_deprecated
12+
13+ (* * {1 SLR}
14+
15+ The SLR solver family. *)
16+
17+ module SLRphased = SLRphased
18+ module SLRterm = SLRterm
19+ module SLR = SLR
20+
21+ (* * {1 Other} *)
22+
23+ module EffectWConEq = EffectWConEq
24+ module Worklist = Worklist
25+ module Generic = Generic
26+ module Selector = Selector
27+
28+ module PostSolver = PostSolver
29+ module LocalFixpoint = LocalFixpoint
30+ module SolverStats = SolverStats
31+ module SolverBox = SolverBox
You can’t perform that action at this time.
0 commit comments