<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
program	B-Application
synthesis	I-Application
is	O
the	O
task	O
to	O
construct	O
a	O
program	B-Application
that	O
provably	O
satisfies	O
a	O
given	O
high-level	O
formal	B-Application
specification	I-Application
.	O
</s>
<s>
In	O
contrast	O
to	O
program	B-Application
verification	O
,	O
the	O
program	B-Application
is	O
to	O
be	O
constructed	O
rather	O
than	O
given	O
;	O
however	O
,	O
both	O
fields	O
make	O
use	O
of	O
formal	O
proof	O
techniques	O
,	O
and	O
both	O
comprise	O
approaches	O
of	O
different	O
degrees	O
of	O
automatization	O
.	O
</s>
<s>
In	O
contrast	O
to	O
automatic	B-Application
programming	I-Application
techniques	O
,	O
specifications	B-Application
in	O
program	B-Application
synthesis	I-Application
are	O
usually	O
non-algorithmic	O
statements	O
in	O
an	O
appropriate	O
logical	O
calculus	O
.	O
</s>
<s>
Even	O
though	O
the	O
work	O
only	O
refers	O
to	O
circuits	O
and	O
not	O
programs	O
,	O
the	O
work	O
is	O
considered	O
to	O
be	O
one	O
of	O
the	O
earliest	O
descriptions	O
of	O
program	B-Application
synthesis	I-Application
and	O
some	O
researchers	O
refer	O
to	O
program	B-Application
synthesis	I-Application
as	O
"	O
Church	O
's	O
Problem	O
"	O
.	O
</s>
<s>
Since	O
then	O
,	O
various	O
research	O
communities	O
considered	O
the	O
problem	O
of	O
program	B-Application
synthesis	I-Application
.	O
</s>
<s>
The	O
development	O
of	O
modern	O
high-level	B-Language
programming	I-Language
languages	I-Language
can	O
also	O
be	O
understood	O
as	O
a	O
form	O
of	O
program	B-Application
synthesis	I-Application
.	O
</s>
<s>
The	O
early	O
21st	O
century	O
has	O
seen	O
a	O
surge	O
of	O
practical	O
interest	O
in	O
the	O
idea	O
of	O
program	B-Application
synthesis	I-Application
in	O
the	O
formal	O
verification	O
community	O
and	O
related	O
fields	O
.	O
</s>
<s>
Armando	O
Solar-Lezama	O
showed	O
that	O
it	O
is	O
possible	O
to	O
encode	O
program	B-Application
synthesis	I-Application
problems	O
in	O
Boolean	O
logic	O
and	O
use	O
algorithms	O
for	O
the	O
Boolean	B-Algorithm
satisfiability	I-Algorithm
problem	I-Algorithm
to	O
automatically	O
find	O
programs	O
.	O
</s>
<s>
In	O
2013	O
,	O
a	O
unified	O
framework	O
for	O
program	B-Application
synthesis	I-Application
problems	O
was	O
proposed	O
by	O
researchers	O
at	O
UPenn	O
,	O
UC	O
Berkeley	O
,	O
and	O
MIT	O
.	O
</s>
<s>
Since	O
2014	O
there	O
has	O
been	O
a	O
yearly	O
program	B-Application
synthesis	I-Application
competition	O
comparing	O
the	O
different	O
algorithms	O
for	O
program	B-Application
synthesis	I-Application
in	O
a	O
competitive	O
event	O
,	O
the	O
Syntax-Guided	O
Synthesis	O
Competition	O
or	O
SyGuS-Comp	O
.	O
</s>
<s>
+	O
Non-clausal	O
resolution	O
rules	O
(	O
unifying	O
substitutions	O
not	O
shown	O
)	O
Nr	O
Assertions	O
Goals	O
Program	B-Application
Origin	O
51	O
52	O
53	O
s	O
54	O
t	O
55	O
Resolve(51,52 )	O
56	O
s	O
Resolve(52,53 )	O
57	O
s	O
Resolve(53,52 )	O
58	O
p	O
?	O
</s>
<s>
The	O
framework	O
of	O
Manna	O
and	O
Waldinger	O
,	O
published	O
in	O
1980	O
,	O
starts	O
from	O
a	O
user-given	O
first-order	O
specification	B-Application
formula	O
.	O
</s>
<s>
For	O
that	O
formula	O
,	O
a	O
proof	O
is	O
constructed	O
,	O
thereby	O
also	O
synthesizing	O
a	O
functional	B-Language
program	I-Language
from	O
unifying	O
substitutions	O
.	O
</s>
<s>
The	O
framework	O
has	O
been	O
designed	O
to	O
enhance	O
human	O
readability	O
of	O
intermediate	O
formulas	O
:	O
contrary	O
to	O
classical	O
resolution	O
,	O
it	O
does	O
not	O
require	O
clausal	B-Application
normal	I-Application
form	I-Application
,	O
but	O
allows	O
one	O
to	O
reason	O
with	O
formulas	O
of	O
arbitrary	O
structure	O
and	O
containing	O
any	O
junctors	O
(	O
"	O
non-clausal	O
resolution	O
"	O
)	O
.	O
</s>
<s>
Programs	O
obtained	O
by	O
this	O
approach	O
are	O
guaranteed	O
to	O
satisfy	O
the	O
specification	B-Application
formula	O
started	O
from	O
;	O
in	O
this	O
sense	O
they	O
are	O
correct	O
by	O
construction	O
.	O
</s>
<s>
Only	O
a	O
minimalist	O
,	O
yet	O
Turing-complete	O
,	O
purely	O
functional	B-Language
programming	I-Language
language	I-Language
,	O
consisting	O
of	O
conditional	O
,	O
recursion	O
,	O
and	O
arithmetic	O
and	O
other	O
operators	O
is	O
supported	O
.	O
</s>
<s>
division	B-Algorithm
,	O
remainder	O
,	O
square	O
root	O
,	O
term	B-Algorithm
unification	I-Algorithm
,	O
answers	O
to	O
relational	B-Application
database	I-Application
queries	O
and	O
several	O
sorting	B-Algorithm
algorithms	I-Algorithm
.	O
</s>
<s>
More	O
generally	O
,	O
and	O
need	O
to	O
have	O
only	O
two	O
unifiable	O
subformulas	O
and	O
,	O
respectively	O
;	O
their	O
resolvent	O
is	O
then	O
formed	O
from	O
and	O
as	O
before	O
,	O
where	O
is	O
the	O
most	B-Algorithm
general	I-Algorithm
unifier	I-Algorithm
of	O
and	O
.	O
</s>
<s>
Program	B-Application
terms	O
of	O
parent	O
formulas	O
are	O
combined	O
as	O
shown	O
in	O
line	O
58	O
to	O
form	O
the	O
output	O
of	O
the	O
resolvent	O
.	O
</s>
<s>
Structural	B-Algorithm
induction	I-Algorithm
.	O
</s>
<s>
Resolving	O
with	O
this	O
assertion	O
can	O
introduce	O
a	O
recursive	O
call	O
to	O
in	O
the	O
Program	B-Application
term	O
.	O
</s>
<s>
+	O
Example	O
synthesis	O
of	O
maximum	O
function	O
Nr	O
Assertions	O
Goals	O
Program	B-Application
Origin	O
1	O
Axiom	O
2	O
Axiom	O
3	O
Axiom	O
10	O
M	O
Specification	B-Application
11	O
M	O
Distr(10 )	O
12	O
M	O
Split(11 )	O
13	O
M	O
Split(11 )	O
14	O
x	O
Resolve(12,1 )	O
15	O
x	O
Resolve(14,2 )	O
16	O
x	O
Resolve(15,3 )	O
17	O
y	O
Resolve(13,1 )	O
18	O
y	O
Resolve(17,2 )	O
19	O
x	O
<	O
y	O
?	O
</s>
<s>
As	O
a	O
toy	O
example	O
,	O
a	O
functional	B-Language
program	I-Language
to	O
compute	O
the	O
maximum	O
of	O
two	O
numbers	O
and	O
can	O
be	O
derived	O
as	O
follows	O
.	O
</s>
<s>
By	O
reverse	O
Skolemization	B-Application
,	O
the	O
specification	B-Application
in	O
line	O
10	O
is	O
obtained	O
,	O
an	O
upper	O
-	O
and	O
lower-case	O
letter	O
denoting	O
a	O
variable	O
and	O
a	O
Skolem	B-Application
constant	I-Application
,	O
respectively	O
.	O
</s>
<s>
Turning	O
to	O
the	O
first	O
case	O
,	O
resolving	O
line	O
12	O
with	O
the	O
axiom	O
in	O
line	O
1	O
leads	O
to	O
instantiation	O
of	O
the	O
program	B-Application
variable	O
in	O
line	O
14	O
.	O
</s>
<s>
Intuitively	O
,	O
line	O
18	O
could	O
be	O
read	O
as	O
"	O
in	O
case	O
,	O
the	O
output	O
is	O
valid	O
(	O
with	O
respect	O
to	O
the	O
original	O
specification	B-Application
)	O
,	O
while	O
line	O
15	O
says	O
"	O
in	O
case	O
,	O
the	O
output	O
is	O
valid	O
;	O
the	O
step	O
1516	O
established	O
that	O
both	O
cases	O
16	O
and	O
18	O
are	O
complementary	O
.	O
</s>
<s>
Since	O
both	O
line	O
16	O
and	O
18	O
comes	O
with	O
a	O
program	B-Application
term	O
,	O
a	O
conditional	O
expression	O
results	O
in	O
the	O
program	B-Application
column	O
.	O
</s>
<s>
Since	O
the	O
goal	O
formula	O
has	O
been	O
derived	O
,	O
the	O
proof	O
is	O
done	O
,	O
and	O
the	O
program	B-Application
column	O
of	O
the	O
""	O
line	O
contains	O
the	O
program	B-Application
.	O
</s>
