Implementation Status
This page describes the development status of ProscriptLS.
The ProscriptLS aspiration includes implementing most of ISO Prolog and some additional features.
Additional requirements
- predicate_property/2
- setup_call_cleanup/3
- between/3
- numbervars/3
- format/2-3
ISO Prolog Core Standard
The ISO Prolog Core standard is extensive. This list of predicates and options is from [Ulrich at TUWien](https://www.complang.tuwien.ac.at/ulrich/iso-prolog/prologue). ProscriptLS uses a non-standard module mechanism derived from Quintus (through SWI). The Prologue predicates as proposed by Ulrich are useful and should be supported.7.4.2 Directives
Most items implemented- dynamic/1.
- multifile/1. [not implemented]
- discontiguous/1. [not implemented]
- op/3.
- char_conversion/2.
- initialization/1.
- include/1. [not implemented]
- ensure_loaded/1.
- set_prolog_flag/2.
7.8 Control constructs
All items implemented- true/0.
- fail/0.
- call/1.
- !/0.
- (',')/2.
- (;)/2 – disjunction.
- (->)/2.
- (;)/2 – if-then-else.
- catch/3.
- throw/1.
7.10.2.13 Stream properties
Most items not implemented- file_name/1.
- mode/1.
- input/0.
- output/0.
- alias/1.
- position/1. [implemented]
- end_of_stream/1.
- eof_action/1.
- reposition/1.
- type/1.
7.10.3 Read-options list
All items implemented- variables/1.
- variable_names/1.
- singletons/1.
7.10.4 Write-options list
All items implemented- quoted/1.
- ignore_ops/1.
- variable_names/1.
- numbervars/1.
7.11.1 Flags defining integer type I
All items implemented- bounded.
- max_integer.
- min_integer.
- integer_rounding_function.
7.11.2 Other flags
All items implemented- char_conversion.
- debug.
- max_arity.
- unknown.
- double_quotes.
7.12.2 Error classification
Most items implemented- instantiation_error.
- type_error.
- domain_error.
- existence_error.
- permission_error.
- representation_error.
- evaluation_error.
- resource_error. [not implemented]
- syntax_error.
- system_error. [not implemented]
- uninstantiation_error. [not implemented]
8.2 Term unification
All items implemented- (=)/2.
- unify_with_occurs_check/2.
- (\=)/2.
- subsumes_term/2.
8.3 Type testing
All items implemented- var/1.
- atom/1.
- integer/1.
- float/1.
- atomic/1.
- compound/1.
- nonvar/1.
- number/1.
- callable/1.
- ground/1.
- acyclic_term/1.
8.4 Term comparison
All items implemented- (@=<)/2, (==)/2, (\==)/2, (@<)/2, (@>)/2, (@>=)/2.
- compare/3.
- sort/2.
- keysort/2.
8.5 Term creation and decomposition
All items implemented- functor/3.
- arg/3.
- (=..)/2.
- copy_term/2.
- term_variables/2.
8.6 Arithmetic evaluation
All items implemented- (is)/2.
8.7 Arithmetic comparison
All items implemented- (=:=)/2, (=\=)/2, (<)/2, (=<)/2, (>)/2, (>=)/2.
8.8 Clause retrieval and information
All items implemented- clause/2.
- current_predicate/1.
8.9 Clause creation and destruction
All items implemented- asserta/1.
- assertz/1.
- retract/1.
- abolish/1.
- retractall/1.
8.10 All solutions
All items implemented- findall/3.
- bagof/3.
- setof/3.
8.11 Stream selection and control
All items implemented- current_input/1.
- current_output/1.
- set_input/1.
- set_output/1.
- open/4, open/3. [open/4 only implemented in nodejs context]
- close/2, close/1.
- flush_output/1, flush_output/0.
- stream_property/2, at_end_of_stream/0, at_end_of_stream/1.
- set_stream_position/2.
8.12 Character input/output
All items implemented- get_char/2, get_char/1, get_code/1, get_code/2.
- peek_char/2, peek_char/1, peek_code/1, peek_code/2.
- put_char/2, put_char/1, put_code/1, put_code/2.
- nl/0, nl/1.
8.13 Byte input/output
All items implemented- get_byte/2, get_byte/1.
- peek_byte/2, peek_byte/1.
- put_byte/2, put_byte/1.
8.14 Term input/output
All items implemented- read_term/3, read_term/2, read/1, read/2.
- write_term/3, write_term/2, write/1, write/2, writeq/1, writeq/2, write_canonical/1, write_canonical/2.
- op/3.
- current_op/3.
- char_conversion/2.
- current_char_conversion/2.
8.15 Logic and control
All items implemented- (\+)/1.
- once/1.
- repeat/0.
- call/2..8.
- false/0.
8.16 Atomic term processing
All items implemented- atom_length/2.
- atom_concat/3.
- sub_atom/5.
- atom_chars/2.
- atom_codes/2.
- char_code/2.
- number_chars/2.
- number_codes/2.
8.17 Implementation defined hooks
All items implemented- set_prolog_flag/2.
- current_prolog_flag/2.
- halt/0.
- halt/1.
9.1 The simple arithmetic functors
All items implemented- (+)/2,
- (-)/2,
- (*)/2,
- (//)/2,
- (/)/2,
- (rem)/2,
- (mod)/2,
- (-)/1,
- abs/1,
- sign/1,
- float_integer_part/1,
- float_fractional_part/1,
- float/1,
- floor/1,
- truncate/1,
- round/1,
- ceiling/1,
- (+)/1,
- (div)/2.
9.3 Other arithmetic functors
All items implemented- (**)/2.
- sin/1.
- cos/1.
- atan/1.
- exp/1.
- log/1.
- sqrt/1.
- max/2.
- min/2.
- (^)/2.
- asin/1.
- acos/1.
- atan2/2.
- tan/1.
- pi/0.
9.4 Bitwise functors
All items implemented- (>>)/2.
- (<<)/2.
- (/\)/2.
- (\/)/2.
- (\)/1.
- xor/2.
Part 2: Modules
ProscriptLS implements Quintus/SWI-style modules, not ISO modules.7.2 Module predicates
No items are implemented- current_module/1.
- predicate_property/2.
Proposed for Prolog prologue
Most items are implemented- member/2.
- append/3.
- length/2.
- between/3. [library between.pl]
- select/3. [library listut.pl]
- succ/2. [not implemented]
- maplist/2..8. [not implemented]
Further propositions
- nth/3. [library listut.pl]
Summary of items needing to be implemented
There are 23 items which are not yet implemented and not being worked on but which are needed for the ISO Prolog Core and the recommended 'prologue', out of a total of 186 items listed above.Standard items
- 3 directives in 7.4.2 Directives
- discontiguous
- multifile
- include
- 9 items in 7.10.2.13 Stream properties
- file_name/1.
- mode/1.
- input/0.
- output/0.
- alias/1.
- end_of_stream/1.
- eof_action/1.
- reposition/1.
- type/1.
- 3 items in 7.12.2 Error classification
- resource_error.
- system_error.
- uninstantiation_error.
Other items
- 2 items in 7.2 Module predicates
- current_module/1.
- predicate_property/2.
- 4 items in Proposed for Prolog prologue
- between/3. [library between.pl]
- select/3. [library listut.pl]
- succ/2. [not implemented]
- maplist/2..8. [not implemented]