sbv

Using Z3 with parallelization from SBV

南笙酒味 提交于 2020-12-15 05:43:06
问题 I'd like to use Z3 via SBV using multiple cores. Based on this answer I should be able to do that just by passing parallel.enable=true to the z3 executable on the command line. Since I am using SBV, I need to go through SBV's interface to various SMTLib solvers, so here's what I tried: foo = runSMTWith z3par $ do ... where z3par = z3 { SBV.solver = (SBV.solver z3) { SBV.options = \cfg -> SBV.options (SBV.solver z3) cfg ++ ["parallel.enable=true"] } } However, I am not seeing any signs of Z3

Efficient way to “keep turning the crank” on a stateful computation

依然范特西╮ 提交于 2020-08-08 06:12:26
问题 I have a stateful process that is modelled as an i -> RWS r w s a . I want to feed it an input cmds :: [i] ; currently I do that wholesale: let play = runGame theGame . go where go [] = finished go ((v, n):cmds) = do end1 <- stepWorld end2 <- ite (SBV.isJust end1) (return end1) $ stepPlayer (v, n) ite (SBV.isJust end2) (return end2) $ go cmds I can try searching for an input of a predetermined size like this: result <- satWith z3{ verbose = True } $ do cmds <- mapM sCmd [1..inputLength]

How do I debug missing variables from SMT-Lib output?

放肆的年华 提交于 2020-07-23 06:24:27
问题 Based on this very helpful answer I rewrote my solver-for-a-stateful-program to use the Query monad and an ever-increasing list of SMT variables standing for the inputs. I expected one of two outcomes from this: either the first part (generating the SMTLib output) is sped up a lot and becomes usable, or it still remains so slow that it might as well not work. However, instead I get an error message from the SMT solver (Z3 in my case) complaining about a missing SMT variable in the SMTLib

How do I debug missing variables from SMT-Lib output?

夙愿已清 提交于 2020-07-23 06:23:15
问题 Based on this very helpful answer I rewrote my solver-for-a-stateful-program to use the Query monad and an ever-increasing list of SMT variables standing for the inputs. I expected one of two outcomes from this: either the first part (generating the SMTLib output) is sped up a lot and becomes usable, or it still remains so slow that it might as well not work. However, instead I get an error message from the SMT solver (Z3 in my case) complaining about a missing SMT variable in the SMTLib

How do I debug missing variables from SMT-Lib output?

会有一股神秘感。 提交于 2020-07-23 06:22:30
问题 Based on this very helpful answer I rewrote my solver-for-a-stateful-program to use the Query monad and an ever-increasing list of SMT variables standing for the inputs. I expected one of two outcomes from this: either the first part (generating the SMTLib output) is sped up a lot and becomes usable, or it still remains so slow that it might as well not work. However, instead I get an error message from the SMT solver (Z3 in my case) complaining about a missing SMT variable in the SMTLib