Ciao is a general-purpose
programming language
A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language.
The description of a programming l ...
which supports
logic
Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the science of deductively valid inferences or of logical truths. It is a formal science investigating how conclusions follow from premis ...
,
constraint
Constraint may refer to:
* Constraint (computer-aided design), a demarcation of geometrical characteristics between two or more entities or solid modeling bodies
* Constraint (mathematics), a condition of an optimization problem that the solution ...
,
functional
Functional may refer to:
* Movements in architecture:
** Functionalism (architecture)
** Form follows function
* Functional group, combination of atoms within molecules
* Medical conditions without currently visible organic basis:
** Functional s ...
,
higher-order, and
object-oriented programming
Object-oriented programming (OOP) is a programming paradigm based on the concept of " objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
styles. Its main
design objective
Design objective (DO): In communications systems, a desired performance characteristic for communications circuits and equipment that is based on engineering analyses, but (a) is not considered feasible to mandate in a standard, or (b) has not b ...
s are high
expressive power,
extensibility
Extensibility is a software engineering and systems design principle that provides for future growth. Extensibility is a measure of the ability to extend a system and the level of effort required to implement the extension. Extensions can be t ...
, safety, reliability, and efficient execution.
Language Characteristics
Ciao provides a full
Prolog
Prolog is a logic programming language associated with artificial intelligence and computational linguistics.
Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is intended primarily a ...
system (supporting
ISO
ISO is the most common abbreviation for the International Organization for Standardization.
ISO or Iso may also refer to: Business and finance
* Iso (supermarket), a chain of Danish supermarkets incorporated into the SuperBest chain in 2007
* Is ...
-Prolog),
declarative subsets and extensions of Prolog,
functional programming
In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions that ...
(including
lazy evaluation
In programming language theory, lazy evaluation, or call-by-need, is an evaluation strategy which delays the evaluation of an expression until its value is needed ( non-strict evaluation) and which also avoids repeated evaluations ( sharing).
T ...
), higher-order (with predicate abstractions),
constraint programming
Constraint programming (CP) is a paradigm for solving combinatorial problems that draws on a wide range of techniques from artificial intelligence, computer science, and operations research. In constraint programming, users declaratively state th ...
, and
objects, as well as feature terms
(records), persistence, several control rules (
breadth-first search
Breadth-first search (BFS) is an algorithm for searching a tree data structure for a node that satisfies a given property. It starts at the tree root and explores all nodes at the present depth prior to moving on to the nodes at the next d ...
, iterative deepening, ...),
concurrency
Concurrent means happening at the same time. Concurrency, concurrent, or concurrence may refer to:
Law
* Concurrence, in jurisprudence, the need to prove both ''actus reus'' and ''mens rea''
* Concurring opinion (also called a "concurrence"), a ...
(threads/engines), distributed execution (agents), and parallel execution. Libraries also support WWW programming, sockets, external interfaces (
C,
Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
,
TclTk,
relational databases
A relational database is a (most commonly digital) database based on the relational model of data, as proposed by E. F. Codd in 1970. A system used to maintain relational databases is a relational database management system (RDBMS). Many relatio ...
, etc.), etc.
Ciao is built on a kernel with an extensible modular design which
allows both restricting and extending the language — it can be seen as a language building language. 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.
Developing Safe and Reliable Programs
Programming in the large in Ciao is supported via:
* A robust module/object system. This provides module-based separate/incremental compilation (which is automatic without need for makefiles).
* An integrated assertion language for declaring (optional) program properties (specifications). These include types, modes, determinacy, non-failure, cost (time, memory), etc.
* Automatic inference and static/dynamic checking of such assertions (including unit testing).
Ciao has also support for programming in the small: the compiler is
capable of producing small executables (including only those builtins
used by the program) and the interpreter supports scripting.
The ''environment'' includes a classical top-level and an evolved emacs
interface with an embeddable source-level debugger and a number of
execution visualization tools.
The Ciao preprocessor supports static debugging and verification
assertion checking and optimization via source to source program
transformation. These tasks are performed by Ciaopp, distributed
separately).
Auto-Documentation
Ciao includes lpdoc, an automatic documentation generator. It
processes programs adorned with (Ciao) assertions and machine-readable
comments and generates manuals in many formats including HTML, pdf,
texinfo, info, man, etc., as well as on-line help, ascii README
files, entries for indices of manuals (info, WWW, ...), and maintains
WWW distribution sites.
Portability and Efficiency
The Ciao compiler (which can be run outside the top level shell)
generates several forms of architecture-independent and stand-alone
executables, which run with speed, efficiency and executable size
which are very competitive with other high-level languages in general
and in particular with commercial and academic Prolog/CLP
systems. Modules can be compiled into compact bytecode or C source
files, and linked statically, dynamically, or autoloaded.
Further reading
*
*
*
*
References
{{DEFAULTSORT:Ciao (programming language)
Logic programming languages
Functional languages
Functional logic programming languages
Cross-platform software
Dynamically typed programming languages
Free compilers and interpreters
Cross-platform free software
Object-oriented programming languages
Scripting languages
Text-oriented programming languages