Resources for ATS/Anairiats Users


This website contains links to various resources for ATS/Anairiats users.


Introduction to Programming in ATS  (html) (pdf)


ATS/Anairiats User's Guide  (pdf) (ps)


The Grammar of ATS/Anairiats  (yats) (desc)


Emacs Mode  A mode for editing ATS source code in Emacs.


ATS Utility Commands

  • atsdoc:  for helping write documents on ATS and beyond.

  • IRC channel ##ats: for chatting about ATS.


    The archive of messages sent to the ATS user's mailing-list.


    ATS/PwTP   A wikibook on programming in ATS

    ATS/Cairo Tutorial  A tutorial on using the cairo drawing package in ATS for 2D graphics.

    ATS/GTK Tutorial  A tutorial on using the GTK+ toolkit in ATS for building graphical user interfaces.


    ML Programmer's Guide to ATS  A guide for a seasoned ML programmer to quickly adjust to the terminology used in ATS and start reading existing ATS code.

    Notes on Systems Programming in ATS

    Examples from K&R translated into ATS  Various examples from the famous K&R book on the C programming language (2nd edition) are translated into ATS, allowing a C programmer to compare ATS and C directly and closely.

    ATSfloat  Please find some tips for using ATS by Shivkumar Chandrasekaran

    BLUISH CODER  Please find some blogs on using ATS by Chris Double

    Project Euler with ATS  Please find some examples by Guillaume Brunerie that illustrate the style of programming with theorem-proving in ATS


    Courses based on ATS 

  • BU CAS CS 520: Many advanced features (e.g., dependent types, linear types) of ATS are presented in this graduate-level course
  • BU CAS CS 525:
    • Spring'11
    • Spring'09: TIGERATS is a compiler written in ATS for the Tiger language presented in Andrew Appel's book on modern compiler design and implementation. This compiler currently targets x86-32 and MIPS32 (plus pseudo instructions accepted by SPIM).
  • BU CAS CS 320: ATS is mostly used like SML in this undergraduate-level course.
  • BU CAS CS 112: ATS is mostly used to prepare slides for this undergraduate-level course.

  • Contributed Code  The primary purpose of contributed code is to facilitate programming in ATS. Also, this is a place for certain code to be properly tested before it can be moved into the library of ATS. Please contribute!

    Various Data Structures

  • Functional Binary Heap (html) A functional binary heap implementation based on Braun trees. This package has been incorporated into the ATS library (libats).
  • Functional Set (html) A functional set implementation based on AVL trees. This package has been incorporated into the ATS library (libats).
  • Functional Multiset (html) A functional multiset implementation based on AVL trees.
  • Functional Map (html) A functional association map implementation based on AVL trees. This package has been incorporated into the ATS library (libats).
  • Functional Red-Black Tree (html) A functional red-black tree implementation (where both insertion and removal are supported).
  • Hashtable Implementations
    • hashtable (html) A hashtable implementation for function programming where buckets are represented as linked lists. This package has been incorporated into the ATS library (libats).
    • hashtable_ngc (html) A hashtable implementation for kernel programming where buckets are represented as linked lists.
  • Linear List Stack (html) A linear stack implementation based on lists.
  • Linear List Queue (html) A linear queue implementation based on lists.
  • Linear Array Queue (html) A linear queue implementation based on arrays.
    • (queuearr_ref.dats) A persistent queue implementation based on linear array queues.
    • (queuearr_mut.dats) A multithread queue implementation based on linear array queues.
  • Linear Bit Vector (html) A standard implementation of linear bit vectors. This package has been incorporated into the ATS library (libats).
  • Linear Binary Heap (html) A linear binary heap implementation based on Braun trees.
  • Linear Map Implementations
    • linmap_randbst (html) A linear map implementation that is based on randomized binary search trees.
    • linmap_splaytree_ngc (html) A linear map implementation that is based on self-adjusting binary search trees (splay trees).
    • linmap_avltree_ngc (html) A linear map implementation that is based on doubly-linked AVL trees. Note that the invariants for being a valid AVL tree are all statically enforced in this implementation with some interesting use of dependent types.
    • linmap_rbtree_ngc (html) A linear map implementation that is based on doubly-linked red-black trees. Note that the invariants for being a valid red-black tree are all statically enforced in this implementation with some interesting use of dependent types.
  • Parsing Combinators   A package containing various parsing combinators. There are also some parsers built on top of the parsing combinators in the package that make essential use of lazy evaluation. This package has now been incorporated into $ATSHOME/contrib.

    ATS/CBLAS This package, which makes essential use of dependent types and linear types, provides an interface for accessing the BLAS library functions in ATS.

    ATS/CLAPACK This package, which makes essential use of dependent types and linear types, provides an interface for accessing the LAPACK library functions in ATS.

    Unix Socket Programming

  • daytime_tcpclient.dats
  • daytime_tcpserver.dats
  • echo_tcpclient.dats
  • echo_tcpserver.dats
  • echo_preforking.dats

  • This page is maintained by Hongwei Xi. As always, your comments are welcome.


    SourceForge.net Logo