<s>
In	O
computing	O
,	O
a	O
compiler	B-Language
is	O
a	O
computer	B-Application
program	I-Application
that	O
translates	B-Application
computer	B-Application
code	I-Application
written	O
in	O
one	O
programming	O
language	O
(	O
the	O
source	O
language	O
)	O
into	O
another	O
language	O
(	O
the	O
target	B-Application
language	I-Application
)	O
.	O
</s>
<s>
The	O
name	O
"	O
compiler	B-Language
"	O
is	O
primarily	O
used	O
for	O
programs	O
that	O
translate	O
source	O
code	O
from	O
a	O
high-level	B-Language
programming	I-Language
language	I-Language
to	O
a	O
low-level	B-Language
programming	I-Language
language	I-Language
(	O
e.g.	O
</s>
<s>
assembly	B-Language
language	I-Language
,	O
object	B-Language
code	I-Language
,	O
or	O
machine	B-Language
code	I-Language
)	O
to	O
create	O
an	O
executable	B-Application
program	I-Application
.	O
</s>
<s>
There	O
are	O
many	O
different	O
types	O
of	O
compilers	B-Language
which	O
produce	O
output	O
in	O
different	O
useful	O
forms	O
.	O
</s>
<s>
A	O
cross-compiler	B-Application
produces	O
code	O
for	O
a	O
different	O
CPU	B-General_Concept
or	O
operating	B-General_Concept
system	I-General_Concept
than	O
the	O
one	O
on	O
which	O
the	O
cross-compiler	B-Application
itself	O
runs	O
.	O
</s>
<s>
A	O
bootstrap	B-Application
compiler	I-Application
is	O
often	O
a	O
temporary	O
compiler	B-Language
,	O
used	O
for	O
compiling	B-Language
a	O
more	O
permanent	O
or	O
better	O
optimised	O
compiler	B-Language
for	O
a	O
language	O
.	O
</s>
<s>
Related	O
software	O
include	O
,	O
a	O
program	O
that	O
translates	B-Application
from	O
a	O
low-level	B-Language
language	I-Language
to	O
a	O
higher	O
level	O
one	O
is	O
a	O
decompiler	B-Application
;	O
a	O
program	O
that	O
translates	B-Application
between	O
high-level	B-Language
languages	I-Language
,	O
usually	O
called	O
a	O
source-to-source	B-Language
compiler	I-Language
or	O
transpiler	B-Language
.	O
</s>
<s>
A	O
language	O
rewriter	O
is	O
usually	O
a	O
program	O
that	O
translates	B-Application
the	O
form	O
of	O
expressions	O
without	O
a	O
change	O
of	O
language	O
.	O
</s>
<s>
A	O
compiler-compiler	B-Language
is	O
a	O
compiler	B-Language
that	O
produces	O
a	O
compiler	B-Language
(	O
or	O
part	O
of	O
one	O
)	O
,	O
often	O
in	O
a	O
generic	O
and	O
reusable	O
way	O
so	O
as	O
to	O
be	O
able	O
to	O
produce	O
many	O
differing	O
compilers	B-Language
.	O
</s>
<s>
A	O
compiler	B-Language
is	O
likely	O
to	O
perform	O
some	O
or	O
all	O
of	O
the	O
following	O
operations	O
,	O
often	O
called	O
phases	O
:	O
preprocessing	B-General_Concept
,	O
lexical	B-Application
analysis	I-Application
,	O
parsing	B-Language
,	O
semantic	O
analysis	B-Application
(	O
syntax-directed	B-Application
translation	I-Application
)	O
,	O
conversion	O
of	O
input	O
programs	O
to	O
an	O
intermediate	B-Application
representation	I-Application
,	O
code	O
optimization	B-Application
and	O
machine	B-Application
specific	I-Application
code	I-Application
generation	I-Application
.	O
</s>
<s>
Compilers	B-Language
generally	O
implement	O
these	O
phases	O
as	O
modular	O
components	O
,	O
promoting	O
efficient	O
design	O
and	O
correctness	O
of	O
transformations	O
of	O
source	O
input	O
to	O
target	O
output	O
.	O
</s>
<s>
Program	O
faults	O
caused	O
by	O
incorrect	O
compiler	B-Language
behavior	O
can	O
be	O
very	O
difficult	O
to	O
track	O
down	O
and	O
work	O
around	O
;	O
therefore	O
,	O
compiler	B-Language
implementers	O
invest	O
significant	O
effort	O
to	O
ensure	O
compiler	B-Application
correctness	I-Application
.	O
</s>
<s>
Compilers	B-Language
are	O
not	O
the	O
only	O
language	O
processor	O
used	O
to	O
transform	O
source	O
programs	O
.	O
</s>
<s>
An	O
interpreter	B-Application
is	O
computer	O
software	O
that	O
transforms	O
and	O
then	O
executes	O
the	O
indicated	O
operations	O
.	O
</s>
<s>
The	O
translation	B-Application
process	O
influences	O
the	O
design	O
of	O
computer	O
languages	O
,	O
which	O
leads	O
to	O
a	O
preference	O
of	O
compilation	B-Language
or	O
interpretation	O
.	O
</s>
<s>
In	O
theory	O
,	O
a	B-Language
programming	I-Language
language	I-Language
can	O
have	O
both	O
a	O
compiler	B-Language
and	O
an	O
interpreter	B-Application
.	O
</s>
<s>
In	O
practice	O
,	O
programming	O
languages	O
tend	O
to	O
be	O
associated	O
with	O
just	O
one	O
(	O
a	O
compiler	B-Language
or	O
an	O
interpreter	B-Application
)	O
.	O
</s>
<s>
In	O
the	O
late	O
1940s	O
,	O
assembly	B-Language
languages	I-Language
were	O
created	O
to	O
offer	O
a	O
more	O
workable	O
abstraction	O
of	O
the	O
computer	O
architectures	O
.	O
</s>
<s>
Limited	O
memory	O
capacity	O
of	O
early	O
computers	O
led	O
to	O
substantial	O
technical	O
challenges	O
when	O
the	O
first	O
compilers	B-Language
were	O
designed	O
.	O
</s>
<s>
Therefore	O
,	O
the	O
compilation	B-Language
process	O
needed	O
to	O
be	O
divided	O
into	O
several	O
small	O
programs	O
.	O
</s>
<s>
The	O
front	O
end	O
programs	O
produce	O
the	O
analysis	B-Application
products	O
used	O
by	O
the	O
back	O
end	O
programs	O
to	O
generate	O
target	O
code	O
.	O
</s>
<s>
As	O
computer	O
technology	O
provided	O
more	O
resources	O
,	O
compiler	B-Language
designs	O
could	O
align	O
better	O
with	O
the	O
compilation	B-Language
process	O
.	O
</s>
<s>
It	O
is	O
usually	O
more	O
productive	O
for	O
a	O
programmer	O
to	O
use	O
a	O
high-level	B-Language
language	I-Language
,	O
so	O
the	O
development	O
of	O
high-level	B-Language
languages	I-Language
followed	O
naturally	O
from	O
the	O
capabilities	O
offered	O
by	O
digital	O
computers	O
.	O
</s>
<s>
High-level	B-Language
languages	I-Language
are	O
formal	O
languages	O
that	O
are	O
strictly	O
defined	O
by	O
their	O
syntax	O
and	O
semantics	B-Application
which	O
form	O
the	O
high-level	B-Language
language	I-Language
architecture	O
.	O
</s>
<s>
Backus	O
–	O
Naur	O
form	O
(	O
BNF	O
)	O
describes	O
the	O
syntax	O
of	O
"	O
sentences	O
"	O
of	O
a	O
language	O
and	O
was	O
used	O
for	O
the	O
syntax	O
of	O
Algol	B-Language
60	I-Language
by	O
John	O
Backus	O
.	O
</s>
<s>
"	O
BNF	O
and	O
its	O
extensions	O
have	O
become	O
standard	O
tools	O
for	O
describing	O
the	O
syntax	O
of	O
programming	O
notations	O
,	O
and	O
in	O
many	O
cases	O
parts	O
of	O
compilers	B-Language
are	O
generated	O
automatically	O
from	O
a	O
BNF	O
description.	O
"	O
</s>
<s>
In	O
the	O
1940s	O
,	O
Konrad	O
Zuse	O
designed	O
an	O
algorithmic	O
programming	O
language	O
called	O
Plankalkül	B-Language
(	O
"	O
Plan	B-Language
Calculus	I-Language
"	O
)	O
.	O
</s>
<s>
While	O
no	O
actual	O
implementation	O
occurred	O
until	O
the	O
1970s	O
,	O
it	O
presented	O
concepts	O
later	O
seen	O
in	O
APL	B-Language
designed	O
by	O
Ken	O
Iverson	O
in	O
the	O
late	O
1950s	O
.	O
</s>
<s>
APL	B-Language
is	O
a	O
language	O
for	O
mathematical	O
computations	O
.	O
</s>
<s>
High-level	B-Language
language	I-Language
design	O
during	O
the	O
formative	O
years	O
of	O
digital	O
computing	O
provided	O
useful	O
programming	O
tools	O
for	O
a	O
variety	O
of	O
applications	O
:	O
</s>
<s>
FORTRAN	B-Application
(	O
Formula	B-Application
Translation	I-Application
)	O
for	O
engineering	O
and	O
science	O
applications	O
is	O
considered	O
to	O
be	O
the	O
first	O
high-level	B-Language
language	I-Language
.	O
</s>
<s>
COBOL	B-Application
(	O
Common	B-Application
Business-Oriented	I-Application
Language	I-Application
)	O
evolved	O
from	O
A-0	B-Language
and	O
FLOW-MATIC	B-Language
to	O
become	O
the	O
dominant	O
high-level	B-Language
language	I-Language
for	O
business	O
applications	O
.	O
</s>
<s>
LISP	B-Language
(	O
List	O
Processor	O
)	O
for	O
symbolic	O
computation	O
.	O
</s>
<s>
Compiler	B-Language
technology	O
evolved	O
from	O
the	O
need	O
for	O
a	O
strictly	O
defined	O
transformation	B-Application
of	O
the	O
high-level	O
source	O
program	O
into	O
a	O
low-level	B-Language
target	O
program	O
for	O
the	O
digital	O
computer	O
.	O
</s>
<s>
The	O
compiler	B-Language
could	O
be	O
viewed	O
as	O
a	O
front	O
end	O
to	O
deal	O
with	O
the	O
analysis	B-Application
of	O
the	O
source	O
code	O
and	O
a	O
back	O
end	O
to	O
synthesize	O
the	O
analysis	B-Application
into	O
the	O
target	O
code	O
.	O
</s>
<s>
Optimization	B-Application
between	O
the	O
front	O
end	O
and	O
back	O
end	O
could	O
produce	O
more	O
efficient	O
target	O
code	O
.	O
</s>
<s>
Some	O
early	O
milestones	O
in	O
the	O
development	O
of	O
compiler	B-Language
technology	O
:	O
</s>
<s>
1952	O
:	O
An	O
Autocode	B-Language
compiler	B-Language
developed	O
by	O
Alick	O
Glennie	O
for	O
the	O
Manchester	B-Device
Mark	I-Device
I	I-Device
computer	O
at	O
the	O
University	O
of	O
Manchester	O
is	O
considered	O
by	O
some	O
to	O
be	O
the	O
first	O
compiled	B-Language
programming	I-Language
language	I-Language
.	O
</s>
<s>
1952	O
:	O
Grace	O
Hopper	O
's	O
team	O
at	O
Remington	O
Rand	O
wrote	O
the	O
compiler	B-Language
for	O
the	O
A-0	B-Language
programming	I-Language
language	I-Language
(	O
and	O
coined	O
the	O
term	O
compiler	B-Language
to	O
describe	O
it	O
)	O
,	O
although	O
the	O
A-0	B-Language
compiler	B-Language
functioned	O
more	O
as	O
a	O
loader	O
or	O
linker	O
than	O
the	O
modern	O
notion	O
of	O
a	O
full	O
compiler	B-Language
.	O
</s>
<s>
1954	O
–	O
1957	O
:	O
A	O
team	O
led	O
by	O
John	O
Backus	O
at	O
IBM	O
developed	O
FORTRAN	B-Application
which	O
is	O
usually	O
considered	O
the	O
first	O
high-level	B-Language
language	I-Language
.	O
</s>
<s>
In	O
1957	O
,	O
they	O
completed	O
a	O
FORTRAN	B-Application
compiler	B-Language
that	O
is	O
generally	O
credited	O
as	O
having	O
introduced	O
the	O
first	O
unambiguously	O
complete	O
compiler	B-Language
.	O
</s>
<s>
1959	O
:	O
The	O
Conference	O
on	O
Data	O
Systems	O
Language	O
(	O
CODASYL	O
)	O
initiated	O
development	O
of	O
COBOL	B-Application
.	O
</s>
<s>
The	O
COBOL	B-Application
design	O
drew	O
on	O
A-0	B-Language
and	O
FLOW-MATIC	B-Language
.	O
</s>
<s>
By	O
the	O
early	O
1960s	O
COBOL	B-Application
was	O
compiled	B-Language
on	O
multiple	O
architectures	O
.	O
</s>
<s>
1958-1960	O
:	O
Algol	B-Language
58	I-Language
was	O
the	O
precursor	O
to	O
ALGOL	B-Language
60	I-Language
.	O
</s>
<s>
Algol	B-Language
58	I-Language
introduced	O
code	O
blocks	O
,	O
a	O
key	O
advance	O
in	O
the	O
rise	O
of	O
structured	B-Language
programming	I-Language
.	O
</s>
<s>
ALGOL	B-Language
60	I-Language
was	O
the	O
first	O
language	O
to	O
implement	O
nested	O
function	O
definitions	O
with	O
lexical	O
scope	O
.	O
</s>
<s>
ALGOL	B-Language
60	I-Language
inspired	O
many	O
languages	O
that	O
followed	O
it	O
.	O
</s>
<s>
1958	O
–	O
1962	O
:	O
John	O
McCarthy	O
at	O
MIT	O
designed	O
LISP	B-Language
.	O
</s>
<s>
In	O
1962	O
,	O
LISP	B-Language
1.5	I-Language
release	O
noted	O
some	O
tools	O
:	O
an	O
interpreter	B-Application
written	O
by	O
Stephen	O
Russell	O
and	O
Daniel	O
J	O
.	O
Edwards	O
,	O
a	O
compiler	B-Language
and	O
assembler	B-Language
written	O
by	O
Tim	O
Hart	O
and	O
Mike	O
Levin	O
.	O
</s>
<s>
Early	O
operating	B-General_Concept
systems	I-General_Concept
and	O
software	O
were	O
written	O
in	O
assembly	B-Language
language	I-Language
.	O
</s>
<s>
In	O
the	O
1960s	O
and	O
early	O
1970s	O
,	O
the	O
use	O
of	O
high-level	B-Language
languages	I-Language
for	O
system	O
programming	O
was	O
still	O
controversial	O
due	O
to	O
resource	O
limitations	O
.	O
</s>
<s>
However	O
,	O
several	O
research	O
and	O
industry	O
efforts	O
began	O
the	O
shift	O
toward	O
high-level	O
systems	O
programming	O
languages	O
,	O
for	O
example	O
,	O
BCPL	B-Language
,	O
BLISS	B-Language
,	O
B	B-Language
,	O
and	O
C	B-Language
.	O
</s>
<s>
BCPL	B-Language
(	O
Basic	B-Language
Combined	I-Language
Programming	I-Language
Language	I-Language
)	O
designed	O
in	O
1966	O
by	O
Martin	O
Richards	O
at	O
the	O
University	O
of	O
Cambridge	O
was	O
originally	O
developed	O
as	O
a	O
compiler	B-Language
writing	O
tool	O
.	O
</s>
<s>
Several	O
compilers	B-Language
have	O
been	O
implemented	O
,	O
Richards	O
 '	O
book	O
provides	O
insights	O
to	O
the	O
language	O
and	O
its	O
compiler	B-Language
.	O
</s>
<s>
BCPL	B-Language
was	O
not	O
only	O
an	O
influential	O
systems	O
programming	O
language	O
that	O
is	O
still	O
used	O
in	O
research	O
but	O
also	O
provided	O
a	O
basis	O
for	O
the	O
design	O
of	O
B	B-Language
and	O
C	B-Language
languages	I-Language
.	O
</s>
<s>
BLISS	B-Language
(	O
Basic	O
Language	O
for	O
Implementation	O
of	O
System	O
Software	O
)	O
was	O
developed	O
for	O
a	O
Digital	O
Equipment	O
Corporation	O
(	O
DEC	O
)	O
PDP-10	O
computer	O
by	O
W.A.	O
</s>
<s>
The	O
CMU	O
team	O
went	O
on	O
to	O
develop	O
BLISS-11	O
compiler	B-Language
one	O
year	O
later	O
in	O
1970	O
.	O
</s>
<s>
Multics	B-Application
(	O
Multiplexed	B-Application
Information	I-Application
and	I-Application
Computing	I-Application
Service	I-Application
)	O
,	O
a	O
time-sharing	O
operating	B-General_Concept
system	I-General_Concept
project	O
,	O
involved	O
MIT	O
,	O
Bell	O
Labs	O
,	O
General	O
Electric	O
(	O
later	O
Honeywell	O
)	O
and	O
was	O
led	O
by	O
Fernando	O
Corbató	O
from	O
MIT	O
.	O
</s>
<s>
Multics	B-Application
was	O
written	O
in	O
the	O
PL/I	B-Language
language	O
developed	O
by	O
IBM	O
and	O
IBM	O
User	O
Group	O
.	O
</s>
<s>
There	O
were	O
other	O
languages	O
that	O
could	O
have	O
been	O
considered	O
but	O
PL/I	B-Language
offered	O
the	O
most	O
complete	O
solution	O
even	O
though	O
it	O
had	O
not	O
been	O
implemented	O
.	O
</s>
<s>
For	O
the	O
first	O
few	O
years	O
of	O
the	O
Multics	B-Application
project	O
,	O
a	O
subset	O
of	O
the	O
language	O
could	O
be	O
compiled	B-Language
to	O
assembly	B-Language
language	I-Language
with	O
the	O
Early	O
PL/I	B-Language
(	O
EPL	O
)	O
compiler	B-Language
by	O
Doug	O
McIlory	O
and	O
Bob	O
Morris	O
from	O
Bell	O
Labs	O
.	O
</s>
<s>
EPL	O
supported	O
the	O
project	O
until	O
a	O
boot-strapping	O
compiler	B-Language
for	O
the	O
full	O
PL/I	B-Language
could	O
be	O
developed	O
.	O
</s>
<s>
Bell	O
Labs	O
left	O
the	O
Multics	B-Application
project	O
in	O
1969	O
,	O
and	O
developed	O
a	O
system	O
programming	O
language	O
B	B-Language
based	O
on	O
BCPL	B-Language
concepts	O
,	O
written	O
by	O
Dennis	O
Ritchie	O
and	O
Ken	O
Thompson	O
.	O
</s>
<s>
Ritchie	O
created	O
a	O
boot-strapping	O
compiler	B-Language
for	O
B	B-Language
and	O
wrote	O
Unics	B-Application
(	O
Uniplexed	O
Information	O
and	O
Computing	O
Service	O
)	O
operating	B-General_Concept
system	I-General_Concept
for	O
a	O
PDP-7	O
in	O
B	B-Language
.	O
Unics	B-Application
eventually	O
became	O
spelled	O
Unix	B-Application
.	O
</s>
<s>
Bell	O
Labs	O
started	O
the	O
development	O
and	O
expansion	O
of	O
C	B-Language
based	O
on	O
B	B-Language
and	O
BCPL	B-Language
.	O
</s>
<s>
The	O
BCPL	B-Language
compiler	B-Language
had	O
been	O
transported	O
to	O
Multics	B-Application
by	O
Bell	O
Labs	O
and	O
BCPL	B-Language
was	O
a	O
preferred	O
language	O
at	O
Bell	O
Labs	O
.	O
</s>
<s>
Initially	O
,	O
a	O
front-end	O
program	O
to	O
Bell	O
Labs	O
 '	O
B	B-Language
compiler	B-Language
was	O
used	O
while	O
a	O
C	B-Language
compiler	B-Language
was	O
developed	O
.	O
</s>
<s>
In	O
1971	O
,	O
a	O
new	O
PDP-11	O
provided	O
the	O
resource	O
to	O
define	O
extensions	O
to	O
B	B-Language
and	O
rewrite	O
the	O
compiler	B-Language
.	O
</s>
<s>
By	O
1973	O
the	O
design	O
of	O
C	B-Language
language	I-Language
was	O
essentially	O
complete	O
and	O
the	O
Unix	B-Application
kernel	O
for	O
a	O
PDP-11	O
was	O
rewritten	O
in	O
C	B-Language
.	O
Steve	O
Johnson	O
started	O
development	O
of	O
Portable	O
C	B-Language
Compiler	B-Language
(	O
PCC	O
)	O
to	O
support	O
retargeting	O
of	O
C	B-Language
compilers	B-Language
to	O
new	O
machines	O
.	O
</s>
<s>
Object-oriented	B-Language
programming	I-Language
(	O
OOP	O
)	O
offered	O
some	O
interesting	O
possibilities	O
for	O
application	O
development	O
and	O
maintenance	O
.	O
</s>
<s>
OOP	O
concepts	O
go	O
further	O
back	O
but	O
were	O
part	O
of	O
LISP	B-Language
and	O
Simula	B-Language
language	O
science	O
.	O
</s>
<s>
At	O
Bell	O
Labs	O
,	O
the	O
development	O
of	O
C++	B-Language
became	O
interested	O
in	O
OOP	O
.	O
</s>
<s>
C++	B-Language
was	O
first	O
used	O
in	O
1980	O
for	O
systems	O
programming	O
.	O
</s>
<s>
The	O
initial	O
design	O
leveraged	O
C	B-Language
language	I-Language
systems	O
programming	O
capabilities	O
with	O
Simula	B-Language
concepts	O
.	O
</s>
<s>
Object-oriented	B-Language
facilities	O
were	O
added	O
in	O
1983	O
.	O
</s>
<s>
The	O
Cfront	B-Device
program	O
implemented	O
a	O
C++	B-Language
front-end	O
for	O
C84	O
language	B-Language
compiler	I-Language
.	O
</s>
<s>
In	O
subsequent	O
years	O
several	O
C++	B-Language
compilers	B-Language
were	O
developed	O
as	O
C++	B-Language
popularity	O
grew	O
.	O
</s>
<s>
Because	O
of	O
the	O
expanding	O
functionality	O
supported	O
by	O
newer	O
programming	O
languages	O
and	O
the	O
increasing	O
complexity	O
of	O
computer	O
architectures	O
,	O
compilers	B-Language
became	O
more	O
complex	O
.	O
</s>
<s>
DARPA	O
(	O
Defense	O
Advanced	O
Research	O
Projects	O
Agency	O
)	O
sponsored	O
a	O
compiler	B-Language
project	O
with	O
Wulf	O
's	O
CMU	O
research	O
team	O
in	O
1970	O
.	O
</s>
<s>
The	O
Production	O
Quality	O
Compiler-Compiler	B-Language
PQCC	B-Application
design	O
would	O
produce	O
a	O
Production	O
Quality	O
Compiler	B-Language
(	O
PQC	O
)	O
from	O
formal	O
definitions	O
of	O
source	O
language	O
and	O
the	O
target	O
.	O
</s>
<s>
PQCC	B-Application
tried	O
to	O
extend	O
the	O
term	O
compiler-compiler	B-Language
beyond	O
the	O
traditional	O
meaning	O
as	O
a	O
parser	B-Language
generator	I-Language
(	O
e.g.	O
,	O
Yacc	B-Application
)	O
without	O
much	O
success	O
.	O
</s>
<s>
PQCC	B-Application
might	O
more	O
properly	O
be	O
referred	O
to	O
as	O
a	O
compiler	B-Language
generator	I-Language
.	O
</s>
<s>
PQCC	B-Application
research	O
into	O
code	B-Application
generation	I-Application
process	O
sought	O
to	O
build	O
a	O
truly	O
automatic	O
compiler-writing	O
system	O
.	O
</s>
<s>
The	O
BLISS-11	O
compiler	B-Language
provided	O
the	O
initial	O
structure	O
.	O
</s>
<s>
The	O
phases	O
included	O
analyses	O
(	O
front	O
end	O
)	O
,	O
intermediate	O
translation	B-Application
to	O
virtual	B-Architecture
machine	I-Architecture
(	O
middle	O
end	O
)	O
,	O
and	O
translation	B-Application
to	O
the	O
target	O
(	O
back	O
end	O
)	O
.	O
</s>
<s>
TCOL	O
was	O
developed	O
for	O
the	O
PQCC	B-Application
research	O
to	O
handle	O
language	O
specific	O
constructs	O
in	O
the	O
intermediate	B-Application
representation	I-Application
.	O
</s>
<s>
The	O
PQCC	B-Application
project	O
investigated	O
techniques	O
of	O
automated	O
compiler	B-Language
construction	O
.	O
</s>
<s>
The	O
design	O
concepts	O
proved	O
useful	O
in	O
optimizing	B-Application
compilers	I-Application
and	O
compilers	B-Language
for	O
the	O
(	O
since	O
1995	O
,	O
object-oriented	B-Language
)	O
programming	O
language	O
Ada	B-Language
.	O
</s>
<s>
The	O
Ada	B-Language
STONEMAN	O
document	O
formalized	O
the	O
program	O
support	O
environment	O
(	O
APSE	O
)	O
along	O
with	O
the	O
kernel	O
(	O
KAPSE	O
)	O
and	O
minimal	O
(	O
MAPSE	O
)	O
.	O
</s>
<s>
An	O
Ada	B-Language
interpreter	B-Application
NYU/ED	O
supported	O
development	O
and	O
standardization	O
efforts	O
with	O
the	O
American	O
National	O
Standards	O
Institute	O
(	O
ANSI	O
)	O
and	O
the	O
International	O
Standards	O
Organization	O
(	O
ISO	O
)	O
.	O
</s>
<s>
Initial	O
Ada	B-Language
compiler	B-Language
development	O
by	O
the	O
U.S.	O
Military	O
Services	O
included	O
the	O
compilers	B-Language
in	O
a	O
complete	O
integrated	B-Application
design	I-Application
environment	I-Application
along	O
the	O
lines	O
of	O
the	O
STONEMAN	O
document	O
.	O
</s>
<s>
Army	O
and	O
Navy	O
worked	O
on	O
the	O
Ada	B-Language
Language	I-Language
System	O
(	O
ALS	O
)	O
project	O
targeted	O
to	O
DEC/VAX	O
architecture	O
while	O
the	O
Air	O
Force	O
started	O
on	O
the	O
Ada	B-Language
Integrated	O
Environment	O
(	O
AIE	O
)	O
targeted	O
to	O
IBM	O
370	O
series	O
.	O
</s>
<s>
While	O
the	O
projects	O
did	O
not	O
provide	O
the	O
desired	O
results	O
,	O
they	O
did	O
contribute	O
to	O
the	O
overall	O
effort	O
on	O
Ada	B-Language
development	O
.	O
</s>
<s>
Other	O
Ada	B-Language
compiler	B-Language
efforts	O
got	O
underway	O
in	O
Britain	O
at	O
the	O
University	O
of	O
York	O
and	O
in	O
Germany	O
at	O
the	O
University	O
of	O
Karlsruhe	O
.	O
</s>
<s>
In	O
the	O
U	O
.	O
S.	O
,	O
Verdix	O
(	O
later	O
acquired	O
by	O
Rational	O
)	O
delivered	O
the	O
Verdix	O
Ada	B-Language
Development	O
System	O
(	O
VADS	O
)	O
to	O
the	O
Army	O
.	O
</s>
<s>
VADS	O
provided	O
a	O
set	O
of	O
development	O
tools	O
including	O
a	O
compiler	B-Language
.	O
</s>
<s>
Unix/VADS	O
could	O
be	O
hosted	O
on	O
a	O
variety	O
of	O
Unix	B-Application
platforms	B-Device
such	O
as	O
DEC	O
Ultrix	O
and	O
the	O
Sun	O
3/60	O
Solaris	O
targeted	O
to	O
Motorola	O
68020	O
in	O
an	O
Army	O
CECOM	O
evaluation	O
.	O
</s>
<s>
There	O
were	O
soon	O
many	O
Ada	B-Language
compilers	B-Language
available	O
that	O
passed	O
the	O
Ada	B-Language
Validation	O
tests	O
.	O
</s>
<s>
The	O
Free	B-Application
Software	I-Application
Foundation	O
GNU	O
project	O
developed	O
the	O
GNU	B-Application
Compiler	I-Application
Collection	I-Application
(	O
GCC	B-Application
)	O
which	O
provides	O
a	O
core	O
capability	O
to	O
support	O
multiple	O
languages	O
and	O
targets	O
.	O
</s>
<s>
The	O
Ada	B-Language
version	O
GNAT	B-Language
is	O
one	O
of	O
the	O
most	O
widely	O
used	O
Ada	B-Language
compilers	B-Language
.	O
</s>
<s>
GNAT	B-Language
is	O
free	O
but	O
there	O
is	O
also	O
commercial	O
support	O
,	O
for	O
example	O
,	O
AdaCore	O
,	O
was	O
founded	O
in	O
1994	O
to	O
provide	O
commercial	O
software	O
solutions	O
for	O
Ada	B-Language
.	O
</s>
<s>
GNAT	B-Language
Pro	I-Language
includes	O
the	O
GNU	B-Application
GCC	I-Application
based	O
GNAT	B-Language
with	O
a	O
tool	O
suite	O
to	O
provide	O
an	O
integrated	B-Application
development	I-Application
environment	I-Application
.	O
</s>
<s>
High-level	B-Language
languages	I-Language
continued	O
to	O
drive	O
compiler	B-Language
research	O
and	O
development	O
.	O
</s>
<s>
Focus	O
areas	O
included	O
optimization	B-Application
and	O
automatic	O
code	B-Application
generation	I-Application
.	O
</s>
<s>
Trends	O
in	O
programming	O
languages	O
and	O
development	O
environments	O
influenced	O
compiler	B-Language
technology	O
.	O
</s>
<s>
More	O
compilers	B-Language
became	O
included	O
in	O
language	O
distributions	O
(	O
PERL	O
,	O
Java	B-Language
Development	O
Kit	O
)	O
and	O
as	O
a	O
component	O
of	O
an	O
IDE	O
(	O
VADS	O
,	O
Eclipse	O
,	O
Ada	B-Language
Pro	O
)	O
.	O
</s>
<s>
The	O
conventional	O
transformation	B-Application
of	O
these	O
language	O
used	O
an	O
interpreter	B-Application
.	O
</s>
<s>
While	O
not	O
widely	O
used	O
,	O
Bash	O
and	O
Batch	O
compilers	B-Language
have	O
been	O
written	O
.	O
</s>
<s>
More	O
recently	O
sophisticated	O
interpreted	B-Application
languages	I-Application
became	O
part	O
of	O
the	O
developers	O
tool	O
kit	O
.	O
</s>
<s>
Modern	O
scripting	O
languages	O
include	O
PHP	O
,	O
Python	B-Language
,	O
Ruby	O
and	O
Lua	O
.	O
</s>
<s>
All	O
of	O
these	O
have	O
interpreter	B-Application
and	O
compiler	B-Language
support	O
.	O
</s>
<s>
"	O
When	O
the	O
field	O
of	O
compiling	B-Language
began	O
in	O
the	O
late	O
50s	O
,	O
its	O
focus	O
was	O
limited	O
to	O
the	O
translation	B-Application
of	O
high-level	B-Language
language	I-Language
programs	O
into	O
machine	B-Language
code	I-Language
...	O
</s>
<s>
The	O
compiler	B-Language
field	O
is	O
increasingly	O
intertwined	O
with	O
other	O
disciplines	O
including	O
computer	O
architecture	O
,	O
programming	O
languages	O
,	O
formal	B-Architecture
methods	I-Architecture
,	O
software	O
engineering	O
,	O
and	O
computer	O
security.	O
"	O
</s>
<s>
The	O
"	O
Compiler	B-Language
Research	O
:	O
The	O
Next	O
50	O
Years	O
"	O
article	O
noted	O
the	O
importance	O
of	O
object-oriented	B-Language
languages	I-Language
and	O
Java	B-Language
.	O
</s>
<s>
A	O
compiler	B-Language
implements	O
a	O
formal	O
transformation	B-Application
from	O
a	O
high-level	O
source	O
program	O
to	O
a	O
low-level	B-Language
target	O
program	O
.	O
</s>
<s>
Compiler	B-Language
design	O
can	O
define	O
an	O
end-to-end	O
solution	O
or	O
tackle	O
a	O
defined	O
subset	O
that	O
interfaces	O
with	O
other	O
compilation	B-Language
tools	O
e.g.	O
</s>
<s>
preprocessors	B-General_Concept
,	O
assemblers	B-Language
,	O
linkers	O
.	O
</s>
<s>
Design	O
requirements	O
include	O
rigorously	O
defined	O
interfaces	O
both	O
internally	O
between	O
compiler	B-Language
components	O
and	O
externally	O
between	O
supporting	O
toolsets	O
.	O
</s>
<s>
In	O
the	O
early	O
days	O
,	O
the	O
approach	O
taken	O
to	O
compiler	B-Language
design	O
was	O
directly	O
affected	O
by	O
the	O
complexity	O
of	O
the	O
computer	O
language	O
to	O
be	O
processed	O
,	O
the	O
experience	O
of	O
the	O
person(s )	O
designing	O
it	O
,	O
and	O
the	O
resources	O
available	O
.	O
</s>
<s>
A	O
compiler	B-Language
for	O
a	O
relatively	O
simple	O
language	O
written	O
by	O
one	O
person	O
might	O
be	O
a	O
single	O
,	O
monolithic	O
piece	O
of	O
software	O
.	O
</s>
<s>
Separate	O
phases	O
provide	O
design	O
improvements	O
that	O
focus	O
development	O
on	O
the	O
functions	O
in	O
the	O
compilation	B-Language
process	O
.	O
</s>
<s>
Classifying	O
compilers	B-Language
by	O
number	O
of	O
passes	O
has	O
its	O
background	O
in	O
the	O
hardware	B-Architecture
resource	O
limitations	O
of	O
computers	O
.	O
</s>
<s>
Compiling	B-Language
involves	O
performing	O
much	O
work	O
and	O
early	O
computers	O
did	O
not	O
have	O
enough	O
memory	O
to	O
contain	O
one	O
program	O
that	O
did	O
all	O
of	O
this	O
work	O
.	O
</s>
<s>
So	O
compilers	B-Language
were	O
split	O
up	O
into	O
smaller	O
programs	O
which	O
each	O
made	O
a	O
pass	O
over	O
the	O
source	O
(	O
or	O
some	O
representation	O
of	O
it	O
)	O
performing	O
some	O
of	O
the	O
required	O
analysis	B-Application
and	O
translations	O
.	O
</s>
<s>
The	O
ability	O
to	O
compile	B-Language
in	O
a	O
single	B-Language
pass	I-Language
has	O
classically	O
been	O
seen	O
as	O
a	O
benefit	O
because	O
it	O
simplifies	O
the	O
job	O
of	O
writing	O
a	O
compiler	B-Language
and	O
one-pass	B-Language
compilers	I-Language
generally	O
perform	O
compilations	B-Language
faster	O
than	O
multi-pass	B-Application
compilers	I-Application
.	O
</s>
<s>
Thus	O
,	O
partly	O
driven	O
by	O
the	O
resource	O
limitations	O
of	O
early	O
systems	O
,	O
many	O
early	O
languages	O
were	O
specifically	O
designed	O
so	O
that	O
they	O
could	O
be	O
compiled	B-Language
in	O
a	O
single	B-Language
pass	I-Language
(	O
e.g.	O
,	O
Pascal	B-Application
)	O
.	O
</s>
<s>
In	O
some	O
cases	O
,	O
the	O
design	O
of	O
a	O
language	O
feature	O
may	O
require	O
a	O
compiler	B-Language
to	O
perform	O
more	O
than	O
one	O
pass	O
over	O
the	O
source	O
.	O
</s>
<s>
For	O
instance	O
,	O
consider	O
a	O
declaration	O
appearing	O
on	O
line	O
20	O
of	O
the	O
source	O
which	O
affects	O
the	O
translation	B-Application
of	O
a	O
statement	O
appearing	O
on	O
line	O
10	O
.	O
</s>
<s>
In	O
this	O
case	O
,	O
the	O
first	O
pass	O
needs	O
to	O
gather	O
information	O
about	O
declarations	O
appearing	O
after	O
statements	O
that	O
they	O
affect	O
,	O
with	O
the	O
actual	O
translation	B-Application
happening	O
during	O
a	O
subsequent	O
pass	O
.	O
</s>
<s>
The	O
disadvantage	O
of	O
compiling	B-Language
in	O
a	O
single	B-Language
pass	I-Language
is	O
that	O
it	O
is	O
not	O
possible	O
to	O
perform	O
many	O
of	O
the	O
sophisticated	O
optimizations	B-Application
needed	O
to	O
generate	O
high	O
quality	O
code	O
.	O
</s>
<s>
It	O
can	O
be	O
difficult	O
to	O
count	O
exactly	O
how	O
many	O
passes	O
an	O
optimizing	B-Application
compiler	I-Application
makes	O
.	O
</s>
<s>
For	O
instance	O
,	O
different	O
phases	O
of	O
optimization	B-Application
may	O
analyse	O
one	O
expression	O
many	O
times	O
but	O
only	O
analyse	O
another	O
expression	O
once	O
.	O
</s>
<s>
Splitting	O
a	O
compiler	B-Language
up	O
into	O
small	O
programs	O
is	O
a	O
technique	O
used	O
by	O
researchers	O
interested	O
in	O
producing	O
provably	O
correct	O
compilers	B-Language
.	O
</s>
<s>
Regardless	O
of	O
the	O
exact	O
number	O
of	O
phases	O
in	O
the	O
compiler	B-Language
design	O
,	O
the	O
phases	O
can	O
be	O
assigned	O
to	O
one	O
of	O
three	O
stages	O
.	O
</s>
<s>
The	O
front	O
end	O
scans	O
the	O
input	O
and	O
verifies	O
syntax	O
and	O
semantics	B-Application
according	O
to	O
a	O
specific	O
source	O
language	O
.	O
</s>
<s>
Aspects	O
of	O
the	O
front	O
end	O
include	O
lexical	B-Application
analysis	I-Application
,	O
syntax	B-Language
analysis	I-Language
,	O
and	O
semantic	O
analysis	B-Application
.	O
</s>
<s>
The	O
front	O
end	O
transforms	O
the	O
input	O
program	O
into	O
an	O
intermediate	B-Application
representation	I-Application
(	O
IR	B-Application
)	O
for	O
further	O
processing	O
by	O
the	O
middle	O
end	O
.	O
</s>
<s>
This	O
IR	B-Application
is	O
usually	O
a	O
lower-level	O
representation	O
of	O
the	O
program	O
with	O
respect	O
to	O
the	O
source	O
code	O
.	O
</s>
<s>
The	O
middle	O
end	O
performs	O
optimizations	B-Application
on	O
the	O
IR	B-Application
that	O
are	O
independent	O
of	O
the	O
CPU	B-General_Concept
architecture	O
being	O
targeted	O
.	O
</s>
<s>
This	O
source	O
code/machine	O
code	O
independence	O
is	O
intended	O
to	O
enable	O
generic	O
optimizations	B-Application
to	O
be	O
shared	O
between	O
versions	O
of	O
the	O
compiler	B-Language
supporting	O
different	O
languages	O
and	O
target	O
processors	O
.	O
</s>
<s>
Examples	O
of	O
middle	O
end	O
optimizations	B-Application
are	O
removal	O
of	O
useless	O
(	O
dead-code	O
elimination	O
)	O
or	O
unreachable	O
code	O
(	O
reachability	O
analysis	B-Application
)	O
,	O
discovery	O
and	O
propagation	O
of	O
constant	O
values	O
(	O
constant	O
propagation	O
)	O
,	O
relocation	O
of	O
computation	O
to	O
a	O
less	O
frequently	O
executed	O
place	O
(	O
e.g.	O
,	O
out	O
of	O
a	O
loop	O
)	O
,	O
or	O
specialization	O
of	O
computation	O
based	O
on	O
the	O
context	O
,	O
eventually	O
producing	O
the	O
"	O
optimized	O
"	O
IR	B-Application
that	O
is	O
used	O
by	O
the	O
back	O
end	O
.	O
</s>
<s>
The	O
back	O
end	O
takes	O
the	O
optimized	O
IR	B-Application
from	O
the	O
middle	O
end	O
.	O
</s>
<s>
It	O
may	O
perform	O
more	O
analysis	B-Application
,	O
transformations	O
and	O
optimizations	B-Application
that	O
are	O
specific	O
for	O
the	O
target	O
CPU	B-General_Concept
architecture	O
.	O
</s>
<s>
The	O
back	O
end	O
generates	O
the	O
target-dependent	O
assembly	B-Language
code	I-Language
,	O
performing	O
register	O
allocation	O
in	O
the	O
process	O
.	O
</s>
<s>
The	O
back	O
end	O
performs	O
instruction	O
scheduling	O
,	O
which	O
re-orders	O
instructions	O
to	O
keep	O
parallel	O
execution	B-General_Concept
units	I-General_Concept
busy	O
by	O
filling	O
delay	B-General_Concept
slots	I-General_Concept
.	O
</s>
<s>
Although	O
most	O
optimization	B-Application
problems	O
are	O
NP-hard	O
,	O
heuristic	B-Algorithm
techniques	O
for	O
solving	O
them	O
are	O
well-developed	O
and	O
currently	O
implemented	O
in	O
production-quality	O
compilers	B-Language
.	O
</s>
<s>
Typically	O
the	O
output	O
of	O
a	O
back	O
end	O
is	O
machine	B-Language
code	I-Language
specialized	O
for	O
a	O
particular	O
processor	O
and	O
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
This	O
front/middle/back	O
-end	O
approach	O
makes	O
it	O
possible	O
to	O
combine	O
front	O
ends	O
for	O
different	O
languages	O
with	O
back	O
ends	O
for	O
different	O
CPUs	B-General_Concept
while	O
sharing	O
the	O
optimizations	B-Application
of	O
the	O
middle	O
end	O
.	O
</s>
<s>
Practical	O
examples	O
of	O
this	O
approach	O
are	O
the	O
GNU	B-Application
Compiler	I-Application
Collection	I-Application
,	O
Clang	B-Application
(	O
LLVM-based	O
C/C	O
++	O
compiler	B-Language
)	O
,	O
and	O
the	B-Device
Amsterdam	I-Device
Compiler	I-Device
Kit	I-Device
,	O
which	O
have	O
multiple	O
front-ends	O
,	O
shared	O
optimizations	B-Application
and	O
multiple	O
back-ends	O
.	O
</s>
<s>
The	O
front	O
end	O
analyzes	O
the	O
source	O
code	O
to	O
build	O
an	O
internal	O
representation	O
of	O
the	O
program	O
,	O
called	O
the	O
intermediate	B-Application
representation	I-Application
(	O
IR	B-Application
)	O
.	O
</s>
<s>
It	O
also	O
manages	O
the	O
symbol	B-Application
table	I-Application
,	O
a	O
data	O
structure	O
mapping	O
each	O
symbol	O
in	O
the	O
source	O
code	O
to	O
associated	O
information	O
such	O
as	O
location	O
,	O
type	O
and	O
scope	O
.	O
</s>
<s>
While	O
the	O
frontend	O
can	O
be	O
a	O
single	O
monolithic	O
function	O
or	O
program	O
,	O
as	O
in	O
a	O
scannerless	B-Application
parser	I-Application
,	O
it	O
was	O
traditionally	O
implemented	O
and	O
analyzed	O
as	O
several	O
phases	O
,	O
which	O
may	O
execute	O
sequentially	O
or	O
concurrently	O
.	O
</s>
<s>
Most	O
commonly	O
today	O
,	O
the	O
frontend	O
is	O
broken	O
into	O
three	O
phases	O
:	O
lexical	B-Application
analysis	I-Application
(	O
also	O
known	O
as	O
lexing	B-Application
or	O
scanning	O
)	O
,	O
syntax	B-Language
analysis	I-Language
(	O
also	O
known	O
as	O
scanning	O
or	O
parsing	B-Language
)	O
,	O
and	O
semantic	O
analysis	B-Application
.	O
</s>
<s>
Lexing	B-Application
and	O
parsing	B-Language
comprise	O
the	O
syntactic	B-Language
analysis	I-Language
(	O
word	O
syntax	O
and	O
phrase	O
syntax	O
,	O
respectively	O
)	O
,	O
and	O
in	O
simple	O
cases	O
,	O
these	O
modules	O
(	O
the	O
lexer	B-Application
and	O
parser	B-Language
)	O
can	O
be	O
automatically	O
generated	O
from	O
a	O
grammar	O
for	O
the	O
language	O
,	O
though	O
in	O
more	O
complex	O
cases	O
these	O
require	O
manual	O
modification	O
.	O
</s>
<s>
The	O
lexical	O
grammar	O
and	O
phrase	O
grammar	O
are	O
usually	O
context-free	O
grammars	O
,	O
which	O
simplifies	O
analysis	B-Application
significantly	O
,	O
with	O
context-sensitivity	O
handled	O
at	O
the	O
semantic	O
analysis	B-Application
phase	O
.	O
</s>
<s>
The	O
semantic	O
analysis	B-Application
phase	O
is	O
generally	O
more	O
complex	O
and	O
written	O
by	O
hand	O
,	O
but	O
can	O
be	O
partially	O
or	O
fully	O
automated	O
using	O
attribute	B-Application
grammars	I-Application
.	O
</s>
<s>
These	O
phases	O
themselves	O
can	O
be	O
further	O
broken	O
down	O
:	O
lexing	B-Application
as	O
scanning	O
and	O
evaluating	O
,	O
and	O
parsing	B-Language
as	O
building	O
a	O
concrete	O
syntax	B-Data_Structure
tree	I-Data_Structure
(	O
CST	O
,	O
parse	B-Language
tree	O
)	O
and	O
then	O
transforming	O
it	O
into	O
an	O
abstract	B-Data_Structure
syntax	I-Data_Structure
tree	I-Data_Structure
(	O
AST	O
,	O
syntax	B-Data_Structure
tree	I-Data_Structure
)	O
.	O
</s>
<s>
In	O
some	O
cases	O
additional	O
phases	O
are	O
used	O
,	O
notably	O
line	O
reconstruction	O
and	O
preprocessing	B-General_Concept
,	O
but	O
these	O
are	O
rare	O
.	O
</s>
<s>
converts	O
the	O
input	O
character	O
sequence	O
to	O
a	O
canonical	O
form	O
ready	O
for	O
the	O
parser	B-Language
.	O
</s>
<s>
Languages	O
which	O
strop	B-Application
their	O
keywords	O
or	O
allow	O
arbitrary	O
spaces	O
within	O
identifiers	O
require	O
this	O
phase	O
.	O
</s>
<s>
The	O
top-down	B-Application
,	O
recursive-descent	B-Application
,	O
table-driven	O
parsers	B-Language
used	O
in	O
the	O
1960s	O
typically	O
read	O
the	O
source	O
one	O
character	O
at	O
a	O
time	O
and	O
did	O
not	O
require	O
a	O
separate	O
tokenizing	O
phase	O
.	O
</s>
<s>
Atlas	O
Autocode	B-Language
and	O
Imp	O
(	O
and	O
some	O
implementations	O
of	O
ALGOL	B-Language
and	O
Coral	B-Language
66	I-Language
)	O
are	O
examples	O
of	O
stropped	O
languages	O
whose	O
compilers	B-Language
would	O
have	O
a	O
Line	O
Reconstruction	O
phase	O
.	O
</s>
<s>
Preprocessing	B-General_Concept
supports	O
macro	O
substitution	O
and	O
conditional	B-Application
compilation	I-Application
.	O
</s>
<s>
Typically	O
the	O
preprocessing	B-General_Concept
phase	O
occurs	O
before	O
syntactic	O
or	O
semantic	O
analysis	B-Application
;	O
e.g.	O
</s>
<s>
in	O
the	O
case	O
of	O
C	B-Language
,	O
the	O
preprocessor	B-General_Concept
manipulates	O
lexical	O
tokens	O
rather	O
than	O
syntactic	O
forms	O
.	O
</s>
<s>
However	O
,	O
some	O
languages	O
such	O
as	O
Scheme	B-Language
support	O
macro	O
substitutions	O
based	O
on	O
syntactic	O
forms	O
.	O
</s>
<s>
Lexical	B-Application
analysis	I-Application
(	O
also	O
known	O
as	O
lexing	B-Application
or	O
tokenization	O
)	O
breaks	O
the	O
source	O
code	O
text	O
into	O
a	O
sequence	O
of	O
small	O
pieces	O
called	O
lexical	O
tokens	O
.	O
</s>
<s>
The	O
lexeme	O
syntax	O
is	O
typically	O
a	O
regular	B-General_Concept
language	I-General_Concept
,	O
so	O
a	O
finite	B-Architecture
state	I-Architecture
automaton	I-Architecture
constructed	O
from	O
a	O
regular	B-Language
expression	I-Language
can	O
be	O
used	O
to	O
recognize	O
it	O
.	O
</s>
<s>
The	O
software	O
doing	O
lexical	B-Application
analysis	I-Application
is	O
called	O
a	O
lexical	B-Application
analyzer	I-Application
.	O
</s>
<s>
This	O
may	O
not	O
be	O
a	O
separate	O
step	O
—	O
it	O
can	O
be	O
combined	O
with	O
the	O
parsing	B-Language
step	O
in	O
scannerless	B-Application
parsing	I-Application
,	O
in	O
which	O
case	O
parsing	B-Language
is	O
done	O
at	O
the	O
character	O
level	O
,	O
not	O
the	O
token	O
level	O
.	O
</s>
<s>
Syntax	B-Language
analysis	I-Language
(	O
also	O
known	O
as	O
parsing	B-Language
)	O
involves	O
parsing	B-Language
the	O
token	O
sequence	O
to	O
identify	O
the	O
syntactic	O
structure	O
of	O
the	O
program	O
.	O
</s>
<s>
This	O
phase	O
typically	O
builds	O
a	O
parse	B-Language
tree	O
,	O
which	O
replaces	O
the	O
linear	O
sequence	O
of	O
tokens	O
with	O
a	O
tree	O
structure	O
built	O
according	O
to	O
the	O
rules	O
of	O
a	O
formal	O
grammar	O
which	O
define	O
the	O
language	O
's	O
syntax	O
.	O
</s>
<s>
The	O
parse	B-Language
tree	O
is	O
often	O
analyzed	O
,	O
augmented	O
,	O
and	O
transformed	O
by	O
later	O
phases	O
in	O
the	O
compiler	B-Language
.	O
</s>
<s>
Semantic	O
analysis	B-Application
adds	O
semantic	O
information	O
to	O
the	O
parse	B-Language
tree	O
and	O
builds	O
the	O
symbol	B-Application
table	I-Application
.	O
</s>
<s>
This	O
phase	O
performs	O
semantic	O
checks	O
such	O
as	O
type	O
checking	O
(	O
checking	O
for	O
type	O
errors	O
)	O
,	O
or	O
object	B-Application
binding	I-Application
(	O
associating	O
variable	O
and	O
function	O
references	O
with	O
their	O
definitions	O
)	O
,	O
or	O
definite	O
assignment	O
(	O
requiring	O
all	O
local	O
variables	O
to	O
be	O
initialized	O
before	O
use	O
)	O
,	O
rejecting	O
incorrect	O
programs	O
or	O
issuing	O
warnings	O
.	O
</s>
<s>
Semantic	O
analysis	B-Application
usually	O
requires	O
a	O
complete	O
parse	B-Language
tree	O
,	O
meaning	O
that	O
this	O
phase	O
logically	O
follows	O
the	O
parsing	B-Language
phase	O
,	O
and	O
logically	O
precedes	O
the	O
code	B-Application
generation	I-Application
phase	O
,	O
though	O
it	O
is	O
often	O
possible	O
to	O
fold	O
multiple	O
phases	O
into	O
one	O
pass	O
over	O
the	O
code	O
in	O
a	O
compiler	B-Language
implementation	O
.	O
</s>
<s>
The	O
middle	O
end	O
,	O
also	O
known	O
as	O
optimizer	O
,	O
performs	O
optimizations	B-Application
on	O
the	O
intermediate	B-Application
representation	I-Application
in	O
order	O
to	O
improve	O
the	O
performance	O
and	O
the	O
quality	O
of	O
the	O
produced	O
machine	B-Language
code	I-Language
.	O
</s>
<s>
The	O
middle	O
end	O
contains	O
those	O
optimizations	B-Application
that	O
are	O
independent	O
of	O
the	O
CPU	B-General_Concept
architecture	O
being	O
targeted	O
.	O
</s>
<s>
Analysis	B-Application
:	O
This	O
is	O
the	O
gathering	O
of	O
program	O
information	O
from	O
the	O
intermediate	B-Application
representation	I-Application
derived	O
from	O
the	O
input	O
;	O
data-flow	O
analysis	B-Application
is	O
used	O
to	O
build	O
use-define	O
chains	O
,	O
together	O
with	O
dependence	O
analysis	B-Application
,	O
alias	O
analysis	B-Application
,	O
pointer	O
analysis	B-Application
,	O
escape	O
analysis	B-Application
,	O
etc	O
.	O
</s>
<s>
Accurate	O
analysis	B-Application
is	O
the	O
basis	O
for	O
any	O
compiler	B-Application
optimization	I-Application
.	O
</s>
<s>
The	O
control-flow	O
graph	O
of	O
every	O
compiled	B-Language
function	O
and	O
the	O
call	B-Application
graph	I-Application
of	O
the	O
program	O
are	O
usually	O
also	O
built	O
during	O
the	O
analysis	B-Application
phase	O
.	O
</s>
<s>
Optimization	B-Application
:	O
the	O
intermediate	O
language	O
representation	O
is	O
transformed	O
into	O
functionally	O
equivalent	O
but	O
faster	O
(	O
or	O
smaller	O
)	O
forms	O
.	O
</s>
<s>
Popular	O
optimizations	B-Application
are	O
inline	O
expansion	O
,	O
dead-code	O
elimination	O
,	O
constant	O
propagation	O
,	O
loop	O
transformation	B-Application
and	O
even	O
automatic	O
parallelization	O
.	O
</s>
<s>
Compiler	B-Application
analysis	I-Application
is	O
the	O
prerequisite	O
for	O
any	O
compiler	B-Application
optimization	I-Application
,	O
and	O
they	O
tightly	O
work	O
together	O
.	O
</s>
<s>
For	O
example	O
,	O
dependence	O
analysis	B-Application
is	O
crucial	O
for	O
loop	O
transformation	B-Application
.	O
</s>
<s>
The	O
scope	O
of	O
compiler	B-Application
analysis	I-Application
and	O
optimizations	B-Application
vary	O
greatly	O
;	O
their	O
scope	O
may	O
range	O
from	O
operating	O
within	O
a	O
basic	B-Application
block	I-Application
,	O
to	O
whole	O
procedures	O
,	O
or	O
even	O
the	O
whole	O
program	O
.	O
</s>
<s>
There	O
is	O
a	O
trade-off	O
between	O
the	O
granularity	O
of	O
the	O
optimizations	B-Application
and	O
the	O
cost	O
of	O
compilation	B-Language
.	O
</s>
<s>
For	O
example	O
,	O
peephole	O
optimizations	B-Application
are	O
fast	O
to	O
perform	O
during	O
compilation	B-Language
but	O
only	O
affect	O
a	O
small	O
local	O
fragment	O
of	O
the	O
code	O
,	O
and	O
can	O
be	O
performed	O
independently	O
of	O
the	O
context	O
in	O
which	O
the	O
code	O
fragment	O
appears	O
.	O
</s>
<s>
In	O
contrast	O
,	O
interprocedural	O
optimization	B-Application
requires	O
more	O
compilation	B-Language
time	O
and	O
memory	O
space	O
,	O
but	O
enable	O
optimizations	B-Application
that	O
are	O
only	O
possible	O
by	O
considering	O
the	O
behavior	O
of	O
multiple	O
functions	O
simultaneously	O
.	O
</s>
<s>
Interprocedural	O
analysis	B-Application
and	O
optimizations	B-Application
are	O
common	O
in	O
modern	O
commercial	O
compilers	B-Language
from	O
HP	O
,	O
IBM	O
,	O
SGI	O
,	O
Intel	O
,	O
Microsoft	O
,	O
and	O
Sun	O
Microsystems	O
.	O
</s>
<s>
The	O
free	B-Application
software	I-Application
GCC	B-Application
was	O
criticized	O
for	O
a	O
long	O
time	O
for	O
lacking	O
powerful	O
interprocedural	O
optimizations	B-Application
,	O
but	O
it	O
is	O
changing	O
in	O
this	O
respect	O
.	O
</s>
<s>
Another	O
open	O
source	O
compiler	B-Language
with	O
full	O
analysis	B-Application
and	O
optimization	B-Application
infrastructure	O
is	O
Open64	B-Application
,	O
which	O
is	O
used	O
by	O
many	O
organizations	O
for	O
research	O
and	O
commercial	O
purposes	O
.	O
</s>
<s>
Due	O
to	O
the	O
extra	O
time	O
and	O
space	O
needed	O
for	O
compiler	B-Application
analysis	I-Application
and	O
optimizations	B-Application
,	O
some	O
compilers	B-Language
skip	O
them	O
by	O
default	O
.	O
</s>
<s>
Users	O
have	O
to	O
use	O
compilation	B-Language
options	O
to	O
explicitly	O
tell	O
the	O
compiler	B-Language
which	O
optimizations	B-Application
should	O
be	O
enabled	O
.	O
</s>
<s>
The	O
back	O
end	O
is	O
responsible	O
for	O
the	O
CPU	B-General_Concept
architecture	O
specific	O
optimizations	B-Application
and	O
for	O
code	B-Application
generation	I-Application
.	O
</s>
<s>
Machine	O
dependent	O
optimizations	B-Application
:	O
optimizations	B-Application
that	O
depend	O
on	O
the	O
details	O
of	O
the	O
CPU	B-General_Concept
architecture	O
that	O
the	O
compiler	B-Language
targets	O
.	O
</s>
<s>
A	O
prominent	O
example	O
is	O
peephole	O
optimizations	B-Application
,	O
which	O
rewrites	O
short	O
sequences	O
of	O
assembler	B-Language
instructions	O
into	O
more	O
efficient	O
instructions	O
.	O
</s>
<s>
Code	B-Application
generation	I-Application
:	O
the	O
transformed	O
intermediate	O
language	O
is	O
translated	O
into	O
the	O
output	O
language	O
,	O
usually	O
the	O
native	O
machine	B-Language
language	I-Language
of	O
the	O
system	O
.	O
</s>
<s>
This	O
involves	O
resource	O
and	O
storage	O
decisions	O
,	O
such	O
as	O
deciding	O
which	O
variables	O
to	O
fit	O
into	O
registers	O
and	O
memory	O
and	O
the	O
selection	O
and	O
scheduling	O
of	O
appropriate	O
machine	B-Language
instructions	I-Language
along	O
with	O
their	O
associated	O
addressing	B-Language
modes	I-Language
(	O
see	O
also	O
Sethi	B-Algorithm
–	I-Algorithm
Ullman	I-Algorithm
algorithm	I-Algorithm
)	O
.	O
</s>
<s>
Compiler	B-Application
correctness	I-Application
is	O
the	O
branch	O
of	O
software	O
engineering	O
that	O
deals	O
with	O
trying	O
to	O
show	O
that	O
a	O
compiler	B-Language
behaves	O
according	O
to	O
its	O
language	O
specification	O
.	O
</s>
<s>
Techniques	O
include	O
developing	O
the	O
compiler	B-Language
using	O
formal	B-Architecture
methods	I-Architecture
and	O
using	O
rigorous	O
testing	O
(	O
often	O
called	O
compiler	B-Language
validation	O
)	O
on	O
an	O
existing	O
compiler	B-Language
.	O
</s>
<s>
Higher-level	O
programming	O
languages	O
usually	O
appear	O
with	O
a	O
type	O
of	O
translation	B-Application
in	O
mind	O
:	O
either	O
designed	O
as	O
compiled	B-Language
language	I-Language
or	O
interpreted	B-Application
language	I-Application
.	O
</s>
<s>
However	O
,	O
in	O
practice	O
there	O
is	O
rarely	O
anything	O
about	O
a	O
language	O
that	O
requires	O
it	O
to	O
be	O
exclusively	O
compiled	B-Language
or	O
exclusively	O
interpreted	O
,	O
although	O
it	O
is	O
possible	O
to	O
design	O
languages	O
that	O
rely	O
on	O
re-interpretation	O
at	O
run	O
time	O
.	O
</s>
<s>
The	O
categorization	O
usually	O
reflects	O
the	O
most	O
popular	O
or	O
widespread	O
implementations	O
of	O
a	O
language	O
–	O
for	O
instance	O
,	O
BASIC	O
is	O
sometimes	O
called	O
an	O
interpreted	B-Application
language	I-Application
,	O
and	O
C	B-Language
a	O
compiled	B-Language
one	O
,	O
despite	O
the	O
existence	O
of	O
BASIC	O
compilers	B-Language
and	O
C	B-Language
interpreters	B-Application
.	O
</s>
<s>
Interpretation	O
does	O
not	O
replace	O
compilation	B-Language
completely	O
.	O
</s>
<s>
Even	O
though	O
an	O
interpreter	B-Application
can	O
itself	O
be	O
interpreted	O
,	O
a	O
set	O
of	O
directly	O
executed	O
machine	B-Language
instructions	I-Language
is	O
needed	O
somewhere	O
at	O
the	O
bottom	O
of	O
the	O
execution	O
stack	O
(	O
see	O
machine	B-Language
language	I-Language
)	O
.	O
</s>
<s>
Furthermore	O
,	O
for	O
optimization	B-Application
compilers	B-Language
can	O
contain	O
interpreter	B-Application
functionality	O
,	O
and	O
interpreters	B-Application
may	O
include	O
ahead	O
of	O
time	O
compilation	B-Language
techniques	O
.	O
</s>
<s>
For	O
example	O
,	O
where	O
an	O
expression	O
can	O
be	O
executed	O
during	O
compilation	B-Language
and	O
the	O
results	O
inserted	O
into	O
the	O
output	O
program	O
,	O
then	O
it	O
prevents	O
it	O
having	O
to	O
be	O
recalculated	O
each	O
time	O
the	O
program	O
runs	O
,	O
which	O
can	O
greatly	O
speed	O
up	O
the	O
final	O
program	O
.	O
</s>
<s>
Modern	O
trends	O
toward	O
just-in-time	O
compilation	B-Language
and	O
bytecode	O
interpretation	O
at	O
times	O
blur	O
the	O
traditional	O
categorizations	O
of	O
compilers	B-Language
and	O
interpreters	B-Application
even	O
further	O
.	O
</s>
<s>
Some	O
language	O
specifications	O
spell	O
out	O
that	O
implementations	O
must	O
include	O
a	O
compilation	B-Language
facility	O
;	O
for	O
example	O
,	O
Common	B-Language
Lisp	I-Language
.	O
</s>
<s>
However	O
,	O
there	O
is	O
nothing	O
inherent	O
in	O
the	O
definition	O
of	O
Common	B-Language
Lisp	I-Language
that	O
stops	O
it	O
from	O
being	O
interpreted	O
.	O
</s>
<s>
Other	O
languages	O
have	O
features	O
that	O
are	O
very	O
easy	O
to	O
implement	O
in	O
an	O
interpreter	B-Application
,	O
but	O
make	O
writing	O
a	O
compiler	B-Language
much	O
harder	O
;	O
for	O
example	O
,	O
APL	B-Language
,	O
SNOBOL4	B-Application
,	O
and	O
many	O
scripting	O
languages	O
allow	O
programs	O
to	O
construct	O
arbitrary	O
source	O
code	O
at	O
runtime	O
with	O
regular	O
string	O
operations	O
,	O
and	O
then	O
execute	O
that	O
code	O
by	O
passing	O
it	O
to	O
a	O
special	O
evaluation	O
function	O
.	O
</s>
<s>
To	O
implement	O
these	O
features	O
in	O
a	O
compiled	B-Language
language	I-Language
,	O
programs	O
must	O
usually	O
be	O
shipped	O
with	O
a	O
runtime	B-Library
library	I-Library
that	O
includes	O
a	O
version	O
of	O
the	O
compiler	B-Language
itself	O
.	O
</s>
<s>
One	O
classification	O
of	O
compilers	B-Language
is	O
by	O
the	O
platform	B-Device
on	O
which	O
their	O
generated	O
code	O
executes	O
.	O
</s>
<s>
This	O
is	O
known	O
as	O
the	O
target	O
platform	B-Device
.	O
</s>
<s>
A	O
native	O
or	O
hosted	O
compiler	B-Language
is	O
one	O
whose	O
output	O
is	O
intended	O
to	O
directly	O
run	O
on	O
the	O
same	O
type	O
of	O
computer	O
and	O
operating	B-General_Concept
system	I-General_Concept
that	O
the	O
compiler	B-Language
itself	O
runs	O
on	O
.	O
</s>
<s>
The	O
output	O
of	O
a	O
cross	B-Application
compiler	I-Application
is	O
designed	O
to	O
run	O
on	O
a	O
different	O
platform	B-Device
.	O
</s>
<s>
Cross	B-Application
compilers	I-Application
are	O
often	O
used	O
when	O
developing	O
software	O
for	O
embedded	B-Architecture
systems	I-Architecture
that	O
are	O
not	O
intended	O
to	O
support	O
a	O
software	B-Application
development	I-Application
environment	I-Application
.	O
</s>
<s>
The	O
output	O
of	O
a	O
compiler	B-Language
that	O
produces	O
code	O
for	O
a	O
virtual	B-Architecture
machine	I-Architecture
(	O
VM	O
)	O
may	O
or	O
may	O
not	O
be	O
executed	O
on	O
the	O
same	O
platform	B-Device
as	O
the	O
compiler	B-Language
that	O
produced	O
it	O
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
such	O
compilers	B-Language
are	O
not	O
usually	O
classified	O
as	O
native	O
or	O
cross	B-Application
compilers	I-Application
.	O
</s>
<s>
The	O
lower	B-Language
level	I-Language
language	I-Language
that	O
is	O
the	O
target	O
of	O
a	O
compiler	B-Language
may	O
itself	O
be	O
a	O
high-level	B-Language
programming	I-Language
language	I-Language
.	O
</s>
<s>
C	B-Language
,	O
viewed	O
by	O
some	O
as	O
a	O
sort	O
of	O
portable	O
assembly	B-Language
language	I-Language
,	O
is	O
frequently	O
the	O
target	B-Application
language	I-Application
of	O
such	O
compilers	B-Language
.	O
</s>
<s>
For	O
example	O
,	O
Cfront	B-Device
,	O
the	O
original	O
compiler	B-Language
for	O
C++	B-Language
,	O
used	O
C	B-Language
as	O
its	O
target	B-Application
language	I-Application
.	O
</s>
<s>
The	O
C	B-Language
code	O
generated	O
by	O
such	O
a	O
compiler	B-Language
is	O
usually	O
not	O
intended	O
to	O
be	O
readable	O
and	O
maintained	O
by	O
humans	O
,	O
so	O
indent	O
style	O
and	O
creating	O
pretty	O
C	B-Language
intermediate	O
code	O
are	O
ignored	O
.	O
</s>
<s>
Some	O
of	O
the	O
features	O
of	O
C	B-Language
that	O
make	O
it	O
a	O
good	O
target	B-Application
language	I-Application
include	O
the	O
#line	O
directive	O
,	O
which	O
can	O
be	O
generated	O
by	O
the	O
compiler	B-Language
to	O
support	O
debugging	O
of	O
the	O
original	O
source	O
,	O
and	O
the	O
wide	O
platform	B-Device
support	O
available	O
with	O
C	B-Language
compilers	B-Language
.	O
</s>
<s>
While	O
a	O
common	O
compiler	B-Language
type	O
outputs	O
machine	B-Language
code	I-Language
,	O
there	O
are	O
many	O
other	O
types	O
:	O
</s>
<s>
Source-to-source	B-Language
compilers	I-Language
are	O
a	O
type	O
of	O
compiler	B-Language
that	O
takes	O
a	O
high-level	B-Language
language	I-Language
as	O
its	O
input	O
and	O
outputs	O
a	O
high-level	B-Language
language	I-Language
.	O
</s>
<s>
For	O
example	O
,	O
an	O
automatic	O
parallelizing	O
compiler	B-Language
will	O
frequently	O
take	O
in	O
a	O
high-level	B-Language
language	I-Language
program	O
as	O
an	O
input	O
and	O
then	O
transform	O
the	O
code	O
and	O
annotate	O
it	O
with	O
parallel	O
code	O
annotations	O
(	O
e.g.	O
</s>
<s>
OpenMP	B-Application
)	O
or	O
language	O
constructs	O
(	O
e.g.	O
</s>
<s>
Fortran	B-Application
's	O
DOALL	O
statements	O
)	O
.	O
</s>
<s>
Other	O
terms	O
for	O
a	O
source-to-source	B-Language
compiler	I-Language
are	O
transcompiler	B-Language
or	O
transpiler	B-Language
.	O
</s>
<s>
This	O
Prolog	B-Language
machine	O
is	O
also	O
known	O
as	O
the	O
Warren	B-Application
Abstract	I-Application
Machine	I-Application
(	O
or	O
WAM	O
)	O
.	O
</s>
<s>
Bytecode	O
compilers	B-Language
for	O
Java	B-Language
,	O
Python	B-Language
are	O
also	O
examples	O
of	O
this	O
category	O
.	O
</s>
<s>
Just-in-time	O
compilers	B-Language
(	O
JIT	O
compiler	B-Language
)	O
defer	O
compilation	B-Language
until	O
runtime	O
.	O
</s>
<s>
JIT	O
compilers	B-Language
exist	O
for	O
many	O
modern	O
languages	O
including	O
Python	B-Language
,	O
JavaScript	B-Language
,	O
Smalltalk	B-Application
,	O
Java	B-Language
,	O
Microsoft	O
.NET	B-Application
'	O
s	O
Common	O
Intermediate	O
Language	O
(	O
CIL	O
)	O
and	O
others	O
.	O
</s>
<s>
A	O
JIT	O
compiler	B-Language
generally	O
runs	O
inside	O
an	O
interpreter	B-Application
.	O
</s>
<s>
When	O
the	O
interpreter	B-Application
detects	O
that	O
a	O
code	O
path	O
is	O
"	O
hot	O
"	O
,	O
meaning	O
it	O
is	O
executed	O
frequently	O
,	O
the	O
JIT	O
compiler	B-Language
will	O
be	O
invoked	O
and	O
compile	B-Language
the	O
"	O
hot	O
"	O
code	O
for	O
increased	O
performance	O
.	O
</s>
<s>
For	O
some	O
languages	O
,	O
such	O
as	O
Java	B-Language
,	O
applications	O
are	O
first	O
compiled	B-Language
using	O
a	O
bytecode	O
compiler	B-Language
and	O
delivered	O
in	O
a	O
machine-independent	O
intermediate	B-Application
representation	I-Application
.	O
</s>
<s>
A	O
bytecode	O
interpreter	B-Application
executes	O
the	O
bytecode	O
,	O
but	O
the	O
JIT	O
compiler	B-Language
will	O
translate	O
the	O
bytecode	O
to	O
machine	B-Language
code	I-Language
when	O
increased	O
performance	O
is	O
necessary	O
.	O
</s>
<s>
Hardware	B-General_Concept
compilers	I-General_Concept
(	O
also	O
known	O
as	O
synthesis	O
tools	O
)	O
are	O
compilers	B-Language
whose	O
input	O
is	O
a	O
hardware	B-Architecture
description	O
language	O
and	O
whose	O
output	O
is	O
a	O
description	O
,	O
in	O
the	O
form	O
of	O
a	O
netlist	O
or	O
otherwise	O
,	O
of	O
a	O
hardware	B-Architecture
configuration	O
.	O
</s>
<s>
The	O
output	O
of	O
these	O
compilers	B-Language
target	O
computer	B-Architecture
hardware	I-Architecture
at	O
a	O
very	O
low	O
level	O
,	O
for	O
example	O
a	O
field-programmable	B-Architecture
gate	I-Architecture
array	I-Architecture
(	O
FPGA	B-Architecture
)	O
or	O
structured	O
application-specific	O
integrated	O
circuit	O
(	O
ASIC	O
)	O
.	O
</s>
<s>
Such	O
compilers	B-Language
are	O
said	O
to	O
be	O
hardware	B-General_Concept
compilers	I-General_Concept
,	O
because	O
the	O
source	O
code	O
they	O
compile	B-Language
effectively	O
controls	O
the	O
final	O
configuration	O
of	O
the	O
hardware	B-Architecture
and	O
how	O
it	O
operates	O
.	O
</s>
<s>
The	O
output	O
of	O
the	O
compilation	B-Language
is	O
only	O
an	O
interconnection	O
of	O
transistors	B-Application
or	O
lookup	B-Data_Structure
tables	I-Data_Structure
.	O
</s>
<s>
An	O
example	O
of	O
hardware	B-General_Concept
compiler	I-General_Concept
is	O
XST	O
,	O
the	O
Xilinx	O
Synthesis	O
Tool	O
used	O
for	O
configuring	O
FPGAs	B-Architecture
.	O
</s>
<s>
Similar	O
tools	O
are	O
available	O
from	O
Altera	O
,	O
Synplicity	O
,	O
Synopsys	O
and	O
other	O
hardware	B-Architecture
vendors	O
.	O
</s>
<s>
An	O
assembler	B-Language
is	O
a	O
program	O
that	O
compiles	B-Language
human	O
readable	O
assembly	B-Language
language	I-Language
to	O
machine	B-Language
code	I-Language
,	O
the	O
actual	O
instructions	O
executed	O
by	O
hardware	B-Architecture
.	O
</s>
<s>
The	O
inverse	O
program	O
that	O
translates	B-Application
machine	B-Language
code	I-Language
to	O
assembly	B-Language
language	I-Language
is	O
called	O
a	O
disassembler	O
.	O
</s>
<s>
A	O
program	O
that	O
translates	B-Application
from	O
a	O
low-level	B-Language
language	I-Language
to	O
a	O
higher	O
level	O
one	O
is	O
a	O
decompiler	B-Application
.	O
</s>
<s>
A	O
program	O
that	O
translates	B-Application
into	O
an	O
object	B-Language
code	I-Language
format	O
that	O
is	O
not	O
supported	O
on	O
the	O
compilation	B-Language
machine	O
is	O
called	O
a	O
cross	B-Application
compiler	I-Application
and	O
is	O
commonly	O
used	O
to	O
prepare	O
code	O
for	O
execution	O
on	O
embedded	O
software	O
applications	O
.	O
</s>
<s>
A	O
program	O
that	O
rewrites	O
object	B-Language
code	I-Language
back	O
into	O
the	O
same	O
type	O
of	O
object	B-Language
code	I-Language
while	O
applying	O
optimisations	O
and	O
transformations	O
is	O
a	O
binary	B-Application
recompiler	I-Application
.	O
</s>
