<s>
In	O
program	O
analysis	O
,	O
shape	B-Language
analysis	I-Language
is	O
a	O
static	O
code	O
analysis	O
technique	O
that	O
discovers	O
and	O
verifies	O
properties	O
of	O
linked	B-Application
,	O
dynamically	B-Application
allocated	I-Application
data	O
structures	O
in	O
(	O
usually	O
imperative	B-Application
)	O
computer	O
programs	O
.	O
</s>
<s>
In	O
Java	B-Language
programs	O
,	O
it	O
can	O
be	O
used	O
to	O
ensure	O
that	O
a	O
sort	O
method	O
correctly	O
sorts	O
a	O
list	O
.	O
</s>
<s>
Shape	B-Language
analysis	I-Language
has	O
been	O
applied	O
to	O
a	O
variety	O
of	O
problems	O
:	O
</s>
<s>
Memory	O
safety	O
:	O
finding	O
memory	B-Error_Name
leaks	I-Error_Name
,	O
dereferences	O
of	O
dangling	B-Error_Name
pointers	I-Error_Name
,	O
and	O
discovering	O
cases	O
where	O
a	O
block	O
of	O
memory	O
is	O
freed	O
more	O
than	O
once	O
.	O
</s>
<s>
Shape	B-Language
analysis	I-Language
is	O
a	O
form	O
of	O
pointer	O
analysis	O
,	O
although	O
it	O
is	O
more	O
precise	O
than	O
typical	O
pointer	O
analysis	O
.	O
</s>
<s>
Shape	B-Language
analysis	I-Language
can	O
determine	O
smaller	O
(	O
more	O
precise	O
)	O
points-to	O
sets	O
.	O
</s>
<s>
This	O
warning	O
is	O
spurious	O
,	O
and	O
the	O
goal	O
of	O
shape	B-Language
analysis	I-Language
is	O
to	O
avoid	O
such	O
warnings	O
.	O
</s>
<s>
Shape	B-Language
analysis	I-Language
overcomes	O
the	O
problems	O
of	O
pointer	O
analysis	O
by	O
using	O
a	O
more	O
flexible	O
naming	O
system	O
for	O
objects	O
.	O
</s>
<s>
The	O
basic	O
heuristic	O
of	O
shape	B-Language
analysis	I-Language
is	O
that	O
objects	O
that	O
are	O
being	O
used	O
by	O
the	O
program	O
are	O
represented	O
using	O
unique	O
materialized	O
objects	O
,	O
while	O
objects	O
not	O
in	O
use	O
are	O
summarized	O
.	O
</s>
<s>
Shape	B-Language
analysis	I-Language
can	O
approximate	O
this	O
situation	O
using	O
a	O
summary	O
for	O
the	O
first	O
set	O
of	O
elements	O
,	O
a	O
materialized	O
memory	O
location	O
for	O
element	O
i	O
,	O
and	O
a	O
summary	O
for	O
the	O
remaining	O
uninitialized	O
locations	O
,	O
as	O
follows	O
:	O
</s>
<s>
The	O
shape	B-Language
analysis	I-Language
determines	O
at	O
this	O
point	O
that	O
all	O
the	O
array	O
elements	O
have	O
been	O
initialized	O
:	O
</s>
