3 ms·
Graph isomorphism is a known NP-hard problem, but the vast majority of subgraphs in programs are reducible, so I expect that aligning two control flow graphs ad
by raphlinus 9y ago
Graph isomorphism is a known NP-hard problem, but the vast majority of subgraphs in programs are reducible, so I expect that aligning two control flow graphs admits a good heuristic solution.
- yorwba 9y agoActually, the complexity of Graph Isomorphism in general is still unknown, and any definite classification would have interesting consequences. https://en.wikipedia.org/wiki/Graph_isomorphism_problem https://en.wikipedia.org/wiki/Graph_isomorphism_problem I agree though that control flow graphs are probably easier to align than completely random graphs, although there might be pathological cases e.g. if you have lots of identical subgraphs like if err != nil { return nil, err }.