Notes

Notes

Sketch Language

Sketch Semantics

Solving Sketches with CEGIS

-

Questions

Summary

In this paper the author presents “Sketch”, a system for program synthesis which allows programmers to write a rough “sketch” of a program, or a program with holes, and then uses a CEGIS loop to fill in the holes left by the programmer. Sketch achieves this by first noting that in the program, the core type of hole that can be left is an integer represented by ??, and everything else can be built off of those integers, such as generators. The sketch language itself contains common features found in most languages such as conditionals and loops that are not typically included in grammars for SyGuS solvers such as euphony or EUSolver. The author also makes the observation, that the sketches don’t need thousands of examples to get a program right, but rather only a select few examples which test the common case, and then corner cases of the program in order to represent the entire input space, which can be quite large. Benchmarks show that sketch is faster than a naive CEGIS solver which is good, and performs well on many benchmarks.

Strengths

Weaknesses

Q’s

Sketch seems far more expressive because not only does it include loop (Brahma restricts itself to loop-free programs), but it contains many of the most common features of programming languages such as conditionals, vector indexing, statements and generators. A grammar for the Sketch language was provided in the paper, so it is similar in a sense to the SyGuS CFGs, but far more expressive than the previous synthesizers we’ve studied due to the addition of constructs like loops and conditionals.

the semantics of abort:

\[\mathcal{C}[[abort]]^{\tau}\langle \sigma, \Phi\rangle = \langle\sigma,{\phi \in \Phi : \sigma\phi = 0} \rangle\]

This is similar to the semantics of the assert directive given in the paper but instead of failing only when the assertion is false, we fail all the time, hence we refrain from using A[[]] like in other denotations, and then assign 0 to the value of \(\sigma\phi\) to denote the program failure (since nothing succeeds)

To violate the BOH, in the worst case, the constraint could be c >= x. The CEGIS loop could start by making c = 0, then, the verifier could come up with the counterexample x = 1 then, in the worst case, the solver could come up with c = 1, and then the counterexample be x = 2, etc.. We could make 2^n iterations of the CEGIS loop in the worst case if c is increased by 1 each time in the loop

To violate the BOH, in the worst case, the constraint could be c >= x. The CEGIS loop could start by making c = 0, then, the verifier could come up with the counterexample x = 1 then, in the worst case, the solver could come up with c = 1, and then the counterexample be x = 2, etc.. adding to the set of counter examples one by one. This can result in 2^n iterations of the CEGIS loop in the worst case if c is increased by 1 each time in the loop

Notes - zac blanco