Skip to content
Demonstration of the path-extraction process shown in the paper "A General Path-Based Representation for Predicting Program Properties"
JavaScript Python
Branch: master
Clone or download
Pull request Compare This branch is 156 commits ahead, 4 commits behind eth-sri:master.
Latest commit be0d557 Jul 5, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin clean Jul 4, 2018
lib adding include_giv_giv parameter (true on to_glove) Feb 9, 2017
test move annotations from property name to feature name Feb 8, 2015
tools Add support for extracting features from JavaScript files Jan 22, 2015
.gitignore print original vs. inferred Jul 24, 2016
.travis.yml Install newest NPM on oldest Node.js. Aug 3, 2014
README.md
evaluate_dir.py add to_glove flag Dec 20, 2016
extract_features.py infHistogram Oct 3, 2016
package.json update version Feb 20, 2015
uri.js script glove json comment Apr 21, 2017

README.md

PigeonJS

PigeonJS is a tool for demonstration of the path-extraction process shown in the paper "A General Path-Based Representation for Predicting Program Properties" (PLDI'2018): http://urialon.cswp.cs.technion.ac.il/wp-content/uploads/sites/83/2018/06/pldi18.pdf

PigeonJS is based on UnuglifyJS.

Requirements

They can be installed using:

sudo apt-get install nodejs npm

Setup

git clone https://github.com/urialon/PigeonJS sudo npm install

Path-Extraction

bin/unuglifyjs uri.js --nice_formatting --extract_features --no_hash --max_path_length=<max_length> --max_path_width=<max_width>

This will extract paths between variables and the rest of the elements, in the file uri.js . Possible flags:

  • removing --no_hash - will hash each path for lower memory consumption
  • --semi_paths - will extract paths from variables to their ancestor non-leaves nodes
  • --include_giv_giv - include paths between AST terminals which are not variables, such as constants.

python extract_features.py --dir <training_dir> --max_path_length <max_length> --max_path_width <max_width> > training 2> out.err

This command runs the nodeJS scripts using multiple processes (much faster for large datasets, when running on a machine with many cores).

Nice2Predict

To install Nice2Predict framework please follow the instructions on the https://github.com/eth-srl/Nice2Predict page.

You can’t perform that action at this time.