-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(BV): Display BV constants using hexadecimal
We currently always print bit-vector constants using binary representation. This can lead to quite large values in models when using 32- or 64-bit values that are essentially unreadable. When the bit-vector width is a multiple of 4, this patch uses hexadecimal notation instead, as allowed by the SMT-LIB specification. Note that this only applies to bit-vector terms; bit-vector semantic values are always printed in their binary representation for debugging purposes.
- Loading branch information
1 parent
f379389
commit c8fb1fb
Showing
9 changed files
with
15 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
unknown | ||
( | ||
(define-fun x () (_ BitVec 4) #b0111) | ||
(define-fun x () (_ BitVec 4) #x7) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
unknown | ||
( | ||
(define-fun x () (_ BitVec 8) #b10100101) | ||
(define-fun y () (_ BitVec 8) #b01011010) | ||
(define-fun x () (_ BitVec 8) #xa5) | ||
(define-fun y () (_ BitVec 8) #x5a) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
unknown | ||
( | ||
(define-fun x () (_ BitVec 8) #b00000101) | ||
(define-fun x () (_ BitVec 8) #x05) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
unknown | ||
( | ||
(define-fun x () (_ BitVec 8) #b11111111) | ||
(define-fun y () (_ BitVec 8) #b11111111) | ||
(define-fun x () (_ BitVec 8) #xff) | ||
(define-fun y () (_ BitVec 8) #xff) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
unknown | ||
( | ||
(define-fun x () (_ BitVec 8) #b11110101) | ||
(define-fun x () (_ BitVec 8) #xf5) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
unknown | ||
( | ||
(define-fun x () (_ BitVec 8) #b00000000) | ||
(define-fun y () (_ BitVec 8) #b10100101) | ||
(define-fun x () (_ BitVec 8) #x00) | ||
(define-fun y () (_ BitVec 8) #xa5) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
unknown | ||
( | ||
(define-fun x () (_ BitVec 8) #b11110000) | ||
(define-fun x () (_ BitVec 8) #xf0) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
unknown | ||
( | ||
(define-fun x () (_ BitVec 4) #b0101) | ||
(define-fun x () (_ BitVec 4) #x5) | ||
) |