doyougnu / VSmt

Variational Satisfiability Solver
1 stars 0 forks source link

Utilize the reader monad in sbv to season the solver #7

Open doyougnu opened 3 years ago

doyougnu commented 3 years ago
  With the parallel version of vsmt we have to season the solver with the
  variational core. This means that we actually compute ~n~ ~IL~'s where ~n~
  is the number of threads. This is likely a small price to pay for the
  parallelism but could certainly be reduced. SBVs ~SymbolicT~ is a reader
  monad over ~IO~ but sbv doesn't export the ~ReaderT~ type class instance,
  so in the main thread we can season, then grab the state with
  ~T.symbolicEnv~ but then there is no way for me to call ~local~ over the
  thread instances and thus no way to replace the thread states with the
  seasoned state. Hence, we are forced recompute the state for each thread
  with a call with ~toIL~.
doyougnu commented 3 years ago

Note that we could season the solver for every recursive call, that is: