Abstract.
Abstract
syntax
trees
are
a very
common
data-structure
in
language
related
tools.
For
example
compilers,
interpreters,
documentation
generators,
and
syntax-directed
editors
use
them
extensi
vely
to
extract,
transform,
store
and
pro-
duce
information
that
is key to
their
functionality
.
We present
a Java back-end
for
ApiGen
, a tool
that
generates
implementations
of
abstract
syntax
trees.
The
generated
code
is
characterized
by
strong
typing
combined
with
a generic
interf
ace
and
maximal
sub-term
sharing
for
memory
efficienc
y and
fast
equality
checking.
The
goal
of
this
tool
is to
obtain
safe
and
more
efficient
programming
interf
aces
for
abstract
syntax
trees.
The
contrib
ution
of
this
work
is the
combination
of
generating
a strongly
typed
data-structure
with
maximal
sub-term
sharing
in Java. Practical
experience
sho
ws
that
this
approach
is beneficial
for
extremely
lar
ge
as
well
as
smaller
data
types.