ArticleslgStudy

computer science

ECLiPSe

ECLiPSe is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand ECLiPSe rather than just read about it. In short: ECLiPSe is a software system for the development and deployment of constraint logic 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.

Key takeaways

  • ECLiPSe belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect ECLiPSe to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of ECLiPSe from memory before moving on to harder problems.

Reference excerpt

ECLiPSe is a software system for the development and deployment of constraint logic 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 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 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

Language The ECLiPSe language is largely backward-compatible with Prolog and supports different dialects, including ISO Prolog. Due to being declarative, it can be used both as a modelling language to describe 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.

Libraries ECLiPSe provides several libraries of constraint 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, Gurobi, and Xpress-MP linear and mixed-integer programming solvers, and the Gecode solver library. Compatibility libraries for ISO Prolog and other Prolog dialects (C-Prolog, Quintus, SICStus, SWI-Prolog) enable the reuse of libraries written in those dialects. 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 machine 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. Versions of ECLiPSe implement OR-parallelism. ECLiPSe components can be integrated into software via a low-level C or C++ interface, or via high-level interfaces to Java and Tcl.

Industrial applications A notable Prolog application was the online casino games server of the Global Player Casino. It has used Prolog as its standard implemention language with more than 157,000 lines of Prolog code running on ECLiPSe. Originally, it was planned to use Prolog only as a rapid prototyping language and after the main design will be verified, it would be rewritten in C. However it turned out that no C rewriting was necessary, the Prolog program has managed to serve ten thousands of HTTP requests per second. All it needed was an interface to the commercial Informix database, the first prototype did not need even that. The server has implemented several versions of single and multi-player roulette and blackjack, several types of slot machines and all credit card operations. It was even able to organize multiplayer blackjack tournaments each week. Unfortunately, although players have loved all these gimmicks, the casino management was not able to advertise it well enough and so the casino went bust in 2007. The reasons for such a success of Prolog as industrial implementation language were:

It turned out that Prolog is almost ideal for rapid prototyping. The program is its own executable specification. An internal relational database is always available. Starting with a very simple prototype takes at most hours, not weeks. New functionalities can be added incrementally, until the required level is achieved.

See also Comparison of Prolog implementations Prolog syntax and semantics

References

External links ECLiPSe on SourceForge 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 ECLiPSE eLearning Website (with video tutorials)

Worked examples

Example 1 — a first encounter with ECLiPSe

Start with the simplest possible case. Write down what ECLiPSe claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to ECLiPSe before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about ECLiPSe ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of ECLiPSe

In research
ECLiPSe appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses ECLiPSe in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
ECLiPSe is common in secondary-school and first-year university syllabi. It links to neighbouring topics Constraint logic programming, Cross-platform free software, Dynamically typed programming languages, so understanding it makes those chapters shorter.
In everyday life
Look for ECLiPSe outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “ECLiPSe” →

How to study ECLiPSe in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what ECLiPSe means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain ECLiPSe out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is ECLiPSe in simple terms?

ECLiPSe is a software system for the development and deployment of constraint logic 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…

Why does ECLiPSe matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study ECLiPSe?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on ECLiPSe.

Tags

  • Constraint logic programming
  • Cross-platform free software
  • Dynamically typed programming languages
  • Free and open source compilers
  • Free software programmed in C
  • Free software programmed in Prolog
  • High-level programming languages
  • Logic programming languages
  • Prolog programming language family
  • Software using the Mozilla Public License

Keep exploring