Syncro uses program synthesis to automatically generate incremental update rules that can speed up programs by orders of magnitude.
-
Install Racket
-
Install Rosette 2
$ raco pkg install rosette
-
Install the
graph
package$ raco pkg install graph
-
Clone this repository and install it using
raco
:$ cd incremental $ ls README.md example info.rkt src direct-example incremental scratch $ raco pkg install
To use Syncro, you first write a program using the incremental language, which means your file must start with #lang incremental
. Once you have written such a program, it can be run by Racket directly. For example, to run the provided examples:
$ racket example/test/sketch.rkt
Each such program automatically supports various command line flags, which you can learn about through --help
:
$ racket example/test/sketch.rkt --help
- The
basic
grammar (-g
option) only supports a small subset of the language that other grammars support. - The
#:initialize
andalgorithm
parts of the program do nothing. They are placeholders that will eventually be used in code generation. - The
#:sketches
construct and SSA grammar (-g "(ssa n)"
option) do not play well together. The code will work but will likely be slow. - Grammar size is hardcoded and cannot yet be controlled by command line options. Change the relevant numbers in
synthesis.rkt
if you need to tweak the size of the grammar. - There is experimental support for metasketches, using the Synapse library. This has been commented out so that no dependencies are introduced, but any references to metasketches in the code are dead code and can be ignored.