Infeasible Paths: Paths in CFG that do not correspond to actual executions
Realizable Paths: The paths in which “returns” are matched with corresponding “calls”
Basic idea: balanced-parenthesis
A systematical way to recognize realizable paths
CFL-Reachability: A path is considered to connect two nodes A and B, or B is reachable from A, only if the concatenation of the labels on the edges of the path is a word in a specified context-free language.
Every right parenthesis “$\tt )_i$ ” is balanced by a preceding left parenthesis “$\tt (_i$ ”, but the converse needs not hold
For each call site i, label its call edge “$\tt (_i$ ” and return edge “$\tt )_i$ ”
Label all other edges with symbol “$\tt e$”
A path is a realizable path iff the path’ word is in the language $\blue {L(realizable)}$