<s>
In	O
programming	B-Application
language	I-Application
semantics	I-Application
,	O
normalisation	B-Application
by	I-Application
evaluation	I-Application
(	O
NBE	O
)	O
is	O
a	O
style	O
of	O
obtaining	O
the	O
normal	B-Application
form	I-Application
of	O
terms	O
in	O
the	O
λ-calculus	B-Language
by	O
appealing	O
to	O
their	O
denotational	B-Application
semantics	I-Application
.	O
</s>
<s>
NBE	O
was	O
first	O
described	O
for	O
the	O
simply	O
typed	O
lambda	B-Language
calculus	I-Language
.	O
</s>
<s>
It	O
has	O
since	O
been	O
extended	O
both	O
to	O
weaker	O
type	O
systems	O
such	O
as	O
the	O
untyped	B-Application
lambda	I-Application
calculus	I-Application
using	O
a	O
domain	O
theoretic	O
approach	O
,	O
and	O
to	O
richer	O
type	O
systems	O
such	O
as	O
several	O
variants	O
of	O
Martin-Löf	O
type	O
theory	O
.	O
</s>
<s>
Consider	O
the	O
simply	O
typed	O
lambda	B-Language
calculus	I-Language
,	O
where	O
types	O
τ	O
can	O
be	O
basic	O
types	O
( α	O
)	O
,	O
function	O
types	O
(	O
→	O
)	O
,	O
or	O
products	O
( ×	O
)	O
,	O
given	O
by	O
the	O
following	O
Backus	O
–	O
Naur	O
form	O
grammar	O
(	O
→	O
associating	O
to	O
the	O
right	O
,	O
as	O
usual	O
)	O
:	O
</s>
<s>
These	O
can	O
be	O
implemented	O
as	O
a	O
datatype	O
in	O
the	O
meta-language	O
;	O
for	O
example	O
,	O
for	O
Standard	B-Language
ML	I-Language
,	O
we	O
might	O
use	O
:	O
</s>
<s>
The	O
denotational	B-Application
semantics	I-Application
of	O
(	O
closed	O
)	O
terms	O
in	O
the	O
meta-language	O
interprets	O
the	O
constructs	O
of	O
the	O
syntax	O
in	O
terms	O
of	O
features	O
of	O
the	O
meta-language	O
;	O
thus	O
,	O
lam	O
is	O
interpreted	O
as	O
abstraction	O
,	O
app	O
as	O
application	O
,	O
etc	O
.	O
</s>
<s>
(	O
Semantic	O
Terms	O
)	O
S	O
,	O
T	O
,…	O
::	O
=	O
LAM	O
( λx	O
.	O
</s>
<s>
Note	O
that	O
there	O
are	O
no	O
variables	O
or	O
elimination	O
forms	O
in	O
the	O
semantics	B-Application
;	O
they	O
are	O
represented	O
simply	O
as	O
syntax	O
.	O
</s>
<s>
The	O
first	O
function	O
,	O
usually	O
written	O
↑	O
τ	O
,	O
reflects	O
the	O
term	O
syntax	O
into	O
the	O
semantics	B-Application
,	O
while	O
the	O
second	O
reifies	O
the	O
semantics	B-Application
as	O
a	O
syntactic	O
term	O
(	O
written	O
as	O
↓	O
τ	O
)	O
.	O
</s>
<s>
By	B-Algorithm
induction	I-Algorithm
on	O
the	O
structure	O
of	O
types	O
,	O
it	O
follows	O
that	O
if	O
the	O
semantic	O
object	O
S	O
denotes	O
a	O
well-typed	O
term	O
s	O
of	O
type	O
τ	O
,	O
then	O
reifying	O
the	O
object	O
(	O
i.e.	O
,	O
↓	O
τ	O
S	O
)	O
produces	O
the	O
β-normal	O
η-long	O
form	O
of	O
s	O
.	O
All	O
that	O
remains	O
is	O
,	O
therefore	O
,	O
to	O
construct	O
the	O
initial	O
semantic	O
interpretation	O
S	O
from	O
a	O
syntactic	O
term	O
s	O
.	O
This	O
operation	O
,	O
written	O
∥s∥Γ	O
,	O
where	O
Γ	O
is	O
a	O
context	O
of	O
bindings	O
,	O
proceeds	O
by	B-Algorithm
induction	I-Algorithm
solely	O
on	O
the	O
term	O
structure	O
:	O
</s>
<s>
This	O
is	O
the	O
well-known	O
encoding	O
of	O
the	O
identity	O
function	O
in	O
combinatory	B-Application
logic	I-Application
.	O
</s>
<s>
The	O
datatype	O
of	O
residual	O
terms	O
can	O
also	O
be	O
the	O
datatype	O
of	O
residual	O
terms	O
in	O
normal	B-Application
form	I-Application
.	O
</s>
<s>
Normalization	B-Application
by	I-Application
evaluation	I-Application
also	O
scales	O
to	O
the	O
simply	O
typed	O
lambda	B-Language
calculus	I-Language
with	O
sums	O
( +	O
)	O
,	O
using	O
the	O
delimited	O
control	O
operators	O
shift	O
and	O
reset	O
.	O
</s>
