ATS Trustful Software, Inc.

Copyright © 2010-201? Hongwei Xi

As a programming language, ATS is both syntax-rich and feature-rich. This book introduces the reader to some core features of ATS, including basic functional programming, simple types, (recursively defined) datatypes, polymorphic types, dependent types, linear types, theorem-proving, programming with theorem-proving (PwTP), and template-based programming. Although the reader is not assumed to be familiar with programming in general, the book is likely to be rather dense for someone without considerable programming experience.

To Jinning, Zoe, and Chloe.

**Table of Contents**- Preface
- I. Basic Functional Programming
- 1. Preparation for Starting
- 2. Elements of Programming
- 3. Functions
- Functions as a Simple Form of Abstraction
- Function Arity
- Function Interface
- Evaluation of Function Calls
- Recursive Functions
- Evaluation of Recursive Function Calls
- Example: Coin Changes for Fun
- Tail-Call and Tail-Recursion
- Example: The Eight-Queens Puzzle
- Mutually Recursive Functions
- Mutually Defined Tail-Recursion
- Envless Functions and Closure-Functions
- Higher-Order Functions
- Example: Binary Search for Fun
- Example: A Higher-Order Fun Puzzle
- Currying and Uncurrying

- 4. Datatypes
- 5. Parametric Polymorphism

- II. Support for Practical Programming
- III. Programming with Dependent Types
- IV. Programming with Views and Viewtypes
- V. Programming with Function Templates

Next | ||

Preface |