A Racket implementation of traditional dataflow analyses for an imperative language TIP.
These analyses are targeted for S-Expression based TIP language. The syntax is largely extracted from the great lecture notes Static Program Analysis[1].
An Example
{while {> 5 x}
{{if {== x 3}
{:= x 4}
{:= x 5}}
{:= x {- x 1}}}}
parser.rktfunctions that parse s-exp based TIP to abstract syntax tree (AST).ast.rktthe abstract syntax tree structure definitions.cfg.rktcontrlo flow graph (CFG) structure definitions; CFG is transformed from AST.dfa.rktchaotic iteration framework and algorithm, which operates on CFG.reaching-def.rktreaching definition analysis.very-busy.rktvery busy expressions analysis.available-expr.rktavailable expressions analysis.live-var.rktlive variables analysis.
See test cases in each files.
- SSA-based analysis
- Pointer analysis