Clone wiki

prologlib / MissingParts

Missing parts in ISO compliance

prologlib still does not support some ISO functionalities. Below, you can find a list of unsupported stuff, grouped by category.


Many. Most. Well... all but dynamic/1.


Occur check is not implemented, so unify_with_occur_check/2 does not exist.

Byte I/O is not implemented: get_byte/1-2, put_byte/1-2, peek_byte/1-2 are missing. Also so-called read options and write options are not supported, so read_term/2-3 and write_term/2-3 are missing as well. You can still use writeq/1-2 to output terms in quoted form, but write_canonical/1-2 is not implemented. Finally, also the past-end-of-stream position and its related eof_action are not supported.

The set of provided operators is pretty fixed: no op/3 (both predicate and directive), not even current_op/3.

once/1 is also missing.


The flags situation is very similar to the directives' one, even if in the case of flags this shortage is somehow justified, because it wouldn't make sense to support some flags such as max_arity &c. in a Python environment. So, it's faster to list supported flags: debug (which exists, but has no effects), unknown, and double_quotes.

For the 99 Prolog problems...

prologlib source code includes some Prolog examples that you can execute to get a taste of the system. Among them, I included the solution to most of the so-called 99 Prolog problems: some predicates are grouped by functionality (e.g. in,, some others are still in the 99pp subdirectory of the example directory with their own problem number preserved. However, some problems are completely missing, because their solution used some non-ISO builtin predicate that prologlib does not support: writef/2 (for many), between/3 (for problems 58 and 60), the evaluable functor max/2 (for problems 65 and 66), char_type/2 (for problems 67a, 67b, and 69), and that incredible directive that allows you to use a predicate as an evaluable functor that I don't remember the name of right now. Problem 68c has been ditched because its solution was too slow on prologlib. Problems from 80 to 99 were not even tried... really for no reason at all.