An implementation of the SSA Construction for high level IR
- Labeling - mandating the labels at each while, break and continue statements.
src/main/scala/obsidian/lang/java/Label.scala
- Flattening - flatten nested / composit assignment statement into multiple simple assignment statements.
src/main/scala/obsidian/lang/java/Flatten.scala
- Desugaring
src/main/scala/obsidian/lang/java/Desugar.scala
- SSA construction
src/main/scala/obsidian/lang/java/MinSSA.scala
- There is a minor difference in the implemntation compared to the version presented in the submitted paper, i.e. an SSA while statement consists of two phi join clauses, one at the entry, the other at the exit. The exit phi is introduced for the support of continue and break statements in the future release. In this version, the exit phi copies the assignment from the entry phi.
Test cases for SSA construction is located in file
src/test/scala/obsidian/lang/java/TestMinSSA.scala
Test cases can be found in the respective modules in src/test/scala/obsidian/lang/java/
.
sbt test