Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
courses:cs331-201701:project [2018/09/11 15:05]
sellis [Specifications]
courses:cs331-201701:project [2019/04/05 11:47] (current)
sellis [Table]
Line 1: Line 1:
-====== CMPU-331 Compilers (Fall 2018) ======+====== CMPU-331 Compilers (Spring 2019) ======
 ~~NOTOC~~ ~~NOTOC~~
 ~~NOCACHE~~ ~~NOCACHE~~
Line 12: Line 12:
 ==== Schedule ==== ==== Schedule ====
  
-       ^ Component ​                ​^  Date released ​            ​^  Date due                ^  Grade   ​^ ​Specification ​ ^ +      ​ Component ​                                        ​^  Date released ​           ^  Date due                 ​^  Grade   ​^  ​Specification ​                                                              
-|  I     ​| Lexical ​analyser ​(lexer |  ​Tuesday11th September ​  |  ​Friday21st September  ​|  4       ​| ​               +|  I     Lexical ​Analyser ​(Lexer                         |  ​Thursday24th January ​  |  ​Thursday7th February ​  |  4       ​| ​ ​[[Lexer|Lexical Analyser]] ​                                                 ​
-|  II    | Parser ​                   |  Thursday, ​20th September  ​|  ​Sunday30th September ​ ​| ​ 3       ​| ​               +|  II   ​ Parser ​                                           |  Thursday, ​7th February ​  |  ​Thursday21st February ​ ​| ​ 3       ​| ​ ​[[Parser|Parser]] ​                                                          
- ​III ​  Symbol table routines ​     ​Tuesday,​ 2nd October ​     ​ ​Friday,​ 12th October ​   ​ ​1 ​                     +      ​                                                                             ​                          ​                                                                                      
-|  ​IV    ​| Semantic ​actions ​       | Tuesday, ​9th October ​      ​| Friday, 26th October ​    |  ​      |                +|  ​III  ​ ​Symbol Table routines\\ and\\ Semantic ​Actions ​  ​Thursday,​ 21st February ​ |  ​Tuesday, ​5th March       |  ​      |  ​[[symboltable|Symbol Table Routines]]\\ \\ [[semact_1|Semantic Actions I]]  ​
-|  ​V     | Semantic ​actions ​II       ​|  ​Tuesday23rd October ​    |  ​Friday2nd November ​   ​|  4       ​| ​               +|  ​IV    Semantic ​Actions ​II                               ​|  ​Thursday7th March      ​|  ​Sunday31st March       |  4       ​| ​ ​[[semact_2|Semantic Actions II]]                                            ​
-|  ​VI    | Semantic ​actions ​III      |  ​Thursday1st November ​   ​|  ​Sunday, 11th November ​  |  5       ​| ​               +|  ​   ​| ​ Semantic ​Actions ​III                              |  ​Tuesday26th March      ​|  ​Thursday, 11th April     |  5       ​| ​ ​[[semact_3|Semantic Actions III]]                                           
-|  ​VII   | Semantic ​actions ​IV       ​| Tuesday, ​20th November ​    | Tuesday, ​4th December ​   ​|  5       ​| ​               +|  ​VI   |  Semantic ​Actions ​IV                               ​ Tuesday, ​9th April        Tuesday, ​23rd April      ​|  5       ​| ​ ​[[semact_4|Semantic Actions IV]]                                            ​
-                                                                          **Subtotal** ​|||  **24** ​ |                +      ​                                                   ​| ​                          ​| ​             ​**Subtotal** |  **24** ​ |                                                                              
-|  ​VIII  | Complete ​compiler ​                                   |  ​Friday14th December ​  |  36      |                +|  ​VII  ​| ​ Complete ​Compiler ​                                 ​Thursday,​ 2nd May        ​|  ​Sunday12th May         |  36      |                                                                              
-                                                                             ​**TOTAL** ​|||  **60** ​ |                |+      ​                                                   ​| ​                          ​| ​                **TOTAL** |  **60** ​ |                                                                              |
  
-==== Grading ​====+==== Programming Languages ​====
  
-The project counts for 60% of your total grade for this courseThis comprises:+You may write this project either in **Java** or **Python**.
  
-  * 24%/60% (i.e. 40% of the total for the project) for development phase submissions;​ +  * If you wish to code in Java, I recommend [[https://​www.jetbrains.com/​idea/download/|IntelliJ IDEA]]. (Click '​Download'​ and then select '​Community'​.)
-  * 36%/60% (i.e. 60% of the total for the project) for the final submission. +
- +
-<​html><​p></​html>​ +
- +
-After each phase submission, I will provide a grade for the work together with some feedback on your code. You will then have an opportunity ​to review your code in the light of these suggestions,​ to make any improvements or squash bugs I may have found. +
- +
-With the exception of the final submission, I will not penalise work in later phases for uncorrected bugs in earlier work. Please remember, however, that this project is incremental in nature, so bugs in earlier phases can have a substantial impact on later work. +
- +
-==== Development Notes ==== +
- +
-=== Programming Language === +
- +
-The project must be implemented in **Java** or **Python**. +
-  * If you use Java, I recommend [[https://​www.jetbrains.com/​idea/​|IntelliJ IDEA]]. (Click '​Download'​ and then select '​Community ​Edition'.)+
   * If you use Python, I recommend [[https://​www.jetbrains.com/​pycharm/​|PyCharm]]. (Click '​Download Now' and then select '​Community'​.) ​   * If you use Python, I recommend [[https://​www.jetbrains.com/​pycharm/​|PyCharm]]. (Click '​Download Now' and then select '​Community'​.) ​
 <​html><​p></​html>​ <​html><​p></​html>​
Line 59: Line 45:
 === Parser === === Parser ===
  
 +The function of the parser is to ensure that the stream of tokens conforms to the rules of the language; that is, that the input is syntactically correct.
 +
 +[[parser|Full specification.]]
 +
 +/*
 === Symbol Table === === Symbol Table ===
  
 === Semantic Actions === === Semantic Actions ===
 +
 +The semantic action subsystem is the part responsible for generating the intermediate code which can be run using The Vassar Interpreter. (We output intermediate code for several reasons.) This subsystem accepts tokens from the parser when triggered by symbols in an augmented version of the Vascal grammar: these points are where there is sufficient information for there to be semantic meaning and therefore an operation can be performed. ​
 +
 +As this is a significant portion of the project, it has been split into 4 separate phases.
 +
 +== Semantic Actions (Phase I) ==
 +
 +In this phase, you will implement eight basic semantic actions responsible for processing variable declarations in the code.
 +
 +[[semact_1|Full specification.]]
  
 === Complete Compiler === === Complete Compiler ===
  
 +*/
 +==== Resources ====
 +
 +  * [[https://​www.cs.vassar.edu/​~cs331/​code/​src|Source code samples.]]
 +/*  * [[https://​www.cs.vassar.edu/​~cs331/​code/​lex|Tokenised files.]]*/
 ==== Submission Guidelines ==== ==== Submission Guidelines ====
  
 **All components are due by 11.59:59 pm on the date specified.** Late work will be subject to the late policy [[project#​late submissions|as described]]. **All components are due by 11.59:59 pm on the date specified.** Late work will be subject to the late policy [[project#​late submissions|as described]].
  
-Please note that the due date for the complete compiler, ​Friday14th December2018is the second day of the four-day Study Period. This is to ensure that you have at least two full days of the Study Period for revision for finals. Consequently,​ **no late work will be accepted for the final project submission** (except in the case of extenuating circumstances).+Please note that the due date for the complete compiler, ​Sunday12th May2019, is to ensure that you have at least two full days of the Study Period ​free from requirements ​for this class. Consequently,​ **no late work will be accepted for the final project submission** (except in the case of extenuating circumstances).
  
 === General Instructions === === General Instructions ===
Line 89: Line 95:
 The following directory names should be used to submit your code: The following directory names should be used to submit your code:
  
-^ Component ​                 ^ Assignment_ID ​ ^ +^ Component ​                                     ^ Assignment_ID ​ ^ 
-| Lexical Analyser ​          ​| 01_Lexer ​      | +| Lexical Analyser ​                              ​| 01_Lexer ​      | 
-| Parser ​                    ​| 02_Parser ​     | +| Parser ​                                        ​| 02_Parser ​     | 
-| Symbol Tables ​             | 03_SymTab ​     | +| Symbol Tables ​and\\ Semantic Actions (part 1)  | 03_SemAct1 ​    | 
-Semantic Actions (part 1)  | 04_SemAct1 ​    | +| Semantic Actions (part 2)                      04_SemAct2 ​    | 
-| Semantic Actions (part 2)  05_SemAct2 ​    | +| Semantic Actions (part 3)                      05_SemAct3 ​    | 
-| Semantic Actions (part 3)  06_SemAct3 ​    | +| Semantic Actions (part 4)                      06_SemAct4 ​    | 
-| Semantic Actions (part 4)  07_SemAct4 ​    | +| Complete compiler ​                             07_Complete ​   |
-| Complete compiler ​         08_Complete ​   |+
  
 As well as permitting an overview of the development of your compiler, this also ensures that there is at least one backup of your work. As well as permitting an overview of the development of your compiler, this also ensures that there is at least one backup of your work.