next up previous contents index
Next: 4. Syntax Up: 3. System Description Previous: 3.10.5 Inline Predicates   Contents   Index


3.11 A Note on ISO Compatibility

In Version 3.0, an effort has been made to ensure compatibility with the Prolog ISO standard. In this section, we mention the differences with the ISO standard. XSB implements almost all ISO built-ins, although there are certain semantic differences between XSB's implementation and that of the ISO standard in certain cases.

The main difference of XSB with the ISO standard is in terms of parsing. Version 3.0 of XSB does not support full ISO syntax, nor does it support multiple character sets. Rectifying these limitations is a priority for future releases.

A second difference involves XSB's implementation of ISO streams. XSB can create streams from several first class objects, including pipes, atoms, and consoles in addition to files. However by default, XSB opens streams in binary mode, rather than text mode in opposition to the ISO standard, which opens streams in text mode. This makes no difference in UNIX or LINUX, for which text and binary streams are identical, but does make a difference in Windows, where text files are processed more than binary files.

The final difference involves error handling in XSB. XSB implements a catch and throw mechanism that is similar to the ISO standard. In addition, XSB usually throws errors for ISO-predicates under the same conditions as specified in the standard. The only differences in error handling are: (1) the type of error thrown may differ in XSB due to an effort to minimize the amount of checking performed; and (2) ISO may specify domain errors in some cases in which XSB throws type errors. The reasons for this have to do with XSB's nascent type system, as described in Section 6. The difference in error terms should cause minimal portability problems, as it only affects the type terms thrown at error, and these terms are implementation-dependent as defined in the standard.


next up previous contents index
Next: 4. Syntax Up: 3. System Description Previous: 3.10.5 Inline Predicates   Contents   Index
Terrance Swift 2007-10-05