This virtual machine was developed as a project for the CS-340 course of the Computer Science Department of the University of Crete. It can be used to load & execute the binary that is generated by the alpha compiler in order for your a-lang program to run.
- Lexical Analysis using Flex
- Syntax Analysis using Bison
- Intermediate code generation using Syntax Directed Translation
- Target code generation
- Virtual Machine emulation, architecture & functionality
Simply run make
or make all
in order to compile the α-vm and produce the alphavm
executable.
After compiling your Alpha (.asc) program, simply run ./alphavm [path-to-binary-file.abc] [optional -d]
to load and execute the binary file!
You can also provide the optional debug -d
flag in order to print helpful debug info to the consle.
This repository already icludes a sample output.abc
file which corresponds to the binary file,
generated by compiling α-Compiler's /tests/simple.asc
sample program.
! IMPORTANT !
The Virtual machine is still unfinished so many functionalities will probably not work for now, or may work incorrectly. Most likely, you will get assertion errors if you try to run a relatively "complex" program. Hopefully its development will be completed soon (said every dev ever).