Reactive Program Synthesis by COMposable Execution Traces
- unity-synthesis/: Configuration, specifications, test harnesses
arduino/
: Arduino modelbool-bitvec/
: Boolean and bitvector language synthesisunity/
: UNITY modelverilog/
: Verilog model- ...
- Global config
config.rkt
: Global configuration, bitvector length, feature selection- Paxos
paxos-arduino.rkt
: Harness for Paxos Arduino synthesispaxos-verilog.rkt
: Harness for Paxos Verilog synthesispaxos.rkt
: UNITY specifications for Paxos- Scalability benchmarks
batch-sender.rkt
round-robin-sender.rkt
scale-arduino.rkt
: Harness for scalability benchmarks- Serial communication
serial-arduino.rkt
serial-verilog.rkt
serial.rkt
: UNITY specifications for serial communication- ...
backend.rkt
: S-expressions to native syntaxinversion.rkt
: Symbolic syntactic formsmapping.rkt
: Refinement mappingssemantics.rkt
: Expression evalulator and statement interpretersyntax.rkt
: Abstract syntaxsynth.rkt
: Synthesisverify.rkt
: Post-synthesis verification
- Racket 8.0 or higher
- Rosette 4.0 or higher -- if racket is properly installed, the following command should will install Rosette: 'raco pkg install rosette'. (Note: if an earlier version of racket is installed on your system, be sure to explicitly use the later version you installed.)
- Z3 (included with Rosette distribution)
- Memoization is controlled by the
enable-memoization
boolean defined inconfig.rkt
. - Uncomment the specification you wish to synthesize in
paxos-arduino.rkt
orpaxos-verilog.rkt
. - Run the Paxos harness:
racket paxos-arduino.rkt
orracket paxos-verilog.rkt
.
Each test harness will synthesize a program, then verify it against the spec. The final output should be a list of (unsat) results, corresponding to each case in the specification, followed by an abstract syntax representation of the synthesized program. Two lines of timing measurements will occur in the output, something like cpu time: 46437 real time: 9032847 gc time: 2523
, where real time
shows wall-clock time including time spent waiting for the SMT solver, and cpu time
shows CPU time used by the Racket runtime.
- Ensure that memoization is set correctly in
config.rkt
. - Run the scalability benchmarks harness:
racket scale-arduino.rkt
.
The benchmarks harness will the round-robin benchmarks from one to seven channels, then the batch benchmarks, from one to seven channels. The harness will not output the synthesized programs. Timing data will be interspersed in the output, in the same format as listed above.
- Take a look at the existing specifications:
serial.rkt
,paxos.rkt
,batch-sender.rkt
, andround-robin-sender.rkt
. In addition, take a look at the UNITY syntax:unity/syntax.rkt
. - Use one of the existing specifications as scaffolding for writing your own.
- Use one of the existing harnesses as scaffolding for targetting Arduino or Verilog.
- Run it!