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:- Obsolete variants lib(range_eplex) and lib(ic_eplex) have been retired
- New probing methods:
- Relaxed MIP - solve a MIP problem with the integer constraints relaxed.
- Fixed MIP - solve a MIP problem as an LP problem with the
integer variables fixed at their MIP solution values.
- Update for new versions of Xpress-MP (version 15) and Cplex (version 9).
- Support for more solving methods where the solver provides them (e.g. Simplex for quadratic problems).
- Support for quadratic MIP where the solver supports it.
- Allow different solving methods to be specified for the root and subsequent nodes of a MIP problem.
- Timeout can now be explicitly specified for each solver instance (even if the solver only provides a single global timeout).
- Added eplex/lp_read for Xpress-MP
- More problem information can be obtained from eplex_get/2 (lp_get/3)
- Added eplex_add_constraints/2 (lp_add_constraints/3), eplex_var_ger_bounds/3.
- The suspension for a demon solver (eplex_solver_setup with
trigger conditions) can now be obtained by the user, and used to set up
their own conditions to wake up the solver.
Column Generation lib(colgen)
- branch, price and cut
- basis stabilisation and handling of degeneracy
Graph Algorithms lib(graph_algorithms)
New predicates- make_sub_graph/3
- connected_components/2
- biconnected_components/3
- maximum_matching_hopcroft_karp/4
- incremental_all_shortest_paths_as_edges/6
- incremental_all_shortest_paths_as_graph/6
- incremental_single_pair_shortest_path/6
- incremental_single_pair_all_shortest_paths_as_graph/7
Interval Solver lib(ic)
- Some performance improvements
- New arc-consistent equality predicate ac_eq(X, Y, C)
Timeout Library lib(timeout)
This library now supports the nesting of timeouts.New Libraries
New Symmetry Libraries
- lib(ic_gap_sbds)
- GAP-based Symmetry Breaking During Search (SBDS) library
- lib(ic_gap_sbdd)
- GAP-based Symmetry Breaking via Dominance Detection (SBDD) library
- lib(sym_expr)
- Symmetry expression library (used by lib(ic_gap_sbds) and lib(ic_gap_sbdd))
- lib(gap)
- Interface to the GAP computational algebra package (see www.gap-system.org) in support of the above symmetry breaking libraries.
New Solvers
- lib(ic_hybrid_sets)
- A enhanced ic_sets solver with stronger propagation based on lexicographic set bounds (background paper).
- lib(cardinal)
- 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
- lib(gnuplot)
- Interface to the gnuplot function and data plotting program
- lib(regex)
- Regular expression handling (string matching and splitting)
- lib(config_opts)
- Module for managing configuration options for other modules
Development Environment
TkECLiPSe/Development tools:- Tracer: count and stop after filter condition has been met a specified number of times
- Delayed goals viewer can find goals attached to symbolic triggers
- Compact output option in tracer and inspector
- Keyboard shortcuts for the tracer commands now indicated with an
underline on the buttons, and works on entering tracer window.
- call to ECLiPSe help (C-c C-h). Default: closest word in text
- check clause/predicate/region/buffer (C-c v c/p/v/b) calls
ECLiPSe to compile clause/predicate/region/buffer returns compiler
messages
Libraries to be loaded before compilation can be listed by calling "ECLiPSe-Edit -> Check -> List libraries" from the menu - M-[ cycles through possible completions for ECLiPSe
keywords and keywords in open buffers in ECLiPSe mode, including
parameters
M-/ cycles through possible completions for ECLiPSe keywords and keywords in open buffers in ECLiPSe mode, without parameters
M-] list all possible complitions for ECLiPSe keywords, and keywords in open buffers in ECLiPSe mode, including parameters - C-c h highlights all occurences of the current word in the
buffer
C-c d de-highlights
C-c > jumps to next highlighted word
C-c < jumps to previous highlighted word - M-<Ret> now inserts clause head *with parameters from previous clause*
Kernel
Do-Loops
Do loops accept a number of new iteration specifiers, specifically aimed at working with (possibly multi-dimensional) arrays:- foreacharg(X,StructOrArray,Idx)
- Like foreacharg/2, but also gives access to the position of X in StructOrArray
- foreachelem(X,Array)
- Like foreacharg/2, but iterates over elements of an array
- foreachelem(X,Array,Idx)
- Like foreacharg/3, but iterates over elements of an array
- foreachindex(Idx,Array)
- Like foreachelem/3, but gives just the index position and not the element
- multifor(List,MinList,MaxList)
- Like for/3, but allows iteration over multiple indices (saves writing nested loops)
- multifor(List,MinList,MaxList,IncrementList)
- 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 asnot({}(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 inputsome 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 likeX(a,b,c)
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
delay/2
which previously had to be written as
(delay)/2
becausedelay
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.
This is more consistent with the treatment of spaces in other contexts. The syntax_option blanks_after_sign reverts to the old behaviour.
- 2 is the term '-'(2)
- 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
- current_trigger/1
- 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
- expand_clause/2
- explicitly invoke clause expansion
- expand_macros/2
- explicitly invoke read-macro expansion
- number_merge/3,5
- like merge/3,5 but based on arithmetic comparison
- number_sort/2,4
- like sort/2,4 but based on arithmetic comparison
- stream_truncate/1
- truncate stream (file or string) at current position
- portray_term/3
- explicitly invoke portray transformations for terms, goals, clauses
New Arithmetic Functions
- gcd/2
- greatest common divisor
- lcm/2
- least common multiple
- rationalize/1
- like rational/1, but creates more compact rationals
I/O
A new output optioncompact(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.
Compiler
- Compiler and lib(source_processor) now accept UTF-8 encoded source files, to the extent that quoted items can contain multibyte characters and the file can start with a UTF-8 byte-order mark.
- A performance bug in the compiler caused it to spend a lot of time on large fact collections like the ones in wordnet. Now fixed, so that wordnet can be compiled quickly.
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).
Various
- Named references can now be initialised to any ground term.
Incompatibilities
- See section on parser modifications, in particular about variable order.
- Old compatibility library lib(alldiff_strong) removed; just use the corresponding predicates from lib(fd_global) instead.
- lib(range) and lib(ria) have been removed; use lib(ic) instead.
- lib(apply) does not define apply/3 any longer. If your code contains calls like apply(Term,List,Module), change them to apply(Term,List)@Module or to apply_(Term,List,Module).
- It is no longer possible to make a nonlogical copy of an eplex-variable (e.g. via setval/2 of a nonlogical variable). Either remove eplex-variables from terms that get copied, or strip their attributes using copy_term/2,3.
- The associativity of the 'else' operator has changed from xfx to xfy.