Home
SICStus Prolog Release Notes
Contents
1. initialization current directory CWD absolute file name myfile Absfile relative to CWD read some file Absfile prolog load context stream 8 will now only succeed when compiling or consulting the code It used to return a closed stream instead of failing library clpfd nvalue 2 would miss solutions element 3 did not maintain arc consistency in its first argument Undefined behavior when combining CLPFD with frozen goals now made consis tent Strength reduction problem for some propositional constraints Missing meta predicate declaration for fd global 3 4 Some data was not protected from garbage collection Output of copy term 3 was sometimes incomplete or not correct Exported non existing predicates file systems file must exist 1 2 lists3 nextto 3 lists3 nth 4 The directory listing predicates in library file systems e g directory member of directory 2 no longer fail if they encounter a broken symbolic link library process Process creation would leak small amounts of memory library random maybe O would always fail the first time A typo prevented library detcheck from working 6 The spdet tool now tries the extension pro in addition to pl Other minor improvements library xref slighly more precise Sockets socket client open 3 would give system error with SPIO E HOST NOT FOUND when connecting to localhost on some platforms
2. SP_exception_term calls Prolog code which could allow SP_event handlers to run e g for library timeout In this case exceptions and failures from an SP event handler would be ignored and possibly confuse SP exception termO SP deinitialize does some cleanup by calling Prolog code This can no longer cause SP event handlers to run Fixed a memory corruption issue that happened during exception handling Prologbeans Lists of one character atoms were incorrectly transferred from Java to SICStus Chapter 13 Revision History 44 The example sessionsum was missing the line pSession connect after the declaration of pSession Session listeners were not notified when a client closed the stream Jasper A memory leak in multithread mode Debugger A file 1 2 breakpoint test or action would raise an exception when used with uninstantiated first file name argument Some conditional breakpoints could not be handled by SU_messages message pro cessing This sometimes caused a raw message term to be presented in the debug ger Sometimes breakpoint tests were evaluated with the wrong value for the bid 1 breakpoint condition The bid 1 breakpoint condition was not always reset to bid off when no breakpoint was selected The documentation was updated to correctly say bid off instead of bid none Sometimes SICStus would enter an infinite loop if the error stream was closed in the other read end
3. files are not portable across architectures that have the same word size which they should be e SICStus Prolog does not verify that Prolog text is in Unicode NFC format When reading terms SICStus Prolog currently does not verify that the input text contains valid Unicode 5 0 characters in Normal Form C See Section Syntax of Tokens as Character Strings in the SICStus Prolog Manual This is not a problem as long as the input is in the proper format but it will accept some input that may be rejected or interpreted differently in a future version of SICStus Prolog 13 12 Changes Introduced in Version 4 1 0 13 12 1 New Features e SPIDER the SICStus Prolog IDE is a new Eclipse based development environment for SICStus with many powerful features See Section SICStus Prolog IDE in the SICStus Prolog Manual for more information e Do loops a new control structure and built in predicate do 2 for performing simple iterations See Section Do Loops in the SICStus Prolog Manual e Conditional compilation a pre processing step that selectively discards parts of a file at compile time This is especially useful for writing code that needs to be compatible with more than one Prolog implementation See Section Conditional Compilation in the SICStus Prolog Manual for more information e New Prolog flags dialect version data make it easier to determine which version of SICStus is running Especially useful with conditional co
4. system environ 2 would leak memory if called with a variable as first argument The Emacs mode did not work in recent Emacsen 13 12 3 Other Changes The atom length restriction has been lifted The Emacs command run prolog now prompts for a Lisp list of extra command line arguments when invoked with a prefix argument i e as C U M x run prolog While loading clauses from a PO file if clauses for an existing multifile predicate are encountered but in a precompiled format different from the existing clauses the existing clauses remain untouched the multifile clauses from the PO file are simply ignored the load continues and a permission error is raised at the end Previously the existing clauses would silently be replaced by the loaded ones This feature is mainly relevant for hook predicates such as user term expansion 6 Chapter 13 Revision History 52 System Properties has been introduced as an abstraction to replace the direct use of environment variables See Section System Properties and Environment Variables in the SICStus Prolog Manual for more information The change is largely backwards compatible with the following notable exceptions e The environment variables SP_APP_DIR SP_RT_DIR etc are no longer set in the environment This means that their value can no longer be obtained e g from C code by using getenv or similar functions Instead SP_getenv can be used for a similar effect e For the
5. 13 20 5 Known Issues The following are known issues with this release of SICStus See Section 13 3 Limitations in the Current Release page 37 for more information about missing or incomplete features in this release Chapter 13 Revision History 70 e SICStus Prolog does not verify that Prolog text is in Unicode NFC format When reading terms SICStus Prolog currently does not verify that the input text contains valid Unicode 5 0 characters in Normal Form C See Section Syntax of Tokens as Character Strings in the SICStus Prolog Manual This is not a problem as long as the input is in the proper format but it will accept some input that may be rejected or interpreted differently in a future version of SICStus Prolog Chapter 14 Generic Limitations 71 14 Generic Limitations The number of arguments of a compound term may not exceed 255 The number of atoms created may not exceed 1048575 33554431 on 32 bit 64 bit archi tectures Saved states and po files are not portable between 32 bit and 64 bit architectures Indexing on large integers or floats is coarse i e there is essentially no indexing between different large integers or floats This can have a huge negative impact on performance e g when representing a hash table as facts using integers as keys The hash predicates in library terms can be used to avoid this problem Chapter 15 Contact Information 72 15 Contact Information Current support statu
6. is no difference in behavior between these two zero values so the distinction should no longer be detectable by Prolog code 13 20 4 Other Changes Windows XP is no longer supported since it has reached its end of life http www microsoft com en us windows enterprise endofsupport aspx Chapter 13 Revision History 69 e Solaris 8 and 9 are no longer supported Solaris 10 is still supported on both SPARC and x86 x86_64 platforms e Mac OS X v10 5 Leopard and Mac OS X v10 6 Snow Leopard are no longer supported Mac OS X 10 7 and later are supported 64 bit only e The Emacs mode will not actively be maintained for XEmacs GNU Emacs is still fully supported and we will consider fixing reported XEmacs problems Users are encouraged to migrate to SPIDER see Section SICStus Prolog IDE in the SICStus Prolog Manual e The Prolog flags single var warnings and discontiguous warnings are now volatile with default value off in runtime systems This means that as before in runtime systems these warnings are off by default but now they can be switched on e absolute file name 2 3 no longer treats the file name user in a special way by default The new option if user 1 is available if the old behavior is needed e absolute file name 2 3 now applies the same kind of case normalization to the extensions 1 and glob 1 arguments as to the file name This affects Windows where extensions p1 now will have the same effect as extens
7. spwin exe and selecting Enter License from the Settings menu Entering the license requires Administrative rights Running SICStus should be possible from a limited account 4 3 Windows Notes e The file name arguments to splfr and spld should not have embedded spaces For file names with spaces you can use the corresponding short file name e Selecting the Manual or Release Notes item in the Help menu may give an error message similar to Help 100 Manual 1nk could not be found This hap pens when Adobe Acrobat Reader is not installed or if it has not been installed for the current user Open C Program Files SICStus Prolog 4 3 0 doc pdf in the explorer and try opening relnotes pdf If this brings up a configuration dialog for Adobe Acrobat configure Acrobat and try the Help menu again Al ternatively you may have to obtain Adobe Acrobat It is available for free from http www adobe com e We recommend that SICStus be installed by a user with administrative privileges and that the installation is made For A11 Users If SICStus is installed for a single user SICStus will not find the license information when started by another user In this case the windowed version of SICStus spwin will put up a dialog where a license can be entered 4 4 Command Line Editing Command line editing supporting Emacs like commands and IBM PC arrow keys is pro vided in the windowed executable sp
8. 2 put_code 1 2 put_byte 1 2 put_code 2 put_byte 2 skip_code 1 2 skip byte 1 2 Skip code 2 skip byte 2 nl 1 flush output 1 set prolog flag 2 unification call residue vars 2 prolog undo 1 Chapter 13 Revision History 36 help O the message system version 0 the message system version 1 the message system fcompile 1 save_files 2 load 1 load files 2 load foreign files 2 splfr load foreign resource 1 require 1 use module 2 is mutable 1 mutable 1 module 1 set module 1 3 The hook predicates user term expansion 2 4 and user term expansion 3 are now called user term expansion 6 and Module term expansion 5 and have a mod ified API see Section Term and Goal Expansion in the SICStus Prolog Manual 4 The set of library modules has been enriched by incorporating a subset of the Quintus Prolog library modules that we have deemed useful library clpb library clpq and library clpr are provided but not sup ported library flinkage and library spaceout are not included in release 4 library objects has been replaced by its Quintus counterpart with a completely different API The following table lists the affected SICStus 3 library modules Affected module Closest equivalent Comment arrays arrays3 a assoc assoc3 b charsio codesio C clpfd clpfd d lists lists3 e queues queues3 f random random3 g sockets sockets d Chapter 13 Revision History 37 system system3 h terms terms d Comment
9. Basic NET and other NET lan guages can use PrologBeans NET The following is a list of library modules that are new in release 4 aggregate assoc bags between provides an aggregation operator for data base style queries uses unbalanced binary trees to implement association lists i e extendible finite mappings from terms to terms defines operations on bags or multisets provides some means of generating integers file systems objects plunit process rem samsort sets structs types varnumbers accesses files and directories provides a package for object oriented programming and can be regarded as a high level alternative to library structs Unit test harness Creating killing releasing and waiting on processes provides Rem s algorithm for maintaining equivalence classes provides generic sorting defines operations on sets represented as lists with the elements unordered provides access to C data structures and can be regarded as a low level alter native to library objects Provides type checking An inverse of numbervars 3 Chapter 13 Revision History 33 13 1 4 Input Output System The internals of the I O subsystem have been completely redesigned The new version should be faster while at the same time providing more functionality and more consistent behavior between operating systems and between stream types The semantics of character codes has been fixed as
10. OPTION INTERACTIVE SP get byte SP get code SP put byte SP put code SP put codes SP put encoded string SP flush output SP set current dir SP get current dir Gone Gone Gone SP put number codes SP get number codes Chapter 13 Revision History 35 SP_unget_code SP_unget_byte Also many functions take new or changed parameters 13 1 5 3 Java API e The PrologBeans API has been extensively revised See the PrologBeans HTML javadoc documentation e PrologBeans was built with Java 1 5 13 2 Guide to Porting Code from Release 3 Release 4 does not provide a mode in which it is 100 compatible with earlier releases However in addition to what is said in Section 13 1 What Is New In Release 4 page 24 read that first this section provides further guidelines for migrating Prolog code from release 3 to release 4 1 First of all make sure that your code runs in ISO execution mode In release 3 the command line option iso can be used 2 A number of built in predicates have been dropped They are listed in the table below along with their approximate substitutes Refer to the documentation for each case Dropped built in get0 1 2 get 1 2 ttyget0 1 ttyget 1 put 1 2 tab 1 2 ttyput 1 ttytab 1 skip 1 2 ttyskip 1 ttynl O ttyflush O fileerrors 0 nofileerrors 0 1C 73 call_residue 2 undo 1 Replaced by get_code 1 2 get_byte 1 2 get_code 2 get_byte
11. Output print coverage 0 1 and print profile 0 1 now print to the current output stream like listing 0 1 Static foreign resources are now compiled in a way that ensures that the code can be linked into dynamic shared objects like so and d11 files This solves a problem where static foreign resources could not be included in all in one executable dynamic shared objects 13 17 4 Known Issues The following are known issues with this release of SICStus See Section 13 3 Limitations in the Current Release page 37 for more information about missing or incomplete features in this release SICStus Prolog does not verify that Prolog text is in Unicode NFC format When reading terms SICStus Prolog currently does not verify that the input text contains valid Unicode 5 0 characters in Normal Form C See Section Syntax of Tokens as Character Strings in the SICStus Prolog Manual This is not a problem as long as the input is in the proper format but it will accept some input that may be rejected or interpreted differently in a future version of SICStus Prolog 13 18 Changes Introduced in Version 4 2 2 Version 4 2 2 is a bugfix release only no major new features have been added See Section 13 16 4 2 0 Changes page 56 for changes introduced in SICStus Prolog 4 2 13 18 1 New Features library odbc Unicode data is now passed to and from the ODBC manager on all platforms Also some arbitrary size limits on the l
12. Predicates 0 cece cece eee ees 25 13 1 2 10 Hook Predacatess 5 sed RI PEERS eee 29 13 1 3 Library Modules 0 0 0 e eee eee nee ee 29 13 1 4 Input Output System 0 eee eee eee eee 33 13 1 5 Foreign Language APIs 0 00 c eee eee ee eee 33 13 1 5 1 Foreign Language Interface 22000 33 13 1 5 2 CAPI P rctlOls eee eR rIUEELRAICYERPETARS 34 19 15 39 Java APT aar nt re RIRU IAN cade be Sepe 30 13 2 Guide to Porting Code from Release 3 0000 000s 35 13 3 Limitations in the Current Release 000 c eee 37 13 4 Changes Introduced in Version 4 0 1 00 cece eae 3r 134 1 New Features corresse dareis iesiri ebp ween ee aa 37 134 2 Bugs Fixed eese ERR AI e RR RT ae 38 i 13 4 3 Other Changes 0 c cece cece e eect neces 38 13 4 4 Known ISSU6S cereo ERE tere eee RRERETER IC sees 38 13 5 Changes Introduced in Version 4 0 2 0 0 0 c eee eee 38 13 5 44 New beatures i ossdorecece eC CR RR te e eee 39 13 5 2 B gs Fixed coiere ede eren b x redes 39 13 5 3 Other Changes i ceesetpR oiire bade yee EI Lr 39 13 04 Known Isus i ies o tee pepe e S RU ROS tese d d 40 13 6 Changes Introduced in Version 4 0 3 000 cece eens 40 13 6 1 New Features cioe ope Rena iad ews Ree arre 40 13 6 2 Bugs Fixed decet etes gites ce ete uite Rt 40 13 6 3 Other Changes 0 cece eect e Al 13 6 4 Kn
13. This could happen e g when SICStus was invoked as a subprocess and the parent process exited ungracefully Some Prolog code would not compile in profiledcode mode Spurious type errors in several library modules library objects library structs fixed a 64 bit issue and putting integers now checks for overflows library avl bug in avl_max 3 library clpfd bug fixes for circuit 1 table 2 3 lex_chain 1 2 library bdb db_open 5 could crash if the option cache_size 1 was passed Very long filenames could cause crashes Did not work reliably with non ASCII file names db_enumerate 3 db_sync 1 db_make_iterator 2 db_iterator_next 3 and db_iterator_done 1 crashed if called after the database had been closed 13 8 3 Other Changes The windowed executable spwin exe on Windows now saves and reads the command history see Section 4 4 Command Line Editing page 7 write 1 2 is now much faster when writing atomic terms assertz 1 and friends are now faster when asserting facts i e clauses without bodies library terms the new predicate term hash 3 allows more control over the hashing behavior and hash algorithm used Notable new features a new better default hash algorithm and several other algo rithms including the 4 0 4 version are available it is possible to obtain a full 32 bit hash value it is possible to get an instantiation error or hash value when the term being hashed is no
14. This section describes some tips and hints on how to get the interface started This is actually where most problems occur 8 2 1 Windows Under Windows you should add SICStus Prolog s and Java s DLL directories to your 4PATHA This will enable Windows library search method to locate all rele vant DLLs For SICStus this is the same as where sicstus exe is located usually C Program Files SICStus Prolog 4 3 0 bin For Java 1 5 it is usually C Program Files Java jdk1 5 0_15 jre bin client For example C gt set PATH C Program Files Java jdk1 5 0_15 jre bin client PATH C gt set PATH C Program Files SICStus Prolog 4 3 0Xbin 4PATHA To make this change permanent under Windows XP you would use the Advanced tab in the System Control Panel Consult your OS documentation for details 8 2 2 UNIX When library jasper is used to embed Java in a SICStus development system or run time system the runtime linker needs to be told where to find the Java libraries e g Chapter 8 Jasper Notes 15 libjvm so During installation InstallSICStus will build either the sicstus exe cutable or the jasper foreign resource so that it contains the necessary information the details are platform dependent If you use spld to relink SICStus or to build a runtime system you can use the command line option resource jasper note the minus sign This tells spld to include the search path rpath
15. a goal at the top level or in a break level or when the debugger is waiting for a command 4 5 1 Console Preferences The stream based console window is a completely separate library using its own configura tion info It will look at the environment variable CONSOLE which should contain a string of the form name value name value where name is one of the following Chapter 4 Release Notes and Installation Guide for Windows 9 sl The number of lines you can scroll back There is no limit but the more you specify the more memory will be used Memory is allocated when data becomes available The default is 200 rows The initial number of lines The default is 24 cols The initial number of columns The default is 80 x The X coordinate of the top left corner The default is determined by the system y The Y coordinate of the top left corner The default is determined by the system Many of these settings are also accessible from the menu Settings of the console 4 6 Windows Limitations e File paths with both and V as separator are accepted SICStus returns paths using Note that V since it is escape character must be given as All file names and paths are normalized when expanded by absolute_file_name 3 This is to simulate the case insensitivity used by Windows file systems This means that files created by SICStus may have names on disk that differs in case from what was specified when th
16. a superset of Unicode Redefining the meaning of character codes is no longer supported New features and changes to the SICStus streams SP_stream include Streams are binary or text also at the lowest level e g in the C API and there are separate operations for performing I O of bytes and characters Streams have a layered design This makes it possible to add character set translation and other transformations compression encryption automatic character set detection to any stream All streams provide non blocking operations and are interruptible e g with C SIGINT This is also true for file streams and under Windows Subject to OS limitations file names can use Unicode and be of arbitrary length In particular under Windows the Unicode API is used for all operations Limits on file size file time stamps etc have been removed Error handling has been simplified and made more consistent In the C API all I O operations return an error code from a rich set of error codes Errors during write and close operations are no longer ignored It is possible to wait for I O ready both for read and write on any type of stream This works for all platforms including Windows Select operations wait for the appropriate item type e g until a whole possibly multi byte character can be transferred on a text stream Other minor changes Now byte count 2 can be called only on binary streams at end of stream 0 1 n
17. ccc cece cece eee 4 3 2 Platform Specific Notes sss 4 4 Release Notes and Installation Guide for AMTEIIGLOSE BI acsi price Aa RT acc d ar CR E pe Ra e 6 4d R quirementsu e eneder rie rre ious one a chika hee as 6 ADS TASCAM AGT OU a eue rrt assur av du genet eat bie RR dde ORT Y eo orte 6 43 Windows Notes eee UE REPE UEECRC OPERI UEEERERI T 4A Command Line Editing 5 oobis rtr Eaa 7 4 5 The Console Window s eese RR RR 8 4 5 1 Console Preferences sese 8 4 6 Windows Limitations seeseeeeeee RR Rh n 9 5 Special Releases 0 cece eee eee 10 5 JBetadJReledsesueete de teer Po raster Dau ware acri ante 10 6 Managing Extended Runtime License Information esee 11 ob DE NOL6S nee tnero URP ra ieE TE D reEr Ed us 13 Tl The Tel Tk Terminal Wi dOw c isi ep reed e ERR 13 B Jasper NOS usen Pha icio Er PROCU e dolio ovs 14 8 1 Supported Java Versions ssssessse e 14 8 2 Getting Started ic adccecte renes e ree RRERE Tu PE Eres 14 8 2 1 WindOoWS i e eer e mm em eom Rem Rose ee RR RR NR n 14 8 2 2 UNI citta ire rvemeebeeesce m eb isslenobvUdieidest 14 8 2 83 Running Java from SICStus 0 cece cee eee 15 8 24 Running SICStus from Java 6 0 eee eee 15 8 8 Jasper Package Options seeeeeeessese e i7 8 4 Multi Threading 0 0 nnes 17 8 5 Changes in Jasper from SICStus 3 000 c cece eee eee 17 8 6 Known B
18. com SICStus for Mac OS X uses the Tcl Tk that comes with Mac OS X Some versions of Tcl Tk provided by Apple have bugs that may cause SICStus Prolog to crash when using library tcltk If this happens you can try to update to a newer version of Tcl Tk from http www activestate com The Tcl Tk interface module included in SICStus Prolog 4 3 0 library tcltk is verified to work with Tcl Tk 8 4 and with Tcl Tk 8 5 for some platforms See the SICStus download web page http sicstus sics se download4 html for details Under UNIX the installation program automatically detects the Tcl Tk version if the user does not specify it explicitly Please note On Windows you need to have the Tcl Tk binaries accessible from your PATH environment variable e g C Program Files Tcl bin The GUI version of SICStus spwin like all Windows non console applications lacks the C standard streams stdin stdout stderr and the Tcl command puts and others that use these streams will therefore give errors The solution is to use sicstus instead of spwin if the standard streams are required 7 1 The Tcl Tk Terminal Window The Tcl Tk interface includes an experimental and unsupported terminal window based on Tcl Tk It is opened by using the undocumented predicate tk terminal Interp TextWidget InStream OutStream ErrStream Given a TextWidget e g top myterm this predicate opens three Prolog streams for which the text widget acts as
19. do something 01d it can be rewritten as follows which will also work in older versions of SICStus Prolog hh gt 4 0 5 version user error exception New New error Old gt true Old New do_something 01d e trimcore 0O is now more thorough when releasing memory back to the operating sys tem This also affects the trimcore variant used by the top level e It is now possible to tell SICStus to use malloc et al as memory manager instead of the default custom allocator malloc is selected when starting sicstus with the new option m when initializing the SICStus runtime with the environment variable SP USE MALLOC set to yes for SIC Stus runtimes built with the new spld option memhook malloc and when calling SP_set_memalloc_hooks with the new option SP_SET_MEMALLOC_HOOKS_HINT_USE_ MALLOC See Section SP_set_memalloc_hooks in the SICStus Prolog Manual e library clpfd unification with domain variables as well as propositional combina tions of arithmetic constraints have been accelerated Chapter 13 Revision History 46 13 8 4 Known Issues The following are known issues with this release of SICStus See Section 13 3 Limitations in the Current Release page 37 for more information about missing or incomplete features in this release e Exceptions in interpreted code will not get accurate source info in the source linked debugger e Saved states and po files are not po
20. in predicate aliased by terms term_ variables bag 2 and performs conformant error handling terms term variables 2 has been renamed to terms term variables set 2 acyclic term 2 previously in library terms is now a standard built in predicate The built in predicates callable 1 ground 1 retractall 1 call n false O are now standard The built in predicates number codes 2 number chars 2 atom codes 2 and atom chars 2 now perform conformant error handling The syntax for numbers has changed plus sign is no longer allowed Full ISO syntax allowed in Codes Chars including layout and comments The built in predicates length 2 keysort 2 sort 2 compare 3 and open 3 4 now perform conformant error handling The built in predicates ca11 1 assert 1 and similar predicates now perform confor mant error handling when encountering an invalid goal X div Y is a new standard arithmetic expression whose value is the integer quotient of X and Y rounded downwards to the nearest integer xor X Y is the standard syntax for X Y X Y is a new standard arithmetic expression whose value is X raised to the power of Y represented as a float if any of X and Y is a float otherwise as an integer pi is a new standard arithmetic expression whose value is approximately 3 14159 il A term written by a previous release will still be read correctly by this release A term written by this release will be read correctly by releases
21. in the executable needed to ensure that library jasper can find the Java libraries If you want to run sicstus with another Java than what was specified during installation you can use spld without the resources option to get a SICStus executable without any embedded Java paths In this case you need to set the environment variable LD_ LIBRARY_PATH or similar appropriately One example of this is to use the JDK 1 5 server version instead of the default client version 8 2 3 Running Java from SICStus If SICStus is used as parent application things are usually really simple Just execute the query use_module library jasper After that it is possible to perform meta calls as described in Section Jasper Library Predicates in the SICStus Prolog Manual When Jasper is used in runtime systems additional constraints apply as described in Section Runtime Systems on Target Machines in the SICStus Prolog Manual The Java to SIC Stus interface relies on dynamically loading the SICStus runtime system For this reason it is not possible to use library jasper from an executable that links statically with the SICStus runtime 8 2 4 Running SICStus from Java If Java is used as parent application things are a little more complicated There are a couple of things that need to be taken care of The first is to specify the correct class path so that Java can find the Jasper classes SICStus SPTerm and so on This i
22. native release 4 counterpart is called library logarr Also available is a deprecated compatibility module library arrays3 assoc The native release 4 counterpart is called library av1 reflecting the abstract data type AVL trees and with a modified richer API Also available is a deprecated compatibility module library assoc3 bdb As in release 3 but uses the default Berkeley DB hash function so all of the standard Berkeley DB utilites should now work charsio Called library codesio in release 4 Likewise the syllable chars has been renamed to codes in predicate names clpb clpq clpr As in release 3 unsupported clpfd As in release 3 plus the following additions and changes automaton 8 is a new constraint capturing any constraint whose checker of ground instances can be expressed as a finite automaton minimum 2 maximum 2 are new constraints constraining a value to be the minimum max imum of a list of values nvalue 2 isa new constraint constraining the number of distinct values taken by a list of values cumulative 1 2 provides a unified interface subsuming serialized 2 3 and cumulative 4 5 table 2 3 defines an n ary constraint by extension subsuming relation 3 Chapter 13 Revision History 31 jasper lists ordsets queues random Sockets system all different 1 2 all distinct 1 2 Arguments can have unbounded domains scalar product 4 5 can option
23. predicate properties have also been added jittable The predicate is amenable to JIT compilation jitted The predicate has been JIT compiled e New stream properties input_encoding 1 and output_encoding 1 e 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 opti mization 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 and all_distinct 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 Chapter 13 Revision History 65 truncated division is a new alias for the existing binary operat
24. runtime calls Pro log code in contexts where their result e g failure or exception cannot be propagated to the caller T his could potentially lead to timeouts and other asynchronous events being ignored e If open 4 fails to open a file for writing it will now generate a permission error as prescribied by the ISO Prolog standard It used to raise a system error e The open 4 option if exists generate unique name would sometimes access and use freed memory when generating a new file name e SP get list n codes would report more bytes written than what was actually written e Goals run as part of initialization 1 now have access to the load context prolog load context 2 similarly to how other goals appearing in directives are treated This also means that absolute file name 2 3 will use the location saved in the load context as default directory Please note The change in default directory for absolute file name 2 3 and thus open 3 4 et al is an incompatible change that may affect some programs Old code that depends on the current directive may need to be updated to explicitly call file systems current directory 1 If the old code looked like hh Pre 4 1 0 version initialization read some file 7myfile it can be rewritten as follows which will also work in older versions of SICStus Prolog Chapter 13 Revision History 51 hh gt 4 1 0 version use module library file systems current directory 1
25. same reason sub processes created with process process_create 2 3 will no longer see SP_APP_DIR et al in their inherited environment Instead it is now possible to explicitly pass environment variables to the sub process using the new environment 1 option to process process_create 3 New automatically set system properties SP_APP_PATH the path to the executable SP_RT_DIR the path to the SICStus runtime and SP_STARTUP_DIR the initial working directory See Section System Properties and Environment Variables in the SICStus Prolog Manual for more information The initial working directory can be set with the system property SP_STARTUP_DIR independently from the process s working directory By setting the system property SP_ALLOW_CHDIR to no SICStus can be told to never change the process s working directory These features are especially useful when embedding SICStus The buffer argument to spio_t_simple_device_write is now a void const instead of a plain void This affects code that use SP_create_stream to create user defined streams SP_get_list_n_bytes and SP_get_list_n_codes now use stricter input valida tion SICStus will no longer flush open streams on exit This change is to prevent SIC Stus from hanging on exit due to some blocking I O operation All streams should be explicitly closed close 1 2 or flushed flush_output 1 if their contents is precious clpfd case 4 the leaves 2 option has been d
26. used without explicit fzn and ozn extensions Empty arrays caused spurious existence errors e CHR and are no longer incompatibly defined as prefix operators Chapter 13 Revision History 67 13 In the build for 64 bit OS X 10 8 library tcltk would crash the process The codes command specification was incorrectly documented as chars On Windows pillow fetch ur1 3 would sometimes time out for some web servers A bug in Microsoft J caused PrologBeans NET to transmit some data incorrectly from Prolog to NET The splfr tool now ensures that the C compiler will find the generated headers also when the namebase option specifies a folder 20 3 Changes Related to Standard Conformance SICStus Prolog now complies with Technical Corrigenda 1 and 2 to the International Stan dard ISO IEC 13211 1 PROLOG Part 1 General Core throw 1 now throws its argument as is raise exception 1 however transforms SIC Stus error terms into ISO error 2 exceptions Unless a forged SICStus error term is thrown by throw 1 the net behavior is unchanged In cases where the ISO and SICStus error term previously had different principal func tors the SICStus error term has been changed to correspond to the ISO one subsumes term 2 is a new standard built in predicate aliased by terms subsumeschk 2 and is now correct in case the arguments share variables term variables 2 is a new standard built
27. 3 1 2 7 Stream Properties The wcx property has been dropped Several new stream properties have been added See Section stream_property 2 in the SICStus Prolog Manual 13 1 2 8 Statistics Keywords Several new statistics keywords have been added See Section statistics 0 1 in the SICStus Prolog Manual 13 1 2 9 Built In Predicates The set of built in predicates has changed slightly The following predicates have been removed 0 3 This was used in the Prolog translation of DCG rules It could trivially be replaced by unifications and served no other reasonable purpose get0 1 2 put 1 2 These used to have an overloaded semantics meaning one thing on binary streams and another thing on text streams They have been subsumed by their ISO counterparts Chapter 13 Revision History 26 get 1 2 tab 1 2 Skip 1 2 Although these don t have ISO counterparts they have been removed for be ing in the spirit of getO 1 2 and put 1 2 We have provided skip char 1 2 skip code 1 2 and skip byte 1 2 as an ISO style replace ment for skip 1 2 ttyget0 1 ttyget 1 ttynl O ttyput 1 ttyskip 1 ttytab 1 ttyflush O These used to exist as shorthands for the respective predicate with an additional user argument In most cases the respective predicate is one of the non ISO style predicate mentioned above so there was no point in keeping the shorthand fileerrors 0 nofileerrors 0 These used to
28. FC format When reading terms SICStus Prolog currently does not verify that the input text contains valid Unicode 5 0 characters in Normal Form C See Section Syntax of Tokens as Character Strings in the SICStus Prolog Manual This is not a problem as long as the input is in the proper format but it will accept some input that may be rejected or interpreted differently in a future version of SICStus Prolog 13 11 Changes Introduced in Version 4 0 8 13 11 1 New Features GROWTHFACTOR A new environment variable that controls the rate at which the Prolog stacks grow when they are expanded See Section sicstus SICStus Prolog Devel opment System in the SICStus Prolog Manual 13 11 2 Bugs Fixed e Compiler shallow backtracking bug e Virtual machine bugs accesses to uninitialized freed or dead data spurious memory corruption recovery from memory resource error 13 11 3 Other Changes e Stack memory is maintained separately from other memory which can sharply reduce memory fragmentation e Decreased garbage collection overhead in some cases Chapter 13 Revision History 48 13 11 4 Known Issues The following are known issues with this release of SICStus See Section 13 3 Limitations in the Current Release page 37 for more information about missing or incomplete features in this release e Exceptions in interpreted code will not get accurate source info in the source linked debugger e Saved states and po
29. SICStus Prolog Release Notes Mats Carlsson et al SICS Swedish ICT AB PO Box 1263 SE 164 29 Kista Sweden Release 4 3 0 May 2014 SICS Swedish ICT AB sicstus request sics se http www sicstus se Copyright 1995 2014 SICS SICS Swedish ICT AB PO Box 1263 SE 164 29 Kista Sweden Permission is granted to make and distribute verbatim copies of these notes provided the copyright notice and this permission notice are preserved on all copies Permission is granted to copy and distribute modified versions of these notes under the con ditions for verbatim copying provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one Permission is granted to copy and distribute translations of these notes into another lan guage under the above conditions for modified versions except that this permission notice may be stated in a translation approved by SICS Table of Contents 1 Overview 0 ccc ccc a 1 2 PUistlOFESssocesicav csc de ER RO bob hanna ts 2 3 Release Notes and Installation Guide for UNIX EEEE TTE TEA lea on ea oe ee eee eee es 3 Jab InstallatiGuic lt esos 2 0 4 Vetteecn ta ton 2 aaa eo dian E Guns 3 3 1 1 PrerequisiteS 22e tage REESE eI RE ORE E E ESO ces 3 3 1 1 1 C Compiler and Linker 0 0 cece eee 3 3 1 2 The Installation Script sesir iscri sisi popie geisiesa niriri ies 3 3 1 3 The Uninstallation Script 0 0
30. Tem nx RR 61 13 18 Changes Introduced in Version 4 2 2 0 0c cece eee eee 61 13 18 1 New Features 6 onic cectekasaaasacau br ICE RREERS 61 13 18 2 Bites Fixed i oer e x 62 13 18 3 Other Changes iekserirerni insi eo Sede DR seat Rede es 62 I19 18 4 Iri wn 880685 sis cete erexit nace For Een 62 13 19 Changes Introduced in Version 4 2 3 000 cece eee ees 63 IS 19 0 New Featiress 604404 22 mee PROP CODI saws e864 905 63 13 10 2 Bigs Hixed 5 oiseau RESENA 63 13 19 3 Other Changes oce eese e Rh eg 63 13194 I amp rioWtz 8868 oou nece repere RR Eder eeera e e wes 64 13 20 Changes Introduced in Version 4 3 0 0 00 ccc eee eens 64 1320 1 New PBeatures c occteeeectee RR RE OPES nere ha Ree 64 13 20 2 Bugs Fixed teer cette niks 65 13 20 83 Changes Related to Standard Conformance 67 13 204 Other Chanpes uuu cava e Drac e RU etel auo a 68 13 20 5 Koown 8868 5 eer eene eh dee e eode s 69 Generic Limitations sss 71 Contact Information 12 Chapter 1 Overview 1 1 Overview These notes summarize the changes in release 4 wrt previous SICStus Prolog releases as well as changes introduced by minor releases and their patch releases Platform specific information pertaining to certain parts of the system are also documented herein Chapter 2 Platforms 2 2 Platforms Binary distribu tions of Release 4 3 are available for many platforms s
31. a terminal There is also a library tkconsol that makes use of tk terminal 5 It provides a pred icate tk console 0 that switches the Prolog top level to a Tk window Chapter 8 Jasper Notes 14 8 Jasper Notes 8 1 Supported Java Versions Jasper requires at least Java 1 5 to run Except under Windows the full development kit not just the JRE is needed c PM 4 3 irrelevant these days Jasper does not work with Visual J or Visual Caf Unless indicated otherwise you can download the JDK from http java sun com Except where indicated Jasper is supported for Java 1 5 or later For some platforms Jasper is only supported under the following conditions Mac OS X Using Jasper from Java may require that DYLD LIBRARY PATH be set up so that Java can find the SICStus runtime library That is you may need to set DYLD_ LIBRARY PATH to the location of the SICStus runtime libsprt4 3 0 dylib On OS X you can either use the legacy Java 6 from Apple or Java 7 or later from http java sun com On OS X embedding Java 7 or later in SICStus e g by using library jasper may fail possibly with a dialog about the need for a Java SE 6 runtime This seems to be caused by missing information in the sec tion JVMCapabilities of the file Info plist in the Java installation As of April 2014 there were no official information from Oracle about this but several suggested workaround can be found on the net 8 2 Getting Started
32. ally be told to maintain arc consistency This function ality subsumes knapsack 3 global cardinality 2 3 can optionally be told to use a simple algorithm This functionality subsumes count 4 fd copy term 3 is gone Subsumed by built in copy term 3 The Jasper module is available in the current release An alternative for Java users is PrologBeans The latter is the recommended method for interfacing Java with SICStus Jasper should only be used when PrologBeans is insufficient The native release 4 counterpart has a modified richer API Also available is a deprecated compatibility module library lists3 As in release 3 plus several new predicates The native release 4 counterpart has a modified richer API Also available is a deprecated compatibility module library queues3 The native release 4 counterpart has a modified richer API Also available is a deprecated compatibility module library random3 Please note The random number generator state is slightly different from the one in release 3 The new predicate socket_client_open 3 subsumes socket 2 and socket_ connect 3 Socket server open 2 3 subsumes socket 2 socket bind 2 and Socket listen 2 Socket select 7 can wait for any kind of stream not just socket streams Socket select 7 waits until one unit character for text streams byte for binary streams can be transferred Socket select 7 can wait for streams ready to write Socket select 7 does not c
33. ant 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 Section Debugging Runtime Systems in the SICStus Prolog Manual 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 Section stream_ property 2 in the SICStus Prolog Manual CLPFD The case 3 4 constraint has been extended to take linear inequalities into ac count in addition to the DAG he new constraint smt 1 provides a front end to the extended case 3 4 con straint 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 c1ose 1 can now close both result sets and
34. any bindings made by the goal are lost close 2 Takes new options direction 1 Specifies which directions to close open 4 The wcx 1 option has been dropped Takes several new options See Section open 4 in the SICStus Prolog Manual absolute file name 2 3 The ignore underscores 1 option has been dropped The file type 1 op tion value q1 has been dropped whereas the option value executable is new The access 1 option values execute executable and search are new The glob 1 option is new allowing to match file names against a pattern If avail able the load context directory prolog load context 2 will be used as de fault directory load files 2 The load_type 1 option value ql has been dropped encoding signature 1 encoding 1 subsuming the wcx 1 option of release 3 and eol 1 are new options corresponding to the respective stream properties write term 3 The quoted charset 1 option is new reflecting the value of the Prolog flag with the same name Chapter 13 Revision History 29 halt 1 The predicate halt 1 now raises an internal exception like halt 0 This gives surrounding Prolog and C code an opportunity to perform cleanup append 3 member 2 memberchk 2 These are now built in they used to reside in library lists 13 1 2 10 Hook Predicates The hook user term_expansion 2 4 is replaced by the hook user term_expansion Term1 Layouti Tokens Term2 Layout2 Token Tokens The purpose of th
35. ceout not supported see Section 13 1 3 Library Modules page 29 The Visual Basic 6 module vbsp is not supported see Section 13 1 3 Library Modules page 29 The Windows GUI spwin exe does not support full Unicode The console version sicstus exe fully supports Unicode when run from a console window or from within SPI DER or Emacs The Emacs mode may not work reliably when passing Prolog code between Emacs and SICStus if the code is not written using Latin 1 13 4 Changes Introduced in Version 4 0 1 13 4 1 New Features Chapter 13 Revision History 38 13 4 2 Bugs Fixed Spurious SPIO_E_ERROR exceptions when interrupting Prolog Most often seen when using library timeout or when using C at the top level prompt Inconsistent error messages if the license information was missing or incomplete library fdbg inconsistent trace messages for labeling steps library clpfd error handling for user defined global constraint actions Source info of interpreted clauses Memory management issue with garbage collection pending unblocked goals CHR debugging and tracing did not work 13 4 3 Other Changes Compatibility issue The two Latin 1 character codes Ox00AA FEMININE ORDINAL INDICATOR and OxOOBA MASCULINE ORDINAL INDICATOR are now classified as lower case letters by the Prolog parser They used to be incorrectly classified as symbol chars This may affect code that used any of these characters in unquoted atoms or f
36. cially useful when using the symbolic name path 1 to specify a file library av1 Bug in avl_delete 4 library random Document and check validity of the random number generator state Bug in random nunlist 4 get atts 2 Could fail incorrectly library clpfd A memory management problem An integer overflow problem Propagation bug in case 3 4 affecting automaton 8 too A problem with shared subterms in copying asserting collecting and throwing terms The Prolog flag title was truncated by spwin exe under Windows The spdet utility did not automatically add pl and pro extensions to file name arguments 13 5 3 Other Changes library clpfd minor efficiency issues The user error stream is always unbuffered even when not attached to a terminal Chapter 13 Revision History 40 Improved detection of the executable file property under Windows e g in absolute file name 3 and process create 2 3 The Prolog flag title is now saved by set prolog flag title on all platforms It used to be ignored except under Windows 13 5 4 Known Issues The following are known issues with this release of SICStus See Section 13 3 Limitations in the Current Release page 37 for more information about missing or incomplete features in this release SICStus Prolog does not verify that Prolog text is in Unicode NFC format When reading terms SICStus Prolog currently does not verify that the input tex
37. cs interface 12 1 1 Installing On Line Documentation It is possible to look up the documentation for any built in or library predicate from within Emacs using C c or the menu For this to work Emacs must be told about the location of the info files that make up the documentation If you load the file sicstus_emacs_init el from your emacs file Emacs should be able to find the SICStus documentation automatically see Section Installation in the SICStus Prolog Manual Chapter 13 Revision History 24 13 Revision History This chapter summarizes the changes in release 4 wrt previous SICStus Prolog releases as well as changes introduced by patch releases 13 1 What Is New In Release 4 13 1 1 Virtual Machine e The internal representation of Prolog terms and code has been redesigned resulting in code that runs up to twice as fast as in release 3 e Certain memory limitations that existed in release 3 have been dropped All available virtual memory can be used without any limitations imposed by SICStus Prolog e The limitations on temporary and permanent variables for compiled clauses have been dropped There is no size limit on compiled clauses e The number of available atoms is four times larger than in release 3 1M atoms are available on 32 bit platforms e The range of small integers is eight times larger than in release 3 Although the size of integers is unbounded small integers are hand
38. cstus this should happen au tomatically if the third party products have been installed in the standard locations see Section 9 2 Berkeley DB on Mac OS X page 19 Sometimes the default limit on the process s data segment is unreasonably small which may lead to unexpected memory allocation failures To check this limit do bash ulimit d 6144 This indicates that the maximum size of the data segment is only 6 Mb To remove the limit do bash ulimit d unlimited bash ulimit d unlimited Chapter 3 Release Notes and Installation Guide for UNIX 5 Please note ulimit is a shell built in in bash It may have a different name in other shells SICStus will set the data segment size of itself according to the value of the system property or environment variable SP ULIMIT DATA SEGMENT SIZE If you set this variable in the initialization file for your shell you don t have to use the ulimit command when SICStus is started from the shell See Section System Properties and Environment Variables in the SICStus Prolog Man ual for more information about SP ULIMIT DATA SEGMENT SIZE This system property is set automatically when SICStus is invoked from the SICStus Prolog IDE SPIDER from Emacs via M x run prolog or from the launcher script SICStus Prolog 4 3 0 term installed in Applications File names are encoded in UTF 8 under Mac OS X This is handled correctly by SICStus If SICStus encounters a file name t
39. e Microsoft Visual Studio tools see Section Setting up the C compiler on Windows in the SICStus Prolog Manual for details To use the respective library modules you must also include the paths to Tcl Tk see Chapter 7 Tcl Tk Notes page 13 and Berkeley DB see Chapter 9 Berkeley DB Notes page 19 onto the PATH environment variable if the installer for Berkeley DB and Tcl Tk have not done so already 4 1 Requirements e Operating environment Microsoft Windows XP SP3 Vista SP2 Windows 7 or Win dows 8 including x64 but not IA64 versions Windows Vista or later is recommended e For interfacing with C or C or for using spld or splfr C compiler and related tools from Microsoft Visual Studio T he version of Visual Studio should match the version used when building SICStus Prolog For this reason a number of variants of SICStus Prolog is released each built with a separate version of Visual Studio Microsoft offers free editions of Visual Studio and its C compilers It is probably possible to make these work as well but they may require other tools or downloads e Flor distributing products incorporating SICStus Prolog runtime systems SICStus Pro log depends on the C runtime library corresponding to the C compiler used when building SICStus Prolog There are several alternative ways to have your installer install the Microsoft C libraries See the Microsoft documentation for details or contact SICStus Support Building in
40. e file was created Emacs Issues Running under Emacs has been tried with recent versions of GNU Emacs See Chapter 12 The Emacs Interface page 23 Choosing Send EOF from the menu i e comint send eof closes the connection to the SICStus process This will cause SICStus to exit This problem cannot be fixed in SICStus it is a limitation of current versions of FSF Emacs and XEmacs at least up to FSF Emacs 20 7 and XEmacs 21 5 Instead of sending and end of file you can enter the atom end of file followed by a period Under Windows statistics runtime measures user time of the thread running SICStus the main thread instead of process user time This makes statistics runtime meaningful also in a multi threaded program Chapter 5 Special Releases 10 5 Special Releases Sometimes SICStus Prolog is built for special purposes or special platforms These releases may have restrictions in functionality licensing etc The most common case is when a beta version of SICStus Prolog is released 5 1 Beta Releases Note this information only applies to beta releases Most users never encounter a beta release and can safely ignore this section A beta release should not be used for critical work In most cases it has not been extensively tested and may have known problems Don t assume that the performance of a beta release will correspond to the performance of the final versions Most beta releases contain ru
41. e new argument Tokens is to support multiple independent expansion rules The purpose of the arguments Layoutl and Layout2 is to support source linked debugging of term expanded code Each expansion rule should have its unique identifying token Token The hook user goal expansion 3 is replaced by the following per module hook M goal expansion Termi Layout1 Module Term2 Layout2 Typically Module has imported the predicate Term1 from module M The purpose of the arguments Layoutl and Layout2 is to support source linked debugging of goal expanded code 13 1 3 Library Modules There is no consensus for a core library portable across Prolog systems let alone a standard for such a library Since release 3 SICS has acquired Quintus Prolog which has a rather rich library For release 4 we have decided to make this asset be available to the SICStus community by providing a library that is a merger of the previous SICStus and Quintus libraries which already overlap significantly The User s Manual documents the library of release 4 For the purposes of aiding code transition to release 4 the following is a list of the release 3 library modules and their fate in release 4 See also Section 13 2 Guide to Porting Code from Release 3 page 35 Chapter 13 Revision History 30 atts comclient fdbg gauge heaps linda client linda server pillow prologbeans tcltk timeout trees wgraphs xml As in release 3 arrays The
42. e variables than in earlier releases Generic runtime systems are now available on all platforms not only on Windows See Section Generic Runtime Systems in the SICStus Prolog Manual for details e 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 e Improved performance on Linux Intel 32 and 64 bits e Coverage analysis is now available for compiled as well as interpreted code It uses the same infrastructure as execution profiling Chapter 13 Revision History 57 Code coverage can be reported textually in a hierarchical format or alternatively by highlighting the relev
43. e_sicstus4 0_x86 win32 nt 4 permanent a111 b222 c333 d444 e444 LICENSE END This file can be located anywhere e g in the folder containing your source code e Building an Extended Runtime System using spld which embeds license information from the above file spld E license file extended license pl This will read the license information and embed the information in the created ex ecutable No separate license file will be needed at runtime This is the preferred method This method can be used also to create an all in one executable see Section All in one Executables in the SICStus Prolog Manual On UNIX platforms it is possible to install the license information using the sp1m tool so that you don t need create the file extended license pl and pass it to spld How ever a separate license file may be needed anyway if the license cannot be embedded see below e Building an Extended Runtime System which does not embed license information The resulting runtime system will need a way to find the license file at runtime This variant is useful when the executable is not built with spld e g when builing a DLL Windows or DSO UNIX spld E no embed license Chapter 6 Managing Extended Runtime License Information 12 The resulting executable will produce output similar to the following if it cannot find the license file License error License file not found e Ensuring that
44. ee http www sicstus se for an up to date list SICStus has at one time or another been ported to many platforms ranging from mobile phones to mainframes If your platform is not currently listed on the download page please let us know sicstus request sics se Chapter 3 Release Notes and Installation Guide for UNIX 3 3 Release Notes and Installation Guide for UNIX This chapter assumes that the environment variable PATH includes lt prefix gt bin where lt prefix gt points to the SICStus installation directory The installation directory is specified during installation see Section 3 1 UNIX installation page 3 For example csh tcsh gt setenv PATH usr local sicstus4 3 0 bin PATH sh bash ksh gt export PATH usr local sicstus4 3 0 bin PATH 3 1 Installation Installation of SICStus under UNIX is performed by an installation Shell script InstallSICStus which interacts with the user to obtain options such as where to install SICStus 3 1 1 Prerequisites 3 1 1 1 C Compiler and Linker A full SICStus installation requires a C compiler and a linker to perform final link steps on the installation machine For Solaris you can download the Sun Studio C compiler from http developers sun com For Mac OS X you can down load Xcode which contains a C compiler from http developer apple com Linux distributions typically has a C compiler installed or installable through the system software update utility I
45. enerally strive for backward compatibility we may have to make incompatible changes to library odbc in order to accommodate necessary improvements library odbc is currently supported on MS Windows Mac OS X and Linux 10 1 ODBC on MS Windows ODBC is a standard component of MS Windows You only need to install the DBMS specific ODBC drivers Please refer to the ODBC documentation for MS Windows and the ODBC documentation of your DBMS vendor 10 2 ODBC on Mac OS X ODBC is a standard component of Mac OS X You only need to install the DBMS specific ODBC drivers Please refer to the ODBC documentation for Mac OS X and the ODBC documentation of your DBMS vendor The ODBC library library odbc crashes on Mac OS X 10 5 The underlying cause seems to be bugs in the ODBC software 10ODBC 3 52 5 that comes with Mac OS X 10 5 The version of ODBC iODBC 3 52 6 that comes with Mac OS X 10 6 does not seem to have this problem It may be possible to obtain a newer version of the ODBC software at http www iodbc org 10 3 ODBC on Linux library odbc was built with unixODBC unixODBC is an installable package on many Linux distributions and can also be downloaded from http www unixodbc org You will also need to install the DBMS specific ODBC drivers Chapter 11 The SICStus Prolog IDE SPIDER 22 11 The SICStus Prolog IDE SPIDER SICStus Prolog IDE also known as SPIDER is an Eclipse based development environment for SICStus w
46. ength of text data have been removed The SQL null value is now supported as parameter to queries and is represented as the atom null Please note this is an incompatible change for string parame ters When passing string parameters to odbc query execute sq1 3 5 using Chapter 13 Revision History 62 atoms the atom null used to be treated as the four character string consisting of the characters n u 1 and 1 but it is now treated as a SQL null value A workaround is to always pass strings as lists of character codes which also works in older versions of SICStus or as a list of atoms which only works in SICStus 4 2 2 and later 13 18 2 Bugs Fixed Terms containing a hash mark was not transmitted correctly to the SICStus Prolog IDE SPIDER This affected the SPIDER debugger view among other things Several built in predicates did not handle constrained output variables correctly e g atom length 2 char code 2 atom concat 3 sub atom 5 Fix variable binding display bug when inside disjunctions and do loops Prevent state corruption upon out of memory exception in certain contexts library random random L L X would succeed with X L instead of failing queues singleton queue 2 returned the wrong term CLPFD Performance bug in special cases of case 3 4 table 2 3 bug with inf sup in binary relations 13 18 3 Other Changes SICStus Prolog is now available for 64 bit x86_64 W
47. ently failed in this case The system property SP_ALLOW_CHDIR could not be set using the environment variable of the same name The spld tool would ignore the namebase argument for some generated files CLPFD Dangling pointer hazard fixed for domain variables with frozen goals Missing propagation problems fixed sorting 3 could fall into infinite loop Indexical compilation problems fixed CLPQ CLPR called the undefined predicate C 3 library terms bugs in sub_term 2 term_variables 2 subsumeschk 2 and friends Improvements in how library linda server and library linda client handle server shutdown The server will stop listening for new connections as soon as it receives a shutdown request from a client Among other things this makes the socket port available for re use on the same machine A call to linda client shutdown server 0 in the client will not return until the server has acknowledged the command This removes a race condition when the client attempts to re connect to the server A number of problems in library odbc has been fixed There are also some new features and other changes see above 13 16 3 Other Changes Windows 2000 is no longer supported for it is no longer supported by Microsoft The limitations on temporary and permanent variables for compiled clauses have been dropped There is no size limit on compiled clauses PO files and saved states are
48. er The prompt written to user_error would sometimes appear out of order wrt output to other interactive streams Module name expansion of clauses was not robust to incorrect layout terms Format strings with t not followed by tab stop would raise an instantiation error Dead code elimination could interfere with garbage collection Detection of redundant declarations is more precise A performance issue on the Windows platform has been fixed Typo in Section The Action Variables in the SICStus Prolog Manual exception E should read raise E Float to big integer conversion bug on 64 bit platforms Better handling of do loops whose iterators are not instantiated enough at compile time The virtual clauses beginning_of_file and end_of_file are now seen by term ex pansions only for source files but not for files embedded by the include directive predicate_property 2 with nonvar arguments would succeed nondeterminately Term List could raise spurious errors instead of merely failing Stack overflow issue with pending unblocked goals Saved states would not preserve the attribute handler order Source info bug for huge interpreted clauses On Windows only writing large amounts of data to the Windows console could fail with SPIO_E_IO_ERROR library between between 3 was not steadfast for constrained variables Exceptions used internally by library timeout can be intercepted by the debugger again The
49. ever blocks Instead it will fail i e behave as if the stream is not at its end if the operation would otherwise block See Section at end of stream 0 1 in the SICStus Prolog Manual 13 1 5 Foreign Language APIs 13 1 5 1 Foreign Language Interface The conversion specifier in foreign 2 3 facts string N has been dropped The conversion specifier chars has been renamed to codes in analogy with the built in predicate atom codes 2 the second argument of which is a list of character codes The C header generated by splfr from the foreign 2 3 facts now uses the const at tribute where appopriate Chapter 13 Revision History 34 Foreign resources are no longer unloaded by save_program 1 2 For this reason the deinit function of a foreign resource is no longer called when saving a program so SP_WHEN_ SAVE has been removed 13 1 5 2 C API Functions Many functions in the C API has been changed or removed especially those related to OS and I O operations There are also a number of new C API functions Old API SP make stream SP make stream context SP set tty SP fgetc SP fputc SP fputs SP fflush SP chdir SP getcwd SP set wcx hooks SP wcx getc SP wcx putc SP to os SP from os SP put number chars SP get number chars Other new functions include SP get stream user data SP get stream counts SP put bytes SP fopen Replaced by SP create stream SP CREATE STREAM
50. ew operators had non ISO mode operator declarations This has been corrected to match the documentation the ISO Prolog standard and the ISO language mode in SICStus Prolog 3 See Section Built in Operators in the SICStus Prolog Manual Please note This is an incompatible change that may cause a Prolog program or data to be parsed differently or not at all However in practice we expect this to affect little or no code Data written using write canonical 1 2 or similar will not be affected and will be read back correctly regardless of operator declarations To preserve the old incorrect operator declarations insert the following at the top of your Prolog files s op 500 fx op 300 xfx mod rem To ensure that the new correct operator declarations are in effect also in releases predating 4 0 4 insert the following at the top of your Prolog files please note this documentation was updated after 4 0 4 to correct the associativity of op 200 fy op 400 yfx mod rem Chapter 13 Revision History 43 13 7 3 Other Changes 13 7 4 Known Issues The following are known issues with this release of SICStus See Section 13 3 Limitations in the Current Release page 37 for more information about missing or incomplete features in this release SICStus Prolog does not verify that Prolog text is in Unicode NFC format When reading terms SICStus Prolog currently does not verify that t
51. exist as shorthands for set_prolog_flag 2 with specific argu ments and so can be trivially replaced call_residue 2 Dropped because it was not possible to ensure the correct behavior in all cir cumstances it relied heavily on copying terms with attributed variables and it was not needed by any library module It has been replaced by a simi lar predicate call_residue_vars 2 which should suffice in most cases where call_residue 2 was used see below undo 1 Dropped because it was not possible to ensure the correct behavior in all cir cumstances Users that know what they are doing can still call the unsupported predicate prolog undo 1 The argument should have a module prefix help O version 0 version 1 These predicates managing and displaying messages can be easily emulated by feaures of the message system fcompile 1 load 1 These predicates used to compile Prolog source code into q1 files and load such files ql files serve a purpose when boot strapping the Prolog system but offer no advantages over po files the Prolog object code format used by other built in predicates load foreign files 2 This predicate provided a shorthand for building and loading a temporary for eign resource Working with foreign resources is straightforward and so the shorthand was dropped Chapter 13 Revision History 27 require 1 This predicate provided a shorthand for locating and loading library predicates This was or
52. f a C compiler is not available it is possible to use a pre built installation on some platforms If it is not enabled by default pre built installation is only recommended as a last resort it is available by invoking InstallSICStus with the prebuilt argument A disadvantage with the pre built installation is that SICStus libraries that interface to third party products Tcl Tk Berkeley DB Java may not work or may require environ ment variables such as LD_LIBRARY_PATH to be set Another disadvantage is that spld and splfr may not work unless you manually adjust the spld configure file Of course neither spld nor splfr will work anyway if you don t have a C compiler 3 1 2 The Installation Script Most users will install SICStus from a binary distribution These are available for all supported platforms Information on how to download and unpack the binary distribution is sent by email when ordering SICStus Binary distributions are installed by executing an interactive installation script called InstallSICStus Type InstallSICStus Chapter 3 Release Notes and Installation Guide for UNIX 4 and follow the instructions on the screen During installation you will be required to enter your site name and license code These are included in the download instructions The installation program does not only copy files to their destination it also performs final link steps for some of the executables and for the library mod
53. hat is not encoded in UTF 8 it will silently ignore the file or directory This can happen on file systems where files have been created by some other OS than Mac OS X e g on network file servers accessed by other UNIX flavors or Windows The default character encoding for the SICStus standard streams is based on the current locale which is POSIX C i e US ASCII by default on Mac OS X This will come in conflict with the default character encoding for the Termi nal application which is UTF 8 A clickable launcher for SICStus is optionally installed in the Applications folder This launcher will set the character en coding of the standard streams to UTF 8 for both the Terminal and SICStus The character encoding is set automatically when SICStus is invoked from the SICStus Prolog IDE SPIDER or from Emacs via M x run prolog Chapter 4 Release Notes and Installation Guide for Windows 6 4 Release Notes and Installation Guide for Windows This chapter assumes that the environment variable PATH includes 4SP PATH Nbin where SP_PATH points to the SICS tus installation directory typically C Program Files SICStus Prolog 4 3 0 Here ASP PATHA is just a place holder you usually do not need to set the environment variable SP PATH but see Section CPL Notes in the SICStus Prolog Manual For example C gt set PATH C Program Files SICStus Prolog 4 3 0 bin 4PATHA To use splfr and spld you must also set up the appropriat
54. he input text contains valid Unicode 5 0 characters in Normal Form C See Section Syntax of Tokens as Character Strings in the SICStus Prolog Manual This is not a problem as long as the input is in the proper format but it will allow some input that may be rejected or interpreted differently in a future version of SICStus Prolog 13 8 Changes Introduced in Version 4 0 5 13 8 1 New Features library zinc Interpreters for the MiniZinc and FlatZinc combinatorial problem modeling languages being developed in the G12 project see http www g12 csse unimelb edu au library clpfd Revived deprecated constraints count 4 and relation 3 13 8 2 Bugs Fixed open 3 4 error handling Critical virtual machine bugs in floating point arithmetic Garbage collection now runs in constant space Opening a UNIX fifo or other non seekable file in text mode would not terminate until the other end closed the connection and then it would report a seek error The problem was with the read ahead needed to detect character encoding Non seekable files are now opened as if encoding_signature false were passed to open 4 Runtime systems generated by spld did not propagate exit code from halt 1 statistics 0 would sometimes report incorrect including negative program space breakdown for the miscellaneous and interpreted code categories SP_event handlers are no longer allowed to run during SP_exception_term or SP_deinitialize
55. here is no binary installer available for installing Berkeley DB on Mac OS X Instead you need to build it yourself To do this you need to download and install the Apple C compiler Xcode and then download build and install the Berkeley DB library using something like the following in the Terminal program 1 Unpack the downloaded source code archive At the time of writing 4 8 30 is the latest version of Berkeley DB 4 8 tar xzf db 4 8 30 tar gz 2 Move into the source code folder tree cd db 4 8 30 build unix 3 Configure Berkeley DB for both 32 bit and 64 bit dist configure LDFLAGS arch x86 64 arch 1386 CFLAGS arch x86 64 arch 1386 4 Build make 5 Install in the standard location sudo make install The installation step requires that you are running as an administrator and the sudo command will require that you provide the password Chapter 9 Berkeley DB Notes 20 6 Verify that Berkeley DB was installed usr local BerkeleyDB 4 8 db_archive V This should print some version information e g Berkeley DB 4 8 30 April 9 2010 Chapter 10 ODBC Notes 21 10 ODBC Notes ODBC Open Database Connectivity is a standard API for using a DBMS DataBase Management System By using ODBC you can access data from a multitude of DBMSs without having to know the details of each DBMS library odbc appeared in release 4 1 0 and we expect it to evolve and improve as we receive feedback from users While we g
56. iginally introduced for a compatibility reason that is now obsolete It is straightforward to provide the necessary use_module 2 directives and so the shorthand was dropped profile_data 4 profile_reset 1 As of release 4 2 the execution profiling technology has been reengineered eliminating the need to specially instrument code before it could be profiled The new scheme also keeps track of the number of calls per caller callee pair Execution profiling is available for compiled as well as interpreted code These two predicates have been replaced by a small number of new ones The following predicates have been added call N Generalizes call 1 For example call p 1 2 a b is equivalent to call p 1 2 a b Skip char 1 2 skip_code 1 2 skip_byte 1 2 ISO style replacements for the non ISO style skip 1 2 call_residue_vars 2 Called as follows call_residue_vars Goal Vars Executes the procedure call Goal unifying Vars with the list of residual vari ables that have blocked goals or attributes attached to them Please note behaves differently from call_residue 2 of release 3 copy_term 3 Called as follows copy_term Term Copy Body Unifies Copy with a copy of Term in which all variables have been replaced by brand new variables and all mutables by brand new mutables If Term contains variables with goals blocked on them or variables with attributes that can be interpreted as a goal see Section librar
57. ike this java Djava library path usr local sicstus4 3 0 lib Pod Under Windows Java must be able to find spnative d1ll through the PATH environment variable see Section 8 2 1 Windows page 14 Setting Djava library path under Windows can lead to problems if multiple versions of SICStus have been installed If this works properly SICStus should have been loaded into the JVM address space If everything is set up correctly you should be able to call main which contains a short piece of test code in the SICStus root class something like this java Djava library path usr local sicstus4 3 0 lib classpath usr local sicstus4 3 0 lib sicstus 4 3 0 bin jasper jar V se sics jasper SICStus Trying to load SICStus If you see this message you have successfully initialized the SICStus Prolog engine Under Windows it would look something like this depending on the shell used java classpath C Program Files SICStus Prolog 4 3 0 bin jasper jar se sics jasper SICStus Trying to load SICStus If you see this message you have successfully initialized the SICStus Prolog engine If more than one se sics jasper SICStus instance will be created the SICStus runtimes named e g sprt4 3 0 instance 01 d11 need to be available as well See Section Run time Systems on Target Machines in the SICStus Prolog Manual Chapter 8 Jasper Notes 17 8 3 Jasper Package Options The following Java system pr
58. ill remain compiled if it was originally compiled and the compiler is available Otherwise it will be interpreted 6 Furthermore in runtime systems with no compiler available if source code clauses are loaded into an existing compiled predicate the predicate will become interpreted e CLPFD full answer O is volatile automaton 9 takes a new option that provides access to the sequence of counter values lex chain 2 takes a new option that enables a more aggressive algorithm fd_batch 1 is a new exported predicate that posts a set of constraints with prop agation suspended until the whole set has been posted Performance improvements in 2 linear arithmetic Booleans membership oper ations New example models Balanced Academic Curriculum Problem Wolf Goat and Cabbage Problem Black Hole Patience Game Open Stacks Problem e ZINC SICStus Prolog has been brought up to date with MiniZinc version 1 4 he default search heuristic has been changed to first fail domain splitting Native support for the following global constraints has been added among bin packing bin packing capa bin packing load count distribute lex greater lex greatereq regular sliding sum value precede value precede chain Chapter 13 Revision History 60 13 17 2 Bugs Fixed restore 1 would behave inconsistently if invoked while loading files Nondet user portray 1 would switch off the debugg
59. in the Current Release page 37 for more information about missing or incomplete features in this release e SICStus Prolog does not verify that Prolog text is in Unicode NFC format When reading terms SICStus Prolog currently does not verify that the input text contains valid Unicode 5 0 characters in Normal Form C See Section Syntax of Tokens as Character Strings in the SICStus Prolog Manual This is not a problem as long as the input is in the proper format but it will allow some input that may be rejected or interpreted differently in a future version of SICStus Prolog 13 7 Changes Introduced in Version 4 0 4 13 7 1 New Features 13 7 2 Bugs Fixed e On Windows the result of absolute_file_name 2 3 would contain backslash instead of forward slash if the absolute file name contained certain non ASCII characters This bug also broke all directory listing functions in library file systems e g file systems file member of directory 2 3 4 e A change in 4 0 3 caused system3 popen 3 system3 shell 1 2 and system3 system 1 2 to no longer work when the command string contains redi rection and other special constructs These predicates now always invoke the system shell e A change in 4 0 3 caused library sockets to not accept a lone port number as an address A port number Port is now treated the same as inet Port as in earlier releases This also broke prologbeans start 0 1 when no port was specified e A f
60. indows The C API including the foreign language interface now uses the type SP integer in all places where it used to use the type long int This is a compatible change On all platforms available in SICStus Prolog 4 2 1 the two types are identical The types only differ on 64 bit Windows As part of this change several printf conversion specifiers are defined as C macros to allow platform independent printing of the types SP integer SP uinteger and Size t See SPRIdINTEGER et al in the sicstus h header 13 18 4 Known Issues The following are known issues with this release of SICStus See Section 13 3 Limitations in the Current Release page 37 for more information about missing or incomplete features in this release SICStus Prolog does not verify that Prolog text is in Unicode NFC format When reading terms SICStus Prolog currently does not verify that the input text contains valid Unicode 5 0 characters in Normal Form C See Section Syntax of Tokens as Character Strings in the SICStus Prolog Manual This is not a problem as long as the input is in the proper format but it will accept some input that may be rejected or interpreted differently in a future version of SICStus Prolog Chapter 13 Revision History 63 13 19 Changes Introduced in Version 4 2 3 Please note Version 4 2 2 was never made generally available so if you are upgrading from 4 2 1 see also Section 13 18 4 2 2 Changes page 61 In particula
61. ine a ers EDS each deans 51 I3 I2 4 I amp rioWti ISSUES 5 be cee rem meet t Phe dre mre PRI 52 13 13 Changes Introduced in Version 4 1 1 uuuuleeessssssn 53 13 131 Bugs Fixed ici ietia d witha an aust hoon ne du totem rd sera 53 13 13 2 Kmownilssues eI eese e meer eer IER E RR RA 53 13 14 Changes Introduced in Version 4 1 2 0 cee eee eee 53 13 141 Bugs Fixed 2 222 assidue er rhe etc dotes eR c Rosa 53 13 14 2 Other Changes 0 0 cece eee eh 54 13 143 ICriowti ISSUES 4 o reteteet trt ha recipere eee are 54 13 15 Changes Introduced in Version 4 1 3 0 00 ccc cece 54 lool New BeAat b s4 ussees tot deste dete is einer Wate ta it ecce e ee 54 13 15 2 Bugs Fixed iioc Rete eere eene a 55 iii 14 15 13 15 38 Other Changes ics ir Ebert esas deans 55 13 15 4 EKriowmn 8868 5 rs zecc b eed RPHRER ERCOI eee ERAN 55 13 16 Changes Introduced in Version 4 2 0 0 00sec eee eee 56 13 16 1 New Features 0 cee sdi hh 56 13 16 2 B gs Fixed iicet ettet deg ee 57 13 16 3 Other Chanpes s e cia cere tee wneed ceed seeatas rows 58 13 164 KGW 8806845 iii obe t Sead bela eae dom Cre pcne ames 59 13 17 Changes Introduced in Version 4 2 1 iiuuulelssssssn 59 13471 New BeaturesS eve RE BEER RE ae dba ee Eee Ss 59 13 05 2 Bigs EJxed ius icto reiten rate ye REOR Rd 60 13 17 3 Other Changes 0 2 cece cece e cnet e ne eees 61 EAE Iuown S8868 22 x ernele rS RR RR Y rere
62. ion of SICStus Prolog 13 5 Changes Introduced in Version 4 0 2 Chapter 13 Revision History 39 13 5 1 New Features Added support for ISO 8859 2 a k a Latin 2 absolute_file_name 3 new option file_type executable expands to extensions exe on Windows and to extensions on other systems 13 5 2 Bugs Fixed Memory manager efficiency bug library structs unsigned types 64 bit issues PrologBeans Lists of integers with element values above 255 broke the communication between Java and SICStus Closing a stream would sometimes hang due to a race condition on UNIX like platforms This was most likely to happen on MacOS X set_stream_position 2 and seek 4 did not work on output streams Multiple issues with absolute_file_name 3 Option file_errors fail would sometimes report permission errors SPIO_E_ PERMISSION_ERROR instead of silently failing Option file_errors fail now fails instead of raising an exception for file name domain errors like malformed file names and too many symbolic links SPIO_E_ INVALID NAME Options access execute and access search now imply access exist This is similar to how access read works The undocumented internal option access directory was allowed Use file type directory instead library process process create 2 3 now skips non executable file and non files if the File argument can expand to more than one file This is espe
63. ions PL Prior to release 4 3 the extensions 1 and glob 1 options were case sensitive on all platforms e On Windows open 3 4 and other built in predicates that creates files and directo ries no longer applies case normalization on the file name before creating a file This means that open 3 4 creates files using the same character case as specified in the file argument The stream property file name 1 is not affected i e it still shows a case normalized name This change is mostly invisible from Prolog but it means that creating a file with open HelloWorld txt write S will now create file named HelloWorld txt whereas earlier releases would create a file helloworld txt e library types Goal and Arity arguments are now checked e Jasper Java 6 e g JDK 1 6 or later is required for all Java code e Jasper On OS X the file suffix for the SICStus Java Native Library has changed from jnilib to dylib for compatibility with Java 8 e library lists is list 1 and proper length 2 now fail for cyclic lists They used to not terminate e CLPFD Some options of table 3 and case 4 have gone obsolete Machine capacities of cumulatives 3 do not need to be fixed e ZINC The Flatzinc parser is significantly faster and solving is often faster too Several search options now have support in C e The unsupported library tkconsole and tcltk tk_terminal 5 has been ported from SICStus 3 to SICStus 4
64. ith many powerful features SPIDER is meant to eventually replace the Emacs interface and the Windows spwin exe program as the main development environment for SICStus Prolog SPIDER was initially made available with release 4 1 0 See Section SICStus Prolog IDE in the SICStus Prolog Manual for more information and links Chapter 12 The Emacs Interface 23 12 The Emacs Interface The Emacs Interface was originally developed for GNU Emacs 19 34 and is presently being maintained using GNU Emacs For best performance and compatibility and to enable all features we recommend that the latest versions of GNU Emacs be used For information on obtaining GNU Emacs see http www gnu org software emacs 12 1 Installation The Emacs interface is distributed with SICStus and installed by default The default in stallation location for the Emacs files is lt prefix gt lib sicstus 4 3 0 emacs on UNIX platforms and C Program Files SICStus Prolog 4 3 0 emacs under Windows For maximum performance the Emacs Lisp files extension e1 should be compiled This completely optional step can be done from within Emacs with the command M x byte compile file See Section Installation in the SICStus Prolog Manual The easiest way to configure the Emacs interface is to load the file sicstus_emacs_init el from your emacs file It will find the SICStus executable and do all initialization needed to use the SICStus Ema
65. l 3 and friends and raised as exceptions The copy would contain new attributed variables with the attributes copied This operation could be Chapter 13 Revision History 25 very expensive could yield unexpected results and was not always safe e g in the context of CLPFD constraints In release 4 the semantics of this operation has changed in the copy an attributed variable is simply replaced by a plain brand new variable Of course if the same attributed variable occurs more than once the same plain variable will occur in the corresponding places in the copy If the attributes are relevant the program can obtain them by using the new built in predicate copy_term 3 described below 13 1 2 4 Arithmetic The infix operator bitwise exclusive or has been renamed to 13 1 2 5 Syntax Atoms can now contain the NUL character i e character code zero It is classified as whitespace and must therefore be entered using escapes As an example a 0 a is a three character atom containing two as separated by a NUL Internally atom names and other encoded strings use the non shortest form OxCO 0x80 to encode NUL This is similar to how NUL is handled by Tcl Tk and Java 13 1 2 6 Prolog Flags The language and wcx Prolog flag have been dropped The profiledcode value of the compiling Prolog flag has been dropped Several new Prolog flags have been added See Section Prolog Flags in the SICStus Prolog Manual 1
66. led more efficiently than other numbers e Multifile predicates are compiled by default in release 3 they could not be compiled e Native code compilation has been dropped e Execution profiling is available for compiled as well as interpreted code The profiling data accessible by profile_data 1 and library gauge is more precise Some of the choices of release 3 have been dropped e Execution profiling has been generalized to support coverage analysis for compiled as well as interpreted code 13 1 2 Prolog Language 13 1 2 1 Single Language Mode Release 3 had the notion of multiple language modes iso and sicstus Release 4 does not have this notion The syntax and semantics of the Prolog language correspond to the previous iso language mode 13 1 2 2 DCG Notation The exact rules for translating DCG rules to plain Prolog clauses have not been laid down in a standard but there is a broad consensus in the Prolog community about what they should mean One of the guiding principles is that the translation should be steadfast in particular that the translated code should always treat its last argument as an output argument and not use it too early In some cases a non steadfast translation was produced in release 3 This has been corrected in release 4 13 1 2 3 Asserting Terms with Attributed Variables In release 3 terms containing attributed variables and blocked goals could be asserted copied gathered as solutions to findal
67. mpilation platform data os data make it easier to determine on which operating system SICStus is running min tagged integer max tagged integer The range of small integers argv Not a new flag but is no longer read only Setting it can be useful e g in test cases e Added stream property interactive for interactive streams like the standard input and output streams when invoking SICStus on a terminal or with the i command line option Chapter 13 Revision History 49 Meta predicate declarations now allow an integer instead of colon in order to help analysis tools follow code references All documentation and libraries have been up dated to reflect this This was always allowed in SICStus as a substitute for colon but was never documented Compound terms denoting references to dynamic clauses are recognized by the new built in predicate db reference 1 The previously reserved argument to SP initialize can now be used to pass ini tialization options Saved states and po files are portable across architectures that have the same word size Pre 4 1 sav and po files are not compatible with this and future releases Several new statistics keywords are available Also statistics 0 now resets the time spent since the latest call counters library odbc is a new ODBC library for interfacing with databases ODBC Open Database Connectivity is a standard API for using a DBMS DataBase Management S
68. ms only The locale can also be passed as an argument to spld objects is a new splfr option which you must use if the Prolog source code uses library objects 13 20 2 Bugs Fixed Compiler bug surfaced for example for r b Y b t X Y Error handling bug in floating point overflows caused a spurious memory resource errors b different interpreted and compiled behavior SP printf stopped working if the output exceeded 2048 bytes Unintended limitation max 100 million interpreted clauses in memory lifted predicate property 2 with nonvar second argument would lose solutions add breakpoint 2 warns if an undefined predicate is specified it used to silently accept any well formed predicate identifier length 2 used to loop if first argument cyclic or second argument very large Con formance with proposed future ISO standard Chapter 13 Revision History 66 e when 2 could cause stack overflow e Declarations are silently ignored if they would have no effect e File Files now uses the calling module context for the second Files argument as documented e ensure loaded 1 would keep reloading non module po files whose name did not correspond to an existing source file e stream property S encoding CS would succeed twice for bi directional text streams It now succeeds at most once and the per direction encoding information can be obtained with the new stream properties input encoding 1 and outpu
69. nground Chapter 13 Revision History 45 term hash 2 4 has been changed to use a better hash function by default The new hash function gives fewer collisions in general and gives the same value on all platforms Please note The change of hash function is an incompatible change that may affect programs or data that depend on the old hash algorithm The old behavior can be obtained as follows 4 Pre 4 0 5 version term hash 4 O A Term Hash term hash Term algorithm sicstus 4 0 4 Hash term hash 4 O 4 Term Depth Range Value term hash Term algorithm sicstus 4 0 4 depth Depth range Range Hash e library debugger examples updated e Extended Runtime systems a separate product adding the compiler to runtime sys tems now require a license at runtime By default spld will embed the license into the executable e The hook user error exception 1 is now called with the exception term specified by ISO Prolog i e the same term that is seen by catch 3 and on exception 3 It used to be called with an internal representation of the exception This affects error exceptions i e those with functor error 2 The old pre 4 0 5 value passed to user error exception 1 is the second argument of the error 2 structure Please note This is an incompatible change Old code that uses user error_ exception 1 may need to be updated If the old code looked like hh Pre 4 0 5 version user error exception O0ld
70. now much smaller than in earlier releases The new features required changes to the PO file format PO files and saved states created by previous versions are not compatible with this version and vice versa The spld tool now defaults to moveable on Linux Mac OS X and Solaris This can be turned off with the new option no moveable Chapter 13 Revision History 59 13 16 4 Known Issues The following are known issues with this release of SICStus See Section 13 3 Limitations in the Current Release page 37 for more information about missing or incomplete features in this release e SICStus Prolog does not verify that Prolog text is in Unicode NFC format When reading terms SICStus Prolog currently does not verify that the input text contains valid Unicode 5 0 characters in Normal Form C See Section Syntax of Tokens as Character Strings in the SICStus Prolog Manual This is not a problem as long as the input is in the proper format but it will accept some input that may be rejected or interpreted differently in a future version of SICStus Prolog 13 17 Changes Introduced in Version 4 2 1 See Section 13 16 4 2 0 Changes page 56 for changes introduced in SICStus Prolog 4 2 13 17 1 New Features e Compiled clauses could previously not be loaded from a po file into an existing multifile interpreted predicate or vice versa This limitation has now been lifted After loading the po file the predicate w
71. ntax of Tokens as Character Strings in the SICStus Prolog Manual This is not a problem as long as the input is in the proper format but it will accept some input that may be rejected or interpreted differently in a future version of SICStus Prolog 13 15 Changes Introduced in Version 4 1 3 See Section 13 12 4 1 0 Changes page 48 for changes introduced in SICStus Prolog 4 1 13 15 1 New Features e library plunit provides a Prolog unit test framework e CLPFD automaton 9 takes several new options that allow capturing properties of the input string such as the number of occurrences of given patterns into domain variables A much more general syntax is allowed for clauses of the form Head Body which define dedicated propagators as indexicals In particular propositional combina tions of arithmetic constraints are allowed Chapter 13 Revision History 55 13 15 2 Bugs Fixed Critical virtual machine bugs Improvements to interrupt handling SP event O SP signal and related function ality When running under the SPIDER IDE I O operations could fail with SPIO E INTERRUPTED When running under the SPIDER IDE restore 1 would disrupt the debugging ses sion Linking with the SICStus runtime on Linux no longer marks the stack as executable This would prevent SICStus from starting on some versions of SE Linux Work around OS bugs on Mac OS X 10 5 Mac OS X 10 6 and Linux that would sometimes cause SICStu
72. ntime tests that will make the beta slower sometimes much slower than the final version Please report if any such test triggers Beta releases may also contain experimental performance improvements that could make the beta faster sometimes much faster than the final version Most beta releases are time limited and will cease to function about three month from release This is also true of any runtime systems built with the beta Chapter 6 Managing Extended Runtime License Information 11 6 Managing Extended Runtime License Information Extended runtime systems need to have a license available at runtime This license can be embedded in the extended runtime executable or located in a separate file The following describes the steps needed in order to enter the license information The example assumes that you are familiar with the procedure for building runtime systems See Section The Application Builder in the SICStus Prolog Manual for details Suppose that you have been provided with the following license information Your license information for platform gt extended_runtime_sicstus4 0_x86 win32 nt 4 is as follows Site name MySite License code alii b222 c333 d444 e444 Expiration date permanent Following is a list of common tasks e Making the license available to the development system Create a file extended license pl containing the following LICENSE BEGIN site MySite product extended_runtim
73. operties can be set to control some features of the Jasper package se sics jasper SICStus debugLevel This flag is unsupported You probably should not use it in production code It may be removed or change meaning in future releases An integer zero by default If larger than zero some debug info is output to System out Larger values produce more info The value of this flag can be set and read with SICStus setDebugLevel and SICStus debugLevel java Dse sics jasper SICStus debugLevel 1 or from Prolog jasper_initialize Dse sics jasper SICStus debugLevel 1 JVM 8 4 Multi Threading Some exceptions thrown in multi threaded mode may be removed in the future The user should never catch specific exceptions but instead catch instances of PrologException See Section 8 6 Known Bugs and Limitations page 17 for details on the limitations of multi threaded Jasper 8 5 Changes in Jasper from SICStus 3 e The deprecated predicates jasper call static 6 and jasper_call_instance 6 have been removed e SICStus 4 uses ISO syntax This may affect Java code that handles Prolog terms 8 6 Known Bugs and Limitations e Jasper cannot be used from within applets since Jasper relies on calling methods declared as native This is due to a security restriction enforced on applets by Java they are not allowed to call native code e Some uses of SPTerm will leak memory on the Prolog side This is not really a bug but ma
74. or 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 wait ing for a started process to terminate process process_create 2 3 now uses file type executable when resolv ing 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 platfor
75. or list and proper list now fail for cyclic lists Previously they did not terminate 13 19 3 Other Changes The built in predicate sort 2 is up to twice as fast compared to previous releases The built in predicates sort 2 and keysort 2 now terminate with an error if the first argument is a cyclic list Chapter 13 Revision History 64 13 19 4 Known Issues The following are known issues with this release of SICStus See Section 13 3 Limitations in the Current Release page 37 for more information about missing or incomplete features in this release e SICStus Prolog does not verify that Prolog text is in Unicode NFC format When reading terms SICStus Prolog currently does not verify that the input text contains valid Unicode 5 0 characters in Normal Form C See Section Syntax of Tokens as Character Strings in the SICStus Prolog Manual This is not a problem as long as the input is in the proper format but it will accept some input that may be rejected or interpreted differently in a future version of SICStus Prolog 13 20 Changes Introduced in Version 4 3 0 13 20 1 New Features e 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 This happens automatically by default but can be switched off with the option DSP_JIT disabled The following mutually exclusive
76. own ISSu S bee ertt ette me mb ree 42 13 7 Changes Introduced in Version 4 0 4 0000 cece eee 42 13 7 1 New Features iusso see eee her RECO SES I E 42 13 52 Bugs Fixed ose iere reb eher d Ratte 42 13 7 3 Other Changes eee RDRRKEPRS EET RET IEEE 43 I13 275 4 Ienown 88UeS 4 desi ttt eee eb up Roh Ro eee dons 43 13 8 Changes Introduced in Version 4 0 5 0 cece eens 43 13 8 1 New Features ceca e0sedd eens ginew hue ODE S nant 43 13 62 B gs Fixed scene E a tex eie iecore na 43 13 83 Other Changes sssssseessseeese e 44 13 84 Known 88068 a eret ro ete E E 46 13 9 Changes Introduced in Version 4 0 6 00 cece eee 46 13 10 Changes Introduced in Version 4 0 7 0000 cece eens 46 I3 10 1 New Beabtures en e rer n ete bares Febr aer 46 13 10 2 Bugs EIXGd iiis eset ehe bERENE ER DUI 46 13 10 9 Other Changes ioo nina Ernte Rt e tere dE 4T 13 10 4 Know S868 25cm e breeds d RAN 4T 13 11 Changes Introduced in Version 4 0 8 0000 cece eee eee 4T IS DLA New Oates aca tig ee ker eren RR orc etes 47 13 11 2 Bugs Eixed 2 ne caeedt a i eeni 4T 13 1L3 Other Changes cikszete rr Rer Re nrx ee ISD Ue E eee 4T KADR dEn wn 880684 E Sagano hn attt be ema ce hs 48 13 12 Changes Introduced in Version 4 1 0 000 cece eee eee 48 13 12 41 New Featu Les ceees kk eere eee oireet them des 48 13 12 2 Bugs EIxed cete ere RE EE RECS 49 13 12 39 Other Changes ais is pirm
77. prior to 4 3 except if the written term contains a prefix operator with a non negative number as argument Chapter 13 Revision History 68 is a new standard prefix operator declared as op 200 fy can now be declared as an operator The default when it has not been declared as an operator is to treat it like before i e as a synonym for the standard infix when used as an operator If is declared as an operator you can no longer use to denote disjunction in clause bodies and grammar rules So declaring as an operator is not recommended Please note A future version of the ISO Prolog standard is likely to define as an operator Arithmetic error handling is now conformant Previously in many cases a domain error would be thrown where an evaluation error was required Quoted atoms are no longer written with the non conformant escape sequences e and d They are still allowed when reading though Operators as immediate argument of an operator are now bracketed when written as required by the standard E g writeq outputs OO 0 clause 2 3 and retract 1 return a close equivalent to the asserted clause as re quired by the standard This also affects listing 0 1 The read_term 2 3 option singletons 1 is now conformant It now includes all named variables that occur only once in the read term as required by the standard It used to exclude some va
78. r version 4 2 2 introduced support for 64 bit Windows Version 4 2 3 introduces support for Mac OS X 10 8 in addition to some new features and bug fixes See Section 13 16 4 2 0 Changes page 56 for changes introduced in SICStus Prolog 4 2 13 19 1 New Features ZINC Now compatible with Version 1 6 of the G12 MiniZinc distribution The options fzn file File ozn file File optimise Bool optimize Bool are new Solutions are printed with solns2out 13 19 2 Bugs Fixed predicate property 2 with nonvar arguments would succeed nondeterminately ensure loaded 1 would keep reloading non module po file if compile time module was different from load time module Work around bugs in OS X 10 8 that affected SICStus I O This change may also work around bugs in Linux that could cause SICStus to hang especially when closing streams Error handling bug in phrase 2 3 On Windows SICStus executables would sometimes not start if put at the root of a disk CLPFD Solutions were lost in interaction with nondet suspended goals cumulative 2 holes in domains could cause wrong answers minimum 2 maximum 2 some data was not protected from garbage collection ZINC I O streams could be left open upon errors viz annotations don t cause parse errors any more Don t obfuscate error messages from mzn2fzn Architecture dependent default integer bounds library types The type tests f
79. r constraint are no longer suppressed Error in compile time error message library clpfd element 3 and cumulatives 2 3 could crash Bug in dom X dom Y in indexicals Structure sharing issues with fd_set 2 and in_set 2 in the global constraint API mod and rem are now available with the intended semantics Incorrect reification of arithmetic relations involving division mod and rem Variables not transferred correctly in the PrologBeans process communication protocol 13 6 3 Other Changes Output to different interactive output streams like user_output and user_error are now properly ordered If the standard OS streams cannot be used the SICStus runtime will use null streams instead of failing initialization Happened when started from recent Linux nohup com mand Under UNIX sicstus now interprets command line arguments using locale information the Windows version already did this Saved states invoked as shell scripts will now use a version specific name for the sicstus executable e g exec sicstus 4 0 3 instead of exec sicstus The spld tool now ignores the more memory option and no longer attempts to use a modified linker script on x86 Linux The splfr tool no longer uses a fixed name for some temporary files which prevented parallel make Chapter 13 Revision History 42 13 6 4 Known Issues The following are known issues with this release of SICStus See Section 13 3 Limitations
80. reate streams you need to explicitly use socket Server accept 4 Socket streams are binary by default Blocking socket operations can be interrupted on both UNIX and Windows library sockets should work with IPv6 in addition to IPv4 and AF UNIX Operations on files and directories have been moved to its own module library file systems Process primitives have been redesigned and moved to a new module library process The predicates for creating tempo rary files mktemp 2 and tmpnam 1 have been removed They used C li brary functionality that is broken by design and insecure Instead to cre ate and open a temporary file use something like open temp foo write Chapter 13 terms ugraphs objects chr flinkage spaceout vbsp Revision History 32 S if exists generate unique name possibly together with stream property S file name Path if you need to know the path to the generated file name The little remaining functionality is largely as in release 3 Also available is a deprecated compatibility module library system3 As in release 3 plus several new predicates term hash 2 is not guaranteed to compute the same hash values as in release 3 As in release 3 plus a couple of deletions Replaced by the Quintus Prolog flavor of library objects A reimplementation of library chr based on the Leuven implementation Not present in release 4 Not available in the current release Visual
81. riables for which singleton warnings should not be emitted e g _A Any such filtering must now be performed by the caller instead The read term 2 3 options variable names 1 and singletons 1 now order their entries by the order the variable occurred in the input term i e in the same order as the variables 1 option In previous releases the order was undefined and unpredictable The new ordering is permitted but not yet required by the standard The Prolog parser read_term 2 3 now correctly parses some valid input that used to give syntax error 66 Back quote can no longer be used for quoting atoms Use the standard conformant single quote instead The write term 2 3 option numbervars true also used by writeq 1 2 and others is now standard compliant and only affects terms VAR N when N is a non negative integer In particular it no longer does special processing when N is an atom To supply names for variables when writing a term you can use the new option variable names 1 that takes a list of Name Variable pairs exactly like the list pro duced by the read term 2 3 option variable names 1 To get the legacy behavior where VAR Name is written as Name when Name is an atom you can use the new option legacy numbervars true which behaves like numbervars true did in earlier releases A negative zero floating point value is now written as 0 0 rather than 0 0 There
82. ropped and the variable order must be the same on every path library system library system no longer depends on any foreign code so the system foreign resource is gone library jasper The SICStus Java working directory is now passed to Java SIC Stus when Java SICStus is started from SICStus Java Also SICStus will not change the process s working directory when started from Java The Berkeley DB library library bdb is now built using Berkeley DB 4 8 24 13 12 4 Known Issues The following are known issues with this release of SICStus See Section 13 3 Limitations in the Current Release page 37 for more information about missing or incomplete features in this release Chapter 13 Revision History 53 e SICStus Prolog does not verify that Prolog text is in Unicode NFC format When reading terms SICStus Prolog currently does not verify that the input text contains valid Unicode 5 0 characters in Normal Form C See Section Syntax of Tokens as Character Strings in the SICStus Prolog Manual This is not a problem as long as the input is in the proper format but it will accept some input that may be rejected or interpreted differently in a future version of SICStus Prolog 13 13 Changes Introduced in Version 4 1 1 Version 4 1 1 is a bugfix release only no new features have been added See Section 13 12 4 1 0 Changes page 48 for changes introduced in SICStus Prolog 4 1 13 13 1 Bugs Fixed e A compiler b
83. rtable across architectures that have the same word size which they should be This will be fixed in release 4 1 0 e SICStus Prolog does not verify that Prolog text is in Unicode NFC format When reading terms SICStus Prolog currently does not verify that the input text contains valid Unicode 5 0 characters in Normal Form C See Section Syntax of Tokens as Character Strings in the SICStus Prolog Manual This is not a problem as long as the input is in the proper format but it will accept some input that may be rejected or interpreted differently in a future version of SICStus Prolog 13 9 Changes Introduced in Version 4 0 6 This section is intentionally left empty Version 4 0 6 was skipped in the release series 13 10 Changes Introduced in Version 4 0 7 13 10 1 New Features e Most text streams can now be opened with reposition true allowing set_stream_ position 2 and seek 4 This works for fixed width single byte encodings This includes Latin 1 and similar encodings provided LFD is used for end of line See Section open in the SICStus Prolog Manual e library clpb is revived from SICStus 3 unsupported 13 10 2 Bugs Fixed e SP_event handlers are no longer allowed to run during SP_fclose which some times needs to perform some cleanup by calling Prolog code This can no longer cause SP_event handlers to run e Exceptions during exception handling would cause the top level to exit e SP_event handlers
84. s done by specifying the pathname of the file jasper jar java classpath SP PATH bin jasper jar SP PATH does not need to be set it is only used here as a placeholder see Section CPL Notes in the SICStus Prolog Manual See the documentation of the Java implementation for more info on how to set classpaths The second is to specify where Java should find the Jasper native library libspnative so or spnative d11 which the SICStus class loads into the JVM by invoking the method System loadLibrary spnative Under UNIX Jasper can usually figure this out by itself but in the event that Jasper is used in a non standard installation this will most likely fail A typical example of such a failure looks like Chapter 8 Jasper Notes 16 java classpath jasper jar se sics jasper SICStus Trying to load SICStus Exception in thread main java lang UnsatisfiedLinkError no spnative in java library path at java lang ClassLoader loadLibrary ClassLoader java 1133 at java lang Runtime loadLibraryO Runtime java 470 at java lang System loadLibrary System java 745 at se sics jasper SICStus loadNativeCode SICStus java 37 at se sics jasper SICStus initSICStus SICStus java 80 at se sics jasper SICStus init SICStus java 111 at se sics jasper SICStus main SICStus java 25 Under UNIX this can be fixed by explicitly setting the Java property java library path to the location of libspnative so l
85. s for the various platforms as well as a web interface for reporting bugs can be found at the SICStus Prolog homepage http www sicstus se Information about and fixes for bugs that have shown up since the latest release can be found there as well The mailing list sicstus users sics se is a mailing list for communication among users and implementors To subscribe write a message to sympa sics se with the following line in the message body subscribe sicstus users
86. s to hang when closing streams Source info bug for huge interpreted clauses Source info bug for interpreted code introduced in 4 2 0 Profiling profile reset 1 was broken problems with multifile library timeout time out 3 would sometimes interrupt I O or miss a timeout under Windows library sockets Some operations would raise an exception when an interrupt oc curred e g at C CLPQ CLPR constants 7 and e were inaccurate CLPFD relation 3 table 2 3 bugs with empty and infinite sets Missing propagation in the context of unification Prologbeans passing deeply nested terms to and from Prolog could lead to stack overflow in Prologbeans client code Java NET 13 15 3 Other Changes The following I O predicates are now several times faster put code 1 2 put byte 1 2 get code 1 2 peek code 1 2 get byte 1 2 peek byte 1 2 and read line 1 2 Exceptions used internally by built in predicates and library timeout are now trans parent to on exception 3 and catch 3 as well as to debugger ports JASPER When creating a se sics sicstus SICStus instance any Java system property named se sics sicstus property NAME will be passed to the created SICStus instance as the Prolog system property NAME CLPFD scalar product 4 5 is less prone to integer overflows and faster in the most common cases Linux The installer script would sometimes fail to configure support for Java 13 15 4 Kno
87. s to the table a library arrays3 is a code migration library module the long term solution is to use library logarrs instead b library assoc3 is a code migration library module the long term solution is to use library av1 instead c The syllable chars has been changed to codes throughout d Several API changes see the documentation e library lists3 is a code migration library module the long term solution is to use library lists instead f library queues3 is a code migration library module the long term solution is to use library queues instead g library random3 is a code migration library module the long term solution is to use library random instead h library system3 is a code migration library module the long term solution is to use library system library file systems and library process instead One difference between library system3 and the original release 3 version is that exec 3 returns a process reference a compound term instead of an integer process identifier 13 3 Limitations in the Current Release This section lists features that are missing or incompletely implemented in the current release of SICStus Prolog SICStus Prolog 4 3 0 but that may appear in future releases Please let us know what features are important to you library tcltk There is no way to pass non Latin 1 characters from Tcl Tk to Prolog The Tcl Tk Terminal is not supported library spa
88. stallers for Windows or for any platform is complex There are several tools available some of them free that can help with the task The SICStus Prolog installer is built using the free WiX toolset from Microsoft 4 2 Installation The development system comes in two flavors 1 A console based executable suitable to run from a DOS prompt from batch files or under SPIDER or Emacs 2 A windowed executable providing command line editing and menus See Section 4 4 Command Line Editing page 7 Except for very simple interactions it is preferable to use the SPIDER IDE see Section SICStus Prolog IDE in the SICStus Prolog Manual Chapter 4 Release Notes and Installation Guide for Windows fi or the Emacs mode see Chapter 12 The Emacs Interface page 23 when interacting with SICStus Prolog The distribution consists of a single self installing executable InstallSICStus exe con taining development system runtime support files library sources and manuals Note that the installer itself asks for a decyption key when started This decryption key is different from the license code SICStus Prolog requires a license code to run You should have received from SICS your site name the expiration date and the code This information is normally entered during installation Expiration date ExpirationDate Site Site License Code Code but it can also be entered by starting SICStus with Administrative rights from the Start menu
89. statement handles he 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 13 16 2 Bugs Fixed Interrupt latency problem fixed Fixed exception handling bug introduced in 4 1 3 Misencoded and null strings from C are handled gracefully write_term X max_depth D did not always respect the depth limit Chapter 13 Revision History 58 seeing 1 and telling 1 now return user for the current input resp output stream which was always intended If the standard input stream encounters an invalid character it will be silently replaced with the Unicode replacement character OxFFFD This was already the case for the standard output streams The same behavior for the standard input and output streams is now also in effect when running SICStus in the SPIDER IDE When open 3 4 cannot expand a system property e g open F00 bar txt read S when the system property FOO is undefined or empty an exception is raised Previosly open 3 4 sil
90. t encoding 1 e call cleanup 2 memory management could cause the cleanup action to be delayed e In trace mode the debugger would stop at spurious calls among code in hidden modules which was never intended e On Windows the absolute file name 3 option glob 1 is now case normalized just like the file name e aggregate term variables 3 steadfastness bug Note that this is largely made ob solecent by the new built in term variables 2 e library xref and spxref would loop on cyclic import dependencies e library gauge logarithmic scale was broken e library gauge On OS X menus had invisible text e library process On Windows process create 3 did not pass empty arguments correctly e library process Some process create 3 boolean options did not accept the value false e CLPFD Bad use of the global constraint API could crash SICStus Critical bug in bounds consistent all_different 1 Enabling FDBG could cause missing propagation geost 2 3 4 memory performance bug ignored the lex 1 option in greedy assignment mode Bugs in flattening logical and arithmetical expressions X Y with unbound X and Y was handled by unification This failed to type X and Y as domain variables and was often bad for performance Now such equations are handled by a propagator e ZINC Parsing floats was broken causing spurious errors The fzn file 1 and ozn file 1 options misbehaved if
91. t contains valid Unicode 5 0 characters in Normal Form C See Section Syntax of Tokens as Character Strings in the SICStus Prolog Manual This is not a problem as long as the input is in the proper format but it will allow some input that may be rejected or interpreted differently in a future version of SICStus Prolog 13 6 Changes Introduced in Version 4 0 3 13 6 1 New Features The new Prolog flag legacy char classification makes it possible to use full Uni code e g Chinese characters in unquoted atoms and variable names See Section Prolog Flags in the SICStus Prolog Manual The Prolog flag redefine warnings can take new values and is no longer ignored in runtime systems See Section Prolog Flags in the SICStus Prolog Manual SP load sicstus run time and related functionality for loading multiple SICStus runtimes into a process is now available Jasper Java interface library jasper is now available Jasper is mainly for legacy code PrologBeans is still the preferred method of calling Prolog from Java library sockets now supports UNIX domain AF UNIX sockets on UNIX like plat forms The new predicate socket server open 3 allows some options when opening a server socket SP set argvO a new C API function for setting the values returned by the argv Prolog flag Similar to the argv argument to SP initialize but can report failure and can use locale information spld and splfr new command line op
92. t SICStus from initializing Chapter 13 Revision History 54 ceiling 1 floor 1 round 1 truncate 1 now accept integers in addition to floats statistics garbage collection did not report the correct byte count PrologBeans one hook predicate was incorrectly declared dynamic library bdb determinacy bugs CLPFD table 2 3 bugs with inf sup copy_term 2 geost 2 3 4 polymorphism with rules volume 1 option library linda The Linda server is now more robust against misbehaving clients Es pecially on Windows the server would get a connection reset error if the client crashed library sockets socket select 7 would sometimes return with nothing selected even though it was called with infinite timeout UNIX like platforms only Prolog Beans clients both Java and NET would sometimes get an array index out of bounds error when more than ten concurrent sessions were active 13 14 2 Other Changes Added a warning to the PrologBeans NET ASPX example that it is not secure 13 14 3 Known Issues The following are known issues with this release of SICStus See Section 13 3 Limitations in the Current Release page 37 for more information about missing or incomplete features in this release SICStus Prolog does not verify that Prolog text is in Unicode NFC format When reading terms SICStus Prolog currently does not verify that the input text contains valid Unicode 5 0 characters in Normal Form C See Section Sy
93. the license information is available at runtime If the license information has been embedded no special steps are needed Oth erwise you need to distribute the license file along with the runtime system To make the license file available it should be located in the library folder and named license pl That is copy extended_license pl as created above into the file library license pl in the folder tree available at runtime See Section Runtime Systems on Target Machines in the SICStus Prolog Manual for details Also see Section Locating the License Information in the SICStus Prolog Manual for addi tional ways of making the license information available e Understanding steps performed by spld As usual you can use spld verbose keep in order to see exactly what steps are performed by spld This is useful if you want to embed the license but need to build the executable manually instead of using spld Chapter 7 Tcl Tk Notes 13 7 Tcl Tk Notes Tcl Tk itself is not included in the SICStus distribution It must be installed in order to use the interface Many operating systems have build in support for Tcl Tk either pre installed or available via some software update utility If a default version is not available Tcl Tk can be downloaded from the Tcl Tk primary website http tcl sourceforge net A better alternative may be to use one of the free installers available from http www activestate
94. tions The new POSIX option is treated the same as the older LD New option conf VAR VAL to override variable VAR in the configuration file Option processing has been rewritten to be more robust and consistent See Section The Application Builder in the SICStus Prolog Manual and Section The Foreign Resource Linker in the SICStus Prolog Manual sicstus The new POSIX option is a synonym for the old a 13 6 2 Bugs Fixed trimcore 0 could lead to memory corruption Chapter 13 Revision History 41 append 3 optimization could cause garbage collector crash spld and splfr multiple cflag options accumulate as documented sockets current_host 1 would fail on Windows 2000 with some network configura tions process process release 1 did not work All process creation routines in library system3 now work when there are command line options in the command argument as was intended file systems current directory 2 was sensitive to load context when passed a relative path as its second argument The Windows GUI spwin exe command Save Transcript now works and uses UTF 16 with BOM which can be read by most Windows programs and by recent Emacs and XEmacs The menu commands of the Windows GUI spwin exe no longer load foreign resources This prevents extra foreign resources from being recorded by save_program 1 2 library chr Multiple occurrences of the same answe
95. tly when foreign code called Prolog recursively Now exceptions are preserved in callbacks from foreign functions Chapter 13 Revision History 50 e format 2 3 et al used to treat all non reserved exceptions as consistency errors Now non error exceptions i e not error 2 are passed on to the caller Reserved exceptions from the goal invoked for the spec are now passed on to the caller This ensures that timeout time out 3 and other interrupts will be able to terminate such a goal e Source linked debugging could sometimes indicate the wrong line of code e see 1 and tell 1 would not accept stream objects e Multiple issues when changing one of the standard streams user input user output and user error with set prolog flag 2 These issues affected stream property 2 current stream 3 and could lead to access to freed memory during close 1 2 e stream property 2 no longer returns an eo1 1 property for binary streams e SICStus no longer sets any environment variables Setting environment variables has undefined behavior in multi threaded processes especially on UNIX like operating sys tems Symptoms included segmentation fault in getenv if several SICStus runtimes were initialized at the same time in different threads of the same process See below for the new concept System Properties which has replaced most uses of environment variables e SP event handlers are no longer allowed to run when the SICStus
96. ug affecting disjunctions introduced in released 4 1 0 fixed 13 13 2 Known Issues The following are known issues with this release of SICStus See Section 13 3 Limitations in the Current Release page 37 for more information about missing or incomplete features in this release e SICStus Prolog does not verify that Prolog text is in Unicode NFC format When reading terms SICStus Prolog currently does not verify that the input text contains valid Unicode 5 0 characters in Normal Form C See Section Syntax of Tokens as Character Strings in the SICStus Prolog Manual This is not a problem as long as the input is in the proper format but it will accept some input that may be rejected or interpreted differently in a future version of SICStus Prolog 13 14 Changes Introduced in Version 4 1 2 Version 4 1 2 is a bugfix release only no new features have been added See Section 13 12 4 1 0 Changes page 48 for changes introduced in SICStus Prolog 4 1 13 14 1 Bugs Fixed e Term comparison now runs in constant C stack space e Virtual machine bugs e PO file compatibility bug e Memory management bugs e Memory and stack corruption on UNIX like systems with large file number limit and many open files systems with ulimit n larger than FD_SETSIZE i e larger than 1024 e pred_spec_tree parse error e Module expansion of args shadowed by do iterators e Command line arguments with certain non ASCII characters would preven
97. ugs and Limitations 00 0 c cece eee eee 17 8 7 Java Examples Directory 0 00 e cece eee eens 17 8 8 RESOULCES odas er emen mette cbe ated edes e ed ae 18 9 Berkeley DB Notes 19 9 1 Berkeley DB on MS Windows 00 cc cece eee eee ees 19 9 2 Berkeley DB on Mac OS X 0 cece eens 19 10 ODBC Notes iusso adc Rr pepS Eod 21 10 1 ODBC on MS Windows sseeeees eens 21 10 2 ODBC on Mace OS X isi RR Rx x Y Kiedis sddaca 21 10 3 ODBC n Lirix trt rires o Dia bebes See 21 11 The SICStus Prolog IDE SPIDER 22 12 The Emacs Interface 23 12 1 installation cive Epareer be OR Rear rores 23 12 1 1 Installing On Line Documentation 2 23 13 Revision History asse e RERO GS 24 13 1 What Is New In Release 4 0 ccc cece cece eee 24 Iadi Virtual Machine bte bare eet endete dena 24 13 1 2 Prolog Lang age eo eget vr nee 24 13 1 2 1 Single Language Mode 0 000 e eee eee 24 13122 DCG Notation ados acca navn dette rie ets 24 13 1 2 3 Asserting Terms with Attributed Variables 24 13 42 44 Arnthlimelle 2 cen sce ie ed shes Gn bated RE E 25 13 1 2 5 Syntaxis do RR RI eU LI E RRREE okey ens 25 13 1 2 6 Prolog Flags ose eee peran IRA 25 13 1 2 7 Stream Properties cee eee eens 25 13 1 2 8 Statistics Keywords 00 c eee eee eee ee 25 13 1 2 9 Built In
98. ules requiring third party software support e g library bdb and library tcltk This is done in order to adapt to local variations in installation paths and versions Invoke InstallSICStus with the help argument to get a list of options 3 1 3 The Uninstallation Script To uninstall SICStus the script UnInstallSICStus can be run It is created during instal lation in the same directory as InstallSICStus 3 2 Platform Specific Notes This section contains some installation notes that are platform specific under UNIX Solaris Intel 64 bit SPARC 64 bit The following libraries are not supported library bdb library tcltk Mac OS X Mac OS X 10 5 10 6 10 7 and Mac OS X 10 8 are supported on Intel 32 bit and 64 bit Mac OS X 10 6 or later is recommended due to deficiencies in Mac OS X 10 5 that affects the SICStus I O sub system An executable built with spld will only work if there is a properly configured subdirectory sp 4 3 0 in the same directory as the executable see Section Runtime Systems on UNIX Target Machines in the SICStus Prolog Manual 6 Alternatively the option wrapper can be passed to spld In this case a wrapper script is created that will set up various environment variables and invoke the real executable When using third party products like BDB you may need to set up DYLD_ LIBRARY PATH so that the Mac OS X dynamic linker can find them When using the SICStus development executable si
99. unctors This change was made to align their classification with the Unicode standard Quoted atoms and strings can now contain any character sequence from Unicode 5 0 when reading with some restrictions see Section Syntax of Tokens as Character Strings in the SICStus Prolog Manual Quoted atoms and strings are now by default written using a larger subset of Unicode than before See the documentation for the Prolog flag quoted charset see Section Prolog Flags in the SICStus Prolog Manual Windows All code is built with the security options GS SAFESEH NXCOMPAT Corrected the documentation for SP put list n codes Now UTF 8 is used when communicating with the SICStus Prolog sub process in ver sions of Emacs and XEmacs that supports it 13 4 4 Known Issues The following are known issues with this release of SICStus See Section 13 3 Limitations in the Current Release page 37 for more information about missing or incomplete features in this release SICStus Prolog does not verify that Prolog text is in Unicode NFC format When reading terms SICStus Prolog currently does not verify that the input text contains valid Unicode 5 0 characters in Normal Form C See Section Syntax of Tokens as Character Strings in the SICStus Prolog Manual This is not a problem as long as the input is in the proper format but it will allow some input that may be rejected or interpreted differently in a future vers
100. were not always called during event handling One symptom was that at least on Windows timeout time_out 3 could not always interrupt a goal called from an event handler e Bug in redefining multifile predicates e sockets socket_select 7 leaked memory on Windows e library queues bug in portray queue 1 e library clpfd Incorrect reification and efficiency bugs in arithmetic relations in volving division mod and rem incorrect handling of inf and sup in table 2 3 Chapter 13 Revision History 4T 13 10 3 Other Changes e Foreign resources compiled with releases predating 4 0 5 will not load into newer re leases This change was already in release 4 0 5 but was not documented in the release notes e The eol 1 stream property is now available also when not explicitly specified when opening a file with open 3 4 e Decreased overhead for reclaiming dead dynamic clauses e Decreased garbage collection overhead in some cases 13 10 4 Known Issues The following are known issues with this release of SICStus See Section 13 3 Limitations in the Current Release page 37 for more information about missing or incomplete features in this release e Exceptions in interpreted code will not get accurate source info in the source linked debugger e Saved states and po files are not portable across architectures that have the same word size which they should be e SICStus Prolog does not verify that Prolog text is in Unicode N
101. win exe The following commands are available h erase previous char d erase next char u kill line Chapter 4 Release Notes and Installation Guide for Windows 8 f forward char b backward char a begin of line e end of line p previous line n next line i insert space s forward search r reverse search v view history q input next char blindly k kill to end of line Options may be specified in the file spcmd4 ini as Option Value on separate lines Recognized options are lines Value is the number of lines in the history buffer 1 100 is accepted the default is 25 save Value is either 0 don t save or restore history buffer or 1 save history buffer in spcmd4 hst on exit restore history from the same file on start up 4 5 The Console Window The console window used for the windowed executable is based on code written by Jan Wielemaker jan at swi psy uva nl gt The console comes with a menu access to common Prolog flags and file operations Most of these should be self explanatory The Reconsult item in the File menu reconsults the last file consulted with use of the File menu Eventually The SICStus Prolog IDE see Chapter 11 The SICStus Prolog IDE page 22 will replace the console Note that the menus work by simulating user input to the Prolog top level or debugger For this reason it is recommended that the menus only be used when SICStus is waiting for
102. wn Issues The following are known issues with this release of SICStus See Section 13 3 Limitations in the Current Release page 37 for more information about missing or incomplete features in this release Chapter 13 Revision History 56 e SICStus Prolog does not verify that Prolog text is in Unicode NFC format When reading terms SICStus Prolog currently does not verify that the input text contains valid Unicode 5 0 characters in Normal Form C See Section Syntax of Tokens as Character Strings in the SICStus Prolog Manual This is not a problem as long as the input is in the proper format but it will accept some input that may be rejected or interpreted differently in a future version of SICStus Prolog 13 16 Changes Introduced in Version 4 2 0 13 16 1 New Features e Ifthe 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 num bers The SICStus Prolog IDE SPIDER also takes advantage of the improved debug ging information e g the variable bindings view in SPIDER now has information for mor
103. y atts in the SICStus Prolog Manual then Body is unified with the conjunction of such goals If no such goals are present Body is unified with the atom true The idea is that executing Body will reinstate blocked goals and attributes on the variables in Copy equivalent to those on the variables in Term profile reset O0 profile data 1 print profile 0 1 coverage data 1 print coverage 0 1 As of release 4 2 the execution profiling technology has been reengineered eliminating the need to specially instrument code before it could be profiled Chapter 13 Revision History 28 Execution profiling is available for compiled as well as interpreted code It has been generalized to support coverage analysis for compiled as well as interpreted code The new scheme also keeps track of the number of calls per caller callee pair These are the relevant new built in predicates Some predicates have been changed slightly in most cases this affects predicates that take a list of options F1 F2 This is now a short hand for load_files F1 F2 is_mutable 1 The predicate is_mutable 1 has been renamed to mutable 1 in analogy with integer 1 atom 1 etc module 1 The predicate module 1 has been renamed to set_module 1 to avoid possible confusion with the module 2 declaration format 2 3 For the predicate format 2 3 the semantics of the spec has changed slightly the goal Arg is called as if by Arg i e
104. y come as a surprise to the unwary See Section SPTerm and Memory in the SICStus Prolog Manual e Loading multiple SICStus runtimes has not been very well tested with multi threaded Jasper 8 7 Java Examples Directory There is an examples directory available in SP_PATH library jasper examples See the file README for more info Chapter 8 Jasper Notes 18 8 8 Resources There are almost infinitely many Java resources on the Internet One good starting point is http java sun com Chapter 9 Berkeley DB Notes 19 9 Berkeley DB Notes library bdb is built on top of Berkeley DB It is an optional component of SICStus and nothing except library bdb will be affected if Berkeley DB is not installed on the machine Berkeley DB can be downloaded from http www oracle com database berkeley db library bdb is built using version 4 8 24 or some later version of 4 8 x It may be possible to recompile it to work with other versions as well 9 1 Berkeley DB on MS Windows When installing Berkeley DB on Windows you should use the binary installer available from Oracle When using Berkeley DB under Windows you should set the PATH environment variable to contain the path to libdb51 d11 Consult the Berkeley DB documentation for further info 9 2 Berkeley DB on Mac OS X The pre built installation of SICStus for Mac OS X assumes that Berkeley DB is installed in the default location usr local BerkeleyDB 4 8 T
105. y were made transparent in release 4 1 3 but that hinders debugging library timeout did not work consulted library plunit did not handle include directives correctly library bdb db findall 5 was not declared as a meta predicate Determinacy bugs CHR Spurious instantiation error bug fixed library zinc Bug in constraint a11 equal fixed Removed no output pred decls to mzn2fzn not supported as of release 1 3 CLPFD Propagation phase could be pre empted if domain variables had blocked goals or attributes Entailment detection bug in maximum 2 minimum 2 caused memory leak Bug in the precedences 1 option to cumulative 2 Chapter 13 Revision History 61 library ugraphs library wgraphs determinacy bugs library odbc Non ASCII error messages from the ODBC driver could give an ex ception about misencoded string Incorrect handling of SQL BIGINT and related types Improved robustness 13 17 3 Other Changes One of the bug fixes required a virtual machine change and a change to the PO file format So PO files and saved states created by previous versions are not compatible with this version and vice versa Singleton variable warnings are no longer generated for those directives that the com piler ignores This includes mode 1 directives so you can now use more descriptive arguments e g mode foo Input Output without getting a warning about the singleton variables Input and
106. ystem By using ODBC you can access data from a multitude of DBMSs without having to know the details of each DBMS It is now possible to pass environment variables to the sub process using the new environment 1 option to process process create 3 random setrand 1 can now be passed an arbitrary integer for initializing the state of the random number generators This is easier than constructing a valid random state like those returned by getrand 1 library clpfd geost 2 3 4 is a new powerful constraint that constrains the location in space of non overlapping multi dimensional objects table 2 3 is more scalable and has several new options for controlling its DAG construction automaton 3 is a shorthand for the most common use of automaton 8 and automaton 9 extends automaton 8 with options Unary minus is allowed in arithmetic expressions Several new demo examples library zinc upgraded to FlatZinc version 1 0 library system a new predicate environ 3 for reading system properties envi ronment variables or a merged view of both See below for the new concept System Properties that has replaced most uses of environment variables library sockets The predicates that create socket streams now take options encoding 1 and eol 1 with the same meaning as for open 4 13 12 2 Bugs Fixed Compiler pathological case bug SP raise exception and SP failO would sometimes not be handled correc
Download Pdf Manuals
Related Search
Related Contents
flux du public, prévention des incendies et de la panique, éclairage Gam International - Perla Voir la fiche - Compagnie Marocaine de Plâtre et d`enduit Model / Modèle : SPF3 Automatic Battery Charger/Maintainer Grindmaster G & MG Series User's Manual Braun 403 User's Manual Whirlpool Duet WFW9450W User's Manual Novapumps Operations manual ELF / VLF Electric Field Meter - ETS Copyright © All rights reserved.
Failed to retrieve file