13.20.2 New Features
- On some platforms, SICStus Prolog now has the ability to compile
predicates just in time (JIT) to native code.
In this release, those platforms are the x86 ones, 32 and 64 bit,
running Windows, OS X, and Linux.
The following mutually exclusive predicate properties have been added:
jittable
- The predicate is amenable to JIT compilation.
jitted
- The predicate has been JIT compiled.
- New stream properties
input_encoding/1
and output_encoding/1
.
- CLPFD:
solve/2
generalizes labeling/2
and can perform
optimization over multiple sets of domain variables, with different
search heuristics per set.
labeling/2
with the option minimize/1
or maximize/1
can either enumerate every solution that improves the objective
function, or only the optimal one after optimality has been proved,
under the control of the new options best
and all
. The
same options are available to the predicates minimize/3
and
maximize/3
.
labeling/2
with the option minimize/1
or maximize/1
can be told which optimization method to use with the new options
bab
and restart
.
- More labeling options, inspired by MiniZinc:
input_order
,
smallest
, largest
, first_fail
,
anti_first_fail
, occurrence
, most_constrained
,
max_regret
, median
, middle
.
- New constraints:
bool_and/2
, bool_or/2
, bool_xor/2
,
bool_channel/4
.
all_different/2
, all_distinct/2
and circuit/2
take a new
side-constraint option L #= R, where L is a sum, a product,
or a sum of squares of the variables, and R is an integer.
div
, floored division, is a new binary arithmetic operator.
Corresponds to the new Prolog arithmetic operator with the same name.
//
, truncated division, is a new alias for the existing binary
operator /
. Please note that the Prolog arithmetic operators
/
and //
do not mean the same thing.
- ZINC:
- The limitation that search annotations must include all variables or be
absent has been lifted.
- The limitation that
solutions(all)
had no effect on optimization
problems has been lifted.
search(bab)
and search(restart)
are new options for
choosing optimization method.
- mzn-sicstus is a shortcut for minizinc with the
proper defaults for using SICStus as back-end.
- spfz is a small FlatZinc interpreter command-line tool
for use from the shell. Invoked by mzn-sicstus.
library(structs)
, library(objects)
:
The types integer_64
and unsigned_64
have been added for all platforms.
- PROCESS:
- A new option
wait(Status)
to process:process_create/3
that simplifies waiting for a started process to terminate.
process:process_create/[2,3]
now uses
file_type(executable)
when resolving the path to the
executable. This affects the Windows platform where ‘.exe’ will
be added automatically, if needed.
process:process_create/3
now allows a general argument
specification when specifying the values of environment variables
passed to the subprocess.
-
On Windows, when starting a console application with
process:process_create/[2,3]
, a console window is not created
unless the option window(true)
is specified.
-
Executables created by the spld tool now set the process
locale from the environment (UNIX-like platforms only). The locale can
also be passed as an argument to spld.
Send feedback on this subject.