![]() Home | DMP | Project | Journal | Contact Relevant Java Classes | Delete Call Site | Template Call Graph | Research | Final Report Propagate/Update ALGORITHM Propagate_Update(CS, v, del_set, add_set, T)
Propagates and updates the set of reaching types for each call site in the template T subsequent to call site CS, which has modified type information. The algorithm separates its two main tasks - propagating and updating the set of deleted reaching types and propagating and updating the set of added reaching types - using two for nests. First, the deleted types are processed. An intraprocedural incremental data flow update is performed in T based on the set of deleted reaching types at CS. This analysis returns a worklist containing all call sites in T influenced by the deleted reaching types at CS. Each call site C in this worklist is analyzed. If the set of deleted reaching types at C has any elements in common with the parameter types of a callee template CT of C, the edge from caller to callee templates (T to CT) is deleted. After each CT is analyzed for the call site C, the impact of the changed return types at C is collected in delete_types_after. Propagate_Update is called recursively to propagate those changes to the remaining call sites. In the second phase of the algorithm, a worklist for added reaching type information is created through a separate incremental data flow update in T. Processing is similar to that of the delete stage, but new templates and edges are added as updated reaching type information is determined at a call site C. The subfunction analyze_and_add_new_templates performs an abbreviated version of the exhaustive algorithm for creating a template call graph, starting at the new template and reusing existing templates. Changes in return type information from added templates are propagated by recursive calls to Propagate_Update.
©2002, Katie Heise |