The Ciao System

A New Generation, Multi-Paradigm Programming Language and Environment
(Including a State-of-the-Art ISO-Prolog)
The Computational logic, Languages,
Implementation, and Parallelism (CLIP) Lab
https://www.cliplab.org/
School of CS, T. U. of Madrid (UPM)
IMDEA Software Institute
Edited by:
Francisco Bueno
Manuel Carro
Manuel Hermenegildo
Pedro López
José F. Morales
REFERENCE MANUAL
The Ciao Documentation Series
https://ciao-lang.org/
Generated/Printed on: 2019/2/25
Technical Report CLIP 3/97-1.18
Version 1.18 (2018/12/6, 11:25:8 CEST)


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 Ciao preprocessor (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.18 (2018/12/6, 11:25:8 CEST).

Parts of this manual