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

ATS Toolkit:

  • Atscc is a wrapper of convenience around the ATS compilation command atsopt. It is implemented in ATS2. Note that atscc may often be referred to as patscc.
  • Atsopt is the command for directly invoking the ATS compiler that typechecks ATS (source) code and then compiles it into C (target) code. It is implemented in ATS1, consisting of more than 150K lines of code. Note that atsopt may often be referred to as patsopt.
  • Atsdoc is a tool implemented in ATS1 for helping write documentation on ATS and beyond. While its use is now discouraged, the tool itself is still planned to be kept in any future release of ATS1 so that a significant portion of documentation on both ATS1 and ATS2 can be properly generated.
  • Pats2xhtml is a tool implemented in ATS1 for converting ATS2 source (in the plain text format) into a version in the XHTML format where a modest form of syntax-highlighting is applied. Please click here to see a converted example.
  • Atscc2js is a transpiler for compiling into JavaScript the C code generated by atsopt (from compiling some ATS source).
  • Atscc2pl is a transpiler for compiling into Perl the C code generated by atsopt (from compiling some ATS source).
  • Atscc2php is a transpiler for compiling into PHP the C code generated by atsopt (from compiling some ATS source).
  • Atscc2py3 is a transpiler for compiling into Python 3 the C code generated by atsopt (from compiling some ATS source).
  • Atscc2clj is a transpiler for compiling into Clojure the C code generated by atsopt (from compiling some ATS source).
  • Atscc2erl is a transpiler for compiling into Erlang the C code generated by atsopt (from compiling some ATS source).
  • Atscc2scm is a transpiler for compiling into Scheme the C code generated by atsopt (from compiling some ATS source).

Try ATS in your browser

Patsopt is the command for compiling ATS source into C, and Atscc2js is the command for compiling C code generated from ATS source into JS. Both of the commands are available in client-side JS, allowing one to try ATS entirely inside the browser one is using. Please follow this link to get started.


Browse ATS-Postiats on-line

The source code for ATS-Positiats (including the compiler and various libraries) can be readily browsed on-line:


Learn ATS by Solving Math Puzzles

ATS is equipped with a highly expressive type system rooted in the framework Applied Types System, which also gives the language its name. It is, however, non-trivial to make effective use of types in ATS. Please find on-line a tested and fun way to learn ATS by solving math puzzles.


Syntax-hiliting service for ATS code

Pats2xhtmlization is a simple and free on-line service for syntax-hiliting ATS code. In HTML, one can use the tags sats2xhtml and dats2xhtml for syntax-hiliting static and dynamic ATS code, respectively:

<sats2xhtml>
//
// static interface
//
fun factorial (n: int): int
</sats2xhtml>
<dats2xhtml>
//
// dynamic implementation
//
implement factorial(n) = if n > 0 then n*factorial(n-1) else 1
</dats2xhtml>

In order to properly activate the pats2xhtmlization service, one needs to load in the following JS code (in addition to jQuery):

<script
 src="https://ats-lang.github.io/LIBRARY/libatscc2js/libatscc2js_all.js">
</script>
<script
 src="https://ats-lang.github.io/LIBRARY/ats2langweb/pats2xhtmlize_dats.js">
</script>
and then executes the following line in the HTML file where pats2xhtmlization is to take place:
<script>
$(document).ready(function(){pats2xhtmlize_process_all();return;});
</script>

Please visit this link to see a working example (and find its source located here).


More resources


IntelliJATS
An ATS plugin for IntelliJ IDEA
by Brandon Barker
Ats-mode-sublimetext
An ATS syntax highlighter for SublimeText 2/3
by Hanwen (Steinway) Wu
Ats2-language-support
ATS2 language support and integration (currently for Linux with Freedesktop and GtkSourceView)
by Yannick DuchĂȘne
[thePageRFooterSep]
This page is created by Hongwei Xi
with tools including ATS/weboxy, atscc2js and atscc2php.