Chris Fischer (cdf) and Logan May (loma)
Components should be read in the following order.
The Taw AST is wholly contained in the Ast
module.
The parser is wholly contained in the Parser
module.
The pretty printer is wholly contained in the PrettyAst
module.
The interpreter is wholly contained in the Interpreter
module.
The compiler consists of two modules, Frontend
and LLVMGen
. Start reading with LLVMGen
, it contains helper functions that Frontend
uses.
The REPL shell is implemented in JITMain.hs
.
The testing module currently has one QuickCheck property. This property checks if the interpreter and compiler produce the same result on an arbitrary program. Currently, it segfaults about half of the time. We are unsure if this is a problem with the generator or the compiler, as we did not have enough time to debug.
Contains the type definitions for the Taw abstract syntax tree.
Contains the Gen
definition for the Taw systax tree. Allows for the generation of syntactically correct programs.
Main module for the compiler executable. Contains code needed to read and parse a file, compile it, and pretty print the resulting LLVM out to a new file.
Contains all functions that compile Taw to LLVM. The code in this file interacts with the functions in LLVMGen.hs
to build up the compiled code. Mainly used in the REPL and the compiler executable.
Main module for the interpreter executable. Contains code needed to read and parse a file, interpret the resulting AST, and print the value.
Contains all functions used to interpret taw programs. Also contains all the type definitions for the contexts used in its state monad. Used in the interpreter executable and the QuickCheck properties.
Contains code that interfaces with LLVM and its JIT compiler. Provides a way to run LLVM code within Haskell and marshall the resulting value into Haskell types. Used by the REPL shell and by QuickCheck properties.
Main module for the Taw REPL executable. Contains all code that implements the shell functionality. Also contains the type definitions for the context used in its state monad.
Contains helper functions that make it easier to build up LLVM code. This is mainly used by Frontend.hs
to build up the compiled statements. Also contains the type definitions for the contexts used in its state monads.
Contains functions to parse a Taw program from a file and a string.
Contains functions to pretty print a Taw program.
Main module for the formatter. Contains code needed to read and parse a file, and pretty print the parsed AST.
Contains the QuickCheck property verifying correctness between the interpreter and the compiler.
- haskeline >= 0.7.5.0
- llvm-hs >= 9.0.1
- llvm-hs-pure >= 9.0.0
- parsec >= 3.1
- QuickCheck-GenT >= 0.2.2
- string-random >= 0.1.2.0
- quickcheck-string-random >= 0.1.3.0