Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/specs/mcd-structured/verification.k
Original file line number Diff line number Diff line change
Expand Up @@ -401,4 +401,11 @@ module LEMMAS-MCD [symbolic]
rule #if B #then C #else D #fi => C requires B [simplification]
rule #if B #then C #else D #fi => C requires notBool B [simplification]

// #buf simplification comparing to null-bytes: compare as Int
rule #buf(N, X:Int) ==K NULLBYTES => X ==Int 0
requires 0 <=Int X
andBool X <=Int 2 ^Int ( 8 *Int N)
andBool #asInteger(NULLBYTES) ==Int 0
[simplification, concrete(NULLBYTES)]
Comment on lines +404 to +409
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jberthold shouldn't this be X <Int 2 ^Int (8 *Int N), not <=Int?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right, should be <Int, sorry for that. I'll make a PR to correct it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about it, we would also want length(NULLBYTES) ==Int N (and 0 <=Int N but that's implied by the former), as well as preserves-definedness.


endmodule