Resources for ATS/Anairiats Users


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

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

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

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

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

Courses based on ATS 

  • BU CAS CS 112: ATS is mostly used to prepare slides for this undergraduate-level course.
  • BU CAS CS 320: ATS is mostly used like SML in this undergraduate-level course.
  • 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'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).
  • 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 Array (html) A functional array implementation based on Braun trees.
  • Functional Binary Heap (html) A functional binary heap implementation based on Braun trees.
  • Functional Random-Access List (html) A functional random-access list implementation based on a nested datatype.
  • Functional Set (html) A functional set implementation based on AVL trees.
  • Functional Multiset (html) A functional multiset implementation based on AVL trees.
  • Functional Map (html) A functional association map implementation based on AVL trees.
  • 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.
    • 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.
  • 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.

    STFPL This is an implementation of a simply typed functional programming langauge (STFPL). While the language STFPL is unrealistic, the implementation is realistic in terms of the treatment of type error messages. The parser for STFPL is built on top of parsing combinators.

    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

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


    SourceForge.net Logo