ECLiPSe is a Constraint Logic Programming system, consisting of
- a runtime core,
- a collection of libraries,
- a modelling and control language,
- a development environment,
- interfaces for embedding into host environments
- interfaces to third-party solvers.
- General programming tasks, especially rapid prototyping.
- Problem solving using the available solver libraries and the CLP paradigm.
- Development of new constraint solvers based on the existing solvers and employing ECLiPSe's lower-level language features.
The textbook Constraint Logic Programming using ECLiPSe by Apt&Wallace covers many of these aspects.
For further reading, see the introductory paper ECLiPSe as a Platform for Constraint Logic Programming and the tutorial-style document ECLiPSe - An Introduction.
ECLiPSe has also been discussed in a BYTE article about CLP.
tkeclipse development GUI on both Unix and Windows (screen shot (31k))
Traditional command-line based development system also supported.
Debugger working on compiled code.
Profiling tool to collect timings of the execution of individual predicates.
Detailed documentation in printable form, and online-accessible in html format and from the development system.
Incremental compiler. Optimizes index selection, unification order, inlining of control constructs and takes mode information into account.
The system is designed to impose no unnecessary limits on programs and data. E.g. there is no limit, other than the available memory, on the number or length of atoms and strings, the arity of functors, the code size, number of procedures, complexity of clauses or stack sizes.
Synchronous and asynchronous event handling, used for both error and exception handling as well as for interfacing to external event sources.
Fully automatic memory management with garbage collection for stacks and dictionary.
Highly configurable syntax and behaviour.
ECLiPSe programs can execute in or-parallel on shared-memory multiprocessor hardware (this functionality is currently not actively maintained because of other priorities).
A complete I/O system based on the notion of abstract streams which can be connected to files, ttys, pipes, sockets, or in-memory strings and queues.
Core Language Features
ECLiPSe is backward-compatible with Prolog (supporting the ISO/IEC 13211-1/TC1/TC2 standard, as well as other dialects). Here are some classic benchmark results.
ECLiPSe provides comprehensive facilities to implement data-driven control behaviour. These include declarative delay-clauses as well as primitives for meta-programmed control like explicit goal suspension, flexible triggering facilities and execution priorities.
The attributed variable data type is the key to many extensions to the basic Logic Programming language. The system calls user-definable event handlers when it encounters attributed variables in certain contexts, e.g. unification.
Full module system, controlling the scope of visibility of predicates, non-logical stores, macros and syntax settings. Modules can be used both to structure applications and to restrict access to the implementation details.
String data type with garbage-collectable strings.
Arithmetics with unlimited precision integers, rational numbers, single and double precision floats, and floating point intervals with safe rounding.
Logical iteration construct which often eliminates the need for recursive predicates.
Structures with field names.
Global references and variables.
Constraint solvers. ECLiPSe provides several libraries of constraint solvers which can be used in application programs:
- arithmetic constraints over finite atomic domains (CHIP compatible)
- finite set constraints
- linear rational constraints
- Propia (generalized propagation)
- Interval reasoning over non-linear constraints
- Interface to external simplex solvers
- Repair-based search
- Constraint Handling Rules CHR. CHR itself contains a library of over 20 further constraints solvers.
To simplify porting tasks, compatibility libraries for C-Prolog, Quintus, SICStus, SWI and ISO Standard Prolog are provided, which make it possible to integrate modules written in those dialects.
Various other utility libraries, including a number of public-domain ones, are included in the distribution.
Embedding and Interfaces
Tight interface to C and C++. ECLiPSe code can call C/C++ code, or a C/C++ main program can call ECLiPSe as a library. Data can be converted between C and ECLiPSe representations, or alternatively, ECLiPSe data can be referenced from C/C++ and C/C++ data can be referenced from ECLiPSe.
Loose interface for embedding or remote connection to Tcl/Tk and Java host applications. The main characteristics of these interfaces are bi-directional event-driven communication and the ability to communicate complex data structures through a language-independent data representation.