eyelang 0.5.1 → 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 (298) 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/index.d.ts +68 -68
  147. package/index.js +1 -1
  148. package/package.json +2 -2
  149. package/playground.html +10 -10
  150. package/src/cli.js +4 -4
  151. package/src/explain.js +4 -4
  152. package/src/index.js +4 -4
  153. package/src/iso.js +1 -1
  154. package/src/library.js +7 -7
  155. package/src/parser.js +1 -1
  156. package/src/playground-worker.js +2 -2
  157. package/src/solver.js +4 -4
  158. package/src/term.js +1 -1
  159. package/test/conformance/README.md +6 -6
  160. package/test/conformance/THIRD_PARTY.md +4 -4
  161. package/test/conformance/cases/iso/logtalk_abolish.pl +1 -1
  162. package/test/conformance/cases/iso/logtalk_arg_unification.pl +1 -1
  163. package/test/conformance/cases/iso/logtalk_assert_order.pl +1 -1
  164. package/test/conformance/cases/iso/logtalk_atom_chars.pl +1 -1
  165. package/test/conformance/cases/iso/logtalk_atom_codes.pl +1 -1
  166. package/test/conformance/cases/iso/logtalk_atom_concat.pl +1 -1
  167. package/test/conformance/cases/iso/logtalk_atom_length.pl +1 -1
  168. package/test/conformance/cases/iso/logtalk_bagof.pl +1 -1
  169. package/test/conformance/cases/iso/logtalk_char_code.pl +1 -1
  170. package/test/conformance/cases/iso/logtalk_clause.pl +1 -1
  171. package/test/conformance/cases/iso/logtalk_compare_standard_order.pl +1 -1
  172. package/test/conformance/cases/iso/logtalk_copy_term_semantics.pl +1 -1
  173. package/test/conformance/cases/iso/logtalk_current_predicate.pl +1 -1
  174. package/test/conformance/cases/iso/logtalk_current_streams.pl +1 -1
  175. package/test/conformance/cases/iso/logtalk_findall.pl +1 -1
  176. package/test/conformance/cases/iso/logtalk_number_chars.pl +1 -1
  177. package/test/conformance/cases/iso/logtalk_number_codes.pl +1 -1
  178. package/test/conformance/cases/iso/logtalk_occurs_check.pl +1 -1
  179. package/test/conformance/cases/iso/logtalk_once.pl +1 -1
  180. package/test/conformance/cases/iso/logtalk_operators.pl +1 -1
  181. package/test/conformance/cases/iso/logtalk_prolog_flags.pl +1 -1
  182. package/test/conformance/cases/iso/logtalk_repeat.pl +1 -1
  183. package/test/conformance/cases/iso/logtalk_retract.pl +1 -1
  184. package/test/conformance/cases/iso/logtalk_setof.pl +1 -1
  185. package/test/conformance/cases/iso/logtalk_sub_atom.pl +1 -1
  186. package/test/conformance/cases/iso/logtalk_term_comparison.pl +1 -1
  187. package/test/conformance/cases/iso/logtalk_term_variables.pl +1 -1
  188. package/test/conformance/cases/iso/logtalk_univ.pl +1 -1
  189. package/test/conformance/cases/strings/064_reusable_string_builtins.pl +3 -3
  190. package/test/conformance/cases/strings/071_string_edges.pl +1 -1
  191. package/test/conformance/errors/iso/logtalk_abolish_arity_type.pl +1 -1
  192. package/test/conformance/errors/iso/logtalk_abolish_bad_indicator.pl +1 -1
  193. package/test/conformance/errors/iso/logtalk_abolish_name_type.pl +1 -1
  194. package/test/conformance/errors/iso/logtalk_abolish_negative_arity.pl +1 -1
  195. package/test/conformance/errors/iso/logtalk_abolish_unbound.pl +1 -1
  196. package/test/conformance/errors/iso/logtalk_abolish_unbound_arity.pl +1 -1
  197. package/test/conformance/errors/iso/logtalk_arg_index_type.pl +1 -1
  198. package/test/conformance/errors/iso/logtalk_arg_number.pl +1 -1
  199. package/test/conformance/errors/iso/logtalk_asserta_bad_body.pl +1 -1
  200. package/test/conformance/errors/iso/logtalk_asserta_noncallable.pl +1 -1
  201. package/test/conformance/errors/iso/logtalk_assertz_noncallable.pl +1 -1
  202. package/test/conformance/errors/iso/logtalk_atom_chars_atom_type.pl +1 -1
  203. package/test/conformance/errors/iso/logtalk_atom_chars_character_type.pl +1 -1
  204. package/test/conformance/errors/iso/logtalk_atom_chars_improper.pl +1 -1
  205. package/test/conformance/errors/iso/logtalk_atom_chars_list_type.pl +1 -1
  206. package/test/conformance/errors/iso/logtalk_atom_chars_unbound.pl +1 -1
  207. package/test/conformance/errors/iso/logtalk_atom_codes_atom_type.pl +1 -1
  208. package/test/conformance/errors/iso/logtalk_atom_codes_bad_code.pl +1 -1
  209. package/test/conformance/errors/iso/logtalk_atom_codes_integer_type.pl +1 -1
  210. package/test/conformance/errors/iso/logtalk_atom_codes_list_type.pl +1 -1
  211. package/test/conformance/errors/iso/logtalk_atom_codes_unbound.pl +1 -1
  212. package/test/conformance/errors/iso/logtalk_atom_concat_left_type.pl +1 -1
  213. package/test/conformance/errors/iso/logtalk_atom_concat_right_type.pl +1 -1
  214. package/test/conformance/errors/iso/logtalk_atom_concat_unbound.pl +1 -1
  215. package/test/conformance/errors/iso/logtalk_atom_concat_whole_type.pl +1 -1
  216. package/test/conformance/errors/iso/logtalk_atom_length_atom_type.pl +1 -1
  217. package/test/conformance/errors/iso/logtalk_atom_length_integer_type.pl +1 -1
  218. package/test/conformance/errors/iso/logtalk_atom_length_negative.pl +1 -1
  219. package/test/conformance/errors/iso/logtalk_atom_length_unbound.pl +1 -1
  220. package/test/conformance/errors/iso/logtalk_bagof_improper.pl +1 -1
  221. package/test/conformance/errors/iso/logtalk_bagof_nonlist.pl +1 -1
  222. package/test/conformance/errors/iso/logtalk_char_code_character_type.pl +1 -1
  223. package/test/conformance/errors/iso/logtalk_char_code_integer_type.pl +1 -1
  224. package/test/conformance/errors/iso/logtalk_char_code_negative.pl +1 -1
  225. package/test/conformance/errors/iso/logtalk_char_code_number_character.pl +1 -1
  226. package/test/conformance/errors/iso/logtalk_char_code_unbound.pl +1 -1
  227. package/test/conformance/errors/iso/logtalk_clause_noncallable_body.pl +1 -1
  228. package/test/conformance/errors/iso/logtalk_clause_noncallable_head.pl +1 -1
  229. package/test/conformance/errors/iso/logtalk_compare_order_domain.pl +1 -1
  230. package/test/conformance/errors/iso/logtalk_compare_order_type.pl +1 -1
  231. package/test/conformance/errors/iso/logtalk_current_flag_compound.pl +1 -1
  232. package/test/conformance/errors/iso/logtalk_current_flag_name_type.pl +1 -1
  233. package/test/conformance/errors/iso/logtalk_current_flag_unknown.pl +1 -1
  234. package/test/conformance/errors/iso/logtalk_current_input_bad_stream.pl +1 -1
  235. package/test/conformance/errors/iso/logtalk_current_op_bad_specifier.pl +1 -1
  236. package/test/conformance/errors/iso/logtalk_current_op_high_priority.pl +1 -1
  237. package/test/conformance/errors/iso/logtalk_current_output_bad_stream.pl +1 -1
  238. package/test/conformance/errors/iso/logtalk_current_predicate_bad_name.pl +1 -1
  239. package/test/conformance/errors/iso/logtalk_current_predicate_negative_arity.pl +1 -1
  240. package/test/conformance/errors/iso/logtalk_current_predicate_scalar.pl +1 -1
  241. package/test/conformance/errors/iso/logtalk_findall_improper.pl +1 -1
  242. package/test/conformance/errors/iso/logtalk_findall_nonlist.pl +1 -1
  243. package/test/conformance/errors/iso/logtalk_functor_arity_type.pl +1 -1
  244. package/test/conformance/errors/iso/logtalk_functor_compound_name.pl +1 -1
  245. package/test/conformance/errors/iso/logtalk_functor_float_name.pl +1 -1
  246. package/test/conformance/errors/iso/logtalk_number_chars_character_type.pl +1 -1
  247. package/test/conformance/errors/iso/logtalk_number_chars_list_type.pl +1 -1
  248. package/test/conformance/errors/iso/logtalk_number_chars_number_type.pl +1 -1
  249. package/test/conformance/errors/iso/logtalk_number_chars_partial.pl +1 -1
  250. package/test/conformance/errors/iso/logtalk_number_chars_syntax.pl +1 -1
  251. package/test/conformance/errors/iso/logtalk_number_chars_unbound.pl +1 -1
  252. package/test/conformance/errors/iso/logtalk_number_codes_bad_code.pl +1 -1
  253. package/test/conformance/errors/iso/logtalk_number_codes_list_type.pl +1 -1
  254. package/test/conformance/errors/iso/logtalk_number_codes_number_type.pl +1 -1
  255. package/test/conformance/errors/iso/logtalk_number_codes_partial.pl +1 -1
  256. package/test/conformance/errors/iso/logtalk_number_codes_syntax.pl +1 -1
  257. package/test/conformance/errors/iso/logtalk_number_codes_unbound.pl +1 -1
  258. package/test/conformance/errors/iso/logtalk_once_noncallable.pl +1 -1
  259. package/test/conformance/errors/iso/logtalk_once_unbound.pl +1 -1
  260. package/test/conformance/errors/iso/logtalk_op_bad_specifier.pl +1 -1
  261. package/test/conformance/errors/iso/logtalk_op_high_priority.pl +1 -1
  262. package/test/conformance/errors/iso/logtalk_op_negative_priority.pl +1 -1
  263. package/test/conformance/errors/iso/logtalk_op_priority_type.pl +1 -1
  264. package/test/conformance/errors/iso/logtalk_op_unbound_name.pl +1 -1
  265. package/test/conformance/errors/iso/logtalk_op_unbound_priority.pl +1 -1
  266. package/test/conformance/errors/iso/logtalk_op_unbound_specifier.pl +1 -1
  267. package/test/conformance/errors/iso/logtalk_retract_unbound.pl +1 -1
  268. package/test/conformance/errors/iso/logtalk_retract_unbound_head.pl +1 -1
  269. package/test/conformance/errors/iso/logtalk_set_flag_name_type.pl +1 -1
  270. package/test/conformance/errors/iso/logtalk_set_flag_unbound_name.pl +1 -1
  271. package/test/conformance/errors/iso/logtalk_set_flag_unbound_value.pl +1 -1
  272. package/test/conformance/errors/iso/logtalk_set_flag_unknown.pl +1 -1
  273. package/test/conformance/errors/iso/logtalk_set_flag_value.pl +1 -1
  274. package/test/conformance/errors/iso/logtalk_setof_nonlist.pl +1 -1
  275. package/test/conformance/errors/iso/logtalk_sub_atom_before_type.pl +1 -1
  276. package/test/conformance/errors/iso/logtalk_sub_atom_negative.pl +1 -1
  277. package/test/conformance/errors/iso/logtalk_sub_atom_result_type.pl +1 -1
  278. package/test/conformance/errors/iso/logtalk_sub_atom_source_type.pl +1 -1
  279. package/test/conformance/errors/iso/logtalk_sub_atom_unbound.pl +1 -1
  280. package/test/conformance/errors/iso/logtalk_term_variables_improper.pl +1 -1
  281. package/test/conformance/errors/iso/logtalk_term_variables_nonlist.pl +1 -1
  282. package/test/conformance/errors/iso/logtalk_univ_head_compound.pl +1 -1
  283. package/test/conformance/errors/iso/logtalk_univ_head_float.pl +1 -1
  284. package/test/conformance/errors/iso/logtalk_univ_head_integer.pl +1 -1
  285. package/test/conformance/errors/iso/logtalk_univ_single_compound.pl +1 -1
  286. package/test/conformance/expected/strings/064_reusable_string_builtins.pl +1 -1
  287. package/test/run-conformance-report.mjs +4 -4
  288. package/test/run-conformance.mjs +3 -3
  289. package/test/run-playground.mjs +3 -3
  290. package/test/run-rdf-tools.mjs +15 -15
  291. package/test/run-regression.mjs +35 -35
  292. package/the-art-of-eyelang.md +136 -136
  293. package/tools/README.md +2 -2
  294. package/tools/extract-book-examples.mjs +4 -4
  295. package/tools/pl-to-rdf.mjs +2 -2
  296. package/tools/rdf-codec.mjs +8 -8
  297. package/tools/rdf-to-pl.mjs +9 -9
  298. package/why-eyelang.md +47 -47
package/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- export interface EyeLangStats {
1
+ export interface EyelangStats {
2
2
  [key: string]: number;
3
3
  }
4
4
 
5
- export interface EyeLangRunOptions {
5
+ export interface EyelangRunOptions {
6
6
  /** A host-supplied goal, expressed as Prolog text or a parsed term. */
7
- goal?: string | EyeLangTerm;
7
+ goal?: string | EyelangTerm;
8
8
  /** Host-supplied goals, executed in order. */
9
- goals?: Array<string | EyeLangTerm>;
9
+ goals?: Array<string | EyelangTerm>;
10
10
  proof?: boolean;
11
11
  why?: boolean;
12
12
  explain?: boolean;
@@ -23,9 +23,9 @@ export interface EyeLangRunOptions {
23
23
  [key: string]: unknown;
24
24
  }
25
25
 
26
- export interface EyeLangRunResult {
26
+ export interface EyelangRunResult {
27
27
  stdout: string;
28
- stats: EyeLangStats;
28
+ stats: EyelangStats;
29
29
  haltCode: number | null;
30
30
  }
31
31
 
@@ -37,25 +37,25 @@ export class StreamManager {
37
37
  currentOutput: number;
38
38
  }
39
39
 
40
- export interface EyeLangSourcePart {
40
+ export interface EyelangSourcePart {
41
41
  text?: string;
42
42
  source?: string;
43
43
  filename?: string;
44
44
  baseDir?: string;
45
45
  }
46
46
 
47
- export interface EyeLangClause {
48
- head: EyeLangTerm;
49
- body: EyeLangTerm[];
47
+ export interface EyelangClause {
48
+ head: EyelangTerm;
49
+ body: EyelangTerm[];
50
50
  index?: number;
51
51
  filename?: string;
52
52
  clauseNumber?: number;
53
53
  }
54
54
 
55
- export interface EyeLangPredicateGroup {
55
+ export interface EyelangPredicateGroup {
56
56
  name: string;
57
57
  arity: number;
58
- clauses: EyeLangClause[];
58
+ clauses: EyelangClause[];
59
59
  argIndexes: unknown[];
60
60
  demandIndexes: Map<string, unknown>;
61
61
  rejectedDemandIndexes: Set<string>;
@@ -65,42 +65,42 @@ export interface EyeLangPredicateGroup {
65
65
  negationStratum: number | null;
66
66
  }
67
67
 
68
- export type EyeLangTerm = Term | { type: string; name: string; args?: EyeLangTerm[]; arity?: number };
68
+ export type EyelangTerm = Term | { type: string; name: string; args?: EyelangTerm[]; arity?: number };
69
69
 
70
70
  export class Term {
71
- constructor(type: string, name?: unknown, args?: EyeLangTerm[]);
71
+ constructor(type: string, name?: unknown, args?: EyelangTerm[]);
72
72
  type: string;
73
73
  name: string;
74
- args: EyeLangTerm[];
74
+ args: EyelangTerm[];
75
75
  get arity(): number;
76
76
  }
77
77
 
78
78
  export class Env {
79
- constructor(bindings?: Iterable<readonly [string, EyeLangTerm]> | null);
80
- bindings: Map<string, EyeLangTerm>;
79
+ constructor(bindings?: Iterable<readonly [string, EyelangTerm]> | null);
80
+ bindings: Map<string, EyelangTerm>;
81
81
  clone(): Env;
82
82
  has(name: string): boolean;
83
- get(name: string): EyeLangTerm | undefined;
84
- bind(name: string, term: EyeLangTerm): void;
83
+ get(name: string): EyelangTerm | undefined;
84
+ bind(name: string, term: EyelangTerm): void;
85
85
  }
86
86
 
87
87
  export class Program {
88
- constructor(clauses?: EyeLangClause[], options?: EyeLangRunOptions);
89
- clauses: EyeLangClause[];
90
- groups: Map<string, EyeLangPredicateGroup>;
88
+ constructor(clauses?: EyelangClause[], options?: EyelangRunOptions);
89
+ clauses: EyelangClause[];
90
+ groups: Map<string, EyelangPredicateGroup>;
91
91
  negationDependencies: Array<{ from: string; to: string; negative: boolean }>;
92
92
  negationStratificationErrors: Array<{ from: string; to: string }>;
93
93
  stratifiedNegation: boolean;
94
- static parse(source: string, options?: EyeLangRunOptions): Program;
95
- static parseSources(sources?: Array<string | EyeLangSourcePart>, options?: EyeLangRunOptions): Program;
96
- makeGroup(name: string, arity: number): EyeLangPredicateGroup;
97
- indexClause(clause: EyeLangClause): void;
98
- findGroup(name: string, arity: number): EyeLangPredicateGroup | null;
94
+ static parse(source: string, options?: EyelangRunOptions): Program;
95
+ static parseSources(sources?: Array<string | EyelangSourcePart>, options?: EyelangRunOptions): Program;
96
+ makeGroup(name: string, arity: number): EyelangPredicateGroup;
97
+ indexClause(clause: EyelangClause): void;
98
+ findGroup(name: string, arity: number): EyelangPredicateGroup | null;
99
99
  markRecursivePredicates(): void;
100
100
  analyzeNegationStratification(): Array<{ from: string; to: string }>;
101
101
  assertStratifiedNegation(): true;
102
102
  isStratifiedNegation(): boolean;
103
- groupHasRule(group: EyeLangPredicateGroup): boolean;
103
+ groupHasRule(group: EyelangPredicateGroup): boolean;
104
104
  sourceFactLines(predicateKeys?: Set<string> | null): Set<string>;
105
105
  }
106
106
 
@@ -109,13 +109,13 @@ export interface BuiltinDefinition {
109
109
  arity: number;
110
110
  handler: BuiltinHandler;
111
111
  deterministic: boolean;
112
- ready: ((goal: EyeLangTerm, env: Env) => boolean) | null;
112
+ ready: ((goal: EyelangTerm, env: Env) => boolean) | null;
113
113
  fallbackWhenNotReady: boolean;
114
- shouldUse: ((context: { solver: Solver; goal: EyeLangTerm; env: Env }) => boolean) | null;
114
+ shouldUse: ((context: { solver: Solver; goal: EyelangTerm; env: Env }) => boolean) | null;
115
115
  eyeLangLibrary: boolean;
116
116
  }
117
117
 
118
- export type BuiltinHandler = (context: { solver: Solver; goal: EyeLangTerm; env: Env }) => Iterable<Env>;
118
+ export type BuiltinHandler = (context: { solver: Solver; goal: EyelangTerm; env: Env }) => Iterable<Env>;
119
119
 
120
120
  export class BuiltinRegistry {
121
121
  constructor();
@@ -126,7 +126,7 @@ export class BuiltinRegistry {
126
126
  }
127
127
 
128
128
  export class Solver {
129
- constructor(program: Program, options?: EyeLangRunOptions);
129
+ constructor(program: Program, options?: EyelangRunOptions);
130
130
  program: Program;
131
131
  registry: BuiltinRegistry;
132
132
  maxDepth: number;
@@ -134,10 +134,10 @@ export class Solver {
134
134
  solutionsSeen: number;
135
135
  active: unknown[];
136
136
  memo: Map<string, unknown>;
137
- stats: EyeLangStats;
137
+ stats: EyelangStats;
138
138
  cloneForInnerGoal(solutionLimit?: number): Solver;
139
- solve(goals: EyeLangTerm | EyeLangTerm[], env?: Env, depth?: number): Iterable<Env>;
140
- activeVariant(goal: EyeLangTerm, env: Env): boolean;
139
+ solve(goals: EyelangTerm | EyelangTerm[], env?: Env, depth?: number): Iterable<Env>;
140
+ activeVariant(goal: EyelangTerm, env: Env): boolean;
141
141
  }
142
142
 
143
143
  export const VAR: 'var';
@@ -151,44 +151,44 @@ export function atom(name: string): Term;
151
151
  export function stringTerm(value: string): Term;
152
152
  export function numberTerm(value: string | number): Term;
153
153
  /** Construct a compound term; an empty argument list is canonicalized to atom(name). */
154
- export function compound(name: string, args?: EyeLangTerm[]): Term;
154
+ export function compound(name: string, args?: EyelangTerm[]): Term;
155
155
  export function emptyList(): Term;
156
- export function cons(head: EyeLangTerm, tail: EyeLangTerm): Term;
157
- export function deref(term: EyeLangTerm, env: Env): EyeLangTerm;
158
- export function isScalar(term: EyeLangTerm | null | undefined): boolean;
159
- export function isEmptyList(term: EyeLangTerm | null | undefined): boolean;
160
- export function isCons(term: EyeLangTerm | null | undefined): boolean;
161
- export function isConjunction(term: EyeLangTerm | null | undefined): boolean;
162
- export function unify(left: EyeLangTerm, right: EyeLangTerm, env: Env): boolean;
163
- export function cloneTerm(term: EyeLangTerm): Term;
164
- export function freshTerm(term: EyeLangTerm, suffix: string | number): Term;
165
- export function copyResolved(term: EyeLangTerm, env: Env): Term;
166
- export function termIsGround(term: EyeLangTerm, env?: Env): boolean;
167
- export function termToString(term: EyeLangTerm, env?: Env, quoteStrings?: boolean): string;
168
- export function lexicalValue(term: EyeLangTerm, env: Env): string | null;
169
- export function properListItems(list: EyeLangTerm, env: Env): EyeLangTerm[] | null;
170
- export function listFromItems(items: EyeLangTerm[], start?: number, end?: number, tail?: EyeLangTerm): Term;
171
- export function flattenConjunction(goal: EyeLangTerm): EyeLangTerm[];
172
- export function termSignature(term: EyeLangTerm | null | undefined): string | null;
173
- export function variantTerms(left: EyeLangTerm, leftEnv: Env, right: EyeLangTerm, rightEnv: Env, pairs?: Map<string, string>, reverse?: Map<string, string>): boolean;
174
- export function compareTerms(left: EyeLangTerm, right: EyeLangTerm): number;
156
+ export function cons(head: EyelangTerm, tail: EyelangTerm): Term;
157
+ export function deref(term: EyelangTerm, env: Env): EyelangTerm;
158
+ export function isScalar(term: EyelangTerm | null | undefined): boolean;
159
+ export function isEmptyList(term: EyelangTerm | null | undefined): boolean;
160
+ export function isCons(term: EyelangTerm | null | undefined): boolean;
161
+ export function isConjunction(term: EyelangTerm | null | undefined): boolean;
162
+ export function unify(left: EyelangTerm, right: EyelangTerm, env: Env): boolean;
163
+ export function cloneTerm(term: EyelangTerm): Term;
164
+ export function freshTerm(term: EyelangTerm, suffix: string | number): Term;
165
+ export function copyResolved(term: EyelangTerm, env: Env): Term;
166
+ export function termIsGround(term: EyelangTerm, env?: Env): boolean;
167
+ export function termToString(term: EyelangTerm, env?: Env, quoteStrings?: boolean): string;
168
+ export function lexicalValue(term: EyelangTerm, env: Env): string | null;
169
+ export function properListItems(list: EyelangTerm, env: Env): EyelangTerm[] | null;
170
+ export function listFromItems(items: EyelangTerm[], start?: number, end?: number, tail?: EyelangTerm): Term;
171
+ export function flattenConjunction(goal: EyelangTerm): EyelangTerm[];
172
+ export function termSignature(term: EyelangTerm | null | undefined): string | null;
173
+ export function variantTerms(left: EyelangTerm, leftEnv: Env, right: EyelangTerm, rightEnv: Env, pairs?: Map<string, string>, reverse?: Map<string, string>): boolean;
174
+ export function compareTerms(left: EyelangTerm, right: EyelangTerm): number;
175
175
  export function isDecimalInteger(text: string | null | undefined): boolean;
176
176
  export function compareIntegerText(left: string, right: string): number;
177
177
  export function parseFiniteNumber(text: string | null | undefined): number | null;
178
178
  export function numberTextFromDouble(value: number): string | null;
179
179
  export function compareNumberText(left: string, right: string): number;
180
180
 
181
- export function makeProgram(source: string, options?: EyeLangRunOptions): Program;
182
- export function parseClauses(source: string, options?: EyeLangRunOptions): EyeLangClause[];
183
- export function parseProgramText(source: string, options?: EyeLangRunOptions): EyeLangClause[];
184
- export function parseGoalText(source: string): EyeLangTerm;
181
+ export function makeProgram(source: string, options?: EyelangRunOptions): Program;
182
+ export function parseClauses(source: string, options?: EyelangRunOptions): EyelangClause[];
183
+ export function parseProgramText(source: string, options?: EyelangRunOptions): EyelangClause[];
184
+ export function parseGoalText(source: string): EyelangTerm;
185
185
  export function createDefaultRegistry(): BuiltinRegistry;
186
- export function createEyeLangRegistry(): BuiltinRegistry;
186
+ export function createEyelangRegistry(): BuiltinRegistry;
187
187
  export function getDefaultRegistry(): BuiltinRegistry;
188
- export function getEyeLangRegistry(): BuiltinRegistry;
188
+ export function getEyelangRegistry(): BuiltinRegistry;
189
189
  export class PrologError extends Error {
190
190
  formal: string;
191
- culprit: EyeLangTerm | null;
191
+ culprit: EyelangTerm | null;
192
192
  }
193
193
 
194
194
  export class HaltSignal extends Error {
@@ -196,10 +196,10 @@ export class HaltSignal extends Error {
196
196
  code: number;
197
197
  constructor(code?: number);
198
198
  }
199
- export function run(source: string | Program, options?: EyeLangRunOptions): EyeLangRunResult;
200
- export function whyProof(program: Program, goal: EyeLangTerm, options?: EyeLangRunOptions): { ok: boolean; text: string };
201
- export function whyNoProof(goal: EyeLangTerm): string;
202
- export function explainProof(program: Program, goal: EyeLangTerm, options?: EyeLangRunOptions): { ok: boolean; text: string };
199
+ export function run(source: string | Program, options?: EyelangRunOptions): EyelangRunResult;
200
+ export function whyProof(program: Program, goal: EyelangTerm, options?: EyelangRunOptions): { ok: boolean; text: string };
201
+ export function whyNoProof(goal: EyelangTerm): string;
202
+ export function explainProof(program: Program, goal: EyelangTerm, options?: EyelangRunOptions): { ok: boolean; text: string };
203
203
 
204
204
  declare const eyelang: {
205
205
  VAR: typeof VAR;
@@ -247,9 +247,9 @@ declare const eyelang: {
247
247
  parseClauses: typeof parseClauses;
248
248
  parseProgramText: typeof parseProgramText;
249
249
  createDefaultRegistry: typeof createDefaultRegistry;
250
- createEyeLangRegistry: typeof createEyeLangRegistry;
250
+ createEyelangRegistry: typeof createEyelangRegistry;
251
251
  getDefaultRegistry: typeof getDefaultRegistry;
252
- getEyeLangRegistry: typeof getEyeLangRegistry;
252
+ getEyelangRegistry: typeof getEyelangRegistry;
253
253
  run: typeof run;
254
254
  whyProof: typeof whyProof;
255
255
  whyNoProof: typeof whyNoProof;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // Public EyeLang JavaScript API.
1
+ // Public Eyelang JavaScript API.
2
2
  export * from './src/index.js';
3
3
  import * as eyelang from './src/index.js';
4
4
  export default eyelang;
package/package.json CHANGED
@@ -3,8 +3,8 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.5.1",
7
- "description": "EyeLang turns facts and rules into answers and proofs.",
6
+ "version": "0.5.2",
7
+ "description": "Eyelang turns facts and rules into answers and proofs.",
8
8
  "type": "module",
9
9
  "main": "./index.js",
10
10
  "types": "./index.d.ts",
package/playground.html CHANGED
@@ -4,7 +4,7 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <link rel="icon" type="image/png" href="eyelang-logo.png">
7
- <title>EyeLang Playground</title>
7
+ <title>Eyelang Playground</title>
8
8
  <style>
9
9
  :root {
10
10
  color-scheme: light dark;
@@ -353,8 +353,8 @@
353
353
  </head>
354
354
  <body>
355
355
  <header>
356
- <h1>The EyeLang Playground</h1>
357
- <p>Run EyeLang programs in your browser with syntax coloring, examples, proofs, and shareable editor links.</p>
356
+ <h1>The Eyelang Playground</h1>
357
+ <p>Run Eyelang programs in your browser with syntax coloring, examples, proofs, and shareable editor links.</p>
358
358
  </header>
359
359
 
360
360
  <main>
@@ -371,7 +371,7 @@
371
371
  <details>
372
372
  <summary id="advanced-heading">⚙ Advanced configuration</summary>
373
373
  <div class="toolbar" aria-label="URL loader">
374
- <label for="source-url">Load EyeLang from URL</label>
374
+ <label for="source-url">Load Eyelang from URL</label>
375
375
  <input id="source-url" type="url" placeholder="https://example.org/program.pl">
376
376
  <button id="load-url" type="button">Load from URL</button>
377
377
  </div>
@@ -385,7 +385,7 @@
385
385
  <label><input id="stats" type="checkbox"> Show stats</label>
386
386
  </div>
387
387
  <div class="panel-body">
388
- <p class="hint">Enter any EyeLang file URL and click “Load from URL”. Background knowledge is prepended when the program runs.</p>
388
+ <p class="hint">Enter any Eyelang file URL and click “Load from URL”. Background knowledge is prepended when the program runs.</p>
389
389
  </div>
390
390
  </details>
391
391
  </section>
@@ -393,14 +393,14 @@
393
393
  <section aria-labelledby="editor-heading">
394
394
  <div class="editor-shell">
395
395
  <div class="editor-label">
396
- <strong id="editor-heading">Editable EyeLang program</strong>
396
+ <strong id="editor-heading">Editable Eyelang program</strong>
397
397
  <span id="source-name" class="hint">custom program</span>
398
398
  </div>
399
399
  <div class="editor">
400
400
  <div id="line-numbers" class="line-numbers" aria-hidden="true"><div class="line-numbers-inner"></div></div>
401
401
  <div id="error-line-marker" class="error-line-marker" aria-hidden="true"></div>
402
402
  <pre id="highlight" aria-hidden="true"><code></code></pre>
403
- <textarea id="source" spellcheck="false" autocapitalize="off" autocomplete="off" aria-label="Editable EyeLang source"></textarea>
403
+ <textarea id="source" spellcheck="false" autocapitalize="off" autocomplete="off" aria-label="Editable Eyelang source"></textarea>
404
404
  </div>
405
405
  </div>
406
406
  <div class="toolbar button-row">
@@ -432,7 +432,7 @@
432
432
  </main>
433
433
 
434
434
  <footer>
435
- Powered by <a href="https://github.com/eyereasoner/eyelang">EyeLang</a>.
435
+ Powered by <a href="https://github.com/eyereasoner/eyelang">Eyelang</a>.
436
436
  </footer>
437
437
 
438
438
  <script type="module">
@@ -953,7 +953,7 @@
953
953
  clearSyntaxError();
954
954
  output.textContent = '';
955
955
  elapsed.textContent = 'Running…';
956
- setStatus('Running EyeLang…');
956
+ setStatus('Running Eyelang…');
957
957
  runButton.disabled = true;
958
958
  stopButton.disabled = false;
959
959
 
@@ -1150,7 +1150,7 @@
1150
1150
  'Content-Type': 'application/json',
1151
1151
  },
1152
1152
  body: JSON.stringify({
1153
- description: 'EyeLang playground share',
1153
+ description: 'Eyelang playground share',
1154
1154
  public: false,
1155
1155
  files,
1156
1156
  }),
package/src/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- // Command-line interface for EyeLang.
1
+ // Command-line interface for Eyelang.
2
2
  // It loads programs from files, URLs, or stdin, then runs requested goals.
3
3
  import fs from 'node:fs/promises';
4
4
  import path from 'node:path';
@@ -137,7 +137,7 @@ async function runDefault(engine, program, options) {
137
137
  const queriedKeys = new Set(goals.map((goal) => `${goal.name}/${goal.arity}`));
138
138
  const facts = program.sourceFactLines(queriedKeys);
139
139
  const lines = new Set();
140
- const registry = engine.getEyeLangRegistry();
140
+ const registry = engine.getEyelangRegistry();
141
141
  const explanation = options.proof ? await loadExplanation() : null;
142
142
  const solver = new engine.Solver(program, {
143
143
  registry,
@@ -181,8 +181,8 @@ Usage:
181
181
  eyelang [options] [file-or-url.pl|- ...]
182
182
 
183
183
  Input:
184
- file-or-url.pl Read an EyeLang program from a local file or http(s) URL.
185
- - Read an EyeLang program from standard input.
184
+ file-or-url.pl Read an Eyelang program from a local file or http(s) URL.
185
+ - Read an Eyelang program from standard input.
186
186
 
187
187
  Options:
188
188
  -h, --help Show this help text and exit.
package/src/explain.js CHANGED
@@ -1,15 +1,15 @@
1
- // EyeLang proof output helpers.
1
+ // Eyelang proof output helpers.
2
2
  // The explanation printer replays a successful goal against the program and emits
3
- // ordinary EyeLang facts with nested proof terms. Explanations are therefore both
3
+ // ordinary Eyelang facts with nested proof terms. Explanations are therefore both
4
4
  // human-readable and machine-readable.
5
5
  import { ATOM, COMPOUND, Env, Term, VAR, deref, flattenConjunction, freshTerm, termToString, unify, variantTerms } from './term.js';
6
6
  import { selectClauseCandidates } from './program.js';
7
- import { getEyeLangRegistry } from './library.js';
7
+ import { getEyelangRegistry } from './library.js';
8
8
  import { Solver, nextFreshId } from './solver.js';
9
9
 
10
10
  export function whyProof(program, goal, options = {}) {
11
11
  const maxDepth = options.maxDepth ?? 256;
12
- const registry = options.registry ?? getEyeLangRegistry();
12
+ const registry = options.registry ?? getEyelangRegistry();
13
13
  const env = options.env ?? new Env();
14
14
  for (const proof of proveGoalAll(program, goal, env, 0, maxDepth, registry, [])) {
15
15
  return { ok: true, text: renderWhyFacts(goal, proof.node, proof.env) };
package/src/index.js CHANGED
@@ -12,8 +12,8 @@ export {
12
12
  PrologError,
13
13
  } from './iso.js';
14
14
  export {
15
- createEyeLangRegistry,
16
- getEyeLangRegistry,
15
+ createEyelangRegistry,
16
+ getEyelangRegistry,
17
17
  } from './library.js';
18
18
  export { StreamManager } from './io.js';
19
19
 
@@ -22,14 +22,14 @@ import { Program } from './program.js';
22
22
  import { Solver } from './solver.js';
23
23
  import { whyNoProof, whyProof } from './explain.js';
24
24
  import { HaltSignal, PrologError } from './iso.js';
25
- import { getEyeLangRegistry } from './library.js';
25
+ import { getEyelangRegistry } from './library.js';
26
26
  import { parseGoalText } from './parser.js';
27
27
 
28
28
  export function run(source, options = {}) {
29
29
  const includeWhy = options.proof === true || options.why === true || options.explain === true;
30
30
  const parseOptions = { ...options, sourceMetadata: includeWhy };
31
31
  let program = source instanceof Program ? source : Program.parse(source, parseOptions);
32
- const runOptions = options.registry ? options : { ...options, registry: getEyeLangRegistry() };
32
+ const runOptions = options.registry ? options : { ...options, registry: getEyelangRegistry() };
33
33
  const output = [];
34
34
  const solver = new Solver(program, {
35
35
  ...runOptions,
package/src/iso.js CHANGED
@@ -1,4 +1,4 @@
1
- // Built-ins in EyeLang's documented ISO compatibility profile. This is a
1
+ // Built-ins in Eyelang's documented ISO compatibility profile. This is a
2
2
  // deliberately incomplete profile, not the complete standard environment.
3
3
  import {
4
4
  ATOM, COMPOUND, NUMBER, STRING, VAR, Env,
package/src/library.js CHANGED
@@ -1,4 +1,4 @@
1
- // EyeLang library implemented entirely as native JavaScript builtins.
1
+ // Eyelang library implemented entirely as native JavaScript builtins.
2
2
  // The single registry is shared by Node, embedders, and the browser playground.
3
3
  import {
4
4
  ATOM,
@@ -34,7 +34,7 @@ import {
34
34
  } from './iso.js';
35
35
 
36
36
  // Numeric builtins for integer-preserving arithmetic, floating point functions, comparisons, and ranges.
37
- // The code keeps BigInt paths where possible so large EyeLang integers remain exact.
37
+ // The code keeps BigInt paths where possible so large Eyelang integers remain exact.
38
38
 
39
39
  const unaryNames = ['tan', 'asin', 'acos'];
40
40
  const binaryNames = ['atan2'];
@@ -461,7 +461,7 @@ function contextFromGroups(groups) {
461
461
  function numericText(text) {
462
462
  return isDecimalInteger(text) || parseFiniteNumber(text) != null;
463
463
  }
464
- // Native EyeLang library relations.
464
+ // Native Eyelang library relations.
465
465
  // These predicates used to be parsed from bundled Prolog source. Keeping them
466
466
  // in the builtin registry removes startup parsing, avoids browser module/cache
467
467
  // duplication, and gives the hot list/aggregation paths direct JavaScript
@@ -998,7 +998,7 @@ function integerArgument(term, env) {
998
998
  return BigInt(resolved.name);
999
999
  }
1000
1000
 
1001
- export function createEyeLangRegistry() {
1001
+ export function createEyelangRegistry() {
1002
1002
  const registry = new BuiltinRegistry();
1003
1003
  registry.eyeLangLibrary = true;
1004
1004
  for (const mod of [
@@ -1012,14 +1012,14 @@ export function createEyeLangRegistry() {
1012
1012
  }
1013
1013
  for (const definition of registry.defs.values()) definition.eyeLangLibrary = true;
1014
1014
  // ISO definitions take precedence where names overlap and remain identifiable
1015
- // as ISO rather than EyeLang-library predicates.
1015
+ // as ISO rather than Eyelang-library predicates.
1016
1016
  isoBuiltins.register(registry);
1017
1017
  return registry;
1018
1018
  }
1019
1019
 
1020
1020
  let eyeLangRegistry = null;
1021
1021
 
1022
- export function getEyeLangRegistry() {
1023
- if (eyeLangRegistry == null) eyeLangRegistry = createEyeLangRegistry();
1022
+ export function getEyelangRegistry() {
1023
+ if (eyeLangRegistry == null) eyeLangRegistry = createEyelangRegistry();
1024
1024
  return eyeLangRegistry;
1025
1025
  }
package/src/parser.js CHANGED
@@ -1,4 +1,4 @@
1
- // Tokenizer and recursive-descent parser for the EyeLang source language.
1
+ // Tokenizer and recursive-descent parser for the Eyelang source language.
2
2
  // It preserves the compact Prolog-like syntax while producing Term objects for the solver.
3
3
  import { atom, compound, cons, emptyList, numberTerm, stringTerm, variable } from './term.js';
4
4
 
@@ -2,9 +2,9 @@
2
2
  // Keep this module free of Node-only imports: it is fetched directly by the
3
3
  // browser and is also exercised by test/run-playground.mjs.
4
4
  import { run } from './index.js?playground=20260803c';
5
- import { createEyeLangRegistry } from './library.js?playground=20260803c';
5
+ import { createEyelangRegistry } from './library.js?playground=20260803c';
6
6
 
7
- const registry = createEyeLangRegistry();
7
+ const registry = createEyelangRegistry();
8
8
 
9
9
  export function executePlaygroundRequest(data, now = defaultNow) {
10
10
  const started = now();
package/src/solver.js CHANGED
@@ -1,11 +1,11 @@
1
- // Depth-first EyeLang solver with builtin dispatch, memoization, and guarded recursion handling.
1
+ // Depth-first Eyelang solver with builtin dispatch, memoization, and guarded recursion handling.
2
2
  // Most semantic decisions still flow through unification; optimizations only select candidates earlier.
3
3
  import {
4
4
  COMPOUND, Env, compound, copyResolved, deref, flattenConjunction, freshTerm,
5
5
  numberTerm, numberTextFromDouble, termIsGround, termToString, unify, variantTerms,
6
6
  } from './term.js';
7
7
  import { PrologError } from './iso.js';
8
- import { getEyeLangRegistry } from './library.js';
8
+ import { getEyelangRegistry } from './library.js';
9
9
  import { selectClauseCandidates, selectClauseCandidatesForValues, selectGroundClauseCandidates } from './program.js';
10
10
  import { StreamManager } from './io.js';
11
11
 
@@ -17,7 +17,7 @@ export function nextFreshId() {
17
17
 
18
18
  export class Solver {
19
19
  constructor(program, options = {}) {
20
- this.registry = options.registry ?? getEyeLangRegistry();
20
+ this.registry = options.registry ?? getEyelangRegistry();
21
21
  this.program = program;
22
22
  this.mutableProgram = program.mutable === true;
23
23
  this.programRevision = this.program.revision ?? 0;
@@ -196,7 +196,7 @@ export class Solver {
196
196
  continue;
197
197
  }
198
198
 
199
- // EyeLang normally solves left-to-right, but ready deterministic builtins can
199
+ // Eyelang normally solves left-to-right, but ready deterministic builtins can
200
200
  // be run early as pure filters. Stop at internal sentinels so rule-body
201
201
  // active guards are released before the caller's remaining goals are seen.
202
202
  const selectedIndex = selectReadyDeterministicBuiltin(goals, env, this.registry);
package/src/term.js CHANGED
@@ -187,7 +187,7 @@ function occurs(variableName, term, env) {
187
187
 
188
188
  export function unify(left, right, env) {
189
189
  // Iterative unification avoids deep JavaScript recursion on long lists or
190
- // deeply nested compounds. The occurs check gives EyeLang finite-tree
190
+ // deeply nested compounds. The occurs check gives Eyelang finite-tree
191
191
  // unification: a variable cannot be bound to a term containing itself.
192
192
  // Bindings are written into the supplied Env.
193
193
  const stack = [[left, right]];
@@ -1,27 +1,27 @@
1
- # EyeLang profile conformance suite
1
+ # Eyelang profile conformance suite
2
2
 
3
- This directory contains executable tests for the EyeLang implementation and
3
+ This directory contains executable tests for the Eyelang implementation and
4
4
  reasoner.
5
- [*The Art of EyeLang*](../../the-art-of-eyelang.md) is the reference for the
5
+ [*The Art of Eyelang*](../../the-art-of-eyelang.md) is the reference for the
6
6
  supported ISO Prolog profile, built-ins, extensions, and reasoner behavior.
7
7
 
8
8
  The suite is intentionally file-based. Exact standard output, errors, warnings,
9
9
  and proof output test the behavior of the JavaScript implementation.
10
10
 
11
- “Conformance” here means conformance to EyeLang's documented ISO compatibility
11
+ “Conformance” here means conformance to Eyelang's documented ISO compatibility
12
12
  profile and implementation extensions. The default registry covers the exact
13
13
  predicate indicators listed in Appendix B of the book across the supported
14
14
  ISO/IEC 13211-1:1995 standard families. This suite is still not an independent certification of
15
15
  every processor requirement, lexical edge, option combination, or prescribed
16
16
  error precedence. Cases under `iso/` identify standards-derived behavior;
17
- other directories cover EyeLang host contracts and extensions.
17
+ other directories cover Eyelang host contracts and extensions.
18
18
 
19
19
  All conformance files live under topic directories such as `arithmetic/`, `lists/`, `syntax/`, or `variables/`; new top-level numbered files should not be added. The report uses those directories as coverage categories.
20
20
 
21
21
  A normal positive case consists of:
22
22
 
23
23
  - `conformance/cases/<name>.pl` — input program;
24
- - `conformance/expected/<name>.pl` — exact expected standard output, stored as EyeLang-readable facts.
24
+ - `conformance/expected/<name>.pl` — exact expected standard output, stored as Eyelang-readable facts.
25
25
 
26
26
  Expected-error cases consist of:
27
27
 
@@ -5,7 +5,7 @@
5
5
  Selected standard term, atom, character, collection, control, and conversion
6
6
  cases under `iso/` are adapted from the `tests/prolog` backend Prolog conformance suite in
7
7
  [Logtalk](https://github.com/LogtalkDotOrg/logtalk3). Each adapted file
8
- identifies its upstream test names. The cases were rewritten for EyeLang's
8
+ identifies its upstream test names. The cases were rewritten for Eyelang's
9
9
  file-based query and exact-output harness and are therefore modified from the
10
10
  upstream files.
11
11
 
@@ -27,7 +27,7 @@ Selected lexical, term, numeric, comment, and operator cases under `iso/` are
27
27
  adapted from `tests-pl/iso-conformity-tests.pl` in
28
28
  [Scryer Prolog](https://github.com/mthom/scryer-prolog). Each adapted file
29
29
  identifies the corresponding upstream test numbers. The cases were rewritten
30
- for EyeLang's file-based query and exact-output harness.
30
+ for Eyelang's file-based query and exact-output harness.
31
31
 
32
32
  BSD 3-Clause License
33
33
 
@@ -64,7 +64,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
64
64
  Selected standard-core cases under `iso/` are adapted from the numbered tests
65
65
  in [`tests/tests`](https://github.com/trealla-prolog/trealla/tree/main/tests/tests)
66
66
  in Trealla Prolog. Each adapted file identifies its upstream test file. The
67
- cases were rewritten for EyeLang's query and exact-output harness.
67
+ cases were rewritten for Eyelang's query and exact-output harness.
68
68
 
69
69
  MIT License
70
70
 
@@ -95,7 +95,7 @@ Selected standard-core operator and finite-tree unification cases under `iso/`
95
95
  are adapted from `tests/core/test_op.pl` and
96
96
  `tests/core/test_occurs_check.pl` in
97
97
  [SWI-Prolog](https://github.com/SWI-Prolog/swipl-devel). Each adapted file
98
- identifies its upstream source. The cases were rewritten for EyeLang's query and
98
+ identifies its upstream source. The cases were rewritten for Eyelang's query and
99
99
  exact-output harness.
100
100
 
101
101
  BSD 2-Clause License
@@ -1,5 +1,5 @@
1
1
  % Adapted from Logtalk iso_abolish_1_01 and eddbali_abolish_1_06.
2
- % Modified for EyeLang's conformance harness. See test/conformance/THIRD_PARTY.md.
2
+ % Modified for Eyelang's conformance harness. See test/conformance/THIRD_PARTY.md.
3
3
  :- dynamic(foo/1).
4
4
  foo(a).
5
5
  %% goal: abolish_result
@@ -1,5 +1,5 @@
1
1
  % Adapted from Logtalk iso_arg_3_01 through 07, eddbali_arg_3_15, and
2
- % lgt_arg_3_17 through 19. Modified for EyeLang's conformance harness.
2
+ % lgt_arg_3_17 through 19. Modified for Eyelang's conformance harness.
3
3
  % See test/conformance/THIRD_PARTY.md.
4
4
  %% goal: arg_results(X0, X1, X2, X3)
5
5