ATS is feature-rich. It can accommodate low-level C-style imperative
programming as well as high-level ML-style functional programming. In
addition, it supports an advanced template system comparable to the
one in C++. As different programming styles often require different
kinds of library support, it is probably unsurprising that there are
several varieties of libraries in ATS available to meet certain
distinct needs of programmers (such as a runtime with or without GC).
ATSPRE
is also referred to as ATSLIB/prelude.
The implementation code of ATSPRE is nearly entirely
template-based (to be used by the compiler (ATS/Postiats) for
generating C code).
ATSLIB/libats
consists of various data structures implemented in ATS (or, more
precisely, ATS2). The implementation code is nearly entirely
template-based (to be used by the compiler (ATS/Postiats) for
generating C code). Often a data structure is given a functional
implementation as well as a linear implementation in ATSLIB/libats,
where the former requires the availability of garbage collection (GC)
for automatic memory management while the latter relies on linear
types to ensure the safety of manual memory management.
ATSLIB/contrib/libatscc
is primarily meant for employing ATS and various other programming
languages in a style of co-programming. For instance, programs written
in ATS can be transpiled into popular languages like JavaScript,
Python, PHP, Perl, Erlang, Scheme, Clojure, R, etc.