Skip to content

Commit

Permalink
Merge pull request #464 from ethereum/por-pand-rules
Browse files Browse the repository at this point in the history
Adding POr and PAnd rules
  • Loading branch information
msooseth authored Mar 6, 2024
2 parents 5d1ce43 + 330cc38 commit 67a06eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Changed

## Added
- More POr and PAnd rules

## Fixed
- `concat` is a 2-ary, not an n-ary function in SMT2LIB, declare-const does not exist in QF_AUFBV, replacing
Expand Down
4 changes: 4 additions & 0 deletions src/EVM/Expr.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1202,9 +1202,13 @@ simplifyProp prop =
go (PAnd (PBool l) (PBool r)) = PBool (l && r)
go (PAnd (PBool False) _) = PBool False
go (PAnd _ (PBool False)) = PBool False
go (PAnd (PBool True) x) = x
go (PAnd x (PBool True)) = x
go (POr (PBool True) _) = PBool True
go (POr _ (PBool True)) = PBool True
go (POr (PBool l) (PBool r)) = PBool (l || r)
go (POr x (PBool False)) = x
go (POr (PBool False) x) = x

-- Imply
go (PImpl _ (PBool True)) = PBool True
Expand Down

0 comments on commit 67a06eb

Please sign in to comment.