ECLiPSe
Encyclopedia
ECLiPSe is a software system for the development and deployment of Constraint Programming applications, e.g. in the areas of optimization
, planning
, scheduling
, resource allocation
, timetabling, transport etc.
It is also suited for teaching most aspects of combinatorial problem solving, e.g.
problem modeling
, constraint programming
, mathematical programming
, and search techniques
. It contains several constraint solver libraries, a high-level modeling and control language (a superset of Prolog
), interfaces to third-party solvers, an integrated development environment and interfaces for embedding into host environments.
ECLiPSe was developed until 1995 at the European Computer‐Industry Research Centre (ECRC) in Munich
and then until 2005 at the Centre for Planning and Resource Control at Imperial College London
(IC-Parc). It was eventually purchased by Cisco Systems
. In September 2006, it was released as open source software under an equivalent of the Mozilla Public License
, and is now hosted on SourceForge
.
and supports different dialects.
Thanks to its declarative nature, it can be used both as a modelling language
for the description of problems and as a general purpose programming language
.
Beyond the basic Prolog data types, the following are available: strings
,
unlimited precision integer
and rational
numbers,
and floating point intervals
.
Array
syntax and structures with field names
are also supported and especially useful in constraint modelling.
A logical iteration construct
eliminates the need for most simple recursion
patterns.
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.
Together with the attributed variable data type, this is the key to many extensions to the basic
logic programming
language, including all constraint-based functionality.
The system calls user-definable event handlers when it encounters attributed variables
in certain contexts, e.g. unification.
The module system controls the visibility of predicates, non-logical stores, source transformations and syntax settings. Module interfaces can be extended and restricted, and modules written in different language dialects can be mixed within one application.
Programs may contain structured comments from which reference documentation can be generated.
solvers which can be used in application programs:
Arithmetic constraints over finite domains, finite set constraints, generalized propagation, interval reasoning over non-linear constraints, interfaces to external simplex
solvers, constraint handling rules
(CHR) and more.
Other libraries implement search methods like branch-and-bound, repair-based search, limited discrepancy search.
ECLiPSe interfaces to external solvers, in particular the COIN-OR
, CPLEX
® and Xpress-MP linear and mixed-integer programming solvers.
To simplify porting tasks, compatibility libraries for ISO Prolog and other Prolog
dialects (C-Prolog, Quintus
, SICStus, SWI-Prolog
) are provided.
Various other utility libraries, including a number of popular public-domain ones, are included in the distribution.
code.
The compiler optimizes index selection, unification order, inlining of control constructs and can
take mode information into account.
The runtime system implements the virtual machine
, automatic memory
management with garbage collection
of stacks and dictionary, event handling and data-driven execution.
Some versions of ECLiPSe implement OR-parallelism
.
ECLiPSe components can be integrated into other software via a low-level C
or C++ interface,
or via high-level interfaces to Java
and Tcl
.
Optimization
Optimization or optimality may refer to:* Mathematical optimization, the theory and computation of extrema or stationary points of functionsEconomics and business* Optimality, in economics; see utility and economic efficiency...
, planning
Planning
Planning in organizations and public policy is both the organizational process of creating and maintaining a plan; and the psychological process of thinking about the activities required to create a desired goal on some scale. As such, it is a fundamental property of intelligent behavior...
, scheduling
Scheduling (production processes)
Scheduling is an important tool for manufacturing and engineering, where it can have a major impact on the productivity of a process. In manufacturing, the purpose of scheduling is to minimize the production time and costs, by telling a production facility when to make, with which staff, and on...
, resource allocation
Resource allocation
Resource allocation is used to assign the available resources in an economic way. It is part of resource management. In project management, resource allocation is the scheduling of activities and the resources required by those activities while taking into consideration both the resource...
, timetabling, transport etc.
It is also suited for teaching most aspects of combinatorial problem solving, e.g.
problem modeling
Algebraic modeling language
Algebraic Modeling Languages are high-level computer programming languages for describing and solving high complexity problems for large scale mathematical computation...
, constraint programming
Constraint programming
Constraint programming is a programming paradigm wherein relations between variables are stated in the form of constraints. Constraints differ from the common primitives of imperative programming languages in that they do not specify a step or sequence of steps to execute, but rather the properties...
, mathematical programming
Mathematical Programming
Mathematical Programming, established in 1971, and published by Springer Science+Business Media, is the official scientific journal of the Mathematical Optimization Society. It currently consists of two series: A and B. The "A" series contains general publications. The "B" series focuses on topical...
, and search techniques
Search algorithm
In computer science, a search algorithm is an algorithm for finding an item with specified properties among a collection of items. The items may be stored individually as records in a database; or may be elements of a search space defined by a mathematical formula or procedure, such as the roots...
. It contains several constraint solver libraries, a high-level modeling and control language (a superset of Prolog
Prolog
Prolog is a general purpose 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 declarative: the program logic is expressed in terms of...
), interfaces to third-party solvers, an integrated development environment and interfaces for embedding into host environments.
ECLiPSe was developed until 1995 at the European Computer‐Industry Research Centre (ECRC) in Munich
Munich
Munich The city's motto is "" . Before 2006, it was "Weltstadt mit Herz" . Its native name, , is derived from the Old High German Munichen, meaning "by the monks' place". The city's name derives from the monks of the Benedictine order who founded the city; hence the monk depicted on the city's coat...
and then until 2005 at the Centre for Planning and Resource Control at Imperial College London
Imperial College London
Imperial College London is a public research university located in London, United Kingdom, specialising in science, engineering, business and medicine...
(IC-Parc). It was eventually purchased by Cisco Systems
Cisco Systems
Cisco Systems, Inc. is an American multinational corporation headquartered in San Jose, California, United States, that designs and sells consumer electronics, networking, voice, and communications technology and services. Cisco has more than 70,000 employees and annual revenue of US$...
. In September 2006, it was released as open source software under an equivalent of the Mozilla Public License
Mozilla Public License
The Mozilla Public License is a free and open source software license. Version 1.0 was developed by Mitchell Baker when she worked as a lawyer at Netscape Communications Corporation and version 1.1 at the Mozilla Foundation...
, and is now hosted on SourceForge
SourceForge
SourceForge Enterprise Edition is a collaborative revision control and software development management system. It provides a front-end to a range of software development lifecycle services and integrates with a number of free software / open source software applications .While originally itself...
.
Language
The ECLiPSe language is largely backward-compatible with PrologProlog
Prolog is a general purpose 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 declarative: the program logic is expressed in terms of...
and supports different dialects.
Thanks to its declarative nature, it can be used both as a modelling language
Algebraic modeling language
Algebraic Modeling Languages are high-level computer programming languages for describing and solving high complexity problems for large scale mathematical computation...
for the description of problems and as a general purpose programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....
.
Beyond the basic Prolog data types, the following are available: strings
String (computer science)
In formal languages, which are used in mathematical logic and theoretical computer science, a string is a finite sequence of symbols that are chosen from a set or alphabet....
,
unlimited precision integer
Arbitrary-precision arithmetic
In computer science, arbitrary-precision arithmetic indicates that calculations are performed on numbers whose digits of precision are limited only by the available memory of the host system. This contrasts with the faster fixed-precision arithmetic found in most ALU hardware, which typically...
and rational
Rational data type
Some programming languages provide a built-in rational data type to represent rational numbers like 1/3 and -11/17 without rounding, and to do arithmetic on them. Examples are the ratio type of Common Lisp, and analogous types provided by most languages for algebraic computation, such as...
numbers,
and floating point intervals
Interval arithmetic
Interval arithmetic, interval mathematics, interval analysis, or interval computation, is a method developed by mathematicians since the 1950s and 1960s as an approach to putting bounds on rounding errors and measurement errors in mathematical computation and thus developing numerical methods that...
.
Array
Array data type
In computer science, an array type is a data type that is meant to describe a collection of elements , each selected by one or more indices that can be computed at run time by the program. Such a collection is usually called an array variable, array value, or simply array...
syntax and structures with field names
Record (computer science)
In computer science, a record is an instance of a product of primitive data types called a tuple. In C it is the compound data in a struct. Records are among the simplest data structures. A record is a value that contains other values, typically in fixed number and sequence and typically indexed...
are also supported and especially useful in constraint modelling.
A logical iteration construct
Foreach
For each is a computer language idiom for traversing items in a collection. Foreach is usually used in place of a standard for statement. Unlike other for loop constructs, however, foreach loops usually maintain no explicit counter: they essentially say "do this to everything in this set",...
eliminates the need for most simple recursion
Recursion
Recursion is the process of repeating items in a self-similar way. For instance, when the surfaces of two mirrors are exactly parallel with each other the nested images that occur are a form of infinite recursion. The term has a variety of meanings specific to a variety of disciplines ranging from...
patterns.
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.
Together with the attributed variable data type, this is the key to many extensions to the basic
logic programming
Logic programming
Logic programming is, in its broadest sense, the use of mathematical logic for computer programming. In this view of logic programming, which can be traced at least as far back as John McCarthy's [1958] advice-taker proposal, logic is used as a purely declarative representation language, and a...
language, including all constraint-based functionality.
The system calls user-definable event handlers when it encounters attributed variables
in certain contexts, e.g. unification.
The module system controls the visibility of predicates, non-logical stores, source transformations and syntax settings. Module interfaces can be extended and restricted, and modules written in different language dialects can be mixed within one application.
Programs may contain structured comments from which reference documentation can be generated.
Libraries
ECLiPSe provides several libraries of constraintConstraint
Constraint is an element factor or a subsystem that works as a bottleneck. It restricts an entity, project, or system from achieving its potential with reference to its goal....
solvers which can be used in application programs:
Arithmetic constraints over finite domains, finite set constraints, generalized propagation, interval reasoning over non-linear constraints, interfaces to external simplex
Simplex
In geometry, a simplex is a generalization of the notion of a triangle or tetrahedron to arbitrary dimension. Specifically, an n-simplex is an n-dimensional polytope which is the convex hull of its n + 1 vertices. For example, a 2-simplex is a triangle, a 3-simplex is a tetrahedron,...
solvers, constraint handling rules
Constraint Handling Rules
Constraint Handling Rules is a declarative programming language extensionintroduced in 1991 by Thom Frühwirth.Originally designed for developing constraint programming systems, CHR is increasingly used...
(CHR) and more.
Other libraries implement search methods like branch-and-bound, repair-based search, limited discrepancy search.
ECLiPSe interfaces to external solvers, in particular the COIN-OR
COIN-OR
COIN-OR, which stands for Computational Infrastructure for Operations Research, is a project that aims to "create for mathematical software what the open literature is for mathematical theory." The open literature provides the OR community with a peer-review process and an archive...
, CPLEX
CPLEX
IBM ILOG CPLEX Optimization Studio is an optimization software package. In 2004, the work on CPLEX earned the first ....
® and Xpress-MP linear and mixed-integer programming solvers.
To simplify porting tasks, compatibility libraries for ISO Prolog and other Prolog
Prolog
Prolog is a general purpose 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 declarative: the program logic is expressed in terms of...
dialects (C-Prolog, Quintus
Quintus
Quintus may refer to:* Quintus, a Latin praenomen in ancient Rome* Quintus, a given name and a surname in various languages-People:* Quintus Caecilius Metellus Nepos* Lucius Quintus Cincinnatus Lamar* Lucius Quintus Cincinnatus Lamar...
, SICStus, SWI-Prolog
SWI-Prolog
SWI-Prolog is an open source implementation of the programming language Prolog, commonly used for teaching and semantic web applications.It has a rich set of features, libraries forconstraint logic programming,multithreading,unit testing,GUI,...
) are provided.
Various other utility libraries, including a number of popular public-domain ones, are included in the distribution.
System Architecture
The system includes an incremental compiler which translates source code into virtual machineVirtual machine
A virtual machine is a "completely isolated guest operating system installation within a normal host operating system". Modern virtual machines are implemented with either software emulation or hardware virtualization or both together.-VM Definitions:A virtual machine is a software...
code.
The compiler optimizes index selection, unification order, inlining of control constructs and can
take mode information into account.
The runtime system implements the virtual machine
Warren abstract machine
In 1983, David H. D. Warren designed an abstract machine for the execution of Prolog consisting of a memory architecture and an instruction set. This design became known as the Warren Abstract Machine and has become the de facto standard target for Prolog compilers.-Purpose:The purpose of...
, automatic memory
management with garbage collection
Garbage collection (computer science)
In computer science, garbage collection is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program...
of stacks and dictionary, event handling and data-driven execution.
Some versions of ECLiPSe implement OR-parallelism
Parallel computing
Parallel computing is a form of computation in which many calculations are carried out simultaneously, operating on the principle that large problems can often be divided into smaller ones, which are then solved concurrently . There are several different forms of parallel computing: bit-level,...
.
ECLiPSe components can be integrated into other software via a low-level C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....
or C++ interface,
or via high-level interfaces to Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
and Tcl
Tcl
Tcl is a scripting language created by John Ousterhout. Originally "born out of frustration", according to the author, with programmers devising their own languages intended to be embedded into applications, Tcl gained acceptance on its own...
.
External links
- ECLiPSe website
- ECLiPSe SourceForge project
- Constraint Logic Programming using ECLiPSe, textbook by Krzysztof Apt and Mark Wallace
- A Quick and Gentle Guide to Constraint Logic Programming via ECLiPSe, textbook by Antoni Niederliński