eyeprolog 1.5.19 → 1.5.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ the two.
17
17
  This book is also the reference for the EyeProlog implementation. EyeProlog is a
18
18
  standards-based reasoning system: programs use the documented and tested ISO
19
19
  Prolog profile.
20
- Chapters 38–40 define the supported ISO Prolog profile, predicate surface, libraries, and execution interface. Chapter 39 describes every supported built-in and library predicate, with compact contracts for all **518 distinct predicate indicators** in the normal EyeProlog surface; Chapter 40 documents command-line execution. The explanatory chapters give the reasoning and operational context needed to use those details correctly.
20
+ Chapters 38–40 define the supported ISO Prolog profile, predicate surface, libraries, and execution interface. Chapter 39 describes every supported built-in and library predicate, with compact contracts for all **523 distinct predicate indicators** in the normal EyeProlog surface; Chapter 40 documents command-line execution. The explanatory chapters give the reasoning and operational context needed to use those details correctly.
21
21
 
22
22
  Its subject is not syntax alone. A logic program has two inseparable aspects:
23
23
  the relation described by its clauses and the procedure induced when goals are
@@ -5547,6 +5547,21 @@ and document the command line; the conformance corpus fixes success, failure,
5547
5547
  mode, and error behavior. Use this part for working practice and those chapters
5548
5548
  for exact reference.
5549
5549
 
5550
+ ### Historical note: the practical language becomes portable
5551
+
5552
+ By the late 1970s and 1980s, Prolog had spread from its Marseille origins into
5553
+ several implementation traditions. The Edinburgh and DECsystem-10 lineage in
5554
+ particular helped establish a practical programming vocabulary around ordered
5555
+ control, term inspection, dynamic clauses, operators, and streams. These
5556
+ facilities made Prolog useful far beyond theorem-proving examples, but
5557
+ differences between systems also made portability a recurring concern.
5558
+
5559
+ ISO/IEC 13211-1:1995 gave that accumulated practice a common core. It did not
5560
+ freeze the language: constraints, modules, tabling, coroutining, and other
5561
+ facilities continued to develop in implementations and later standardization
5562
+ work. What the standard supplied was a stable shared account of ordinary Prolog
5563
+ terms, control, state, errors, and I/O against which extensions could be named.
5564
+
5550
5565
  # Part IX — Reference as practice
5551
5566
 
5552
5567
  Reference is useful only when the route into it is clear. Begin with the task
@@ -5904,7 +5919,7 @@ Queries for predicates with no group follow the known groups.
5904
5919
 
5905
5920
  ## 39. Predicate reference
5906
5921
 
5907
- EyeProlog's normal predicate surface has two layers: **129 core registry indicators** and **389 distinct non-ISO library or normal-extension indicators**. Because `phrase/2` and `phrase/3` occur in both layers, their union contains **518 distinct predicate indicators**.
5922
+ EyeProlog's normal predicate surface has two layers: **129 core registry indicators** and **394 distinct non-ISO library or normal-extension indicators**. Because `phrase/2` and `phrase/3` occur in both layers, their union contains **523 distinct predicate indicators**.
5908
5923
 
5909
5924
  Core predicates are available without a library import. Bundled libraries add reusable relations for collections, constraints, graphs, text, time, cryptography, files, and other domains. Interoperability notes identify the subset shared with Trealla and Scryer, and the complete alphabetical reference gives one compact contract for every indicator.
5910
5925
 
@@ -6276,12 +6291,12 @@ boundary remains visible.
6276
6291
 
6277
6292
  ### Bundled libraries
6278
6293
 
6279
- EyeProlog exposes **389 distinct non-ISO library and normal-extension predicate
6294
+ EyeProlog exposes **394 distinct non-ISO library and normal-extension predicate
6280
6295
  indicators** in addition to the 129 indicators in its isolated ISO profile.
6281
6296
  **280 are defined entirely as ordinary Prolog clauses** in focused modules under
6282
- `src/lib/`; **109 use host support** for control, attributed variables,
6297
+ `src/lib/`; **114 use host support** for control, attributed variables,
6283
6298
  constraints, character conversion, filesystem/OS access, timing, cryptography,
6284
- or observability. The ISO and library catalogs therefore cover **518 distinct predicate indicators**. A normal-runtime predicate that is intentionally
6299
+ or observability. The ISO and library catalogs therefore cover **523 distinct predicate indicators**. A normal-runtime predicate that is intentionally
6285
6300
  re-exported by a compatibility module is counted once in this library surface:
6286
6301
  for example `call_cleanup/2` and `setup_call_cleanup/3` are exported by
6287
6302
  `library(iso_ext)`, while `time/1` and `statistics/2` are available from
@@ -6299,7 +6314,7 @@ The sources are `src/lib/aggregate.pl`, `src/lib/arithmetic.pl`,
6299
6314
  `src/lib/lambda.pl`, `src/lib/lists.pl`, `src/lib/ordsets.pl`,
6300
6315
  `src/lib/os.pl`, `src/lib/pairs.pl`, `src/lib/pio.pl`, `src/lib/primes.pl`,
6301
6316
  `src/lib/prologue.pl`, `src/lib/random.pl`, `src/lib/reif.pl`, `src/lib/si.pl`,
6302
- `src/lib/strings.pl`, `src/lib/tabling.pl`, `src/lib/terms.pl`,
6317
+ `src/lib/sockets.pl`, `src/lib/strings.pl`, `src/lib/tabling.pl`, `src/lib/terms.pl`,
6303
6318
  `src/lib/time.pl`, `src/lib/ugraphs.pl`, `src/lib/uuid.pl`, and
6304
6319
  `src/lib/when.pl`. Each declares a same-named module
6305
6320
  with `module/2`; there is no catch-all `library(eyeprolog)`. A program imports
@@ -6389,6 +6404,8 @@ private helpers and same-named predicates in different modules separate.
6389
6404
  **Exports:** `,/3`, `;/3`, `=/3`, `cond_t/3`, `dif/3`, `if_/3`, `memberd_t/3`, `tfilter/3`, `tmember/2`, `tmember_t/3`, `tpartition/4`
6390
6405
  - **`library(si)`** — Sufficient-instantiation checks used by CLP(Z)
6391
6406
  **Exports:** `atom_si/1`, `integer_si/1`, `atomic_si/1`, `list_si/1`, `character_si/1`, `term_si/1`, `chars_si/1`, `dif_si/2`, `not_si/1`, `when_si/2`
6407
+ - **`library(sockets)`** — Scryer-compatible TCP clients and servers represented as bidirectional streams
6408
+ **Exports:** `socket_client_open/3`, `socket_server_open/2`, `socket_server_accept/4`, `socket_server_close/1`, `current_hostname/1`
6392
6409
  - **`library(strings)`** — Text relations
6393
6410
  **Exports:** `matches/3`, `split/3`, `replace/4`, `lowercase/2`, `uppercase/2`, `trim/2`, `number_string/2`, `atom_string/2`, `term_string/2`, `string_concat/3`, `contains/2`, `matches/2`, `join/3`, `substring/4`
6394
6411
  - **`library(tabling)`** — Common helpers for explicitly declared tabling, including targeted invalidation
@@ -6686,10 +6703,10 @@ The conservative Trealla/Scryer compatibility profile is derived from Scryer
6686
6703
  library modules and predicate indicators also documented by Trealla. Where
6687
6704
  Trealla exposes a predicate globally rather than from the same module, EyeProlog
6688
6705
  follows Scryer's module name so explicit Scryer-style imports remain available.
6689
- That interoperability profile currently spans 26 modules and is intentionally
6706
+ That interoperability profile currently spans 27 modules and is intentionally
6690
6707
  narrower than either implementation's union of exports; EyeProlog's explicit-state
6691
6708
  `random/3` and `uuid/3`, for example, remain useful extensions rather than shared
6692
- interfaces. Separately, all 32 bundled EyeProlog modules whose basenames overlap Scryer's current `src/lib/` tree cover the corresponding Scryer public predicate surface. The 26 bundled modules that have public-module counterparts in Trealla `library/` cover Trealla's exported predicates at pinned upstream commit `f7a93bd521c07a4841f5123348111dd005918c89`. This is module-overlap coverage, not a claim that EyeProlog bundles Trealla's native host libraries such as `curl`, `gsl`, `janus`, `raylib`, `socket`, or `sqlite3`.
6709
+ interfaces. Separately, all 33 bundled EyeProlog modules whose basenames overlap Scryer's current `src/lib/` tree cover the corresponding Scryer public predicate surface. The 26 bundled modules that have public-module counterparts in Trealla `library/` cover Trealla's exported predicates at pinned upstream commit `f7a93bd521c07a4841f5123348111dd005918c89`. This is module-overlap coverage, not a claim that EyeProlog bundles Trealla's native host libraries such as `curl`, `gsl`, `janus`, `raylib`, `socket`, or `sqlite3`.
6693
6710
 
6694
6711
  Source reuse is preferred over translation. `clpb.pl`, `ordsets.pl`,
6695
6712
  `reif.pl`, and `ugraphs.pl` retain the upstream Prolog algorithms and license
@@ -6714,11 +6731,23 @@ composes Boolean constraints, ordered sets, graphs, reification, delayed goals,
6714
6731
  generated names, character conversion, transposition, and explicit table
6715
6732
  syntax in one runnable program.
6716
6733
 
6717
- Two matching upstream basenames are intentionally not exposed as portable
6718
- libraries. The two `builtins.pl` files are private engine facades and have no
6719
- shared public predicate interface. `sockets.pl` requires a native networking
6720
- event loop and host socket objects; EyeProlog does not provide a source-only
6721
- facade that would accept calls and then fail at runtime.
6734
+ The matching `builtins.pl` files are intentionally not exposed as a portability
6735
+ library. Scryer uses `library(builtins)` as its fundamental system module, while
6736
+ Trealla's file is implementation support; EyeProlog keeps those procedures in
6737
+ the core registry instead of creating a second authority for them.
6738
+
6739
+ `library(sockets)` follows Scryer's TCP stream interface. `socket_client_open/3`
6740
+ connects to `Host:Port`; `socket_server_open/2` accepts either a port or
6741
+ `Host:Port`, and an unbound port is unified with the selected ephemeral port.
6742
+ `socket_server_accept/4` returns the peer address and a bidirectional stream.
6743
+ Client and accepted streams are both input and output streams and report
6744
+ `mode(read_append)`, `position(0)`, and their network address through
6745
+ `file_name/1`. They support text or binary I/O, aliases, `eof_action/1`,
6746
+ `flush_output/1`, and `close/1`. Socket streams are not repositionable, so `reposition(true)` is
6747
+ rejected. Closing the server stops future accepts without closing streams that
6748
+ have already been accepted. `current_hostname/1` returns the local host name.
6749
+ The networking predicates require the Node runtime; runtimes without the socket
6750
+ host capability raise `resource_error(sockets)`.
6722
6751
 
6723
6752
  `number_to_rational/2` and `rational_numerator_denominator/3` are now present in
6724
6753
  `library(arithmetic)`. EyeProlog's processor numeric values are still integers
@@ -6949,7 +6978,7 @@ the common stateful generator used by `uuidv4/1`.
6949
6978
  <!-- eyeprolog-predicate-reference:start -->
6950
6979
  ### Complete predicate indicator reference
6951
6980
 
6952
- The normal EyeProlog surface contains **518 distinct predicate indicators**: 129 core registry indicators plus 391 bundled-library indicators, with `phrase/2` and `phrase/3` present in both layers and therefore counted once.
6981
+ The normal EyeProlog surface contains **523 distinct predicate indicators**: 129 core registry indicators plus 396 bundled-library indicators, with `phrase/2` and `phrase/3` present in both layers and therefore counted once.
6953
6982
 
6954
6983
  Each entry is a compact contract. `+` marks a principal input, `-` a principal output, and `?` an argument that may be supplied or produced. These are documented operating modes rather than parser-enforced mode declarations. **Solutions** uses `det`, `semidet`, `multi`, `nondet`, `delayed`, `meta`, `mode-dependent`, `declaration`, or `terminal`; `meta` means the solution behavior depends materially on a called goal.
6955
6984
 
@@ -6963,47 +6992,47 @@ Each indicator links directly to its contract.
6963
6992
 
6964
6993
  **B:** [`bagof/3`](#predicate-reference-0101) · [`bb_b_put/2`](#predicate-reference-0102) · [`bb_get/2`](#predicate-reference-0103) · [`bb_put/2`](#predicate-reference-0104) · [`becomes/2`](#predicate-reference-0105) · [`between/3`](#predicate-reference-0106)
6965
6994
 
6966
- **C:** [`call_cleanup/2`](#predicate-reference-0107) · [`call_nth/2`](#predicate-reference-0108) · [`call_residue_vars/2`](#predicate-reference-0109) · [`call_with_error_context/2`](#predicate-reference-0110) · [`call_with_inference_limit/3`](#predicate-reference-0111) · [`call/1`](#predicate-reference-0112) · [`call/2`](#predicate-reference-0113) · [`call/3`](#predicate-reference-0114) · [`call/4`](#predicate-reference-0115) · [`call/5`](#predicate-reference-0116) · [`call/6`](#predicate-reference-0117) · [`call/7`](#predicate-reference-0118) · [`call/8`](#predicate-reference-0119) · [`callable/1`](#predicate-reference-0120) · [`can_be/2`](#predicate-reference-0121) · [`catch/3`](#predicate-reference-0122) · [`cfor/3`](#predicate-reference-0123) · [`chain/2`](#predicate-reference-0124) · [`char_code/2`](#predicate-reference-0125) · [`char_conversion/2`](#predicate-reference-0126) · [`char_type/2`](#predicate-reference-0127) · [`character_si/1`](#predicate-reference-0128) · [`chars_base64/3`](#predicate-reference-0129) · [`chars_si/1`](#predicate-reference-0130) · [`chars_utf8bytes/2`](#predicate-reference-0131) · [`circuit/1`](#predicate-reference-0132) · [`clause/2`](#predicate-reference-0133) · [`close/1`](#predicate-reference-0134) · [`close/2`](#predicate-reference-0135) · [`clpz_t/2`](#predicate-reference-0136) · [`compare/3`](#predicate-reference-0137) · [`complement/2`](#predicate-reference-0138) · [`compose/3`](#predicate-reference-0139) · [`compound/1`](#predicate-reference-0140) · [`cond_t/3`](#predicate-reference-0141) · [`connect_ugraph/3`](#predicate-reference-0142) · [`contains/2`](#predicate-reference-0143) · [`copy_term_nat/2`](#predicate-reference-0144) · [`copy_term/2`](#predicate-reference-0145) · [`copy_term/3`](#predicate-reference-0146) · [`countall/2`](#predicate-reference-0147) · [`crypto_curve_generator/2`](#predicate-reference-0148) · [`crypto_curve_order/2`](#predicate-reference-0149) · [`crypto_curve_scalar_mult/4`](#predicate-reference-0150) · [`crypto_data_decrypt/6`](#predicate-reference-0151) · [`crypto_data_encrypt/6`](#predicate-reference-0152) · [`crypto_data_hash/3`](#predicate-reference-0153) · [`crypto_data_hkdf/4`](#predicate-reference-0154) · [`crypto_n_random_bytes/2`](#predicate-reference-0155) · [`crypto_name_curve/2`](#predicate-reference-0156) · [`crypto_password_hash/2`](#predicate-reference-0157) · [`crypto_password_hash/3`](#predicate-reference-0158) · [`cumulative/1`](#predicate-reference-0159) · [`cumulative/2`](#predicate-reference-0160) · [`current_char_conversion/2`](#predicate-reference-0161) · [`current_input/1`](#predicate-reference-0162) · [`current_op/3`](#predicate-reference-0163) · [`current_output/1`](#predicate-reference-0164) · [`current_predicate/1`](#predicate-reference-0165) · [`current_prolog_flag/2`](#predicate-reference-0166) · [`current_time/1`](#predicate-reference-0167) · [`curve25519_generator/1`](#predicate-reference-0168) · [`curve25519_scalar_mult/3`](#predicate-reference-0169)
6995
+ **C:** [`call_cleanup/2`](#predicate-reference-0107) · [`call_nth/2`](#predicate-reference-0108) · [`call_residue_vars/2`](#predicate-reference-0109) · [`call_with_error_context/2`](#predicate-reference-0110) · [`call_with_inference_limit/3`](#predicate-reference-0111) · [`call/1`](#predicate-reference-0112) · [`call/2`](#predicate-reference-0113) · [`call/3`](#predicate-reference-0114) · [`call/4`](#predicate-reference-0115) · [`call/5`](#predicate-reference-0116) · [`call/6`](#predicate-reference-0117) · [`call/7`](#predicate-reference-0118) · [`call/8`](#predicate-reference-0119) · [`callable/1`](#predicate-reference-0120) · [`can_be/2`](#predicate-reference-0121) · [`catch/3`](#predicate-reference-0122) · [`cfor/3`](#predicate-reference-0123) · [`chain/2`](#predicate-reference-0124) · [`char_code/2`](#predicate-reference-0125) · [`char_conversion/2`](#predicate-reference-0126) · [`char_type/2`](#predicate-reference-0127) · [`character_si/1`](#predicate-reference-0128) · [`chars_base64/3`](#predicate-reference-0129) · [`chars_si/1`](#predicate-reference-0130) · [`chars_utf8bytes/2`](#predicate-reference-0131) · [`circuit/1`](#predicate-reference-0132) · [`clause/2`](#predicate-reference-0133) · [`close/1`](#predicate-reference-0134) · [`close/2`](#predicate-reference-0135) · [`clpz_t/2`](#predicate-reference-0136) · [`compare/3`](#predicate-reference-0137) · [`complement/2`](#predicate-reference-0138) · [`compose/3`](#predicate-reference-0139) · [`compound/1`](#predicate-reference-0140) · [`cond_t/3`](#predicate-reference-0141) · [`connect_ugraph/3`](#predicate-reference-0142) · [`contains/2`](#predicate-reference-0143) · [`copy_term_nat/2`](#predicate-reference-0144) · [`copy_term/2`](#predicate-reference-0145) · [`copy_term/3`](#predicate-reference-0146) · [`countall/2`](#predicate-reference-0147) · [`crypto_curve_generator/2`](#predicate-reference-0148) · [`crypto_curve_order/2`](#predicate-reference-0149) · [`crypto_curve_scalar_mult/4`](#predicate-reference-0150) · [`crypto_data_decrypt/6`](#predicate-reference-0151) · [`crypto_data_encrypt/6`](#predicate-reference-0152) · [`crypto_data_hash/3`](#predicate-reference-0153) · [`crypto_data_hkdf/4`](#predicate-reference-0154) · [`crypto_n_random_bytes/2`](#predicate-reference-0155) · [`crypto_name_curve/2`](#predicate-reference-0156) · [`crypto_password_hash/2`](#predicate-reference-0157) · [`crypto_password_hash/3`](#predicate-reference-0158) · [`cumulative/1`](#predicate-reference-0159) · [`cumulative/2`](#predicate-reference-0160) · [`current_char_conversion/2`](#predicate-reference-0161) · [`current_hostname/1`](#predicate-reference-0162) · [`current_input/1`](#predicate-reference-0163) · [`current_op/3`](#predicate-reference-0164) · [`current_output/1`](#predicate-reference-0165) · [`current_predicate/1`](#predicate-reference-0166) · [`current_prolog_flag/2`](#predicate-reference-0167) · [`current_time/1`](#predicate-reference-0168) · [`curve25519_generator/1`](#predicate-reference-0169) · [`curve25519_scalar_mult/3`](#predicate-reference-0170)
6967
6996
 
6968
- **D:** [`debug/1`](#predicate-reference-0170) · [`debug/3`](#predicate-reference-0171) · [`del_assoc/4`](#predicate-reference-0172) · [`del_attr/2`](#predicate-reference-0173) · [`del_edges/3`](#predicate-reference-0174) · [`del_max_assoc/4`](#predicate-reference-0175) · [`del_min_assoc/4`](#predicate-reference-0176) · [`del_vertices/3`](#predicate-reference-0177) · [`delete_directory/1`](#predicate-reference-0178) · [`delete_file/1`](#predicate-reference-0179) · [`dif_si/2`](#predicate-reference-0180) · [`dif/2`](#predicate-reference-0181) · [`dif/3`](#predicate-reference-0182) · [`difference/3`](#predicate-reference-0183) · [`directory_exists/1`](#predicate-reference-0184) · [`directory_files/2`](#predicate-reference-0185) · [`disjoint2/1`](#predicate-reference-0186) · [`domain_error/2`](#predicate-reference-0187) · [`domain_error/3`](#predicate-reference-0188) · [`drop/3`](#predicate-reference-0189)
6997
+ **D:** [`debug/1`](#predicate-reference-0171) · [`debug/3`](#predicate-reference-0172) · [`del_assoc/4`](#predicate-reference-0173) · [`del_attr/2`](#predicate-reference-0174) · [`del_edges/3`](#predicate-reference-0175) · [`del_max_assoc/4`](#predicate-reference-0176) · [`del_min_assoc/4`](#predicate-reference-0177) · [`del_vertices/3`](#predicate-reference-0178) · [`delete_directory/1`](#predicate-reference-0179) · [`delete_file/1`](#predicate-reference-0180) · [`dif_si/2`](#predicate-reference-0181) · [`dif/2`](#predicate-reference-0182) · [`dif/3`](#predicate-reference-0183) · [`difference/3`](#predicate-reference-0184) · [`directory_exists/1`](#predicate-reference-0185) · [`directory_files/2`](#predicate-reference-0186) · [`disjoint2/1`](#predicate-reference-0187) · [`domain_error/2`](#predicate-reference-0188) · [`domain_error/3`](#predicate-reference-0189) · [`drop/3`](#predicate-reference-0190)
6969
6998
 
6970
- **E:** [`ed25519_keypair_public_key/2`](#predicate-reference-0190) · [`ed25519_new_keypair/1`](#predicate-reference-0191) · [`ed25519_seed_keypair/2`](#predicate-reference-0192) · [`ed25519_sign/4`](#predicate-reference-0193) · [`ed25519_verify/4`](#predicate-reference-0194) · [`edges/2`](#predicate-reference-0195) · [`element/3`](#predicate-reference-0196) · [`empty_assoc/1`](#predicate-reference-0197) · [`exclude/3`](#predicate-reference-0198) · [`expmod/4`](#predicate-reference-0199)
6999
+ **E:** [`ed25519_keypair_public_key/2`](#predicate-reference-0191) · [`ed25519_new_keypair/1`](#predicate-reference-0192) · [`ed25519_seed_keypair/2`](#predicate-reference-0193) · [`ed25519_sign/4`](#predicate-reference-0194) · [`ed25519_verify/4`](#predicate-reference-0195) · [`edges/2`](#predicate-reference-0196) · [`element/3`](#predicate-reference-0197) · [`empty_assoc/1`](#predicate-reference-0198) · [`exclude/3`](#predicate-reference-0199) · [`expmod/4`](#predicate-reference-0200)
6971
7000
 
6972
- **F:** [`fail/0`](#predicate-reference-0200) · [`false/0`](#predicate-reference-0201) · [`fd_dom/2`](#predicate-reference-0202) · [`fd_inf/2`](#predicate-reference-0203) · [`fd_size/2`](#predicate-reference-0204) · [`fd_sup/2`](#predicate-reference-0205) · [`fd_var/1`](#predicate-reference-0206) · [`file_access_time/2`](#predicate-reference-0207) · [`file_copy/2`](#predicate-reference-0208) · [`file_creation_time/2`](#predicate-reference-0209) · [`file_exists/1`](#predicate-reference-0210) · [`file_modification_time/2`](#predicate-reference-0211) · [`file_size/2`](#predicate-reference-0212) · [`findall/3`](#predicate-reference-0213) · [`findall/4`](#predicate-reference-0214) · [`float/1`](#predicate-reference-0215) · [`flush_output/0`](#predicate-reference-0216) · [`flush_output/1`](#predicate-reference-0217) · [`foldl/4`](#predicate-reference-0218) · [`foldl/5`](#predicate-reference-0219) · [`foldl/6`](#predicate-reference-0220) · [`forall/2`](#predicate-reference-0221) · [`format_/4`](#predicate-reference-0222) · [`format_time/4`](#predicate-reference-0223) · [`format/2`](#predicate-reference-0224) · [`format/3`](#predicate-reference-0225) · [`freeze/2`](#predicate-reference-0226) · [`frozen/2`](#predicate-reference-0227) · [`functor/3`](#predicate-reference-0228)
7001
+ **F:** [`fail/0`](#predicate-reference-0201) · [`false/0`](#predicate-reference-0202) · [`fd_dom/2`](#predicate-reference-0203) · [`fd_inf/2`](#predicate-reference-0204) · [`fd_size/2`](#predicate-reference-0205) · [`fd_sup/2`](#predicate-reference-0206) · [`fd_var/1`](#predicate-reference-0207) · [`file_access_time/2`](#predicate-reference-0208) · [`file_copy/2`](#predicate-reference-0209) · [`file_creation_time/2`](#predicate-reference-0210) · [`file_exists/1`](#predicate-reference-0211) · [`file_modification_time/2`](#predicate-reference-0212) · [`file_size/2`](#predicate-reference-0213) · [`findall/3`](#predicate-reference-0214) · [`findall/4`](#predicate-reference-0215) · [`float/1`](#predicate-reference-0216) · [`flush_output/0`](#predicate-reference-0217) · [`flush_output/1`](#predicate-reference-0218) · [`foldl/4`](#predicate-reference-0219) · [`foldl/5`](#predicate-reference-0220) · [`foldl/6`](#predicate-reference-0221) · [`forall/2`](#predicate-reference-0222) · [`format_/4`](#predicate-reference-0223) · [`format_time/4`](#predicate-reference-0224) · [`format/2`](#predicate-reference-0225) · [`format/3`](#predicate-reference-0226) · [`freeze/2`](#predicate-reference-0227) · [`frozen/2`](#predicate-reference-0228) · [`functor/3`](#predicate-reference-0229)
6973
7002
 
6974
- **G:** [`ge/2`](#predicate-reference-0229) · [`gen_assoc/3`](#predicate-reference-0230) · [`gen_int/1`](#predicate-reference-0231) · [`gen_nat/1`](#predicate-reference-0232) · [`gensym/2`](#predicate-reference-0233) · [`get_assoc/3`](#predicate-reference-0234) · [`get_assoc/5`](#predicate-reference-0235) · [`get_attr/3`](#predicate-reference-0236) · [`get_atts/2`](#predicate-reference-0237) · [`get_byte/1`](#predicate-reference-0238) · [`get_byte/2`](#predicate-reference-0239) · [`get_char/1`](#predicate-reference-0240) · [`get_char/2`](#predicate-reference-0241) · [`get_code/1`](#predicate-reference-0242) · [`get_code/2`](#predicate-reference-0243) · [`get_line_to_chars/3`](#predicate-reference-0244) · [`get_n_chars/3`](#predicate-reference-0245) · [`get_single_char/1`](#predicate-reference-0246) · [`getenv/2`](#predicate-reference-0247) · [`global_cardinality/2`](#predicate-reference-0248) · [`global_cardinality/3`](#predicate-reference-0249) · [`ground/1`](#predicate-reference-0250) · [`group_pairs_by_key/2`](#predicate-reference-0251) · [`gt/2`](#predicate-reference-0252)
7003
+ **G:** [`ge/2`](#predicate-reference-0230) · [`gen_assoc/3`](#predicate-reference-0231) · [`gen_int/1`](#predicate-reference-0232) · [`gen_nat/1`](#predicate-reference-0233) · [`gensym/2`](#predicate-reference-0234) · [`get_assoc/3`](#predicate-reference-0235) · [`get_assoc/5`](#predicate-reference-0236) · [`get_attr/3`](#predicate-reference-0237) · [`get_atts/2`](#predicate-reference-0238) · [`get_byte/1`](#predicate-reference-0239) · [`get_byte/2`](#predicate-reference-0240) · [`get_char/1`](#predicate-reference-0241) · [`get_char/2`](#predicate-reference-0242) · [`get_code/1`](#predicate-reference-0243) · [`get_code/2`](#predicate-reference-0244) · [`get_line_to_chars/3`](#predicate-reference-0245) · [`get_n_chars/3`](#predicate-reference-0246) · [`get_single_char/1`](#predicate-reference-0247) · [`getenv/2`](#predicate-reference-0248) · [`global_cardinality/2`](#predicate-reference-0249) · [`global_cardinality/3`](#predicate-reference-0250) · [`ground/1`](#predicate-reference-0251) · [`group_pairs_by_key/2`](#predicate-reference-0252) · [`gt/2`](#predicate-reference-0253)
6975
7004
 
6976
- **H:** [`halt/0`](#predicate-reference-0253) · [`halt/1`](#predicate-reference-0254) · [`hex_bytes/2`](#predicate-reference-0255)
7005
+ **H:** [`halt/0`](#predicate-reference-0254) · [`halt/1`](#predicate-reference-0255) · [`hex_bytes/2`](#predicate-reference-0256)
6977
7006
 
6978
- **I:** [`if_/3`](#predicate-reference-0256) · [`in/2`](#predicate-reference-0257) · [`include/3`](#predicate-reference-0258) · [`indomain/1`](#predicate-reference-0259) · [`ins/2`](#predicate-reference-0260) · [`instantiation_error/0`](#predicate-reference-0261) · [`instantiation_error/1`](#predicate-reference-0262) · [`integer_si/1`](#predicate-reference-0263) · [`integer/1`](#predicate-reference-0264) · [`intersection/3`](#predicate-reference-0265) · [`is_assoc/1`](#predicate-reference-0266) · [`is_ordset/1`](#predicate-reference-0267) · [`is_set/1`](#predicate-reference-0268) · [`is/2`](#predicate-reference-0269)
7007
+ **I:** [`if_/3`](#predicate-reference-0257) · [`in/2`](#predicate-reference-0258) · [`include/3`](#predicate-reference-0259) · [`indomain/1`](#predicate-reference-0260) · [`ins/2`](#predicate-reference-0261) · [`instantiation_error/0`](#predicate-reference-0262) · [`instantiation_error/1`](#predicate-reference-0263) · [`integer_si/1`](#predicate-reference-0264) · [`integer/1`](#predicate-reference-0265) · [`intersection/3`](#predicate-reference-0266) · [`is_assoc/1`](#predicate-reference-0267) · [`is_ordset/1`](#predicate-reference-0268) · [`is_set/1`](#predicate-reference-0269) · [`is/2`](#predicate-reference-0270)
6979
7008
 
6980
- **J:** [`join/3`](#predicate-reference-0270)
7009
+ **J:** [`join/3`](#predicate-reference-0271)
6981
7010
 
6982
- **K:** [`keysort/2`](#predicate-reference-0271)
7011
+ **K:** [`keysort/2`](#predicate-reference-0272)
6983
7012
 
6984
- **L:** [`label/1`](#predicate-reference-0272) · [`labeling/1`](#predicate-reference-0273) · [`labeling/2`](#predicate-reference-0274) · [`last/2`](#predicate-reference-0275) · [`lcm/3`](#predicate-reference-0276) · [`le/2`](#predicate-reference-0277) · [`length/2`](#predicate-reference-0278) · [`lex_chain/1`](#predicate-reference-0279) · [`list_max/2`](#predicate-reference-0280) · [`list_min/2`](#predicate-reference-0281) · [`list_si/1`](#predicate-reference-0282) · [`list_to_assoc/2`](#predicate-reference-0283) · [`list_to_ord_set/2`](#predicate-reference-0284) · [`list_to_set/2`](#predicate-reference-0285) · [`listing/1`](#predicate-reference-0286) · [`lowercase/2`](#predicate-reference-0287) · [`lsb/2`](#predicate-reference-0288) · [`lt/2`](#predicate-reference-0289)
7013
+ **L:** [`label/1`](#predicate-reference-0273) · [`labeling/1`](#predicate-reference-0274) · [`labeling/2`](#predicate-reference-0275) · [`last/2`](#predicate-reference-0276) · [`lcm/3`](#predicate-reference-0277) · [`le/2`](#predicate-reference-0278) · [`length/2`](#predicate-reference-0279) · [`lex_chain/1`](#predicate-reference-0280) · [`list_max/2`](#predicate-reference-0281) · [`list_min/2`](#predicate-reference-0282) · [`list_si/1`](#predicate-reference-0283) · [`list_to_assoc/2`](#predicate-reference-0284) · [`list_to_ord_set/2`](#predicate-reference-0285) · [`list_to_set/2`](#predicate-reference-0286) · [`listing/1`](#predicate-reference-0287) · [`lowercase/2`](#predicate-reference-0288) · [`lsb/2`](#predicate-reference-0289) · [`lt/2`](#predicate-reference-0290)
6985
7014
 
6986
- **M:** [`make_directory_path/1`](#predicate-reference-0290) · [`make_directory/1`](#predicate-reference-0291) · [`map_assoc/2`](#predicate-reference-0292) · [`map_assoc/3`](#predicate-reference-0293) · [`map_list_to_pairs/3`](#predicate-reference-0294) · [`maplist/2`](#predicate-reference-0295) · [`maplist/3`](#predicate-reference-0296) · [`maplist/4`](#predicate-reference-0297) · [`maplist/5`](#predicate-reference-0298) · [`maplist/6`](#predicate-reference-0299) · [`maplist/7`](#predicate-reference-0300) · [`maplist/8`](#predicate-reference-0301) · [`maplist/9`](#predicate-reference-0302) · [`matches/2`](#predicate-reference-0303) · [`matches/3`](#predicate-reference-0304) · [`max_assoc/3`](#predicate-reference-0305) · [`max_list/2`](#predicate-reference-0306) · [`max_sleep_time/1`](#predicate-reference-0307) · [`maybe/0`](#predicate-reference-0308) · [`maybe/1`](#predicate-reference-0309) · [`maybe/2`](#predicate-reference-0310) · [`member/2`](#predicate-reference-0311) · [`memberchk/2`](#predicate-reference-0312) · [`memberd_t/3`](#predicate-reference-0313) · [`min_assoc/3`](#predicate-reference-0314) · [`min_list/2`](#predicate-reference-0315) · [`msb/2`](#predicate-reference-0316) · [`must_be/2`](#predicate-reference-0317)
7015
+ **M:** [`make_directory_path/1`](#predicate-reference-0291) · [`make_directory/1`](#predicate-reference-0292) · [`map_assoc/2`](#predicate-reference-0293) · [`map_assoc/3`](#predicate-reference-0294) · [`map_list_to_pairs/3`](#predicate-reference-0295) · [`maplist/2`](#predicate-reference-0296) · [`maplist/3`](#predicate-reference-0297) · [`maplist/4`](#predicate-reference-0298) · [`maplist/5`](#predicate-reference-0299) · [`maplist/6`](#predicate-reference-0300) · [`maplist/7`](#predicate-reference-0301) · [`maplist/8`](#predicate-reference-0302) · [`maplist/9`](#predicate-reference-0303) · [`matches/2`](#predicate-reference-0304) · [`matches/3`](#predicate-reference-0305) · [`max_assoc/3`](#predicate-reference-0306) · [`max_list/2`](#predicate-reference-0307) · [`max_sleep_time/1`](#predicate-reference-0308) · [`maybe/0`](#predicate-reference-0309) · [`maybe/1`](#predicate-reference-0310) · [`maybe/2`](#predicate-reference-0311) · [`member/2`](#predicate-reference-0312) · [`memberchk/2`](#predicate-reference-0313) · [`memberd_t/3`](#predicate-reference-0314) · [`min_assoc/3`](#predicate-reference-0315) · [`min_list/2`](#predicate-reference-0316) · [`msb/2`](#predicate-reference-0317) · [`must_be/2`](#predicate-reference-0318)
6987
7016
 
6988
- **N:** [`neighbors/3`](#predicate-reference-0318) · [`neighbours/3`](#predicate-reference-0319) · [`nl/0`](#predicate-reference-0320) · [`nl/1`](#predicate-reference-0321) · [`nodebug/1`](#predicate-reference-0322) · [`nonvar/1`](#predicate-reference-0323) · [`not_si/1`](#predicate-reference-0324) · [`nth0/3`](#predicate-reference-0325) · [`nth0/4`](#predicate-reference-0326) · [`nth1/3`](#predicate-reference-0327) · [`nth1/4`](#predicate-reference-0328) · [`number_chars/2`](#predicate-reference-0329) · [`number_codes/2`](#predicate-reference-0330) · [`number_string/2`](#predicate-reference-0331) · [`number_to_rational/2`](#predicate-reference-0332) · [`number_to_rational/3`](#predicate-reference-0333) · [`number/1`](#predicate-reference-0334) · [`numbervars/3`](#predicate-reference-0335) · [`numlist/2`](#predicate-reference-0336) · [`numlist/3`](#predicate-reference-0337) · [`nvalue/2`](#predicate-reference-0338)
7017
+ **N:** [`neighbors/3`](#predicate-reference-0319) · [`neighbours/3`](#predicate-reference-0320) · [`nl/0`](#predicate-reference-0321) · [`nl/1`](#predicate-reference-0322) · [`nodebug/1`](#predicate-reference-0323) · [`nonvar/1`](#predicate-reference-0324) · [`not_si/1`](#predicate-reference-0325) · [`nth0/3`](#predicate-reference-0326) · [`nth0/4`](#predicate-reference-0327) · [`nth1/3`](#predicate-reference-0328) · [`nth1/4`](#predicate-reference-0329) · [`number_chars/2`](#predicate-reference-0330) · [`number_codes/2`](#predicate-reference-0331) · [`number_string/2`](#predicate-reference-0332) · [`number_to_rational/2`](#predicate-reference-0333) · [`number_to_rational/3`](#predicate-reference-0334) · [`number/1`](#predicate-reference-0335) · [`numbervars/3`](#predicate-reference-0336) · [`numlist/2`](#predicate-reference-0337) · [`numlist/3`](#predicate-reference-0338) · [`nvalue/2`](#predicate-reference-0339)
6989
7018
 
6990
- **O:** [`once/1`](#predicate-reference-0339) · [`op/3`](#predicate-reference-0340) · [`open/3`](#predicate-reference-0341) · [`open/4`](#predicate-reference-0342) · [`ord_add_element/3`](#predicate-reference-0343) · [`ord_del_element/3`](#predicate-reference-0344) · [`ord_disjoint/2`](#predicate-reference-0345) · [`ord_empty/1`](#predicate-reference-0346) · [`ord_intersect/2`](#predicate-reference-0347) · [`ord_intersect/3`](#predicate-reference-0348) · [`ord_intersection/2`](#predicate-reference-0349) · [`ord_intersection/3`](#predicate-reference-0350) · [`ord_intersection/4`](#predicate-reference-0351) · [`ord_list_to_assoc/2`](#predicate-reference-0352) · [`ord_memberchk/2`](#predicate-reference-0353) · [`ord_selectchk/3`](#predicate-reference-0354) · [`ord_seteq/2`](#predicate-reference-0355) · [`ord_subset/2`](#predicate-reference-0356) · [`ord_subtract/3`](#predicate-reference-0357) · [`ord_symdiff/3`](#predicate-reference-0358) · [`ord_union/2`](#predicate-reference-0359) · [`ord_union/3`](#predicate-reference-0360) · [`ord_union/4`](#predicate-reference-0361)
7019
+ **O:** [`once/1`](#predicate-reference-0340) · [`op/3`](#predicate-reference-0341) · [`open/3`](#predicate-reference-0342) · [`open/4`](#predicate-reference-0343) · [`ord_add_element/3`](#predicate-reference-0344) · [`ord_del_element/3`](#predicate-reference-0345) · [`ord_disjoint/2`](#predicate-reference-0346) · [`ord_empty/1`](#predicate-reference-0347) · [`ord_intersect/2`](#predicate-reference-0348) · [`ord_intersect/3`](#predicate-reference-0349) · [`ord_intersection/2`](#predicate-reference-0350) · [`ord_intersection/3`](#predicate-reference-0351) · [`ord_intersection/4`](#predicate-reference-0352) · [`ord_list_to_assoc/2`](#predicate-reference-0353) · [`ord_memberchk/2`](#predicate-reference-0354) · [`ord_selectchk/3`](#predicate-reference-0355) · [`ord_seteq/2`](#predicate-reference-0356) · [`ord_subset/2`](#predicate-reference-0357) · [`ord_subtract/3`](#predicate-reference-0358) · [`ord_symdiff/3`](#predicate-reference-0359) · [`ord_union/2`](#predicate-reference-0360) · [`ord_union/3`](#predicate-reference-0361) · [`ord_union/4`](#predicate-reference-0362)
6991
7020
 
6992
- **P:** [`pairs_keys_values/3`](#predicate-reference-0362) · [`pairs_keys/2`](#predicate-reference-0363) · [`pairs_values/2`](#predicate-reference-0364) · [`partial_string_tail/2`](#predicate-reference-0365) · [`partial_string/1`](#predicate-reference-0366) · [`partial_string/3`](#predicate-reference-0367) · [`path_canonical/2`](#predicate-reference-0368) · [`path_segments/2`](#predicate-reference-0369) · [`peek_byte/1`](#predicate-reference-0370) · [`peek_byte/2`](#predicate-reference-0371) · [`peek_char/1`](#predicate-reference-0372) · [`peek_char/2`](#predicate-reference-0373) · [`peek_code/1`](#predicate-reference-0374) · [`peek_code/2`](#predicate-reference-0375) · [`permutation/2`](#predicate-reference-0376) · [`phrase_from_file/2`](#predicate-reference-0377) · [`phrase_from_file/3`](#predicate-reference-0378) · [`phrase_from_stream/2`](#predicate-reference-0379) · [`phrase_to_file/2`](#predicate-reference-0380) · [`phrase_to_file/3`](#predicate-reference-0381) · [`phrase_to_stream/2`](#predicate-reference-0382) · [`phrase/2`](#predicate-reference-0383) · [`phrase/3`](#predicate-reference-0384) · [`phrase/4`](#predicate-reference-0385) · [`phrase/5`](#predicate-reference-0386) · [`pid/1`](#predicate-reference-0387) · [`popcount/2`](#predicate-reference-0388) · [`portray_clause_/3`](#predicate-reference-0389) · [`portray_clause/1`](#predicate-reference-0390) · [`portray_clause/2`](#predicate-reference-0391) · [`put_assoc/4`](#predicate-reference-0392) · [`put_attr/3`](#predicate-reference-0393) · [`put_atts/2`](#predicate-reference-0394) · [`put_byte/1`](#predicate-reference-0395) · [`put_byte/2`](#predicate-reference-0396) · [`put_char/1`](#predicate-reference-0397) · [`put_char/2`](#predicate-reference-0398) · [`put_code/1`](#predicate-reference-0399) · [`put_code/2`](#predicate-reference-0400)
7021
+ **P:** [`pairs_keys_values/3`](#predicate-reference-0363) · [`pairs_keys/2`](#predicate-reference-0364) · [`pairs_values/2`](#predicate-reference-0365) · [`partial_string_tail/2`](#predicate-reference-0366) · [`partial_string/1`](#predicate-reference-0367) · [`partial_string/3`](#predicate-reference-0368) · [`path_canonical/2`](#predicate-reference-0369) · [`path_segments/2`](#predicate-reference-0370) · [`peek_byte/1`](#predicate-reference-0371) · [`peek_byte/2`](#predicate-reference-0372) · [`peek_char/1`](#predicate-reference-0373) · [`peek_char/2`](#predicate-reference-0374) · [`peek_code/1`](#predicate-reference-0375) · [`peek_code/2`](#predicate-reference-0376) · [`permutation/2`](#predicate-reference-0377) · [`phrase_from_file/2`](#predicate-reference-0378) · [`phrase_from_file/3`](#predicate-reference-0379) · [`phrase_from_stream/2`](#predicate-reference-0380) · [`phrase_to_file/2`](#predicate-reference-0381) · [`phrase_to_file/3`](#predicate-reference-0382) · [`phrase_to_stream/2`](#predicate-reference-0383) · [`phrase/2`](#predicate-reference-0384) · [`phrase/3`](#predicate-reference-0385) · [`phrase/4`](#predicate-reference-0386) · [`phrase/5`](#predicate-reference-0387) · [`pid/1`](#predicate-reference-0388) · [`popcount/2`](#predicate-reference-0389) · [`portray_clause_/3`](#predicate-reference-0390) · [`portray_clause/1`](#predicate-reference-0391) · [`portray_clause/2`](#predicate-reference-0392) · [`put_assoc/4`](#predicate-reference-0393) · [`put_attr/3`](#predicate-reference-0394) · [`put_atts/2`](#predicate-reference-0395) · [`put_byte/1`](#predicate-reference-0396) · [`put_byte/2`](#predicate-reference-0397) · [`put_char/1`](#predicate-reference-0398) · [`put_char/2`](#predicate-reference-0399) · [`put_code/1`](#predicate-reference-0400) · [`put_code/2`](#predicate-reference-0401)
6993
7022
 
6994
- **R:** [`random_integer/3`](#predicate-reference-0401) · [`random_labeling/2`](#predicate-reference-0402) · [`random/1`](#predicate-reference-0403) · [`random/3`](#predicate-reference-0404) · [`rational_numerator_denominator/3`](#predicate-reference-0405) · [`raw_argv/1`](#predicate-reference-0406) · [`reachable/3`](#predicate-reference-0407) · [`read_from_chars/2`](#predicate-reference-0408) · [`read_term_from_chars/3`](#predicate-reference-0409) · [`read_term/2`](#predicate-reference-0410) · [`read_term/3`](#predicate-reference-0411) · [`read/1`](#predicate-reference-0412) · [`read/2`](#predicate-reference-0413) · [`rename_file/2`](#predicate-reference-0414) · [`repeat/0`](#predicate-reference-0415) · [`repeat/1`](#predicate-reference-0416) · [`replace/4`](#predicate-reference-0417) · [`representation_error/1`](#predicate-reference-0418) · [`reset_gensym/1`](#predicate-reference-0419) · [`resource_error/1`](#predicate-reference-0420) · [`resource_error/2`](#predicate-reference-0421) · [`retract/1`](#predicate-reference-0422) · [`retractall/1`](#predicate-reference-0423) · [`reverse/2`](#predicate-reference-0424)
7023
+ **R:** [`random_integer/3`](#predicate-reference-0402) · [`random_labeling/2`](#predicate-reference-0403) · [`random/1`](#predicate-reference-0404) · [`random/3`](#predicate-reference-0405) · [`rational_numerator_denominator/3`](#predicate-reference-0406) · [`raw_argv/1`](#predicate-reference-0407) · [`reachable/3`](#predicate-reference-0408) · [`read_from_chars/2`](#predicate-reference-0409) · [`read_term_from_chars/3`](#predicate-reference-0410) · [`read_term/2`](#predicate-reference-0411) · [`read_term/3`](#predicate-reference-0412) · [`read/1`](#predicate-reference-0413) · [`read/2`](#predicate-reference-0414) · [`rename_file/2`](#predicate-reference-0415) · [`repeat/0`](#predicate-reference-0416) · [`repeat/1`](#predicate-reference-0417) · [`replace/4`](#predicate-reference-0418) · [`representation_error/1`](#predicate-reference-0419) · [`reset_gensym/1`](#predicate-reference-0420) · [`resource_error/1`](#predicate-reference-0421) · [`resource_error/2`](#predicate-reference-0422) · [`retract/1`](#predicate-reference-0423) · [`retractall/1`](#predicate-reference-0424) · [`reverse/2`](#predicate-reference-0425)
6995
7024
 
6996
- **S:** [`same_length/2`](#predicate-reference-0425) · [`sat_count/2`](#predicate-reference-0426) · [`sat/1`](#predicate-reference-0427) · [`scalar_product/4`](#predicate-reference-0428) · [`select/3`](#predicate-reference-0429) · [`selectchk/3`](#predicate-reference-0430) · [`seq/3`](#predicate-reference-0431) · [`seqq/3`](#predicate-reference-0432) · [`serialized/2`](#predicate-reference-0433) · [`set_input/1`](#predicate-reference-0434) · [`set_nth0/4`](#predicate-reference-0435) · [`set_output/1`](#predicate-reference-0436) · [`set_prolog_flag/2`](#predicate-reference-0437) · [`set_random/1`](#predicate-reference-0438) · [`set_stream_position/2`](#predicate-reference-0439) · [`setenv/2`](#predicate-reference-0440) · [`setof/3`](#predicate-reference-0441) · [`setup_call_cleanup/3`](#predicate-reference-0442) · [`shell/1`](#predicate-reference-0443) · [`shell/2`](#predicate-reference-0444) · [`sleep/1`](#predicate-reference-0445) · [`slice/4`](#predicate-reference-0446) · [`smallest_divisor_from/3`](#predicate-reference-0447) · [`sort/2`](#predicate-reference-0448) · [`split/3`](#predicate-reference-0449) · [`stable/1`](#predicate-reference-0450) · [`start_tabling/2`](#predicate-reference-0451) · [`statistics/2`](#predicate-reference-0452) · [`stream_property/2`](#predicate-reference-0453) · [`string_concat/3`](#predicate-reference-0454) · [`sub_atom/5`](#predicate-reference-0455) · [`substring/4`](#predicate-reference-0456) · [`subsumes_term/2`](#predicate-reference-0457) · [`subtract/3`](#predicate-reference-0458) · [`succ/2`](#predicate-reference-0459) · [`sum_list/2`](#predicate-reference-0460) · [`sum/3`](#predicate-reference-0461) · [`sumall/3`](#predicate-reference-0462)
7025
+ **S:** [`same_length/2`](#predicate-reference-0426) · [`sat_count/2`](#predicate-reference-0427) · [`sat/1`](#predicate-reference-0428) · [`scalar_product/4`](#predicate-reference-0429) · [`select/3`](#predicate-reference-0430) · [`selectchk/3`](#predicate-reference-0431) · [`seq/3`](#predicate-reference-0432) · [`seqq/3`](#predicate-reference-0433) · [`serialized/2`](#predicate-reference-0434) · [`set_input/1`](#predicate-reference-0435) · [`set_nth0/4`](#predicate-reference-0436) · [`set_output/1`](#predicate-reference-0437) · [`set_prolog_flag/2`](#predicate-reference-0438) · [`set_random/1`](#predicate-reference-0439) · [`set_stream_position/2`](#predicate-reference-0440) · [`setenv/2`](#predicate-reference-0441) · [`setof/3`](#predicate-reference-0442) · [`setup_call_cleanup/3`](#predicate-reference-0443) · [`shell/1`](#predicate-reference-0444) · [`shell/2`](#predicate-reference-0445) · [`sleep/1`](#predicate-reference-0446) · [`slice/4`](#predicate-reference-0447) · [`smallest_divisor_from/3`](#predicate-reference-0448) · [`socket_client_open/3`](#predicate-reference-0449) · [`socket_server_accept/4`](#predicate-reference-0450) · [`socket_server_close/1`](#predicate-reference-0451) · [`socket_server_open/2`](#predicate-reference-0452) · [`sort/2`](#predicate-reference-0453) · [`split/3`](#predicate-reference-0454) · [`stable/1`](#predicate-reference-0455) · [`start_tabling/2`](#predicate-reference-0456) · [`statistics/2`](#predicate-reference-0457) · [`stream_property/2`](#predicate-reference-0458) · [`string_concat/3`](#predicate-reference-0459) · [`sub_atom/5`](#predicate-reference-0460) · [`substring/4`](#predicate-reference-0461) · [`subsumes_term/2`](#predicate-reference-0462) · [`subtract/3`](#predicate-reference-0463) · [`succ/2`](#predicate-reference-0464) · [`sum_list/2`](#predicate-reference-0465) · [`sum/3`](#predicate-reference-0466) · [`sumall/3`](#predicate-reference-0467)
6997
7026
 
6998
- **T:** [`take/3`](#predicate-reference-0463) · [`tasklist/2`](#predicate-reference-0464) · [`tasklist/3`](#predicate-reference-0465) · [`tasklist/4`](#predicate-reference-0466) · [`tasklist/5`](#predicate-reference-0467) · [`tasklist/6`](#predicate-reference-0468) · [`tasklist/7`](#predicate-reference-0469) · [`tasklist/8`](#predicate-reference-0470) · [`taut/2`](#predicate-reference-0471) · [`term_attributed_variables/2`](#predicate-reference-0472) · [`term_si/1`](#predicate-reference-0473) · [`term_string/2`](#predicate-reference-0474) · [`term_variables/2`](#predicate-reference-0475) · [`tfilter/3`](#predicate-reference-0476) · [`throw/1`](#predicate-reference-0477) · [`time/1`](#predicate-reference-0478) · [`tmember_t/3`](#predicate-reference-0479) · [`tmember/2`](#predicate-reference-0480) · [`top_sort/2`](#predicate-reference-0481) · [`top_sort/3`](#predicate-reference-0482) · [`tpartition/4`](#predicate-reference-0483) · [`transitive_closure/2`](#predicate-reference-0484) · [`transpose_ugraph/2`](#predicate-reference-0485) · [`transpose/2`](#predicate-reference-0486) · [`trim/2`](#predicate-reference-0487) · [`true/0`](#predicate-reference-0488) · [`tuples_in/2`](#predicate-reference-0489) · [`type_error/2`](#predicate-reference-0490) · [`type_error/3`](#predicate-reference-0491)
7027
+ **T:** [`take/3`](#predicate-reference-0468) · [`tasklist/2`](#predicate-reference-0469) · [`tasklist/3`](#predicate-reference-0470) · [`tasklist/4`](#predicate-reference-0471) · [`tasklist/5`](#predicate-reference-0472) · [`tasklist/6`](#predicate-reference-0473) · [`tasklist/7`](#predicate-reference-0474) · [`tasklist/8`](#predicate-reference-0475) · [`taut/2`](#predicate-reference-0476) · [`term_attributed_variables/2`](#predicate-reference-0477) · [`term_si/1`](#predicate-reference-0478) · [`term_string/2`](#predicate-reference-0479) · [`term_variables/2`](#predicate-reference-0480) · [`tfilter/3`](#predicate-reference-0481) · [`throw/1`](#predicate-reference-0482) · [`time/1`](#predicate-reference-0483) · [`tmember_t/3`](#predicate-reference-0484) · [`tmember/2`](#predicate-reference-0485) · [`top_sort/2`](#predicate-reference-0486) · [`top_sort/3`](#predicate-reference-0487) · [`tpartition/4`](#predicate-reference-0488) · [`transitive_closure/2`](#predicate-reference-0489) · [`transpose_ugraph/2`](#predicate-reference-0490) · [`transpose/2`](#predicate-reference-0491) · [`trim/2`](#predicate-reference-0492) · [`true/0`](#predicate-reference-0493) · [`tuples_in/2`](#predicate-reference-0494) · [`type_error/2`](#predicate-reference-0495) · [`type_error/3`](#predicate-reference-0496)
6999
7028
 
7000
- **U:** [`ugraph_union/3`](#predicate-reference-0492) · [`unify_with_occurs_check/2`](#predicate-reference-0493) · [`union/3`](#predicate-reference-0494) · [`unsetenv/1`](#predicate-reference-0495) · [`uppercase/2`](#predicate-reference-0496) · [`uuid_string/2`](#predicate-reference-0497) · [`uuid/3`](#predicate-reference-0498) · [`uuidv4_string/1`](#predicate-reference-0499) · [`uuidv4/1`](#predicate-reference-0500)
7029
+ **U:** [`ugraph_union/3`](#predicate-reference-0497) · [`unify_with_occurs_check/2`](#predicate-reference-0498) · [`union/3`](#predicate-reference-0499) · [`unsetenv/1`](#predicate-reference-0500) · [`uppercase/2`](#predicate-reference-0501) · [`uuid_string/2`](#predicate-reference-0502) · [`uuid/3`](#predicate-reference-0503) · [`uuidv4_string/1`](#predicate-reference-0504) · [`uuidv4/1`](#predicate-reference-0505)
7001
7030
 
7002
- **V:** [`var/1`](#predicate-reference-0501) · [`variant/2`](#predicate-reference-0502) · [`vertices_edges_to_ugraph/3`](#predicate-reference-0503) · [`vertices/2`](#predicate-reference-0504)
7031
+ **V:** [`var/1`](#predicate-reference-0506) · [`variant/2`](#predicate-reference-0507) · [`vertices_edges_to_ugraph/3`](#predicate-reference-0508) · [`vertices/2`](#predicate-reference-0509)
7003
7032
 
7004
- **W:** [`weighted_maximum/3`](#predicate-reference-0505) · [`when_si/2`](#predicate-reference-0506) · [`when/2`](#predicate-reference-0507) · [`working_directory/2`](#predicate-reference-0508) · [`write_canonical/1`](#predicate-reference-0509) · [`write_canonical/2`](#predicate-reference-0510) · [`write_term_to_chars/3`](#predicate-reference-0511) · [`write_term/2`](#predicate-reference-0512) · [`write_term/3`](#predicate-reference-0513) · [`write/1`](#predicate-reference-0514) · [`write/2`](#predicate-reference-0515) · [`writeq/1`](#predicate-reference-0516) · [`writeq/2`](#predicate-reference-0517)
7033
+ **W:** [`weighted_maximum/3`](#predicate-reference-0510) · [`when_si/2`](#predicate-reference-0511) · [`when/2`](#predicate-reference-0512) · [`working_directory/2`](#predicate-reference-0513) · [`write_canonical/1`](#predicate-reference-0514) · [`write_canonical/2`](#predicate-reference-0515) · [`write_term_to_chars/3`](#predicate-reference-0516) · [`write_term/2`](#predicate-reference-0517) · [`write_term/3`](#predicate-reference-0518) · [`write/1`](#predicate-reference-0519) · [`write/2`](#predicate-reference-0520) · [`writeq/1`](#predicate-reference-0521) · [`writeq/2`](#predicate-reference-0522)
7005
7034
 
7006
- **Z:** [`zcompare/3`](#predicate-reference-0518)
7035
+ **Z:** [`zcompare/3`](#predicate-reference-0523)
7007
7036
 
7008
7037
  #### Predicate reference — Symbols
7009
7038
 
@@ -7661,1490 +7690,1510 @@ Each indicator links directly to its contract.
7661
7690
  **Call:** `current_char_conversion(?Input,?Output)`
7662
7691
  **Contract:** Enumerates installed nonidentity character conversions.
7663
7692
  <a id="predicate-reference-0162"></a>
7693
+ - **`current_hostname/1`** — `library(sockets)` · **`det`**
7694
+ **Call:** `current_hostname(-HostName)`
7695
+ **Contract:** Unifies HostName with the local host name used by the networking runtime.
7696
+ <a id="predicate-reference-0163"></a>
7664
7697
  - **`current_input/1`** — `ISO core` · **`det`**
7665
7698
  **Call:** `current_input(?Stream)`
7666
7699
  **Contract:** Returns the current input stream.
7667
- <a id="predicate-reference-0163"></a>
7700
+ <a id="predicate-reference-0164"></a>
7668
7701
  - **`current_op/3`** — `ISO core` · **`nondet`**
7669
7702
  **Call:** `current_op(?Priority,?Specifier,?Name)`
7670
7703
  **Contract:** Enumerates active operator definitions, filtering any supplied arguments.
7671
- <a id="predicate-reference-0164"></a>
7704
+ <a id="predicate-reference-0165"></a>
7672
7705
  - **`current_output/1`** — `ISO core` · **`det`**
7673
7706
  **Call:** `current_output(?Stream)`
7674
7707
  **Contract:** Returns the current output stream.
7675
- <a id="predicate-reference-0165"></a>
7708
+ <a id="predicate-reference-0166"></a>
7676
7709
  - **`current_predicate/1`** — `ISO core` · **`nondet`**
7677
7710
  **Call:** `current_predicate(?NameArity)`
7678
7711
  **Contract:** Enumerates predicate indicators present in the loaded program.
7679
- <a id="predicate-reference-0166"></a>
7712
+ <a id="predicate-reference-0167"></a>
7680
7713
  - **`current_prolog_flag/2`** — `ISO core` · **`nondet`**
7681
7714
  **Call:** `current_prolog_flag(?Flag,?Value)`
7682
7715
  **Contract:** Enumerates supported Prolog flags or returns the value of a named flag.
7683
- <a id="predicate-reference-0167"></a>
7716
+ <a id="predicate-reference-0168"></a>
7684
7717
  - **`current_time/1`** — `library(time)` · **`det`**
7685
7718
  **Call:** `current_time(-Stamp)`
7686
7719
  **Contract:** Returns the current local date/time as the module's timestamp association list.
7687
- <a id="predicate-reference-0168"></a>
7720
+ <a id="predicate-reference-0169"></a>
7688
7721
  - **`curve25519_generator/1`** — `library(crypto)` · **`det`**
7689
7722
  **Call:** `curve25519_generator(-Generator)`
7690
7723
  **Contract:** Returns the canonical X25519/Curve25519 generator representation.
7691
- <a id="predicate-reference-0169"></a>
7724
+ <a id="predicate-reference-0170"></a>
7692
7725
  - **`curve25519_scalar_mult/3`** — `library(crypto)` · **`det`**
7693
7726
  **Call:** `curve25519_scalar_mult(+Scalar,+Point,-Result)`
7694
7727
  **Contract:** Computes Curve25519 scalar multiplication.
7695
7728
 
7696
7729
  #### Predicate reference — D
7697
7730
 
7698
- <a id="predicate-reference-0170"></a>
7731
+ <a id="predicate-reference-0171"></a>
7699
7732
  - **`debug/1`** — `library(debug)` · **`det`**
7700
7733
  **Call:** `debug(+Topic)`
7701
7734
  **Contract:** Enables debugging messages for Topic.
7702
- <a id="predicate-reference-0171"></a>
7735
+ <a id="predicate-reference-0172"></a>
7703
7736
  - **`debug/3`** — `library(debug)` · **`det`**
7704
7737
  **Call:** `debug(+Topic,+Format,+Args)`
7705
7738
  **Contract:** Emits a formatted debugging message when Topic is enabled.
7706
- <a id="predicate-reference-0172"></a>
7739
+ <a id="predicate-reference-0173"></a>
7707
7740
  - **`del_assoc/4`** — `library(assoc)` · **`semidet`**
7708
7741
  **Call:** `del_assoc(+Key,+Assoc0,?Value,-Assoc)`
7709
7742
  **Contract:** Removes Key from Assoc0, returning its Value and the remaining Assoc.
7710
- <a id="predicate-reference-0173"></a>
7743
+ <a id="predicate-reference-0174"></a>
7711
7744
  - **`del_attr/2`** — `library(atts)` · **`det`**
7712
7745
  **Call:** `del_attr(+Var,+Module)`
7713
7746
  **Contract:** Removes Module's attribute from Var if present.
7714
- <a id="predicate-reference-0174"></a>
7747
+ <a id="predicate-reference-0175"></a>
7715
7748
  - **`del_edges/3`** — `library(ugraphs)` · **`det`**
7716
7749
  **Call:** `del_edges(+Graph,+Edges,-NewGraph)`
7717
7750
  **Contract:** Removes directed Edges from Graph.
7718
- <a id="predicate-reference-0175"></a>
7751
+ <a id="predicate-reference-0176"></a>
7719
7752
  - **`del_max_assoc/4`** — `library(assoc)` · **`semidet`**
7720
7753
  **Call:** `del_max_assoc(+Assoc0,?Key,?Value,-Assoc)`
7721
7754
  **Contract:** Removes and returns the greatest-key entry of a nonempty association.
7722
- <a id="predicate-reference-0176"></a>
7755
+ <a id="predicate-reference-0177"></a>
7723
7756
  - **`del_min_assoc/4`** — `library(assoc)` · **`semidet`**
7724
7757
  **Call:** `del_min_assoc(+Assoc0,?Key,?Value,-Assoc)`
7725
7758
  **Contract:** Removes and returns the least-key entry of a nonempty association.
7726
- <a id="predicate-reference-0177"></a>
7759
+ <a id="predicate-reference-0178"></a>
7727
7760
  - **`del_vertices/3`** — `library(ugraphs)` · **`det`**
7728
7761
  **Call:** `del_vertices(+Graph,+Vertices,-NewGraph)`
7729
7762
  **Contract:** Removes Vertices and all incident edges from Graph.
7730
- <a id="predicate-reference-0178"></a>
7763
+ <a id="predicate-reference-0179"></a>
7731
7764
  - **`delete_directory/1`** — `library(files)` · **`det`**
7732
7765
  **Call:** `delete_directory(+Path)`
7733
7766
  **Contract:** Deletes the empty directory at Path using the Node filesystem host.
7734
- <a id="predicate-reference-0179"></a>
7767
+ <a id="predicate-reference-0180"></a>
7735
7768
  - **`delete_file/1`** — `library(files)` · **`det`**
7736
7769
  **Call:** `delete_file(+Path)`
7737
7770
  **Contract:** Deletes the file at Path using the Node filesystem host.
7738
- <a id="predicate-reference-0180"></a>
7771
+ <a id="predicate-reference-0181"></a>
7739
7772
  - **`dif_si/2`** — `library(si)` · **`semidet`**
7740
7773
  **Call:** `dif_si(?A,?B)`
7741
7774
  **Contract:** Succeeds when A and B are sufficiently instantiated to decide non-unifiability, otherwise delays or rejects insufficient instantiation as defined by the SI layer.
7742
- <a id="predicate-reference-0181"></a>
7775
+ <a id="predicate-reference-0182"></a>
7743
7776
  - **`dif/2`** — `library(dif)` · **`delayed`**
7744
7777
  **Call:** `dif(?A,?B)`
7745
7778
  **Contract:** Constrains A and B to remain non-unifiable, delaying until the distinction can be decided when necessary.
7746
- <a id="predicate-reference-0182"></a>
7779
+ <a id="predicate-reference-0183"></a>
7747
7780
  - **`dif/3`** — `library(reif)` · **`delayed`**
7748
7781
  **Call:** `dif(?A,?B,?Truth)`
7749
7782
  **Contract:** Reifies disequality of A and B into Boolean Truth.
7750
- <a id="predicate-reference-0183"></a>
7783
+ <a id="predicate-reference-0184"></a>
7751
7784
  - **`difference/3`** — `library(dates)` · **`semidet`**
7752
7785
  **Call:** `difference(+End,+Start,-Duration)`
7753
7786
  **Contract:** Computes the nonnegative calendar difference from Start to End as a normalized ISO-like duration; invalid or descending dates fail.
7754
- <a id="predicate-reference-0184"></a>
7787
+ <a id="predicate-reference-0185"></a>
7755
7788
  - **`directory_exists/1`** — `library(files)` · **`semidet`**
7756
7789
  **Call:** `directory_exists(+Path)`
7757
7790
  **Contract:** Succeeds iff Path exists and is a directory.
7758
- <a id="predicate-reference-0185"></a>
7791
+ <a id="predicate-reference-0186"></a>
7759
7792
  - **`directory_files/2`** — `library(files)` · **`det`**
7760
7793
  **Call:** `directory_files(+Path,-Entries)`
7761
7794
  **Contract:** Returns the directory entries of Path using the host filesystem.
7762
- <a id="predicate-reference-0186"></a>
7795
+ <a id="predicate-reference-0187"></a>
7763
7796
  - **`disjoint2/1`** — `library(clpz)` · **`delayed`**
7764
7797
  **Call:** `disjoint2(+Rectangles)`
7765
7798
  **Contract:** Constrains axis-aligned rectangles not to overlap in two dimensions.
7766
- <a id="predicate-reference-0187"></a>
7799
+ <a id="predicate-reference-0188"></a>
7767
7800
  - **`domain_error/2`** — `library(error)` · **`terminal`**
7768
7801
  **Call:** `domain_error(+Domain,+Term)`
7769
7802
  **Contract:** Raises a domain_error(Domain,Term) exception.
7770
- <a id="predicate-reference-0188"></a>
7803
+ <a id="predicate-reference-0189"></a>
7771
7804
  - **`domain_error/3`** — `library(error)` · **`terminal`**
7772
7805
  **Call:** `domain_error(+Domain,+Term,+Context)`
7773
7806
  **Contract:** Raises a domain_error(Domain,Term) exception carrying Context.
7774
- <a id="predicate-reference-0189"></a>
7807
+ <a id="predicate-reference-0190"></a>
7775
7808
  - **`drop/3`** — `library(lists)` · **`semidet`**
7776
7809
  **Call:** `drop(+Count,+List,-Suffix)`
7777
7810
  **Contract:** Returns the suffix after removing exactly Count leading elements; fails when List is too short.
7778
7811
 
7779
7812
  #### Predicate reference — E
7780
7813
 
7781
- <a id="predicate-reference-0190"></a>
7814
+ <a id="predicate-reference-0191"></a>
7782
7815
  - **`ed25519_keypair_public_key/2`** — `library(crypto)` · **`det`**
7783
7816
  **Call:** `ed25519_keypair_public_key(+KeyPair,-PublicKey)`
7784
7817
  **Contract:** Extracts the Ed25519 public key from KeyPair.
7785
- <a id="predicate-reference-0191"></a>
7818
+ <a id="predicate-reference-0192"></a>
7786
7819
  - **`ed25519_new_keypair/1`** — `library(crypto)` · **`det`**
7787
7820
  **Call:** `ed25519_new_keypair(-KeyPair)`
7788
7821
  **Contract:** Generates a fresh Ed25519 keypair using the host cryptographic backend.
7789
- <a id="predicate-reference-0192"></a>
7822
+ <a id="predicate-reference-0193"></a>
7790
7823
  - **`ed25519_seed_keypair/2`** — `library(crypto)` · **`det`**
7791
7824
  **Call:** `ed25519_seed_keypair(+Seed,-KeyPair)`
7792
7825
  **Contract:** Derives an Ed25519 keypair deterministically from Seed.
7793
- <a id="predicate-reference-0193"></a>
7826
+ <a id="predicate-reference-0194"></a>
7794
7827
  - **`ed25519_sign/4`** — `library(crypto)` · **`det`**
7795
7828
  **Call:** `ed25519_sign(+Data,+KeyPair,-Signature,+Options)`
7796
7829
  **Contract:** Produces an Ed25519 signature of Data using KeyPair and supported Options.
7797
- <a id="predicate-reference-0194"></a>
7830
+ <a id="predicate-reference-0195"></a>
7798
7831
  - **`ed25519_verify/4`** — `library(crypto)` · **`semidet`**
7799
7832
  **Call:** `ed25519_verify(+Data,+PublicKey,+Signature,+Options)`
7800
7833
  **Contract:** Succeeds iff Signature is a valid Ed25519 signature of Data for PublicKey.
7801
- <a id="predicate-reference-0195"></a>
7834
+ <a id="predicate-reference-0196"></a>
7802
7835
  - **`edges/2`** — `library(ugraphs)` · **`det`**
7803
7836
  **Call:** `edges(+Graph,-Edges)`
7804
7837
  **Contract:** Returns all directed Vertex-Neighbor edges of Graph.
7805
- <a id="predicate-reference-0196"></a>
7838
+ <a id="predicate-reference-0197"></a>
7806
7839
  - **`element/3`** — `library(clpz)` · **`delayed`**
7807
7840
  **Call:** `element(?Index,+List,?Element)`
7808
7841
  **Contract:** Constrains one-based Index and Element so Element is the indexed member of List.
7809
- <a id="predicate-reference-0197"></a>
7842
+ <a id="predicate-reference-0198"></a>
7810
7843
  - **`empty_assoc/1`** — `library(assoc)` · **`det`**
7811
7844
  **Call:** `empty_assoc(-Assoc)`
7812
7845
  **Contract:** Constructs the empty association tree.
7813
- <a id="predicate-reference-0198"></a>
7846
+ <a id="predicate-reference-0199"></a>
7814
7847
  - **`exclude/3`** — `library(lists)` · **`meta`**
7815
7848
  **Call:** `exclude(+Pred,+List,-Excluded)`
7816
7849
  **Contract:** Keeps exactly the elements of List for which Pred fails, preserving order.
7817
- <a id="predicate-reference-0199"></a>
7850
+ <a id="predicate-reference-0200"></a>
7818
7851
  - **`expmod/4`** — `library(arithmetic)` · **`det`**
7819
7852
  **Call:** `expmod(+Base,+Exponent,+Modulus,-Result)`
7820
7853
  **Contract:** Computes Base^Exponent modulo Modulus for integer inputs.
7821
7854
 
7822
7855
  #### Predicate reference — F
7823
7856
 
7824
- <a id="predicate-reference-0200"></a>
7857
+ <a id="predicate-reference-0201"></a>
7825
7858
  - **`fail/0`** — `ISO core` · **`semidet`**
7826
7859
  **Call:** `fail`
7827
7860
  **Contract:** Always fails.
7828
- <a id="predicate-reference-0201"></a>
7861
+ <a id="predicate-reference-0202"></a>
7829
7862
  - **`false/0`** — `ISO core` · **`semidet`**
7830
7863
  **Call:** `false`
7831
7864
  **Contract:** Always fails; this compatibility alias is protected from source redefinition.
7832
- <a id="predicate-reference-0202"></a>
7865
+ <a id="predicate-reference-0203"></a>
7833
7866
  - **`fd_dom/2`** — `library(clpz)` · **`det`**
7834
7867
  **Call:** `fd_dom(+Var,?Domain)`
7835
7868
  **Contract:** Returns a term describing Var's current finite domain.
7836
- <a id="predicate-reference-0203"></a>
7869
+ <a id="predicate-reference-0204"></a>
7837
7870
  - **`fd_inf/2`** — `library(clpz)` · **`det`**
7838
7871
  **Call:** `fd_inf(+Var,?Infimum)`
7839
7872
  **Contract:** Returns the current lower bound of Var's finite domain.
7840
- <a id="predicate-reference-0204"></a>
7873
+ <a id="predicate-reference-0205"></a>
7841
7874
  - **`fd_size/2`** — `library(clpz)` · **`det`**
7842
7875
  **Call:** `fd_size(+Var,?Size)`
7843
7876
  **Contract:** Returns the cardinality of Var's current finite domain when finite.
7844
- <a id="predicate-reference-0205"></a>
7877
+ <a id="predicate-reference-0206"></a>
7845
7878
  - **`fd_sup/2`** — `library(clpz)` · **`det`**
7846
7879
  **Call:** `fd_sup(+Var,?Supremum)`
7847
7880
  **Contract:** Returns the current upper bound of Var's finite domain.
7848
- <a id="predicate-reference-0206"></a>
7881
+ <a id="predicate-reference-0207"></a>
7849
7882
  - **`fd_var/1`** — `library(clpz)` · **`semidet`**
7850
7883
  **Call:** `fd_var(?Term)`
7851
7884
  **Contract:** Succeeds iff Term is currently a CLP(Z) finite-domain variable.
7852
- <a id="predicate-reference-0207"></a>
7885
+ <a id="predicate-reference-0208"></a>
7853
7886
  - **`file_access_time/2`** — `library(files)` · **`det`**
7854
7887
  **Call:** `file_access_time(+Path,-Time)`
7855
7888
  **Contract:** Returns the host access timestamp for Path.
7856
- <a id="predicate-reference-0208"></a>
7889
+ <a id="predicate-reference-0209"></a>
7857
7890
  - **`file_copy/2`** — `library(files)` · **`det`**
7858
7891
  **Call:** `file_copy(+Source,+Target)`
7859
7892
  **Contract:** Copies Source to Target using the Node filesystem host.
7860
- <a id="predicate-reference-0209"></a>
7893
+ <a id="predicate-reference-0210"></a>
7861
7894
  - **`file_creation_time/2`** — `library(files)` · **`det`**
7862
7895
  **Call:** `file_creation_time(+Path,-Time)`
7863
7896
  **Contract:** Returns the host creation/birth timestamp for Path.
7864
- <a id="predicate-reference-0210"></a>
7897
+ <a id="predicate-reference-0211"></a>
7865
7898
  - **`file_exists/1`** — `library(files)` · **`semidet`**
7866
7899
  **Call:** `file_exists(+Path)`
7867
7900
  **Contract:** Succeeds iff Path exists and is a regular file.
7868
- <a id="predicate-reference-0211"></a>
7901
+ <a id="predicate-reference-0212"></a>
7869
7902
  - **`file_modification_time/2`** — `library(files)` · **`det`**
7870
7903
  **Call:** `file_modification_time(+Path,-Time)`
7871
7904
  **Contract:** Returns the host modification timestamp for Path.
7872
- <a id="predicate-reference-0212"></a>
7905
+ <a id="predicate-reference-0213"></a>
7873
7906
  - **`file_size/2`** — `library(files)` · **`det`**
7874
7907
  **Call:** `file_size(+Path,-Bytes)`
7875
7908
  **Contract:** Returns the size of Path in bytes.
7876
- <a id="predicate-reference-0213"></a>
7909
+ <a id="predicate-reference-0214"></a>
7877
7910
  - **`findall/3`** — `ISO core` · **`det`**
7878
7911
  **Call:** `findall(+Template,+Goal,?Bag)`
7879
7912
  **Contract:** Collects a copy of Template for every solution of Goal, treating all free variables existentially; the empty result is [].
7880
- <a id="predicate-reference-0214"></a>
7913
+ <a id="predicate-reference-0215"></a>
7881
7914
  - **`findall/4`** — `library(iso_ext)` · **`det`**
7882
7915
  **Call:** `findall(+Template,+Goal,?List,?Tail)`
7883
7916
  **Contract:** Collects Template solutions as a difference list whose tail is Tail.
7884
- <a id="predicate-reference-0215"></a>
7917
+ <a id="predicate-reference-0216"></a>
7885
7918
  - **`float/1`** — `ISO core` · **`semidet`**
7886
7919
  **Call:** `float(?Term)`
7887
7920
  **Contract:** Succeeds iff Term is a floating-point number.
7888
- <a id="predicate-reference-0216"></a>
7921
+ <a id="predicate-reference-0217"></a>
7889
7922
  - **`flush_output/0`** — `ISO core` · **`det`**
7890
7923
  **Call:** `flush_output`
7891
7924
  **Contract:** Flushes buffered output on the current output stream.
7892
- <a id="predicate-reference-0217"></a>
7925
+ <a id="predicate-reference-0218"></a>
7893
7926
  - **`flush_output/1`** — `ISO core` · **`det`**
7894
7927
  **Call:** `flush_output(+Stream)`
7895
7928
  **Contract:** Flushes buffered output on Stream.
7896
- <a id="predicate-reference-0218"></a>
7929
+ <a id="predicate-reference-0219"></a>
7897
7930
  - **`foldl/4`** — `library(lists)` · **`meta`**
7898
7931
  **Call:** `foldl(+Goal,+List1,+State0,-State)`
7899
7932
  **Contract:** Folds Goal left-to-right over 1 list(s), threading an accumulator from State0 to State.
7900
- <a id="predicate-reference-0219"></a>
7933
+ <a id="predicate-reference-0220"></a>
7901
7934
  - **`foldl/5`** — `library(lists)` · **`meta`**
7902
7935
  **Call:** `foldl(+Goal,+List1,+List2,+State0,-State)`
7903
7936
  **Contract:** Folds Goal left-to-right over 2 list(s), threading an accumulator from State0 to State.
7904
- <a id="predicate-reference-0220"></a>
7937
+ <a id="predicate-reference-0221"></a>
7905
7938
  - **`foldl/6`** — `library(lists)` · **`meta`**
7906
7939
  **Call:** `foldl(+Goal,+List1,+List2,+List3,+State0,-State)`
7907
7940
  **Contract:** Folds Goal left-to-right over 3 list(s), threading an accumulator from State0 to State.
7908
- <a id="predicate-reference-0221"></a>
7941
+ <a id="predicate-reference-0222"></a>
7909
7942
  - **`forall/2`** — `library(iso_ext)` · **`semidet`**
7910
7943
  **Call:** `forall(+Condition,+Action)`
7911
7944
  **Contract:** Succeeds iff Action succeeds for every solution of Condition, implemented by double negation.
7912
- <a id="predicate-reference-0222"></a>
7945
+ <a id="predicate-reference-0223"></a>
7913
7946
  - **`format_/4`** — `library(format)` · **`det`**
7914
7947
  **Call:** `format_(+Format,+Args,?S0,?S)`
7915
7948
  **Contract:** Expanded DCG form of format_//2, relating formatted characters between difference-list states S0 and S.
7916
- <a id="predicate-reference-0223"></a>
7949
+ <a id="predicate-reference-0224"></a>
7917
7950
  - **`format_time/4`** — `library(time)` · **`det`**
7918
7951
  **Call:** `format_time(+Format,+Stamp,?S0,?S)`
7919
7952
  **Contract:** Expanded DCG form of format_time//2, emitting formatted time characters between S0 and S.
7920
- <a id="predicate-reference-0224"></a>
7953
+ <a id="predicate-reference-0225"></a>
7921
7954
  - **`format/2`** — `library(format)` · **`det`**
7922
7955
  **Call:** `format(+Format,+Args)`
7923
7956
  **Contract:** Formats Args according to Format and writes the result to the current output stream.
7924
- <a id="predicate-reference-0225"></a>
7957
+ <a id="predicate-reference-0226"></a>
7925
7958
  - **`format/3`** — `library(format)` · **`det`**
7926
7959
  **Call:** `format(+Stream,+Format,+Args)`
7927
7960
  **Contract:** Formats Args according to Format and writes the result to Stream.
7928
- <a id="predicate-reference-0226"></a>
7961
+ <a id="predicate-reference-0227"></a>
7929
7962
  - **`freeze/2`** — `library(freeze)` · **`delayed`**
7930
7963
  **Call:** `freeze(?Var,+Goal)`
7931
7964
  **Contract:** If Var is unbound, delays Goal until Var becomes instantiated; otherwise calls Goal immediately.
7932
- <a id="predicate-reference-0227"></a>
7965
+ <a id="predicate-reference-0228"></a>
7933
7966
  - **`frozen/2`** — `library(freeze)` · **`det`**
7934
7967
  **Call:** `frozen(+Term,-Goal)`
7935
7968
  **Contract:** Collects residual freeze goals attached to attributed variables in Term and returns them as a conjunction, or true when none remain.
7936
- <a id="predicate-reference-0228"></a>
7969
+ <a id="predicate-reference-0229"></a>
7937
7970
  - **`functor/3`** — `ISO core` · **`mode-dependent`**
7938
7971
  **Call:** `functor(?Term,?Name,?Arity)`
7939
7972
  **Contract:** Decomposes an instantiated term into functor and arity, or constructs a term when Name and Arity are given.
7940
7973
 
7941
7974
  #### Predicate reference — G
7942
7975
 
7943
- <a id="predicate-reference-0229"></a>
7976
+ <a id="predicate-reference-0230"></a>
7944
7977
  - **`ge/2`** — `library(comparison)` · **`semidet`**
7945
7978
  **Call:** `ge(+A,+B)`
7946
7979
  **Contract:** Succeeds iff A is greater than or equal to B under the library's portable comparison rules.
7947
- <a id="predicate-reference-0230"></a>
7980
+ <a id="predicate-reference-0231"></a>
7948
7981
  - **`gen_assoc/3`** — `library(assoc)` · **`nondet`**
7949
7982
  **Call:** `gen_assoc(?Key,+Assoc,?Value)`
7950
7983
  **Contract:** Enumerates or checks Key-Value bindings stored in Assoc in key order.
7951
- <a id="predicate-reference-0231"></a>
7984
+ <a id="predicate-reference-0232"></a>
7952
7985
  - **`gen_int/1`** — `library(between)` · **`multi`**
7953
7986
  **Call:** `gen_int(?N)`
7954
7987
  **Contract:** Enumerates all integers in an expanding symmetric sequence.
7955
- <a id="predicate-reference-0232"></a>
7988
+ <a id="predicate-reference-0233"></a>
7956
7989
  - **`gen_nat/1`** — `library(between)` · **`multi`**
7957
7990
  **Call:** `gen_nat(?N)`
7958
7991
  **Contract:** Enumerates the natural numbers 0,1,2,... without bound.
7959
- <a id="predicate-reference-0233"></a>
7992
+ <a id="predicate-reference-0234"></a>
7960
7993
  - **`gensym/2`** — `library(gensym)` · **`det`**
7961
7994
  **Call:** `gensym(+Base,-Atom)`
7962
7995
  **Contract:** Generates the next process-local atom formed from Base and its monotonically increasing counter.
7963
- <a id="predicate-reference-0234"></a>
7996
+ <a id="predicate-reference-0235"></a>
7964
7997
  - **`get_assoc/3`** — `library(assoc)` · **`semidet`**
7965
7998
  **Call:** `get_assoc(+Key,+Assoc,?Value)`
7966
7999
  **Contract:** Looks up Key in Assoc and relates it to Value.
7967
- <a id="predicate-reference-0235"></a>
8000
+ <a id="predicate-reference-0236"></a>
7968
8001
  - **`get_assoc/5`** — `library(assoc)` · **`semidet`**
7969
8002
  **Call:** `get_assoc(+Key,+Assoc0,?OldValue,-Assoc,+NewValue)`
7970
8003
  **Contract:** Looks up Key and, when present, returns OldValue together with a copy having that key updated to NewValue.
7971
- <a id="predicate-reference-0236"></a>
8004
+ <a id="predicate-reference-0237"></a>
7972
8005
  - **`get_attr/3`** — `library(atts)` · **`semidet`**
7973
8006
  **Call:** `get_attr(+Var,+Module,?Value)`
7974
8007
  **Contract:** Retrieves Module's attribute Value from attributed variable Var.
7975
- <a id="predicate-reference-0237"></a>
8008
+ <a id="predicate-reference-0238"></a>
7976
8009
  - **`get_atts/2`** — `library(atts)` · **`semidet`**
7977
8010
  **Call:** `get_atts(+Var,?Attributes)`
7978
8011
  **Contract:** Compatibility relation that retrieves or matches the attribute collection of Var.
7979
- <a id="predicate-reference-0238"></a>
8012
+ <a id="predicate-reference-0239"></a>
7980
8013
  - **`get_byte/1`** — `ISO core` · **`det`**
7981
8014
  **Call:** `get_byte(?Byte)`
7982
8015
  **Contract:** Reads the next byte from the current binary input stream, or -1 at end of file.
7983
- <a id="predicate-reference-0239"></a>
8016
+ <a id="predicate-reference-0240"></a>
7984
8017
  - **`get_byte/2`** — `ISO core` · **`det`**
7985
8018
  **Call:** `get_byte(+Stream,?Byte)`
7986
8019
  **Contract:** Reads the next byte from Stream, or -1 at end of file.
7987
- <a id="predicate-reference-0240"></a>
8020
+ <a id="predicate-reference-0241"></a>
7988
8021
  - **`get_char/1`** — `ISO core` · **`det`**
7989
8022
  **Call:** `get_char(?Char)`
7990
8023
  **Contract:** Reads the next character from the current input stream, or end_of_file.
7991
- <a id="predicate-reference-0241"></a>
8024
+ <a id="predicate-reference-0242"></a>
7992
8025
  - **`get_char/2`** — `ISO core` · **`det`**
7993
8026
  **Call:** `get_char(+Stream,?Char)`
7994
8027
  **Contract:** Reads the next character from Stream, or end_of_file.
7995
- <a id="predicate-reference-0242"></a>
8028
+ <a id="predicate-reference-0243"></a>
7996
8029
  - **`get_code/1`** — `ISO core` · **`det`**
7997
8030
  **Call:** `get_code(?Code)`
7998
8031
  **Contract:** Reads the next character code from the current input stream, or -1 at end of file.
7999
- <a id="predicate-reference-0243"></a>
8032
+ <a id="predicate-reference-0244"></a>
8000
8033
  - **`get_code/2`** — `ISO core` · **`det`**
8001
8034
  **Call:** `get_code(+Stream,?Code)`
8002
8035
  **Contract:** Reads the next character code from Stream, or -1 at end of file.
8003
- <a id="predicate-reference-0244"></a>
8036
+ <a id="predicate-reference-0245"></a>
8004
8037
  - **`get_line_to_chars/3`** — `library(charsio)` · **`det`**
8005
8038
  **Call:** `get_line_to_chars(+Stream,-Chars,?Tail)`
8006
8039
  **Contract:** Reads a line of characters from Stream and appends Tail, enabling difference-list use.
8007
- <a id="predicate-reference-0245"></a>
8040
+ <a id="predicate-reference-0246"></a>
8008
8041
  - **`get_n_chars/3`** — `library(charsio)` · **`det`**
8009
8042
  **Call:** `get_n_chars(+Stream,+Count,-Chars)`
8010
8043
  **Contract:** Reads up to Count characters from Stream.
8011
- <a id="predicate-reference-0246"></a>
8044
+ <a id="predicate-reference-0247"></a>
8012
8045
  - **`get_single_char/1`** — `library(charsio)` · **`det`**
8013
8046
  **Call:** `get_single_char(-Code)`
8014
8047
  **Contract:** Reads one character code from the current input stream without line editing.
8015
- <a id="predicate-reference-0247"></a>
8048
+ <a id="predicate-reference-0248"></a>
8016
8049
  - **`getenv/2`** — `library(os)` · **`semidet`**
8017
8050
  **Call:** `getenv(+Name,?Value)`
8018
8051
  **Contract:** Relates environment variable Name to its current host Value.
8019
- <a id="predicate-reference-0248"></a>
8052
+ <a id="predicate-reference-0249"></a>
8020
8053
  - **`global_cardinality/2`** — `library(clpz)` · **`delayed`**
8021
8054
  **Call:** `global_cardinality(+Vars,+Pairs)`
8022
8055
  **Contract:** Constrains Value-Count pairs to describe occurrence counts of values in Vars.
8023
- <a id="predicate-reference-0249"></a>
8056
+ <a id="predicate-reference-0250"></a>
8024
8057
  - **`global_cardinality/3`** — `library(clpz)` · **`delayed`**
8025
8058
  **Call:** `global_cardinality(+Vars,+Pairs,+Options)`
8026
8059
  **Contract:** Posts global-cardinality constraints with supported cost/options extensions.
8027
- <a id="predicate-reference-0250"></a>
8060
+ <a id="predicate-reference-0251"></a>
8028
8061
  - **`ground/1`** — `ISO core` · **`semidet`**
8029
8062
  **Call:** `ground(?Term)`
8030
8063
  **Contract:** Succeeds iff Term contains no unbound variables.
8031
- <a id="predicate-reference-0251"></a>
8064
+ <a id="predicate-reference-0252"></a>
8032
8065
  - **`group_pairs_by_key/2`** — `library(pairs)` · **`det`**
8033
8066
  **Call:** `group_pairs_by_key(+Pairs,-Grouped)`
8034
8067
  **Contract:** Groups consecutive equal-key pairs into Key-Values pairs; input is expected to be key ordered.
8035
- <a id="predicate-reference-0252"></a>
8068
+ <a id="predicate-reference-0253"></a>
8036
8069
  - **`gt/2`** — `library(comparison)` · **`semidet`**
8037
8070
  **Call:** `gt(+A,+B)`
8038
8071
  **Contract:** Succeeds iff A is greater than B under the library's portable comparison rules.
8039
8072
 
8040
8073
  #### Predicate reference — H
8041
8074
 
8042
- <a id="predicate-reference-0253"></a>
8075
+ <a id="predicate-reference-0254"></a>
8043
8076
  - **`halt/0`** — `ISO core` · **`terminal`**
8044
8077
  **Call:** `halt`
8045
8078
  **Contract:** Requests processor termination with status 0.
8046
- <a id="predicate-reference-0254"></a>
8079
+ <a id="predicate-reference-0255"></a>
8047
8080
  - **`halt/1`** — `ISO core` · **`terminal`**
8048
8081
  **Call:** `halt(+Status)`
8049
8082
  **Contract:** Requests processor termination with the supplied integer status.
8050
- <a id="predicate-reference-0255"></a>
8083
+ <a id="predicate-reference-0256"></a>
8051
8084
  - **`hex_bytes/2`** — `library(crypto)` · **`mode-dependent`**
8052
8085
  **Call:** `hex_bytes(?Hex,?Bytes)`
8053
8086
  **Contract:** Relates hexadecimal character data to the corresponding byte list.
8054
8087
 
8055
8088
  #### Predicate reference — I
8056
8089
 
8057
- <a id="predicate-reference-0256"></a>
8090
+ <a id="predicate-reference-0257"></a>
8058
8091
  - **`if_/3`** — `library(reif)` · **`meta`**
8059
8092
  **Call:** `if_(+Condition,+Then,+Else)`
8060
8093
  **Contract:** Calls reified Condition and commits to Then when it yields true or Else when it yields false.
8061
- <a id="predicate-reference-0257"></a>
8094
+ <a id="predicate-reference-0258"></a>
8062
8095
  - **`in/2`** — `library(clpz)` · **`delayed`**
8063
8096
  **Call:** `in(?Left,?Right)`
8064
8097
  **Contract:** Constrains one integer variable/expression to the supplied finite-domain expression.
8065
- <a id="predicate-reference-0258"></a>
8098
+ <a id="predicate-reference-0259"></a>
8066
8099
  - **`include/3`** — `library(lists)` · **`meta`**
8067
8100
  **Call:** `include(+Pred,+List,-Included)`
8068
8101
  **Contract:** Keeps exactly the elements of List for which Pred succeeds, preserving order.
8069
- <a id="predicate-reference-0259"></a>
8102
+ <a id="predicate-reference-0260"></a>
8070
8103
  - **`indomain/1`** — `library(clpz)` · **`nondet`**
8071
8104
  **Call:** `indomain(+Var)`
8072
8105
  **Contract:** Enumerates the finite-domain values currently permitted for Var.
8073
- <a id="predicate-reference-0260"></a>
8106
+ <a id="predicate-reference-0261"></a>
8074
8107
  - **`ins/2`** — `library(clpz)` · **`delayed`**
8075
8108
  **Call:** `ins(?Left,?Right)`
8076
8109
  **Contract:** Constrains every variable in a list to the supplied finite-domain expression.
8077
- <a id="predicate-reference-0261"></a>
8110
+ <a id="predicate-reference-0262"></a>
8078
8111
  - **`instantiation_error/0`** — `library(error)` · **`terminal`**
8079
8112
  **Call:** `instantiation_error`
8080
8113
  **Contract:** Raises error(instantiation_error,[]).
8081
- <a id="predicate-reference-0262"></a>
8114
+ <a id="predicate-reference-0263"></a>
8082
8115
  - **`instantiation_error/1`** — `library(error)` · **`terminal`**
8083
8116
  **Call:** `instantiation_error(+Context)`
8084
8117
  **Contract:** Raises an instantiation error carrying Context.
8085
- <a id="predicate-reference-0263"></a>
8118
+ <a id="predicate-reference-0264"></a>
8086
8119
  - **`integer_si/1`** — `library(si)` · **`semidet`**
8087
8120
  **Call:** `integer_si(?Term)`
8088
8121
  **Contract:** Succeeds iff Term is sufficiently instantiated to be treated as integer by dependent constraint code.
8089
- <a id="predicate-reference-0264"></a>
8122
+ <a id="predicate-reference-0265"></a>
8090
8123
  - **`integer/1`** — `ISO core` · **`semidet`**
8091
8124
  **Call:** `integer(?Term)`
8092
8125
  **Contract:** Succeeds iff Term is an integer.
8093
- <a id="predicate-reference-0265"></a>
8126
+ <a id="predicate-reference-0266"></a>
8094
8127
  - **`intersection/3`** — `library(lists)` · **`det`**
8095
8128
  **Call:** `intersection(+A,+B,-Intersection)`
8096
8129
  **Contract:** Keeps elements of A that unify with some member of B, preserving A order.
8097
- <a id="predicate-reference-0266"></a>
8130
+ <a id="predicate-reference-0267"></a>
8098
8131
  - **`is_assoc/1`** — `library(assoc)` · **`semidet`**
8099
8132
  **Call:** `is_assoc(+Assoc)`
8100
8133
  **Contract:** Succeeds iff Assoc is a valid association tree.
8101
- <a id="predicate-reference-0267"></a>
8134
+ <a id="predicate-reference-0268"></a>
8102
8135
  - **`is_ordset/1`** — `library(ordsets)` · **`semidet`**
8103
8136
  **Call:** `is_ordset(+Set)`
8104
8137
  **Contract:** Succeeds iff Set is a proper strictly ordered duplicate-free list under standard term order.
8105
- <a id="predicate-reference-0268"></a>
8138
+ <a id="predicate-reference-0269"></a>
8106
8139
  - **`is_set/1`** — `library(lists)` · **`semidet`**
8107
8140
  **Call:** `is_set(+List)`
8108
8141
  **Contract:** Succeeds iff List is proper and contains no duplicate terms under the library's set equality test.
8109
- <a id="predicate-reference-0269"></a>
8142
+ <a id="predicate-reference-0270"></a>
8110
8143
  - **`is/2`** — `ISO core` · **`semidet`**
8111
8144
  **Call:** `(?Result is +Expression)`
8112
8145
  **Contract:** Evaluates the arithmetic Expression and unifies Result with the resulting number.
8113
8146
 
8114
8147
  #### Predicate reference — J
8115
8148
 
8116
- <a id="predicate-reference-0270"></a>
8149
+ <a id="predicate-reference-0271"></a>
8117
8150
  - **`join/3`** — `library(strings)` · **`det`**
8118
8151
  **Call:** `join(+Parts,+Separator,-Text)`
8119
8152
  **Contract:** Joins lexical Parts with literal Separator to produce Text.
8120
8153
 
8121
8154
  #### Predicate reference — K
8122
8155
 
8123
- <a id="predicate-reference-0271"></a>
8156
+ <a id="predicate-reference-0272"></a>
8124
8157
  - **`keysort/2`** — `ISO core` · **`det`**
8125
8158
  **Call:** `keysort(+Pairs,?Sorted)`
8126
8159
  **Contract:** Stably sorts Key-Value pairs by key without removing duplicates.
8127
8160
 
8128
8161
  #### Predicate reference — L
8129
8162
 
8130
- <a id="predicate-reference-0272"></a>
8163
+ <a id="predicate-reference-0273"></a>
8131
8164
  - **`label/1`** — `library(clpz)` · **`nondet`**
8132
8165
  **Call:** `label(+Vars)`
8133
8166
  **Contract:** Labels Vars using default CLP(Z) enumeration options.
8134
- <a id="predicate-reference-0273"></a>
8167
+ <a id="predicate-reference-0274"></a>
8135
8168
  - **`labeling/1`** — `library(clpb)` · **`nondet`**
8136
8169
  **Call:** `labeling(+BooleanVariables)`
8137
8170
  **Contract:** Enumerates truth assignments for constrained Boolean variables.
8138
- <a id="predicate-reference-0274"></a>
8171
+ <a id="predicate-reference-0275"></a>
8139
8172
  - **`labeling/2`** — `library(clpz)` · **`nondet`**
8140
8173
  **Call:** `labeling(+Options,+Vars)`
8141
8174
  **Contract:** Enumerates integer assignments satisfying posted constraints using the requested labeling Options.
8142
- <a id="predicate-reference-0275"></a>
8175
+ <a id="predicate-reference-0276"></a>
8143
8176
  - **`last/2`** — `library(lists)` · **`semidet`**
8144
8177
  **Call:** `last(+List,?Last)`
8145
8178
  **Contract:** Relates Last to the final element of a nonempty proper list.
8146
- <a id="predicate-reference-0276"></a>
8179
+ <a id="predicate-reference-0277"></a>
8147
8180
  - **`lcm/3`** — `library(arithmetic)` · **`det`**
8148
8181
  **Call:** `lcm(+A,+B,-LCM)`
8149
8182
  **Contract:** Computes the least common multiple of integers A and B.
8150
- <a id="predicate-reference-0277"></a>
8183
+ <a id="predicate-reference-0278"></a>
8151
8184
  - **`le/2`** — `library(comparison)` · **`semidet`**
8152
8185
  **Call:** `le(+A,+B)`
8153
8186
  **Contract:** Succeeds iff A is less than or equal to B under the library's portable comparison rules.
8154
- <a id="predicate-reference-0278"></a>
8187
+ <a id="predicate-reference-0279"></a>
8155
8188
  - **`length/2`** — `library(lists)` · **`nondet`**
8156
8189
  **Call:** `length(?List,?Length)`
8157
8190
  **Contract:** Relates a list skeleton to its nonnegative length; with both arguments variable it enumerates increasing finite lengths.
8158
- <a id="predicate-reference-0279"></a>
8191
+ <a id="predicate-reference-0280"></a>
8159
8192
  - **`lex_chain/1`** — `library(clpz)` · **`delayed`**
8160
8193
  **Call:** `lex_chain(+Lists)`
8161
8194
  **Contract:** Constrains successive lists to be lexicographically nondecreasing.
8162
- <a id="predicate-reference-0280"></a>
8195
+ <a id="predicate-reference-0281"></a>
8163
8196
  - **`list_max/2`** — `library(lists)` · **`semidet`**
8164
8197
  **Call:** `list_max(+List,-Max)`
8165
8198
  **Contract:** Compatibility alias returning the greatest element of a nonempty list.
8166
- <a id="predicate-reference-0281"></a>
8199
+ <a id="predicate-reference-0282"></a>
8167
8200
  - **`list_min/2`** — `library(lists)` · **`semidet`**
8168
8201
  **Call:** `list_min(+List,-Min)`
8169
8202
  **Contract:** Compatibility alias returning the least element of a nonempty list.
8170
- <a id="predicate-reference-0282"></a>
8203
+ <a id="predicate-reference-0283"></a>
8171
8204
  - **`list_si/1`** — `library(si)` · **`semidet`**
8172
8205
  **Call:** `list_si(?Term)`
8173
8206
  **Contract:** Succeeds iff Term is sufficiently instantiated to be treated as list by dependent constraint code.
8174
- <a id="predicate-reference-0283"></a>
8207
+ <a id="predicate-reference-0284"></a>
8175
8208
  - **`list_to_assoc/2`** — `library(assoc)` · **`det`**
8176
8209
  **Call:** `list_to_assoc(+Pairs,-Assoc)`
8177
8210
  **Contract:** Builds an association tree from Key-Value pairs after key ordering/validation.
8178
- <a id="predicate-reference-0284"></a>
8211
+ <a id="predicate-reference-0285"></a>
8179
8212
  - **`list_to_ord_set/2`** — `library(ordsets)` · **`det`**
8180
8213
  **Call:** `list_to_ord_set(+List,-Set)`
8181
8214
  **Contract:** Sorts List and removes duplicates to form an ordered set.
8182
- <a id="predicate-reference-0285"></a>
8215
+ <a id="predicate-reference-0286"></a>
8183
8216
  - **`list_to_set/2`** — `library(lists)` · **`det`**
8184
8217
  **Call:** `list_to_set(+List,-Set)`
8185
8218
  **Contract:** Removes later structural duplicates while preserving first-occurrence order.
8186
- <a id="predicate-reference-0286"></a>
8219
+ <a id="predicate-reference-0287"></a>
8187
8220
  - **`listing/1`** — `library(format)` · **`nondet`**
8188
8221
  **Call:** `listing(+PredicateSpec)`
8189
8222
  **Contract:** Writes accessible clauses selected by PredicateSpec in source-like form.
8190
- <a id="predicate-reference-0287"></a>
8223
+ <a id="predicate-reference-0288"></a>
8191
8224
  - **`lowercase/2`** — `library(strings)` · **`det`**
8192
8225
  **Call:** `lowercase(+Text,-Lower)`
8193
8226
  **Contract:** Maps ASCII uppercase letters in Text to lowercase while preserving other characters.
8194
- <a id="predicate-reference-0288"></a>
8227
+ <a id="predicate-reference-0289"></a>
8195
8228
  - **`lsb/2`** — `library(arithmetic)` · **`semidet`**
8196
8229
  **Call:** `lsb(+Integer,-Index)`
8197
8230
  **Contract:** Returns the zero-based index of the least significant set bit of a positive integer.
8198
- <a id="predicate-reference-0289"></a>
8231
+ <a id="predicate-reference-0290"></a>
8199
8232
  - **`lt/2`** — `library(comparison)` · **`semidet`**
8200
8233
  **Call:** `lt(+A,+B)`
8201
8234
  **Contract:** Succeeds iff A is less than B under the library's portable comparison rules.
8202
8235
 
8203
8236
  #### Predicate reference — M
8204
8237
 
8205
- <a id="predicate-reference-0290"></a>
8238
+ <a id="predicate-reference-0291"></a>
8206
8239
  - **`make_directory_path/1`** — `library(files)` · **`det`**
8207
8240
  **Call:** `make_directory_path(+Path)`
8208
8241
  **Contract:** Creates Path and any missing parent directories.
8209
- <a id="predicate-reference-0291"></a>
8242
+ <a id="predicate-reference-0292"></a>
8210
8243
  - **`make_directory/1`** — `library(files)` · **`det`**
8211
8244
  **Call:** `make_directory(+Path)`
8212
8245
  **Contract:** Creates one directory at Path.
8213
- <a id="predicate-reference-0292"></a>
8246
+ <a id="predicate-reference-0293"></a>
8214
8247
  - **`map_assoc/2`** — `library(assoc)` · **`meta`**
8215
8248
  **Call:** `map_assoc(+Goal,+Assoc)`
8216
8249
  **Contract:** Calls Goal for each value in Assoc in key order.
8217
- <a id="predicate-reference-0293"></a>
8250
+ <a id="predicate-reference-0294"></a>
8218
8251
  - **`map_assoc/3`** — `library(assoc)` · **`meta`**
8219
8252
  **Call:** `map_assoc(+Goal,+Assoc0,-Assoc)`
8220
8253
  **Contract:** Maps Goal over corresponding values of Assoc0 to construct Assoc with the same keys.
8221
- <a id="predicate-reference-0294"></a>
8254
+ <a id="predicate-reference-0295"></a>
8222
8255
  - **`map_list_to_pairs/3`** — `library(pairs)` · **`meta`**
8223
8256
  **Call:** `map_list_to_pairs(+Goal,+List,-Pairs)`
8224
8257
  **Contract:** Calls Goal(Element,Key) for each element and returns Key-Element pairs in input order.
8225
- <a id="predicate-reference-0295"></a>
8258
+ <a id="predicate-reference-0296"></a>
8226
8259
  - **`maplist/2`** — `library(lists)` · **`meta`**
8227
8260
  **Call:** `maplist(+Goal,?List1)`
8228
8261
  **Contract:** Calls Goal pointwise over 1 list(s); all lists must end together and Goal receives the corresponding elements.
8229
- <a id="predicate-reference-0296"></a>
8262
+ <a id="predicate-reference-0297"></a>
8230
8263
  - **`maplist/3`** — `library(lists)` · **`meta`**
8231
8264
  **Call:** `maplist(+Goal,?List1,?List2)`
8232
8265
  **Contract:** Calls Goal pointwise over 2 list(s); all lists must end together and Goal receives the corresponding elements.
8233
- <a id="predicate-reference-0297"></a>
8266
+ <a id="predicate-reference-0298"></a>
8234
8267
  - **`maplist/4`** — `library(lists)` · **`meta`**
8235
8268
  **Call:** `maplist(+Goal,?List1,?List2,?List3)`
8236
8269
  **Contract:** Calls Goal pointwise over 3 list(s); all lists must end together and Goal receives the corresponding elements.
8237
- <a id="predicate-reference-0298"></a>
8270
+ <a id="predicate-reference-0299"></a>
8238
8271
  - **`maplist/5`** — `library(lists)` · **`meta`**
8239
8272
  **Call:** `maplist(+Goal,?List1,?List2,?List3,?List4)`
8240
8273
  **Contract:** Calls Goal pointwise over 4 list(s); all lists must end together and Goal receives the corresponding elements.
8241
- <a id="predicate-reference-0299"></a>
8274
+ <a id="predicate-reference-0300"></a>
8242
8275
  - **`maplist/6`** — `library(lists)` · **`meta`**
8243
8276
  **Call:** `maplist(+Goal,?List1,?List2,?List3,?List4,?List5)`
8244
8277
  **Contract:** Calls Goal pointwise over 5 list(s); all lists must end together and Goal receives the corresponding elements.
8245
- <a id="predicate-reference-0300"></a>
8278
+ <a id="predicate-reference-0301"></a>
8246
8279
  - **`maplist/7`** — `library(lists)` · **`meta`**
8247
8280
  **Call:** `maplist(+Goal,?List1,?List2,?List3,?List4,?List5,?List6)`
8248
8281
  **Contract:** Calls Goal pointwise over 6 list(s); all lists must end together and Goal receives the corresponding elements.
8249
- <a id="predicate-reference-0301"></a>
8282
+ <a id="predicate-reference-0302"></a>
8250
8283
  - **`maplist/8`** — `library(lists)` · **`meta`**
8251
8284
  **Call:** `maplist(+Goal,?List1,?List2,?List3,?List4,?List5,?List6,?List7)`
8252
8285
  **Contract:** Calls Goal pointwise over 7 list(s); all lists must end together and Goal receives the corresponding elements.
8253
- <a id="predicate-reference-0302"></a>
8286
+ <a id="predicate-reference-0303"></a>
8254
8287
  - **`maplist/9`** — `library(lists)` · **`meta`**
8255
8288
  **Call:** `maplist(+Goal,?List1,?List2,?List3,?List4,?List5,?List6,?List7,?List8)`
8256
8289
  **Contract:** Calls Goal pointwise over 8 list(s); all lists must end together and Goal receives the corresponding elements.
8257
- <a id="predicate-reference-0303"></a>
8290
+ <a id="predicate-reference-0304"></a>
8258
8291
  - **`matches/2`** — `library(strings)` · **`semidet`**
8259
8292
  **Call:** `matches(+Text,+Pattern)`
8260
8293
  **Contract:** Succeeds iff Text matches the library's portable pattern language described by Pattern.
8261
- <a id="predicate-reference-0304"></a>
8294
+ <a id="predicate-reference-0305"></a>
8262
8295
  - **`matches/3`** — `library(strings)` · **`semidet`**
8263
8296
  **Call:** `matches(+Text,+Pattern,-Context)`
8264
8297
  **Contract:** Matches Text against the portable pattern language and returns named-capture Context.
8265
- <a id="predicate-reference-0305"></a>
8298
+ <a id="predicate-reference-0306"></a>
8266
8299
  - **`max_assoc/3`** — `library(assoc)` · **`semidet`**
8267
8300
  **Call:** `max_assoc(+Assoc,?Key,?Value)`
8268
8301
  **Contract:** Relates Key and Value to the greatest-key entry; fails for an empty association.
8269
- <a id="predicate-reference-0306"></a>
8302
+ <a id="predicate-reference-0307"></a>
8270
8303
  - **`max_list/2`** — `library(lists)` · **`semidet`**
8271
8304
  **Call:** `max_list(+List,-Max)`
8272
8305
  **Contract:** Returns the greatest element of a nonempty list under EyeProlog term order.
8273
- <a id="predicate-reference-0307"></a>
8306
+ <a id="predicate-reference-0308"></a>
8274
8307
  - **`max_sleep_time/1`** — `library(time)` · **`det`**
8275
8308
  **Call:** `max_sleep_time(-Seconds)`
8276
8309
  **Contract:** Returns the implementation maximum supported sleep interval in seconds.
8277
- <a id="predicate-reference-0308"></a>
8310
+ <a id="predicate-reference-0309"></a>
8278
8311
  - **`maybe/0`** — `library(random)` · **`semidet`**
8279
8312
  **Call:** `maybe`
8280
8313
  **Contract:** Succeeds with probability approximately 1/2 using the current pseudo-random generator state.
8281
- <a id="predicate-reference-0309"></a>
8314
+ <a id="predicate-reference-0310"></a>
8282
8315
  - **`maybe/1`** — `library(random)` · **`semidet`**
8283
8316
  **Call:** `maybe(+Probability)`
8284
8317
  **Contract:** Succeeds with the supplied probability in the unit interval using the current pseudo-random state.
8285
- <a id="predicate-reference-0310"></a>
8318
+ <a id="predicate-reference-0311"></a>
8286
8319
  - **`maybe/2`** — `library(random)` · **`semidet`**
8287
8320
  **Call:** `maybe(+K,+N)`
8288
8321
  **Contract:** Succeeds with probability K/N using the current pseudo-random state.
8289
- <a id="predicate-reference-0311"></a>
8322
+ <a id="predicate-reference-0312"></a>
8290
8323
  - **`member/2`** — `library(lists)` · **`nondet`**
8291
8324
  **Call:** `member(?Item,+List)`
8292
8325
  **Contract:** Succeeds once for each list position whose element unifies with Item, preserving list order.
8293
- <a id="predicate-reference-0312"></a>
8326
+ <a id="predicate-reference-0313"></a>
8294
8327
  - **`memberchk/2`** — `library(lists)` · **`semidet`**
8295
8328
  **Call:** `memberchk(?Item,+List)`
8296
8329
  **Contract:** Succeeds for the first member of List that unifies with Item and commits to that match.
8297
- <a id="predicate-reference-0313"></a>
8330
+ <a id="predicate-reference-0314"></a>
8298
8331
  - **`memberd_t/3`** — `library(reif)` · **`delayed`**
8299
8332
  **Call:** `memberd_t(?Item,+List,?Truth)`
8300
8333
  **Contract:** Reifies membership of Item in List into Boolean Truth using dif/3-aware comparison.
8301
- <a id="predicate-reference-0314"></a>
8334
+ <a id="predicate-reference-0315"></a>
8302
8335
  - **`min_assoc/3`** — `library(assoc)` · **`semidet`**
8303
8336
  **Call:** `min_assoc(+Assoc,?Key,?Value)`
8304
8337
  **Contract:** Relates Key and Value to the least-key entry; fails for an empty association.
8305
- <a id="predicate-reference-0315"></a>
8338
+ <a id="predicate-reference-0316"></a>
8306
8339
  - **`min_list/2`** — `library(lists)` · **`semidet`**
8307
8340
  **Call:** `min_list(+List,-Min)`
8308
8341
  **Contract:** Returns the least element of a nonempty list under EyeProlog term order.
8309
- <a id="predicate-reference-0316"></a>
8342
+ <a id="predicate-reference-0317"></a>
8310
8343
  - **`msb/2`** — `library(arithmetic)` · **`semidet`**
8311
8344
  **Call:** `msb(+Integer,-Index)`
8312
8345
  **Contract:** Returns the zero-based index of the most significant set bit of a positive integer.
8313
- <a id="predicate-reference-0317"></a>
8346
+ <a id="predicate-reference-0318"></a>
8314
8347
  - **`must_be/2`** — `library(error)` · **`semidet`**
8315
8348
  **Call:** `must_be(+Type,+Term)`
8316
8349
  **Contract:** Succeeds when Term is instantiated and satisfies Type; otherwise raises the corresponding instantiation or type/domain error.
8317
8350
 
8318
8351
  #### Predicate reference — N
8319
8352
 
8320
- <a id="predicate-reference-0318"></a>
8353
+ <a id="predicate-reference-0319"></a>
8321
8354
  - **`neighbors/3`** — `library(ugraphs)` · **`semidet`**
8322
8355
  **Call:** `neighbors(+Vertex,+Graph,?Neighbors)`
8323
8356
  **Contract:** Relates Vertex to its outgoing neighbor list in Graph.
8324
- <a id="predicate-reference-0319"></a>
8357
+ <a id="predicate-reference-0320"></a>
8325
8358
  - **`neighbours/3`** — `library(ugraphs)` · **`semidet`**
8326
8359
  **Call:** `neighbours(+Vertex,+Graph,?Neighbors)`
8327
8360
  **Contract:** British-spelling alias of neighbors/3.
8328
- <a id="predicate-reference-0320"></a>
8361
+ <a id="predicate-reference-0321"></a>
8329
8362
  - **`nl/0`** — `ISO core` · **`det`**
8330
8363
  **Call:** `nl`
8331
8364
  **Contract:** Writes one newline to the current output stream.
8332
- <a id="predicate-reference-0321"></a>
8365
+ <a id="predicate-reference-0322"></a>
8333
8366
  - **`nl/1`** — `ISO core` · **`det`**
8334
8367
  **Call:** `nl(+Stream)`
8335
8368
  **Contract:** Writes one newline to Stream.
8336
- <a id="predicate-reference-0322"></a>
8369
+ <a id="predicate-reference-0323"></a>
8337
8370
  - **`nodebug/1`** — `library(debug)` · **`det`**
8338
8371
  **Call:** `nodebug(+Topic)`
8339
8372
  **Contract:** Disables debugging messages for Topic.
8340
- <a id="predicate-reference-0323"></a>
8373
+ <a id="predicate-reference-0324"></a>
8341
8374
  - **`nonvar/1`** — `ISO core` · **`semidet`**
8342
8375
  **Call:** `nonvar(?Term)`
8343
8376
  **Contract:** Succeeds iff Term is not an unbound variable.
8344
- <a id="predicate-reference-0324"></a>
8377
+ <a id="predicate-reference-0325"></a>
8345
8378
  - **`not_si/1`** — `library(si)` · **`semidet`**
8346
8379
  **Call:** `not_si(+Goal)`
8347
8380
  **Contract:** Performs sufficient-instantiation-aware negation for the SI compatibility layer.
8348
- <a id="predicate-reference-0325"></a>
8381
+ <a id="predicate-reference-0326"></a>
8349
8382
  - **`nth0/3`** — `library(lists)` · **`nondet`**
8350
8383
  **Call:** `nth0(?Index,+List,?Item)`
8351
8384
  **Contract:** Relates zero-based Index to Item at that position in List.
8352
- <a id="predicate-reference-0326"></a>
8385
+ <a id="predicate-reference-0327"></a>
8353
8386
  - **`nth0/4`** — `library(lists)` · **`nondet`**
8354
8387
  **Call:** `nth0(?Index,+List,?Item,?Rest)`
8355
8388
  **Contract:** Relates zero-based Index and Item to List and the list Rest obtained by deleting that position.
8356
- <a id="predicate-reference-0327"></a>
8389
+ <a id="predicate-reference-0328"></a>
8357
8390
  - **`nth1/3`** — `library(lists)` · **`nondet`**
8358
8391
  **Call:** `nth1(?Index,+List,?Item)`
8359
8392
  **Contract:** Relates one-based Index to Item at that position in List.
8360
- <a id="predicate-reference-0328"></a>
8393
+ <a id="predicate-reference-0329"></a>
8361
8394
  - **`nth1/4`** — `library(lists)` · **`nondet`**
8362
8395
  **Call:** `nth1(?Index,+List,?Item,?Rest)`
8363
8396
  **Contract:** Relates one-based Index and Item to List and the list Rest obtained by deleting that position.
8364
- <a id="predicate-reference-0329"></a>
8397
+ <a id="predicate-reference-0330"></a>
8365
8398
  - **`number_chars/2`** — `ISO core` · **`mode-dependent`**
8366
8399
  **Call:** `number_chars(?Number,?Chars)`
8367
8400
  **Contract:** Relates a finite number to its canonical character-list representation or parses such a list.
8368
- <a id="predicate-reference-0330"></a>
8401
+ <a id="predicate-reference-0331"></a>
8369
8402
  - **`number_codes/2`** — `ISO core` · **`mode-dependent`**
8370
8403
  **Call:** `number_codes(?Number,?Codes)`
8371
8404
  **Contract:** Relates a finite number to its canonical character-code representation or parses such a list.
8372
- <a id="predicate-reference-0331"></a>
8405
+ <a id="predicate-reference-0332"></a>
8373
8406
  - **`number_string/2`** — `library(strings)` · **`mode-dependent`**
8374
8407
  **Call:** `number_string(?Number,?Text)`
8375
8408
  **Contract:** Relates a number to atom/character-list text using the library lexical conversion rules.
8376
- <a id="predicate-reference-0332"></a>
8409
+ <a id="predicate-reference-0333"></a>
8377
8410
  - **`number_to_rational/2`** — `library(arithmetic)` · **`det`**
8378
8411
  **Call:** `number_to_rational(+Number,-Rational)`
8379
8412
  **Contract:** Converts an EyeProlog number to the library rational representation, preserving integers exactly.
8380
- <a id="predicate-reference-0333"></a>
8413
+ <a id="predicate-reference-0334"></a>
8381
8414
  - **`number_to_rational/3`** — `library(arithmetic)` · **`det`**
8382
8415
  **Call:** `number_to_rational(+Number,-Numerator,-Denominator)`
8383
8416
  **Contract:** Converts Number to a normalized numerator and positive denominator.
8384
- <a id="predicate-reference-0334"></a>
8417
+ <a id="predicate-reference-0335"></a>
8385
8418
  - **`number/1`** — `ISO core` · **`semidet`**
8386
8419
  **Call:** `number(?Term)`
8387
8420
  **Contract:** Succeeds iff Term is an integer or float.
8388
- <a id="predicate-reference-0335"></a>
8421
+ <a id="predicate-reference-0336"></a>
8389
8422
  - **`numbervars/3`** — `library(terms)` · **`det`**
8390
8423
  **Call:** `numbervars(+Term,+Start,-End)`
8391
8424
  **Contract:** Numbers unbound variables in Term using $VAR(N) terms beginning at Start and returns the next unused End index.
8392
- <a id="predicate-reference-0336"></a>
8425
+ <a id="predicate-reference-0337"></a>
8393
8426
  - **`numlist/2`** — `library(between)` · **`det`**
8394
8427
  **Call:** `numlist(+High,-List)`
8395
8428
  **Contract:** Constructs the inclusive integer list from 1 through High, with the module's empty-range behavior.
8396
- <a id="predicate-reference-0337"></a>
8429
+ <a id="predicate-reference-0338"></a>
8397
8430
  - **`numlist/3`** — `library(between)` · **`det`**
8398
8431
  **Call:** `numlist(+Low,+High,-List)`
8399
8432
  **Contract:** Constructs the inclusive ascending integer list from Low through High.
8400
- <a id="predicate-reference-0338"></a>
8433
+ <a id="predicate-reference-0339"></a>
8401
8434
  - **`nvalue/2`** — `library(clpz)` · **`delayed`**
8402
8435
  **Call:** `nvalue(?N,+Vars)`
8403
8436
  **Contract:** Constrains N to the number of distinct values taken by Vars.
8404
8437
 
8405
8438
  #### Predicate reference — O
8406
8439
 
8407
- <a id="predicate-reference-0339"></a>
8440
+ <a id="predicate-reference-0340"></a>
8408
8441
  - **`once/1`** — `ISO core` · **`semidet`**
8409
8442
  **Call:** `once(+Goal)`
8410
8443
  **Contract:** Runs Goal and returns at most its first solution.
8411
- <a id="predicate-reference-0340"></a>
8444
+ <a id="predicate-reference-0341"></a>
8412
8445
  - **`op/3`** — `ISO core` · **`det`**
8413
8446
  **Call:** `op(+Priority,+Specifier,+NameOrNames)`
8414
8447
  **Contract:** Defines, replaces, or removes operator declarations in the current program.
8415
- <a id="predicate-reference-0341"></a>
8448
+ <a id="predicate-reference-0342"></a>
8416
8449
  - **`open/3`** — `ISO core` · **`det`**
8417
8450
  **Call:** `open(+SourceSink,+Mode,-Stream)`
8418
8451
  **Contract:** Opens SourceSink in Mode and returns a stream handle.
8419
- <a id="predicate-reference-0342"></a>
8452
+ <a id="predicate-reference-0343"></a>
8420
8453
  - **`open/4`** — `ISO core` · **`det`**
8421
8454
  **Call:** `open(+SourceSink,+Mode,-Stream,+Options)`
8422
8455
  **Contract:** Opens SourceSink in Mode with validated stream Options and returns a stream handle.
8423
- <a id="predicate-reference-0343"></a>
8456
+ <a id="predicate-reference-0344"></a>
8424
8457
  - **`ord_add_element/3`** — `library(ordsets)` · **`det`**
8425
8458
  **Call:** `ord_add_element(+Set,+Element,-NewSet)`
8426
8459
  **Contract:** Inserts Element into ordered Set if absent, preserving order.
8427
- <a id="predicate-reference-0344"></a>
8460
+ <a id="predicate-reference-0345"></a>
8428
8461
  - **`ord_del_element/3`** — `library(ordsets)` · **`det`**
8429
8462
  **Call:** `ord_del_element(+Set,+Element,-NewSet)`
8430
8463
  **Contract:** Removes Element from ordered Set if present, preserving order.
8431
- <a id="predicate-reference-0345"></a>
8464
+ <a id="predicate-reference-0346"></a>
8432
8465
  - **`ord_disjoint/2`** — `library(ordsets)` · **`semidet`**
8433
8466
  **Call:** `ord_disjoint(+A,+B)`
8434
8467
  **Contract:** Succeeds iff ordered sets A and B have no common element.
8435
- <a id="predicate-reference-0346"></a>
8468
+ <a id="predicate-reference-0347"></a>
8436
8469
  - **`ord_empty/1`** — `library(ordsets)` · **`semidet`**
8437
8470
  **Call:** `ord_empty(?Set)`
8438
8471
  **Contract:** Succeeds exactly when Set is the empty ordered set [].
8439
- <a id="predicate-reference-0347"></a>
8472
+ <a id="predicate-reference-0348"></a>
8440
8473
  - **`ord_intersect/2`** — `library(ordsets)` · **`semidet`**
8441
8474
  **Call:** `ord_intersect(+A,+B)`
8442
8475
  **Contract:** Succeeds iff ordered sets A and B have a nonempty intersection.
8443
- <a id="predicate-reference-0348"></a>
8476
+ <a id="predicate-reference-0349"></a>
8444
8477
  - **`ord_intersect/3`** — `library(ordsets)` · **`det`**
8445
8478
  **Call:** `ord_intersect(+A,+B,-Intersection)`
8446
8479
  **Contract:** Computes the ordered-set intersection of A and B.
8447
- <a id="predicate-reference-0349"></a>
8480
+ <a id="predicate-reference-0350"></a>
8448
8481
  - **`ord_intersection/2`** — `library(ordsets)` · **`det`**
8449
8482
  **Call:** `ord_intersection(+Sets,-Intersection)`
8450
8483
  **Contract:** Computes the intersection of a list of ordered sets.
8451
- <a id="predicate-reference-0350"></a>
8484
+ <a id="predicate-reference-0351"></a>
8452
8485
  - **`ord_intersection/3`** — `library(ordsets)` · **`det`**
8453
8486
  **Call:** `ord_intersection(+A,+B,-Intersection)`
8454
8487
  **Contract:** Computes the ordered-set intersection of A and B.
8455
- <a id="predicate-reference-0351"></a>
8488
+ <a id="predicate-reference-0352"></a>
8456
8489
  - **`ord_intersection/4`** — `library(ordsets)` · **`det`**
8457
8490
  **Call:** `ord_intersection(+A,+B,-Intersection,-Difference)`
8458
8491
  **Contract:** Computes A intersect B and the elements of A outside B in one traversal.
8459
- <a id="predicate-reference-0352"></a>
8492
+ <a id="predicate-reference-0353"></a>
8460
8493
  - **`ord_list_to_assoc/2`** — `library(assoc)` · **`det`**
8461
8494
  **Call:** `ord_list_to_assoc(+Pairs,-Assoc)`
8462
8495
  **Contract:** Builds an association tree from an already key-ordered pair list.
8463
- <a id="predicate-reference-0353"></a>
8496
+ <a id="predicate-reference-0354"></a>
8464
8497
  - **`ord_memberchk/2`** — `library(ordsets)` · **`semidet`**
8465
8498
  **Call:** `ord_memberchk(+Element,+Set)`
8466
8499
  **Contract:** Tests Element membership using ordered-set comparison and early termination.
8467
- <a id="predicate-reference-0354"></a>
8500
+ <a id="predicate-reference-0355"></a>
8468
8501
  - **`ord_selectchk/3`** — `library(ordsets)` · **`semidet`**
8469
8502
  **Call:** `ord_selectchk(+Element,+Set,?Rest)`
8470
8503
  **Contract:** Checks membership of Element in ordered Set and returns Rest with that element removed.
8471
- <a id="predicate-reference-0355"></a>
8504
+ <a id="predicate-reference-0356"></a>
8472
8505
  - **`ord_seteq/2`** — `library(ordsets)` · **`semidet`**
8473
8506
  **Call:** `ord_seteq(+A,+B)`
8474
8507
  **Contract:** Succeeds iff ordered sets A and B contain exactly the same elements.
8475
- <a id="predicate-reference-0356"></a>
8508
+ <a id="predicate-reference-0357"></a>
8476
8509
  - **`ord_subset/2`** — `library(ordsets)` · **`semidet`**
8477
8510
  **Call:** `ord_subset(+Sub,+Super)`
8478
8511
  **Contract:** Succeeds iff every element of ordered Sub is present in ordered Super.
8479
- <a id="predicate-reference-0357"></a>
8512
+ <a id="predicate-reference-0358"></a>
8480
8513
  - **`ord_subtract/3`** — `library(ordsets)` · **`det`**
8481
8514
  **Call:** `ord_subtract(+Set,+Delete,-Remaining)`
8482
8515
  **Contract:** Computes ordered Set minus every element of ordered Delete.
8483
- <a id="predicate-reference-0358"></a>
8516
+ <a id="predicate-reference-0359"></a>
8484
8517
  - **`ord_symdiff/3`** — `library(ordsets)` · **`det`**
8485
8518
  **Call:** `ord_symdiff(+A,+B,-Difference)`
8486
8519
  **Contract:** Computes the symmetric difference of ordered sets A and B.
8487
- <a id="predicate-reference-0359"></a>
8520
+ <a id="predicate-reference-0360"></a>
8488
8521
  - **`ord_union/2`** — `library(ordsets)` · **`det`**
8489
8522
  **Call:** `ord_union(+Sets,-Union)`
8490
8523
  **Contract:** Computes the union of a list of ordered sets.
8491
- <a id="predicate-reference-0360"></a>
8524
+ <a id="predicate-reference-0361"></a>
8492
8525
  - **`ord_union/3`** — `library(ordsets)` · **`det`**
8493
8526
  **Call:** `ord_union(+A,+B,-Union)`
8494
8527
  **Contract:** Computes the ordered-set union of A and B.
8495
- <a id="predicate-reference-0361"></a>
8528
+ <a id="predicate-reference-0362"></a>
8496
8529
  - **`ord_union/4`** — `library(ordsets)` · **`det`**
8497
8530
  **Call:** `ord_union(+A,+B,-Union,-New)`
8498
8531
  **Contract:** Computes Union and the elements contributed by one side according to the library's four-argument contract.
8499
8532
 
8500
8533
  #### Predicate reference — P
8501
8534
 
8502
- <a id="predicate-reference-0362"></a>
8535
+ <a id="predicate-reference-0363"></a>
8503
8536
  - **`pairs_keys_values/3`** — `library(pairs)` · **`mode-dependent`**
8504
8537
  **Call:** `pairs_keys_values(?Pairs,?Keys,?Values)`
8505
8538
  **Contract:** Relates a list of Key-Value pairs to the corresponding Keys and Values lists.
8506
- <a id="predicate-reference-0363"></a>
8539
+ <a id="predicate-reference-0364"></a>
8507
8540
  - **`pairs_keys/2`** — `library(pairs)` · **`det`**
8508
8541
  **Call:** `pairs_keys(+Pairs,-Keys)`
8509
8542
  **Contract:** Projects the keys of Pairs in order.
8510
- <a id="predicate-reference-0364"></a>
8543
+ <a id="predicate-reference-0365"></a>
8511
8544
  - **`pairs_values/2`** — `library(pairs)` · **`det`**
8512
8545
  **Call:** `pairs_values(+Pairs,-Values)`
8513
8546
  **Contract:** Projects the values of Pairs in order.
8514
- <a id="predicate-reference-0365"></a>
8547
+ <a id="predicate-reference-0366"></a>
8515
8548
  - **`partial_string_tail/2`** — `library(iso_ext)` · **`semidet`**
8516
8549
  **Call:** `partial_string_tail(+Term,?Tail)`
8517
8550
  **Contract:** Relates a partial string to its open tail.
8518
- <a id="predicate-reference-0366"></a>
8551
+ <a id="predicate-reference-0367"></a>
8519
8552
  - **`partial_string/1`** — `library(iso_ext)` · **`semidet`**
8520
8553
  **Call:** `partial_string(?Term)`
8521
8554
  **Contract:** Succeeds iff Term has the library's partial-string/list representation.
8522
- <a id="predicate-reference-0367"></a>
8555
+ <a id="predicate-reference-0368"></a>
8523
8556
  - **`partial_string/3`** — `library(iso_ext)` · **`mode-dependent`**
8524
8557
  **Call:** `partial_string(?Term,?Chars,?Tail)`
8525
8558
  **Contract:** Relates a partial-string term to its character prefix Chars and open Tail.
8526
- <a id="predicate-reference-0368"></a>
8559
+ <a id="predicate-reference-0369"></a>
8527
8560
  - **`path_canonical/2`** — `library(files)` · **`det`**
8528
8561
  **Call:** `path_canonical(+Path,-Canonical)`
8529
8562
  **Contract:** Returns the canonicalized host path corresponding to Path.
8530
- <a id="predicate-reference-0369"></a>
8563
+ <a id="predicate-reference-0370"></a>
8531
8564
  - **`path_segments/2`** — `library(files)` · **`mode-dependent`**
8532
8565
  **Call:** `path_segments(?Path,?Segments)`
8533
8566
  **Contract:** Relates a filesystem path to its component segments.
8534
- <a id="predicate-reference-0370"></a>
8567
+ <a id="predicate-reference-0371"></a>
8535
8568
  - **`peek_byte/1`** — `ISO core` · **`det`**
8536
8569
  **Call:** `peek_byte(?Byte)`
8537
8570
  **Contract:** Observes the next byte on the current binary input stream without consuming it.
8538
- <a id="predicate-reference-0371"></a>
8571
+ <a id="predicate-reference-0372"></a>
8539
8572
  - **`peek_byte/2`** — `ISO core` · **`det`**
8540
8573
  **Call:** `peek_byte(+Stream,?Byte)`
8541
8574
  **Contract:** Observes the next byte on Stream without consuming it.
8542
- <a id="predicate-reference-0372"></a>
8575
+ <a id="predicate-reference-0373"></a>
8543
8576
  - **`peek_char/1`** — `ISO core` · **`det`**
8544
8577
  **Call:** `peek_char(?Char)`
8545
8578
  **Contract:** Observes the next character on the current input stream without consuming it.
8546
- <a id="predicate-reference-0373"></a>
8579
+ <a id="predicate-reference-0374"></a>
8547
8580
  - **`peek_char/2`** — `ISO core` · **`det`**
8548
8581
  **Call:** `peek_char(+Stream,?Char)`
8549
8582
  **Contract:** Observes the next character on Stream without consuming it.
8550
- <a id="predicate-reference-0374"></a>
8583
+ <a id="predicate-reference-0375"></a>
8551
8584
  - **`peek_code/1`** — `ISO core` · **`det`**
8552
8585
  **Call:** `peek_code(?Code)`
8553
8586
  **Contract:** Observes the next character code on the current input stream without consuming it.
8554
- <a id="predicate-reference-0375"></a>
8587
+ <a id="predicate-reference-0376"></a>
8555
8588
  - **`peek_code/2`** — `ISO core` · **`det`**
8556
8589
  **Call:** `peek_code(+Stream,?Code)`
8557
8590
  **Contract:** Observes the next character code on Stream without consuming it.
8558
- <a id="predicate-reference-0376"></a>
8591
+ <a id="predicate-reference-0377"></a>
8559
8592
  - **`permutation/2`** — `library(lists)` · **`nondet`**
8560
8593
  **Call:** `permutation(?List,?Permutation)`
8561
8594
  **Contract:** Relates two proper lists that are permutations of one another, enumerating permutations in select/3 order.
8562
- <a id="predicate-reference-0377"></a>
8595
+ <a id="predicate-reference-0378"></a>
8563
8596
  - **`phrase_from_file/2`** — `library(pio)` · **`semidet`**
8564
8597
  **Call:** `phrase_from_file(+Grammar,+Path)`
8565
8598
  **Contract:** Reads Path as characters and succeeds iff Grammar consumes the complete content.
8566
- <a id="predicate-reference-0378"></a>
8599
+ <a id="predicate-reference-0379"></a>
8567
8600
  - **`phrase_from_file/3`** — `library(pio)` · **`semidet`**
8568
8601
  **Call:** `phrase_from_file(+Grammar,+Path,+Options)`
8569
8602
  **Contract:** Reads Path with Options and succeeds iff Grammar consumes the complete content.
8570
- <a id="predicate-reference-0379"></a>
8603
+ <a id="predicate-reference-0380"></a>
8571
8604
  - **`phrase_from_stream/2`** — `library(pio)` · **`semidet`**
8572
8605
  **Call:** `phrase_from_stream(+Grammar,+Stream)`
8573
8606
  **Contract:** Reads Stream as characters and succeeds iff Grammar consumes the complete content.
8574
- <a id="predicate-reference-0380"></a>
8607
+ <a id="predicate-reference-0381"></a>
8575
8608
  - **`phrase_to_file/2`** — `library(pio)` · **`semidet`**
8576
8609
  **Call:** `phrase_to_file(+Grammar,+Path)`
8577
8610
  **Contract:** Generates characters with Grammar and writes them to Path.
8578
- <a id="predicate-reference-0381"></a>
8611
+ <a id="predicate-reference-0382"></a>
8579
8612
  - **`phrase_to_file/3`** — `library(pio)` · **`semidet`**
8580
8613
  **Call:** `phrase_to_file(+Grammar,+Path,+Options)`
8581
8614
  **Contract:** Generates characters with Grammar and writes them to Path according to Options.
8582
- <a id="predicate-reference-0382"></a>
8615
+ <a id="predicate-reference-0383"></a>
8583
8616
  - **`phrase_to_stream/2`** — `library(pio)` · **`semidet`**
8584
8617
  **Call:** `phrase_to_stream(+Grammar,+Stream)`
8585
8618
  **Contract:** Generates characters with Grammar and writes them to Stream.
8586
- <a id="predicate-reference-0383"></a>
8619
+ <a id="predicate-reference-0384"></a>
8587
8620
  - **`phrase/2`** — `ISO core + library(dcgs)` · **`mode-dependent`**
8588
8621
  **Call:** `phrase(+Body,?Sequence)`
8589
8622
  **Contract:** Runs a DCG Body over Sequence and requires complete consumption.
8590
- <a id="predicate-reference-0384"></a>
8623
+ <a id="predicate-reference-0385"></a>
8591
8624
  - **`phrase/3`** — `ISO core + library(dcgs)` · **`mode-dependent`**
8592
8625
  **Call:** `phrase(+Body,?Sequence,?Rest)`
8593
8626
  **Contract:** Runs a DCG Body over Sequence and relates Rest to the unconsumed suffix.
8594
- <a id="predicate-reference-0385"></a>
8627
+ <a id="predicate-reference-0386"></a>
8595
8628
  - **`phrase/4`** — `library(dcgs)` · **`mode-dependent`**
8596
8629
  **Call:** `phrase(+Body,?S0,?S,?A1)`
8597
8630
  **Contract:** Calls the parameterized DCG Body with one additional argument and the difference-list pair S0,S.
8598
- <a id="predicate-reference-0386"></a>
8631
+ <a id="predicate-reference-0387"></a>
8599
8632
  - **`phrase/5`** — `library(dcgs)` · **`mode-dependent`**
8600
8633
  **Call:** `phrase(+Body,?S0,?S,?A1,?A2)`
8601
8634
  **Contract:** Calls the parameterized DCG Body with two additional arguments and the difference-list pair S0,S.
8602
- <a id="predicate-reference-0387"></a>
8635
+ <a id="predicate-reference-0388"></a>
8603
8636
  - **`pid/1`** — `library(os)` · **`det`**
8604
8637
  **Call:** `pid(-Pid)`
8605
8638
  **Contract:** Returns the host process identifier.
8606
- <a id="predicate-reference-0388"></a>
8639
+ <a id="predicate-reference-0389"></a>
8607
8640
  - **`popcount/2`** — `library(arithmetic)` · **`det`**
8608
8641
  **Call:** `popcount(+Integer,-Count)`
8609
8642
  **Contract:** Counts the set bits in the nonnegative integer representation.
8610
- <a id="predicate-reference-0389"></a>
8643
+ <a id="predicate-reference-0390"></a>
8611
8644
  - **`portray_clause_/3`** — `library(format)` · **`det`**
8612
8645
  **Call:** `portray_clause_(+Clause,?S0,?S)`
8613
8646
  **Contract:** Expanded DCG form of portray_clause_//1 producing clause text between S0 and S.
8614
- <a id="predicate-reference-0390"></a>
8647
+ <a id="predicate-reference-0391"></a>
8615
8648
  - **`portray_clause/1`** — `library(format)` · **`det`**
8616
8649
  **Call:** `portray_clause(+Clause)`
8617
8650
  **Contract:** Writes Clause in readable clause-oriented layout to the current output stream.
8618
- <a id="predicate-reference-0391"></a>
8651
+ <a id="predicate-reference-0392"></a>
8619
8652
  - **`portray_clause/2`** — `library(format)` · **`det`**
8620
8653
  **Call:** `portray_clause(+Stream,+Clause)`
8621
8654
  **Contract:** Writes Clause in readable clause-oriented layout to Stream.
8622
- <a id="predicate-reference-0392"></a>
8655
+ <a id="predicate-reference-0393"></a>
8623
8656
  - **`put_assoc/4`** — `library(assoc)` · **`det`**
8624
8657
  **Call:** `put_assoc(+Key,+Assoc0,+Value,-Assoc)`
8625
8658
  **Contract:** Returns Assoc equal to Assoc0 with Key inserted or replaced by Value.
8626
- <a id="predicate-reference-0393"></a>
8659
+ <a id="predicate-reference-0394"></a>
8627
8660
  - **`put_attr/3`** — `library(atts)` · **`det`**
8628
8661
  **Call:** `put_attr(+Var,+Module,+Value)`
8629
8662
  **Contract:** Sets Module's attribute Value on Var in the current logical branch.
8630
- <a id="predicate-reference-0394"></a>
8663
+ <a id="predicate-reference-0395"></a>
8631
8664
  - **`put_atts/2`** — `library(atts)` · **`det`**
8632
8665
  **Call:** `put_atts(+Var,+AttributeSpec)`
8633
8666
  **Contract:** Compatibility relation that adds, replaces, or removes attributes on Var according to AttributeSpec.
8634
- <a id="predicate-reference-0395"></a>
8667
+ <a id="predicate-reference-0396"></a>
8635
8668
  - **`put_byte/1`** — `ISO core` · **`det`**
8636
8669
  **Call:** `put_byte(+Byte)`
8637
8670
  **Contract:** Writes one byte to the current binary output stream.
8638
- <a id="predicate-reference-0396"></a>
8671
+ <a id="predicate-reference-0397"></a>
8639
8672
  - **`put_byte/2`** — `ISO core` · **`det`**
8640
8673
  **Call:** `put_byte(+Stream,+Byte)`
8641
8674
  **Contract:** Writes one byte to Stream.
8642
- <a id="predicate-reference-0397"></a>
8675
+ <a id="predicate-reference-0398"></a>
8643
8676
  - **`put_char/1`** — `ISO core` · **`det`**
8644
8677
  **Call:** `put_char(+Char)`
8645
8678
  **Contract:** Writes one character to the current output stream.
8646
- <a id="predicate-reference-0398"></a>
8679
+ <a id="predicate-reference-0399"></a>
8647
8680
  - **`put_char/2`** — `ISO core` · **`det`**
8648
8681
  **Call:** `put_char(+Stream,+Char)`
8649
8682
  **Contract:** Writes one character to Stream.
8650
- <a id="predicate-reference-0399"></a>
8683
+ <a id="predicate-reference-0400"></a>
8651
8684
  - **`put_code/1`** — `ISO core` · **`det`**
8652
8685
  **Call:** `put_code(+Code)`
8653
8686
  **Contract:** Writes one character code to the current output stream.
8654
- <a id="predicate-reference-0400"></a>
8687
+ <a id="predicate-reference-0401"></a>
8655
8688
  - **`put_code/2`** — `ISO core` · **`det`**
8656
8689
  **Call:** `put_code(+Stream,+Code)`
8657
8690
  **Contract:** Writes one character code to Stream.
8658
8691
 
8659
8692
  #### Predicate reference — R
8660
8693
 
8661
- <a id="predicate-reference-0401"></a>
8694
+ <a id="predicate-reference-0402"></a>
8662
8695
  - **`random_integer/3`** — `library(random)` · **`det`**
8663
8696
  **Call:** `random_integer(+Lower,+Upper,-Value)`
8664
8697
  **Contract:** Returns a pseudo-random integer Value in the half-open interval [Lower,Upper).
8665
- <a id="predicate-reference-0402"></a>
8698
+ <a id="predicate-reference-0403"></a>
8666
8699
  - **`random_labeling/2`** — `library(clpb)` · **`nondet`**
8667
8700
  **Call:** `random_labeling(+Seed,+BooleanVariables)`
8668
8701
  **Contract:** Labels constrained Boolean variables in pseudo-randomized order determined by Seed.
8669
- <a id="predicate-reference-0403"></a>
8702
+ <a id="predicate-reference-0404"></a>
8670
8703
  - **`random/1`** — `library(random)` · **`det`**
8671
8704
  **Call:** `random(-Value)`
8672
8705
  **Contract:** Advances the current Park-Miller pseudo-random state and returns Value in [0,1).
8673
- <a id="predicate-reference-0404"></a>
8706
+ <a id="predicate-reference-0405"></a>
8674
8707
  - **`random/3`** — `library(random)` · **`det`**
8675
8708
  **Call:** `random(+Seed0,-Value,-Seed)`
8676
8709
  **Contract:** Pure state-threaded Park-Miller step: Value is in [0,1) and Seed is the successor state.
8677
- <a id="predicate-reference-0405"></a>
8710
+ <a id="predicate-reference-0406"></a>
8678
8711
  - **`rational_numerator_denominator/3`** — `library(arithmetic)` · **`det`**
8679
8712
  **Call:** `rational_numerator_denominator(+Rational,-Numerator,-Denominator)`
8680
8713
  **Contract:** Decomposes a supported rational representation into normalized numerator and denominator.
8681
- <a id="predicate-reference-0406"></a>
8714
+ <a id="predicate-reference-0407"></a>
8682
8715
  - **`raw_argv/1`** — `library(os)` · **`det`**
8683
8716
  **Call:** `raw_argv(-Args)`
8684
8717
  **Contract:** Returns the raw host process argument vector.
8685
- <a id="predicate-reference-0407"></a>
8718
+ <a id="predicate-reference-0408"></a>
8686
8719
  - **`reachable/3`** — `library(ugraphs)` · **`det`**
8687
8720
  **Call:** `reachable(+Vertex,+Graph,-Reachable)`
8688
8721
  **Contract:** Returns vertices reachable from Vertex by zero or more directed edges.
8689
- <a id="predicate-reference-0408"></a>
8722
+ <a id="predicate-reference-0409"></a>
8690
8723
  - **`read_from_chars/2`** — `library(charsio)` · **`det`**
8691
8724
  **Call:** `read_from_chars(+Chars,?Term)`
8692
8725
  **Contract:** Parses one term from character-list source using default read options.
8693
- <a id="predicate-reference-0409"></a>
8726
+ <a id="predicate-reference-0410"></a>
8694
8727
  - **`read_term_from_chars/3`** — `library(charsio)` · **`det`**
8695
8728
  **Call:** `read_term_from_chars(+Chars,?Term,+Options)`
8696
8729
  **Contract:** Parses one term from character-list source according to Options.
8697
- <a id="predicate-reference-0410"></a>
8730
+ <a id="predicate-reference-0411"></a>
8698
8731
  - **`read_term/2`** — `ISO core` · **`det`**
8699
8732
  **Call:** `read_term(?Term,+Options)`
8700
8733
  **Contract:** Reads one Prolog term from the current input stream using Options.
8701
- <a id="predicate-reference-0411"></a>
8734
+ <a id="predicate-reference-0412"></a>
8702
8735
  - **`read_term/3`** — `ISO core` · **`det`**
8703
8736
  **Call:** `read_term(+Stream,?Term,+Options)`
8704
8737
  **Contract:** Reads one Prolog term from Stream using Options.
8705
- <a id="predicate-reference-0412"></a>
8738
+ <a id="predicate-reference-0413"></a>
8706
8739
  - **`read/1`** — `ISO core` · **`det`**
8707
8740
  **Call:** `read(?Term)`
8708
8741
  **Contract:** Reads one Prolog term from the current input stream using default read options.
8709
- <a id="predicate-reference-0413"></a>
8742
+ <a id="predicate-reference-0414"></a>
8710
8743
  - **`read/2`** — `ISO core` · **`det`**
8711
8744
  **Call:** `read(+Stream,?Term)`
8712
8745
  **Contract:** Reads one Prolog term from Stream using default read options.
8713
- <a id="predicate-reference-0414"></a>
8746
+ <a id="predicate-reference-0415"></a>
8714
8747
  - **`rename_file/2`** — `library(files)` · **`det`**
8715
8748
  **Call:** `rename_file(+Source,+Target)`
8716
8749
  **Contract:** Renames or moves Source to Target on the host filesystem.
8717
- <a id="predicate-reference-0415"></a>
8750
+ <a id="predicate-reference-0416"></a>
8718
8751
  - **`repeat/0`** — `ISO core` · **`multi`**
8719
8752
  **Call:** `repeat`
8720
8753
  **Contract:** Succeeds repeatedly without end, producing another solution on every backtracking step.
8721
- <a id="predicate-reference-0416"></a>
8754
+ <a id="predicate-reference-0417"></a>
8722
8755
  - **`repeat/1`** — `library(between)` · **`multi`**
8723
8756
  **Call:** `repeat(+Count)`
8724
8757
  **Contract:** Succeeds Count times on backtracking for a nonnegative integer Count.
8725
- <a id="predicate-reference-0417"></a>
8758
+ <a id="predicate-reference-0418"></a>
8726
8759
  - **`replace/4`** — `library(strings)` · **`det`**
8727
8760
  **Call:** `replace(+Text,+Search,+Replacement,-Result)`
8728
8761
  **Contract:** Replaces every literal occurrence of Search in Text by Replacement.
8729
- <a id="predicate-reference-0418"></a>
8762
+ <a id="predicate-reference-0419"></a>
8730
8763
  - **`representation_error/1`** — `library(error)` · **`terminal`**
8731
8764
  **Call:** `representation_error(+Flag)`
8732
8765
  **Contract:** Raises a representation_error(Flag) exception.
8733
- <a id="predicate-reference-0419"></a>
8766
+ <a id="predicate-reference-0420"></a>
8734
8767
  - **`reset_gensym/1`** — `library(gensym)` · **`det`**
8735
8768
  **Call:** `reset_gensym(+Base)`
8736
8769
  **Contract:** Resets the generated-atom counter associated with Base.
8737
- <a id="predicate-reference-0420"></a>
8770
+ <a id="predicate-reference-0421"></a>
8738
8771
  - **`resource_error/1`** — `library(error)` · **`terminal`**
8739
8772
  **Call:** `resource_error(+Resource)`
8740
8773
  **Contract:** Raises a resource_error(Resource) exception.
8741
- <a id="predicate-reference-0421"></a>
8774
+ <a id="predicate-reference-0422"></a>
8742
8775
  - **`resource_error/2`** — `library(error)` · **`terminal`**
8743
8776
  **Call:** `resource_error(+Resource,+Context)`
8744
8777
  **Contract:** Raises a resource_error(Resource) exception carrying Context.
8745
- <a id="predicate-reference-0422"></a>
8778
+ <a id="predicate-reference-0423"></a>
8746
8779
  - **`retract/1`** — `ISO core` · **`nondet`**
8747
8780
  **Call:** `retract(+Clause)`
8748
8781
  **Contract:** Removes matching clauses from a dynamic predicate one at a time under the logical update view.
8749
- <a id="predicate-reference-0423"></a>
8782
+ <a id="predicate-reference-0424"></a>
8750
8783
  - **`retractall/1`** — `ISO core` · **`det`**
8751
8784
  **Call:** `retractall(+Head)`
8752
8785
  **Contract:** Removes every dynamic clause whose head matches Head while retaining the empty dynamic procedure.
8753
- <a id="predicate-reference-0424"></a>
8786
+ <a id="predicate-reference-0425"></a>
8754
8787
  - **`reverse/2`** — `library(lists)` · **`mode-dependent`**
8755
8788
  **Call:** `reverse(?List,?Reversed)`
8756
8789
  **Contract:** Relates a proper list to the list containing the same elements in reverse order.
8757
8790
 
8758
8791
  #### Predicate reference — S
8759
8792
 
8760
- <a id="predicate-reference-0425"></a>
8793
+ <a id="predicate-reference-0426"></a>
8761
8794
  - **`same_length/2`** — `library(lists)` · **`mode-dependent`**
8762
8795
  **Call:** `same_length(?A,?B)`
8763
8796
  **Contract:** Relates lists A and B when they have the same length, constructing a skeleton when one length is known.
8764
- <a id="predicate-reference-0426"></a>
8797
+ <a id="predicate-reference-0427"></a>
8765
8798
  - **`sat_count/2`** — `library(clpb)` · **`det`**
8766
8799
  **Call:** `sat_count(+BooleanExpression,-Count)`
8767
8800
  **Contract:** Counts satisfying assignments of BooleanExpression.
8768
- <a id="predicate-reference-0427"></a>
8801
+ <a id="predicate-reference-0428"></a>
8769
8802
  - **`sat/1`** — `library(clpb)` · **`delayed`**
8770
8803
  **Call:** `sat(+BooleanExpression)`
8771
8804
  **Contract:** Posts Boolean constraints represented by BooleanExpression and fails iff they are inconsistent.
8772
- <a id="predicate-reference-0428"></a>
8805
+ <a id="predicate-reference-0429"></a>
8773
8806
  - **`scalar_product/4`** — `library(clpz)` · **`delayed`**
8774
8807
  **Call:** `scalar_product(+Coefficients,+Vars,+Relation,+Expr)`
8775
8808
  **Contract:** Constrains the scalar product of Coefficients and Vars by Relation to Expr.
8776
- <a id="predicate-reference-0429"></a>
8809
+ <a id="predicate-reference-0430"></a>
8777
8810
  - **`select/3`** — `library(lists)` · **`nondet`**
8778
8811
  **Call:** `select(?Item,+List,?Rest)`
8779
8812
  **Contract:** Relates List to Rest after removing one occurrence that unifies with Item; alternatives remove later occurrences.
8780
- <a id="predicate-reference-0430"></a>
8813
+ <a id="predicate-reference-0431"></a>
8781
8814
  - **`selectchk/3`** — `library(lists)` · **`semidet`**
8782
8815
  **Call:** `selectchk(?Item,+List,?Rest)`
8783
8816
  **Contract:** Like select/3 but commits to the first removable occurrence.
8784
- <a id="predicate-reference-0431"></a>
8817
+ <a id="predicate-reference-0432"></a>
8785
8818
  - **`seq/3`** — `library(dcgs)` · **`mode-dependent`**
8786
8819
  **Call:** `seq(?Sequence,?S0,?S)`
8787
8820
  **Contract:** DCG relation that consumes or emits exactly Sequence between difference-list states S0 and S.
8788
- <a id="predicate-reference-0432"></a>
8821
+ <a id="predicate-reference-0433"></a>
8789
8822
  - **`seqq/3`** — `library(dcgs)` · **`nondet`**
8790
8823
  **Call:** `seqq(+Sequences,?S0,?S)`
8791
8824
  **Contract:** DCG relation that chooses one sequence from Sequences and consumes or emits it between S0 and S.
8792
- <a id="predicate-reference-0433"></a>
8825
+ <a id="predicate-reference-0434"></a>
8793
8826
  - **`serialized/2`** — `library(clpz)` · **`delayed`**
8794
8827
  **Call:** `serialized(+Starts,+Durations)`
8795
8828
  **Contract:** Constrains tasks with Starts and Durations not to overlap.
8796
- <a id="predicate-reference-0434"></a>
8829
+ <a id="predicate-reference-0435"></a>
8797
8830
  - **`set_input/1`** — `ISO core` · **`det`**
8798
8831
  **Call:** `set_input(+Stream)`
8799
8832
  **Contract:** Makes Stream the current input stream.
8800
- <a id="predicate-reference-0435"></a>
8833
+ <a id="predicate-reference-0436"></a>
8801
8834
  - **`set_nth0/4`** — `library(lists)` · **`semidet`**
8802
8835
  **Call:** `set_nth0(+Index,+List,+Item,-NewList)`
8803
8836
  **Contract:** Returns NewList with the existing zero-based Index replaced by Item.
8804
- <a id="predicate-reference-0436"></a>
8837
+ <a id="predicate-reference-0437"></a>
8805
8838
  - **`set_output/1`** — `ISO core` · **`det`**
8806
8839
  **Call:** `set_output(+Stream)`
8807
8840
  **Contract:** Makes Stream the current output stream.
8808
- <a id="predicate-reference-0437"></a>
8841
+ <a id="predicate-reference-0438"></a>
8809
8842
  - **`set_prolog_flag/2`** — `ISO core` · **`det`**
8810
8843
  **Call:** `set_prolog_flag(+Flag,+Value)`
8811
8844
  **Contract:** Sets a supported mutable Prolog flag after validating its value.
8812
- <a id="predicate-reference-0438"></a>
8845
+ <a id="predicate-reference-0439"></a>
8813
8846
  - **`set_random/1`** — `library(random)` · **`det`**
8814
8847
  **Call:** `set_random(+Option)`
8815
8848
  **Contract:** Sets the mutable pseudo-random generator state; seed(random) chooses a time-derived seed.
8816
- <a id="predicate-reference-0439"></a>
8849
+ <a id="predicate-reference-0440"></a>
8817
8850
  - **`set_stream_position/2`** — `ISO core` · **`det`**
8818
8851
  **Call:** `set_stream_position(+Stream,+Position)`
8819
8852
  **Contract:** Repositions a repositionable stream to Position.
8820
- <a id="predicate-reference-0440"></a>
8853
+ <a id="predicate-reference-0441"></a>
8821
8854
  - **`setenv/2`** — `library(os)` · **`det`**
8822
8855
  **Call:** `setenv(+Name,+Value)`
8823
8856
  **Contract:** Sets the host process environment variable Name to Value.
8824
- <a id="predicate-reference-0441"></a>
8857
+ <a id="predicate-reference-0442"></a>
8825
8858
  - **`setof/3`** — `ISO core` · **`nondet`**
8826
8859
  **Call:** `setof(+Template,+Goal,?Set)`
8827
8860
  **Contract:** Like bagof/3, but each witness group is sorted by term order with identical duplicates removed.
8828
- <a id="predicate-reference-0442"></a>
8861
+ <a id="predicate-reference-0443"></a>
8829
8862
  - **`setup_call_cleanup/3`** — `library(iso_ext)` · **`meta`**
8830
8863
  **Call:** `setup_call_cleanup(+Setup,+Goal,+Cleanup)`
8831
8864
  **Contract:** Runs Setup once, calls Goal, and guarantees Cleanup after Goal terminates in any way.
8832
- <a id="predicate-reference-0443"></a>
8865
+ <a id="predicate-reference-0444"></a>
8833
8866
  - **`shell/1`** — `library(os)` · **`semidet`**
8834
8867
  **Call:** `shell(+Command)`
8835
8868
  **Contract:** Runs Command in the host shell and succeeds iff it exits successfully.
8836
- <a id="predicate-reference-0444"></a>
8869
+ <a id="predicate-reference-0445"></a>
8837
8870
  - **`shell/2`** — `library(os)` · **`det`**
8838
8871
  **Call:** `shell(+Command,?Status)`
8839
8872
  **Contract:** Runs Command in the host shell and returns its exit Status.
8840
- <a id="predicate-reference-0445"></a>
8873
+ <a id="predicate-reference-0446"></a>
8841
8874
  - **`sleep/1`** — `library(time)` · **`det`**
8842
8875
  **Call:** `sleep(+Seconds)`
8843
8876
  **Contract:** Suspends execution for the requested finite nonnegative duration, subject to the implementation limit.
8844
- <a id="predicate-reference-0446"></a>
8877
+ <a id="predicate-reference-0447"></a>
8845
8878
  - **`slice/4`** — `library(lists)` · **`semidet`**
8846
8879
  **Call:** `slice(+Start,+Count,+List,-Slice)`
8847
8880
  **Contract:** Returns exactly Count elements of List beginning at zero-based Start.
8848
- <a id="predicate-reference-0447"></a>
8881
+ <a id="predicate-reference-0448"></a>
8849
8882
  - **`smallest_divisor_from/3`** — `library(primes)` · **`semidet`**
8850
8883
  **Call:** `smallest_divisor_from(+N,+Start,-Divisor)`
8851
8884
  **Contract:** Returns the least divisor of N not smaller than Start according to the module's integer primality search.
8852
- <a id="predicate-reference-0448"></a>
8885
+ <a id="predicate-reference-0449"></a>
8886
+ - **`socket_client_open/3`** — `library(sockets)` · **`semidet`**
8887
+ **Call:** `socket_client_open(+Address,-Stream,+Options)`
8888
+ **Contract:** Opens a TCP connection to Address:Port and returns a bidirectional stream using the requested stream options.
8889
+ <a id="predicate-reference-0450"></a>
8890
+ - **`socket_server_accept/4`** — `library(sockets)` · **`det`**
8891
+ **Call:** `socket_server_accept(+ServerSocket,-Client,-Stream,+Options)`
8892
+ **Contract:** Waits for the next TCP connection, returning the peer address and a bidirectional stream for that connection.
8893
+ <a id="predicate-reference-0451"></a>
8894
+ - **`socket_server_close/1`** — `library(sockets)` · **`det`**
8895
+ **Call:** `socket_server_close(+ServerSocket)`
8896
+ **Contract:** Stops accepting new TCP connections on ServerSocket without closing streams already accepted from it.
8897
+ <a id="predicate-reference-0452"></a>
8898
+ - **`socket_server_open/2`** — `library(sockets)` · **`semidet`**
8899
+ **Call:** `socket_server_open(?Address,-ServerSocket)`
8900
+ **Contract:** Opens a TCP listening socket; an unbound port requests an ephemeral port and is unified with the selected port.
8901
+ <a id="predicate-reference-0453"></a>
8853
8902
  - **`sort/2`** — `ISO core` · **`det`**
8854
8903
  **Call:** `sort(+List,?Sorted)`
8855
8904
  **Contract:** Sorts List by standard term order and removes identical duplicates.
8856
- <a id="predicate-reference-0449"></a>
8905
+ <a id="predicate-reference-0454"></a>
8857
8906
  - **`split/3`** — `library(strings)` · **`det`**
8858
8907
  **Call:** `split(+Text,+Separator,-Parts)`
8859
8908
  **Contract:** Splits Text at literal Separator occurrences into a proper list of atom parts.
8860
- <a id="predicate-reference-0450"></a>
8909
+ <a id="predicate-reference-0455"></a>
8861
8910
  - **`stable/1`** — `library(eyelet)` · **`meta`**
8862
8911
  **Call:** `stable(+Goal)`
8863
8912
  **Contract:** Runs Goal to Eyelet fixed-point stability.
8864
- <a id="predicate-reference-0451"></a>
8913
+ <a id="predicate-reference-0456"></a>
8865
8914
  - **`start_tabling/2`** — `library(tabling)` · **`meta`**
8866
8915
  **Call:** `start_tabling(+Wrapper,+Worker)`
8867
8916
  **Contract:** Compatibility entry point that executes Worker through EyeProlog's table-aware evaluation for Wrapper.
8868
- <a id="predicate-reference-0452"></a>
8917
+ <a id="predicate-reference-0457"></a>
8869
8918
  - **`statistics/2`** — `library(time)` · **`det`**
8870
8919
  **Call:** `statistics(+Key,?Value)`
8871
8920
  **Contract:** Returns the supported runtime statistic selected by Key.
8872
- <a id="predicate-reference-0453"></a>
8921
+ <a id="predicate-reference-0458"></a>
8873
8922
  - **`stream_property/2`** — `ISO core` · **`nondet`**
8874
8923
  **Call:** `stream_property(?Stream,?Property)`
8875
8924
  **Contract:** Enumerates supported properties of open streams, optionally filtering Stream or Property.
8876
- <a id="predicate-reference-0454"></a>
8925
+ <a id="predicate-reference-0459"></a>
8877
8926
  - **`string_concat/3`** — `library(strings)` · **`nondet`**
8878
8927
  **Call:** `string_concat(?Left,?Right,?Text)`
8879
8928
  **Contract:** Relates Text to literal concatenation of Left and Right; with Text fixed it can enumerate splits.
8880
- <a id="predicate-reference-0455"></a>
8929
+ <a id="predicate-reference-0460"></a>
8881
8930
  - **`sub_atom/5`** — `ISO core` · **`nondet`**
8882
8931
  **Call:** `sub_atom(+Atom,?Before,?Length,?After,?SubAtom)`
8883
8932
  **Contract:** Relates Atom to a substring, its Unicode-scalar offset, length, and remaining suffix length.
8884
- <a id="predicate-reference-0456"></a>
8933
+ <a id="predicate-reference-0461"></a>
8885
8934
  - **`substring/4`** — `library(strings)` · **`semidet`**
8886
8935
  **Call:** `substring(+Text,+Start,+Count,-Part)`
8887
8936
  **Contract:** Extracts exactly Count characters beginning at zero-based Start from Text.
8888
- <a id="predicate-reference-0457"></a>
8937
+ <a id="predicate-reference-0462"></a>
8889
8938
  - **`subsumes_term/2`** — `ISO core` · **`semidet`**
8890
8939
  **Call:** `subsumes_term(+General,+Specific)`
8891
8940
  **Contract:** Succeeds iff General subsumes Specific without binding either argument.
8892
- <a id="predicate-reference-0458"></a>
8941
+ <a id="predicate-reference-0463"></a>
8893
8942
  - **`subtract/3`** — `library(lists)` · **`det`**
8894
8943
  **Call:** `subtract(+List,+Delete,-Rest)`
8895
8944
  **Contract:** Removes from List every element that unifies with some element of Delete, preserving the remaining order.
8896
- <a id="predicate-reference-0459"></a>
8945
+ <a id="predicate-reference-0464"></a>
8897
8946
  - **`succ/2`** — `library(iso_ext)` · **`mode-dependent`**
8898
8947
  **Call:** `succ(?N,?S)`
8899
8948
  **Contract:** Relates nonnegative integers N and S when S is exactly N+1.
8900
- <a id="predicate-reference-0460"></a>
8949
+ <a id="predicate-reference-0465"></a>
8901
8950
  - **`sum_list/2`** — `library(lists)` · **`det`**
8902
8951
  **Call:** `sum_list(+List,-Sum)`
8903
8952
  **Contract:** Evaluates and sums the numeric elements of List; the empty sum is 0.
8904
- <a id="predicate-reference-0461"></a>
8953
+ <a id="predicate-reference-0466"></a>
8905
8954
  - **`sum/3`** — `library(clpz)` · **`delayed`**
8906
8955
  **Call:** `sum(+Exprs,+Relation,+Expr)`
8907
8956
  **Contract:** Constrains the sum of Exprs to stand in Relation (#=, #=<, etc.) to Expr.
8908
- <a id="predicate-reference-0462"></a>
8957
+ <a id="predicate-reference-0467"></a>
8909
8958
  - **`sumall/3`** — `library(aggregate)` · **`det`**
8910
8959
  **Call:** `sumall(+Template,+Goal,-Sum)`
8911
8960
  **Contract:** Sums the numeric Template value over every solution of Goal; the empty sum is 0.
8912
8961
 
8913
8962
  #### Predicate reference — T
8914
8963
 
8915
- <a id="predicate-reference-0463"></a>
8964
+ <a id="predicate-reference-0468"></a>
8916
8965
  - **`take/3`** — `library(lists)` · **`semidet`**
8917
8966
  **Call:** `take(+Count,+List,-Prefix)`
8918
8967
  **Contract:** Returns exactly the first Count elements of List; fails when List is too short.
8919
- <a id="predicate-reference-0464"></a>
8968
+ <a id="predicate-reference-0469"></a>
8920
8969
  - **`tasklist/2`** — `library(lists)` · **`meta`**
8921
8970
  **Call:** `tasklist(+Goal,?List1)`
8922
8971
  **Contract:** Compatibility relation applying Goal pointwise over 1 list(s); EyeProlog deliberately executes these tasks sequentially.
8923
- <a id="predicate-reference-0465"></a>
8972
+ <a id="predicate-reference-0470"></a>
8924
8973
  - **`tasklist/3`** — `library(lists)` · **`meta`**
8925
8974
  **Call:** `tasklist(+Goal,?List1,?List2)`
8926
8975
  **Contract:** Compatibility relation applying Goal pointwise over 2 list(s); EyeProlog deliberately executes these tasks sequentially.
8927
- <a id="predicate-reference-0466"></a>
8976
+ <a id="predicate-reference-0471"></a>
8928
8977
  - **`tasklist/4`** — `library(lists)` · **`meta`**
8929
8978
  **Call:** `tasklist(+Goal,?List1,?List2,?List3)`
8930
8979
  **Contract:** Compatibility relation applying Goal pointwise over 3 list(s); EyeProlog deliberately executes these tasks sequentially.
8931
- <a id="predicate-reference-0467"></a>
8980
+ <a id="predicate-reference-0472"></a>
8932
8981
  - **`tasklist/5`** — `library(lists)` · **`meta`**
8933
8982
  **Call:** `tasklist(+Goal,?List1,?List2,?List3,?List4)`
8934
8983
  **Contract:** Compatibility relation applying Goal pointwise over 4 list(s); EyeProlog deliberately executes these tasks sequentially.
8935
- <a id="predicate-reference-0468"></a>
8984
+ <a id="predicate-reference-0473"></a>
8936
8985
  - **`tasklist/6`** — `library(lists)` · **`meta`**
8937
8986
  **Call:** `tasklist(+Goal,?List1,?List2,?List3,?List4,?List5)`
8938
8987
  **Contract:** Compatibility relation applying Goal pointwise over 5 list(s); EyeProlog deliberately executes these tasks sequentially.
8939
- <a id="predicate-reference-0469"></a>
8988
+ <a id="predicate-reference-0474"></a>
8940
8989
  - **`tasklist/7`** — `library(lists)` · **`meta`**
8941
8990
  **Call:** `tasklist(+Goal,?List1,?List2,?List3,?List4,?List5,?List6)`
8942
8991
  **Contract:** Compatibility relation applying Goal pointwise over 6 list(s); EyeProlog deliberately executes these tasks sequentially.
8943
- <a id="predicate-reference-0470"></a>
8992
+ <a id="predicate-reference-0475"></a>
8944
8993
  - **`tasklist/8`** — `library(lists)` · **`meta`**
8945
8994
  **Call:** `tasklist(+Goal,?List1,?List2,?List3,?List4,?List5,?List6,?List7)`
8946
8995
  **Contract:** Compatibility relation applying Goal pointwise over 7 list(s); EyeProlog deliberately executes these tasks sequentially.
8947
- <a id="predicate-reference-0471"></a>
8996
+ <a id="predicate-reference-0476"></a>
8948
8997
  - **`taut/2`** — `library(clpb)` · **`semidet`**
8949
8998
  **Call:** `taut(+BooleanExpression,?Truth)`
8950
8999
  **Contract:** Determines whether the Boolean expression is a tautology or contradiction and relates Truth to the result.
8951
- <a id="predicate-reference-0472"></a>
9000
+ <a id="predicate-reference-0477"></a>
8952
9001
  - **`term_attributed_variables/2`** — `library(atts)` · **`det`**
8953
9002
  **Call:** `term_attributed_variables(+Term,-Vars)`
8954
9003
  **Contract:** Returns the distinct attributed variables reachable in Term.
8955
- <a id="predicate-reference-0473"></a>
9004
+ <a id="predicate-reference-0478"></a>
8956
9005
  - **`term_si/1`** — `library(si)` · **`semidet`**
8957
9006
  **Call:** `term_si(?Term)`
8958
9007
  **Contract:** Succeeds iff Term is sufficiently instantiated to be treated as term by dependent constraint code.
8959
- <a id="predicate-reference-0474"></a>
9008
+ <a id="predicate-reference-0479"></a>
8960
9009
  - **`term_string/2`** — `library(strings)` · **`det`**
8961
9010
  **Call:** `term_string(+Term,-Text)`
8962
9011
  **Contract:** Renders a nonvariable Term to portable atom/character-list text; this implementation does not parse Text back.
8963
- <a id="predicate-reference-0475"></a>
9012
+ <a id="predicate-reference-0480"></a>
8964
9013
  - **`term_variables/2`** — `ISO core` · **`det`**
8965
9014
  **Call:** `term_variables(+Term,?Variables)`
8966
9015
  **Contract:** Returns the distinct variables of Term in first-occurrence traversal order.
8967
- <a id="predicate-reference-0476"></a>
9016
+ <a id="predicate-reference-0481"></a>
8968
9017
  - **`tfilter/3`** — `library(reif)` · **`meta`**
8969
9018
  **Call:** `tfilter(+ReifiedPred,+List,-Filtered)`
8970
9019
  **Contract:** Filters List by a reified predicate whose final argument is true or false.
8971
- <a id="predicate-reference-0477"></a>
9020
+ <a id="predicate-reference-0482"></a>
8972
9021
  - **`throw/1`** — `ISO core` · **`terminal`**
8973
9022
  **Call:** `throw(+Ball)`
8974
9023
  **Contract:** Raises Ball as the current Prolog exception; Ball must be instantiated.
8975
- <a id="predicate-reference-0478"></a>
9024
+ <a id="predicate-reference-0483"></a>
8976
9025
  - **`time/1`** — `library(iso_ext)` · **`meta`**
8977
9026
  **Call:** `time(+Goal)`
8978
9027
  **Contract:** Runs Goal and reports elapsed time, inference count, and MLips for each solution.
8979
- <a id="predicate-reference-0479"></a>
9028
+ <a id="predicate-reference-0484"></a>
8980
9029
  - **`tmember_t/3`** — `library(reif)` · **`delayed`**
8981
9030
  **Call:** `tmember_t(?Item,+List,?Truth)`
8982
9031
  **Contract:** Reifies tmember/2 membership into Truth.
8983
- <a id="predicate-reference-0480"></a>
9032
+ <a id="predicate-reference-0485"></a>
8984
9033
  - **`tmember/2`** — `library(reif)` · **`nondet`**
8985
9034
  **Call:** `tmember(?Item,+List)`
8986
9035
  **Contract:** Membership relation implemented through reified disequality so duplicate/unbound cases remain declarative.
8987
- <a id="predicate-reference-0481"></a>
9036
+ <a id="predicate-reference-0486"></a>
8988
9037
  - **`top_sort/2`** — `library(ugraphs)` · **`semidet`**
8989
9038
  **Call:** `top_sort(+Graph,-Order)`
8990
9039
  **Contract:** Returns a topological ordering of an acyclic directed graph; fails when a cycle prevents one.
8991
- <a id="predicate-reference-0482"></a>
9040
+ <a id="predicate-reference-0487"></a>
8992
9041
  - **`top_sort/3`** — `library(ugraphs)` · **`mode-dependent`**
8993
9042
  **Call:** `top_sort(+Graph,-Order,-Rest)`
8994
9043
  **Contract:** Extended topological-sort relation returning the ordered portion and the library-defined residual/cyclic portion.
8995
- <a id="predicate-reference-0483"></a>
9044
+ <a id="predicate-reference-0488"></a>
8996
9045
  - **`tpartition/4`** — `library(reif)` · **`meta`**
8997
9046
  **Call:** `tpartition(+ReifiedPred,+List,-True,-False)`
8998
9047
  **Contract:** Partitions List into elements for which ReifiedPred yields true and false, preserving order.
8999
- <a id="predicate-reference-0484"></a>
9048
+ <a id="predicate-reference-0489"></a>
9000
9049
  - **`transitive_closure/2`** — `library(ugraphs)` · **`det`**
9001
9050
  **Call:** `transitive_closure(+Graph,-Closure)`
9002
9051
  **Contract:** Computes the graph whose adjacency lists contain all reachable vertices.
9003
- <a id="predicate-reference-0485"></a>
9052
+ <a id="predicate-reference-0490"></a>
9004
9053
  - **`transpose_ugraph/2`** — `library(ugraphs)` · **`det`**
9005
9054
  **Call:** `transpose_ugraph(+Graph,-Transpose)`
9006
9055
  **Contract:** Reverses every directed edge of Graph.
9007
- <a id="predicate-reference-0486"></a>
9056
+ <a id="predicate-reference-0491"></a>
9008
9057
  - **`transpose/2`** — `library(lists)` · **`det`**
9009
9058
  **Call:** `transpose(+Rows,?Columns)`
9010
9059
  **Contract:** Transposes a rectangular list of equal-length row lists into columns.
9011
- <a id="predicate-reference-0487"></a>
9060
+ <a id="predicate-reference-0492"></a>
9012
9061
  - **`trim/2`** — `library(strings)` · **`det`**
9013
9062
  **Call:** `trim(+Text,-Trimmed)`
9014
9063
  **Contract:** Removes portable ASCII whitespace from both ends of Text.
9015
- <a id="predicate-reference-0488"></a>
9064
+ <a id="predicate-reference-0493"></a>
9016
9065
  - **`true/0`** — `ISO core` · **`det`**
9017
9066
  **Call:** `true`
9018
9067
  **Contract:** Succeeds exactly once without changing the substitution.
9019
- <a id="predicate-reference-0489"></a>
9068
+ <a id="predicate-reference-0494"></a>
9020
9069
  - **`tuples_in/2`** — `library(clpz)` · **`delayed`**
9021
9070
  **Call:** `tuples_in(+Tuples,+RelationTuples)`
9022
9071
  **Contract:** Constrains each tuple in Tuples to be a member of the extensional relation RelationTuples.
9023
- <a id="predicate-reference-0490"></a>
9072
+ <a id="predicate-reference-0495"></a>
9024
9073
  - **`type_error/2`** — `library(error)` · **`terminal`**
9025
9074
  **Call:** `type_error(+Type,+Term)`
9026
9075
  **Contract:** Raises a type_error(Type,Term) exception.
9027
- <a id="predicate-reference-0491"></a>
9076
+ <a id="predicate-reference-0496"></a>
9028
9077
  - **`type_error/3`** — `library(error)` · **`terminal`**
9029
9078
  **Call:** `type_error(+Type,+Term,+Context)`
9030
9079
  **Contract:** Raises a type_error(Type,Term) exception carrying Context.
9031
9080
 
9032
9081
  #### Predicate reference — U
9033
9082
 
9034
- <a id="predicate-reference-0492"></a>
9083
+ <a id="predicate-reference-0497"></a>
9035
9084
  - **`ugraph_union/3`** — `library(ugraphs)` · **`det`**
9036
9085
  **Call:** `ugraph_union(+A,+B,-Union)`
9037
9086
  **Contract:** Computes the union of two canonical directed graphs.
9038
- <a id="predicate-reference-0493"></a>
9087
+ <a id="predicate-reference-0498"></a>
9039
9088
  - **`unify_with_occurs_check/2`** — `ISO core` · **`semidet`**
9040
9089
  **Call:** `unify_with_occurs_check(?Left,?Right)`
9041
9090
  **Contract:** Unifies Left and Right while rejecting bindings that would create a cyclic term.
9042
- <a id="predicate-reference-0494"></a>
9091
+ <a id="predicate-reference-0499"></a>
9043
9092
  - **`union/3`** — `library(lists)` · **`det`**
9044
9093
  **Call:** `union(+A,+B,-Union)`
9045
9094
  **Contract:** Constructs the list-set union by adding elements of A not already unifiable with members of B.
9046
- <a id="predicate-reference-0495"></a>
9095
+ <a id="predicate-reference-0500"></a>
9047
9096
  - **`unsetenv/1`** — `library(os)` · **`det`**
9048
9097
  **Call:** `unsetenv(+Name)`
9049
9098
  **Contract:** Removes Name from the host process environment.
9050
- <a id="predicate-reference-0496"></a>
9099
+ <a id="predicate-reference-0501"></a>
9051
9100
  - **`uppercase/2`** — `library(strings)` · **`det`**
9052
9101
  **Call:** `uppercase(+Text,-Upper)`
9053
9102
  **Contract:** Maps ASCII lowercase letters in Text to uppercase while preserving other characters.
9054
- <a id="predicate-reference-0497"></a>
9103
+ <a id="predicate-reference-0502"></a>
9055
9104
  - **`uuid_string/2`** — `library(uuid)` · **`mode-dependent`**
9056
9105
  **Call:** `uuid_string(?UUID,?Chars)`
9057
9106
  **Contract:** Relates a UUID byte/term representation to its canonical textual character-list form.
9058
- <a id="predicate-reference-0498"></a>
9107
+ <a id="predicate-reference-0503"></a>
9059
9108
  - **`uuid/3`** — `library(uuid)` · **`det`**
9060
9109
  **Call:** `uuid(+Seed0,-UUID,-Seed)`
9061
9110
  **Contract:** Pure state-threaded generation of a version-4 UUID atom from Seed0, returning successor Seed.
9062
- <a id="predicate-reference-0499"></a>
9111
+ <a id="predicate-reference-0504"></a>
9063
9112
  - **`uuidv4_string/1`** — `library(uuid)` · **`det`**
9064
9113
  **Call:** `uuidv4_string(-Chars)`
9065
9114
  **Contract:** Generates a version-4 UUID directly in canonical textual character-list form.
9066
- <a id="predicate-reference-0500"></a>
9115
+ <a id="predicate-reference-0505"></a>
9067
9116
  - **`uuidv4/1`** — `library(uuid)` · **`det`**
9068
9117
  **Call:** `uuidv4(-UUID)`
9069
9118
  **Contract:** Generates a version-4 UUID byte/term representation using the current pseudo-random generator.
9070
9119
 
9071
9120
  #### Predicate reference — V
9072
9121
 
9073
- <a id="predicate-reference-0501"></a>
9122
+ <a id="predicate-reference-0506"></a>
9074
9123
  - **`var/1`** — `ISO core` · **`semidet`**
9075
9124
  **Call:** `var(?Term)`
9076
9125
  **Contract:** Succeeds iff Term is an unbound variable.
9077
- <a id="predicate-reference-0502"></a>
9126
+ <a id="predicate-reference-0507"></a>
9078
9127
  - **`variant/2`** — `library(iso_ext)` · **`semidet`**
9079
9128
  **Call:** `variant(+A,+B)`
9080
9129
  **Contract:** Succeeds iff A and B are structurally identical up to a bijective renaming of variables.
9081
- <a id="predicate-reference-0503"></a>
9130
+ <a id="predicate-reference-0508"></a>
9082
9131
  - **`vertices_edges_to_ugraph/3`** — `library(ugraphs)` · **`det`**
9083
9132
  **Call:** `vertices_edges_to_ugraph(+Vertices,+Edges,-Graph)`
9084
9133
  **Contract:** Builds the canonical ordered adjacency-list graph from Vertices and directed Edges.
9085
- <a id="predicate-reference-0504"></a>
9134
+ <a id="predicate-reference-0509"></a>
9086
9135
  - **`vertices/2`** — `library(ugraphs)` · **`det`**
9087
9136
  **Call:** `vertices(+Graph,-Vertices)`
9088
9137
  **Contract:** Returns the vertices of Graph in graph order.
9089
9138
 
9090
9139
  #### Predicate reference — W
9091
9140
 
9092
- <a id="predicate-reference-0505"></a>
9141
+ <a id="predicate-reference-0510"></a>
9093
9142
  - **`weighted_maximum/3`** — `library(clpb)` · **`nondet`**
9094
9143
  **Call:** `weighted_maximum(+Weights,+BooleanVariables,-Maximum)`
9095
9144
  **Contract:** Finds Boolean assignments maximizing the weighted objective and returns its maximum.
9096
- <a id="predicate-reference-0506"></a>
9145
+ <a id="predicate-reference-0511"></a>
9097
9146
  - **`when_si/2`** — `library(si)` · **`delayed`**
9098
9147
  **Call:** `when_si(+Condition,+Goal)`
9099
9148
  **Contract:** Runs Goal once Condition is sufficiently instantiated according to the SI condition language.
9100
- <a id="predicate-reference-0507"></a>
9149
+ <a id="predicate-reference-0512"></a>
9101
9150
  - **`when/2`** — `library(when)` · **`delayed`**
9102
9151
  **Call:** `when(+Condition,+Goal)`
9103
9152
  **Contract:** Calls Goal as soon as Condition over attributed variables becomes true; otherwise suspends it.
9104
- <a id="predicate-reference-0508"></a>
9153
+ <a id="predicate-reference-0513"></a>
9105
9154
  - **`working_directory/2`** — `library(files)` · **`det`**
9106
9155
  **Call:** `working_directory(?Old,+New)`
9107
9156
  **Contract:** Returns the current working directory in Old and, when New differs, changes the process working directory.
9108
- <a id="predicate-reference-0509"></a>
9157
+ <a id="predicate-reference-0514"></a>
9109
9158
  - **`write_canonical/1`** — `ISO core` · **`det`**
9110
9159
  **Call:** `write_canonical(+Term)`
9111
9160
  **Contract:** Writes Term to the current output stream in canonical syntax without operator abbreviations.
9112
- <a id="predicate-reference-0510"></a>
9161
+ <a id="predicate-reference-0515"></a>
9113
9162
  - **`write_canonical/2`** — `ISO core` · **`det`**
9114
9163
  **Call:** `write_canonical(+Stream,+Term)`
9115
9164
  **Contract:** Writes Term to Stream in canonical syntax without operator abbreviations.
9116
- <a id="predicate-reference-0511"></a>
9165
+ <a id="predicate-reference-0516"></a>
9117
9166
  - **`write_term_to_chars/3`** — `library(charsio)` · **`det`**
9118
9167
  **Call:** `write_term_to_chars(+Term,-Chars,+Options)`
9119
9168
  **Contract:** Renders Term as a character list according to write Options.
9120
- <a id="predicate-reference-0512"></a>
9169
+ <a id="predicate-reference-0517"></a>
9121
9170
  - **`write_term/2`** — `ISO core` · **`det`**
9122
9171
  **Call:** `write_term(+Term,+Options)`
9123
9172
  **Contract:** Writes Term to the current output stream according to Options.
9124
- <a id="predicate-reference-0513"></a>
9173
+ <a id="predicate-reference-0518"></a>
9125
9174
  - **`write_term/3`** — `ISO core` · **`det`**
9126
9175
  **Call:** `write_term(+Stream,+Term,+Options)`
9127
9176
  **Contract:** Writes Term to Stream according to Options.
9128
- <a id="predicate-reference-0514"></a>
9177
+ <a id="predicate-reference-0519"></a>
9129
9178
  - **`write/1`** — `ISO core` · **`det`**
9130
9179
  **Call:** `write(+Term)`
9131
9180
  **Contract:** Writes Term to the current output stream using ordinary operator notation.
9132
- <a id="predicate-reference-0515"></a>
9181
+ <a id="predicate-reference-0520"></a>
9133
9182
  - **`write/2`** — `ISO core` · **`det`**
9134
9183
  **Call:** `write(+Stream,+Term)`
9135
9184
  **Contract:** Writes Term to Stream using ordinary operator notation.
9136
- <a id="predicate-reference-0516"></a>
9185
+ <a id="predicate-reference-0521"></a>
9137
9186
  - **`writeq/1`** — `ISO core` · **`det`**
9138
9187
  **Call:** `writeq(+Term)`
9139
9188
  **Contract:** Writes Term to the current output stream with quoting sufficient for readback.
9140
- <a id="predicate-reference-0517"></a>
9189
+ <a id="predicate-reference-0522"></a>
9141
9190
  - **`writeq/2`** — `ISO core` · **`det`**
9142
9191
  **Call:** `writeq(+Stream,+Term)`
9143
9192
  **Contract:** Writes Term to Stream with quoting sufficient for readback.
9144
9193
 
9145
9194
  #### Predicate reference — Z
9146
9195
 
9147
- <a id="predicate-reference-0518"></a>
9196
+ <a id="predicate-reference-0523"></a>
9148
9197
  - **`zcompare/3`** — `library(clpz)` · **`delayed`**
9149
9198
  **Call:** `zcompare(?Order,?A,?B)`
9150
9199
  **Contract:** Relates Order (<,=,>) to the constrained integer comparison between A and B.
@@ -10560,6 +10609,22 @@ variables. Variant recognition is important for tabling and cycle analysis.
10560
10609
  **Witness.** A constructed ground term demonstrating an existential result,
10561
10610
  such as a path, assignment, factorization, schedule, or proof-relevant object.
10562
10611
 
10612
+ ### Historical note: manuals become specifications
10613
+
10614
+ Early Prolog programmers learned from implementation manuals, examples, and
10615
+ books whose descriptions were often inseparable from one particular system. As
10616
+ the language spread, reference writing acquired a second task: distinguish the
10617
+ portable language from implementation convention. Predicate indexes, precise
10618
+ mode and error descriptions, and standards documents became tools for comparing
10619
+ systems rather than merely operating one of them.
10620
+
10621
+ ISO standardization made that distinction explicit, while conformance tests and
10622
+ cross-processor corpora made many disagreements executable. A mature reference
10623
+ therefore joins several forms of evidence: normative prose, named predicates
10624
+ and flags, examples, implementation boundaries, and reproducible tests. The
10625
+ result is not a substitute for programming practice; it is a map from a
10626
+ concrete question to the exact contract that governs it.
10627
+
10563
10628
  # Part X — Laboratories
10564
10629
 
10565
10630
  ## 44. Twelve laboratories
@@ -10824,6 +10889,21 @@ A beautiful program is not merely short. It makes the reason for its
10824
10889
  correctness, the shape of its search, and the boundary of its trust available
10825
10890
  to the next reader.
10826
10891
 
10892
+ ### Historical note: logic programming grows through exercises
10893
+
10894
+ Logic programming has long been taught by construction. Lists, family
10895
+ relations, puzzles, grammars, interpreters, search problems, and small expert
10896
+ systems became recurring exercises because each exposes both a logical relation
10897
+ and the control needed to compute with it. Texts such as *The Art of Prolog*
10898
+ made this dual reading central: an exercise was not finished when a clause
10899
+ parsed, but when its meaning, modes, and behavior could be explained.
10900
+
10901
+ Laboratory practice later absorbed regression testing, property-oriented
10902
+ checking, benchmark corpora, and reproducible command-line runs. These tools
10903
+ fit logic programming unusually well because a small change can be examined at
10904
+ several levels at once: answers, failures, witnesses, proofs, and search. The
10905
+ laboratory is where a declarative claim becomes an executable experiment.
10906
+
10827
10907
  # Part XI — Review
10828
10908
 
10829
10909
  ## 45. Checkpoint notes and selected answers
@@ -10948,3 +11028,17 @@ unbounded theorem.
10948
11028
 
10949
11029
  For laboratory checkpoints, leave an artifact. A useful completion is not merely a paragraph: it is a small source file, predicted output, actual output, and one sentence explaining any difference.
10950
11030
 
11031
+ ### Historical note: review becomes explanation
11032
+
11033
+ The declarative reading of logic programs encouraged debugging methods that ask
11034
+ what a relation was intended to mean, not only which machine step came next. In
11035
+ the early 1980s, Ehud Shapiro's work on algorithmic debugging used computation
11036
+ trees together with a programmer's judgments about intended results to narrow a
11037
+ fault to the clause responsible for it. Declarative debugging developed this
11038
+ idea alongside, rather than instead of, ordinary tracing.
11039
+
11040
+ That tradition gives review a distinctive role in logic programming. A worked
11041
+ answer is useful when it can be reconstructed from the relation, the calling
11042
+ mode, and the evidence, and when a disagreement can be turned into a smaller
11043
+ question about meaning or control. Review then becomes another pass through the
11044
+ same discipline as programming: predict, execute, explain, and revise.