Skip to content

Add more graphs and generalize CFG and control dependence creation

Carlos Galindo requested to merge more_graphs into develop

Created by: cargaji

Added support for the ACFG, APDG and PPDG, including tests and comparison of the slices.

Other changes:

  • Renamed graphs from ??GGraph to ??G, as the G stands for Graph.
  • Improved slicing: Graph#slice() returns a Slice, which is a set of ids easily transformed into an AST via Slice#toAst(). Nodes could be extended so that they could be colored if they are in a slice (via Sliceable#colorNodes(Slice) or PDG#colorNodes(Slice) and remove them with PDG#clearColor()).
  • Improved control dependence generation: switch from AST visitor to postdominance (see #3 (closed) for details). Fixes #3 (closed).
  • Testing: PDGTests compares all available PDG variations, and compares all possible slices for a set of methods. Tests fail when differnent PDGs obtain different slices, which doesn't mean the slices are wrong. A test set of tuples (method, criterion, slice) is needed to automatically validate the slices produced.

Merge request reports

Loading