Skip to content

Commit

Permalink
Cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
msooseth committed Jan 13, 2025
1 parent 0a81607 commit 53455bf
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/EVM.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2993,16 +2993,17 @@ instance VMOps Symbolic where
assign #result Nothing
case (length concVals) of
0 -> continue Nothing
1 -> runOne (head concVals)
_ -> choose . PleaseChoosePath ewordExpr $ doit concVals
1 -> runOne $ head concVals
_ -> choose . PleaseChoosePath ewordExpr $ runMore concVals
Nothing -> continue Nothing
where
doit vals leftOrRight = do
case (length vals) of
2 -> if leftOrRight then runOne (head vals)
runMore vals leftOrRight = do
case length vals of
-- if 2, we run both, otherwise, we run 1st and run ourselves with the rest
2 -> if leftOrRight then runOne $ head vals
else runOne (head $ tail vals)
_ -> if leftOrRight then runOne (head vals)
else choose . PleaseChoosePath ewordExpr $ doit (tail vals)
_ -> if leftOrRight then runOne $ head vals
else choose . PleaseChoosePath ewordExpr $ runMore (tail vals)
runOne val = do
assign #result Nothing
pushTo #constraints $ Expr.simplifyProp (ewordExpr .== (Lit val))
Expand Down

0 comments on commit 53455bf

Please sign in to comment.