<s>
In	O
programming	O
language	O
theory	O
,	O
semantics	B-Application
is	O
the	O
rigorous	O
mathematical	O
study	O
of	O
the	O
meaning	O
of	O
programming	O
languages	O
.	O
</s>
<s>
Semantics	B-Application
assigns	O
computational	O
meaning	O
to	O
valid	O
strings	O
in	O
a	O
programming	O
language	O
syntax	O
.	O
</s>
<s>
Semantics	B-Application
describes	O
the	O
processes	O
a	O
computer	O
follows	O
when	O
executing	B-General_Concept
a	O
program	O
in	O
that	O
specific	O
language	O
.	O
</s>
<s>
This	O
can	O
be	O
shown	O
by	O
describing	O
the	O
relationship	O
between	O
the	O
input	O
and	O
output	O
of	O
a	O
program	O
,	O
or	O
an	O
explanation	O
of	O
how	O
the	O
program	O
will	O
be	O
executed	O
on	O
a	O
certain	O
platform	B-Device
,	O
hence	O
creating	O
a	O
model	O
of	O
computation	O
.	O
</s>
<s>
It	O
must	O
specify	O
which	O
of	O
the	O
phrases	O
in	O
a	O
syntactically	O
correct	O
program	O
represent	O
commands	B-Application
,	O
and	O
what	O
conditions	B-Language
must	O
be	O
imposed	O
on	O
an	O
interpretation	B-Application
in	O
the	O
neighborhood	O
of	O
each	O
command	O
.	O
</s>
<s>
In	O
1969	O
,	O
Tony	O
Hoare	O
publishes	O
a	O
paper	O
on	O
Hoare	O
logic	O
seeded	O
by	O
Floyd	O
's	O
ideas	O
,	O
now	O
sometimes	O
collectively	O
called	O
axiomatic	O
semantics	B-Application
.	O
</s>
<s>
In	O
the	O
1970s	O
,	O
the	O
terms	O
operational	O
semantics	B-Application
and	O
denotational	B-Application
semantics	I-Application
emerged	O
.	O
</s>
<s>
The	O
field	O
of	O
formal	B-Architecture
semantics	B-Application
encompasses	O
all	O
of	O
the	O
following	O
:	O
</s>
<s>
It	O
has	O
close	O
links	O
with	O
other	O
areas	O
of	O
computer	B-General_Concept
science	I-General_Concept
such	O
as	O
programming	O
language	O
design	O
,	O
type	O
theory	O
,	O
compilers	B-Language
and	O
interpreters	B-Application
,	O
program	O
verification	O
and	O
model	B-Application
checking	I-Application
.	O
</s>
<s>
There	O
are	O
many	O
approaches	O
to	O
formal	B-Architecture
semantics	B-Application
;	O
these	O
belong	O
to	O
three	O
major	O
classes	O
:	O
</s>
<s>
Denotational	B-Application
semantics	I-Application
,	O
whereby	O
each	O
phrase	O
in	O
the	O
language	O
is	O
interpreted	O
as	O
a	O
denotation	O
,	O
i.e.	O
</s>
<s>
For	O
example	O
,	O
denotational	B-Application
semantics	I-Application
of	O
functional	B-Language
languages	I-Language
often	O
translate	O
the	O
language	O
into	O
domain	O
theory	O
.	O
</s>
<s>
Denotational	O
semantic	O
descriptions	O
can	O
also	O
serve	O
as	O
compositional	O
translations	O
from	O
a	O
programming	O
language	O
into	O
the	O
denotational	O
metalanguage	O
and	O
used	O
as	O
a	O
basis	O
for	O
designing	O
compilers	B-Language
.	O
</s>
<s>
Operational	O
semantics	B-Application
,	O
whereby	O
the	O
execution	O
of	O
the	O
language	O
is	O
described	O
directly	O
(	O
rather	O
than	O
by	O
translation	O
)	O
.	O
</s>
<s>
Operational	O
semantics	B-Application
loosely	O
corresponds	O
to	O
interpretation	B-Application
,	O
although	O
again	O
the	O
"	O
implementation	O
language	O
"	O
of	O
the	O
interpreter	B-Application
is	O
generally	O
a	O
mathematical	O
formalism	O
.	O
</s>
<s>
Operational	O
semantics	B-Application
may	O
define	O
an	O
abstract	B-Application
machine	I-Application
(	O
such	O
as	O
the	O
SECD	B-Application
machine	I-Application
)	O
,	O
and	O
give	O
meaning	O
to	O
phrases	O
by	O
describing	O
the	O
transitions	O
they	O
induce	O
on	O
states	O
of	O
the	O
machine	O
.	O
</s>
<s>
Alternatively	O
,	O
as	O
with	O
the	O
pure	O
lambda	B-Language
calculus	I-Language
,	O
operational	O
semantics	B-Application
can	O
be	O
defined	O
via	O
syntactic	O
transformations	O
on	O
phrases	O
of	O
the	O
language	O
itself	O
;	O
</s>
<s>
Axiomatic	O
semantics	B-Application
,	O
whereby	O
one	O
gives	O
meaning	O
to	O
phrases	O
by	O
describing	O
the	O
axioms	B-Algorithm
that	O
apply	O
to	O
them	O
.	O
</s>
<s>
Axiomatic	O
semantics	B-Application
makes	O
no	O
distinction	O
between	O
a	O
phrase	O
's	O
meaning	O
and	O
the	O
logical	O
formulas	O
that	O
describe	O
it	O
;	O
its	O
meaning	O
is	O
exactly	O
what	O
can	O
be	O
proven	O
about	O
it	O
in	O
some	O
logic	O
.	O
</s>
<s>
The	O
canonical	O
example	O
of	O
axiomatic	O
semantics	B-Application
is	O
Hoare	O
logic	O
.	O
</s>
<s>
Apart	O
from	O
the	O
choice	O
between	O
denotational	O
,	O
operational	O
,	O
or	O
axiomatic	O
approaches	O
,	O
most	O
variations	O
in	O
formal	B-Architecture
semantic	O
systems	O
arise	O
from	O
the	O
choice	O
of	O
supporting	O
mathematical	O
formalism	O
.	O
</s>
<s>
Some	O
variations	O
of	O
formal	B-Architecture
semantics	B-Application
include	O
the	O
following	O
:	O
</s>
<s>
Action	B-Language
semantics	I-Language
is	O
an	O
approach	O
that	O
tries	O
to	O
modularize	O
denotational	B-Application
semantics	I-Application
,	O
splitting	O
the	O
formalization	O
process	O
in	O
two	O
layers	O
(	O
macro	O
and	O
microsemantics	O
)	O
and	O
predefining	O
three	O
semantic	O
entities	O
(	O
actions	O
,	O
data	O
and	O
yielders	O
)	O
to	O
simplify	O
the	O
specification	O
;	O
</s>
<s>
Algebraic	B-Application
semantics	I-Application
is	O
a	O
form	O
of	O
axiomatic	O
semantics	B-Application
based	O
on	O
algebraic	O
laws	O
for	O
describing	O
and	O
reasoning	O
about	O
program	B-Application
semantics	I-Application
in	O
a	O
formal	B-Architecture
manner	O
.	O
</s>
<s>
It	O
also	O
supports	O
denotational	B-Application
semantics	I-Application
and	O
operational	O
semantics	B-Application
;	O
</s>
<s>
Attribute	B-Application
grammars	I-Application
define	O
systems	O
that	O
systematically	O
compute	O
"	O
metadata	O
"	O
(	O
called	O
attributes	O
)	O
for	O
the	O
various	O
cases	O
of	O
the	O
language	O
's	O
syntax	O
.	O
</s>
<s>
Attribute	B-Application
grammars	I-Application
can	O
be	O
understood	O
as	O
a	O
denotational	B-Application
semantics	I-Application
where	O
the	O
target	O
language	O
is	O
simply	O
the	O
original	O
language	O
enriched	O
with	O
attribute	O
annotations	O
.	O
</s>
<s>
Aside	O
from	O
formal	B-Architecture
semantics	B-Application
,	O
attribute	B-Application
grammars	I-Application
have	O
also	O
been	O
used	O
for	O
code	O
generation	O
in	O
compilers	B-Language
,	O
and	O
to	O
augment	O
regular	B-General_Concept
or	O
context-free	O
grammars	O
with	O
context-sensitive	O
conditions	B-Language
;	O
</s>
<s>
Categorical	O
(	O
or	O
"	O
functorial	O
"	O
)	O
semantics	B-Application
uses	O
category	O
theory	O
as	O
the	O
core	O
mathematical	O
formalism	O
.	O
</s>
<s>
A	O
categorical	O
semantics	B-Application
is	O
usually	O
proven	O
to	O
correspond	O
to	O
some	O
axiomatic	O
semantics	B-Application
that	O
gives	O
a	O
syntactic	O
presentation	O
of	O
the	O
categorical	O
structures	O
.	O
</s>
<s>
Also	O
,	O
denotational	B-Application
semantics	I-Application
are	O
often	O
instances	O
of	O
a	O
general	O
categorical	O
semantics	B-Application
;	O
</s>
<s>
Concurrency	B-Application
semantics	I-Application
is	O
a	O
catch-all	O
term	O
for	O
any	O
formal	B-Architecture
semantics	B-Application
that	O
describes	O
concurrent	O
computations	O
.	O
</s>
<s>
Historically	O
important	O
concurrent	O
formalisms	O
have	O
included	O
the	O
actor	B-Application
model	I-Application
and	O
process	O
calculi	O
;	O
</s>
<s>
Game	O
semantics	B-Application
uses	O
a	O
metaphor	O
inspired	O
by	O
game	O
theory	O
;	O
</s>
<s>
Predicate	B-Application
transformer	I-Application
semantics	I-Application
,	O
developed	O
by	O
Edsger	O
W	O
.	O
Dijkstra	O
,	O
describes	O
the	O
meaning	O
of	O
a	O
program	O
fragment	O
as	O
the	O
function	O
transforming	O
a	O
postcondition	O
to	O
the	O
precondition	O
needed	O
to	O
establish	O
it	O
.	O
</s>
<s>
For	O
a	O
variety	O
of	O
reasons	O
,	O
one	O
might	O
wish	O
to	O
describe	O
the	O
relationships	O
between	O
different	O
formal	B-Architecture
semantics	B-Application
.	O
</s>
<s>
To	O
prove	O
that	O
a	O
particular	O
operational	O
semantics	B-Application
for	O
a	O
language	O
satisfies	O
the	O
logical	O
formulas	O
of	O
an	O
axiomatic	O
semantics	B-Application
for	O
that	O
language	O
.	O
</s>
<s>
Such	O
a	O
proof	O
demonstrates	O
that	O
it	O
is	O
"	O
sound	O
"	O
to	O
reason	O
about	O
a	O
particular	O
(	O
operational	O
)	O
interpretation	B-Application
strategy	O
using	O
a	O
particular	O
(	O
axiomatic	O
)	O
proof	O
system	O
.	O
</s>
<s>
To	O
prove	O
that	O
operational	O
semantics	B-Application
over	O
a	O
high-level	O
machine	O
is	O
related	O
by	O
a	O
simulation	O
with	O
the	O
semantics	B-Application
over	O
a	O
low-level	O
machine	O
,	O
whereby	O
the	O
low-level	O
abstract	B-Application
machine	I-Application
contains	O
more	O
primitive	O
operations	O
than	O
the	O
high-level	O
abstract	B-Application
machine	I-Application
definition	O
of	O
a	O
given	O
language	O
.	O
</s>
<s>
It	O
is	O
also	O
possible	O
to	O
relate	O
multiple	O
semantics	B-Application
through	O
abstractions	O
via	O
the	O
theory	O
of	O
abstract	O
interpretation	B-Application
.	O
</s>
