All the weekly changes made in the project as a summary.
final - 2022-04-30
- Code to generate the MIPS assembly code from the canonicalized Tree IR code.
SUMMARY.md
file containing the summary of the compilers lab- Re-added the
INSTALL.md
file and moved from sub-directories to the root directory
- The files
README.md
,INSTRUCTIONS.md
- Renamed
DESIGN.md
in sub-directories toREADME.md
for the sub-directories
2022-03-03 - 2022-04-29
- Added code to generate the Tree intermediate representation of the Tiger AST
- Added code to canonize the Tree IR code of the Tiger AST
- Added copy of the first version of the compiler without Tree IR in the tag-improvements1 directory.
- Restructured the whole repository directory structure
- Summary for quick navigation in various directories:
- tag-improvements1: The first version of the compiler without the Tree IR
- others: Contains notes directory and the reverse-polish assignment.
- compiler-tree-ir: Contains the code for generating Tree IR from Tiger AST and canonizing the Tree IR code.
- compiler-tree-ir / utils / basicBlocks.sml: The basic blocks assignment
- compiler-tree-ir / utils / graph.sml: The graphs assignment
- Merged branch tree-ir into master branch
2022-03-31 - 2022-04-07
utils/graph.sml
: MkGraph functor to represent a graph
tc.mlb
: Includes the new files added in their respective order
2022-03-24 - 2022-03-31
utils/basicBlocks.sml
: Captures the signatures and functor for basicBlocks computationtarget/mipsInst.sml
: Basic blocks for MIPS program
tc.mlb
: Includes the new files added in their respective order
Improvements1 - 2022-03-29
- Added workflow for Makefile tests and
tests
directory to contain all the unit tests. SYNTAX.md
for the specifications of syntax for the SubTiger language.DESIGN.md
for the information about the design of the compiler.notes/CommandLine.sml
andnotes/OS.sml
: Contains notes for referencing some SML built-in structures.target/mips
: Added more utility functions to create different types of records- Added support for
println
command in Tiger language - Added input file extension validation for the compiler.
- The compiler now by default creates a file
filename.s
for the generated assembly where the filename is the inputfilename.tig
without the extension. - Lexer now supports better syntax error handling
INSTRUCTIONS.md
for better instruction usage..gitignore
file to ignore some more temporary files generated.README.md
file for the project.- Better comments and indentation in many files
- Fixed For-loops always checking the greater than condition for loop termination in the generated assembly code. Now it checks based on the start and the end of the loop.
- Fixed pretty printing of ascii directives in MIPS assembly.
2022-02-24 - 2022-03-15
- Support for parsing the For-loops in the Tiger language.
- Some more utility functions in the Utils structure and the ConvToMips structure
- Moved register allocation phase at the time of new temporary assignment
- Changed single environment to list of environments while translating input Tiger program for supporting nested sub-blocks (in Translate structure)
- Changed the return type of functions to now return two list of statements, one for the statements in the
main
body of MIPS and one for the statements in thedata
section of the MIPS - Fixed
label
type for the MIPS statement
2022-02-17 - 2022-03-14
- Fully functional compiler code for the SubTiger Language. The compiler only supports integers and variables as of now and only the assignment and print statements.
- Directories:
tiger
: Contains the code for capturing the AST of the Tiger Language, the parser and lexer for the Tiger Language, and some other utility structures for pretty printing Tiger AST and conversion to the Tiger AST.ir
: Contains the code for translating the source of Tiger AST to the Intermediate Representation and the code for greedy register allocation.utils
: Contains the code for some helper utility structures.notes
: Contains notes for referencing some SML built-in structures.
- Other files:
target/prettyMips.sml
: The code for pretty printing of the MIPS AST has been moved to its separate file in a separate SML structure.target/convToMIPS.sml
: Contains code for easy conversion of the input values to the MIPS AST.tc.mlb
: ML-Basis file for building the project using MLtonINSTALL.md
: Contains the installation instructions for the compiler.INSTRUCTIONS.md
: Contains the instructions for using the compiler and the Makefile.
README.md
to now contain better information of the repository.tc.sml
: Removed dummy basic code and now contains the code for the Tiger Driver for building the tiger compiler.Makefile
: Now contains the full workflow for building the project.- Structure
MIPS
as follows:- Changed casing of the register names
- Refactored the code for the AST by creating different types for records and splitting the types of instructions based on the type of records
2022-02-10 - 2022-02-17
target/mips.sml
file in the root of the repository containing the AST of the MIPS assembly language.
2022-01-27 - 2022-02-05
reverse-polish
directory for the reverse polish compiler.- Support for division and parentheses to evaluate expressions using reverse-polish.
- DIV has been added to the AST of the source.
- DIV, LPAREN and RPAREN have been added to the list of terminals in
expr.grm
in reverse polish - Regex for division and parentheses have been added to the lexer.
- Sample test cases for division and parentheses in
test.expr
in reverse polish ANSWERS.md
in reverse polish which contains answers to the questions asked in README.md of the reverse-polish lab statement.
- Global
.gitignore
to ignore more temporary files
0.0.1 - 2022-01-27
tc.sml
: An sml program that when executed prints "hello wordl"Makefile
: A basic make file with targetsall
andclean
.make all
: should build the executabletc
fromtc.sml
make clean
: remove all generated/intermediate files from the repository (in this case only the executable filetc
)
.gitignore
: Global gitignore file.