package goblint
Static analysis framework for C
Install
Dune Dependency
Authors
Maintainers
Sources
goblint-2.5.0.tbz
sha256=452d8491527aea21f2cbb11defcc14ba0daf9fdb6bdb9fc0af73e56eac57b916
sha512=1993cd45c4c7fe124ca6e157f07d17ec50fab5611b270a434ed1b7fb2910aa85a8e6eaaa77dad770430710aafb2f6d676c774dd33942d921f23e2f9854486551
doc/src/goblint.solver/worklist.ml.html
Source file worklist.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
(** Worklist solver ([WL]). *) open Batteries open ConstrSys module Make = functor (S:EqConstrSys) -> functor (HM:Hashtbl.S with type key = S.v) -> struct include Generic.SolverStats (S) (HM) module VS = Set.Make (S.Var) open S.Dom let eq x get set = match S.system x with | None -> bot () | Some f -> eval_rhs_event x; f get set let solve st vs = let infl = HM.create 10 in let rho = HM.create 10 in let vs = ref (VS.of_enum (List.enum vs)) in let init x = new_var_event x; HM.replace rho x (bot ()); HM.replace infl x VS.empty; in let eval x y = get_var_event y; HM.replace infl y (VS.add x (try HM.find infl y with Not_found -> VS.empty)); try HM.find rho y with Not_found -> new_var_event y; HM.replace rho y (bot ()); vs := VS.add y !vs; bot () in let set x d = let old = try HM.find rho x with Not_found -> init x; bot () in if not (leq d old) then begin update_var_event x old d; HM.replace rho x (join old d); let q = try HM.find infl x with Not_found -> VS.empty in HM.replace infl x VS.empty; vs := (VS.fold VS.add q !vs) end in start_event (); let _ = List.iter (fun (x,d) -> HM.add rho x d) st in while not (VS.is_empty !vs) do let x, vs' = VS.pop !vs in let _ = vs := vs' in set x (eq x (eval x) set) done; stop_event (); rho end let _ = Selector.add_solver ("WL", (module PostSolver.EqIncrSolverFromEqSolver (Make)));
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>