NEWS since 0.7

Fergus Henderson fjh at cs.mu.oz.au
Thu Sep 11 17:07:46 AEST 1997


HISTORY:
	Move the old NEWS file into the HISTORY.

NEWS:
	Document the changes since 0.7.


NEWS since Mercury release 0.7
------------------------------

* We've added support for constraint handling.

  The new library package `cfloat_lib', in the extras/clpr directory,
  is a Mercury interface to the CLP(R) constraint solver.  The module
  `cfloat' defines a type `cfloat' for constrained floating point numbers,
  together with the usual arithmetic operators (+, -, *, /, <, >, =<, >=)
  as well as some non-linear constraint functions (abs, min, max,
  sin, cos, arcsin, and arccos).  The module `dump' provides I/O predicates
  for printing out constraints.

  To support constraint handling, we've made the mode system a bit
  more flexible.  There is a new inst `any' for variables whose value
  is unknown but which may have constraints on them. 
  
  The support for `any' insts is not quite complete, so there are
  a couple of limitations.  We do not support unifying values of
  inst `any', so you have to use `==' rather than `=' to unify values
  of type `cfloat'.  Also we do not support passing values of
  inst `free' where values of inst `any' are expected, so sometimes
  you have to explicitly initialize variables by calling cfloat__init/1.

  Also the CLP(R) constraint solver has not yet been ported to a 64-bit
  architecture, so it won't work on DEC Alpha systems.

  But apart from that, it all works nicely.  And even though we support
  equivalents to such nasty non-logical meta-programming constructs
  as CLPR's `dump' primitive, we still manage to preserve referential
  transparency -- the interface provided is a completely pure declarative
  interface.

* We now provide generalized trailing support.

  There is a new set of grades `*.tr' (e.g. `asm_fast.gc.tr') which
  provide support for trailing.  This could be used by predicates or
  functions defined using the C interface to perform such things as
  constraint solving, backtrackable destructive update, and automatic
  unwinding of database transactions on backtracking.  See the declarations
  and comments at the end of runtime/mercury_trail.h for documentation
  of the interface.

* We've added support for backtrackable destructive update on arrays.

  See the new module `tr_array' in the extras/trailed_update.

* We've improved the C interface.

  We now handle the case when `main' is defined in C rather than in Mercury
  slightly more cleanly -- there are functions mercury_init()
  and mercury_terminate() for initializing and terminating the
  Mercury runtime.  See runtime/init.h for documentation of the functions,
  and see samples/c_interface/simpler_c_calls_mercury for an example of
  their use.

* We now support user-defined equality predicates.

  See the Mercury language reference manual for details.

  However, until we have support for type classes (coming soon :-),
  you will probably run into trouble if you try to use compare/3,
  write/1, functor/2, etc., on a type with user-defined equality.
  Hence we recommend that this feature should not yet be used.
  Because of this, we haven't bothered to document the
  rationale or use for user-defined equality predicates
  (though rest assured that when we do have type classes,
  this feature will indeed be useful).

* We have added support for dynamic link libraries (DLLs) on Windows.

  XXX This is not yet enabled by default, though, because it has not
  yet been tested.


-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list