[ Reference Manual | Alphabetic Index ]

library(iso)

ISO Prolog compatibility library   [more]

Predicates

open(?, ?, ?)
No description available
open(?, ?, ?, ?)
No description available
read_term(?, ?)
No description available
read_term(?, ?, ?)
No description available
stream_property(?, ?)
No description available
write_term(?, ?)
No description available
write_term(?, ?, ?)
No description available

Reexports

reexport eclipse_language
except floor / 2, call / 1, call / 2, call / 3, ceiling / 2, compare / 3, current_op / 3, round / 2, truncate / 2, ^ / 2, ^ / 3, is / 2, > / 2, < / 2, >= / 2, =< / 2, =:= / 2, =\= / 2, abolish / 1, asserta / 1, assertz / 1, atom_length / 2, clause / 2, get_char / 1, get_char / 2, op / 3, open / 3, open / 4, read / 1, read / 2, read_term / 2, read_term / 3, write_term / 2, write_term / 3, put_char / 1, put_char / 2, retract / 1, sort / 2, keysort / 2, term_variables / 2, findall / 3, bagof / 3, setof / 3
reexport op(_, _, _) from iso_light
reexport > / 2 from iso_light
reexport < / 2 from iso_light
reexport >= / 2 from iso_light
reexport =< / 2 from iso_light
reexport =:= / 2 from iso_light
reexport =\= / 2 from iso_light
reexport abolish / 1 from iso_light
reexport asserta / 1 from iso_light
reexport assertz / 1 from iso_light
reexport at_end_of_stream / 0 from iso_light
reexport at_end_of_stream / 1 from iso_light
reexport atom_concat / 3 from iso_light
reexport atom_codes / 2 from iso_light
reexport atom_chars / 2 from iso_light
reexport atom_length / 2 from iso_light
reexport char_conversion / 2 from iso_light
reexport clause / 2 from iso_light
reexport current_char_conversion / 2 from iso_light
reexport current_input / 1 from iso_light
reexport current_op / 3 from iso_light
reexport current_output / 1 from iso_light
reexport current_prolog_flag / 2 from iso_light
reexport flush_output / 0 from iso_light
reexport flush_output / 1 from iso_light
reexport get_byte / 1 from iso_light
reexport get_byte / 2 from iso_light
reexport get_char / 1 from iso_light
reexport get_char / 2 from iso_light
reexport get_code / 1 from iso_light
reexport get_code / 2 from iso_light
reexport halt / 1 from iso_light
reexport initialization / 1 from iso_light
reexport is / 2 from iso_light
reexport multifile / 1 from iso_light
reexport number_chars / 2 from iso_light
reexport number_codes / 2 from iso_light
reexport op / 3 from iso_light
reexport peek_byte / 1 from iso_light
reexport peek_byte / 2 from iso_light
reexport peek_char / 1 from iso_light
reexport peek_char / 2 from iso_light
reexport peek_code / 1 from iso_light
reexport peek_code / 2 from iso_light
reexport put_byte / 1 from iso_light
reexport put_byte / 2 from iso_light
reexport put_code / 1 from iso_light
reexport put_code / 2 from iso_light
reexport put_char / 1 from iso_light
reexport put_char / 2 from iso_light
reexport retract / 1 from iso_light
reexport set_input / 1 from iso_light
reexport set_output / 1 from iso_light
reexport set_prolog_flag / 2 from iso_light
reexport set_stream_position / 2 from iso_light
reexport sub_atom / 5 from iso_light
reexport subsumes_term / 2 from iso_light
reexport unify_with_occurs_check / 2 from iso_light
reexport call / 1 from iso_heavy
reexport call / 2 from iso_heavy
reexport call / 3 from iso_heavy
reexport compare / 3 from iso_heavy
reexport sort / 2 from iso_heavy
reexport keysort / 2 from iso_heavy
reexport term_variables / 2 from iso_heavy
reexport findall / 3 from iso_heavy
reexport setof / 3 from iso_heavy
reexport bagof / 3 from iso_heavy
reexport read / 1 from iso_heavy
reexport read / 2 from iso_heavy

Other Exports

export chtab(96, string_quote)
export chtab(34, list_quote)
export syntax_option(dense_output)
export syntax_option(not nl_in_quotes)
export syntax_option(iso_escapes)
export syntax_option(iso_base_prefix)
export syntax_option(iso_restrictions)
export syntax_option(no_string_concatenation)
export syntax_option(eof_is_no_fullstop)
export syntax_option(not syntax_errors_fail)
export syntax_option(plus_is_no_sign)
export syntax_option(doubled_quote_is_quote)
export syntax_option(bar_is_no_atom)
export syntax_option(blanks_after_sign)
export syntax_option(float_needs_point)
export syntax_option(limit_arg_precedence)

Description

Overview

This library provides an implementation of Standard Prolog as defined in ISO/IEC 13211-1 (Information Technology, Programming Languages, Prolog, Part 1, General Core, 1995) and the technical corrigenda ISO/IEC 13211-1 TC1 (2007), TC2 (2012) and TC3 (2017).

Apart from the functionality described in ISO 13211-1, an ISO-compatible subset of native ECLiPSe functionality is also available. For a strict implementation of ISO 13211-1 without any extensions, see library(iso_strict).

This is one of three libraries providing different degrees of ISO compatibility:

iso_strict
Aims to be fully ISO compliant, and represents the 'strict mode' required by the standard.
iso
Aims to be fully ISO compliant, but also includes ECLiPSe functionality that does not conflict with the standard.
iso_light
Provides the essence of ISO features without aiming for full conformance (in particular with respect to error handling), and may include ECLiPSe extensions that go beyond what the letter of the standard allows. Also useful for importing individual ISO features into a program that is otherwise written in ECLiPSe dialect.

Usage

The effect of this compatibility library is (with minor exceptions) local to the module where it is loaded. An ISO-program should always be contained in a separate module, starting with a directive like
    :- module(myisomodule, [], iso).
    
Here, the last argument of the module/3 directive indicates the language. It is not advisable to use ":-lib(iso)" or ":-ensure_loaded(library(iso))" within an eclipse_language module, because this would lead to import conflicts between the different versions of built-in predicates.

Alternatively, in order to use ISO-Prolog without having different modules, one can invoke eclipse with a "-L iso" command line option, or set the ECLIPSEDEFFAULTLANGUAGE environment variable to 'iso'. This will launch eclipse with a default module accepting 'iso' language instead of the usual 'eclipse_language'.

Specification of implementation defined features

5.5.11 Reserved atoms
The functors no_macro_expansion/1, of/2, with/2, and with_attributes/2 are reserved
6.5 Processor characted set
The PCS is the ISO 8859-1 character set. Classification of extended characters: 7f-a0 layout; a1-bf, d7, f7 graphic; c0-d6, d8-f6, f8-ff alphanumeric.
6.6 Collating sequence
The collating sequence is that of the ISO 8859-1 character set
7.1.2.2 Character codes
Each character maps to a corresponding byte
7.1.4.1 Characters
As in the ISO 8859-1 character set
7.2.1 Variable term order
Older variables precede newer variables
7.4.2.4,5 op/3 and char_conversion/2
An operator or character-conversion defined in a directive is effective at runtime, and only in the module in which it occurs
7.4.2.6 initialization/1
Initialization goals are executed in the order in which they occur in the Prolog text
7.4.2.7 include/1
The argument is a file name atom according to ECLiPSe's canonical file name syntax, or a term of the form library(atom)
7.4.2.8 ensure_loaded/1
The argument is a file name atom according to ECLiPSe's canonical file name syntax, or a term of the form library(atom). A file will be loaded on the first occurrence of ensure_loaded/1 in a prolog text, and if the file has been modified since the time it was first loaded.
7.4.2.7 set_prolog_flag/2
Flag setting are effective at runtime and globally (except for a few module-local flags in non-strict mode, see set_flag/2)
7.5.1 Preparing for execution
See the eclipse_language built-ins, menu items and command line options for compiling, loading and module handling, and also the instructions for using library(iso) or library(iso_strict)
7.7.1,3 Execution and Initialization
See the general ECLiPSe facilities, i.e. toplevel, graphical user interface and command line options
7.10.1 Sources and sinks
See open/3,4
7.10.2.6 Text streams
Text streams are very similar to binary streams, no characters are implicitly inserted or removed. The nl/0,1 predicates emit an operating system and device dependent newline sequence.
7.10.2.8,11 Stream positions
File, string, and null streams can be (re)positioned
7.10.2.9 End position of a stream
The end position of a stream is the same as the position that a character appended to the stream would have
7.10.2.11 Stream options
The default eof_action is error
7.10.2.13 Stream properties
File names are atoms according to ECLiPSe's canonical file name syntax.
7.11 Flags
Fixed values: bounded=false, min_integer and max_integer fail, integer_rounding_function=toward_zero, max_arity=unbounded, char_conversion=off. Default values: double_quotes=chars, debug=off. If debug=on, the ECLiPSe tracer is active. In non-strict mode, there is an additional flag max_predicate_arity, which indicates the limit on predicate arity (there is no limit on term arity).
7.12.1 Effect of an error
The implementation defined error term argument is normally the predicate indicator of the culprit goal. For syntax errors, it is a term describing the error location.
8.15.4 call/N
The maximum N is given by the flag max_predicate_arity (255)
8.17.1 set_prolog_flag/2
The admissible flag values are the ones defined by ISO-Prolog (for iso_strict), plus those accepted by ECLiPSe's set_flag/2 (for iso)
8.17.3,4 halt/0,1
Exits the OS process with the given return code (or 0)
9 Evaluable functors
The 'exceptional values' are realized as follows: 'float_overflow' leads to a floating point infinity result; 'underflow' leads to a floating point denormalized value result; 'zero_divisor' leads to a floating point infinity result in the case of floats, or an evaluation_error(zero_divisor) in the case of integers; 'int_overflow' does not occur and might lead to running out of memory instead.
9.3 Other arithmetic operations
When min/2 or max/2 are used with mixed integer and float arguments, the integer is coerced to float, and the result computed by comparing two floats
9.4 Bitwise arithmetic operations
The bitwise arithmetic operations behave as if operating on an unlimited length two's complement representation

Implementation specific features

These are only available with library(iso), not with library(iso_strict)!
7.10.2.11 Stream options
For additional stream options, see open/4
7.10.2.12 Options on stream closure
No additional options
7.10.2.13 Stream properties
For additional stream properties, see get_stream_info/3
7.10.3 Read options
For additional read options, see read_term/3
7.10.4 Write options
For additional stream options, see write_term/3
7.11 Flags
For additional Prolog flags, see get_flag/2
9 Evaluable functors
For additional evaluable functors, see is/2
In addition, the following language extensions are inherited from eclipse_language:

Remaining deviations from Standard

  1. The char_conversion flag is always off, meaning that character conversion is not applied to prolog texts or on term input. However, char_conversion/2 and current_char_conversion/2 predicates are operational.

About

See Also

library(multifile), library(iso_strict), library(iso_light)
Generated from iso.eci on 2022-09-03 14:26