Example 1: The CHG algorithm.
BuildCHG(){ for each vtable(v) created in a file do { create a node (n) for v if nonexistent ; add the virtual functions (f) accessible via v to n; let t = typeid of v; for each baseclass (b) of t do { find the CHG node(nb) corresponding to b ; add nb as a baseclass of n ; add n as a subclass of nb ; } } }