|
DownloadAndMake
An explanation of how to download and make Kitsch.
DownloadingKitsch is hosted by Google Code, which provides an SVN repository. Read-only access to the repository is available to anyone, and this is the simplest way to get a hold of Kitsch. If you have SVN installed, to download Kitsch from the command line, run: svn checkout http://kitsch.googlecode.com/svn/trunk/ kitsch-read-only There are also a variety of programs available to hook up SVN to an IDE; Google Code itself has more details. MilestonesMilestone releases for the RIT Compiler Design 4005-711 course can be found at the Downloads page. Milestone #1 : Language Recognizer Milestone #2 : Language Interpeter Milestone #3 : Language Compiler Project LayoutAfter downloading, the directory structure of Kitsch is as follows:
Making KitschFrom the kitsch directory, simply run make to make to compile the parser and interpreter (requires gnumake and javac). After doing so, the test suite can be run to make sure everything worked by running make test (requires gnumake and python). $ make Running the InterpreterAfter Kitsch has been compiled, it lives in the bin/ directory. To run the interpreter, $ cd bin $ java Evaluator srcfile where srcfile is a Kitsch source file. By convention, Kitsch source files end in a ".k" extension - but this is not enforced by the interpreter. Running the CompilerTo run the compiler $ cd bin $ java Compiler someInputFile.k Running the Virtual MachineThe virtual machine is a simple python script that resides in the /src directory of Kitsch. When make is run, the script is copied to the /bin folder. $ python bin/vm.py
Usage: python vm.py <input file>
Use '-' if input file is standard-inThe virtual machine requires an input file to be specified. If you want the VM to interpret input from stdin, specify - as the input file. If the script is given execute priviledges on a UNIX system, it can be invoked like a shell script or perl script with ./bin/vm.py $ ./bin/vm.py someProgram.ko Running Regression TestsKitsch includes a regression testing suite to verify its own functionality The testing suite utilizes Python. A run_tests.py file resides in the /tests folder, however the easiest way to run the tests is using make From the top level of the kitsch directory... $ make $ make test This will automatically run all the tests in the /tests/ directory (and its sub-directories) As of milestone #3, the testing suite runs all tests with both the Interpreter and the Compiler + Virtual Machine. |