ATS is a multi-paradigm programming language designed to balance high-level abstraction with rigorous software correctness. According to the documentation for 'Introduction to Programming in ATS,' the language supports a wide array of advanced features, including basic functional programming, polymorphic types, and dependent types. Unlike many standard languages where types are simple labels, ATS utilizes dependent types to enhance the expressiveness of specifications, allowing the compiler to solve constraints during the type-checking process to ensure program properties are met at compile time.
A defining characteristic of ATS is its integration of theorem-proving, referred to as Programming with Theorem-Proving (PwTP). This mechanism allows developers to encode relations as 'dataprops' and construct proofs as total functions. By treating proofs as first-class entities within the programming workflow, ATS enables programmers to specify and verify complex properties—such as the commutativity of multiplication or the correctness of matrix subscripting—directly within the code. This approach moves beyond simple type checking by requiring the programmer to provide formal evidence that their logic adheres to specified requirements.
To bridge the gap between high-level verification and low-level system performance, ATS incorporates 'Viewtypes' and linear types. These features manage memory access through pointers, handle stack and heap allocation, and facilitate asynchronous Inter-Process Communication (IPC) using linear channels. Furthermore, the language maintains compatibility with the C ecosystem, allowing for the inclusion of external C code, the calling of external functions, and the use of 'unsafe' C-style programming when necessary. This combination of formal verification, linear memory management, and C interoperability positions ATS as a tool for building software that is both mathematically verified and system-efficient.",
