@@ -241,30 +241,37 @@ void smv_netlist(const netlistt &netlist, std::ostream &out)
241
241
242
242
for (auto &[id, netlist_expr] : netlist.properties )
243
243
{
244
- if (is_CTL (netlist_expr))
244
+ if (!netlist_expr.has_value ())
245
+ {
246
+ // translation has failed
247
+ out << " -- " << id << ' \n ' ;
248
+ out << " -- not translated\n " ;
249
+ out << ' \n ' ;
250
+ }
251
+ else if (is_CTL (*netlist_expr))
245
252
{
246
253
out << " -- " << id << ' \n ' ;
247
254
out << " CTLSPEC " ;
248
- print_smv (netlist, out, netlist_expr);
255
+ print_smv (netlist, out, * netlist_expr);
249
256
out << ' \n ' ;
250
257
}
251
- else if (is_LTL (netlist_expr))
258
+ else if (is_LTL (* netlist_expr))
252
259
{
253
260
out << " -- " << id << ' \n ' ;
254
261
out << " LTLSPEC " ;
255
- print_smv (netlist, out, netlist_expr);
262
+ print_smv (netlist, out, * netlist_expr);
256
263
out << ' \n ' ;
257
264
}
258
- else if (is_SVA (netlist_expr))
265
+ else if (is_SVA (* netlist_expr))
259
266
{
260
267
// Should have been mapped to LTL
261
268
DATA_INVARIANT (false , " smv_netlist got SVA" );
262
269
}
263
270
else
264
271
{
265
- // neither LTL nor CTL nor SVA
272
+ // translated to something we can't print
266
273
out << " -- " << id << ' \n ' ;
267
- out << " -- not translated \n " ;
274
+ out << " -- cannot output \n " ;
268
275
out << ' \n ' ;
269
276
}
270
277
}
0 commit comments