13.16.1 New Features
- If the Prolog flag
source_info
is on at compile time,
more information from the source code is kept around at runtime,
with improved functionality including:
- The debugger can show variable bindings for the current clause and its
ancestors.
- The Emacs interface offers a variable bindings window that is updated on
every debugger port interaction.
listing/[0,1]
displays the clauses with their source code
variable names.
- PO files and saved-states retain information about variable names and
line numbers.
- The SICStus Prolog IDE (SPIDER) also takes advantage of the improved
debugging information, e.g. the variable bindings view in SPIDER now has
information for more variables than in earlier releases.
- Generic runtime systems are now available on all platforms, not only on
Windows. See Generic Runtime Systems for details.
- Execution profiling has been reengineered:
- The execution profile can be printed in a format similar to
gprof(1)
.
- There is no longer any need to specially instrument code for profiling.
- Execution profiling is available for compiled as well as interpreted code.
- Execution profiling is either globally on or globally off,
reflected by the value of the new
profiling
Prolog flag.
- The new scheme keeps track of the number of calls per caller-callee pair.
- The new scheme detects calls that succeed nondeterminately.
- No clause level data is maintained, all data is per predicate.
- The
profiledcode
value of the compiling
Prolog flag has
been dropped.
- PO files don't store any profiling data.
- The built-in predicates
profile_data/4
and
profile_reset/1
have been replaced by
profile_reset/0
,
profile_data/1
,
print_profile/[0,1]
,
coverage_data/1
, and
print_coverage/[0,1]
.
- SPIDER can present the profile information.
- Improved performance on Linux Intel, 32 and 64 bits.
- Coverage analysis is now available, for compiled as well as interpreted code:
- It uses the same infrastructure as execution profiling.
- Code coverage can be reported textually in a hierarchical format,
or alternatively by highlighting the relevant lines of code in the
relevant Emacs buffers and in SPIDER.
- It is now possible to debug runtime systems, e.g. when SICStus is
embedded in some other applications, such as Java. It is also possible
to attach to a runtime system from SPIDER. See Debugging Runtime Systems.
- The
meta_predicate/1
predicate property will retrieve the
specifications used in the original meta-predicate declaration, which
can be integers or the atoms :
, *
, +
, -
, or ?
.
Previously, only the atoms :
or ?
would be retrieved.
Please note: This is an incompatible change. Code that
inspects this predicate property may need to be updated.
- A new stream property,
id
, has been added. This property provides
a unique identity that is never re-used, even after the stream has been
closed.
See stream_property/2
.
- CLPFD:
- The
case/[3,4]
constraint has been extended to take linear inequalities
into account in addition to the DAG.
- The new constraint
smt/1
provides a front-end to the extended
case/[3,4]
constraint.
- Reified constraints can be used as terms in arithmetic expressions.
library(zinc)
: upgraded to FlatZinc version 1.2.
- Changes to
library(odbc)
:
- New predicates:
odbc_current_table/[2,3]
- Enumerate tables and their attributes.
odbc_table_column/[3,4]
- Enumerate table columns and their attributes.
odbc:odbc_query_close/1
can now close both result sets and
statement handles.
- The format has changed for some odbc exceptions.
Now all odbc-related exceptions have the same basic structure.
- When SICStus is started from Emacs, using M-x run-prolog, or from
the launcher script in the Applications folder, the system
property SP_ULIMIT_DATA_SEGMENT_SIZE is set to
unlimited
. This ensures that overly restrictive default limits on
process memory usage don't affect SICStus. This is primarily an issue
on Mac OS X. Previously, this setting was only applied when SICStus was
invoked from the SICStus Prolog IDE (SPIDER).
Send feedback on this subject.