Table of Contents

AlphaZ has been only tested on 64 bit Linux and MacOS. There are several options that can be used to get a working eclipse instance with AlphaZ installed.

Option 1 - Eclipse Setup on CS Department Machines

You must be a CSU student with access to the CS deparment machines to do this. An eclipse environment with all necessary plug-ins is available in the AlphaZ project directory. Run the following in a bash terminal to add the AlphaZ project directory to your path:

echo 'export PATH=/s/chopin/h/proj/AlphaZ/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Then launch Eclipse with the following command:

eclipse.alphaz

Option 2 - Eclipse Setup using Local Install

Alternatively, you can install eclipse on your own machine and manually install the AlphaZ plugins directly. See the README in the AlphaZ git repo:
https://github.com/CSU-CS-Melange/AlphaZ

Checking out Sample Project

To get started with AlphaZ, a Java plug-in project with examples can be checked out from our repository. From Eclipse, do the following:

  1. File > Import… > Git> Projects from Git > click Next > Clone URI > click Next
  2. In the URI: field, specify https://github.com/CSU-CS-Melange/AlphaZ > click Next and follow the prompts with defaults until you reach the “Import Projects” step
  3. Click Deselect All > select the edu.csu.melange.alphabets.examples project from the list > click Finish

What's Inside

Inside the edu.csu.melange.alphabets.examples project, you will find four directories: AlphabetsExamples, CodeGenTutorial, CommandScripts and ValidationTutorial. Alphabets is the programming language for programming in equations (with extension .ab), and CompilerScripts (.cs) are script files to use the scripting interface of AlphaZ.

Try running BasicScript.cs in the CommandScripts directory to make sure that the system is working on your machine (right click BasicScript.cs > Run as > Compiler Script).

ReadAlphabets loads .ab files and parses it to get a Program object. Objects returned by commands and strings/integers can be stored in untyped variables.

Show, AShow, PrintAST are all commands to print out the program in different formats.

generateXXX commands takes the program and generates executable C code.

Common Pitfalls

Check the following if something does not work