Skip to content

Commit

Permalink
Update cryptol and saw-core, and adapt to "persist-solver2" PRs.
Browse files Browse the repository at this point in the history
This patch includes the following submodule PRs:
- GaloisInc/cryptol#1128 "persist-solver2"
- GaloisInc/saw-core#197 "persist-solver2"
  • Loading branch information
Brian Huffman committed Apr 26, 2021
1 parent 3e4169b commit ee8d927
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion deps/saw-core
4 changes: 3 additions & 1 deletion src/SAWScript/AutoMatch/Cryptol.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import Data.List hiding (sort)
import Data.Maybe
import Data.Ord

import Verifier.SAW.CryptolEnv (meSolverConfig)

import Cryptol.Eval (EvalOpts(..))
import qualified Cryptol.ModuleSystem as M
import Cryptol.ModuleSystem.Name
Expand All @@ -33,7 +35,7 @@ getDeclsCryptol path = do
modEnv <- M.initialModuleEnv
let minp = M.ModuleInput True (pure evalOpts) BS.readFile modEnv
(result, warnings) <-
SMT.withSolver (M.meSolverConfig modEnv) $ \s ->
SMT.withSolver (meSolverConfig modEnv) $ \s ->
M.loadModuleByPath path (minp s)
return $ do
forM_ warnings $ liftF . flip Warning () . pretty
Expand Down
4 changes: 2 additions & 2 deletions src/SAWScript/Builtins.hs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ import qualified Data.SBV.Dynamic as SBV
import qualified Data.AIG as AIG

-- cryptol
import qualified Cryptol.ModuleSystem.Env as C (meSolverConfig, meSearchPath)
import qualified Cryptol.ModuleSystem.Env as C (meSearchPath)
import qualified Cryptol.TypeCheck as C (SolverConfig)
import qualified Cryptol.TypeCheck.AST as C
import qualified Cryptol.TypeCheck.PP as C (ppWithNames, pp, text, (<+>))
Expand Down Expand Up @@ -1148,7 +1148,7 @@ eval_int :: TypedTerm -> TopLevel Integer
eval_int t = do
sc <- getSharedContext
cenv <- fmap rwCryptol getTopLevelRW
let cfg = C.meSolverConfig (CEnv.eModuleEnv cenv)
let cfg = CEnv.meSolverConfig (CEnv.eModuleEnv cenv)
unless (null (getAllExts (ttTerm t))) $
fail "term contains symbolic variables"
opts <- getOptions
Expand Down
3 changes: 1 addition & 2 deletions src/SAWScript/Interpreter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ import SAWScript.Crucible.LLVM.Skeleton.Builtins
import qualified SAWScript.Crucible.LLVM.MethodSpecIR as CIR

-- Cryptol
import Cryptol.ModuleSystem.Env (meSolverConfig)
import qualified Cryptol.Eval as V (PPOpts(..))
import qualified Cryptol.Backend.Monad as V (runEval)
import qualified Cryptol.Eval.Value as V (defaultPPOpts, ppValue)
Expand Down Expand Up @@ -609,7 +608,7 @@ print_value (VString s) = printOutLnTop Info s
print_value (VTerm t) = do
sc <- getSharedContext
cenv <- fmap rwCryptol getTopLevelRW
let cfg = meSolverConfig (CEnv.eModuleEnv cenv)
let cfg = CEnv.meSolverConfig (CEnv.eModuleEnv cenv)
unless (null (getAllExts (ttTerm t))) $
fail "term contains symbolic variables"
sawopts <- getOptions
Expand Down

0 comments on commit ee8d927

Please sign in to comment.