Skip to content

add a netlist_boolbvt member to convert_trans_to_netlistt #1101

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
May 11, 2025
Merged
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
19 changes: 7 additions & 12 deletions src/trans-netlist/trans_to_netlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Author: Daniel Kroening, [email protected]
#include "aig_prop.h"
#include "instantiate_netlist.h"
#include "netlist.h"
#include "netlist_boolbv.h"

#include <algorithm>

Expand All @@ -47,7 +48,8 @@ class convert_trans_to_netlistt:public messaget
symbol_table(_symbol_table),
ns(_symbol_table),
dest(_dest),
aig_prop(dest, _message_handler)
aig_prop(dest, _message_handler),
solver(ns, aig_prop, _message_handler, dest.var_map)
{
}

Expand All @@ -61,6 +63,7 @@ class convert_trans_to_netlistt:public messaget
const namespacet ns;
netlistt &dest;
aig_prop_constraintt aig_prop;
netlist_boolbvt solver;

literalt new_input();
std::size_t input_counter = 0;
Expand Down Expand Up @@ -320,8 +323,7 @@ void convert_trans_to_netlistt::operator()(
transition_constraints.end());

// initial state
dest.initial.push_back(instantiate_convert(
aig_prop, dest.var_map, trans.init(), ns, get_message_handler()));
dest.initial.push_back(solver.convert(trans.init()));

// properties
for(const auto &[id, property_expr] : properties)
Expand Down Expand Up @@ -380,8 +382,7 @@ void convert_trans_to_netlistt::convert_constraints()
it!=constraint_list.end();
it++)
{
literalt l = instantiate_convert(
aig_prop, dest.var_map, *it, ns, get_message_handler());
literalt l = solver.convert(*it);

if(has_subexpr(*it, ID_next_symbol))
transition_constraints.push_back(l);
Expand Down Expand Up @@ -571,13 +572,7 @@ literalt convert_trans_to_netlistt::convert_rhs(const rhst &rhs)
rhs_entry.converted=true;

// now we can convert
instantiate_convert(
aig_prop,
dest.var_map,
rhs_entry.expr,
ns,
get_message_handler(),
rhs_entry.bv);
rhs_entry.bv = solver.convert_bv(rhs_entry.expr);

DATA_INVARIANT(rhs_entry.bv.size() == rhs_entry.width, "bit-width match");
}
Expand Down
Loading