@@ -114,10 +114,29 @@ class liveness_to_safetyt
114
114
}
115
115
};
116
116
117
+ // / returns true iff the given property is supported
118
+ // / by the liveness-to-safety translation
119
+ static bool property_supported (const exprt &expr)
120
+ {
121
+ return expr.id () == ID_sva_always &&
122
+ (to_sva_always_expr (expr).op ().id () == ID_sva_eventually ||
123
+ to_sva_always_expr (expr).op ().id () == ID_sva_s_eventually);
124
+ }
125
+
126
+ static bool have_supported_property (const ebmc_propertiest &properties)
127
+ {
128
+ for (auto &property : properties.properties )
129
+ if (!property.is_disabled ())
130
+ if (property_supported (property.normalized_expr ))
131
+ return true ;
132
+
133
+ return false ;
134
+ }
135
+
117
136
void liveness_to_safetyt::operator ()()
118
137
{
119
- // Do we have a liveness property?
120
- if (!properties. requires_lasso_constraints ( ))
138
+ // Do we have a supported property?
139
+ if (!have_supported_property (properties ))
121
140
return ; // no
122
141
123
142
// gather the state variables
@@ -231,15 +250,10 @@ void liveness_to_safetyt::operator()()
231
250
232
251
for (auto &property : properties.properties )
233
252
{
234
- if (!property.is_disabled () && property. requires_lasso_constraints () )
253
+ if (!property.is_disabled ())
235
254
{
236
255
// We want GFp.
237
- if (
238
- property.normalized_expr .id () == ID_sva_always &&
239
- (to_sva_always_expr (property.normalized_expr ).op ().id () ==
240
- ID_sva_eventually ||
241
- to_sva_always_expr (property.normalized_expr ).op ().id () ==
242
- ID_sva_s_eventually))
256
+ if (property_supported (property.normalized_expr ))
243
257
{
244
258
translate_GFp (property);
245
259
}
0 commit comments