The ATerm (Annotated Term) Format is a format for exchanging structured data between tools. The ATerm format is a generic internal and external representation of data by means of simple prefix terms.
An ATerm is an expression according to the following grammar:
t := bt -- basic term | bt { t } -- annotated term bt := C -- constant | C(t1,...,tn) -- n-ary constructor | (t1,...,tn) -- n-ary tuple | [t1,...,tn] -- list | "ccc" -- quoted string | int -- integer | real -- floating point number | blob -- binary large objectHere
C
is a constructor name, which is either an identifier or a quoted string.
ATerms can be exchanged in several formats:
The baffle
tool in the ATerm Library can be used to convert the formats.
The ATerm Format is supported by ATerm Libraries for C, Java, and Haskell.
The ASF+SDF Meta Environment operates on AsFix representations of source code in the ATerm format.
The Stratego program transformation language uses ATerms to represent abstract syntax trees:
The ATerm format is described in the following publication: