Questions: Program Synthesis (Formal Methods)

4 questions to test your understanding

Score: 0 / 4
Question 1 Short Answer

In counterexample-guided inductive synthesis (CEGIS), an inductive synthesizer proposes a candidate program based on given test cases. The verifier then checks if the candidate is correct. What happens if the verifier finds the candidate is incorrect?

Think about your answer, then reveal below.
Question 2 Short Answer

Syntax-guided synthesis (SyGuS) constrains the program space using a context-free grammar. Why is this grammar restriction necessary rather than searching over all possible programs?

Think about your answer, then reveal below.
Question 3 Multiple Choice

A synthesizer generates a program `y = 2*x` as a candidate for the specification 'compute the double of x.' The verifier checks this candidate by attempting to prove ∀x. (2*x satisfies the spec). If the specification is defined as 'y equals 2*x exactly', what does the verifier do?

AThe verifier asks the user if the candidate is correct
BThe verifier checks a few concrete test inputs
CThe verifier uses an SMT solver to prove ∀x. (2*x = 2*x), which is a tautology, so the candidate is verified correct
DThe verifier returns to the synthesizer to generate a different candidate
Question 4 Short Answer

Component-based synthesis constructs programs by composing existing library functions rather than generating them from scratch. What role does formal specification play in component-based synthesis?

Think about your answer, then reveal below.