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
  1. dynamic/1.
  2. multifile/1. [not implemented]
  3. discontiguous/1. [not implemented]
  4. op/3.
  5. char_conversion/2.
  6. initialization/1.
  7. include/1. [not implemented]
  8. ensure_loaded/1.
  9. set_prolog_flag/2.

7.8 Control constructs

All items implemented
  1. true/0.
  2. fail/0.
  3. call/1.
  4. !/0.
  5. (',')/2.
  6. (;)/2 – disjunction.
  7. (->)/2.
  8. (;)/2 – if-then-else.
  9. catch/3.
  10. throw/1.

7.10.2.13 Stream properties

Most items not implemented
  1. file_name/1.
  2. mode/1.
  3. input/0.
  4. output/0.
  5. alias/1.
  6. position/1. [implemented]
  7. end_of_stream/1.
  8. eof_action/1.
  9. reposition/1.
  10. type/1.

7.10.3 Read-options list

All items implemented
  1. variables/1.
  2. variable_names/1.
  3. singletons/1.

7.10.4 Write-options list

All items implemented
  1. quoted/1.
  2. ignore_ops/1.
  3. variable_names/1.
  4. numbervars/1.

7.11.1 Flags defining integer type I

All items implemented
  1. bounded.
  2. max_integer.
  3. min_integer.
  4. integer_rounding_function.

7.11.2 Other flags

All items implemented
  1. char_conversion.
  2. debug.
  3. max_arity.
  4. unknown.
  5. double_quotes.

7.12.2 Error classification

Most items implemented
  1. instantiation_error.
  2. type_error.
  3. domain_error.
  4. existence_error.
  5. permission_error.
  6. representation_error.
  7. evaluation_error.
  8. resource_error. [not implemented]
  9. syntax_error.
  10. system_error. [not implemented]
  11. uninstantiation_error. [not implemented]

8.2 Term unification

All items implemented
  1. (=)/2.
  2. unify_with_occurs_check/2.
  3. (\=)/2.
  4. subsumes_term/2.

8.3 Type testing

All items implemented
  1. var/1.
  2. atom/1.
  3. integer/1.
  4. float/1.
  5. atomic/1.
  6. compound/1.
  7. nonvar/1.
  8. number/1.
  9. callable/1.
  10. ground/1.
  11. acyclic_term/1.

8.4 Term comparison

All items implemented
  1. (@=<)/2, (==)/2, (\==)/2, (@<)/2, (@>)/2, (@>=)/2.
  2. compare/3.
  3. sort/2.
  4. keysort/2.

8.5 Term creation and decomposition

All items implemented
  1. functor/3.
  2. arg/3.
  3. (=..)/2.
  4. copy_term/2.
  5. term_variables/2.

8.6 Arithmetic evaluation

All items implemented
  1. (is)/2.

8.7 Arithmetic comparison

All items implemented
  1. (=:=)/2, (=\=)/2, (<)/2, (=<)/2, (>)/2, (>=)/2.

8.8 Clause retrieval and information

All items implemented
  1. clause/2.
  2. current_predicate/1.

8.9 Clause creation and destruction

All items implemented
  1. asserta/1.
  2. assertz/1.
  3. retract/1.
  4. abolish/1.
  5. retractall/1.

8.10 All solutions

All items implemented
  1. findall/3.
  2. bagof/3.
  3. setof/3.

8.11 Stream selection and control

All items implemented
  1. current_input/1.
  2. current_output/1.
  3. set_input/1.
  4. set_output/1.
  5. open/4, open/3. [open/4 only implemented in nodejs context]
  6. close/2, close/1.
  7. flush_output/1, flush_output/0.
  8. stream_property/2, at_end_of_stream/0, at_end_of_stream/1.
  9. set_stream_position/2.

8.12 Character input/output

All items implemented
  1. get_char/2, get_char/1, get_code/1, get_code/2.
  2. peek_char/2, peek_char/1, peek_code/1, peek_code/2.
  3. put_char/2, put_char/1, put_code/1, put_code/2.
  4. nl/0, nl/1.

8.13 Byte input/output

All items implemented
  1. get_byte/2, get_byte/1.
  2. peek_byte/2, peek_byte/1.
  3. put_byte/2, put_byte/1.

8.14 Term input/output

All items implemented
  1. read_term/3, read_term/2, read/1, read/2.
  2. write_term/3, write_term/2, write/1, write/2, writeq/1, writeq/2, write_canonical/1, write_canonical/2.
  3. op/3.
  4. current_op/3.
  5. char_conversion/2.
  6. current_char_conversion/2.

8.15 Logic and control

All items implemented
  1. (\+)/1.
  2. once/1.
  3. repeat/0.
  4. call/2..8.
  5. false/0.

8.16 Atomic term processing

All items implemented
  1. atom_length/2.
  2. atom_concat/3.
  3. sub_atom/5.
  4. atom_chars/2.
  5. atom_codes/2.
  6. char_code/2.
  7. number_chars/2.
  8. number_codes/2.

8.17 Implementation defined hooks

All items implemented
  1. set_prolog_flag/2.
  2. current_prolog_flag/2.
  3. halt/0.
  4. halt/1.

9.1 The simple arithmetic functors

All items implemented
  1. (+)/2,
  2. (-)/2,
  3. (*)/2,
  4. (//)/2,
  5. (/)/2,
  6. (rem)/2,
  7. (mod)/2,
  8. (-)/1,
  9. abs/1,
  10. sign/1,
  11. float_integer_part/1,
  12. float_fractional_part/1,
  13. float/1,
  14. floor/1,
  15. truncate/1,
  16. round/1,
  17. ceiling/1,
  18. (+)/1,
  19. (div)/2.

9.3 Other arithmetic functors

All items implemented
  1. (**)/2.
  2. sin/1.
  3. cos/1.
  4. atan/1.
  5. exp/1.
  6. log/1.
  7. sqrt/1.
  8. max/2.
  9. min/2.
  10. (^)/2.
  11. asin/1.
  12. acos/1.
  13. atan2/2.
  14. tan/1.
  15. pi/0.

9.4 Bitwise functors

All items implemented
  1. (>>)/2.
  2. (<<)/2.
  3. (/\)/2.
  4. (\/)/2.
  5. (\)/1.
  6. xor/2.

Part 2: Modules

ProscriptLS implements Quintus/SWI-style modules, not ISO modules.

7.2 Module predicates

No items are implemented
  1. current_module/1.
  2. predicate_property/2.

Proposed for Prolog prologue

Most items are implemented
  1. member/2.
  2. append/3.
  3. length/2.
  4. between/3. [library between.pl]
  5. select/3. [library listut.pl]
  6. succ/2. [not implemented]
  7. maplist/2..8. [not implemented]

Further propositions

  1. 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

Other items