<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
higher-order	B-Application
abstract	I-Application
syntax	I-Application
(	O
abbreviated	O
HOAS	O
)	O
is	O
a	O
technique	O
for	O
the	O
representation	O
of	O
abstract	B-Data_Structure
syntax	I-Data_Structure
trees	I-Data_Structure
for	O
languages	O
with	O
variable	O
binders	O
.	O
</s>
<s>
An	O
abstract	B-Application
syntax	I-Application
is	O
abstract	O
because	O
it	O
is	O
represented	O
by	O
mathematical	O
objects	O
that	O
have	O
certain	O
structure	O
by	O
their	O
very	O
nature	O
.	O
</s>
<s>
For	O
instance	O
,	O
in	O
first-order	B-Application
abstract	I-Application
syntax	I-Application
(	O
FOAS	O
)	O
trees	O
,	O
as	O
commonly	O
used	O
in	O
compilers	B-Language
,	O
the	O
tree	O
structure	O
implies	O
the	O
subexpression	O
relation	O
,	O
meaning	O
that	O
no	O
parentheses	O
are	O
required	O
to	O
disambiguate	O
programs	O
(	O
as	O
they	O
are	O
,	O
in	O
the	O
concrete	O
syntax	O
)	O
.	O
</s>
<s>
alpha-equivalent	B-Language
(	O
differing	O
only	O
in	O
the	O
names	O
of	O
bound	O
variables	O
)	O
have	O
identical	O
representations	O
in	O
HOAS	O
,	O
which	O
can	O
make	O
equivalence	O
checking	O
more	O
efficient	O
.	O
</s>
<s>
Another	O
popular	O
way	O
to	O
implement	O
HOAS	O
(	O
in	O
,	O
for	O
example	O
,	O
compilers	B-Language
)	O
is	O
with	O
de	B-Application
Bruijn	I-Application
indices	I-Application
.	O
</s>
<s>
language	O
λProlog	B-Language
.	O
</s>
<s>
λProlog	B-Language
code	O
to	O
illustrate	O
it	O
.	O
</s>
<s>
In	O
the	O
domain	O
of	O
logical	O
frameworks	O
,	O
the	O
term	O
higher-order	B-Application
abstract	I-Application
syntax	I-Application
is	O
usually	O
used	O
to	O
refer	O
to	O
a	O
specific	O
representation	O
that	O
uses	O
the	O
binders	O
of	O
the	O
meta-language	O
to	O
encode	O
the	O
binding	O
structure	O
of	O
the	O
object	O
language	O
.	O
</s>
<s>
In	O
Twelf	B-Application
syntax	O
,	O
we	O
could	O
do	O
as	O
follows	O
:	O
</s>
<s>
where	O
 [ y ] 	O
e	O
is	O
Twelf	B-Application
's	O
syntax	O
for	O
the	O
function	O
.	O
</s>
<s>
Higher-order	B-Application
abstract	I-Application
syntax	I-Application
is	O
generally	O
only	O
applicable	O
when	O
object	O
language	O
variables	O
can	O
be	O
understood	O
as	O
variables	O
in	O
the	O
mathematical	O
sense	O
(	O
that	O
is	O
,	O
as	O
stand-ins	O
for	O
arbitrary	O
members	O
of	O
some	O
domain	O
)	O
.	O
</s>
<s>
This	O
is	O
often	O
,	O
but	O
not	O
always	O
,	O
the	O
case	O
:	O
for	O
instance	O
,	O
there	O
are	O
no	O
advantages	O
to	O
be	O
gained	O
from	O
a	O
HOAS	O
encoding	O
of	O
dynamic	O
scope	O
as	O
it	O
appears	O
in	O
some	O
dialects	O
of	O
Lisp	B-Language
because	O
dynamically	O
scoped	O
variables	O
do	O
not	O
act	O
like	O
mathematical	O
variables	O
.	O
</s>
