This chapter summarizes the changes in release 3 wrt. previous SICStus Prolog releases as well as changes introduced by patch releases.
call_residue/2
has been modified so that
goals that are disjunctively blocked on several variables are returned
correctly in the second argument.
setarg/3
has been removed. Its
functionality is provided by the new built-ins create_mutable/2
,
get_mutable/2
, update_mutable/2
, and is_mutable/2
,
which implement a timestamp technique for value-trailing with low-level
support.
unix/1
and plsys/1
have been
removed. Their functionality is provided by
prolog_flag(argv,X)
, by the new halt/1
built-in, and
by the new library(system)
module which also contains several new
predicates.
library(sockets)
module.
time_out/3
has been moved to the new
library(timeout)
module.
term_hash/(2,4)
, subsumes_chk/2
, and
term_subsumer/3
have been moved to the new library(terms)
module, which also contains operations for unification with occurs-check,
testing acyclicity, and getting the variables of a term.
+chars
, -chars
and [-chars]
for fast conversion between
C strings and Prolog lists of character codes. Several new interface functions
are available.
SP_term_ref
,
making the functions SP_show_term()
and SP_hide_term()
obsolete.
library(gmlib)
has been replaced by
the Tcl/Tk based library(tcltk)
. A version of library(gmlib)
converted to SICStus Prolog release 3 is available from
`ftp://ftp.sics.se/archive/sicstus3/gmlib.tar.gz'.
library(objects)
module has been enhanced.
self
.
Prolog goals in methods must be prefixed by :.
library(charsio)
, the open_chars_stream/(3-4)
predicates
have been replaced by open_chars_stream/2
and
with_output_to_chars/(2-3)
.
library(assoc)
module now implements AVL trees instead of
unbalanced binary trees.
library(atts)
implements
attributed variables, a general mechanism for associating logical variables
with arbitrary attributes. Comes with a number of hooks that make it
convenient to define and interface to constraint solvers.
library(clpb)
and is implemented on top of library(atts)
.
library(clpq)
) and reals
(library(clpr)
), implemented on top of library(atts)
.
user:goal_expansion/3
is a new hook predicate for macro-expansion.
bb_put/2
, bb_get/2
, bb_delete/2
, and bb_update/3
are new built-ins implementing blackboard primitives.
prolog_load_context/2
is a new built-in predicate
for accessing aspects of the context of files being loaded.
user:file_search_path/2
is a new hook predicate
providing an alias expansion mechanism for filenames.
gcd/2
is a new built-in function.
walltime
measures elapsed absolute time.
ensure_loaded/1
and use_module/(1-3)
have the same semantics as in Development Systems.
SP_foreign_reinit_hook
is not supported.
library(sockets): socket_select/5
arg 1 may be a, possibly empty,
list of passive sockets, arg 3 returns a, possibly empty, list of new
streams.
library(system)
: The following new predicates are provided:
tmpnam/1
, directory_files/2
, file_property/2
,
delete_file/2
, make_directory/1
.
library(clpfd)
),
implemented on top of library(atts)
.
open/4
, enables opening files in binary mode.
library(charsio)
: New predicate with_output_to_chars/4
.
library(heaps)
: New predicates delete_from_heap/4
, empty_heap/1
, is_heap/1
.
library(queues)
: New predicate is_queue/1
.
library(sockets)
: New predicates: socket_accept/3
, and
socket_select/6
provide address of connecting
client. hostname_address/2
resolves name/ip-number.
SP_atom_length
returns the print name length of a Prolog atom.
toplevel_print_options
and debugger_print_options
are new
Prolog flags controlling the toplevel's and debugger's printing behavior.
is_mutable/1
is a new built-in which is true for mutables.
format/2-3
for arbitrary goals.
library(clpfd)
)
has been enhanced by a programming interface for global constraints,
improved compilation to library constraints and other performance
enhancements, and by a number of new exported constraints.
library(objects)
: New hook predicate user:method_expansion/3
.
library(sockets)
: socket_select/5
has extended functionality.
library(chr)
: A new library module providing Constraint Handling
Rules; see
http://www.pst.informatik.uni-muenchen.de/~fruehwir/chr-solver.html
library(jasper)
.
garbage_collect_atoms/0
, and
controlled by the agc_margin
Prolog flag. New statistics
options: atoms
, atom_garbage_collection
.
New interface functions: SP_register_atom
, SP_unregister_atom
.
call_cleanup/2
, which
replaces undo/1
.
source_info
Prolog
flag.
zip
and built-ins zip/0
, nozip/0
; new debugger
commands out n, skip i, quasi-skip
i, zip, backtrace n, raise exception.
Modules can be declared as hidden which disables tracing of their
predicates.
save/(1,2)
are gone. In most cases, save_program/2
can be
used in their place, with a little rearrangement of your code.
Predicates can be declared as volatile.
SP_restore
is the C equivalent of
restore/1
, which now only restores the program state, leaving the
Prolog execution stacks unchanged.
read_term/3
option: layout(-Layout)
.
New hook predicate: user:term_expansion/4
.
random:randset/3
returns a set in standard order.
db:db_canonical/(2,3)
are new; can be used to check whether two
TermRefs refer to the same term.
clpfd:serialized_precedence/3
and
clpfd:serialized_precedence_resource/4
are new; model
non-overlapping tasks with precedence constraints or sequence-dependent
setup times.
:Goal
are
translated according to the manual. Earlier
versions treated arguments occurring in the `:' position of
meta-predicates specially.
SP_raise_fault
and interface macro
SP_on_fault
are available for handling runtime faults that cannot
be caught as exceptions.
SP_set_memalloc_hooks
is available for
redefining the memory manager's bottom layer. Related to that, there is
a new command-line option `-m'.
reinitialise/0
does not load any initialization files given in
`-i' or `-l' command line flags.
-S
to spmkrs
and spmkds
to
link the SICStus Runtime Kernel (and development extensions for
spmkds
) statically into the executable.
[File1,File2,...]
was broken.
require/1
did not find all directories.
clp[qr]:dump/3
, clp[qr]:expand/0
,
clp[qr]:noexpand/0
.
arrays:arefa/3
, arrays:arefl/3
, heaps:min_of_heap/5
are now steadfast.
library(clpfd)
predicates now check the type of their arguments.
Bugs fixed in relation/3
, serialized/2
, all_distinct/1
.
frozen/2
could crash on an argument of the wrong type.
SP_get_list_n_chars
does not require a proper list.
load_files(Files, [compilation_mode(assert_all)])
.
load_files(Files, [if(changed)])
, a non-module file is
not considered to have been previously loaded if it was loaded into a
different module.
if/3
goals in DCG rules.
system:mktemp/2
sometimes returned filenames with
backslashes in them.
object
in Jasper has changed to
object(Class)
.
splfr
, spmkrs
, spmkds
.
format/2-3
fixed.
save_program/1-2
with native code fixed.
library(chr)
fixed, and a couple of new constraint handlers
fixed.
module/2
decl.
library(tcltk)
.
Go to the first, previous, next, last section, table of contents.