<s>
Clean	O
is	O
a	O
general-purpose	B-Language
purely	B-Application
functional	I-Application
computer	O
programming	O
language	O
.	O
</s>
<s>
It	O
was	O
called	O
the	O
Concurrent	B-Operating_System
Clean	I-Operating_System
System	O
,	O
then	O
the	O
Clean	O
System	O
,	O
later	O
just	O
Clean	O
.	O
</s>
<s>
Clean	O
shares	O
many	O
properties	O
and	O
syntax	O
with	O
a	O
younger	O
sibling	O
language	O
,	O
Haskell	B-Language
:	O
referential	O
transparency	O
,	O
list	B-Language
comprehension	I-Language
,	O
guards	B-Language
,	O
garbage	B-General_Concept
collection	I-General_Concept
,	O
higher	B-Language
order	I-Language
functions	I-Language
,	O
currying	B-Application
,	O
and	O
lazy	O
evaluation	O
.	O
</s>
<s>
However	O
,	O
Clean	O
deals	O
with	O
mutable	O
state	O
and	O
input/output	B-General_Concept
(	O
I/O	B-General_Concept
)	O
through	O
a	O
uniqueness	O
type	O
system	O
,	O
in	O
contrast	O
to	O
Haskell	B-Language
's	O
use	O
of	O
monads	O
.	O
</s>
<s>
The	O
compiler	B-Language
takes	O
advantage	O
of	O
the	O
uniqueness	O
type	O
system	O
to	O
generate	O
more	O
efficient	O
code	O
,	O
because	O
it	O
knows	O
that	O
at	O
any	O
point	O
during	O
the	O
execution	O
of	O
the	O
program	O
,	O
only	O
one	O
reference	O
can	O
exist	O
to	O
a	O
value	O
with	O
a	O
unique	O
type	O
.	O
</s>
<s>
Therefore	O
,	O
a	O
unique	O
value	O
can	O
be	O
changed	B-Application
in	I-Application
place	I-Application
.	O
</s>
<s>
An	O
integrated	B-Application
development	I-Application
environment	I-Application
(	O
IDE	O
)	O
for	O
Microsoft	B-Application
Windows	I-Application
is	O
included	O
in	O
the	O
Clean	O
distribution	O
.	O
</s>
<s>
Fibonacci	B-Algorithm
sequence	I-Algorithm
:	O
</s>
<s>
Computing	O
is	O
based	O
on	O
graph	B-Application
rewriting	I-Application
and	O
reduction	B-Application
.	O
</s>
<s>
Constants	O
such	O
as	O
numbers	O
are	O
graphs	O
and	O
functions	O
are	O
graph	B-Application
rewriting	I-Application
formulas	O
.	O
</s>
<s>
This	O
,	O
combined	O
with	O
compiling	B-Language
to	O
native	B-Language
code	I-Language
,	O
makes	O
Clean	O
programs	O
which	O
use	O
high	O
abstraction	O
run	O
relatively	O
fast	O
according	O
to	O
The	O
Computer	O
Language	O
Benchmarks	O
Game	O
.	O
</s>
<s>
Compilation	B-Language
of	O
Clean	O
to	O
machine	B-Language
code	I-Language
is	O
performed	O
as	O
follows	O
:	O
</s>
<s>
Source	O
files	O
(	O
.icl	O
)	O
and	O
definition	O
files	O
(	O
.dcl	O
)	O
are	O
translated	O
into	O
Core	O
Clean	O
,	O
a	O
basic	O
variant	O
of	O
Clean	O
,	O
by	O
the	O
compiler	B-Language
frontend	O
written	O
in	O
Clean	O
.	O
</s>
<s>
Core	O
clean	O
is	O
converted	O
into	O
Clean	O
's	O
platform-independent	B-Operating_System
intermediate	O
language	O
(	O
.abc	O
)	O
,	O
by	O
the	O
compiler	B-Language
backend	O
written	O
in	O
Clean	O
and	O
C	B-Language
.	O
</s>
<s>
Intermediate	O
ABC	O
code	O
is	O
converted	O
to	O
object	O
code	O
(	O
.o	O
)	O
by	O
the	O
code	O
generator	O
written	O
in	O
C	B-Language
.	O
</s>
<s>
Object	O
code	O
is	O
linked	O
with	O
other	O
files	O
in	O
the	O
module	O
and	O
the	O
runtime	B-Device
system	I-Device
and	O
converted	O
into	O
a	O
normal	O
executable	O
using	O
the	O
system	O
linker	B-Application
(	O
when	O
available	O
)	O
or	O
a	O
dedicated	O
linker	B-Application
written	O
in	O
Clean	O
on	O
Windows	O
.	O
</s>
<s>
Earlier	O
versions	O
of	O
the	O
Clean	O
compiler	B-Language
were	O
written	O
completely	O
in	O
C	B-Language
,	O
thus	O
avoiding	O
bootstrapping	O
issues	O
.	O
</s>
<s>
The	O
ABC	O
code	O
mentioned	O
above	O
is	O
an	O
intermediate	B-Application
representation	I-Application
for	O
an	O
abstract	B-Application
machine	I-Application
.	O
</s>
<s>
Because	O
machine	B-Language
code	I-Language
generation	O
for	O
ABC	O
code	O
is	O
relatively	O
straightforward	O
,	O
this	O
makes	O
it	O
easy	O
to	O
support	O
new	O
architectures	O
.	O
</s>
<s>
The	O
ABC	O
machine	O
is	O
an	O
imperative	B-Application
abstract	O
graph	B-Application
rewriting	I-Application
machine	O
.	O
</s>
<s>
The	O
C(ontrol )	O
-stack	O
holds	O
return	O
addresses	O
for	O
flow	O
control	O
.	O
</s>
<s>
The	O
runtime	B-Device
system	I-Device
,	O
which	O
is	O
linked	O
into	O
every	O
executable	O
,	O
builds	O
a	O
Start	O
node	O
in	O
the	O
graph	O
store	O
and	O
pushes	O
it	O
on	O
the	O
A-stack	O
.	O
</s>
<s>
Although	O
Clean	O
is	O
typically	O
used	O
to	O
generative	O
native	O
executables	O
,	O
several	O
projects	O
have	O
enabled	O
applications	O
in	O
web	B-Application
browsers	I-Application
.	O
</s>
<s>
The	O
now	O
abandoned	O
project	O
compiled	B-Language
Core	O
Clean	O
to	O
JavaScript	B-Language
and	O
did	O
not	O
use	O
ABC	O
code	O
.	O
</s>
<s>
Since	O
2019	O
,	O
an	O
interpreter	O
for	O
ABC	O
code	O
,	O
written	O
in	O
WebAssembly	B-Language
,	O
is	O
used	O
instead	O
.	O
</s>
<s>
Clean	O
is	O
available	O
for	O
Microsoft	B-Application
Windows	I-Application
(	O
IA-32	B-Device
and	O
X86-64	B-Device
)	O
,	O
macOS	B-Application
(	O
X86-64	B-Device
)	O
,	O
and	O
Linux	B-Application
(	O
IA-32	B-Device
,	O
X86-64	B-Device
,	O
and	O
AArch64	B-Architecture
)	O
.	O
</s>
<s>
A	O
2008	O
benchmark	O
showed	O
that	O
Clean	O
native	B-Language
code	I-Language
performs	O
similarly	O
to	O
the	O
Haskell	B-Language
(	O
Glasgow	B-Application
Haskell	I-Application
Compiler	I-Application
(	O
GHC	O
)	O
)	O
,	O
depending	O
on	O
the	O
benchmark	O
.	O
</s>
<s>
The	O
syntax	O
of	O
Clean	O
is	O
very	O
similar	O
to	O
that	O
of	O
Haskell	B-Language
,	O
with	O
some	O
notable	O
differences	O
:	O
</s>
<s>
In	O
general	O
,	O
Haskell	B-Language
has	O
introduced	O
more	O
syntactic	O
sugar	O
than	O
Clean	O
.	O
</s>
