Skip to content

KasraF/SnipPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SnipPy

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)

Content

  1. Modules
  2. Setup
  3. Building
  4. Running
  5. TODOs

Modules

This repository is meant for simplifying the process of building SnipPy, and is really just the following two repositories:

Synthesizer

This repository contains the Enumerative Synthesizer that powers SnipPy. It is an implementation of bottom-up enumerative synthesis with observational equivalence.

VS Code

This repository is a fork of Microsoft's VS Code Repository modified to include Projection Boxes with SnipPy support.

Setup

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:

  1. NodeJS 12
  2. Yarn
  3. Python 3
  4. The numpy Python library
  5. The Pillow Python library

For building/running the synthesizer, you need:

  1. Scala
  2. SBT

Building

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

Running

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:

  1. PYTHON3: Absolute path to your Python 3 executable
  2. SCALA: Absolute path to your Scala executable
  3. RUNPY: Absolute path to the run.py file in vscode/src/run.py
  4. IMGSUM: Absolute path to the img-summary.py file in vscode/src/run.py
  5. SYNTH: Absolute path to the synthesizer jar file in synthesizer/target/scala-2.13/PythonSynthesizer-assembly-0.1.jar

But you can just use the ./run.sh script instead :)

TODOs

  1. Write the complete build scripts
  2. Add instructions for Windows

About

Meta-repository for SnipPy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages