A compiler for automatically re-targeting sequential Java code to Apache Spark.
Java Lex Other
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.settings
bin
compiler/src/casper
lib
target
tests
.classpath
.gitignore
.project
.travis.yml
Config.txt
Dockerfile
LICENSE
README.md
build.xml
pom1.xml

README.md

Casper

Casper is a compiler for automatically re-targeting sequential Java code fragments to Apache Spark. Casper works by synthesizing high level MapReduce program specifications from raw un-annotated sequential Java source code and using the synthesized specificiations to generate Apache Spark code. The most recent release version for Casper is v0.1.1.

To learn more about Casper, visit our homepage, read our paper or email us, and if you like our tool, please star our repo!

Casper has been implemented as an extension of Polyglot 2.6.1.

Online Demo

The quickest way to try out Casper is by using our online demo. To download and install Casper on your own machine, follow the instructions below.

Getting Started

The easiest way to install Casper is by using our Docker image. It comes with all the dependencies installed and Casper already configured to run. Alternatively, use these instructions to configure and build Casper on your own.

Running in a Docker Container

You can run Casper inside a docker container using our pre-configured image of Ubuntu 16.04 LTS. Once you have Docker set up on your computer (instructions here), pull our ubuntu image using the following command:

$ docker pull maazsaf/casper-ubuntu

Once the image is downloaded, use it to run a Docker container:

$ docker run -t -i maazsaf/casper-ubuntu /bin/bash

Once inside the Docker container, you will find a clone of this repository in the root directory. You can optionally pull the latest changes from git to bring the repository up to date by running git pull. After that, build casper using ant as follows:

$ cd Casper/
$ ant

Optionally, you may want to reset to one of the stable release commits before you build:

$ git reset --hard <commit hash or release tag>

Build Casper from source code

Note: You only need to do this if you are building Casper from scratch. The Docker image already includes all software prerequisites.

Dependencies:

You must set environment variables for Sketch and Dafny for Casper to run successfully. To allow Casper to use your sketch installation, run the following commands under your sketch-frontend directory:

$ export PATH="$PATH:`pwd`"
$ export SKETCH_HOME="`pwd`/runtime"

Similarly, to allow Casper to use your Dafny installation, run the following command:

$ export PATH=$PATH:/path/to/dafny

To check whether you have all the necessary dependencies installed and properly configured, you can run:

$ ./bin/check.sh

You can compile the project by running 'ant' in the project's root directory. Once compiled, you run the tool as follows:

$ ./bin/run.sh [input-file] [output-file]

Benchmarks

To help you get started, we have added some example programs under /bin/benchmarks. In some cases the synthesizer may run for a very long time or require a significant amount of memory. Casper is currently under development and we are rolling out new features and bug fixes frequently. If you experience any difficulties, contact us through our mailing-list.

Contact

Casper is written by Maaz Ahmad at the University of Washington.