Racket Implementation of Data-flow Analyses
Switch branches/tags
Nothing to show
Clone or download
Latest commit 633ee2e Jun 26, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore update .gitignore Dec 18, 2016
README.md misc Jun 27, 2017
ast.rkt Add auxiliary function Jun 1, 2017
available-expr.rkt Add available exprs analysis Jun 1, 2017
cfg.rkt Refactor code Jun 1, 2017
dfa.rkt misc Jun 1, 2017
live-var.rkt Add live variables analysis Jun 1, 2017
parser.rkt Add Chaotic Iteration and Reaching Definition Analysis May 31, 2017
reaching-def.rkt Add comments Jun 1, 2017
very-busy-expr.rkt Refactor code Jun 1, 2017

README.md

Dataflow Analysis

A Racket implementation of traditional dataflow analyses for an imperative language TIP.

Target: the TIP Language

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}}}}

File Descriptions

  • parser.rkt functions that parse s-exp based TIP to abstract syntax tree (AST).
  • ast.rkt the abstract syntax tree structure definitions.
  • cfg.rkt contrlo flow graph (CFG) structure definitions; CFG is transformed from AST.
  • dfa.rkt chaotic iteration framework and algorithm, which operates on CFG.
  • reaching-def.rkt reaching definition analysis.
  • very-busy.rkt very busy expressions analysis.
  • available-expr.rkt available expressions analysis.
  • live-var.rkt live variables analysis.

See test cases in each files.

TODO

  • SSA-based analysis
  • Pointer analysis

References

[1] Static Program Analysis