Skip to content

Commit

Permalink
*: port last dirty lemma, and delete file
Browse files Browse the repository at this point in the history
  • Loading branch information
asymmetric committed May 5, 2020
1 parent 3ebae74 commit d2a43d4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
3 changes: 0 additions & 3 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"rules": [
"./src/storage.k.md",
"./src/lemmas.k.md"
],
"dirty_rules": [
"./src/dirty_lemmas.k.md"
]
},
"implementations": {
Expand Down
6 changes: 0 additions & 6 deletions src/dirty_lemmas.k.md

This file was deleted.

14 changes: 14 additions & 0 deletions src/lemmas.k.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,20 @@ rule (B |Int (notMaxUInt160 &Int A)) => B
andBool (#rangeAddress(A) orBool #rangeUInt(256, A))
```

## Z3 non-determinism

Sometimes, the result of a Z3 query is non-deterministic. In the case below, Z3
is sometimes able to deduce that `chop(X) => X`, but other times it isn't.

This lemma ensures that we always drop the `chop`, when the constraints are satisfied.

```k
rule chop(((pow112 *Int A) /Int B) *Int X) => ((pow112 *Int A) /Int B) *Int X
requires A <Int pow112
andBool B >Int 0
andBool X <Int pow32
```

## Packed Words In Memory

Sometimes solidity will try and read a Word from memory containing unaligned data. In that case `K`
Expand Down

0 comments on commit d2a43d4

Please sign in to comment.