Third Task

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 an integer as input and produces an integer as output. They specify the function f as follows :

Specification


f(x)0

In response, the synthesizer produces the following implementation :

Implementation and Sub-specifications

Please hover over different parts of the implementation to see the corresponding sub-specifications.


f(x)= if x0 x. false then x x. false else -1 x. x<0 h(x)0


Question 1

There is a bug in the implementation. Where is the bug?