I have written a property
with logic rose(a) |-> ##[1:] ($rose(b) || $rose (c)) |-> ( (c&~d) || (b&d));
Expectation is : On rose of a , wait for rose of b or c , whichever comes first , if b came, d should be 1. if c came d should be zero.
Issue Faced :
in case of rose of a followed by rose of b followed by rose of c , assertion fails at rose of c.
But shouldn’t rose of b kill that thread which was triggered on rose of a.
In reply to aman_intel:
If a multi-threaded sequence is used in an antecedent (e.g., a ##1 b[*1:3] ##1 c |-> d), then all threads must be tested with its consequent for the assertion to terminate as successful.
Two possibles fixed:
Use first_match()
Use the goto operator ( expr[->1] )
On style, use logical operator (e.g., &&, !) instead of bitwise operators (e.g., &, ~)
$rose(a) |-> first_match(##[1:$] ($rose(b) || $rose (c))) |-> (c&& !d) || (b &&d)
// I prefer the goto in this case
$rose(a) |-> (($rose(b) || $rose (c)))[->1] |-> (c&& !d) || (b &&d)
In general, I see no need to break the property (sequence2 |-> sequence3) as 2 sequences with an implication operator. I generally prefer to change that to (sequence2 ##0 sequence3)
The differences between the two is vacuity.
sequence1 |-> sequence2 |-> sequence3 // vacuous if sequence2 is a non_match
sequence1 |-> sequence2 ##0 sequence3 // Fail if sequence2 is a non_match