Introduction

First Video

Thank you for participating in this study! Let's begin by watching the following short video.


First Quiz

Say the user wishes to synthesize a function f which accepts two integer-valued arguments as input and produces an integer as output. They specify the function f as follows :

Specification


x,y. f(x,y)xf(x,y)y

In response, the synthesizer produces the following implementation :

Implementation


f(x,y)= if xy then x+2 else y+3

Question 1

Consider the following sub-expression in the implementation :
f(x,y)= if xy then x+2 else y+3
Say we change the sub-expression from x+2 to x-2 :
f'(x,y)= if xy then x-2 else y+3
Will this new implementation still satisfy the specification?

Question 2

Consider the same sub-expression as before :
f(x,y)= if xy then x+2 else y+3
Say we change the sub-expression from x+2 to x+1 instead :
f'(x,y)= if xy then x+1 else y+3
Will this new implementation satisfy the original specification?

Second Video

Let's watch the following video.


Second Quiz

We ask the following questions to clarify the use of sub-specifications.

In response to an unknown specification, say the synthesizer produced the following implementation :

Implementation and Sub-specifications

Note that the original specification is unknown. Therefore, we have to rely on the sub-specifications to answer the following questions. Please hover over different parts of the implementation to see the corresponding sub-specifications.


g(a,b)= if ab a,b. (abh(a,b)=true)(a<bh(a,b)=false) then a-b a,b. ab h(a,b)0 else b-a a,b. a<b h(a,b)0


Question 3

Consider the following sub-expression in the implementation :
g(a,b)= if ab then a-b else b-a
Say we change the sub-expression from b-a to +8 :
g'(a,b)= if ab then a-b else +8
Will this new implementation still satisfy the specification?

Question 4

Consider the same sub-expression as before :
g(a,b)= if ab then a-b else b-a
Say we change the sub-expression from b-a to -11 instead :
g'(a,b)= if ab then a-b else -11
Will this new implementation satisfy the original specification?