File tree Expand file tree Collapse file tree 5 files changed +91
-8
lines changed Expand file tree Collapse file tree 5 files changed +91
-8
lines changed Original file line number Diff line number Diff line change
1
+ CORE
2
+ BDD_SVA1.sv
3
+ --bdd
4
+ ^EXIT=10$
5
+ ^SIGNAL=0$
6
+ ^\[top\.property\.p0\] always top\.my_bit: PROVED$
7
+ ^\[top\.property\.p1\] always top\.my_bit: PROVED$
8
+ ^\[top\.property\.p2\] always \(top\.counter == 3 \|-> \(nexttime top\.counter == 4\)\): UNKNOWN$
9
+ ^\[top\.property\.p3\] always \(top\.counter == 3 \|=> top\.counter == 4\): PROVED$
10
+ ^\[top\.property\.p4\] always \(top\.counter == 3 \|=> \(nexttime top\.counter == 5\)\): UNKNOWN$
11
+ ^\[top\.property\.p5\] always eventually top\.counter == 8: UNKNOWN$
12
+ ^\[top\.property\.p6\] always \(top\.counter == 0 \|-> \(eventually top\.counter == 8\)\): UNKNOWN$
13
+ ^\[top\.property\.p7\] always \(top\.counter == 0 \|-> \(top\.counter <= 5 until top\.counter == 6\)\): UNKNOWN$
14
+ ^\[top\.property\.p8\] always \(top\.counter == 0 \|-> \(top\.counter <= 5 until_with top\.counter == 5\)\): UNKNOWN$
15
+ --
16
+ ^warning: ignoring
Original file line number Diff line number Diff line change
1
+ module top (input clock);
2
+
3
+ reg my_bit;
4
+ reg [31 : 0 ] counter;
5
+
6
+ initial my_bit= 1 ;
7
+ initial counter= 0 ;
8
+
9
+ always @ (posedge clock) begin
10
+ my_bit= my_bit;
11
+ counter= counter+ 1 ;
12
+ end
13
+
14
+ p0 : assert property (my_bit);
15
+ p1 : assert property (always my_bit);
16
+ p2 : assert property (counter== 3 | - > nexttime counter== 4 );
17
+ p3 : assert property (counter== 3 | => counter== 4 );
18
+ p4 : assert property (counter== 3 | => nexttime counter== 5 );
19
+ p5 : assert property (eventually counter== 8 );
20
+ p6 : assert property (counter== 0 | - > eventually counter== 8 );
21
+ p7 : assert property (counter== 0 | - > counter<= 5 until counter== 6 );
22
+ p8 : assert property (counter== 0 | - > counter<= 5 until_with counter== 5 );
23
+
24
+ endmodule
Original file line number Diff line number Diff line change @@ -419,12 +419,14 @@ void bdd_enginet::check_property(propertyt &property)
419
419
message.status () << " Checking " << property.name << messaget::eom;
420
420
property.status =propertyt::statust::UNKNOWN;
421
421
422
- // special treatment for always
422
+ // special treatment for AGp
423
+ auto is_AGp = [](const exprt &expr) {
424
+ return (expr.id () == ID_AG || expr.id () == ID_sva_always) &&
425
+ !has_temporal_operator (to_unary_expr (expr).op ());
426
+ };
423
427
424
- if (property.expr .id ()==ID_AG ||
425
- property.expr .id ()==ID_sva_always)
428
+ if (is_AGp (property.expr ))
426
429
{
427
- // recursive call
428
430
const exprt &sub_expr = to_unary_expr (property.expr ).op ();
429
431
BDD p=property2BDD (sub_expr);
430
432
@@ -491,7 +493,7 @@ void bdd_enginet::check_property(propertyt &property)
491
493
peak_bdd_nodes=std::max (peak_bdd_nodes, mgr.number_of_nodes ());
492
494
}
493
495
}
494
- else
496
+ else if (! has_temporal_operator (property. expr ))
495
497
{
496
498
// We check whether the BDD for the negation of the property
497
499
// contains an initial state.
Original file line number Diff line number Diff line change @@ -214,3 +214,45 @@ bool requires_lasso_constraints(const exprt &expr)
214
214
215
215
return false ;
216
216
}
217
+
218
+ /* ******************************************************************\
219
+
220
+ Function: has_temporal_operator
221
+
222
+ Inputs:
223
+
224
+ Outputs:
225
+
226
+ Purpose:
227
+
228
+ \*******************************************************************/
229
+
230
+ bool has_temporal_operator (const exprt &expr)
231
+ {
232
+ for (auto subexpr_it = expr.depth_cbegin (), subexpr_end = expr.depth_cend ();
233
+ subexpr_it != subexpr_end;
234
+ subexpr_it++)
235
+ {
236
+ // clang-format off
237
+ if (
238
+ subexpr_it->id () == ID_AG || subexpr_it->id () == ID_EG ||
239
+ subexpr_it->id () == ID_AF || subexpr_it->id () == ID_EF ||
240
+ subexpr_it->id () == ID_AX || subexpr_it->id () == ID_EX ||
241
+ subexpr_it->id () == ID_A || subexpr_it->id () == ID_E ||
242
+ subexpr_it->id () == ID_U || subexpr_it->id () == ID_R ||
243
+ subexpr_it->id () == ID_G || subexpr_it->id () == ID_F ||
244
+ subexpr_it->id () == ID_X ||
245
+ subexpr_it->id () == ID_sva_always || subexpr_it->id () == ID_sva_always ||
246
+ subexpr_it->id () == ID_sva_nexttime || subexpr_it->id () == ID_sva_s_nexttime ||
247
+ subexpr_it->id () == ID_sva_until || subexpr_it->id () == ID_sva_s_until ||
248
+ subexpr_it->id () == ID_sva_until_with || subexpr_it->id () == ID_sva_s_until_with ||
249
+ subexpr_it->id () == ID_sva_eventually ||
250
+ subexpr_it->id () == ID_sva_s_eventually)
251
+ {
252
+ return true ;
253
+ }
254
+ // clang-format on
255
+ }
256
+
257
+ return false ;
258
+ }
Original file line number Diff line number Diff line change @@ -38,8 +38,7 @@ symbol_exprt lasso_symbol(std::size_t k, std::size_t i);
38
38
// / Returns true iff the given property requires lasso constraints for BMC.
39
39
bool requires_lasso_constraints (const exprt &);
40
40
41
- // / Returns true iff the given property is a liveness property when
42
- // / given an infinite trace.
43
- bool is_liveness_property (const exprt &);
41
+ // / Returns true iff the given expression contains a temporal operator
42
+ bool has_temporal_operator (const exprt &);
44
43
45
44
#endif
You can’t perform that action at this time.
0 commit comments