File tree 2 files changed +19
-8
lines changed
2 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -274,6 +274,14 @@ class ait:public ai_baset
274
274
ai_baset::clear ();
275
275
}
276
276
277
+ // this one just finds states
278
+ virtual const bool state_exist (locationt l) const
279
+ {
280
+ typename state_mapt::const_iterator it=state_map.find (l);
281
+ if (it==state_map.end ()) return false ;
282
+ return true ;
283
+ }
284
+
277
285
protected:
278
286
typedef hash_map_cont<locationt, domainT, const_target_hash> state_mapt;
279
287
state_mapt state_map;
Original file line number Diff line number Diff line change @@ -41,14 +41,17 @@ void full_slicert::add_dependencies(
41
41
const dependence_grapht &dep_graph,
42
42
const dep_node_to_cfgt &dep_node_to_cfg)
43
43
{
44
- const dependence_grapht::nodet &d_node=
45
- dep_graph[dep_graph[node.PC ].get_node_id ()];
46
-
47
- for (dependence_grapht::edgest::const_iterator
48
- it=d_node.in .begin ();
49
- it!=d_node.in .end ();
50
- ++it)
51
- add_to_queue (queue, dep_node_to_cfg[it->first ], node.PC );
44
+ if (dep_graph.state_exist (node.PC ))
45
+ {
46
+ const dependence_grapht::nodet &d_node=
47
+ dep_graph[dep_graph[node.PC ].get_node_id ()];
48
+
49
+ for (dependence_grapht::edgest::const_iterator
50
+ it=d_node.in .begin ();
51
+ it!=d_node.in .end ();
52
+ ++it)
53
+ add_to_queue (queue, dep_node_to_cfg[it->first ], node.PC );
54
+ }
52
55
}
53
56
54
57
/* ******************************************************************\
You can’t perform that action at this time.
0 commit comments