Closed keikun555 closed 7 months ago
Awesome! I really like the idea of reusing an existing optimizer as much as possible for this—especially because it would be possible to sink a lot of time into making your own and to see very little progress result.
I vaguely recall we may have chatted about this before, but for the symbolic verification step, you might consider salvaging any reusable parts of this previous verifier project, although it doubtless will not apply directly to your use case.
Here's one high-level question: are you planning on doing this to individual basic blocks, or will it work on entire programs (with control flow, and possibly multiple functions)?
For now I assume the input programs are:
call
-free (so no multiple functions)print
-freeI might add support for memory operations and print statements using Z3's theory of Arrays, if time permits.
I was able to lift the branching br
operation into Z3 using z3.If
here. So we can lift multiple blocks.
It is certainly possible to call functions, it's just tricky because we will need to bookkeep how many times the function has been called.
Right now I have finished the equivalence checkers for Bril programs given the above assumptions. I am moving on to the MCMC part of BLOKE using an in-house implementation of MCMC with a simulated annealing component. It turns out that stochopy
is not what we want, because the package is for continuous function optimization.
Excellent; sounds great!
What will you do? We seek to apply STOKE to Bril. If time permits, we will extend the two-stage process in STOKE with simulated annealing and measure its impact in synthesis time and resulting optimized program.
How will you do it?
stochopy
for this project.stochopy
or our in-house stochastic optimization implementation.brili -p
command in the main BRIL repository .How will you empirically measure success? We will measure the Bril STOKE optimizer runtime as well as the total dynamic instructions executed on the resulting Bril STOKE optimized program.
Team members: @keikun555