6
CS269: HW/SW Engineering of Embedded Systems, Winter02
The frontend
•All file accesses and incremental compilation are encapsulated in FileLoader:
–loads files from disk
–check syntax of the program
–builds the ASTs
–
–loadCompileUnit(filename,pass)
–loadCompileUnit(pkg,class,pass)
–
•Tasks of semantic passes
–check semantics of the program
–add semantic annotations
–refine the abstract syntax trees, e.g.    Name ฎ  FieldAccess
•File Loader
•Class resolution
•Name resolution
•Metamodel checks
•Template elimination
• Package resolution
ASTs
ASTs
Meta model files