<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
denotational	B-Application
semantics	I-Application
(	O
initially	O
known	O
as	O
mathematical	B-Application
semantics	I-Application
or	O
Scott	B-Application
–	I-Application
Strachey	I-Application
semantics	I-Application
)	O
is	O
an	O
approach	O
of	O
formalizing	O
the	O
meanings	O
of	O
programming	O
languages	O
by	O
constructing	O
mathematical	O
objects	O
(	O
called	O
denotations	O
)	O
that	O
describe	O
the	O
meanings	O
of	O
expressions	O
from	O
the	O
languages	O
.	O
</s>
<s>
Other	O
approaches	O
providing	O
formal	B-Application
semantics	I-Application
of	I-Application
programming	I-Application
languages	I-Application
include	O
axiomatic	O
semantics	B-Application
and	O
operational	O
semantics	B-Application
.	O
</s>
<s>
Broadly	O
speaking	O
,	O
denotational	B-Application
semantics	I-Application
is	O
concerned	O
with	O
finding	O
mathematical	O
objects	O
called	O
domains	O
that	O
represent	O
what	O
programs	O
do	O
.	O
</s>
<s>
For	O
example	O
,	O
programs	O
(	O
or	O
program	O
phrases	O
)	O
might	O
be	O
represented	O
by	O
partial	B-Algorithm
functions	I-Algorithm
or	O
by	O
games	O
between	O
the	O
environment	O
and	O
the	O
system	O
.	O
</s>
<s>
An	O
important	O
tenet	O
of	O
denotational	B-Application
semantics	I-Application
is	O
that	O
semantics	B-Application
should	O
be	O
compositional	O
:	O
the	O
denotation	O
of	O
a	O
program	O
phrase	O
should	O
be	O
built	O
out	O
of	O
the	O
denotations	O
of	O
its	O
subphrases	O
.	O
</s>
<s>
Denotational	B-Application
semantics	I-Application
originated	O
in	O
the	O
work	O
of	O
Christopher	O
Strachey	O
and	O
Dana	O
Scott	O
published	O
in	O
the	O
early	O
1970s	O
.	O
</s>
<s>
As	O
originally	O
developed	O
by	O
Strachey	O
and	O
Scott	O
,	O
denotational	B-Application
semantics	I-Application
provided	O
the	O
meaning	O
of	O
a	O
computer	O
program	O
as	O
a	O
function	O
that	O
mapped	O
input	O
into	O
output	O
.	O
</s>
<s>
As	O
described	O
below	O
,	O
work	O
has	O
continued	O
in	O
investigating	O
appropriate	O
denotational	B-Application
semantics	I-Application
for	O
aspects	O
of	O
programming	O
languages	O
such	O
as	O
sequentiality	O
,	O
concurrency	B-Operating_System
,	O
non-determinism	O
and	O
local	O
state	O
.	O
</s>
<s>
Denotational	B-Application
semantics	I-Application
has	O
been	O
developed	O
for	O
modern	O
programming	O
languages	O
that	O
use	O
capabilities	O
like	O
concurrency	B-Operating_System
and	O
exceptions	B-General_Concept
,	O
e.g.	O
,	O
Concurrent	B-Language
ML	I-Language
,	O
CSP	O
,	O
and	O
Haskell	B-Language
.	O
</s>
<s>
The	O
semantics	B-Application
of	O
these	O
languages	O
is	O
compositional	O
in	O
that	O
the	O
meaning	O
of	O
a	O
phrase	O
depends	O
on	O
the	O
meanings	O
of	O
its	O
subphrases	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
meaning	O
of	O
the	O
applicative	B-Application
expression	I-Application
f(E1,E2 )	O
is	O
defined	O
in	O
terms	O
of	O
semantics	B-Application
of	O
its	O
subphrases	O
f	O
,	O
E1	O
and	O
E2	O
.	O
</s>
<s>
Also	O
,	O
E1	O
or	O
E2	O
might	O
throw	O
an	O
exception	O
which	O
could	O
terminate	B-General_Concept
the	O
execution	O
of	O
the	O
other	O
one	O
.	O
</s>
<s>
The	O
sections	O
below	O
describe	O
special	O
cases	O
of	O
the	O
semantics	B-Application
of	O
these	O
modern	O
programming	O
languages	O
.	O
</s>
<s>
Denotational	B-Application
semantics	I-Application
is	O
ascribed	O
to	O
a	O
program	O
phrase	O
as	O
a	O
function	O
from	O
an	O
environment	O
(	O
holding	O
current	O
values	O
of	O
its	O
free	O
variables	O
)	O
to	O
its	O
denotation	O
.	O
</s>
<s>
In	O
the	O
limit	O
we	O
get	O
a	O
total	B-Algorithm
function	I-Algorithm
from	O
to	O
defined	O
everywhere	O
in	O
its	O
domain	O
.	O
</s>
<s>
Formally	O
we	O
model	O
each	O
approximation	O
as	O
a	O
partial	B-Algorithm
function	I-Algorithm
.	O
</s>
<s>
F0( {}	O
)	O
is	O
the	O
totally	O
undefined	O
partial	B-Algorithm
function	I-Algorithm
,	O
represented	O
as	O
the	O
set	O
 {  } 	O
;	O
</s>
<s>
F1( {}	O
)	O
is	O
the	O
partial	B-Algorithm
function	I-Algorithm
represented	O
as	O
the	O
set	O
{( 	O
0	O
,	O
1	O
)	O
}	O
:	O
it	O
is	O
defined	O
at	O
0	O
,	O
to	O
be	O
1	O
,	O
and	O
undefined	O
elsewhere	O
;	O
</s>
<s>
F5( {}	O
)	O
is	O
the	O
partial	B-Algorithm
function	I-Algorithm
represented	O
as	O
the	O
set	O
{( 	O
0	O
,	O
1	O
)	O
,	O
(	O
1	O
,	O
1	O
)	O
,	O
(	O
2	O
,	O
2	O
)	O
,	O
(	O
3	O
,	O
6	O
)	O
,	O
(	O
4	O
,	O
24	O
)	O
}	O
:	O
it	O
is	O
defined	O
for	O
arguments	O
0	O
,	O
1	O
,	O
2	O
,	O
3	O
,	O
4	O
.	O
</s>
<s>
This	O
iterative	O
process	O
builds	O
a	O
sequence	O
of	O
partial	B-Algorithm
functions	I-Algorithm
from	O
to	O
.	O
</s>
<s>
Partial	B-Algorithm
functions	I-Algorithm
form	O
a	O
chain-complete	O
partial	O
order	O
using	O
⊆	O
as	O
the	O
ordering	O
.	O
</s>
<s>
The	O
concept	O
of	O
power	O
domains	O
has	O
been	O
developed	O
to	O
give	O
a	O
denotational	B-Application
semantics	I-Application
to	O
non-deterministic	O
sequential	O
programs	O
.	O
</s>
<s>
There	O
are	O
difficulties	O
with	O
fairness	O
and	O
unboundedness	B-Application
in	O
domain-theoretic	O
models	O
of	O
non-determinism	O
.	O
</s>
<s>
Many	O
researchers	O
have	O
argued	O
that	O
the	O
domain-theoretic	O
models	O
given	O
above	O
do	O
not	O
suffice	O
for	O
the	O
more	O
general	O
case	O
of	O
concurrent	B-Operating_System
computation	I-Operating_System
.	O
</s>
<s>
In	O
the	O
early	O
1980s	O
,	O
people	O
began	O
using	O
the	O
style	O
of	O
denotational	B-Application
semantics	I-Application
to	O
give	O
semantics	B-Application
for	O
concurrent	O
languages	O
.	O
</s>
<s>
Examples	O
include	O
Will	O
Clinger	O
's	O
work	O
with	O
the	O
actor	B-Application
model	I-Application
;	O
Glynn	O
Winskel	O
's	O
work	O
with	O
event	O
structures	O
and	O
Petri	B-Operating_System
nets	I-Operating_System
;	O
and	O
the	O
work	O
by	O
Francez	O
,	O
Hoare	O
,	O
Lehmann	O
,	O
and	O
de	O
Roever	O
(	O
1979	O
)	O
on	O
trace	O
semantics	B-Application
for	O
CSP	O
.	O
</s>
<s>
Recently	O
,	O
Winskel	O
and	O
others	O
have	O
proposed	O
the	O
category	O
of	O
profunctors	O
as	O
a	O
domain	O
theory	O
for	O
concurrency	B-Operating_System
.	O
</s>
<s>
State	O
(	O
such	O
as	O
a	O
heap	O
)	O
and	O
simple	O
imperative	B-Application
features	I-Application
can	O
be	O
straightforwardly	O
modeled	O
in	O
the	O
denotational	B-Application
semantics	I-Application
described	O
above	O
.	O
</s>
<s>
The	O
key	O
idea	O
is	O
to	O
consider	O
a	O
command	O
as	O
a	O
partial	B-Algorithm
function	I-Algorithm
on	O
some	O
domain	O
of	O
states	O
.	O
</s>
<s>
Fixed-point	O
constructions	O
are	O
then	O
used	O
to	O
give	O
a	O
semantics	B-Application
to	O
looping	O
constructs	O
,	O
such	O
as	O
""	O
.	O
</s>
<s>
One	O
approach	O
is	O
to	O
no	O
longer	O
work	O
with	O
domains	O
,	O
but	O
instead	O
to	O
interpret	O
types	O
as	O
functors	B-Language
from	O
some	O
category	O
of	O
worlds	O
to	O
a	O
category	O
of	O
domains	O
.	O
</s>
<s>
Programs	O
are	O
then	O
denoted	O
by	O
natural	O
continuous	O
functions	O
between	O
these	O
functors	B-Language
.	O
</s>
<s>
Conventional	O
imperative	B-Application
programming	I-Application
languages	I-Application
would	O
typically	O
allow	O
the	O
elements	O
of	O
such	O
a	O
recursive	O
list	O
to	O
be	O
changed	O
.	O
</s>
<s>
Polymorphic	B-Application
data	I-Application
types	I-Application
are	O
data	O
types	O
that	O
are	O
defined	O
with	O
a	O
parameter	O
.	O
</s>
<s>
Some	O
researchers	O
have	O
developed	O
domain	O
theoretic	O
models	O
of	O
polymorphism	B-Application
.	O
</s>
<s>
Other	O
researchers	O
have	O
also	O
modeled	O
parametric	O
polymorphism	B-Application
within	O
constructive	O
set	O
theories	O
.	O
</s>
<s>
A	O
recent	O
research	O
area	O
has	O
involved	O
denotational	B-Application
semantics	I-Application
for	O
object	O
and	O
class	O
based	O
programming	O
languages	O
.	O
</s>
<s>
Following	O
the	O
development	O
of	O
programming	O
languages	O
based	O
on	O
linear	O
logic	O
,	O
denotational	B-Application
semantics	I-Application
have	O
been	O
given	O
to	O
languages	O
for	O
linear	O
usage	O
(	O
see	O
e.g.	O
</s>
<s>
The	O
problem	O
of	O
full	O
abstraction	O
for	O
the	O
sequential	B-Architecture
programming	I-Architecture
language	O
PCF	B-Language
was	O
,	O
for	O
a	O
long	O
time	O
,	O
a	O
big	O
open	O
question	O
in	O
denotational	B-Application
semantics	I-Application
.	O
</s>
<s>
The	O
difficulty	O
with	O
PCF	B-Language
is	O
that	O
it	O
is	O
a	O
very	O
sequential	O
language	O
.	O
</s>
<s>
For	O
example	O
,	O
there	O
is	O
no	O
way	O
to	O
define	O
the	O
parallel-or	O
function	O
in	O
PCF	B-Language
.	O
</s>
<s>
It	O
is	O
for	O
this	O
reason	O
that	O
the	O
approach	O
using	O
domains	O
,	O
as	O
introduced	O
above	O
,	O
yields	O
a	O
denotational	B-Application
semantics	I-Application
that	O
is	O
not	O
fully	O
abstract	O
.	O
</s>
<s>
This	O
open	O
question	O
was	O
mostly	O
resolved	O
in	O
the	O
1990s	O
with	O
the	O
development	O
of	O
game	O
semantics	B-Application
and	O
also	O
with	O
techniques	O
involving	O
logical	O
relations	O
.	O
</s>
<s>
For	O
more	O
details	O
,	O
see	O
the	O
page	O
on	O
PCF	B-Language
.	O
</s>
<s>
For	O
example	O
,	O
a	O
concurrent	B-Architecture
programming	I-Architecture
language	O
might	O
be	O
translated	O
into	O
a	O
process	O
calculus	O
;	O
a	O
high-level	O
programming	O
language	O
might	O
be	O
translated	O
into	O
byte-code	O
.	O
</s>
<s>
(	O
Indeed	O
,	O
conventional	O
denotational	B-Application
semantics	I-Application
can	O
be	O
seen	O
as	O
the	O
interpretation	O
of	O
programming	O
languages	O
into	O
the	O
internal	O
language	O
of	O
the	O
category	O
of	O
domains	O
.	O
)	O
</s>
<s>
In	O
this	O
context	O
,	O
notions	O
from	O
denotational	B-Application
semantics	I-Application
,	O
such	O
as	O
full	O
abstraction	O
,	O
help	O
to	O
satisfy	O
security	O
concerns	O
.	O
</s>
<s>
It	O
is	O
often	O
considered	O
important	O
to	O
connect	O
denotational	B-Application
semantics	I-Application
with	O
operational	O
semantics	B-Application
.	O
</s>
<s>
This	O
is	O
especially	O
important	O
when	O
the	O
denotational	B-Application
semantics	I-Application
is	O
rather	O
mathematical	O
and	O
abstract	O
,	O
and	O
the	O
operational	O
semantics	B-Application
is	O
more	O
concrete	O
or	O
closer	O
to	O
the	O
computational	O
intuitions	O
.	O
</s>
<s>
The	O
following	O
properties	O
of	O
a	O
denotational	B-Application
semantics	I-Application
are	O
often	O
of	O
interest	O
.	O
</s>
<s>
For	O
semantics	B-Application
in	O
the	O
traditional	O
style	O
,	O
adequacy	O
and	O
full	O
abstraction	O
may	O
be	O
understood	O
roughly	O
as	O
the	O
requirement	O
that	O
"	O
operational	O
equivalence	O
coincides	O
with	O
denotational	O
equality	O
"	O
.	O
</s>
<s>
For	O
denotational	B-Application
semantics	I-Application
in	O
more	O
intensional	O
models	O
,	O
such	O
as	O
the	O
actor	B-Application
model	I-Application
and	O
process	O
calculi	O
,	O
there	O
are	O
different	O
notions	O
of	O
equivalence	O
within	O
each	O
model	O
,	O
and	O
so	O
the	O
concepts	O
of	O
adequacy	O
and	O
of	O
full	O
abstraction	O
are	O
a	O
matter	O
of	O
debate	O
,	O
and	O
harder	O
to	O
pin	O
down	O
.	O
</s>
<s>
Also	O
the	O
mathematical	O
structure	O
of	O
operational	O
semantics	B-Application
and	O
denotational	B-Application
semantics	I-Application
can	O
become	O
very	O
close	O
.	O
</s>
<s>
Additional	O
desirable	O
properties	O
we	O
may	O
wish	O
to	O
hold	O
between	O
operational	O
and	O
denotational	B-Application
semantics	I-Application
are	O
:	O
</s>
<s>
Independence	O
of	O
denotational	O
and	O
operational	O
semantics	B-Application
:	O
The	O
denotational	B-Application
semantics	I-Application
should	O
be	O
formalized	O
using	O
mathematical	O
structures	O
that	O
are	O
independent	O
of	O
the	O
operational	O
semantics	B-Application
of	O
a	O
programming	O
language	O
;	O
However	O
,	O
the	O
underlying	O
concepts	O
can	O
be	O
closely	O
related	O
.	O
</s>
<s>
Full	B-Application
completeness	I-Application
or	O
definability	O
:	O
Every	O
morphism	O
of	O
the	O
semantic	O
model	O
should	O
be	O
the	O
denotation	O
of	O
a	O
program	O
.	O
</s>
<s>
An	O
important	O
aspect	O
of	O
denotational	B-Application
semantics	I-Application
of	O
programming	O
languages	O
is	O
compositionality	O
,	O
by	O
which	O
the	O
denotation	O
of	O
a	O
program	O
is	O
constructed	O
from	O
denotations	O
of	O
its	O
parts	O
.	O
</s>
<s>
A	O
basic	O
denotational	B-Application
semantics	I-Application
in	O
domain	O
theory	O
is	O
compositional	O
because	O
it	O
is	O
given	O
as	O
follows	O
.	O
</s>
<s>
We	O
now	O
give	O
a	O
denotational	B-Application
semantics	I-Application
to	O
program	O
fragments	O
,	O
using	O
the	O
following	O
scheme	O
.	O
</s>
<s>
In	O
fact	O
,	O
this	O
is	O
a	O
general	O
scheme	O
for	O
compositional	O
denotational	B-Application
semantics	I-Application
.	O
</s>
<s>
For	O
example	O
,	O
in	O
game	O
semantics	B-Application
,	O
the	O
category	O
of	O
games	O
has	O
games	O
as	O
objects	O
and	O
strategies	O
as	O
morphisms	O
:	O
we	O
can	O
interpret	O
types	O
as	O
games	O
,	O
and	O
programs	O
as	O
strategies	O
.	O
</s>
<s>
For	O
a	O
language	O
with	O
state	O
,	O
we	O
can	O
work	O
in	O
a	O
functor	B-Language
category	O
.	O
</s>
<s>
Milner	O
has	O
advocated	O
modelling	O
location	O
and	O
interaction	O
by	O
working	O
in	O
a	O
category	O
with	O
interfaces	O
as	O
objects	O
and	O
bigraphs	B-Application
as	O
morphisms	O
.	O
</s>
<s>
It	O
is	O
not	O
necessary	O
for	O
the	O
semantics	B-Application
to	O
determine	O
an	O
implementation	O
,	O
but	O
it	O
should	O
provide	O
criteria	O
for	O
showing	O
that	O
an	O
implementation	O
is	O
correct	O
.	O
</s>
<s>
Usually	O
,	O
however	O
,	O
the	O
formal	O
semantics	B-Application
of	O
a	O
conventional	O
sequential	B-Architecture
programming	I-Architecture
language	O
may	O
itself	O
be	O
interpreted	O
to	O
provide	O
an	O
(	O
inefficient	O
)	O
implementation	O
of	O
the	O
language	O
.	O
</s>
<s>
A	O
formal	O
semantics	B-Application
need	O
not	O
always	O
provide	O
such	O
an	O
implementation	O
,	O
though	O
,	O
and	O
to	O
believe	O
that	O
semantics	B-Application
must	O
provide	O
an	O
implementation	O
leads	O
to	O
confusion	O
about	O
the	O
formal	O
semantics	B-Application
of	O
concurrent	O
languages	O
.	O
</s>
<s>
Such	O
confusion	O
is	O
painfully	O
evident	O
when	O
the	O
presence	O
of	O
unbounded	B-Application
nondeterminism	I-Application
in	O
a	O
programming	O
language	O
's	O
semantics	B-Application
is	O
said	O
to	O
imply	O
that	O
the	O
programming	O
language	O
cannot	O
be	O
implemented	O
.	O
</s>
<s>
Some	O
work	O
in	O
denotational	B-Application
semantics	I-Application
has	O
interpreted	O
types	O
as	O
domains	O
in	O
the	O
sense	O
of	O
domain	O
theory	O
,	O
which	O
can	O
be	O
seen	O
as	O
a	O
branch	O
of	O
model	O
theory	O
,	O
leading	O
to	O
connections	O
with	O
type	O
theory	O
and	O
category	O
theory	O
.	O
</s>
<s>
Within	O
computer	B-General_Concept
science	I-General_Concept
,	O
there	O
are	O
connections	O
with	O
abstract	O
interpretation	O
,	O
program	O
verification	O
,	O
and	O
model	B-Application
checking	I-Application
.	O
</s>
