{
public:
merger_fact_visitor (const constraint_manager *cm_b,
- constraint_manager *out,
- const model_merger &merger)
- : m_cm_b (cm_b), m_out (out), m_merger (merger)
+ constraint_manager *out)
+ : m_cm_b (cm_b), m_out (out)
{}
void on_fact (const svalue *lhs, enum tree_code code, const svalue *rhs)
private:
const constraint_manager *m_cm_b;
constraint_manager *m_out;
- const model_merger &m_merger;
};
/* Use MERGER to merge CM_A and CM_B into *OUT.
void
constraint_manager::merge (const constraint_manager &cm_a,
const constraint_manager &cm_b,
- constraint_manager *out,
- const model_merger &merger)
+ constraint_manager *out)
{
/* Merge the equivalence classes and constraints.
The easiest way to do this seems to be to enumerate all of the facts
in cm_a, see which are also true in cm_b,
and add those to *OUT. */
- merger_fact_visitor v (&cm_b, out, merger);
+ merger_fact_visitor v (&cm_b, out);
cm_a.for_each_fact (&v);
}
static void merge (const constraint_manager &cm_a,
const constraint_manager &cm_b,
- constraint_manager *out,
- const model_merger &merger);
+ constraint_manager *out);
void for_each_fact (fact_visitor *) const;
/* sm_state_map's ctor. */
-sm_state_map::sm_state_map (const state_machine &sm, int sm_idx)
-: m_sm (sm), m_sm_idx (sm_idx), m_map (), m_global_state (sm.get_start_state ())
+sm_state_map::sm_state_map (const state_machine &sm)
+: m_sm (sm), m_map (), m_global_state (sm.get_start_state ())
{
}
const int num_states = ext_state.get_num_checkers ();
for (int i = 0; i < num_states; i++)
{
- sm_state_map *sm = new sm_state_map (ext_state.get_sm (i), i);
+ sm_state_map *sm = new sm_state_map (ext_state.get_sm (i));
m_checker_states.quick_push (sm);
}
}
const svalue *y_sval = model.get_rvalue (y, NULL);
const svalue *z_sval = model.get_rvalue (z, NULL);
- sm_state_map map (*sm, 0);
+ sm_state_map map (*sm);
ASSERT_TRUE (map.is_empty_p ());
ASSERT_EQ (map.get_state (x_sval, ext_state), start);
const svalue *y_sval = model.get_rvalue (y, NULL);
const svalue *z_sval = model.get_rvalue (z, NULL);
- sm_state_map map (*sm, 0);
+ sm_state_map map (*sm);
ASSERT_TRUE (map.is_empty_p ());
ASSERT_EQ (map.get_state (x_sval, ext_state), start);
ASSERT_EQ (map.get_state (y_sval, ext_state), start);
const svalue *y_sval = model.get_rvalue (y, NULL);
const svalue *z_sval = model.get_rvalue (z, NULL);
- sm_state_map map0 (*sm, 0);
- sm_state_map map1 (*sm, 0);
- sm_state_map map2 (*sm, 0);
+ sm_state_map map0 (*sm);
+ sm_state_map map1 (*sm);
+ sm_state_map map2 (*sm);
ASSERT_EQ (map0.hash (), map1.hash ());
ASSERT_EQ (map0, map1);
const state_machine::state_t TEST_STATE_2 = &test_state_2;
const state_machine::state test_state_3 ("test state 3", 3);
const state_machine::state_t TEST_STATE_3 = &test_state_3;
- sm_state_map map0 (*sm, 0);
- sm_state_map map1 (*sm, 0);
- sm_state_map map2 (*sm, 0);
+ sm_state_map map0 (*sm);
+ sm_state_map map1 (*sm);
+ sm_state_map map2 (*sm);
ASSERT_EQ (map0.hash (), map1.hash ());
ASSERT_EQ (map0, map1);
typedef hash_map <const svalue *, entry_t> map_t;
typedef map_t::iterator iterator_t;
- sm_state_map (const state_machine &sm, int m_sm_idx);
+ sm_state_map (const state_machine &sm);
sm_state_map *clone () const;
private:
const state_machine &m_sm;
- int m_sm_idx;
map_t m_map;
state_machine::state_t m_global_state;
};
namespace ana {
-reachable_regions::reachable_regions (region_model *model,
- region_model_manager *mgr)
-: m_model (model), m_store (model->get_store ()), m_mgr (mgr),
+reachable_regions::reachable_regions (region_model *model)
+: m_model (model), m_store (model->get_store ()),
m_reachable_base_regs (), m_mutable_base_regs ()
{
}
class reachable_regions
{
public:
- reachable_regions (region_model *model, region_model_manager *mgr);
+ reachable_regions (region_model *model);
/* Callback called for each cluster when initializing this object. */
static void init_cluster_cb (const region *base_reg,
private:
region_model *m_model;
store *m_store;
- region_model_manager *m_mgr;
/* The base regions already seen. */
hash_set<const region *> m_reachable_base_regs;
{
tree fndecl = get_fndecl_for_call (call, ctxt);
- reachable_regions reachable_regs (this, m_mgr);
+ reachable_regions reachable_regs (this);
/* Determine the reachable regions and their mutability. */
{
region_model::get_reachable_svalues (svalue_set *out,
const svalue *extra_sval)
{
- reachable_regions reachable_regs (this, m_mgr);
+ reachable_regions reachable_regs (this);
/* Add globals and regions that already escaped in previous
unknown calls. */
/* Merge constraints. */
constraint_manager::merge (*m_constraints,
*other_model.m_constraints,
- out_model->m_constraints,
- m);
+ out_model->m_constraints);
return true;
}