File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,6 +86,8 @@ executable act
8686 main-is : Main.hs
8787 hs-source-dirs : src/CLI
8888 default-language : Haskell2010
89+ -- Enable multicore execution, using all available cores by default.
90+ ghc-options : -threaded "-with-rtsopts=-N"
8991 build-depends : act
9092 if os(darwin)
9193 extra-libraries : c++
Original file line number Diff line number Diff line change @@ -215,7 +215,14 @@ equivCheck actspec sol' vy' code' initcode' layout' sources' solver' timeout deb
215215 checkTypeConstraints specsContents solver' timeout debug' constraints
216216 checkUpdateAliasing (Act store contracts) solver' timeout debug'
217217 cmap <- createContractMap contracts inputsMap
218- res <- runEnv (Env config) $ Solvers. withSolvers solver' cores 1 (naturalFromInteger <$> timeout) $ \ solvers ->
218+ -- --smttimeout is documented (and used by `act type`) in milliseconds,
219+ -- but withSolvers takes seconds: hevm's mkTimeout multiplies by 1000 for
220+ -- the solver flag. Passing milliseconds through unconverted turned a 60s
221+ -- budget into 60000s, so hard queries never timed out - they blocked the
222+ -- solver instance until the whole run was abandoned. Round up so small
223+ -- values do not become 0 (no limit).
224+ let timeoutSecs = (\ t -> naturalFromInteger (max 1 ((t + 999 ) `div` 1000 ))) <$> timeout
225+ res <- runEnv (Env config) $ Solvers. withSolvers solver' cores 1 timeoutSecs $ \ solvers ->
219226 checkContracts solvers store cmap
220227 case res of
221228 Success _ -> pure ()
You can’t perform that action at this time.
0 commit comments