Skip to content

SMV netlist: mark properties that were not translated #1010

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/trans-netlist/netlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,14 @@ void netlistt::output_smv(std::ostream &out) const
print_smv(out, std::get<GFpt>(property).p);
out << '\n';
}
else if(std::holds_alternative<not_translatedt>(property))
{
out << "-- " << id << '\n';
out << "-- not translated\n";
out << '\n';
}
else
UNREACHABLE;
}
}

Expand Down
6 changes: 5 additions & 1 deletion src/trans-netlist/netlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ class netlistt:public aig_plus_constraintst
literalt p;
};

using propertyt = std::variant<Gpt, GFpt>;
struct not_translatedt
{
};

using propertyt = std::variant<Gpt, GFpt, not_translatedt>;

// map from property ID to property netlist nodes
using propertiest = std::map<irep_idt, propertyt>;
Expand Down
7 changes: 7 additions & 0 deletions src/trans-netlist/trans_to_netlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,20 @@ void convert_trans_to_netlistt::operator()(
else
{
// unsupported
dest.properties.emplace(id, netlistt::not_translatedt{});
}
}
else
{
// unsupported
dest.properties.emplace(id, netlistt::not_translatedt{});
}
}
else
{
// unsupported
dest.properties.emplace(id, netlistt::not_translatedt{});
}
}

// find the nondet nodes
Expand Down
Loading