Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
d-xo committed Nov 14, 2023
1 parent 1f3e71d commit 6fc3ca7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ cradle:
component: "lib:act"
- path: "src/CLI"
component: "exe:act"
- path: "src/test"
- path: "src/Test"
component: "test:test"
5 changes: 5 additions & 0 deletions src/Act/Decompile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ summarize solvers contract = do
-- Arithmetic Safety --------------------------------------------------------------------------------


-- | Transforms an EVM Expr into a form that it can be safely represented using
-- an integer encoding. This basically makes all potential points of wrapping
-- due to under/overflow explicit in the tree. This can certainly be made
-- significantly more efficient and precise (abstract interpretation?), but
-- this rather brute force attempt should be sound for now.
makeIntSafe :: SolverGroup -> EVM.Expr a -> IO (EVM.Expr a)
makeIntSafe solvers expr = evalStateT (mapExprM go expr) mempty
where
Expand Down
4 changes: 3 additions & 1 deletion src/Test/Decompile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,7 @@ checkDecompilation contract src = do
prettyErrs (prettyAct s) (NE.toList es)
putStrLn (prettyAct s)
assertBool "decompiled output does not typecheck" False
Success _ -> assertBool "" True
Success _ -> do
--putStrLn (prettyAct s)
assertBool "" True

0 comments on commit 6fc3ca7

Please sign in to comment.