Skip to content

Commit

Permalink
More debug printing, enabling tests
Browse files Browse the repository at this point in the history
  • Loading branch information
msooseth committed Nov 25, 2024
1 parent e155fb7 commit c8bd6b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/EVM/SymExec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,10 @@ verify solvers opts preState maybepost = do
-- Dispatch the remaining branches to the solver to check for violations
results <- flip mapConcurrently withQueries $ \(query, leaf) -> do
res <- checkSat solvers query
when conf.debug $ putStrLn $ " SMT result: " <> show res
pure (res, leaf)
let cexs = filter (\(res, _) -> not . isUnsat $ res) results
when conf.debug $ putStrLn $ " Found " <> show (length cexs) <> " potential counterexample(s) in call " <> call
pure $ if Prelude.null cexs then (expr, [Qed ()]) else (expr, fmap toVRes cexs)
where
getCallPrefix :: Expr Buf -> String
Expand Down
4 changes: 2 additions & 2 deletions test/test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1768,7 +1768,7 @@ tests = testGroup "hevm"
check coinbase (SymAddr "coinbase")
check a (SymAddr "freshSymAddr1")
check arg (SymAddr "arg1")
, ignoreTest $ test "vm.load fails for a potentially aliased address" $ do
, test "vm.load fails for a potentially aliased address" $ do
Just c <- solcRuntime "C"
[i|
interface Vm {
Expand All @@ -1784,7 +1784,7 @@ tests = testGroup "hevm"
(_, [Cex _]) <- withDefaultSolver $ \s ->
verifyContract s c Nothing [] defaultVeriOpts Nothing (Just $ checkBadCheatCode "load(address,bytes32)")
pure ()
, ignoreTest $ test "vm.store fails for a potentially aliased address" $ do
, test "vm.store fails for a potentially aliased address" $ do
Just c <- solcRuntime "C"
[i|
interface Vm {
Expand Down

0 comments on commit c8bd6b7

Please sign in to comment.