<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
polymorphic	B-Application
recursion	I-Application
(	O
also	O
referred	O
to	O
as	O
Milner	B-Application
–	I-Application
Mycroft	I-Application
typability	I-Application
or	O
the	O
Milner	B-Application
–	I-Application
Mycroft	I-Application
calculus	I-Application
)	O
refers	O
to	O
a	O
recursive	O
parametrically	O
polymorphic	O
function	O
where	O
the	O
type	O
parameter	O
changes	O
with	O
each	O
recursive	O
invocation	O
made	O
,	O
instead	O
of	O
staying	O
constant	O
.	O
</s>
<s>
Type	O
inference	O
for	O
polymorphic	B-Application
recursion	I-Application
is	O
equivalent	O
to	O
semi-unification	O
and	O
therefore	O
undecidable	O
and	O
requires	O
the	O
use	O
of	O
a	O
semi-algorithm	O
or	O
programmer-supplied	O
type	O
annotations	O
.	O
</s>
<s>
Note	O
that	O
Haskell	B-Language
normally	O
infers	O
the	O
type	O
signature	O
for	O
a	O
function	O
as	O
simple-looking	O
as	O
this	O
,	O
but	O
here	O
it	O
cannot	O
be	O
omitted	O
without	O
triggering	O
a	O
type	O
error	O
.	O
</s>
<s>
In	O
type-based	O
program	O
analysis	O
polymorphic	B-Application
recursion	I-Application
is	O
often	O
essential	O
in	O
gaining	O
high	O
precision	O
of	O
the	O
analysis	O
.	O
</s>
<s>
Notable	O
examples	O
of	O
systems	O
employing	O
polymorphic	B-Application
recursion	I-Application
include	O
Dussart	O
,	O
Henglein	O
and	O
Mossin	O
's	O
binding-time	O
analysis	O
and	O
the	O
TofteTalpin	O
region-based	B-General_Concept
memory	I-General_Concept
management	I-General_Concept
system	O
.	O
</s>
<s>
As	O
these	O
systems	O
assume	O
the	O
expressions	O
have	O
already	O
been	O
typed	O
in	O
an	O
underlying	O
type	O
system	O
(	O
not	O
necessary	O
employing	O
polymorphic	B-Application
recursion	I-Application
)	O
,	O
inference	O
can	O
be	O
made	O
decidable	O
again	O
.	O
</s>
<s>
Functional	B-Language
programming	I-Language
data	O
structures	O
often	O
use	O
polymorphic	B-Application
recursion	I-Application
to	O
simplify	O
type	O
error	O
checks	O
and	O
solve	O
problems	O
with	O
nasty	O
"	O
middle	O
"	O
temporary	O
solutions	O
that	O
devour	O
memory	O
in	O
more	O
traditional	O
data	O
structures	O
such	O
as	O
trees	O
.	O
</s>
<s>
In	O
the	O
two	O
citations	O
that	O
follow	O
,	O
Okasaki	O
(	O
pp.144	O
–	O
146	O
)	O
gives	O
a	O
CONS	O
example	O
in	O
Haskell	B-Language
wherein	O
the	O
polymorphic	O
type	O
system	O
automatically	O
flags	O
programmer	O
errors	O
.	O
</s>
<s>
Roberts	O
(	O
p.171	O
)	O
gives	O
a	O
related	O
example	O
in	O
Java	B-Language
,	O
using	O
a	O
Class	O
to	O
represent	O
a	O
stack	O
frame	O
.	O
</s>
<s>
The	O
example	O
given	O
is	O
a	O
solution	O
to	O
the	O
Tower	B-Language
of	I-Language
Hanoi	I-Language
problem	O
wherein	O
a	O
stack	O
simulates	O
polymorphic	B-Application
recursion	I-Application
with	O
a	O
beginning	O
,	O
temporary	O
and	O
ending	O
nested	O
stack	O
substitution	O
structure	O
.	O
</s>
