@@ -241,30 +241,37 @@ void smv_netlist(const netlistt &netlist, std::ostream &out)
241241
242242 for (auto &[id, netlist_expr] : netlist.properties )
243243 {
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))
245252 {
246253 out << " -- " << id << ' \n ' ;
247254 out << " CTLSPEC " ;
248- print_smv (netlist, out, netlist_expr);
255+ print_smv (netlist, out, * netlist_expr);
249256 out << ' \n ' ;
250257 }
251- else if (is_LTL (netlist_expr))
258+ else if (is_LTL (* netlist_expr))
252259 {
253260 out << " -- " << id << ' \n ' ;
254261 out << " LTLSPEC " ;
255- print_smv (netlist, out, netlist_expr);
262+ print_smv (netlist, out, * netlist_expr);
256263 out << ' \n ' ;
257264 }
258- else if (is_SVA (netlist_expr))
265+ else if (is_SVA (* netlist_expr))
259266 {
260267 // Should have been mapped to LTL
261268 DATA_INVARIANT (false , " smv_netlist got SVA" );
262269 }
263270 else
264271 {
265- // neither LTL nor CTL nor SVA
272+ // translated to something we can't print
266273 out << " -- " << id << ' \n ' ;
267- out << " -- not translated \n " ;
274+ out << " -- cannot output \n " ;
268275 out << ' \n ' ;
269276 }
270277 }
0 commit comments