The source code for SnipPy, the tool created for the Small-Step Live Programming By Example paper.
This is a meta-repository containing the instructions, build scripts, and necessary submodules to build a version of SnipPy ready to run a local instance of VS Code! (For the web version, see here)
This repository is meant for simplifying the process of building SnipPy, and is really just the following two repositories:
This repository contains the Enumerative Synthesizer that powers SnipPy. It is an implementation of bottom-up enumerative synthesis with observational equivalence.
This repository is a fork of Microsoft's VS Code Repository modified to include Projection Boxes with SnipPy support.
To get these submodules, you can run the following git command:
git submodule update --init --remote
After that, please make sure that the vscode
and synthesizer
exist.
The build scripts provided in this repo assume that certain applications are installed and exist on the PATH
.
For building/running VS Code and the Projection Boxes, you need:
For building/running the synthesizer, you need:
tldr; You can build both modules by running
./build.sh
To build VS Code, we first need to get the necessary node modules, and then compile the source:
cd vscode;
yarn;
yarn compile;
cd ../;
To build the synthesizer and wrap it in an executable Jar file, you can just run:
cd synthesizer;
sbt assembly;
cd ../;
This repo also includes a build.sh
script that does both for you. :)
tldr; You can run SnipPy by running
./run.sh
You can run SnipPy just by running our custom VS Code, but it looks for the following environmental variables, and will throw errors if one or more are not set correctly:
PYTHON3
: Absolute path to your Python 3 executableSCALA
: Absolute path to your Scala executableRUNPY
: Absolute path to therun.py
file invscode/src/run.py
IMGSUM
: Absolute path to theimg-summary.py
file invscode/src/run.py
SYNTH
: Absolute path to thesynthesizer
jar file insynthesizer/target/scala-2.13/PythonSynthesizer-assembly-0.1.jar
But you can just use the ./run.sh
script instead :)
- Write the complete build scripts
- Add instructions for Windows