Skip to content

PLDI16 AEC submission

bmcfluff edited this page Feb 13, 2016 · 19 revisions

The Artifact

Download the VM image here: https://www.dropbox.com/sh/lwe47njhcwy5f5w/AAA0ZrQvBbz5yTb_UR-19qBwa?dl=0

The Paper

You can find the (conditionally) accepted version of the paper here: http://goto.ucsd.edu/~pvekris/docs/pldi16.pdf

Instructions

First, open a terminal and cd ~/refscript.

Basic Usage

stack exec -- rsc /path/to/file.ts

This will run our tool on the given TypeScript file; for well-formed inputs the output should end in either *** SAFE *** or *** UNSAFE ***.

Regression testing

stack test refscript

For each of the 571 regression tests, this should output a line looking like obj-07.ts: OK (0.65s). It should take ~8 minutes.

PLDI16 Benchmarks

In section 5 of the paper we report the running times of our benchmark suite. You can run those tests as follows:

stack test refscript:pldi16

It should take ~10-15 minutes; the vast majority of that time it will appear to be doing nothing as it handles our most time-consuming test, navier-stokes-typed-octane.ts.

Demonstrative examples

tests/demo contains tests that demonstrate various features of rsc. They are listed below along with some featuers they exhibit.

cast.ts (casting)
createElt.ts (casting, instanceof test)
ctor.ts (constructors, mutability of fields)
d3-sum.ts (inferring loop invariants, optional arguments, higher-order function)
infer.ts (inference, object literals, safety of array accesses)
lor.ts (type unions)
minindex-classic.ts (safety of array accesses)
minindex-modern-lib.ts
minindex-modern.ts (higher-order function)
negate.ts (typeof test)
opt-args.ts (optional arguments)
poly.ts (polymorphism)
reals.ts (real-valued non-linear arithmetic - note that you need to run this with the --real flag)
string-coercion.ts (typeof test)
variadic.ts (anonymous function, invoking a variadic function)
while-rec.ts

All return SAFE in their current form, but we encourage you to change them to see that rsc does successfully reject unsafe programs - in some of the tests we've suggested example changes in comments saying // Try [some change]

Clone this wiki locally