Skip to content

Commit 555f415

Browse files
committed
weak, strong and implicit SVA sequence properties are SVA operators
is_SVA_operator(...) now recognizes weak, strong and implicit SVA sequence properties.
1 parent aac75f1 commit 555f415

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed

src/ebmc/completeness_threshold.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ bool has_low_completeness_threshold(const exprt &expr)
6363
upper_int <= 1;
6464
}
6565
}
66+
else if(
67+
expr.id() == ID_sva_strong || expr.id() == ID_sva_weak ||
68+
expr.id() == ID_sva_sequence_property)
69+
{
70+
auto &sequence = to_sva_sequence_property_expr_base(expr).sequence();
71+
if(!is_SVA_sequence_operator(sequence))
72+
return true;
73+
else
74+
return false;
75+
}
6676
else
6777
return false;
6878
}

src/temporal-logic/temporal_logic.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ bool is_SVA_operator(const exprt &expr)
132132
id == ID_sva_overlapped_implication ||
133133
id == ID_sva_non_overlapped_implication ||
134134
id == ID_sva_overlapped_followed_by ||
135-
id == ID_sva_nonoverlapped_followed_by;
135+
id == ID_sva_nonoverlapped_followed_by ||
136+
id == ID_sva_sequence_property || id == ID_sva_weak ||
137+
id == ID_sva_strong;
136138
}
137139

138140
bool is_SVA(const exprt &expr)

src/trans-word-level/property.cpp

+16-3
Original file line numberDiff line numberDiff line change
@@ -527,10 +527,23 @@ static obligationst property_obligations_rec(
527527
return property_obligations_rec(
528528
op_negated_opt.value(), current, no_timeframes);
529529
}
530-
else if(is_SVA_sequence_operator(op))
530+
else if(
531+
op.id() == ID_sva_strong || op.id() == ID_sva_weak ||
532+
op.id() == ID_sva_sequence_property)
531533
{
532-
return obligationst{
533-
instantiate_property(property_expr, current, no_timeframes)};
534+
// The sequence must not match.
535+
auto &sequence = to_sva_sequence_property_expr_base(op).sequence();
536+
537+
const auto matches =
538+
instantiate_sequence(sequence, current, no_timeframes);
539+
obligationst obligations;
540+
541+
for(auto &match : matches)
542+
{
543+
obligations.add(match.end_time, not_exprt{match.condition});
544+
}
545+
546+
return obligations;
534547
}
535548
else if(is_temporal_operator(op))
536549
{

0 commit comments

Comments
 (0)