eyelang 0.5.0 → 0.5.2

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.
Files changed (299) hide show
  1. package/README.md +7 -7
  2. package/book-assets/cli-observation-loop.svg +1 -1
  3. package/book-assets/example-landscape.svg +1 -1
  4. package/book-assets/laboratory-progression.svg +1 -1
  5. package/book-assets/part-4-craft.svg +1 -1
  6. package/book-assets/rdf-adapter-pipeline.svg +3 -3
  7. package/book-assets/reference-navigation.svg +1 -1
  8. package/book-assets/review-lenses.svg +1 -1
  9. package/book-assets/title-page.svg +2 -2
  10. package/conformance-report.md +1 -1
  11. package/examples/book/README.md +4 -4
  12. package/examples/book/chapter-01/01-parent.pl +1 -1
  13. package/examples/book/chapter-01/02-child.pl +1 -1
  14. package/examples/book/chapter-02/01-measurement.pl +1 -1
  15. package/examples/book/chapter-02/02-label.pl +1 -1
  16. package/examples/book/chapter-03/01-eligible.pl +1 -1
  17. package/examples/book/chapter-03/02-adult.pl +1 -1
  18. package/examples/book/chapter-03/03-can_enter.pl +1 -1
  19. package/examples/book/chapter-03/04-high_score.pl +1 -1
  20. package/examples/book/chapter-03/05-parent.pl +1 -1
  21. package/examples/book/chapter-03/06-ancestor.pl +1 -1
  22. package/examples/book/chapter-03/07-different.pl +1 -1
  23. package/examples/book/chapter-03/08-has_parent.pl +1 -1
  24. package/examples/book/chapter-03/09-program.pl +1 -1
  25. package/examples/book/chapter-03/10-closed.pl +1 -1
  26. package/examples/book/chapter-03/11-p.pl +1 -1
  27. package/examples/book/chapter-04/01-path.pl +1 -1
  28. package/examples/book/chapter-05/01-first.pl +1 -1
  29. package/examples/book/chapter-05/02-reverse_acc.pl +1 -1
  30. package/examples/book/chapter-06/01-next.pl +1 -1
  31. package/examples/book/chapter-06/02-safe_reading.pl +1 -1
  32. package/examples/book/chapter-06/03-square.pl +1 -1
  33. package/examples/book/chapter-06/04-factorial.pl +1 -1
  34. package/examples/book/chapter-07/01-allowed.pl +1 -1
  35. package/examples/book/chapter-07/02-all_tests_pass.pl +1 -1
  36. package/examples/book/chapter-08/01-findall.pl +1 -1
  37. package/examples/book/chapter-08/02-outgoing_costs.pl +1 -1
  38. package/examples/book/chapter-08/03-best_route.pl +1 -1
  39. package/examples/book/chapter-09/01-functor.pl +1 -1
  40. package/examples/book/chapter-09/02-normalized.pl +1 -1
  41. package/examples/book/chapter-09/03-message.pl +1 -1
  42. package/examples/book/chapter-10/01-plan.pl +1 -1
  43. package/examples/book/chapter-11/01-why.pl +1 -1
  44. package/examples/book/chapter-12/01-invalid_probability.pl +1 -1
  45. package/examples/book/chapter-12/02-invalid_assignment.pl +1 -1
  46. package/examples/book/chapter-14/01-heating.pl +1 -1
  47. package/examples/book/chapter-15/01-rdf.pl +1 -1
  48. package/examples/book/chapter-16/01-socket.pl +1 -1
  49. package/examples/book/chapter-16/02-socket-2.pl +1 -1
  50. package/examples/book/chapter-17/01-path.pl +1 -1
  51. package/examples/book/chapter-17/02-adult.pl +1 -1
  52. package/examples/book/chapter-17/03-bad_member.pl +1 -1
  53. package/examples/book/chapter-17/04-item.pl +1 -1
  54. package/examples/book/chapter-18/01-routeable.pl +1 -1
  55. package/examples/book/chapter-18/02-routeable-2.pl +1 -1
  56. package/examples/book/chapter-18/03-prefix.pl +1 -1
  57. package/examples/book/chapter-18/04-candidate_pair.pl +1 -1
  58. package/examples/book/chapter-18/05-compatible_pair.pl +1 -1
  59. package/examples/book/chapter-19/01-factorial.pl +1 -1
  60. package/examples/book/chapter-19/02-invalid_limits.pl +1 -1
  61. package/examples/book/chapter-20/01-connected.pl +1 -1
  62. package/examples/book/chapter-20/02-within_thermal_limits.pl +1 -1
  63. package/examples/book/chapter-20/03-search.pl +1 -1
  64. package/examples/book/chapter-21/01-grandparent.pl +1 -1
  65. package/examples/book/chapter-21/02-loop_edge.pl +1 -1
  66. package/examples/book/chapter-21/03-eligible.pl +1 -1
  67. package/examples/book/chapter-21/04-grows.pl +1 -1
  68. package/examples/book/chapter-22/01-tree.pl +1 -1
  69. package/examples/book/chapter-22/02-tree_member.pl +1 -1
  70. package/examples/book/chapter-22/03-mirror.pl +1 -1
  71. package/examples/book/chapter-22/04-evaluate.pl +1 -1
  72. package/examples/book/chapter-22/05-lookup.pl +1 -1
  73. package/examples/book/chapter-22/06-simplify.pl +1 -1
  74. package/examples/book/chapter-23/01-adult.pl +1 -1
  75. package/examples/book/chapter-23/02-adult-2.pl +1 -1
  76. package/examples/book/chapter-23/03-can_board.pl +1 -1
  77. package/examples/book/chapter-23/04-traveler_in_good_standing.pl +1 -1
  78. package/examples/book/chapter-23/05-connection.pl +1 -1
  79. package/examples/book/chapter-23/06-rail_connection.pl +1 -1
  80. package/examples/book/chapter-23/07-sum_numbers.pl +1 -1
  81. package/examples/book/chapter-23/08-sum_numbers_acc.pl +1 -1
  82. package/examples/book/chapter-24/01-simple_path.pl +1 -1
  83. package/examples/book/chapter-24/02-reachable.pl +1 -1
  84. package/examples/book/chapter-24/03-best_plan.pl +1 -1
  85. package/examples/book/chapter-25/01-person.pl +1 -1
  86. package/examples/book/chapter-25/02-active_badge.pl +1 -1
  87. package/examples/book/chapter-25/03-in_good_standing.pl +1 -1
  88. package/examples/book/chapter-25/04-incompatible_status.pl +1 -1
  89. package/examples/book/chapter-26/01-mortal.pl +1 -1
  90. package/examples/book/chapter-26/02-triple.pl +1 -1
  91. package/examples/book/chapter-26/03-edge.pl +1 -1
  92. package/examples/book/chapter-27/01-natural.pl +1 -1
  93. package/examples/book/chapter-27/02-list_length.pl +1 -1
  94. package/examples/book/chapter-27/03-reverse_acc.pl +1 -1
  95. package/examples/book/chapter-28/01-program.pl +1 -1
  96. package/examples/book/chapter-28/02-triangle.pl +1 -1
  97. package/examples/book/chapter-28/03-rectangle.pl +1 -1
  98. package/examples/book/chapter-28/04-preserves_combine.pl +1 -1
  99. package/examples/book/chapter-29/01-noncommuting_pair.pl +1 -1
  100. package/examples/book/chapter-32/01-eligible.pl +1 -1
  101. package/examples/book/chapter-32/02-eligible-2.pl +1 -1
  102. package/examples/book/chapter-33/01-assigned_badge.pl +1 -1
  103. package/examples/book/chapter-33/02-source_role.pl +1 -1
  104. package/examples/book/chapter-33/03-chosen_pair.pl +1 -1
  105. package/examples/book/chapter-33/04-path.pl +1 -1
  106. package/examples/book/chapter-33/05-unregistered.pl +1 -1
  107. package/examples/book/chapter-33/06-step.pl +1 -1
  108. package/examples/book/chapter-33/07-depends.pl +1 -1
  109. package/examples/book/chapter-33/08-within_limit.pl +1 -1
  110. package/examples/book/chapter-33/09-invalid_badge_assignment.pl +1 -1
  111. package/examples/book/chapter-33/10-theory_version.pl +1 -1
  112. package/examples/book/chapter-34/01-travel_status.pl +1 -1
  113. package/examples/book/chapter-34/02-require_route.pl +1 -1
  114. package/examples/book/chapter-34/03-regional_total.pl +1 -1
  115. package/examples/book/chapter-35/01-term_shape.pl +1 -1
  116. package/examples/book/chapter-36/01-program.pl +1 -1
  117. package/examples/book/chapter-36/02-program-2.pl +1 -1
  118. package/examples/book/chapter-36/03-program-3.pl +1 -1
  119. package/examples/book/chapter-37/01-write_event.pl +1 -1
  120. package/examples/book/chapter-38/01-city.pl +1 -1
  121. package/examples/cdcl-sat-solver.pl +2 -2
  122. package/examples/collatz-1000.pl +1 -1
  123. package/examples/equality-saturation.pl +1 -1
  124. package/examples/existential-rule.pl +1 -1
  125. package/examples/herbrand-semantics.pl +1 -1
  126. package/examples/herbrand-witnesses.pl +1 -1
  127. package/examples/iso-integer-arithmetic.pl +1 -1
  128. package/examples/knowledge-engineering-alignment-flow.pl +1 -1
  129. package/examples/language.pl +2 -2
  130. package/examples/law-of-cosines.pl +1 -1
  131. package/examples/linear-logic-resources.pl +1 -1
  132. package/examples/markov-logic-network.pl +1 -1
  133. package/examples/matrix-noncommutativity.pl +1 -1
  134. package/examples/partial-evaluator.pl +1 -1
  135. package/examples/peano-calculus.pl +1 -1
  136. package/examples/prime-range.pl +1 -1
  137. package/examples/register-allocation.pl +1 -1
  138. package/examples/route-planning.pl +1 -1
  139. package/examples/sat-solver-dpll.pl +1 -1
  140. package/examples/symbolic-derivative.pl +1 -1
  141. package/examples/term-tools.pl +1 -1
  142. package/examples/trust-flow-provenance-threshold.pl +1 -1
  143. package/examples/vector-similarity.pl +1 -1
  144. package/examples/web-names.pl +1 -1
  145. package/examples/workplace-compliance.pl +1 -1
  146. package/eyelang-logo.png +0 -0
  147. package/index.d.ts +68 -68
  148. package/index.js +1 -1
  149. package/package.json +2 -2
  150. package/playground.html +10 -10
  151. package/src/cli.js +4 -4
  152. package/src/explain.js +4 -4
  153. package/src/index.js +4 -4
  154. package/src/iso.js +1 -1
  155. package/src/library.js +7 -7
  156. package/src/parser.js +1 -1
  157. package/src/playground-worker.js +2 -2
  158. package/src/solver.js +4 -4
  159. package/src/term.js +1 -1
  160. package/test/conformance/README.md +6 -6
  161. package/test/conformance/THIRD_PARTY.md +4 -4
  162. package/test/conformance/cases/iso/logtalk_abolish.pl +1 -1
  163. package/test/conformance/cases/iso/logtalk_arg_unification.pl +1 -1
  164. package/test/conformance/cases/iso/logtalk_assert_order.pl +1 -1
  165. package/test/conformance/cases/iso/logtalk_atom_chars.pl +1 -1
  166. package/test/conformance/cases/iso/logtalk_atom_codes.pl +1 -1
  167. package/test/conformance/cases/iso/logtalk_atom_concat.pl +1 -1
  168. package/test/conformance/cases/iso/logtalk_atom_length.pl +1 -1
  169. package/test/conformance/cases/iso/logtalk_bagof.pl +1 -1
  170. package/test/conformance/cases/iso/logtalk_char_code.pl +1 -1
  171. package/test/conformance/cases/iso/logtalk_clause.pl +1 -1
  172. package/test/conformance/cases/iso/logtalk_compare_standard_order.pl +1 -1
  173. package/test/conformance/cases/iso/logtalk_copy_term_semantics.pl +1 -1
  174. package/test/conformance/cases/iso/logtalk_current_predicate.pl +1 -1
  175. package/test/conformance/cases/iso/logtalk_current_streams.pl +1 -1
  176. package/test/conformance/cases/iso/logtalk_findall.pl +1 -1
  177. package/test/conformance/cases/iso/logtalk_number_chars.pl +1 -1
  178. package/test/conformance/cases/iso/logtalk_number_codes.pl +1 -1
  179. package/test/conformance/cases/iso/logtalk_occurs_check.pl +1 -1
  180. package/test/conformance/cases/iso/logtalk_once.pl +1 -1
  181. package/test/conformance/cases/iso/logtalk_operators.pl +1 -1
  182. package/test/conformance/cases/iso/logtalk_prolog_flags.pl +1 -1
  183. package/test/conformance/cases/iso/logtalk_repeat.pl +1 -1
  184. package/test/conformance/cases/iso/logtalk_retract.pl +1 -1
  185. package/test/conformance/cases/iso/logtalk_setof.pl +1 -1
  186. package/test/conformance/cases/iso/logtalk_sub_atom.pl +1 -1
  187. package/test/conformance/cases/iso/logtalk_term_comparison.pl +1 -1
  188. package/test/conformance/cases/iso/logtalk_term_variables.pl +1 -1
  189. package/test/conformance/cases/iso/logtalk_univ.pl +1 -1
  190. package/test/conformance/cases/strings/064_reusable_string_builtins.pl +3 -3
  191. package/test/conformance/cases/strings/071_string_edges.pl +1 -1
  192. package/test/conformance/errors/iso/logtalk_abolish_arity_type.pl +1 -1
  193. package/test/conformance/errors/iso/logtalk_abolish_bad_indicator.pl +1 -1
  194. package/test/conformance/errors/iso/logtalk_abolish_name_type.pl +1 -1
  195. package/test/conformance/errors/iso/logtalk_abolish_negative_arity.pl +1 -1
  196. package/test/conformance/errors/iso/logtalk_abolish_unbound.pl +1 -1
  197. package/test/conformance/errors/iso/logtalk_abolish_unbound_arity.pl +1 -1
  198. package/test/conformance/errors/iso/logtalk_arg_index_type.pl +1 -1
  199. package/test/conformance/errors/iso/logtalk_arg_number.pl +1 -1
  200. package/test/conformance/errors/iso/logtalk_asserta_bad_body.pl +1 -1
  201. package/test/conformance/errors/iso/logtalk_asserta_noncallable.pl +1 -1
  202. package/test/conformance/errors/iso/logtalk_assertz_noncallable.pl +1 -1
  203. package/test/conformance/errors/iso/logtalk_atom_chars_atom_type.pl +1 -1
  204. package/test/conformance/errors/iso/logtalk_atom_chars_character_type.pl +1 -1
  205. package/test/conformance/errors/iso/logtalk_atom_chars_improper.pl +1 -1
  206. package/test/conformance/errors/iso/logtalk_atom_chars_list_type.pl +1 -1
  207. package/test/conformance/errors/iso/logtalk_atom_chars_unbound.pl +1 -1
  208. package/test/conformance/errors/iso/logtalk_atom_codes_atom_type.pl +1 -1
  209. package/test/conformance/errors/iso/logtalk_atom_codes_bad_code.pl +1 -1
  210. package/test/conformance/errors/iso/logtalk_atom_codes_integer_type.pl +1 -1
  211. package/test/conformance/errors/iso/logtalk_atom_codes_list_type.pl +1 -1
  212. package/test/conformance/errors/iso/logtalk_atom_codes_unbound.pl +1 -1
  213. package/test/conformance/errors/iso/logtalk_atom_concat_left_type.pl +1 -1
  214. package/test/conformance/errors/iso/logtalk_atom_concat_right_type.pl +1 -1
  215. package/test/conformance/errors/iso/logtalk_atom_concat_unbound.pl +1 -1
  216. package/test/conformance/errors/iso/logtalk_atom_concat_whole_type.pl +1 -1
  217. package/test/conformance/errors/iso/logtalk_atom_length_atom_type.pl +1 -1
  218. package/test/conformance/errors/iso/logtalk_atom_length_integer_type.pl +1 -1
  219. package/test/conformance/errors/iso/logtalk_atom_length_negative.pl +1 -1
  220. package/test/conformance/errors/iso/logtalk_atom_length_unbound.pl +1 -1
  221. package/test/conformance/errors/iso/logtalk_bagof_improper.pl +1 -1
  222. package/test/conformance/errors/iso/logtalk_bagof_nonlist.pl +1 -1
  223. package/test/conformance/errors/iso/logtalk_char_code_character_type.pl +1 -1
  224. package/test/conformance/errors/iso/logtalk_char_code_integer_type.pl +1 -1
  225. package/test/conformance/errors/iso/logtalk_char_code_negative.pl +1 -1
  226. package/test/conformance/errors/iso/logtalk_char_code_number_character.pl +1 -1
  227. package/test/conformance/errors/iso/logtalk_char_code_unbound.pl +1 -1
  228. package/test/conformance/errors/iso/logtalk_clause_noncallable_body.pl +1 -1
  229. package/test/conformance/errors/iso/logtalk_clause_noncallable_head.pl +1 -1
  230. package/test/conformance/errors/iso/logtalk_compare_order_domain.pl +1 -1
  231. package/test/conformance/errors/iso/logtalk_compare_order_type.pl +1 -1
  232. package/test/conformance/errors/iso/logtalk_current_flag_compound.pl +1 -1
  233. package/test/conformance/errors/iso/logtalk_current_flag_name_type.pl +1 -1
  234. package/test/conformance/errors/iso/logtalk_current_flag_unknown.pl +1 -1
  235. package/test/conformance/errors/iso/logtalk_current_input_bad_stream.pl +1 -1
  236. package/test/conformance/errors/iso/logtalk_current_op_bad_specifier.pl +1 -1
  237. package/test/conformance/errors/iso/logtalk_current_op_high_priority.pl +1 -1
  238. package/test/conformance/errors/iso/logtalk_current_output_bad_stream.pl +1 -1
  239. package/test/conformance/errors/iso/logtalk_current_predicate_bad_name.pl +1 -1
  240. package/test/conformance/errors/iso/logtalk_current_predicate_negative_arity.pl +1 -1
  241. package/test/conformance/errors/iso/logtalk_current_predicate_scalar.pl +1 -1
  242. package/test/conformance/errors/iso/logtalk_findall_improper.pl +1 -1
  243. package/test/conformance/errors/iso/logtalk_findall_nonlist.pl +1 -1
  244. package/test/conformance/errors/iso/logtalk_functor_arity_type.pl +1 -1
  245. package/test/conformance/errors/iso/logtalk_functor_compound_name.pl +1 -1
  246. package/test/conformance/errors/iso/logtalk_functor_float_name.pl +1 -1
  247. package/test/conformance/errors/iso/logtalk_number_chars_character_type.pl +1 -1
  248. package/test/conformance/errors/iso/logtalk_number_chars_list_type.pl +1 -1
  249. package/test/conformance/errors/iso/logtalk_number_chars_number_type.pl +1 -1
  250. package/test/conformance/errors/iso/logtalk_number_chars_partial.pl +1 -1
  251. package/test/conformance/errors/iso/logtalk_number_chars_syntax.pl +1 -1
  252. package/test/conformance/errors/iso/logtalk_number_chars_unbound.pl +1 -1
  253. package/test/conformance/errors/iso/logtalk_number_codes_bad_code.pl +1 -1
  254. package/test/conformance/errors/iso/logtalk_number_codes_list_type.pl +1 -1
  255. package/test/conformance/errors/iso/logtalk_number_codes_number_type.pl +1 -1
  256. package/test/conformance/errors/iso/logtalk_number_codes_partial.pl +1 -1
  257. package/test/conformance/errors/iso/logtalk_number_codes_syntax.pl +1 -1
  258. package/test/conformance/errors/iso/logtalk_number_codes_unbound.pl +1 -1
  259. package/test/conformance/errors/iso/logtalk_once_noncallable.pl +1 -1
  260. package/test/conformance/errors/iso/logtalk_once_unbound.pl +1 -1
  261. package/test/conformance/errors/iso/logtalk_op_bad_specifier.pl +1 -1
  262. package/test/conformance/errors/iso/logtalk_op_high_priority.pl +1 -1
  263. package/test/conformance/errors/iso/logtalk_op_negative_priority.pl +1 -1
  264. package/test/conformance/errors/iso/logtalk_op_priority_type.pl +1 -1
  265. package/test/conformance/errors/iso/logtalk_op_unbound_name.pl +1 -1
  266. package/test/conformance/errors/iso/logtalk_op_unbound_priority.pl +1 -1
  267. package/test/conformance/errors/iso/logtalk_op_unbound_specifier.pl +1 -1
  268. package/test/conformance/errors/iso/logtalk_retract_unbound.pl +1 -1
  269. package/test/conformance/errors/iso/logtalk_retract_unbound_head.pl +1 -1
  270. package/test/conformance/errors/iso/logtalk_set_flag_name_type.pl +1 -1
  271. package/test/conformance/errors/iso/logtalk_set_flag_unbound_name.pl +1 -1
  272. package/test/conformance/errors/iso/logtalk_set_flag_unbound_value.pl +1 -1
  273. package/test/conformance/errors/iso/logtalk_set_flag_unknown.pl +1 -1
  274. package/test/conformance/errors/iso/logtalk_set_flag_value.pl +1 -1
  275. package/test/conformance/errors/iso/logtalk_setof_nonlist.pl +1 -1
  276. package/test/conformance/errors/iso/logtalk_sub_atom_before_type.pl +1 -1
  277. package/test/conformance/errors/iso/logtalk_sub_atom_negative.pl +1 -1
  278. package/test/conformance/errors/iso/logtalk_sub_atom_result_type.pl +1 -1
  279. package/test/conformance/errors/iso/logtalk_sub_atom_source_type.pl +1 -1
  280. package/test/conformance/errors/iso/logtalk_sub_atom_unbound.pl +1 -1
  281. package/test/conformance/errors/iso/logtalk_term_variables_improper.pl +1 -1
  282. package/test/conformance/errors/iso/logtalk_term_variables_nonlist.pl +1 -1
  283. package/test/conformance/errors/iso/logtalk_univ_head_compound.pl +1 -1
  284. package/test/conformance/errors/iso/logtalk_univ_head_float.pl +1 -1
  285. package/test/conformance/errors/iso/logtalk_univ_head_integer.pl +1 -1
  286. package/test/conformance/errors/iso/logtalk_univ_single_compound.pl +1 -1
  287. package/test/conformance/expected/strings/064_reusable_string_builtins.pl +1 -1
  288. package/test/run-conformance-report.mjs +4 -4
  289. package/test/run-conformance.mjs +3 -3
  290. package/test/run-playground.mjs +3 -3
  291. package/test/run-rdf-tools.mjs +15 -15
  292. package/test/run-regression.mjs +35 -35
  293. package/the-art-of-eyelang.md +136 -136
  294. package/tools/README.md +2 -2
  295. package/tools/extract-book-examples.mjs +4 -4
  296. package/tools/pl-to-rdf.mjs +2 -2
  297. package/tools/rdf-codec.mjs +8 -8
  298. package/tools/rdf-to-pl.mjs +9 -9
  299. package/why-eyelang.md +47 -47
@@ -10,14 +10,14 @@ import { spawnSync } from 'node:child_process';
10
10
  import { fileURLToPath } from 'node:url';
11
11
  import * as publicApi from '../src/index.js';
12
12
  import {
13
- run as runEyeLang,
13
+ run as runEyelang,
14
14
  Program,
15
15
  makeProgram,
16
16
  Solver,
17
17
  Env,
18
18
  BuiltinRegistry,
19
19
  createDefaultRegistry,
20
- getEyeLangRegistry,
20
+ getEyelangRegistry,
21
21
  atom,
22
22
  compound,
23
23
  listFromItems,
@@ -53,7 +53,7 @@ function run(source, options = {}) {
53
53
  const goals = options.goals ?? (options.goal == null
54
54
  ? (programSource instanceof Program ? [] : goalsFromSource(text))
55
55
  : [options.goal]);
56
- return runEyeLang(programSource, { ...options, goals });
56
+ return runEyelang(programSource, { ...options, goals });
57
57
  }
58
58
 
59
59
  function sourceAtom(value) {
@@ -196,12 +196,12 @@ why(
196
196
  assertIncludes(result.stdout, '-v, --version', 'stdout');
197
197
  assertIncludes(result.stdout, '-w, --warnings', 'stdout');
198
198
  assertIncludes(result.stdout, '-v, --version Show the package version and exit.\n -w, --warnings Print non-fatal portability warnings to stderr.', 'stdout');
199
- assertIncludes(result.stdout, 'Read an EyeLang program', 'stdout');
199
+ assertIncludes(result.stdout, 'Read an Eyelang program', 'stdout');
200
200
  assertEqual(result.stderr, '', 'stderr');
201
201
  },
202
202
  },
203
203
  {
204
- name: 'CLI loads EyeLang library predicates by default',
204
+ name: 'CLI loads Eyelang library predicates by default',
205
205
  run: () => {
206
206
  const result = runCli(['-'], {
207
207
  input: '%% goal: answer(X)\nanswer(X) :- member(X, [library]).\n',
@@ -560,8 +560,8 @@ function documentationSyncCases() {
560
560
  },
561
561
  },
562
562
  {
563
- name: 'book EyeLang library matches runtime registry',
564
- run: () => assertArrayEqual(bookEyeLangLibraryNames(), registeredEyeLangLibraryNames(), 'EyeLang library predicates'),
563
+ name: 'book Eyelang library matches runtime registry',
564
+ run: () => assertArrayEqual(bookEyelangLibraryNames(), registeredEyelangLibraryNames(), 'Eyelang library predicates'),
565
565
  },
566
566
  {
567
567
  name: 'README links to the book and the book documents runtime boundaries',
@@ -570,7 +570,7 @@ function documentationSyncCases() {
570
570
  const book = fs.readFileSync(path.join(packageRoot, 'the-art-of-eyelang.md'), 'utf8');
571
571
  assertIncludes(
572
572
  readme,
573
- '[Book — *The Art of EyeLang*](https://eyereasoner.github.io/eyelang/the-art-of-eyelang)',
573
+ '[Book — *The Art of Eyelang*](https://eyereasoner.github.io/eyelang/the-art-of-eyelang)',
574
574
  'README links to the book',
575
575
  );
576
576
  for (const filename of ['src/iso.js', 'src/library.js', 'src/playground-worker.js']) {
@@ -628,7 +628,7 @@ function documentationSyncCases() {
628
628
  run: () => assertArrayEqual(documentedPublicApiImportIssues(), [], 'documentation API imports'),
629
629
  },
630
630
  {
631
- name: 'documentation uses EyeLang source style',
631
+ name: 'documentation uses Eyelang source style',
632
632
  run: () => assertArrayEqual(documentationSourceStyleIssues(), [], 'documentation source style'),
633
633
  },
634
634
  {
@@ -772,14 +772,14 @@ function apiCases() {
772
772
  },
773
773
  },
774
774
  {
775
- name: 'default EyeLang registry keeps dynamic program state consistent',
775
+ name: 'default Eyelang registry keeps dynamic program state consistent',
776
776
  run: () => {
777
777
  const program = Program.parse([
778
778
  ':- dynamic(item/1).',
779
779
  '%% goal: done',
780
780
  'done :- assertz(item(a)), retract(item(a)), assertz(item(b)), abolish(item/1).',
781
781
  ].join('\n'));
782
- const result = run(program, { goal: 'done', registry: getEyeLangRegistry() });
782
+ const result = run(program, { goal: 'done', registry: getEyelangRegistry() });
783
783
  assertEqual(result.stdout, 'done.\n', 'stdout');
784
784
  assertEqual(program.findGroup('item', 1), null, 'abolished group');
785
785
  assertEqual(
@@ -945,14 +945,14 @@ open(X) :- candidate(X), \\+ closed(X).
945
945
  },
946
946
  },
947
947
  {
948
- name: 'run loads the EyeLang library by default',
948
+ name: 'run loads the Eyelang library by default',
949
949
  run: () => {
950
950
  const result = run('answer(X) :- append([a], [b], X).', { goal: 'answer(X)' });
951
951
  assertEqual(result.stdout, 'answer([a, b]).\n', 'stdout');
952
952
  },
953
953
  },
954
954
  {
955
- name: 'Solver loads the EyeLang library by default',
955
+ name: 'Solver loads the Eyelang library by default',
956
956
  run: () => {
957
957
  const program = Program.parse('answer(X) :- append([a], [b], X).');
958
958
  const solver = new Solver(program);
@@ -997,15 +997,15 @@ open(X) :- candidate(X), \\+ closed(X).
997
997
  },
998
998
  },
999
999
  {
1000
- name: 'ISO-only and EyeLang registries expose separate metadata',
1000
+ name: 'ISO-only and Eyelang registries expose separate metadata',
1001
1001
  run: () => {
1002
1002
  const registry = createDefaultRegistry();
1003
- const library = getEyeLangRegistry();
1003
+ const library = getEyelangRegistry();
1004
1004
  assertEqual(Boolean(registry.get('is', 2)), true, 'ISO is/2 exists');
1005
1005
  assertEqual(Boolean(registry.get('append', 3)), false, 'append/3 is not ISO core');
1006
1006
  assertEqual(library.eyeLangLibrary, true, 'complete registry marker');
1007
1007
  assertEqual(library.defs.size, 165, 'complete registry size');
1008
- assertEqual(registeredEyeLangLibraryNames().length, 50, 'EyeLang library size');
1008
+ assertEqual(registeredEyelangLibraryNames().length, 50, 'Eyelang library size');
1009
1009
  assertEqual(library.get('append', 3)?.eyeLangLibrary, true, 'append/3 metadata');
1010
1010
  assertEqual(library.get('maplist', 3)?.eyeLangLibrary, true, 'maplist/3 metadata');
1011
1011
  assertEqual(library.get('matches', 3)?.eyeLangLibrary, true, 'matches/3 metadata');
@@ -1016,7 +1016,7 @@ open(X) :- candidate(X), \\+ closed(X).
1016
1016
  },
1017
1017
  },
1018
1018
  {
1019
- name: 'EyeLang library does not inject program clauses',
1019
+ name: 'Eyelang library does not inject program clauses',
1020
1020
  run: () => {
1021
1021
  const program = Program.parse('answer(X) :- append([a], [b], X).');
1022
1022
  const solver = new Solver(program);
@@ -1027,7 +1027,7 @@ open(X) :- candidate(X), \\+ closed(X).
1027
1027
  },
1028
1028
  },
1029
1029
  {
1030
- name: 'EyeLang library preserves relational and arithmetic behavior',
1030
+ name: 'Eyelang library preserves relational and arithmetic behavior',
1031
1031
  run: () => {
1032
1032
  const result = run([
1033
1033
  '%% goal: answer(A, B, S, M)',
@@ -1042,11 +1042,11 @@ open(X) :- candidate(X), \\+ closed(X).
1042
1042
  'answer([a], [b], 5, 9007199254740993).',
1043
1043
  'answer([a, b], [], 5, 9007199254740993).',
1044
1044
  '',
1045
- ].join('\n'), 'EyeLang library behavior');
1045
+ ].join('\n'), 'Eyelang library behavior');
1046
1046
  },
1047
1047
  },
1048
1048
  {
1049
- name: 'EyeLang library preserves strict modes and ISO arithmetic errors',
1049
+ name: 'Eyelang library preserves strict modes and ISO arithmetic errors',
1050
1050
  run: () => {
1051
1051
  assertEqual(run('answer(X) :- substring("abc", "1", 1, X).', { goal: 'answer(X)' }).stdout, '', 'substring index type');
1052
1052
  let nth1Error = null;
@@ -1485,10 +1485,10 @@ function bookReferenceDocumentationIssues() {
1485
1485
  const guide = fs.readFileSync(path.join(testRoot, 'conformance', 'README.md'), 'utf8');
1486
1486
  const issues = [];
1487
1487
 
1488
- if (!book.includes('This book is also the reference for the EyeLang implementation.')) {
1488
+ if (!book.includes('This book is also the reference for the Eyelang implementation.')) {
1489
1489
  issues.push('book introduction does not identify itself as the reference');
1490
1490
  }
1491
- if (!book.includes('This book is the single reference for the EyeLang implementation.')) {
1491
+ if (!book.includes('This book is the single reference for the Eyelang implementation.')) {
1492
1492
  issues.push('book Chapter 42 does not state the single-reference policy');
1493
1493
  }
1494
1494
  for (const standard of [
@@ -1499,16 +1499,16 @@ function bookReferenceDocumentationIssues() {
1499
1499
  ]) {
1500
1500
  if (!book.includes(standard)) issues.push(`book does not identify standards baseline: ${standard}`);
1501
1501
  }
1502
- if (!book.includes('EyeLang performs it consistently for ordinary\nunification as well as `unify_with_occurs_check/2`.')) {
1502
+ if (!book.includes('Eyelang performs it consistently for ordinary\nunification as well as `unify_with_occurs_check/2`.')) {
1503
1503
  issues.push('book glossary does not match finite-tree unification');
1504
1504
  }
1505
- if (book.includes('EyeLang does not perform it.')) {
1505
+ if (book.includes('Eyelang does not perform it.')) {
1506
1506
  issues.push('book contradicts implementation occurs-check behavior');
1507
1507
  }
1508
- for (const heading of ['## 38. Language and ISO profile', '## 39. Built-in predicates by programming role', '## 40. Running EyeLang: command line and corpus']) {
1508
+ for (const heading of ['## 38. Language and ISO profile', '## 39. Built-in predicates by programming role', '## 40. Running Eyelang: command line and corpus']) {
1509
1509
  if (!book.includes(heading)) issues.push(`book is missing ${heading}`);
1510
1510
  }
1511
- if (!guide.includes('[*The Art of EyeLang*](../../the-art-of-eyelang.md) is the reference')) {
1511
+ if (!guide.includes('[*The Art of Eyelang*](../../the-art-of-eyelang.md) is the reference')) {
1512
1512
  issues.push('test guide does not identify the book as the reference');
1513
1513
  }
1514
1514
  if (!guide.includes('not a separate\nlanguage specification')) {
@@ -1523,7 +1523,7 @@ function runWhy({ program, goalText, expected }) {
1523
1523
  fs.writeFileSync(programFile, program);
1524
1524
  const goal = parseGoalText(goalText);
1525
1525
  const parsed = Program.parseSources([{ text: program, filename: path.basename(programFile) }], { sourceMetadata: true });
1526
- const result = runEyeLang(parsed, { proof: true, goal });
1526
+ const result = runEyelang(parsed, { proof: true, goal });
1527
1527
  const expectedText = expected.replaceAll('__FILE__', path.basename(programFile));
1528
1528
  assertEqual(result.stdout, expectedText, 'stdout');
1529
1529
 
@@ -1540,7 +1540,7 @@ function runWhyLoose({ program, goalText }) {
1540
1540
  fs.writeFileSync(programFile, program);
1541
1541
  const goal = parseGoalText(goalText);
1542
1542
  const parsed = Program.parseSources([{ text: program, filename: path.basename(programFile) }], { sourceMetadata: true });
1543
- const result = runEyeLang(parsed, { proof: true, goal });
1543
+ const result = runEyelang(parsed, { proof: true, goal });
1544
1544
  Program.parse(result.stdout);
1545
1545
  assertIncludes(result.stdout, '\n).\n\n', 'stdout');
1546
1546
  return result;
@@ -1671,9 +1671,9 @@ function playgroundStaticIssues() {
1671
1671
  if (!html.includes("new Worker(workerUrl, { type: 'module' })")) issues.push('playground must launch the dedicated module worker');
1672
1672
  const workerText = fs.readFileSync(path.join(packageRoot, 'src', 'playground-worker.js'), 'utf8');
1673
1673
  if (!workerText.includes("from './library.js?playground=") ||
1674
- !workerText.includes('createEyeLangRegistry') ||
1674
+ !workerText.includes('createEyelangRegistry') ||
1675
1675
  !workerText.includes('executePlaygroundRequest')) {
1676
- issues.push('playground worker must install the EyeLang library registry');
1676
+ issues.push('playground worker must install the Eyelang library registry');
1677
1677
  }
1678
1678
  if (fs.existsSync(path.join(packageRoot, 'src', 'portable-library.js'))) {
1679
1679
  issues.push('obsolete portable-library.js must be absent');
@@ -1732,9 +1732,9 @@ function registeredBuiltinNames() {
1732
1732
  return [...createDefaultRegistry().defs.keys()].sort();
1733
1733
  }
1734
1734
 
1735
- function registeredEyeLangLibraryNames() {
1735
+ function registeredEyelangLibraryNames() {
1736
1736
  const defaults = createDefaultRegistry().defs;
1737
- return [...getEyeLangRegistry().defs.entries()]
1737
+ return [...getEyelangRegistry().defs.entries()]
1738
1738
  .filter(([name]) => !defaults.has(name))
1739
1739
  .map(([name]) => name)
1740
1740
  .sort();
@@ -1750,10 +1750,10 @@ function registeredBuiltinSummary() {
1750
1750
 
1751
1751
  function bookBuiltinNames() {
1752
1752
  const book = fs.readFileSync(path.join(packageRoot, 'the-art-of-eyelang.md'), 'utf8');
1753
- return documentedBuiltinNames(between(book, '## 39. Built-in predicates by programming role', '### The EyeLang library'), 2);
1753
+ return documentedBuiltinNames(between(book, '## 39. Built-in predicates by programming role', '### The Eyelang library'), 2);
1754
1754
  }
1755
1755
 
1756
- function bookEyeLangLibraryNames() {
1756
+ function bookEyelangLibraryNames() {
1757
1757
  const book = fs.readFileSync(path.join(packageRoot, 'the-art-of-eyelang.md'), 'utf8');
1758
1758
  return documentedBuiltinNames(between(book, '<!-- eyelang-library-catalog:start -->', '<!-- eyelang-library-catalog:end -->'), 1);
1759
1759
  }
@@ -1925,7 +1925,7 @@ function markdownLinkTargets(text) {
1925
1925
 
1926
1926
  function bookIntroOutputIssues() {
1927
1927
  const book = fs.readFileSync(path.join(packageRoot, 'the-art-of-eyelang.md'), 'utf8');
1928
- const match = book.match(/The (?:first|EyeLang) command should print:\s*```text\n([\s\S]*?)```/);
1928
+ const match = book.match(/The (?:first|Eyelang) command should print:\s*```text\n([\s\S]*?)```/);
1929
1929
  if (match == null) return ['the-art-of-eyelang.md: introductory output block not found'];
1930
1930
  const documented = `${match[1].trimEnd()}\n`;
1931
1931
  const expected = fs.readFileSync(path.join(packageRoot, 'examples', 'output', 'socrates.pl'), 'utf8');