For this task, you have access to sub-specifications. Please feel free to use them.
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 :
In response, the synthesizer produces the following implementation :
Please hover over different parts of the implementation to see the corresponding sub-specifications.
f(x,y)= if x=y ∀x,y. (x=y⇒h(x,y)=true) ∧ (x≠y⇒h(x,y)=false) then 0 ∀x,y. x=y⇒h(x,y)∈{0} else 1 ∀x,y. x≠y⇒h(x,y)∈{1,2}
Consider the following sub-expression in the implementation : f(x,y)= if x=y then 0 else 1 Say we change the sub-expression from 1 to 2 : f'(x,y)= if x=y then 0 else 2 Will this new implementation still satisfy the specification?
Consider the same sub-expression as before : f(x,y)= if x=y then 0 else 1 Say we change the sub-expression from 1 to 0 instead : f'(x,y)= if x=y then 0 else 0 Will this new implementation satisfy the original specification?
Consider the following sub-expression in the implementation : f(x,y)= if x=y then 0 else 1 Say we change the sub-expression from 0 to 1 : f'(x,y)= if x=y then 1 else 1 Will this new implementation still satisfy the specification?
Consider the same sub-expression as before : f(x,y)= if x=y then 0 else 1 Say we change the sub-expression from 0 to 2 instead : f'(x,y)= if x=y then 2 else 1 Will this new implementation satisfy the original specification?
Can you write a new implementation for the specification?
Can you explain the specification in your own words?