ATSlogo
Home(old)
Downloads
Documents
Libraries
Community
Papers
Examples
Resources
Implements
Mailing-list
ats-lang-users
ats-lang-devel
Try ATS on-line
The ATS Programming Language
Unleashing the Potentials of Types and Templates!

ATS packages

ATS is Open Source and Free Software, and it is freely available under the GNU GENERAL PUBLIC LICENSE version 3 (GPLv3) as is published by the Free Software Foundation. The current implementation of ATS is given the name ATS/Postiats or simply Postiats. Also, this implementation is referred to as ATS2 for it is the successor of a previous implementation of the name ATS/Anairiats, which is often referred to as ATS1. The latest released packages of ATS2 are available at the following links:

  • The current stable release of ATS2 is at ATS2-0.4.2.

All of the past stable releases of ATS2 are available on-line at sourceforge.net (SF).

In case of SF going down, which seems not uncommon at all, please obtain the latest stable release (and some other past releases) of ATS2 on-line at github.com, which serves as a backup.


Uninstallation for ATS

Before installing ATS, you are probably concerned with removing an installation of ATS if it is no longer needed. This can be done by simply issuing the following command-line:

make uninstall

Essentially, the following steps are involved in completely removing a properly installed package of ATS:

  • Removing the directory ${PATSHOME};
  • Removing the binaries patscc and patsopt, which are usually stored in a directory like /usr/bin or /usr/local/bin;
  • Removing the directory ${PATSCONTRIB} if ATS2-contrib is installed.


Requirements for installation

The following requirements are supposed to be met in order to install ATS:

  • Operating System requirement: ATS is supported under the following operating systems:
    • Linux
    • MacOS
    • Windows with Cygwin
  • Programming Language requirement: GNU C-Compiler (gcc). Other C-compilers should also work in principle. In particular, it is known that both clang and tcc can succeed in compiling both ATS1 and ATS2.

If you are able to port ATS to a platform not listed here, please drop us a note so that other users of ATS may benefit.

The GMP library (libgmp) is needed for installing ATS2-gmpknd. Please see http://gmplib.org for more details on GMP. Optionally, one may choose to install ATS2-intknd, which has no dependency on the GMP library.


Precompiled packages for installation


Installation through source compilation

This installation method requires access to gcc or some other C-compiler (such as clang) and is also in need of the GMP library. It takes 3 simple steps to complete with the third one being optional.

Step 1:

You can download a released package of ATS2 available on-line and then untar it in a directory, say MYATS, of your choice by issuing the following command-line:

tar -zvxf ATS2-Postiats-x.x.x.tgz

where ATS2-Postiats-x.x.x.tgz refers to the downloaded package and x.x.x is the version number of the package. All the directories and files extracted from the tarball are stored in the directory MYATS/ATS2-Postiats-x.x.x.

If you have access to the git command, then you can also do a git-clone as follows to obtain the current released package of ATS2:

git clone git://git.code.sf.net/p/ats2-lang/code ATS2-Postiats

Step 2:

Please enter the directory MYATS/ATS2-Postiats-x.x.x, and then execute the following command-line:

./configure && make all

You can expect that two executables patscc and patsopt be generated. After setting PATSHOME to MYATS/ATS2-Positiats-x.x.x and adding ${PATSHOME}/bin to the value of PATH, you are ready to use patscc and patsopt for compiling ATS programs.

If you want patsopt to run with GC when it is called to compile ATS source, please re-build by issuing the following command-line:

make cleanall && ./configure && make GCFLAG=-D_ATS_GCATS all

If you prefer to have patsopt run with Boehm-GC, please issue the following command-line:

make cleanall && ./configure && make GCFLAG=-D_ATS_GCBDW all

Step3

Optionally, you may choose to install ATS. The default directory for installing ATS is /usr/local. If you want to change it, please first execute the following command-line:

./configure --prefix=DESTDIR

where DESTDIR refers to the directory into which ATS is to be installed.

You can now install ATS by executing:

make install

After installation, you need to set PATSHOME to DESTDIR/lib/ats2-postiats-x.x.x, which is the name of the directory where ATS is installed.

Note that you can always re-configure before executing make install if you would like to change a previously selected directory for installation:

./configure --prefix=DESTDIR2

Also, you can perform staged installation by making use of the variable DESTDIR. Please find explanation on-line.


Installation of ATS2-contrib

ATS2-contrib primarily consists of external contributions in the forms of library packages, tutorials, examples, documentation of various sorts, etc.

You can download a package of ATS2-contrib and then untar it in a directory, say MYATS, of your choice by issuing the following command-line:

tar -zvxf ATS2-Postiats-contrib-x.x.x.tgz

where ATS2-Postiats-contrib-x.x.x.tgz refers to the downloaded package and x.x.x is the version number of the package. All the directories and files extracted from the tarball are now in the directory MYATS/ATS2-Postiats-contrib-x.x.x.

Please set the environment variable PATSCONTRIB to the name of this directory and then you are ready to use ATS2-contrib. If you like, you can set PATSCONTRIB to be the same as ${PATSHOME} after moving the content of the directory MYATS/ATS2-Postiats-contrib-x.x.x into the directory of the name ${PATSHOME}.

If you have access to the git command, then you can also do a git-clone as follows to obtain the current release of ATS2-contrib:

git clone git://git.code.sf.net/p/ats2-lang-contrib/code ATS2-Postiats-contrib

This approach is preferred as it can greatly simplify the process of pulling in new contributions added to ATS2-contrib later.


Installation of ATS2-include

ATS2-include consists of the header files needed to compile the C code generated from ATS source. Its primary purpose is to support the distribution of C code generated from a software package written in ATS. Note that the header files in ATS2-include are given a BSD-like license so that they can essentially be used anywhere without concerns of license violations.

Strickly speaking, ATS2-include can be downloaded and then stored in any directory one likes. If ATS2-include is to be installed, then a directory like /usr/lib/ats2-postiats-x.x.x or /usr/local/lib/ats2-postiats-x.x.x should be proper for storing the header files contained in it, where x.x.x refers to the verison number of ATS2-include.


Scripts for installing ATS-Postiats

Please find various scripts for installing ATS-Postiats on-line.

More on ATS packages


ATS2 (ATS/Postiats) is implemented in ATS1 (ATS/Anairiats), and ATS1 is implemented in itself. The lastest released version of ATS1 is ATS1-0.2.12, which needs to be installed first in order to build ATS2 from its source (written in ATS1). Essentially, the process of installing ATS1 is the same as installing ATS2. For more information, please check out a simple shell script on-line for installing ATS1 under Linux.


Note that the C code generated from compiling the ATS1 source of ATS2 is included in a released package of ATS2. When the package is used to build ATS2, the included C code is first compiled by a C compiler (such as gcc and clang) into patsopt for compiling ATS2 code subsequently. In general, there should be very little effort required to port ATS2 to a platform if the platform happens to run a Unix-like OS.


The name ATS2-github refers to the version of ATS2 available at github.com. This version contains the latest changes made after the last release of ATS2. Assume that ATS1 has been installed. Then ATS2-github can be built by first git-cloning it into a local directory and then issuing the following command-line after entering the directory:

make -f Makefile_devl
Usually, the whole process of building ATS2-github takes less than 5 minutes.


The name ATS2-contrib-github refers to the version of ATS2-contrib available at github.com. This version contains the latest changes made after the last release of ATS2-contrib. It is ready for use immediately after being git-cloned into a local directory.


[thePageRFooterSep]
This page is created by Hongwei Xi
with tools including ATS/weboxy, atscc2js and atscc2php.