Skip to content

A virtual machine for the α-lang (alpha lang) programming language, written in C++

Notifications You must be signed in to change notification settings

SteliosPapamichail/AlphaVM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

α-lang Virtual Machine

What's its purpose?

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.

Learning goals

  1. Lexical Analysis using Flex
  2. Syntax Analysis using Bison
  3. Intermediate code generation using Syntax Directed Translation
  4. Target code generation
  5. Virtual Machine emulation, architecture & functionality

Using the α-VM

How to build the project

Simply run make or make all in order to compile the α-vm and produce the alphavm executable.

How to run an α (alpha) program

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.

Side notes

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).

Contributors

Nikos Giovanopouos & Stelios Papamichail

About

A virtual machine for the α-lang (alpha lang) programming language, written in C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published