Skip to content
Yihong edited this page Sep 17, 2015 · 1 revision

Welcome to the project.maybe.polyglot wiki!

Build and Run

Prerequisites

You need ant, java installed.

Build steps

Clone

First you need clone this repo

git clone [email protected]:blue-systems-group/project.maybe.polyglot.git

or

git clone https://github.com/blue-systems-group/project.maybe.polyglot.git

Build polyglot.jar

Then you need build original polyglot and copy polyglot.jar to maybe/lib/

cd project.maybe.polyglot
ant jar
cp lib/polyglot.jar maybe/lib/polyglot.jar

Get dependencies

Now it's time to setup maybe dependecny:

cd maybe/
ant bootstrap
ant resolve

The ant bootstrap will install the ivy task jar to make sure you can get ivy support. ant resolve will download whatever dependencies in ivy.xml to directory lib/

Build maybe.jar

Now you can build maybe compiler.

ant jar

If success, you can see message like this:

jar:
      [jar] Building jar: /private/tmp/project.maybe.polyglot/maybe/lib/maybe.jar
      [jar] Building MANIFEST-only jar: /private/tmp/project.maybe.polyglot/maybe/lib/maybe-rt.jar

BUILD SUCCESSFUL
Total time: 2 seconds

Run

Now you can run by command:

bin/maybec -d build -noserial tests/Hello.java -package edu.buffalo.cse.maybe.test

More arguments can be found: http://www.cs.cornell.edu/Projects/polyglot/pldi14/tutorial/debugging/

But we have add two arguments in maybe:

  1. -package, REQUIRED indicate the package name in generated metadata. Because the maybe compiler may used in different ways, like Android app or ordinary package. It's unable to get package name by compiler itself. So we can use -package to tell compiler package name, and integrate this in build tools.

  2. -url, indicate the url used to POST metadata.