Skip to content

Commit

Permalink
Add lift_mem to complete choice monad
Browse files Browse the repository at this point in the history
  • Loading branch information
filipeom committed Jul 31, 2024
1 parent de5f511 commit a9914c9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/intf/choice_intf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ module type Complete = sig
val thread : thread t

val add_pc : V.vbool -> unit t

val lift_mem : 'a Symbolic_choice_without_memory.t -> 'a t
end
5 changes: 3 additions & 2 deletions src/symbolic/symbolic_choice.ml
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,10 @@ module CoreImpl = struct
other =
St
(fun st ->
let ( let* ) = M.( let* ) in
let proj, backup = project_and_backup st in
M.bind (run other proj) (fun (res, new_state) ->
M.return (res, restore backup new_state) ) )
let* res, new_state = run other proj in
M.return (res, restore backup new_state) )
end

module Eval = struct
Expand Down
2 changes: 2 additions & 0 deletions src/symbolic/symbolic_choice_minimalist.ml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ module Make (Thread : Thread.S) = struct
let add_pc (_vb : vbool) = return ()

let run ~workers:_ solver t thread = run t thread (Solver.fresh solver ())

let lift_mem _ = assert false
end

include Make (Thread_with_memory)

0 comments on commit a9914c9

Please sign in to comment.