-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds an aval/bval encoding for 4-valued bitwise NOT expressions.
- Loading branch information
Showing
5 changed files
with
51 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CORE | ||
bitwise_not1.sv | ||
--bound 0 | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
-- | ||
^warning: ignoring |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module main; | ||
|
||
assert final (~0 === 'hffff_ffff); | ||
assert final (~1 === 'hffff_fffe); | ||
assert final (~(-('sd1)) === 0); | ||
assert final (~3'b101 === 3'b010); | ||
assert final (~3'bxxx === 3'bxxx); | ||
assert final (~3'bzzz === 3'bxxx); | ||
assert final (~3'b10x === 3'b01x); | ||
assert final (~3'b10z === 3'b01x); | ||
|
||
endmodule |
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 |
---|---|---|
|
@@ -9,6 +9,7 @@ Author: Daniel Kroening, [email protected] | |
#ifndef CPROVER_VERILOG_AVAL_BVAL_H | ||
#define CPROVER_VERILOG_AVAL_BVAL_H | ||
|
||
#include <util/bitvector_expr.h> | ||
#include <util/bitvector_types.h> | ||
#include <util/mathematical_expr.h> | ||
|
||
|
@@ -46,6 +47,8 @@ exprt aval_bval(const verilog_logical_inequality_exprt &); | |
|
||
/// lowering for ! | ||
exprt aval_bval(const not_exprt &); | ||
/// lowering for ~ | ||
exprt aval_bval(const bitnot_exprt &); | ||
/// lowering for ==? | ||
exprt aval_bval(const verilog_wildcard_equality_exprt &); | ||
/// lowering for !=? | ||
|
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