Skip to content

Commit 6fffef3

Browse files
jbertholdanvacaru
andauthored
add simplification to mcd-structured verification module (buf ==K nullbytes) (#2828)
Co-authored-by: Andrei Văcaru <16517508+anvacaru@users.noreply.github.com>
1 parent d46a9db commit 6fffef3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/specs/mcd-structured/verification.k

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,4 +401,11 @@ module LEMMAS-MCD [symbolic]
401401
rule #if B #then C #else D #fi => C requires B [simplification]
402402
rule #if B #then C #else D #fi => C requires notBool B [simplification]
403403

404+
// #buf simplification comparing to null-bytes: compare as Int
405+
rule #buf(N, X:Int) ==K NULLBYTES => X ==Int 0
406+
requires 0 <=Int X
407+
andBool X <=Int 2 ^Int ( 8 *Int N)
408+
andBool #asInteger(NULLBYTES) ==Int 0
409+
[simplification, concrete(NULLBYTES)]
410+
404411
endmodule

0 commit comments

Comments
 (0)