Abstract Syntax Tree
The Clef AST is a High level representation of a program which is close to the original source program.
The Scale Clef AST is called the Common Language Encoding Form (Clef).
- High level optimizations can modify the Clef AST to provide improved code generation.
- High level analysis can influence lower level optimizations through the addition of Annotations
- High level forms can be lowered
Example: subscript expression transformed to address expressions.
The Clef AST consists of nodes that are:
Many of the nodes are specific to a specific programming language (e.g., Fortran DO) while others are more general (e.g., if-then-else).
- integer, real, pointer, etc
- variables, procedures, etc
- arithmetic operators, allocation, catenation, etc
- if-then-else, Fortran DO, throw & catch, etc
Annotations may be attached to any node.
Example Clef AST
Return to Scale dataflow diagram.
Return to Scale home page.
(Last changed: March 21, 2007.)