-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
word-level BMC: allow SVA and/or/implies at property level
- Loading branch information
Showing
6 changed files
with
94 additions
and
6 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,8 @@ | ||
CORE | ||
sva_iff2.sv | ||
--bound 10 | ||
^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,11 @@ | ||
module main(input a, b); | ||
|
||
// p0: assert property ((always a) iff (always a)); | ||
p1: assert property ((eventually[0:1] a) iff (eventually[0:1] a)); | ||
// p2: assert property ((s_eventually a) iff (s_eventually a)); | ||
p3: assert property ((a until b) iff (a until b)); | ||
// p4: assert property ((a s_until b) iff (a s_until a)); | ||
p5: assert property ((a until_with b) iff (a until_with b)); | ||
p6: assert property ((a s_until_with b) iff (a s_until_with a)); | ||
|
||
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
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 |
---|---|---|
|
@@ -12,7 +12,8 @@ Author: Daniel Kroening, [email protected] | |
|
||
#include <verilog/sva_expr.h> | ||
|
||
#include "instantiate_word_level.h" | ||
#include "obligations.h" | ||
#include "property.h" | ||
|
||
std::vector<std::pair<mp_integer, exprt>> instantiate_sequence( | ||
exprt expr, | ||
|
@@ -153,13 +154,14 @@ std::vector<std::pair<mp_integer, exprt>> instantiate_sequence( | |
// 3. The end time of the composite sequence is | ||
// the end time of the operand sequence that completes last. | ||
// Condition (3) is TBD. | ||
exprt::operandst conjuncts; | ||
obligationst obligations; | ||
|
||
for(auto &op : expr.operands()) | ||
conjuncts.push_back(instantiate_property(op, t, no_timeframes).second); | ||
{ | ||
obligations.add(property_obligations(op, t, no_timeframes)); | ||
} | ||
|
||
exprt condition = conjunction(conjuncts); | ||
return {{t, condition}}; | ||
return {obligations.conjunction()}; | ||
} | ||
else if(expr.id() == ID_sva_or) | ||
{ | ||
|
@@ -177,6 +179,7 @@ std::vector<std::pair<mp_integer, exprt>> instantiate_sequence( | |
else | ||
{ | ||
// not a sequence, evaluate as state predicate | ||
return {instantiate_property(expr, t, no_timeframes)}; | ||
auto obligations = property_obligations(expr, t, no_timeframes); | ||
return {obligations.conjunction()}; | ||
} | ||
} |