Skip to content

Commit

Permalink
Small cleanups in prover backends
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Tomb committed Jun 14, 2021
1 parent 7467745 commit 5aa184b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions src/SAWScript/Prover/Exporter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@ withABCVerilog baseName t buildCmd =
-- file.
writeAIG_SATviaVerilog :: FilePath -> SATQuery -> TopLevel ()
writeAIG_SATviaVerilog f query =
getSharedContext >>= \sc ->
writeAIGviaVerilog f =<< liftIO (satQueryAsTerm sc query)
do sc <- getSharedContext
t <- liftIO (satQueryAsTerm sc query)
writeAIGviaVerilog f t

-- | Write a @Term@ representing a an arbitrary function to an AIG file
-- by using ABC to convert a Verilog file.
Expand All @@ -170,8 +171,9 @@ writeAIGviaVerilog aigFile t =
-- file.
writeCNF_SATviaVerilog :: FilePath -> SATQuery -> TopLevel ()
writeCNF_SATviaVerilog f query =
getSharedContext >>= \sc ->
writeCNFviaVerilog f =<< liftIO (satQueryAsTerm sc query)
do sc <- getSharedContext
t <- liftIO (satQueryAsTerm sc query)
writeCNFviaVerilog f t

-- | Write a @Term@ representing a an arbitrary function to a CNF file
-- by using ABC to convert a Verilog file.
Expand Down
4 changes: 2 additions & 2 deletions src/SAWScript/Prover/SBV.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ proveUnintSBV ::
TopLevel (Maybe CEX, SolverStats)
-- ^ (example/counter-example, solver statistics)
proveUnintSBV conf unintSet timeout goal =
getSharedContext >>= \sc ->
io $ proveUnintSBVIO sc conf unintSet timeout goal
do sc <- getSharedContext
io $ proveUnintSBVIO sc conf unintSet timeout goal

proveUnintSBVIO ::
SharedContext ->
Expand Down

0 comments on commit 5aa184b

Please sign in to comment.