CISC 471/672 PROGRAMMING ASSIGNMENT 4 - SEMANTIC ANALYZER ---------------------------------------------------------- GRADING INSTRUCTIONS -------------------- Name:_____________________________ Date of Submission:_________ Total grade ____ - late points ____ = Final grade (out of 100)_____ Days Late:____ **************************** Due April 17, 2018 *********************************** Correctness: Show point deductions or check below (partial credit given where applicable): Handling of correct programs (3): ___ the output is a type-annotated abstract syntax tree. works correctly with the code generator (maintains correct interface with code generator) General Tasks (3 pts each for Grad; 4 pts each for Undergrads): ___ Inspect all classes for redefined classes and correct inheritance. ___ Build an inheritance graph. ___ Check inheritance graph for cycles. ___ An error if class A inherits from class B but B is not defined. ___ Halt compilation if error detected during first pass above. **************************** Due April 27, 2018 ****************************** For each class ___ Traverse the AST, gathering all visible declarations in a symbol table. (3 pts each) ___ attribute definitions ___ formal parameters of methods ___ let expressions ___ branches of case statements ___ method names ___ class names ___ Check each expression for type correctness. (2 pts each for Grad / 3 pts each for Undergrad) ___ object identifiers ___ assignment ___ true, false, int, string constants ___ new ___ dispatch expressions (dynamic and static dispatch) ___ if ___ begin-end ___ sequence ___ let-init ___ let-no-init ___ case ___ loop ___ not ___ compare ___ arithmetic expressions ___ equal ___ attribute definitions ___ methods Documentation: (5) ___ Internal documentation (comments throughout spec: explain unusual productions and actions) ___ External documentation in README. Explain your design decisions, your test cases, and why you believe your program is correct and robust. The tasks below are for Graduate Students only! Check for correct def/use: (Grad Students Only) ___(2) an error to use any name that has no matching declaration. ___(2) neither classes, methods, nor attributes need be declared before use. ___(2) Check for multiple definitions of methods within same class ___(2) Allow attribute and method of same class to have same name ___(2) Allow overriding of method names in different classes ___(4) Anything about SELF_TYPE ___(5) Program Structure: Readable, concise, simple structure. Handling of INCORRECT programs: (Grad Students Only) ___(2) recover from all errors except ill-formed class hierarchies. ___(2) give complete and informative error messages