The Ciao SystemA New Generation, Multi-Paradigm Programming Language and Environment
(Including a State-of-the-Art ISO-Prolog)
The Computational logic, Languages,
Implementation, and Parallelism (CLIP) Labhttps://www.cliplab.org/
School of CS, T. U. of Madrid (UPM)
IMDEA Software Institute
José F. Morales
Ciao is a general purpose, multi-paradigm programming language in the Prolog family. Its modular design allows working with fully declarative subsets of Prolog and also to extend these subsets both syntactically and semantically. Most importantly, these restrictions and extensions can be activated separately on each program module so that several extensions can coexist in the same application for different modules, providing both clear program semantics and the precise assumptions required to perform effective global program analysis and static debugging and optimization.
The Ciao language is intended to support several kinds of uses:
- Ciao can be used as a classical Prolog and logic programming system. It includes standard ISO-Prolog as a sublanguage and a program development environment similar to that of traditional Prolog and constraint logic programming (CLP) implementations. The Ciao programming environment includes a classical top level and a rich Emacs interface with an embeddable source-level debugger, a number of execution visualization tools, and several useful extensions such as alternative control rules (breadth-first search, iterative deepening, ...), and several constraint domains.
- Ciao includes many modern general-purpose programming language features and idioms, such as functions, higher-order (with predicate abstractions), mutables, records, persistence, concurrency (threads/engines), parallel execution, or distributed execution. Ciao includes an assertion language for declaring (optional) program properties, automatic static inference and static/dynamic checking of such assertions, testing, documentation, etc. (some tasks performed by the CiaoPP Program Processor (ciaopp)).
- Ciao supports programming in the large with separate/incremental compiler, an integrated build system, an automatic documentation generator (lpdoc), and a set of standard and contributed libraries providing useful data structures, access to the operating system and networking, Web programming, as well as foreign interfaces, and several bindings to different languages and systems.
- Ciao supports programming in the small through its dynamic language features (dynamically typed, dynamic program modification). It supports producing small executables (including only those libraries actually used by the program) and writing scripts.
- Ciao is also a very good platform for experimenting with new language features, languages, analyses, and program transformations.
The Ciao distribution consists in a complete public domain, open-source implementation, very competitive with other commercial and academic languages (including other Prolog/CLP systems), and distributed under the GNU Library General Public License (LGPL).
This documentation corresponds to version 1.21 (2022/3/2, 20:34:30 CET).
Parts of this manual