ECLiPSe 5.8 Release Notes

Version 5.8 (2004-12-16)

This release is being distributed under a new academic licence, using a simplified web-based licensing procedure. The academic distribution now comes with source code for many of the libraries. Because of the modified licence terms and a change in ECLiPSe's ownership, old licences (issued before August 2004) are no longer valid for this release, and existing licence holders are kindly asked to upgrade to the new licence.

This release contains many incremental improvements in kernel and libraries, addressing performance, stability and usability issues. The distribution also contains several new contributed libraries related to symmetry handling in constraint problems.

Library Enhancements

LP/MIP solver interface lib(eplex)

As a consequence of the changes in ECLiPSe licensing, Dash Optimization has discontinued their OEM agreement with us. This unfortunately means that if you want to use the lib(eplex) library, you now need to obtain an additional licence. You have the choice between ILOG/CPLEX and Dash/XPRESS-MP. Both companies offer academic licences at discounted rates. Please refer to Changes to the library:

Column Generation lib(colgen)

Graph Algorithms lib(graph_algorithms)

New predicates

Interval Solver lib(ic)

Timeout Library lib(timeout)

This library now supports the nesting of timeouts.

New Libraries

New Symmetry Libraries

GAP-based Symmetry Breaking During Search (SBDS) library
GAP-based Symmetry Breaking via Dominance Detection (SBDD) library
Symmetry expression library (used by lib(ic_gap_sbds) and lib(ic_gap_sbdd))
Interface to the GAP computational algebra package (see in support of the above symmetry breaking libraries.

New Solvers

A enhanced ic_sets solver with stronger propagation based on lexicographic set bounds (background paper).
The Cardinal set solver, contributed by Francisco Azevedo, is now officially part of the distribution (it was already included in recent 5.7 builds)

Other New Libraries

Interface to the gnuplot function and data plotting program
Regular expression handling (string matching and splitting)
Module for managing configuration options for other modules

Development Environment

TkECLiPSe/Development tools:
Emacs eclipse mode enhancements:



Do loops accept a number of new iteration specifiers, specifically aimed at working with (possibly multi-dimensional) arrays:
Like foreacharg/2, but also gives access to the position of X in StructOrArray
Like foreacharg/2, but iterates over elements of an array
Like foreacharg/3, but iterates over elements of an array
Like foreachelem/3, but gives just the index position and not the element
Like for/3, but allows iteration over multiple indices (saves writing nested loops)
Like for/4, but allows iteration over multiple indices (saves writing nested loops)

Parser and Lexical Analyser

The ECLiPSe parser has been completely rewritten in order to overcome some limitations, scale better, fix some inconsistencies, and, of course, to provide some new features. Apart from the new features, the differences in behaviour from the old parser are subtle, and very unlikely to affect most users.
New syntax for structures with named arguments
Simplified syntax has been introduced for structures with field names. The fields can now be written similar to a normal structure, but they are enclosed in curly braces rather than round ones. So, assuming the following struct-declaration is in effect:
	:- local struct(emp(name,age,salary)).
then the new syntax
	emp{salary:10000, age:34}
would be equivalent to having written
	emp(_, 34, 10000)
Seasoned users of the named structure feature should note that the previously used syntax ( emp with [salary:10000, age:34] ) is still supported (implementation-wise, the curly-argument syntax is parsed as a with/2 term and then macro-expanded into the correct structure).

In exotic cases, the introduction of the new syntax can break old code, e.g. a sequence not{arg} (with no space before the opening brace) which previously parsed as not({}(arg)) will now generate a syntax error (but can be easily repaired by inserting a space before the opening brace).

Binary prefix operators
It is now possible to declare binary prefix operators with associativities fxx and fxy. I.e. following the declaration op(950,fxy,some), the input
	some X f(X)
is accepted and will be parsed as some(X,f(X)).
Variable functors
The new syntax option var_functor_is_apply (disabled by default) allows the use of variables in place of functors. A term like
is then parsed as apply(X, [a,b,c]) and can be executed using apply/2 from library(apply).
Better ambiguity resolution
The parser now uses a two-token lookahead to disambiguate prefix-infix and prefix-postfix sequences. This means that some cases that required extra parentheses in the past can now be written without. The most common example are terms like
which previously had to be written as (delay)/2 because delay is a weakly binding prefix operator.
Space after functor
Space between functor and opening round parenthesis is no longer allowed in the default ECLiPSe syntax (syntax_option no_blanks is now the default). This is compatible with most Prolog systems.
Space between variable and attribute
Space between variable and attribute is no longer allowed.
Space between array and subscript
Space between array and subscript list is no longer allowed.
Space between sign and number now significant
Space between a sign and a number will lead to the sign being interpreted as prefix operator rather than as the sign of the number.
	-2 is a negative number.
- 2 is the term '-'(2)
This is more consistent with the treatment of spaces in other contexts. The syntax_option blanks_after_sign reverts to the old behaviour.
Space between empty brackets
Space between empty square brackets and empty curly brackets is now always accepted and ignored. This is compatible with most Prolog systems. The syntax option blanks_in_nil is now obsolete and has no effect.
New syntax options to disable syntax extensions
New options are no_curly_arguments, no_attributes, no_array_subscripts, bar_is_no_atom.
Character classes
The 'solo' character class now simply has the effect that the corresponding character is parsed as a single-character atom. The 'solo' and 'special' characters have been reclassified accordingly.
Token classes
The 'open_par' token class in read_token/2,3 can now return any of the opening brackets (formerly only the round one).
Variable order
Because of a different parsing algorithm, the order of variables in a parsed term may be different from earlier versions of ECLiPSe. This effect only becomes visible with features that use variable ordering, e.g. lib(linearize) and libraries based on it like lib(eplex) and lib(ic). These may produce different (but semantically equivalent) normalisations of linear or polynomial expressions.
Reserved functor 'with attributes'/2
The functor 'with attributes'/2 is now used by the system to implement variable attribute syntax, and should not be used by the programmer.
Attribute expansion
When macro expansion is switched off (i.e. the global flag or stream flag 'macro_expansion' is off) attributed variables are no longer read as variables, but as term 'with attributes'(Var, AttrList).

Module system

As a counterpart to the existing initialization directives, a finalization directive has been introduced. A declaration
    :- local finalization(Goal).
specifies a goal to be executed just before the module containing it gets erased (whether explicitly through erase_module/1 or implicitly through re-compilation or exiting the ECLiPSe session).

Named nonlogical variables can now be declared with an initialization value, using the local variable/2 declaration as in

    :- local variable(my_counter, 1).

Shelves can now be named and accessed under a local name rather than an anonymous handle. The declaration takes a name and an initialisation value for the shelf:

    :- local shelf(my_shelf, my_shelf(0, off, [])).
All shelf-related builtins now accept names in addition to handles.

New Built-in predicates

enumerate currently active symbolic triggers
event_create/3, event_retrieve/3
replace event_create/2 and event_retrieve/2
events_defer/0, events_nodefer/0
temporarily suppress event handling
explicitly invoke clause expansion
explicitly invoke read-macro expansion
like merge/3,5 but based on arithmetic comparison
like sort/2,4 but based on arithmetic comparison
truncate stream (file or string) at current position
explicitly invoke portray transformations for terms, goals, clauses

New Arithmetic Functions

greatest common divisor
least common multiple
like rational/1, but creates more compact rationals


A new output option compact(OnOff) (accepted by write_term/2,3 and all places that take an output option list, or as "K" format character in printf and output_mode settings) for suppressing unnecessary spaces when printing terms.


Waking Conditions

The behaviour of the bound and constrained waking conditions has been revised slightly, with the aim of giving the programmer more precise control and avoiding unnecessary wakings. See the User Manual chapter on Advanced Control Features/Standard Waking Conditions for details. Essentially, variable-variable bindings now only cause waking of goals that are suspended on both variables.

Attributed Variables

The unify-handler for attributed variable unification now accepts an optional third argument, which is the suspend-attribute of the bound variable. This may be needed for the handler to precisely implement the notion of constrained-ness for the variables involved in the unification (in particular to wake the constrained suspension list of the bound variable if and only if necessary).