Skip to content

Commit 4f26892

Browse files
authored
Merge pull request #1010 from diffblue/netlist-smv-not-translated
SMV netlist: mark properties that were not translated
2 parents 3e92aeb + b6582e4 commit 4f26892

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

src/trans-netlist/netlist.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,14 @@ void netlistt::output_smv(std::ostream &out) const
368368
print_smv(out, std::get<GFpt>(property).p);
369369
out << '\n';
370370
}
371+
else if(std::holds_alternative<not_translatedt>(property))
372+
{
373+
out << "-- " << id << '\n';
374+
out << "-- not translated\n";
375+
out << '\n';
376+
}
377+
else
378+
UNREACHABLE;
371379
}
372380
}
373381

src/trans-netlist/netlist.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ class netlistt:public aig_plus_constraintst
6363
literalt p;
6464
};
6565

66-
using propertyt = std::variant<Gpt, GFpt>;
66+
struct not_translatedt
67+
{
68+
};
69+
70+
using propertyt = std::variant<Gpt, GFpt, not_translatedt>;
6771

6872
// map from property ID to property netlist nodes
6973
using propertiest = std::map<irep_idt, propertyt>;

src/trans-netlist/trans_to_netlist.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,13 +385,20 @@ void convert_trans_to_netlistt::operator()(
385385
else
386386
{
387387
// unsupported
388+
dest.properties.emplace(id, netlistt::not_translatedt{});
388389
}
389390
}
390391
else
391392
{
392393
// unsupported
394+
dest.properties.emplace(id, netlistt::not_translatedt{});
393395
}
394396
}
397+
else
398+
{
399+
// unsupported
400+
dest.properties.emplace(id, netlistt::not_translatedt{});
401+
}
395402
}
396403

397404
// find the nondet nodes

0 commit comments

Comments
 (0)