@@ -25,6 +25,7 @@ Author: Daniel Kroening, kroening@kroening.com
2525#include " aig_prop.h"
2626#include " instantiate_netlist.h"
2727#include " netlist.h"
28+ #include " netlist_boolbv.h"
2829
2930#include < algorithm>
3031
@@ -47,7 +48,8 @@ class convert_trans_to_netlistt:public messaget
4748 symbol_table (_symbol_table),
4849 ns(_symbol_table),
4950 dest(_dest),
50- aig_prop(dest, _message_handler)
51+ aig_prop(dest, _message_handler),
52+ solver(ns, aig_prop, _message_handler, dest.var_map)
5153 {
5254 }
5355
@@ -61,6 +63,7 @@ class convert_trans_to_netlistt:public messaget
6163 const namespacet ns;
6264 netlistt &dest;
6365 aig_prop_constraintt aig_prop;
66+ netlist_boolbvt solver;
6467
6568 literalt new_input ();
6669 std::size_t input_counter = 0 ;
@@ -320,8 +323,7 @@ void convert_trans_to_netlistt::operator()(
320323 transition_constraints.end ());
321324
322325 // initial state
323- dest.initial .push_back (instantiate_convert (
324- aig_prop, dest.var_map , trans.init (), ns, get_message_handler ()));
326+ dest.initial .push_back (solver.convert (trans.init ()));
325327
326328 // properties
327329 for (const auto &[id, property_expr] : properties)
@@ -380,8 +382,7 @@ void convert_trans_to_netlistt::convert_constraints()
380382 it!=constraint_list.end ();
381383 it++)
382384 {
383- literalt l = instantiate_convert (
384- aig_prop, dest.var_map , *it, ns, get_message_handler ());
385+ literalt l = solver.convert (*it);
385386
386387 if (has_subexpr (*it, ID_next_symbol))
387388 transition_constraints.push_back (l);
@@ -571,13 +572,7 @@ literalt convert_trans_to_netlistt::convert_rhs(const rhst &rhs)
571572 rhs_entry.converted =true ;
572573
573574 // now we can convert
574- instantiate_convert (
575- aig_prop,
576- dest.var_map ,
577- rhs_entry.expr ,
578- ns,
579- get_message_handler (),
580- rhs_entry.bv );
575+ rhs_entry.bv = solver.convert_bv (rhs_entry.expr );
581576
582577 DATA_INVARIANT (rhs_entry.bv .size () == rhs_entry.width , " bit-width match" );
583578 }
0 commit comments